decord/source/__polyfill/14xxx/module_14534.js
github-actions 03cf168fbc chore: update source for alpha 347.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
2026-09-17 08:17:09 +00:00

53 lines
1.1 KiB
JavaScript

// Module ID: 14534
// Function ID: 14535
// Dependencies: []
// Module 14534
export default (arg0) => {
let map = arg0;
if (!arg0) {
const _Map = Map;
map = new Map();
}
return {
all: map,
on(arg0, arg1) {
value = map.get(arg0);
if (value) {
value.push(arg1);
} else {
const items = [arg1];
const result = map.set(arg0, items);
}
},
off(arg0, arg1) {
value = map.get(arg0);
if (value) {
if (arg1) {
value.splice(value.indexOf(arg1) >>> 0, 1);
} else {
const result = map.set(arg0, []);
}
}
},
emit(arg0, arg1) {
closure_0 = arg0;
closure_1 = arg1;
value = map.get(arg0);
if (value) {
const substr = value.slice();
const mapped = substr.map((fn) => {
fn(closure_1);
});
}
value2 = map.get("*");
if (value2) {
const substr1 = value2.slice();
const mapped1 = substr1.map((fn) => {
fn(closure_0, closure_1);
});
}
}
};
};