Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

39 lines
1.1 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: d797a0c3f1e529b7.bdfb00cb92.js
* Module id: 983912
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = e.i(358379);
let o = ["mousedown", "touchstart"];
function r(e, r, i) {
let n = (0, t.useRef)(null),
s = r || o;
return (
(0, t.useEffect)(() => {
let t = (t) => {
let { target: o } = t ?? {};
if (Array.isArray(i)) {
let r = !document.body.contains(o) && o?.tagName !== "HTML";
i.every((e) => !!e && !t.composedPath().includes(e)) &&
!r &&
e(t);
} else n.current && !n.current.contains(o) && e(t);
};
return (
s.forEach((e) => document.addEventListener(e, t)),
() => {
s.forEach((e) => document.removeEventListener(e, t));
}
);
}, [n, e, i]),
n
);
}
e.s(["useClickOutside", () => r]);
};
export default moduleFactory;