Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
33 lines
781 B
JavaScript
33 lines
781 B
JavaScript
// Module ID: 1507
|
|
// Function ID: 1508
|
|
// Dependencies: [19]
|
|
// Exports: useChildListeners
|
|
|
|
// Module 1507
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
|
|
export const useChildListeners = function useChildListeners() {
|
|
const current = noop.useRef({ action: [], focus: [] }).current;
|
|
const items = [current];
|
|
return {
|
|
listeners: current,
|
|
addListener: noop.useCallback((arg0, arg1) => {
|
|
closure_0 = arg0;
|
|
closure_1 = arg1;
|
|
closure_0[arg0].push(arg1);
|
|
c2 = false;
|
|
return () => {
|
|
const index = current[closure_0].indexOf(closure_1);
|
|
let tmp4 = !c2;
|
|
if (!c2) {
|
|
tmp4 = index > -1;
|
|
}
|
|
if (tmp4) {
|
|
c2 = true;
|
|
current[tmp2].splice(index, 1);
|
|
}
|
|
};
|
|
}, items)
|
|
};
|
|
};
|