decord/source/704_checkIfSnapshotChanged.js

77 lines
1.8 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 704
// Function ID: 705
2026-07-20 16:05:17 +00:00
// Name: checkIfSnapshotChanged
2026-07-29 08:29:29 +00:00
// Dependencies: [19]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 704 (checkIfSnapshotChanged)
import noop from "noop";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c3;
let c4;
2026-07-23 10:11:24 +00:00
let closure_1;
2026-07-29 08:29:29 +00:00
let obj1;
function checkIfSnapshotChanged(arg0) {
try {
return !is(tmp2, tmp());
} catch (err) {
return true;
}
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
if (typeof Object.is === "function") {
2026-07-20 16:05:17 +00:00
const _Object = Object;
} else {
is = function is(arg0, arg1) {
let tmp = arg0 === arg1;
if (tmp) {
let tmp2 = 0 !== arg0;
if (!tmp2) {
tmp2 = 1 / arg0 === 1 / arg1;
}
tmp = tmp2;
}
if (!tmp) {
tmp = arg0 != arg0 && arg1 != arg1;
const tmp3 = arg0 != arg0 && arg1 != arg1;
}
return tmp;
};
}
2026-07-29 08:29:29 +00:00
({ useState: closure_1, useEffect: obj1, useLayoutEffect: c3, useDebugValue: c4 } = noop);
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const useSyncExternalStore = undefined !== noop.useSyncExternalStore ? noop.useSyncExternalStore : (function useSyncExternalStore$1(arg0, getSnapshot) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
const callback = getSnapshot;
2026-07-20 16:05:17 +00:00
const tmp = getSnapshot();
2026-07-23 10:11:24 +00:00
const callback2 = tmp;
const tmp2 = callback({ inst: { value: tmp, getSnapshot } });
2026-07-20 16:05:17 +00:00
const inst = tmp2[0].inst;
2026-07-23 10:11:24 +00:00
const callback3 = tmp2[1];
2026-07-20 16:05:17 +00:00
const items = [arg0, tmp, getSnapshot];
inst(() => {
2026-07-23 10:11:24 +00:00
inst.value = closure_2;
inst.getSnapshot = closure_1;
if (outer1_5(inst)) {
2026-07-29 08:29:29 +00:00
const obj = { inst: null };
obj[0] = inst;
2026-07-23 10:11:24 +00:00
callback2(obj);
2026-07-20 16:05:17 +00:00
}
}, items);
const items1 = [arg0];
2026-07-23 10:11:24 +00:00
callback2(() => {
if (outer1_5(inst)) {
2026-07-29 08:29:29 +00:00
let obj = { inst: null };
obj[0] = inst;
2026-07-23 10:11:24 +00:00
callback2(obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return callback(() => {
2026-07-29 08:29:29 +00:00
if (outer1_5(closure_3)) {
const obj = { inst: null };
obj[0] = closure_3;
callback(obj);
2026-07-20 16:05:17 +00:00
}
});
}, items1);
2026-07-23 10:11:24 +00:00
callback3(tmp);
2026-07-20 16:05:17 +00:00
return tmp;
2026-07-23 10:11:24 +00:00
});