[crud] Remove useResourceEffect (#32206)

Removes useResourceEffect.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32206).
* __->__ #32206
* #32205

DiffTrain build for [a69b80d07e](https://github.com/facebook/react/commit/a69b80d07e5d1bf363ed15d6209a55b35e0765c2)
This commit is contained in:
poteto
2025-02-11 11:25:53 -08:00
committed by poteto
parent 64c08bd815
commit 1622d0f5f3
37 changed files with 7302 additions and 7581 deletions
+1 -1
View File
@@ -1 +1 @@
0461c0d8a49730d1c8ebca2071d9bb7adfc8ac92
a69b80d07e5d1bf363ed15d6209a55b35e0765c2
+1 -1
View File
@@ -1 +1 @@
0461c0d8a49730d1c8ebca2071d9bb7adfc8ac92
a69b80d07e5d1bf363ed15d6209a55b35e0765c2
+26 -24
View File
@@ -1011,22 +1011,6 @@ __DEV__ &&
function useMemoCache(size) {
return resolveDispatcher().useMemoCache(size);
}
function useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
) {
if (!enableUseEffectCRUDOverload) throw Error("Not implemented.");
return resolveDispatcher().useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
}
function noop() {}
function enqueueTask(task) {
if (null === enqueueTaskImpl)
@@ -1333,10 +1317,7 @@ __DEV__ &&
);
return children;
}
},
experimental_useResourceEffect = enableUseEffectCRUDOverload
? useResourceEffect
: void 0;
};
exports.captureOwnerStack = void 0;
enableOwnerStacks && (exports.captureOwnerStack = captureOwnerStack);
exports.Children = Children;
@@ -1703,7 +1684,6 @@ __DEV__ &&
exports.experimental_useEffectEvent = function (callback) {
return resolveDispatcher().useEffectEvent(callback);
};
exports.experimental_useResourceEffect = experimental_useResourceEffect;
exports.forwardRef = function (render) {
null != render && render.$$typeof === REACT_MEMO_TYPE
? error$jscomp$0(
@@ -1928,8 +1908,30 @@ __DEV__ &&
exports.useDeferredValue = function (value, initialValue) {
return resolveDispatcher().useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return resolveDispatcher().useEffect(create, deps);
exports.useEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
var dispatcher = resolveDispatcher();
if (
enableUseEffectCRUDOverload &&
("function" === typeof update || "function" === typeof destroy)
)
return dispatcher.useEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create, createDeps);
};
exports.useId = function () {
return resolveDispatcher().useId();
@@ -1972,7 +1974,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+26 -24
View File
@@ -1011,22 +1011,6 @@ __DEV__ &&
function useMemoCache(size) {
return resolveDispatcher().useMemoCache(size);
}
function useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
) {
if (!enableUseEffectCRUDOverload) throw Error("Not implemented.");
return resolveDispatcher().useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
}
function noop() {}
function enqueueTask(task) {
if (null === enqueueTaskImpl)
@@ -1333,10 +1317,7 @@ __DEV__ &&
);
return children;
}
},
experimental_useResourceEffect = enableUseEffectCRUDOverload
? useResourceEffect
: void 0;
};
exports.captureOwnerStack = void 0;
enableOwnerStacks && (exports.captureOwnerStack = captureOwnerStack);
exports.Children = Children;
@@ -1703,7 +1684,6 @@ __DEV__ &&
exports.experimental_useEffectEvent = function (callback) {
return resolveDispatcher().useEffectEvent(callback);
};
exports.experimental_useResourceEffect = experimental_useResourceEffect;
exports.forwardRef = function (render) {
null != render && render.$$typeof === REACT_MEMO_TYPE
? error$jscomp$0(
@@ -1928,8 +1908,30 @@ __DEV__ &&
exports.useDeferredValue = function (value, initialValue) {
return resolveDispatcher().useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return resolveDispatcher().useEffect(create, deps);
exports.useEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
var dispatcher = resolveDispatcher();
if (
enableUseEffectCRUDOverload &&
("function" === typeof update || "function" === typeof destroy)
)
return dispatcher.useEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create, createDeps);
};
exports.useId = function () {
return resolveDispatcher().useId();
@@ -1972,7 +1974,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+20 -18
View File
@@ -325,16 +325,6 @@ function lazyInitializer(payload) {
function useMemoCache(size) {
return ReactSharedInternals.H.useMemoCache(size);
}
function useResourceEffect(create, createDeps, update, updateDeps, destroy) {
if (!enableUseEffectCRUDOverload) throw Error("Not implemented.");
return ReactSharedInternals.H.useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
}
var reportGlobalError =
"function" === typeof reportError
? reportError
@@ -365,10 +355,7 @@ var reportGlobalError =
console.error(error);
};
function noop() {}
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
experimental_useResourceEffect = enableUseEffectCRUDOverload
? useResourceEffect
: void 0;
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache };
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
@@ -512,7 +499,6 @@ exports.createRef = function () {
exports.experimental_useEffectEvent = function (callback) {
return ReactSharedInternals.H.useEffectEvent(callback);
};
exports.experimental_useResourceEffect = experimental_useResourceEffect;
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
@@ -595,8 +581,24 @@ exports.useDebugValue = function () {};
exports.useDeferredValue = function (value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return ReactSharedInternals.H.useEffect(create, deps);
exports.useEffect = function (create, createDeps, update, updateDeps, destroy) {
var dispatcher = ReactSharedInternals.H;
if (
enableUseEffectCRUDOverload &&
("function" === typeof update || "function" === typeof destroy)
)
return dispatcher.useEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create, createDeps);
};
exports.useId = function () {
return ReactSharedInternals.H.useId();
@@ -639,4 +641,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
+20 -18
View File
@@ -325,16 +325,6 @@ function lazyInitializer(payload) {
function useMemoCache(size) {
return ReactSharedInternals.H.useMemoCache(size);
}
function useResourceEffect(create, createDeps, update, updateDeps, destroy) {
if (!enableUseEffectCRUDOverload) throw Error("Not implemented.");
return ReactSharedInternals.H.useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
}
var reportGlobalError =
"function" === typeof reportError
? reportError
@@ -365,10 +355,7 @@ var reportGlobalError =
console.error(error);
};
function noop() {}
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
experimental_useResourceEffect = enableUseEffectCRUDOverload
? useResourceEffect
: void 0;
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache };
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
@@ -512,7 +499,6 @@ exports.createRef = function () {
exports.experimental_useEffectEvent = function (callback) {
return ReactSharedInternals.H.useEffectEvent(callback);
};
exports.experimental_useResourceEffect = experimental_useResourceEffect;
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
@@ -595,8 +581,24 @@ exports.useDebugValue = function () {};
exports.useDeferredValue = function (value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return ReactSharedInternals.H.useEffect(create, deps);
exports.useEffect = function (create, createDeps, update, updateDeps, destroy) {
var dispatcher = ReactSharedInternals.H;
if (
enableUseEffectCRUDOverload &&
("function" === typeof update || "function" === typeof destroy)
)
return dispatcher.useEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create, createDeps);
};
exports.useId = function () {
return ReactSharedInternals.H.useId();
@@ -639,4 +641,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
@@ -329,16 +329,6 @@ function lazyInitializer(payload) {
function useMemoCache(size) {
return ReactSharedInternals.H.useMemoCache(size);
}
function useResourceEffect(create, createDeps, update, updateDeps, destroy) {
if (!enableUseEffectCRUDOverload) throw Error("Not implemented.");
return ReactSharedInternals.H.useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
}
var reportGlobalError =
"function" === typeof reportError
? reportError
@@ -369,10 +359,7 @@ var reportGlobalError =
console.error(error);
};
function noop() {}
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
experimental_useResourceEffect = enableUseEffectCRUDOverload
? useResourceEffect
: void 0;
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache };
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
@@ -516,7 +503,6 @@ exports.createRef = function () {
exports.experimental_useEffectEvent = function (callback) {
return ReactSharedInternals.H.useEffectEvent(callback);
};
exports.experimental_useResourceEffect = experimental_useResourceEffect;
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
@@ -599,8 +585,24 @@ exports.useDebugValue = function () {};
exports.useDeferredValue = function (value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return ReactSharedInternals.H.useEffect(create, deps);
exports.useEffect = function (create, createDeps, update, updateDeps, destroy) {
var dispatcher = ReactSharedInternals.H;
if (
enableUseEffectCRUDOverload &&
("function" === typeof update || "function" === typeof destroy)
)
return dispatcher.useEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create, createDeps);
};
exports.useId = function () {
return ReactSharedInternals.H.useId();
@@ -643,7 +645,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+20 -18
View File
@@ -329,16 +329,6 @@ function lazyInitializer(payload) {
function useMemoCache(size) {
return ReactSharedInternals.H.useMemoCache(size);
}
function useResourceEffect(create, createDeps, update, updateDeps, destroy) {
if (!enableUseEffectCRUDOverload) throw Error("Not implemented.");
return ReactSharedInternals.H.useResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
}
var reportGlobalError =
"function" === typeof reportError
? reportError
@@ -369,10 +359,7 @@ var reportGlobalError =
console.error(error);
};
function noop() {}
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
experimental_useResourceEffect = enableUseEffectCRUDOverload
? useResourceEffect
: void 0;
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache };
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
@@ -516,7 +503,6 @@ exports.createRef = function () {
exports.experimental_useEffectEvent = function (callback) {
return ReactSharedInternals.H.useEffectEvent(callback);
};
exports.experimental_useResourceEffect = experimental_useResourceEffect;
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
@@ -599,8 +585,24 @@ exports.useDebugValue = function () {};
exports.useDeferredValue = function (value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return ReactSharedInternals.H.useEffect(create, deps);
exports.useEffect = function (create, createDeps, update, updateDeps, destroy) {
var dispatcher = ReactSharedInternals.H;
if (
enableUseEffectCRUDOverload &&
("function" === typeof update || "function" === typeof destroy)
)
return dispatcher.useEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create, createDeps);
};
exports.useId = function () {
return ReactSharedInternals.H.useId();
@@ -643,7 +645,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+331 -347
View File
@@ -3743,8 +3743,9 @@ __DEV__ &&
)
(hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0);
hook = hook.queue;
var create = subscribeToStore.bind(null, fiber, hook, subscribe);
updateEffectImpl(2048, Passive, create, [subscribe]);
updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
subscribe
]);
if (
hook.getSnapshot !== getSnapshot ||
cachedSnapshot ||
@@ -4099,11 +4100,11 @@ __DEV__ &&
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -4160,15 +4161,15 @@ __DEV__ &&
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -4187,11 +4188,47 @@ __DEV__ &&
deps
)));
}
function mountEffect(create, deps) {
function mountEffect(create, createDeps, update, updateDeps, destroy) {
0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)
? mountEffectImpl(276826112, Passive, create, deps)
: mountEffectImpl(8390656, Passive, create, deps);
? !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(276826112, Passive, create, createDeps)
: mountResourceEffectImpl(
276826112,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
)
: !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(8390656, Passive, create, createDeps)
: mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function updateEffect(create, createDeps, update, updateDeps, destroy) {
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? updateEffectImpl(2048, Passive, create, createDeps)
: updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function mountResourceEffect(
create,
@@ -4200,39 +4237,40 @@ __DEV__ &&
updateDeps,
destroy
) {
if (
0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)
) {
var hookFlags = Passive,
hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 276826112;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
(0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)) ||
mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps
updateDeps,
destroy
);
} else
(hookFlags = Passive),
(hook = mountWorkInProgressHook()),
(currentlyRenderingFiber.flags |= 8390656),
(inst = createEffectInstance()),
(inst.destroy = destroy),
(hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
create,
createDeps,
update,
updateDeps
));
}
function mountResourceEffectImpl(
fiberFlags,
hookFlags,
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= fiberFlags;
fiberFlags = createEffectInstance();
fiberFlags.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
fiberFlags,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffectImpl(
fiberFlags,
@@ -9679,7 +9717,7 @@ __DEV__ &&
)),
null == updateQueue.inst.resource &&
error$jscomp$0(
"useResourceEffect must provide a callback which returns a resource. If a managed resource is not needed here, use useEffect. Received %s",
"useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s",
updateQueue.inst.resource
),
(lastEffect = updateQueue.inst.destroy)),
@@ -9729,10 +9767,7 @@ __DEV__ &&
? "useLayoutEffect"
: 0 !== (updateQueue.tag & Insertion)
? "useInsertionEffect"
: enableUseEffectCRUDOverload &&
null != updateQueue.resourceKind
? "useResourceEffect"
: "useEffect";
: "useEffect";
var addendum = void 0;
addendum =
null === lastEffect
@@ -9767,7 +9802,7 @@ __DEV__ &&
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -9779,10 +9814,10 @@ __DEV__ &&
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy) {
enableUseEffectCRUDOverload
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0);
: (inst.destroy = void 0),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -9799,51 +9834,38 @@ __DEV__ &&
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
));
)),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !0);
if (enableUseEffectCRUDOverload) {
if (
updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor =
nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
runWithFiberInDEV(
lastEffect,
callDestroyInDEV,
lastEffect,
(isRunningInsertionEffect = !0),
enableUseEffectCRUDOverload
? (updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy,
updateQueue.inst.resource
),
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy_
);
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
);
updateQueue.inst.resource = null;
}
null == updateQueue.resourceKind &&
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
} else
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !1);
(isRunningInsertionEffect = !1),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -9856,8 +9878,7 @@ __DEV__ &&
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -10083,6 +10104,21 @@ __DEV__ &&
}
else ref.current = null;
}
function safelyCallDestroy(
current,
nearestMountedAncestor,
destroy,
resource
) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
runWithFiberInDEV(
current,
callDestroyInDEV,
current,
nearestMountedAncestor,
destroy
);
}
function commitProfiler(
finishedWork,
current,
@@ -15643,8 +15679,6 @@ __DEV__ &&
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMountInDEV = null,
HooksDispatcherOnMountWithHookTypesInDEV = null,
HooksDispatcherOnUpdateInDEV = null,
@@ -15668,132 +15702,16 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (subscribe, getSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
mountHookTypesDev();
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return (
checkDepsAreArrayDev(createDeps), mountEffect(create, createDeps)
);
void 0 !== updateDeps &&
null !== updateDeps &&
isArrayImpl(updateDeps) &&
@@ -15809,7 +15727,117 @@ __DEV__ &&
updateDeps,
destroy
);
});
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (subscribe, getSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context) {
return readContext(context);
@@ -15825,10 +15853,19 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -15936,24 +15973,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountWithHookTypesInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
return readContext(context);
@@ -15969,10 +15988,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16080,26 +16112,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
return readContext(context);
@@ -16115,10 +16127,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16226,26 +16251,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerenderInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -16267,11 +16272,20 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16397,25 +16411,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -16437,11 +16432,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16567,27 +16575,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -16609,11 +16596,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16739,22 +16739,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnRerenderInDEV.useResourceEffect =
function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
var callComponent = {
"react-stack-bottom-frame": function (Component, props, secondArg) {
var wasRendering = isRendering;
@@ -17413,10 +17397,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-0461c0d8-20250211",
version: "19.1.0-www-classic-a69b80d0-20250211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17450,7 +17434,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+331 -347
View File
@@ -3649,8 +3649,9 @@ __DEV__ &&
)
(hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0);
hook = hook.queue;
var create = subscribeToStore.bind(null, fiber, hook, subscribe);
updateEffectImpl(2048, Passive, create, [subscribe]);
updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
subscribe
]);
if (
hook.getSnapshot !== getSnapshot ||
cachedSnapshot ||
@@ -4005,11 +4006,11 @@ __DEV__ &&
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -4066,15 +4067,15 @@ __DEV__ &&
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -4093,11 +4094,47 @@ __DEV__ &&
deps
)));
}
function mountEffect(create, deps) {
function mountEffect(create, createDeps, update, updateDeps, destroy) {
0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)
? mountEffectImpl(276826112, Passive, create, deps)
: mountEffectImpl(8390656, Passive, create, deps);
? !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(276826112, Passive, create, createDeps)
: mountResourceEffectImpl(
276826112,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
)
: !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(8390656, Passive, create, createDeps)
: mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function updateEffect(create, createDeps, update, updateDeps, destroy) {
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? updateEffectImpl(2048, Passive, create, createDeps)
: updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function mountResourceEffect(
create,
@@ -4106,39 +4143,40 @@ __DEV__ &&
updateDeps,
destroy
) {
if (
0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)
) {
var hookFlags = Passive,
hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 276826112;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
(0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)) ||
mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps
updateDeps,
destroy
);
} else
(hookFlags = Passive),
(hook = mountWorkInProgressHook()),
(currentlyRenderingFiber.flags |= 8390656),
(inst = createEffectInstance()),
(inst.destroy = destroy),
(hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
create,
createDeps,
update,
updateDeps
));
}
function mountResourceEffectImpl(
fiberFlags,
hookFlags,
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= fiberFlags;
fiberFlags = createEffectInstance();
fiberFlags.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
fiberFlags,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffectImpl(
fiberFlags,
@@ -9497,7 +9535,7 @@ __DEV__ &&
)),
null == updateQueue.inst.resource &&
error$jscomp$0(
"useResourceEffect must provide a callback which returns a resource. If a managed resource is not needed here, use useEffect. Received %s",
"useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s",
updateQueue.inst.resource
),
(lastEffect = updateQueue.inst.destroy)),
@@ -9547,10 +9585,7 @@ __DEV__ &&
? "useLayoutEffect"
: 0 !== (updateQueue.tag & Insertion)
? "useInsertionEffect"
: enableUseEffectCRUDOverload &&
null != updateQueue.resourceKind
? "useResourceEffect"
: "useEffect";
: "useEffect";
var addendum = void 0;
addendum =
null === lastEffect
@@ -9585,7 +9620,7 @@ __DEV__ &&
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -9597,10 +9632,10 @@ __DEV__ &&
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy) {
enableUseEffectCRUDOverload
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0);
: (inst.destroy = void 0),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -9617,51 +9652,38 @@ __DEV__ &&
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
));
)),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !0);
if (enableUseEffectCRUDOverload) {
if (
updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor =
nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
runWithFiberInDEV(
lastEffect,
callDestroyInDEV,
lastEffect,
(isRunningInsertionEffect = !0),
enableUseEffectCRUDOverload
? (updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy,
updateQueue.inst.resource
),
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy_
);
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
);
updateQueue.inst.resource = null;
}
null == updateQueue.resourceKind &&
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
} else
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !1);
(isRunningInsertionEffect = !1),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -9674,8 +9696,7 @@ __DEV__ &&
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -9901,6 +9922,21 @@ __DEV__ &&
}
else ref.current = null;
}
function safelyCallDestroy(
current,
nearestMountedAncestor,
destroy,
resource
) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
runWithFiberInDEV(
current,
callDestroyInDEV,
current,
nearestMountedAncestor,
destroy
);
}
function commitProfiler(
finishedWork,
current,
@@ -15416,8 +15452,6 @@ __DEV__ &&
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMountInDEV = null,
HooksDispatcherOnMountWithHookTypesInDEV = null,
HooksDispatcherOnUpdateInDEV = null,
@@ -15441,132 +15475,16 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (subscribe, getSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
mountHookTypesDev();
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return (
checkDepsAreArrayDev(createDeps), mountEffect(create, createDeps)
);
void 0 !== updateDeps &&
null !== updateDeps &&
isArrayImpl(updateDeps) &&
@@ -15582,7 +15500,117 @@ __DEV__ &&
updateDeps,
destroy
);
});
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (subscribe, getSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context) {
return readContext(context);
@@ -15598,10 +15626,19 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -15709,24 +15746,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountWithHookTypesInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
return readContext(context);
@@ -15742,10 +15761,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -15853,26 +15885,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
return readContext(context);
@@ -15888,10 +15900,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -15999,26 +16024,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerenderInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -16040,11 +16045,20 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16170,25 +16184,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -16210,11 +16205,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16340,27 +16348,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -16382,11 +16369,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -16512,22 +16512,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnRerenderInDEV.useResourceEffect =
function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
var callComponent = {
"react-stack-bottom-frame": function (Component, props, secondArg) {
var wasRendering = isRendering;
@@ -17185,10 +17169,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-0461c0d8-20250211",
version: "19.1.0-www-modern-a69b80d0-20250211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17222,7 +17206,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+316 -334
View File
@@ -2746,11 +2746,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -2805,15 +2805,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -2832,60 +2832,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -3212,231 +3220,225 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
var nextSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
hook.memoizedState = nextSnapshot;
var inst = { value: nextSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),
null
);
return nextSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix,
globalClientId = globalClientIdCounter++;
identifierPrefix =
":" + identifierPrefix + "r" + globalClientId.toString(32) + ":";
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
var nextSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
hook.memoizedState = nextSnapshot;
var inst = { value: nextSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),
null
);
return nextSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix,
globalClientId = globalClientIdCounter++;
identifierPrefix =
":" + identifierPrefix + "r" + globalClientId.toString(32) + ":";
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -3490,8 +3492,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -7103,7 +7103,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -7115,59 +7115,33 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -7256,6 +7230,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -11271,24 +11253,24 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component);
var internals$jscomp$inline_1567 = {
var internals$jscomp$inline_1550 = {
bundleType: 0,
version: "19.1.0-www-classic-0461c0d8-20250211",
version: "19.1.0-www-classic-a69b80d0-20250211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1568 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1551 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1568.isDisabled &&
hook$jscomp$inline_1568.supportsFiber
!hook$jscomp$inline_1551.isDisabled &&
hook$jscomp$inline_1551.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1568.inject(
internals$jscomp$inline_1567
(rendererID = hook$jscomp$inline_1551.inject(
internals$jscomp$inline_1550
)),
(injectedHook = hook$jscomp$inline_1568);
(injectedHook = hook$jscomp$inline_1551);
} catch (err) {}
}
var Path = Mode$1.Path;
@@ -11302,4 +11284,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
+316 -334
View File
@@ -2603,11 +2603,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -2662,15 +2662,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -2689,60 +2689,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -3069,231 +3077,225 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
var nextSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
hook.memoizedState = nextSnapshot;
var inst = { value: nextSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),
null
);
return nextSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix,
globalClientId = globalClientIdCounter++;
identifierPrefix =
":" + identifierPrefix + "r" + globalClientId.toString(32) + ":";
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
var nextSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
hook.memoizedState = nextSnapshot;
var inst = { value: nextSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),
null
);
return nextSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix,
globalClientId = globalClientIdCounter++;
identifierPrefix =
":" + identifierPrefix + "r" + globalClientId.toString(32) + ":";
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -3347,8 +3349,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -6857,7 +6857,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -6869,59 +6869,33 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -7010,6 +6984,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -10986,24 +10968,24 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component);
var internals$jscomp$inline_1540 = {
var internals$jscomp$inline_1523 = {
bundleType: 0,
version: "19.1.0-www-modern-0461c0d8-20250211",
version: "19.1.0-www-modern-a69b80d0-20250211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1541 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1524 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1541.isDisabled &&
hook$jscomp$inline_1541.supportsFiber
!hook$jscomp$inline_1524.isDisabled &&
hook$jscomp$inline_1524.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1541.inject(
internals$jscomp$inline_1540
(rendererID = hook$jscomp$inline_1524.inject(
internals$jscomp$inline_1523
)),
(injectedHook = hook$jscomp$inline_1541);
(injectedHook = hook$jscomp$inline_1524);
} catch (err) {}
}
var Path = Mode$1.Path;
@@ -11017,4 +10999,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+359 -376
View File
@@ -3663,11 +3663,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -3722,15 +3722,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3749,60 +3749,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -4184,250 +4192,245 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -4481,8 +4484,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -8517,7 +8518,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -8529,59 +8530,33 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -8670,6 +8645,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -14304,14 +14287,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$357;
if (canUseDOM) {
var isSupported$jscomp$inline_1652 = "oninput" in document;
if (!isSupported$jscomp$inline_1652) {
var element$jscomp$inline_1653 = document.createElement("div");
element$jscomp$inline_1653.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1652 =
"function" === typeof element$jscomp$inline_1653.oninput;
var isSupported$jscomp$inline_1635 = "oninput" in document;
if (!isSupported$jscomp$inline_1635) {
var element$jscomp$inline_1636 = document.createElement("div");
element$jscomp$inline_1636.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1635 =
"function" === typeof element$jscomp$inline_1636.oninput;
}
JSCompiler_inline_result$jscomp$357 = isSupported$jscomp$inline_1652;
JSCompiler_inline_result$jscomp$357 = isSupported$jscomp$inline_1635;
} else JSCompiler_inline_result$jscomp$357 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$357 &&
@@ -14634,20 +14617,20 @@ function extractEvents$1(
}
}
for (
var i$jscomp$inline_1693 = 0;
i$jscomp$inline_1693 < simpleEventPluginEvents.length;
i$jscomp$inline_1693++
var i$jscomp$inline_1676 = 0;
i$jscomp$inline_1676 < simpleEventPluginEvents.length;
i$jscomp$inline_1676++
) {
var eventName$jscomp$inline_1694 =
simpleEventPluginEvents[i$jscomp$inline_1693],
domEventName$jscomp$inline_1695 =
eventName$jscomp$inline_1694.toLowerCase(),
capitalizedEvent$jscomp$inline_1696 =
eventName$jscomp$inline_1694[0].toUpperCase() +
eventName$jscomp$inline_1694.slice(1);
var eventName$jscomp$inline_1677 =
simpleEventPluginEvents[i$jscomp$inline_1676],
domEventName$jscomp$inline_1678 =
eventName$jscomp$inline_1677.toLowerCase(),
capitalizedEvent$jscomp$inline_1679 =
eventName$jscomp$inline_1677[0].toUpperCase() +
eventName$jscomp$inline_1677.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1695,
"on" + capitalizedEvent$jscomp$inline_1696
domEventName$jscomp$inline_1678,
"on" + capitalizedEvent$jscomp$inline_1679
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -18438,16 +18421,16 @@ function getCrossOriginStringAs(as, input) {
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
var isomorphicReactPackageVersion$jscomp$inline_1871 = React.version;
var isomorphicReactPackageVersion$jscomp$inline_1854 = React.version;
if (
"19.1.0-www-classic-0461c0d8-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1871
"19.1.0-www-classic-a69b80d0-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1854
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1871,
"19.1.0-www-classic-0461c0d8-20250211"
isomorphicReactPackageVersion$jscomp$inline_1854,
"19.1.0-www-classic-a69b80d0-20250211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -18463,24 +18446,24 @@ Internals.Events = [
return fn(a);
}
];
var internals$jscomp$inline_2431 = {
var internals$jscomp$inline_2414 = {
bundleType: 0,
version: "19.1.0-www-classic-0461c0d8-20250211",
version: "19.1.0-www-classic-a69b80d0-20250211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2432 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2415 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2432.isDisabled &&
hook$jscomp$inline_2432.supportsFiber
!hook$jscomp$inline_2415.isDisabled &&
hook$jscomp$inline_2415.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2432.inject(
internals$jscomp$inline_2431
(rendererID = hook$jscomp$inline_2415.inject(
internals$jscomp$inline_2414
)),
(injectedHook = hook$jscomp$inline_2432);
(injectedHook = hook$jscomp$inline_2415);
} catch (err) {}
}
function ReactDOMRoot(internalRoot) {
@@ -18832,4 +18815,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
+359 -376
View File
@@ -3509,11 +3509,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -3568,15 +3568,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3595,60 +3595,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -4030,250 +4038,245 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -4327,8 +4330,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -8263,7 +8264,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -8275,59 +8276,33 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -8416,6 +8391,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -14040,14 +14023,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$360;
if (canUseDOM) {
var isSupported$jscomp$inline_1642 = "oninput" in document;
if (!isSupported$jscomp$inline_1642) {
var element$jscomp$inline_1643 = document.createElement("div");
element$jscomp$inline_1643.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1642 =
"function" === typeof element$jscomp$inline_1643.oninput;
var isSupported$jscomp$inline_1625 = "oninput" in document;
if (!isSupported$jscomp$inline_1625) {
var element$jscomp$inline_1626 = document.createElement("div");
element$jscomp$inline_1626.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1625 =
"function" === typeof element$jscomp$inline_1626.oninput;
}
JSCompiler_inline_result$jscomp$360 = isSupported$jscomp$inline_1642;
JSCompiler_inline_result$jscomp$360 = isSupported$jscomp$inline_1625;
} else JSCompiler_inline_result$jscomp$360 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$360 &&
@@ -14370,20 +14353,20 @@ function extractEvents$1(
}
}
for (
var i$jscomp$inline_1683 = 0;
i$jscomp$inline_1683 < simpleEventPluginEvents.length;
i$jscomp$inline_1683++
var i$jscomp$inline_1666 = 0;
i$jscomp$inline_1666 < simpleEventPluginEvents.length;
i$jscomp$inline_1666++
) {
var eventName$jscomp$inline_1684 =
simpleEventPluginEvents[i$jscomp$inline_1683],
domEventName$jscomp$inline_1685 =
eventName$jscomp$inline_1684.toLowerCase(),
capitalizedEvent$jscomp$inline_1686 =
eventName$jscomp$inline_1684[0].toUpperCase() +
eventName$jscomp$inline_1684.slice(1);
var eventName$jscomp$inline_1667 =
simpleEventPluginEvents[i$jscomp$inline_1666],
domEventName$jscomp$inline_1668 =
eventName$jscomp$inline_1667.toLowerCase(),
capitalizedEvent$jscomp$inline_1669 =
eventName$jscomp$inline_1667[0].toUpperCase() +
eventName$jscomp$inline_1667.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1685,
"on" + capitalizedEvent$jscomp$inline_1686
domEventName$jscomp$inline_1668,
"on" + capitalizedEvent$jscomp$inline_1669
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -18169,16 +18152,16 @@ function getCrossOriginStringAs(as, input) {
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
var isomorphicReactPackageVersion$jscomp$inline_1861 = React.version;
var isomorphicReactPackageVersion$jscomp$inline_1844 = React.version;
if (
"19.1.0-www-modern-0461c0d8-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1861
"19.1.0-www-modern-a69b80d0-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1844
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1861,
"19.1.0-www-modern-0461c0d8-20250211"
isomorphicReactPackageVersion$jscomp$inline_1844,
"19.1.0-www-modern-a69b80d0-20250211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -18194,24 +18177,24 @@ Internals.Events = [
return fn(a);
}
];
var internals$jscomp$inline_2413 = {
var internals$jscomp$inline_2396 = {
bundleType: 0,
version: "19.1.0-www-modern-0461c0d8-20250211",
version: "19.1.0-www-modern-a69b80d0-20250211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2414 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2397 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2414.isDisabled &&
hook$jscomp$inline_2414.supportsFiber
!hook$jscomp$inline_2397.isDisabled &&
hook$jscomp$inline_2397.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2414.inject(
internals$jscomp$inline_2413
(rendererID = hook$jscomp$inline_2397.inject(
internals$jscomp$inline_2396
)),
(injectedHook = hook$jscomp$inline_2414);
(injectedHook = hook$jscomp$inline_2397);
} catch (err) {}
}
function ReactDOMRoot(internalRoot) {
@@ -18563,4 +18546,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
@@ -3831,11 +3831,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -3890,15 +3890,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3917,60 +3917,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -4355,250 +4363,245 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -4652,8 +4655,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -8845,7 +8846,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -8857,10 +8858,10 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy) {
enableUseEffectCRUDOverload
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0);
: (inst.destroy = void 0),
enableSchedulingProfiler &&
(0 !== (flags & 8)
? enableSchedulingProfiler &&
@@ -8877,54 +8878,30 @@ function commitHookEffectListUnmount(
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
));
if (enableUseEffectCRUDOverload) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
)),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
),
enableSchedulingProfiler &&
(0 !== (flags & 8)
? enableSchedulingProfiler &&
@@ -8937,8 +8914,7 @@ function commitHookEffectListUnmount(
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -9080,6 +9056,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerUpdate(
finishedWork,
current,
@@ -14995,14 +14979,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$374;
if (canUseDOM) {
var isSupported$jscomp$inline_1749 = "oninput" in document;
if (!isSupported$jscomp$inline_1749) {
var element$jscomp$inline_1750 = document.createElement("div");
element$jscomp$inline_1750.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1749 =
"function" === typeof element$jscomp$inline_1750.oninput;
var isSupported$jscomp$inline_1732 = "oninput" in document;
if (!isSupported$jscomp$inline_1732) {
var element$jscomp$inline_1733 = document.createElement("div");
element$jscomp$inline_1733.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1732 =
"function" === typeof element$jscomp$inline_1733.oninput;
}
JSCompiler_inline_result$jscomp$374 = isSupported$jscomp$inline_1749;
JSCompiler_inline_result$jscomp$374 = isSupported$jscomp$inline_1732;
} else JSCompiler_inline_result$jscomp$374 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$374 &&
@@ -15325,20 +15309,20 @@ function extractEvents$1(
}
}
for (
var i$jscomp$inline_1790 = 0;
i$jscomp$inline_1790 < simpleEventPluginEvents.length;
i$jscomp$inline_1790++
var i$jscomp$inline_1773 = 0;
i$jscomp$inline_1773 < simpleEventPluginEvents.length;
i$jscomp$inline_1773++
) {
var eventName$jscomp$inline_1791 =
simpleEventPluginEvents[i$jscomp$inline_1790],
domEventName$jscomp$inline_1792 =
eventName$jscomp$inline_1791.toLowerCase(),
capitalizedEvent$jscomp$inline_1793 =
eventName$jscomp$inline_1791[0].toUpperCase() +
eventName$jscomp$inline_1791.slice(1);
var eventName$jscomp$inline_1774 =
simpleEventPluginEvents[i$jscomp$inline_1773],
domEventName$jscomp$inline_1775 =
eventName$jscomp$inline_1774.toLowerCase(),
capitalizedEvent$jscomp$inline_1776 =
eventName$jscomp$inline_1774[0].toUpperCase() +
eventName$jscomp$inline_1774.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1792,
"on" + capitalizedEvent$jscomp$inline_1793
domEventName$jscomp$inline_1775,
"on" + capitalizedEvent$jscomp$inline_1776
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -19129,16 +19113,16 @@ function getCrossOriginStringAs(as, input) {
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
var isomorphicReactPackageVersion$jscomp$inline_1968 = React.version;
var isomorphicReactPackageVersion$jscomp$inline_1951 = React.version;
if (
"19.1.0-www-classic-0461c0d8-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1968
"19.1.0-www-classic-a69b80d0-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1951
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1968,
"19.1.0-www-classic-0461c0d8-20250211"
isomorphicReactPackageVersion$jscomp$inline_1951,
"19.1.0-www-classic-a69b80d0-20250211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -19154,27 +19138,27 @@ Internals.Events = [
return fn(a);
}
];
var internals$jscomp$inline_1970 = {
var internals$jscomp$inline_1953 = {
bundleType: 0,
version: "19.1.0-www-classic-0461c0d8-20250211",
version: "19.1.0-www-classic-a69b80d0-20250211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1970.getLaneLabelMap = getLaneLabelMap),
(internals$jscomp$inline_1970.injectProfilingHooks = injectProfilingHooks));
((internals$jscomp$inline_1953.getLaneLabelMap = getLaneLabelMap),
(internals$jscomp$inline_1953.injectProfilingHooks = injectProfilingHooks));
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2490 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2473 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2490.isDisabled &&
hook$jscomp$inline_2490.supportsFiber
!hook$jscomp$inline_2473.isDisabled &&
hook$jscomp$inline_2473.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2490.inject(
internals$jscomp$inline_1970
(rendererID = hook$jscomp$inline_2473.inject(
internals$jscomp$inline_1953
)),
(injectedHook = hook$jscomp$inline_2490);
(injectedHook = hook$jscomp$inline_2473);
} catch (err) {}
}
function ReactDOMRoot(internalRoot) {
@@ -19526,7 +19510,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+362 -378
View File
@@ -3677,11 +3677,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -3736,15 +3736,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3763,60 +3763,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -4201,250 +4209,245 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -4498,8 +4501,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -8590,7 +8591,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -8602,10 +8603,10 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy) {
enableUseEffectCRUDOverload
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0);
: (inst.destroy = void 0),
enableSchedulingProfiler &&
(0 !== (flags & 8)
? enableSchedulingProfiler &&
@@ -8622,54 +8623,30 @@ function commitHookEffectListUnmount(
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
));
if (enableUseEffectCRUDOverload) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
)),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
),
enableSchedulingProfiler &&
(0 !== (flags & 8)
? enableSchedulingProfiler &&
@@ -8682,8 +8659,7 @@ function commitHookEffectListUnmount(
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -8825,6 +8801,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerUpdate(
finishedWork,
current,
@@ -14730,14 +14714,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$377;
if (canUseDOM) {
var isSupported$jscomp$inline_1739 = "oninput" in document;
if (!isSupported$jscomp$inline_1739) {
var element$jscomp$inline_1740 = document.createElement("div");
element$jscomp$inline_1740.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1739 =
"function" === typeof element$jscomp$inline_1740.oninput;
var isSupported$jscomp$inline_1722 = "oninput" in document;
if (!isSupported$jscomp$inline_1722) {
var element$jscomp$inline_1723 = document.createElement("div");
element$jscomp$inline_1723.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1722 =
"function" === typeof element$jscomp$inline_1723.oninput;
}
JSCompiler_inline_result$jscomp$377 = isSupported$jscomp$inline_1739;
JSCompiler_inline_result$jscomp$377 = isSupported$jscomp$inline_1722;
} else JSCompiler_inline_result$jscomp$377 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$377 &&
@@ -15060,20 +15044,20 @@ function extractEvents$1(
}
}
for (
var i$jscomp$inline_1780 = 0;
i$jscomp$inline_1780 < simpleEventPluginEvents.length;
i$jscomp$inline_1780++
var i$jscomp$inline_1763 = 0;
i$jscomp$inline_1763 < simpleEventPluginEvents.length;
i$jscomp$inline_1763++
) {
var eventName$jscomp$inline_1781 =
simpleEventPluginEvents[i$jscomp$inline_1780],
domEventName$jscomp$inline_1782 =
eventName$jscomp$inline_1781.toLowerCase(),
capitalizedEvent$jscomp$inline_1783 =
eventName$jscomp$inline_1781[0].toUpperCase() +
eventName$jscomp$inline_1781.slice(1);
var eventName$jscomp$inline_1764 =
simpleEventPluginEvents[i$jscomp$inline_1763],
domEventName$jscomp$inline_1765 =
eventName$jscomp$inline_1764.toLowerCase(),
capitalizedEvent$jscomp$inline_1766 =
eventName$jscomp$inline_1764[0].toUpperCase() +
eventName$jscomp$inline_1764.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1782,
"on" + capitalizedEvent$jscomp$inline_1783
domEventName$jscomp$inline_1765,
"on" + capitalizedEvent$jscomp$inline_1766
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -18859,16 +18843,16 @@ function getCrossOriginStringAs(as, input) {
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
var isomorphicReactPackageVersion$jscomp$inline_1958 = React.version;
var isomorphicReactPackageVersion$jscomp$inline_1941 = React.version;
if (
"19.1.0-www-modern-0461c0d8-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1958
"19.1.0-www-modern-a69b80d0-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1941
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1958,
"19.1.0-www-modern-0461c0d8-20250211"
isomorphicReactPackageVersion$jscomp$inline_1941,
"19.1.0-www-modern-a69b80d0-20250211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -18884,27 +18868,27 @@ Internals.Events = [
return fn(a);
}
];
var internals$jscomp$inline_1960 = {
var internals$jscomp$inline_1943 = {
bundleType: 0,
version: "19.1.0-www-modern-0461c0d8-20250211",
version: "19.1.0-www-modern-a69b80d0-20250211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1960.getLaneLabelMap = getLaneLabelMap),
(internals$jscomp$inline_1960.injectProfilingHooks = injectProfilingHooks));
((internals$jscomp$inline_1943.getLaneLabelMap = getLaneLabelMap),
(internals$jscomp$inline_1943.injectProfilingHooks = injectProfilingHooks));
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2472 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2455 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2472.isDisabled &&
hook$jscomp$inline_2472.supportsFiber
!hook$jscomp$inline_2455.isDisabled &&
hook$jscomp$inline_2455.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2472.inject(
internals$jscomp$inline_1960
(rendererID = hook$jscomp$inline_2455.inject(
internals$jscomp$inline_1943
)),
(injectedHook = hook$jscomp$inline_2472);
(injectedHook = hook$jscomp$inline_2455);
} catch (err) {}
}
function ReactDOMRoot(internalRoot) {
@@ -19256,7 +19240,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -8006,8 +8006,6 @@ __DEV__ &&
dynamicFeatureFlags.disableLegacyContextForFunctionComponents,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseEffectCRUDOverload =
dynamicFeatureFlags.enableUseEffectCRUDOverload,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
@@ -9398,9 +9396,8 @@ __DEV__ &&
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
};
enableUseEffectCRUDOverload && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
},
currentResumableState = null,
currentTaskInDEV = null,
DefaultAsyncDispatcher = {
getCacheForType: function () {
@@ -9479,5 +9476,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-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
})();
@@ -7834,8 +7834,6 @@ __DEV__ &&
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseEffectCRUDOverload =
dynamicFeatureFlags.enableUseEffectCRUDOverload,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
@@ -9224,9 +9222,8 @@ __DEV__ &&
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
};
enableUseEffectCRUDOverload && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
},
currentResumableState = null,
currentTaskInDEV = null,
DefaultAsyncDispatcher = {
getCacheForType: function () {
@@ -9305,5 +9302,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-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
})();
@@ -59,7 +59,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
dynamicFeatureFlags.disableLegacyContextForFunctionComponents,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseEffectCRUDOverload = dynamicFeatureFlags.enableUseEffectCRUDOverload,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
@@ -3350,97 +3349,98 @@ function unsupportedRefresh() {
}
function noop$1() {}
var HooksDispatcher = {
readContext: function (context) {
return context._currentValue2;
},
use: function (usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return unwrapThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue2;
readContext: function (context) {
return context._currentValue2;
},
use: function (usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return unwrapThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE)
return usable._currentValue2;
}
throw Error(formatProdErrorMessage(438, String(usable)));
},
useContext: function (context) {
resolveCurrentlyRenderingComponent();
return context._currentValue2;
},
useMemo: useMemo,
useReducer: useReducer,
useRef: function (initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
return null === previousRef
? ((initialValue = { current: initialValue }),
(workInProgressHook.memoizedState = initialValue))
: previousRef;
},
useState: function (initialState) {
return useReducer(basicStateReducer, initialState);
},
useInsertionEffect: noop$1,
useLayoutEffect: noop$1,
useCallback: function (callback, deps) {
return useMemo(function () {
return callback;
}, deps);
},
useImperativeHandle: noop$1,
useEffect: noop$1,
useDebugValue: noop$1,
useDeferredValue: function (value, initialValue) {
resolveCurrentlyRenderingComponent();
return void 0 !== initialValue ? initialValue : value;
},
useTransition: function () {
resolveCurrentlyRenderingComponent();
return [!1, unsupportedStartTransition];
},
useId: function () {
var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
var overflow = JSCompiler_inline_result.overflow;
JSCompiler_inline_result = JSCompiler_inline_result.id;
JSCompiler_inline_result =
(
JSCompiler_inline_result &
~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
).toString(32) + overflow;
var resumableState = currentResumableState;
if (null === resumableState) throw Error(formatProdErrorMessage(404));
overflow = localIdCounter++;
JSCompiler_inline_result =
":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
return JSCompiler_inline_result + ":";
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
return getServerSnapshot();
},
useOptimistic: function (passthrough) {
resolveCurrentlyRenderingComponent();
return [passthrough, unsupportedSetOptimisticState];
},
useActionState: useActionState,
useFormState: useActionState,
useHostTransitionStatus: function () {
resolveCurrentlyRenderingComponent();
return sharedNotPendingObject;
},
useMemoCache: function (size) {
for (var data = Array(size), i = 0; i < size; i++)
data[i] = REACT_MEMO_CACHE_SENTINEL;
return data;
},
useCacheRefresh: function () {
return unsupportedRefresh;
},
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
throw Error(formatProdErrorMessage(438, String(usable)));
},
useContext: function (context) {
resolveCurrentlyRenderingComponent();
return context._currentValue2;
},
useMemo: useMemo,
useReducer: useReducer,
useRef: function (initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
return null === previousRef
? ((initialValue = { current: initialValue }),
(workInProgressHook.memoizedState = initialValue))
: previousRef;
},
useState: function (initialState) {
return useReducer(basicStateReducer, initialState);
},
useInsertionEffect: noop$1,
useLayoutEffect: noop$1,
useCallback: function (callback, deps) {
return useMemo(function () {
return callback;
}, deps);
},
useImperativeHandle: noop$1,
useEffect: noop$1,
useDebugValue: noop$1,
useDeferredValue: function (value, initialValue) {
resolveCurrentlyRenderingComponent();
return void 0 !== initialValue ? initialValue : value;
},
useTransition: function () {
resolveCurrentlyRenderingComponent();
return [!1, unsupportedStartTransition];
},
useId: function () {
var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
var overflow = JSCompiler_inline_result.overflow;
JSCompiler_inline_result = JSCompiler_inline_result.id;
JSCompiler_inline_result =
(
JSCompiler_inline_result &
~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
).toString(32) + overflow;
var resumableState = currentResumableState;
if (null === resumableState) throw Error(formatProdErrorMessage(404));
overflow = localIdCounter++;
JSCompiler_inline_result =
":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
return JSCompiler_inline_result + ":";
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));
return getServerSnapshot();
},
useOptimistic: function (passthrough) {
resolveCurrentlyRenderingComponent();
return [passthrough, unsupportedSetOptimisticState];
},
useActionState: useActionState,
useFormState: useActionState,
useHostTransitionStatus: function () {
resolveCurrentlyRenderingComponent();
return sharedNotPendingObject;
},
useMemoCache: function (size) {
for (var data = Array(size), i = 0; i < size; i++)
data[i] = REACT_MEMO_CACHE_SENTINEL;
return data;
},
useCacheRefresh: function () {
return unsupportedRefresh;
},
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
};
enableUseEffectCRUDOverload && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
currentResumableState = null,
DefaultAsyncDispatcher = {
getCacheForType: function () {
throw Error(formatProdErrorMessage(248));
@@ -6194,4 +6194,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-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
@@ -57,7 +57,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseEffectCRUDOverload = dynamicFeatureFlags.enableUseEffectCRUDOverload,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
@@ -3340,97 +3339,98 @@ function unsupportedRefresh() {
}
function noop$1() {}
var HooksDispatcher = {
readContext: function (context) {
return context._currentValue2;
},
use: function (usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return unwrapThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue2;
readContext: function (context) {
return context._currentValue2;
},
use: function (usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return unwrapThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE)
return usable._currentValue2;
}
throw Error(formatProdErrorMessage(438, String(usable)));
},
useContext: function (context) {
resolveCurrentlyRenderingComponent();
return context._currentValue2;
},
useMemo: useMemo,
useReducer: useReducer,
useRef: function (initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
return null === previousRef
? ((initialValue = { current: initialValue }),
(workInProgressHook.memoizedState = initialValue))
: previousRef;
},
useState: function (initialState) {
return useReducer(basicStateReducer, initialState);
},
useInsertionEffect: noop$1,
useLayoutEffect: noop$1,
useCallback: function (callback, deps) {
return useMemo(function () {
return callback;
}, deps);
},
useImperativeHandle: noop$1,
useEffect: noop$1,
useDebugValue: noop$1,
useDeferredValue: function (value, initialValue) {
resolveCurrentlyRenderingComponent();
return void 0 !== initialValue ? initialValue : value;
},
useTransition: function () {
resolveCurrentlyRenderingComponent();
return [!1, unsupportedStartTransition];
},
useId: function () {
var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
var overflow = JSCompiler_inline_result.overflow;
JSCompiler_inline_result = JSCompiler_inline_result.id;
JSCompiler_inline_result =
(
JSCompiler_inline_result &
~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
).toString(32) + overflow;
var resumableState = currentResumableState;
if (null === resumableState) throw Error(formatProdErrorMessage(404));
overflow = localIdCounter++;
JSCompiler_inline_result =
":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
return JSCompiler_inline_result + ":";
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
return getServerSnapshot();
},
useOptimistic: function (passthrough) {
resolveCurrentlyRenderingComponent();
return [passthrough, unsupportedSetOptimisticState];
},
useActionState: useActionState,
useFormState: useActionState,
useHostTransitionStatus: function () {
resolveCurrentlyRenderingComponent();
return sharedNotPendingObject;
},
useMemoCache: function (size) {
for (var data = Array(size), i = 0; i < size; i++)
data[i] = REACT_MEMO_CACHE_SENTINEL;
return data;
},
useCacheRefresh: function () {
return unsupportedRefresh;
},
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
throw Error(formatProdErrorMessage(438, String(usable)));
},
useContext: function (context) {
resolveCurrentlyRenderingComponent();
return context._currentValue2;
},
useMemo: useMemo,
useReducer: useReducer,
useRef: function (initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
return null === previousRef
? ((initialValue = { current: initialValue }),
(workInProgressHook.memoizedState = initialValue))
: previousRef;
},
useState: function (initialState) {
return useReducer(basicStateReducer, initialState);
},
useInsertionEffect: noop$1,
useLayoutEffect: noop$1,
useCallback: function (callback, deps) {
return useMemo(function () {
return callback;
}, deps);
},
useImperativeHandle: noop$1,
useEffect: noop$1,
useDebugValue: noop$1,
useDeferredValue: function (value, initialValue) {
resolveCurrentlyRenderingComponent();
return void 0 !== initialValue ? initialValue : value;
},
useTransition: function () {
resolveCurrentlyRenderingComponent();
return [!1, unsupportedStartTransition];
},
useId: function () {
var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
var overflow = JSCompiler_inline_result.overflow;
JSCompiler_inline_result = JSCompiler_inline_result.id;
JSCompiler_inline_result =
(
JSCompiler_inline_result &
~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
).toString(32) + overflow;
var resumableState = currentResumableState;
if (null === resumableState) throw Error(formatProdErrorMessage(404));
overflow = localIdCounter++;
JSCompiler_inline_result =
":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
return JSCompiler_inline_result + ":";
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));
return getServerSnapshot();
},
useOptimistic: function (passthrough) {
resolveCurrentlyRenderingComponent();
return [passthrough, unsupportedSetOptimisticState];
},
useActionState: useActionState,
useFormState: useActionState,
useHostTransitionStatus: function () {
resolveCurrentlyRenderingComponent();
return sharedNotPendingObject;
},
useMemoCache: function (size) {
for (var data = Array(size), i = 0; i < size; i++)
data[i] = REACT_MEMO_CACHE_SENTINEL;
return data;
},
useCacheRefresh: function () {
return unsupportedRefresh;
},
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
};
enableUseEffectCRUDOverload && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
currentResumableState = null,
DefaultAsyncDispatcher = {
getCacheForType: function () {
throw Error(formatProdErrorMessage(248));
@@ -6106,4 +6106,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-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
@@ -7231,8 +7231,6 @@ __DEV__ &&
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseEffectCRUDOverload =
dynamicFeatureFlags.enableUseEffectCRUDOverload,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
@@ -8525,9 +8523,8 @@ __DEV__ &&
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
};
enableUseEffectCRUDOverload && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
},
currentResumableState = null,
currentTaskInDEV = null,
DefaultAsyncDispatcher = {
getCacheForType: function () {
@@ -42,7 +42,6 @@ var React = require("react"),
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseEffectCRUDOverload = dynamicFeatureFlags.enableUseEffectCRUDOverload,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
@@ -3221,103 +3220,102 @@ function unsupportedRefresh() {
}
function noop$1() {}
var HooksDispatcher = {
readContext: function (context) {
return context._currentValue;
},
use: function (usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return unwrapThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
readContext: function (context) {
return context._currentValue;
},
use: function (usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return unwrapThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
}
throw Error("An unsupported type was passed to use(): " + String(usable));
},
useContext: function (context) {
resolveCurrentlyRenderingComponent();
return context._currentValue;
},
useMemo: useMemo,
useReducer: useReducer,
useRef: function (initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
return null === previousRef
? ((initialValue = { current: initialValue }),
(workInProgressHook.memoizedState = initialValue))
: previousRef;
},
useState: function (initialState) {
return useReducer(basicStateReducer, initialState);
},
useInsertionEffect: noop$1,
useLayoutEffect: noop$1,
useCallback: function (callback, deps) {
return useMemo(function () {
return callback;
}, deps);
},
useImperativeHandle: noop$1,
useEffect: noop$1,
useDebugValue: noop$1,
useDeferredValue: function (value, initialValue) {
resolveCurrentlyRenderingComponent();
return void 0 !== initialValue ? initialValue : value;
},
useTransition: function () {
resolveCurrentlyRenderingComponent();
return [!1, unsupportedStartTransition];
},
useId: function () {
var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
var overflow = JSCompiler_inline_result.overflow;
JSCompiler_inline_result = JSCompiler_inline_result.id;
JSCompiler_inline_result =
(
JSCompiler_inline_result &
~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
).toString(32) + overflow;
var resumableState = currentResumableState;
if (null === resumableState)
throw Error(
"Invalid hook call. Hooks can only be called inside of the body of a function component."
);
overflow = localIdCounter++;
JSCompiler_inline_result =
":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
return JSCompiler_inline_result + ":";
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
if (void 0 === getServerSnapshot)
throw Error(
"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
);
return getServerSnapshot();
},
useOptimistic: function (passthrough) {
resolveCurrentlyRenderingComponent();
return [passthrough, unsupportedSetOptimisticState];
},
useActionState: useActionState,
useFormState: useActionState,
useHostTransitionStatus: function () {
resolveCurrentlyRenderingComponent();
return sharedNotPendingObject;
},
useMemoCache: function (size) {
for (var data = Array(size), i = 0; i < size; i++)
data[i] = REACT_MEMO_CACHE_SENTINEL;
return data;
},
useCacheRefresh: function () {
return unsupportedRefresh;
},
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
throw Error("An unsupported type was passed to use(): " + String(usable));
},
useContext: function (context) {
resolveCurrentlyRenderingComponent();
return context._currentValue;
},
useMemo: useMemo,
useReducer: useReducer,
useRef: function (initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
return null === previousRef
? ((initialValue = { current: initialValue }),
(workInProgressHook.memoizedState = initialValue))
: previousRef;
},
useState: function (initialState) {
return useReducer(basicStateReducer, initialState);
},
useInsertionEffect: noop$1,
useLayoutEffect: noop$1,
useCallback: function (callback, deps) {
return useMemo(function () {
return callback;
}, deps);
},
useImperativeHandle: noop$1,
useEffect: noop$1,
useDebugValue: noop$1,
useDeferredValue: function (value, initialValue) {
resolveCurrentlyRenderingComponent();
return void 0 !== initialValue ? initialValue : value;
},
useTransition: function () {
resolveCurrentlyRenderingComponent();
return [!1, unsupportedStartTransition];
},
useId: function () {
var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
var overflow = JSCompiler_inline_result.overflow;
JSCompiler_inline_result = JSCompiler_inline_result.id;
JSCompiler_inline_result =
(
JSCompiler_inline_result &
~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
).toString(32) + overflow;
var resumableState = currentResumableState;
if (null === resumableState)
throw Error(
"Invalid hook call. Hooks can only be called inside of the body of a function component."
);
overflow = localIdCounter++;
JSCompiler_inline_result =
":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
return JSCompiler_inline_result + ":";
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
if (void 0 === getServerSnapshot)
throw Error(
"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
);
return getServerSnapshot();
},
useOptimistic: function (passthrough) {
resolveCurrentlyRenderingComponent();
return [passthrough, unsupportedSetOptimisticState];
},
useActionState: useActionState,
useFormState: useActionState,
useHostTransitionStatus: function () {
resolveCurrentlyRenderingComponent();
return sharedNotPendingObject;
},
useMemoCache: function (size) {
for (var data = Array(size), i = 0; i < size; i++)
data[i] = REACT_MEMO_CACHE_SENTINEL;
return data;
},
useCacheRefresh: function () {
return unsupportedRefresh;
},
useEffectEvent: function () {
return throwOnUseEffectEventCall;
}
};
enableUseEffectCRUDOverload && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
currentResumableState = null,
DefaultAsyncDispatcher = {
getCacheForType: function () {
throw Error("Not implemented.");
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -3749,11 +3749,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -3808,15 +3808,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3835,60 +3835,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -4270,250 +4278,245 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -4567,8 +4570,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -8603,7 +8604,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -8615,59 +8616,33 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -8756,6 +8731,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -14576,14 +14559,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$359;
if (canUseDOM) {
var isSupported$jscomp$inline_1681 = "oninput" in document;
if (!isSupported$jscomp$inline_1681) {
var element$jscomp$inline_1682 = document.createElement("div");
element$jscomp$inline_1682.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1681 =
"function" === typeof element$jscomp$inline_1682.oninput;
var isSupported$jscomp$inline_1664 = "oninput" in document;
if (!isSupported$jscomp$inline_1664) {
var element$jscomp$inline_1665 = document.createElement("div");
element$jscomp$inline_1665.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1664 =
"function" === typeof element$jscomp$inline_1665.oninput;
}
JSCompiler_inline_result$jscomp$359 = isSupported$jscomp$inline_1681;
JSCompiler_inline_result$jscomp$359 = isSupported$jscomp$inline_1664;
} else JSCompiler_inline_result$jscomp$359 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$359 &&
@@ -14906,20 +14889,20 @@ function extractEvents$1(
}
}
for (
var i$jscomp$inline_1722 = 0;
i$jscomp$inline_1722 < simpleEventPluginEvents.length;
i$jscomp$inline_1722++
var i$jscomp$inline_1705 = 0;
i$jscomp$inline_1705 < simpleEventPluginEvents.length;
i$jscomp$inline_1705++
) {
var eventName$jscomp$inline_1723 =
simpleEventPluginEvents[i$jscomp$inline_1722],
domEventName$jscomp$inline_1724 =
eventName$jscomp$inline_1723.toLowerCase(),
capitalizedEvent$jscomp$inline_1725 =
eventName$jscomp$inline_1723[0].toUpperCase() +
eventName$jscomp$inline_1723.slice(1);
var eventName$jscomp$inline_1706 =
simpleEventPluginEvents[i$jscomp$inline_1705],
domEventName$jscomp$inline_1707 =
eventName$jscomp$inline_1706.toLowerCase(),
capitalizedEvent$jscomp$inline_1708 =
eventName$jscomp$inline_1706[0].toUpperCase() +
eventName$jscomp$inline_1706.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1724,
"on" + capitalizedEvent$jscomp$inline_1725
domEventName$jscomp$inline_1707,
"on" + capitalizedEvent$jscomp$inline_1708
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -18767,16 +18750,16 @@ function getCrossOriginStringAs(as, input) {
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
var isomorphicReactPackageVersion$jscomp$inline_1900 = React.version;
var isomorphicReactPackageVersion$jscomp$inline_1883 = React.version;
if (
"19.1.0-www-classic-0461c0d8-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1900
"19.1.0-www-classic-a69b80d0-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1883
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1900,
"19.1.0-www-classic-0461c0d8-20250211"
isomorphicReactPackageVersion$jscomp$inline_1883,
"19.1.0-www-classic-a69b80d0-20250211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -18792,24 +18775,24 @@ Internals.Events = [
return fn(a);
}
];
var internals$jscomp$inline_2465 = {
var internals$jscomp$inline_2448 = {
bundleType: 0,
version: "19.1.0-www-classic-0461c0d8-20250211",
version: "19.1.0-www-classic-a69b80d0-20250211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2466 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2449 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2466.isDisabled &&
hook$jscomp$inline_2466.supportsFiber
!hook$jscomp$inline_2449.isDisabled &&
hook$jscomp$inline_2449.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2466.inject(
internals$jscomp$inline_2465
(rendererID = hook$jscomp$inline_2449.inject(
internals$jscomp$inline_2448
)),
(injectedHook = hook$jscomp$inline_2466);
(injectedHook = hook$jscomp$inline_2449);
} catch (err) {}
}
function ReactDOMRoot(internalRoot) {
@@ -19312,4 +19295,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
@@ -3595,11 +3595,11 @@ function rerenderActionState(action) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -3654,15 +3654,15 @@ function createEffectInstance() {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3681,60 +3681,68 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(create, createDeps, update, updateDeps, destroy) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -4116,250 +4124,245 @@ var ContextOnlyDispatcher = {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -4413,8 +4416,6 @@ var HooksDispatcherOnRerender = {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0;
function unwrapThenable(thenable) {
@@ -8349,7 +8350,7 @@ function commitHookEffectListMount(flags, finishedWork) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -8361,59 +8362,33 @@ function commitHookEffectListUnmount(
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -8502,6 +8477,14 @@ function safelyDetachRef(current, nearestMountedAncestor) {
}
else ref.current = null;
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy, resource) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -14312,14 +14295,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$362;
if (canUseDOM) {
var isSupported$jscomp$inline_1671 = "oninput" in document;
if (!isSupported$jscomp$inline_1671) {
var element$jscomp$inline_1672 = document.createElement("div");
element$jscomp$inline_1672.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1671 =
"function" === typeof element$jscomp$inline_1672.oninput;
var isSupported$jscomp$inline_1654 = "oninput" in document;
if (!isSupported$jscomp$inline_1654) {
var element$jscomp$inline_1655 = document.createElement("div");
element$jscomp$inline_1655.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1654 =
"function" === typeof element$jscomp$inline_1655.oninput;
}
JSCompiler_inline_result$jscomp$362 = isSupported$jscomp$inline_1671;
JSCompiler_inline_result$jscomp$362 = isSupported$jscomp$inline_1654;
} else JSCompiler_inline_result$jscomp$362 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$362 &&
@@ -14642,20 +14625,20 @@ function extractEvents$1(
}
}
for (
var i$jscomp$inline_1712 = 0;
i$jscomp$inline_1712 < simpleEventPluginEvents.length;
i$jscomp$inline_1712++
var i$jscomp$inline_1695 = 0;
i$jscomp$inline_1695 < simpleEventPluginEvents.length;
i$jscomp$inline_1695++
) {
var eventName$jscomp$inline_1713 =
simpleEventPluginEvents[i$jscomp$inline_1712],
domEventName$jscomp$inline_1714 =
eventName$jscomp$inline_1713.toLowerCase(),
capitalizedEvent$jscomp$inline_1715 =
eventName$jscomp$inline_1713[0].toUpperCase() +
eventName$jscomp$inline_1713.slice(1);
var eventName$jscomp$inline_1696 =
simpleEventPluginEvents[i$jscomp$inline_1695],
domEventName$jscomp$inline_1697 =
eventName$jscomp$inline_1696.toLowerCase(),
capitalizedEvent$jscomp$inline_1698 =
eventName$jscomp$inline_1696[0].toUpperCase() +
eventName$jscomp$inline_1696.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1714,
"on" + capitalizedEvent$jscomp$inline_1715
domEventName$jscomp$inline_1697,
"on" + capitalizedEvent$jscomp$inline_1698
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -18498,16 +18481,16 @@ function getCrossOriginStringAs(as, input) {
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
var isomorphicReactPackageVersion$jscomp$inline_1890 = React.version;
var isomorphicReactPackageVersion$jscomp$inline_1873 = React.version;
if (
"19.1.0-www-modern-0461c0d8-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1890
"19.1.0-www-modern-a69b80d0-20250211" !==
isomorphicReactPackageVersion$jscomp$inline_1873
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1890,
"19.1.0-www-modern-0461c0d8-20250211"
isomorphicReactPackageVersion$jscomp$inline_1873,
"19.1.0-www-modern-a69b80d0-20250211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -18523,24 +18506,24 @@ Internals.Events = [
return fn(a);
}
];
var internals$jscomp$inline_2447 = {
var internals$jscomp$inline_2430 = {
bundleType: 0,
version: "19.1.0-www-modern-0461c0d8-20250211",
version: "19.1.0-www-modern-a69b80d0-20250211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2448 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2431 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2448.isDisabled &&
hook$jscomp$inline_2448.supportsFiber
!hook$jscomp$inline_2431.isDisabled &&
hook$jscomp$inline_2431.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2448.inject(
internals$jscomp$inline_2447
(rendererID = hook$jscomp$inline_2431.inject(
internals$jscomp$inline_2430
)),
(injectedHook = hook$jscomp$inline_2448);
(injectedHook = hook$jscomp$inline_2431);
} catch (err) {}
}
function ReactDOMRoot(internalRoot) {
@@ -19043,4 +19026,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
@@ -4038,8 +4038,9 @@ __DEV__ &&
)
(hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0);
hook = hook.queue;
var create = subscribeToStore.bind(null, fiber, hook, subscribe);
updateEffectImpl(2048, Passive, create, [subscribe]);
updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
subscribe
]);
if (
hook.getSnapshot !== getSnapshot ||
cachedSnapshot ||
@@ -4420,11 +4421,11 @@ __DEV__ &&
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -4481,15 +4482,15 @@ __DEV__ &&
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -4508,11 +4509,47 @@ __DEV__ &&
deps
)));
}
function mountEffect(create, deps) {
function mountEffect(create, createDeps, update, updateDeps, destroy) {
(currentlyRenderingFiber.mode & 16) !== NoMode &&
(currentlyRenderingFiber.mode & 64) === NoMode
? mountEffectImpl(276826112, Passive, create, deps)
: mountEffectImpl(8390656, Passive, create, deps);
? !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(276826112, Passive, create, createDeps)
: mountResourceEffectImpl(
276826112,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
)
: !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(8390656, Passive, create, createDeps)
: mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function updateEffect(create, createDeps, update, updateDeps, destroy) {
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? updateEffectImpl(2048, Passive, create, createDeps)
: updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function mountResourceEffect(
create,
@@ -4521,39 +4558,40 @@ __DEV__ &&
updateDeps,
destroy
) {
if (
(currentlyRenderingFiber.mode & 16) !== NoMode &&
(currentlyRenderingFiber.mode & 64) === NoMode
) {
var hookFlags = Passive,
hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 276826112;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
((currentlyRenderingFiber.mode & 16) !== NoMode &&
(currentlyRenderingFiber.mode & 64) === NoMode) ||
mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps
updateDeps,
destroy
);
} else
(hookFlags = Passive),
(hook = mountWorkInProgressHook()),
(currentlyRenderingFiber.flags |= 8390656),
(inst = createEffectInstance()),
(inst.destroy = destroy),
(hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
create,
createDeps,
update,
updateDeps
));
}
function mountResourceEffectImpl(
fiberFlags,
hookFlags,
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= fiberFlags;
fiberFlags = createEffectInstance();
fiberFlags.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
fiberFlags,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffectImpl(
fiberFlags,
@@ -10723,7 +10761,7 @@ __DEV__ &&
)),
null == updateQueue.inst.resource &&
error$jscomp$0(
"useResourceEffect must provide a callback which returns a resource. If a managed resource is not needed here, use useEffect. Received %s",
"useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s",
updateQueue.inst.resource
),
(lastEffect = updateQueue.inst.destroy)),
@@ -10773,10 +10811,7 @@ __DEV__ &&
? "useLayoutEffect"
: 0 !== (updateQueue.tag & Insertion)
? "useInsertionEffect"
: enableUseEffectCRUDOverload &&
null != updateQueue.resourceKind
? "useResourceEffect"
: "useEffect";
: "useEffect";
var addendum = void 0;
addendum =
null === lastEffect
@@ -10811,7 +10846,7 @@ __DEV__ &&
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -10823,10 +10858,10 @@ __DEV__ &&
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy) {
enableUseEffectCRUDOverload
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0);
: (inst.destroy = void 0),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -10843,51 +10878,38 @@ __DEV__ &&
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
));
)),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !0);
if (enableUseEffectCRUDOverload) {
if (
updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor =
nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
runWithFiberInDEV(
lastEffect,
callDestroyInDEV,
lastEffect,
(isRunningInsertionEffect = !0),
enableUseEffectCRUDOverload
? (updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy,
updateQueue.inst.resource
),
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy_
);
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
);
updateQueue.inst.resource = null;
}
null == updateQueue.resourceKind &&
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
} else
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !1);
(isRunningInsertionEffect = !1),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -10900,8 +10922,7 @@ __DEV__ &&
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -11127,6 +11148,21 @@ __DEV__ &&
}
else ref.current = null;
}
function safelyCallDestroy(
current,
nearestMountedAncestor,
destroy,
resource
) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
runWithFiberInDEV(
current,
callDestroyInDEV,
current,
nearestMountedAncestor,
destroy
);
}
function commitProfiler(
finishedWork,
current,
@@ -17861,8 +17897,6 @@ __DEV__ &&
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMountInDEV = null,
HooksDispatcherOnMountWithHookTypesInDEV = null,
HooksDispatcherOnUpdateInDEV = null,
@@ -17886,140 +17920,16 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (
subscribe,
getSnapshot,
getServerSnapshot
) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
mountHookTypesDev();
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return (
checkDepsAreArrayDev(createDeps), mountEffect(create, createDeps)
);
void 0 !== updateDeps &&
null !== updateDeps &&
isArrayImpl(updateDeps) &&
@@ -18035,7 +17945,125 @@ __DEV__ &&
updateDeps,
destroy
);
});
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (
subscribe,
getSnapshot,
getServerSnapshot
) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context) {
return readContext(context);
@@ -18051,10 +18079,19 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18170,24 +18207,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountWithHookTypesInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
return readContext(context);
@@ -18203,10 +18222,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18322,26 +18354,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
return readContext(context);
@@ -18357,10 +18369,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18476,26 +18501,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerenderInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -18517,11 +18522,20 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18655,25 +18669,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -18695,11 +18690,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18833,27 +18841,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -18875,11 +18862,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -19013,22 +19013,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnRerenderInDEV.useResourceEffect =
function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
var callComponent = {
"react-stack-bottom-frame": function (Component, props, secondArg) {
var wasRendering = isRendering;
@@ -20043,7 +20027,7 @@ __DEV__ &&
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -3944,8 +3944,9 @@ __DEV__ &&
)
(hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0);
hook = hook.queue;
var create = subscribeToStore.bind(null, fiber, hook, subscribe);
updateEffectImpl(2048, Passive, create, [subscribe]);
updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
subscribe
]);
if (
hook.getSnapshot !== getSnapshot ||
cachedSnapshot ||
@@ -4326,11 +4327,11 @@ __DEV__ &&
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -4387,15 +4388,15 @@ __DEV__ &&
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -4414,11 +4415,47 @@ __DEV__ &&
deps
)));
}
function mountEffect(create, deps) {
function mountEffect(create, createDeps, update, updateDeps, destroy) {
(currentlyRenderingFiber.mode & 16) !== NoMode &&
(currentlyRenderingFiber.mode & 64) === NoMode
? mountEffectImpl(276826112, Passive, create, deps)
: mountEffectImpl(8390656, Passive, create, deps);
? !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(276826112, Passive, create, createDeps)
: mountResourceEffectImpl(
276826112,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
)
: !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffectImpl(8390656, Passive, create, createDeps)
: mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function updateEffect(create, createDeps, update, updateDeps, destroy) {
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? updateEffectImpl(2048, Passive, create, createDeps)
: updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
}
function mountResourceEffect(
create,
@@ -4427,39 +4464,40 @@ __DEV__ &&
updateDeps,
destroy
) {
if (
(currentlyRenderingFiber.mode & 16) !== NoMode &&
(currentlyRenderingFiber.mode & 64) === NoMode
) {
var hookFlags = Passive,
hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 276826112;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
((currentlyRenderingFiber.mode & 16) !== NoMode &&
(currentlyRenderingFiber.mode & 64) === NoMode) ||
mountResourceEffectImpl(
8390656,
Passive,
create,
createDeps,
update,
updateDeps
updateDeps,
destroy
);
} else
(hookFlags = Passive),
(hook = mountWorkInProgressHook()),
(currentlyRenderingFiber.flags |= 8390656),
(inst = createEffectInstance()),
(inst.destroy = destroy),
(hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
inst,
create,
createDeps,
update,
updateDeps
));
}
function mountResourceEffectImpl(
fiberFlags,
hookFlags,
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= fiberFlags;
fiberFlags = createEffectInstance();
fiberFlags.destroy = destroy;
hook.memoizedState = pushResourceEffect(
HasEffect | hookFlags,
hookFlags,
fiberFlags,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffectImpl(
fiberFlags,
@@ -10541,7 +10579,7 @@ __DEV__ &&
)),
null == updateQueue.inst.resource &&
error$jscomp$0(
"useResourceEffect must provide a callback which returns a resource. If a managed resource is not needed here, use useEffect. Received %s",
"useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s",
updateQueue.inst.resource
),
(lastEffect = updateQueue.inst.destroy)),
@@ -10591,10 +10629,7 @@ __DEV__ &&
? "useLayoutEffect"
: 0 !== (updateQueue.tag & Insertion)
? "useInsertionEffect"
: enableUseEffectCRUDOverload &&
null != updateQueue.resourceKind
? "useResourceEffect"
: "useEffect";
: "useEffect";
var addendum = void 0;
addendum =
null === lastEffect
@@ -10629,7 +10664,7 @@ __DEV__ &&
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -10641,10 +10676,10 @@ __DEV__ &&
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy) {
enableUseEffectCRUDOverload
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0);
: (inst.destroy = void 0),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -10661,51 +10696,38 @@ __DEV__ &&
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
));
)),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !0);
if (enableUseEffectCRUDOverload) {
if (
updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor =
nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
runWithFiberInDEV(
lastEffect,
callDestroyInDEV,
lastEffect,
(isRunningInsertionEffect = !0),
enableUseEffectCRUDOverload
? (updateQueue.resourceKind === ResourceEffectIdentityKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy,
updateQueue.inst.resource
),
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
destroy_
);
updateQueue.next.resourceKind === ResourceEffectUpdateKind
? (updateQueue.next.update = void 0)
: error$jscomp$0(
"Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.",
updateQueue.next.resourceKind
);
updateQueue.inst.resource = null;
}
null == updateQueue.resourceKind &&
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
} else
runWithFiberInDEV(
finishedWork,
callDestroyInDEV,
finishedWork,
nearestMountedAncestor$jscomp$0,
destroy
);
),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !1);
(isRunningInsertionEffect = !1),
enableSchedulingProfiler &&
((flags & Passive) !== NoFlags
? enableSchedulingProfiler &&
@@ -10718,8 +10740,7 @@ __DEV__ &&
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -10945,6 +10966,21 @@ __DEV__ &&
}
else ref.current = null;
}
function safelyCallDestroy(
current,
nearestMountedAncestor,
destroy,
resource
) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
runWithFiberInDEV(
current,
callDestroyInDEV,
current,
nearestMountedAncestor,
destroy
);
}
function commitProfiler(
finishedWork,
current,
@@ -17643,8 +17679,6 @@ __DEV__ &&
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMountInDEV = null,
HooksDispatcherOnMountWithHookTypesInDEV = null,
HooksDispatcherOnUpdateInDEV = null,
@@ -17668,140 +17702,16 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (
subscribe,
getSnapshot,
getServerSnapshot
) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
mountHookTypesDev();
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return (
checkDepsAreArrayDev(createDeps), mountEffect(create, createDeps)
);
void 0 !== updateDeps &&
null !== updateDeps &&
isArrayImpl(updateDeps) &&
@@ -17817,7 +17727,125 @@ __DEV__ &&
updateDeps,
destroy
);
});
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
mountEffectImpl(4, Insertion, create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactSharedInternals.H = prevDispatcher;
}
},
useDebugValue: function () {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
},
useDeferredValue: function (value, initialValue) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value, initialValue);
},
useTransition: function () {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useSyncExternalStore: function (
subscribe,
getSnapshot,
getServerSnapshot
) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
},
useId: function () {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
useFormState: function (action, initialState) {
currentHookNameInDev = "useFormState";
mountHookTypesDev();
warnOnUseFormStateInDev();
return mountActionState(action, initialState);
},
useActionState: function (action, initialState) {
currentHookNameInDev = "useActionState";
mountHookTypesDev();
return mountActionState(action, initialState);
},
useOptimistic: function (passthrough) {
currentHookNameInDev = "useOptimistic";
mountHookTypesDev();
return mountOptimistic(passthrough);
},
useHostTransitionStatus: useHostTransitionStatus,
useMemoCache: useMemoCache,
useCacheRefresh: function () {
currentHookNameInDev = "useCacheRefresh";
mountHookTypesDev();
return mountRefresh();
},
useEffectEvent: function (callback) {
currentHookNameInDev = "useEffectEvent";
mountHookTypesDev();
return mountEvent(callback);
}
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context) {
return readContext(context);
@@ -17833,10 +17861,19 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -17952,24 +17989,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMountWithHookTypesInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
return readContext(context);
@@ -17985,10 +18004,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18104,26 +18136,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
HooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
return readContext(context);
@@ -18139,10 +18151,23 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18258,26 +18283,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerenderInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -18299,11 +18304,20 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
return !enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
? mountEffect(create, createDeps)
: mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18437,25 +18451,6 @@ __DEV__ &&
return mountEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnMountInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -18477,11 +18472,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18615,27 +18623,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnUpdateInDEV.useResourceEffect = function (
create,
createDeps,
update,
updateDeps,
destroy
) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
@@ -18657,11 +18644,24 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
return updateEffect(create, createDeps);
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -18795,22 +18795,6 @@ __DEV__ &&
return updateEvent(callback);
}
};
enableUseEffectCRUDOverload &&
(InvalidNestedHooksDispatcherOnRerenderInDEV.useResourceEffect =
function (create, createDeps, update, updateDeps, destroy) {
currentHookNameInDev = "useResourceEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateResourceEffectImpl(
2048,
Passive,
create,
createDeps,
update,
updateDeps,
destroy
);
});
var callComponent = {
"react-stack-bottom-frame": function (Component, props, secondArg) {
var wasRendering = isRendering;
@@ -19824,7 +19808,7 @@ __DEV__ &&
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -2766,11 +2766,11 @@ module.exports = function ($$$config) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -2825,15 +2825,15 @@ module.exports = function ($$$config) {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -2852,72 +2852,68 @@ module.exports = function ($$$config) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -7490,7 +7486,7 @@ module.exports = function ($$$config) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -7502,59 +7498,33 @@ module.exports = function ($$$config) {
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -7643,6 +7613,19 @@ module.exports = function ($$$config) {
}
else ref.current = null;
}
function safelyCallDestroy(
current,
nearestMountedAncestor,
destroy,
resource
) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -12941,251 +12924,253 @@ module.exports = function ($$$config) {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(
null,
currentlyRenderingFiber,
queue
);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (
subscribe,
getSnapshot,
getServerSnapshot
) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -13239,8 +13224,6 @@ module.exports = function ($$$config) {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0,
reconcileChildFibers = createChildReconciler(!0),
@@ -13762,7 +13745,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -2627,11 +2627,11 @@ module.exports = function ($$$config) {
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
function pushSimpleEffect(tag, inst, create, createDeps) {
return pushEffectImpl({
tag: tag,
create: create,
deps: deps,
deps: createDeps,
inst: inst,
next: null
});
@@ -2686,15 +2686,15 @@ module.exports = function ($$$config) {
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -2713,72 +2713,68 @@ module.exports = function ($$$config) {
deps
)));
}
function mountEffect(create, deps) {
mountEffectImpl(8390656, 8, create, deps);
function mountEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
mountEffectImpl(8390656, 8, create, createDeps);
else {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
}
function updateEffect(create, deps) {
updateEffectImpl(2048, 8, create, deps);
}
function mountResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = mountWorkInProgressHook();
currentlyRenderingFiber.flags |= 8390656;
var inst = createEffectInstance();
inst.destroy = destroy;
hook.memoizedState = pushResourceEffect(
9,
8,
inst,
create,
createDeps,
update,
updateDeps
);
}
function updateResourceEffect(
create,
createDeps,
update,
updateDeps,
destroy
) {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
function updateEffect(create, createDeps, update, updateDeps, destroy) {
if (
!enableUseEffectCRUDOverload ||
("function" !== typeof update && "function" !== typeof destroy)
)
updateEffectImpl(2048, 8, create, createDeps);
else {
var hook = updateWorkInProgressHook(),
inst = hook.memoizedState.inst;
inst.destroy = destroy;
createDeps = void 0 === createDeps ? null : createDeps;
updateDeps = void 0 === updateDeps ? null : updateDeps;
if (null !== currentHook) {
destroy = currentHook.memoizedState;
if (null !== createDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isCreateDepsSame =
null != destroy.identity.deps ? destroy.identity.deps : null;
else throw Error(formatProdErrorMessage(543));
isCreateDepsSame = areHookInputsEqual(createDeps, isCreateDepsSame);
}
if (null !== updateDeps) {
if (null != destroy.resourceKind && 1 === destroy.resourceKind)
var isUpdateDepsSame = null != destroy.deps ? destroy.deps : null;
else throw Error(formatProdErrorMessage(543));
isUpdateDepsSame = areHookInputsEqual(updateDeps, isUpdateDepsSame);
}
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
(isCreateDepsSame && isUpdateDepsSame) ||
(currentlyRenderingFiber.flags |= 2048);
hook.memoizedState = pushResourceEffect(
isCreateDepsSame ? 8 : 9,
isUpdateDepsSame ? 8 : 9,
inst,
create,
createDeps,
update,
updateDeps
);
}
function useEffectEventImpl(payload) {
currentlyRenderingFiber.flags |= 4;
@@ -7247,7 +7243,7 @@ module.exports = function ($$$config) {
function commitHookEffectListUnmount(
flags,
finishedWork,
nearestMountedAncestor$jscomp$0
nearestMountedAncestor
) {
try {
var updateQueue = finishedWork.updateQueue,
@@ -7259,59 +7255,33 @@ module.exports = function ($$$config) {
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst,
destroy = inst.destroy;
if (void 0 !== destroy)
if (
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload)
) {
if (
0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource
) {
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
destroy_ = destroy.bind(null, updateQueue.inst.resource);
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
void 0 !== destroy &&
(enableUseEffectCRUDOverload
? null == updateQueue.resourceKind && (inst.destroy = void 0)
: (inst.destroy = void 0),
enableUseEffectCRUDOverload
? (0 === updateQueue.resourceKind &&
null != updateQueue.inst.resource &&
(safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0);
updateQueue.inst.resource = null;
}
if (null == updateQueue.resourceKind) {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy,
updateQueue.inst.resource
),
1 === updateQueue.next.resourceKind &&
(updateQueue.next.update = void 0),
(updateQueue.inst.resource = null)),
null == updateQueue.resourceKind &&
safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
} else {
lastEffect = finishedWork;
nearestMountedAncestor = nearestMountedAncestor$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
lastEffect,
destroy
))
: safelyCallDestroy(
finishedWork,
nearestMountedAncestor,
error
);
}
}
destroy
));
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
@@ -7400,6 +7370,19 @@ module.exports = function ($$$config) {
}
else ref.current = null;
}
function safelyCallDestroy(
current,
nearestMountedAncestor,
destroy,
resource
) {
destroy = null == resource ? destroy : destroy.bind(null, resource);
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function commitProfilerPostCommit(
finishedWork,
current,
@@ -12660,251 +12643,253 @@ module.exports = function ($$$config) {
useCacheRefresh: throwInvalidHookError
};
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
enableUseEffectCRUDOverload &&
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
var HooksDispatcherOnMount = {
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
readContext: readContext,
use: use,
useCallback: function (callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function (ref, create, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create, ref),
deps
);
},
useLayoutEffect: function (create, deps) {
return mountEffectImpl(4194308, 4, create, deps);
},
useInsertionEffect: function (create, deps) {
mountEffectImpl(4, 2, create, deps);
},
useMemo: function (nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
nextCreate();
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function (reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(!0);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(!1);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function (initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
},
useState: function (initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue,
dispatch = dispatchSetState.bind(
null,
currentlyRenderingFiber,
queue
);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function () {
var stateHook = mountStateImpl(!1);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
!0,
!1
);
mountWorkInProgressHook().memoizedState = stateHook;
return [!1, stateHook];
},
useSyncExternalStore: function (
subscribe,
getSnapshot,
getServerSnapshot
) {
var fiber = currentlyRenderingFiber,
hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 60) ||
pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
},
useId: function () {
var hook = mountWorkInProgressHook(),
identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = getTreeId();
identifierPrefix = ":" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += ":";
} else
(treeId = globalClientIdCounter++),
(identifierPrefix =
":" + identifierPrefix + "r" + treeId.toString(32) + ":");
return (hook.memoizedState = identifierPrefix);
},
useHostTransitionStatus: useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function (passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
!0,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache: useMemoCache,
useCacheRefresh: function () {
return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
));
},
useEffectEvent: function (callback) {
var hook = mountWorkInProgressHook(),
ref = { impl: callback };
hook.memoizedState = ref;
return function () {
if (0 !== (executionContext & 2))
throw Error(formatProdErrorMessage(440));
return ref.impl.apply(void 0, arguments);
};
}
};
enableUseEffectCRUDOverload &&
(HooksDispatcherOnMount.useResourceEffect = mountResourceEffect);
var HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate = {
readContext: readContext,
use: use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function () {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function (value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function () {
var booleanOrThenable = updateReducer(basicStateReducer)[0],
start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable
? booleanOrThenable
: useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus: useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function (passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache: useMemoCache,
useCacheRefresh: updateRefresh
};
HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect);
var HooksDispatcherOnRerender = {
readContext: readContext,
use: use,
@@ -12958,8 +12943,6 @@ module.exports = function ($$$config) {
useCacheRefresh: updateRefresh
};
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
enableUseEffectCRUDOverload &&
(HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect);
var thenableState = null,
thenableIndexCounter = 0,
reconcileChildFibers = createChildReconciler(!0),
@@ -13481,7 +13464,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -13,7 +13,7 @@
"use strict";
__DEV__ &&
(function () {
function JSCompiler_object_inline_createNodeMock_1122() {
function JSCompiler_object_inline_createNodeMock_1139() {
return null;
}
function findHook(fiber, id) {
@@ -3776,8 +3776,14 @@ __DEV__ &&
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };
function pushSimpleEffect(tag, inst, create, createDeps) {
tag = {
tag: tag,
create: create,
deps: createDeps,
inst: inst,
next: null
};
inst = currentlyRenderingFiber.updateQueue;
null === inst &&
((inst = createFunctionComponentUpdateQueue()),
@@ -3785,9 +3791,9 @@ __DEV__ &&
create = inst.lastEffect;
null === create
? (inst.lastEffect = tag.next = tag)
: ((deps = create.next),
: ((createDeps = create.next),
(create.next = tag),
(tag.next = deps),
(tag.next = createDeps),
(inst.lastEffect = tag));
return tag;
}
@@ -3799,15 +3805,15 @@ __DEV__ &&
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3826,11 +3832,11 @@ __DEV__ &&
deps
)));
}
function mountEffect(create, deps) {
function mountEffect(create, createDeps) {
0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)
? mountEffectImpl(276826112, Passive, create, deps)
: mountEffectImpl(8390656, Passive, create, deps);
? mountEffectImpl(276826112, Passive, create, createDeps)
: mountEffectImpl(8390656, Passive, create, createDeps);
}
function mountLayoutEffect(create, deps) {
var fiberFlags = 4194308;
@@ -8719,10 +8725,11 @@ __DEV__ &&
((inst.destroy = void 0),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !0),
(lastEffect = finishedWork),
runWithFiberInDEV(
finishedWork,
lastEffect,
callDestroyInDEV,
finishedWork,
lastEffect,
nearestMountedAncestor,
destroy
),
@@ -13475,11 +13482,11 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
checkDepsAreArrayDev(createDeps);
return mountEffect(create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13601,10 +13608,10 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
return mountEffect(create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13722,10 +13729,10 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13843,10 +13850,10 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13970,11 +13977,11 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
return mountEffect(create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -14115,11 +14122,11 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -14260,11 +14267,11 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -14991,10 +14998,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-0461c0d8-20250211",
version: "19.1.0-www-classic-a69b80d0-20250211",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-classic-a69b80d0-20250211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15014,7 +15021,7 @@ __DEV__ &&
exports._Scheduler = Scheduler;
exports.act = act;
exports.create = function (element, options) {
var createNodeMock = JSCompiler_object_inline_createNodeMock_1122,
var createNodeMock = JSCompiler_object_inline_createNodeMock_1139,
isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT,
isConcurrent = isConcurrentOnly,
isStrictMode = !1;
@@ -15129,5 +15136,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.version = "19.1.0-www-classic-0461c0d8-20250211";
exports.version = "19.1.0-www-classic-a69b80d0-20250211";
})();
@@ -13,7 +13,7 @@
"use strict";
__DEV__ &&
(function () {
function JSCompiler_object_inline_createNodeMock_1122() {
function JSCompiler_object_inline_createNodeMock_1139() {
return null;
}
function findHook(fiber, id) {
@@ -3776,8 +3776,14 @@ __DEV__ &&
currentStateHook.memoizedState = action;
return [stateHook, dispatch, !1];
}
function pushSimpleEffect(tag, inst, create, deps) {
tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };
function pushSimpleEffect(tag, inst, create, createDeps) {
tag = {
tag: tag,
create: create,
deps: createDeps,
inst: inst,
next: null
};
inst = currentlyRenderingFiber.updateQueue;
null === inst &&
((inst = createFunctionComponentUpdateQueue()),
@@ -3785,9 +3791,9 @@ __DEV__ &&
create = inst.lastEffect;
null === create
? (inst.lastEffect = tag.next = tag)
: ((deps = create.next),
: ((createDeps = create.next),
(create.next = tag),
(tag.next = deps),
(tag.next = createDeps),
(inst.lastEffect = tag));
return tag;
}
@@ -3799,15 +3805,15 @@ __DEV__ &&
initialValue = { current: initialValue };
return (hook.memoizedState = initialValue);
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create,
deps
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
@@ -3826,11 +3832,11 @@ __DEV__ &&
deps
)));
}
function mountEffect(create, deps) {
function mountEffect(create, createDeps) {
0 !== (currentlyRenderingFiber.mode & 16) &&
0 === (currentlyRenderingFiber.mode & 64)
? mountEffectImpl(276826112, Passive, create, deps)
: mountEffectImpl(8390656, Passive, create, deps);
? mountEffectImpl(276826112, Passive, create, createDeps)
: mountEffectImpl(8390656, Passive, create, createDeps);
}
function mountLayoutEffect(create, deps) {
var fiberFlags = 4194308;
@@ -8719,10 +8725,11 @@ __DEV__ &&
((inst.destroy = void 0),
(flags & Insertion) !== NoFlags &&
(isRunningInsertionEffect = !0),
(lastEffect = finishedWork),
runWithFiberInDEV(
finishedWork,
lastEffect,
callDestroyInDEV,
finishedWork,
lastEffect,
nearestMountedAncestor,
destroy
),
@@ -13475,11 +13482,11 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
checkDepsAreArrayDev(createDeps);
return mountEffect(create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13601,10 +13608,10 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
return mountEffect(create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13722,10 +13729,10 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13843,10 +13850,10 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -13970,11 +13977,11 @@ __DEV__ &&
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
return mountEffect(create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -14115,11 +14122,11 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -14260,11 +14267,11 @@ __DEV__ &&
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
useEffect: function (create, createDeps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
updateEffectImpl(2048, Passive, create, deps);
updateEffectImpl(2048, Passive, create, createDeps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
@@ -14991,10 +14998,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-0461c0d8-20250211",
version: "19.1.0-www-modern-a69b80d0-20250211",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-0461c0d8-20250211"
reconcilerVersion: "19.1.0-www-modern-a69b80d0-20250211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15014,7 +15021,7 @@ __DEV__ &&
exports._Scheduler = Scheduler;
exports.act = act;
exports.create = function (element, options) {
var createNodeMock = JSCompiler_object_inline_createNodeMock_1122,
var createNodeMock = JSCompiler_object_inline_createNodeMock_1139,
isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT,
isConcurrent = isConcurrentOnly,
isStrictMode = !1;
@@ -15129,5 +15136,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.version = "19.1.0-www-modern-0461c0d8-20250211";
exports.version = "19.1.0-www-modern-a69b80d0-20250211";
})();
+1 -1
View File
@@ -1 +1 @@
19.1.0-www-classic-0461c0d8-20250211
19.1.0-www-classic-a69b80d0-20250211
+1 -1
View File
@@ -1 +1 @@
19.1.0-www-modern-0461c0d8-20250211
19.1.0-www-modern-a69b80d0-20250211
@@ -390,7 +390,7 @@ export default [
"unmountComponentAtNode was removed in React 19. Use root.unmount() instead.",
"unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",
"unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.",
"useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s",
"useInsertionEffect must not schedule updates.",
"useOptimistic is now in canary. Remove the experimental_ prefix. The prefixed alias will be removed in an upcoming release.",
"useResourceEffect must provide a callback which returns a resource. If a managed resource is not needed here, use useEffect. Received %s"
"useOptimistic is now in canary. Remove the experimental_ prefix. The prefixed alias will be removed in an upcoming release."
];