2026-10-12 06:59:38 +00:00
|
|
|
// Module ID: 7168
|
|
|
|
|
// Function ID: 7169
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useInterval
|
2026-10-03 08:58:59 +00:00
|
|
|
// Dependencies: [19, 558, 576, 38, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-12 06:59:38 +00:00
|
|
|
// Module 7168 (useInterval)
|
2026-10-03 08:58:59 +00:00
|
|
|
import react from "react" /* 19 */;
|
|
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-03 08:58:59 +00:00
|
|
|
const require = globalThis.__r;
|
|
|
|
|
let _require, dependencyMap;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-03 08:58:59 +00:00
|
|
|
let c3;
|
|
|
|
|
let closure_4;
|
|
|
|
|
({ useEffect: c3, useRef: closure_4 } = react);
|
2026-10-08 09:57:35 +00:00
|
|
|
let tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useInterval(current, arg1) {
|
2026-10-03 08:58:59 +00:00
|
|
|
let closure_2;
|
|
|
|
|
let tmp2;
|
|
|
|
|
let tmp3;
|
|
|
|
|
let tmp6;
|
|
|
|
|
let tmp7;
|
|
|
|
|
_require = current;
|
|
|
|
|
let closure_1 = arg1;
|
|
|
|
|
const obj = require("react");
|
|
|
|
|
const cResult = obj.c(6);
|
|
|
|
|
dependencyMap = closure_4(current);
|
|
|
|
|
const ref = closure_4(null);
|
|
|
|
|
if (cResult[0] !== current) {
|
|
|
|
|
const fn = function c() {
|
|
|
|
|
closure_2.current = current;
|
|
|
|
|
};
|
|
|
|
|
const items = [current];
|
|
|
|
|
cResult[0] = current;
|
|
|
|
|
cResult[1] = fn;
|
|
|
|
|
cResult[2] = items;
|
|
|
|
|
tmp3 = items;
|
|
|
|
|
tmp2 = fn;
|
|
|
|
|
} else {
|
|
|
|
|
tmp2 = cResult[1];
|
|
|
|
|
tmp3 = cResult[2];
|
|
|
|
|
}
|
|
|
|
|
ref(tmp2, tmp3);
|
|
|
|
|
const tmp4 = ref;
|
|
|
|
|
if (cResult[3] !== arg1) {
|
|
|
|
|
const fn2 = function f() {
|
|
|
|
|
let ref2;
|
|
|
|
|
if (null !== closure_1) {
|
|
|
|
|
const _setInterval = setInterval;
|
2026-10-08 09:57:35 +00:00
|
|
|
ref.current = setInterval(function tick() {
|
2026-10-03 08:58:59 +00:00
|
|
|
closure_1(ref[3])(null != ref.current, "Missing callback");
|
|
|
|
|
ref.current();
|
|
|
|
|
}, tmp);
|
|
|
|
|
return () => clearInterval(ref2.current);
|
|
|
|
|
} else if (null !== ref.current) {
|
|
|
|
|
const _clearInterval = clearInterval;
|
|
|
|
|
clearInterval(ref.current);
|
|
|
|
|
ref.current = null;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const items1 = [arg1];
|
|
|
|
|
cResult[3] = arg1;
|
|
|
|
|
cResult[4] = fn2;
|
|
|
|
|
cResult[5] = items1;
|
|
|
|
|
tmp7 = items1;
|
|
|
|
|
tmp6 = fn2;
|
|
|
|
|
} else {
|
|
|
|
|
tmp6 = cResult[4];
|
|
|
|
|
tmp7 = cResult[5];
|
|
|
|
|
}
|
|
|
|
|
tmp4(tmp6, tmp7);
|
2026-10-08 09:57:35 +00:00
|
|
|
}) : (function useInterval(current, arg1) {
|
2026-10-03 08:58:59 +00:00
|
|
|
let closure_1 = arg1;
|
|
|
|
|
let closure_2 = closure_4(current);
|
|
|
|
|
const ref = closure_4(null);
|
2026-09-10 05:38:07 +00:00
|
|
|
const items = [current];
|
2026-10-03 08:58:59 +00:00
|
|
|
const tmp = ref(() => {
|
2026-09-10 05:38:07 +00:00
|
|
|
closure_2.current = current;
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items);
|
|
|
|
|
const items1 = [arg1];
|
2026-10-03 08:58:59 +00:00
|
|
|
ref(() => {
|
|
|
|
|
let ref2;
|
2026-07-23 10:11:24 +00:00
|
|
|
if (null !== closure_1) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _setInterval = setInterval;
|
2026-10-08 09:57:35 +00:00
|
|
|
ref.current = setInterval(function tick() {
|
2026-10-03 08:58:59 +00:00
|
|
|
closure_1(ref[3])(null != ref.current, "Missing callback");
|
2026-07-29 08:29:29 +00:00
|
|
|
ref.current();
|
|
|
|
|
}, tmp);
|
|
|
|
|
return () => clearInterval(ref2.current);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else if (null !== ref.current) {
|
|
|
|
|
const _clearInterval = clearInterval;
|
2026-10-03 08:58:59 +00:00
|
|
|
clearInterval(ref.current);
|
|
|
|
|
ref.current = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items1);
|
2026-10-03 08:58:59 +00:00
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("hooks/useInterval.tsx");
|
|
|
|
|
|
|
|
|
|
export default tmp3;
|