decord/alpha/source/utils/ComponentDispatchUtils.tsx

38 lines
1.5 KiB
TypeScript
Raw Normal View History

// Module ID: 1110
// Function ID: 1111
// Name: ComponentDispatchUtils
// Dependencies: [1074, 1111, 3, 1112, 2]
2026-07-20 16:05:17 +00:00
// Module 1110 (ComponentDispatchUtils)
import LoggerDefault from "Logger" /* 3 */;
import Constants from "Constants" /* 1074 */;
import DevtoolsExtensionAll from "DevtoolsExtension" /* 1111 */;
import utils_ComponentDispatchUtils from "utils/ComponentDispatchUtils" /* 1112 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const ComponentActionsKeyed = Constants.ComponentActionsKeyed;
const warn = new LoggerDefault("ComponentDispatchUtils");
const componentDispatcher = new utils_ComponentDispatchUtils.ComponentDispatcher({
2026-07-23 10:11:24 +00:00
maxListeners: 100,
enableDevtools: false,
logger: {
warn(arg0) {
const items = [arg0, ...HermesBuiltin.copyRestArgs()];
return warn.warn.apply(items);
}
},
2026-07-20 16:05:17 +00:00
devtoolsReporter: function reportDevtoolsEvent(fullActionName, actionData, durationMs) {
closure_0 = fullActionName;
2026-07-20 16:05:17 +00:00
const values = Object.values(ComponentActionsKeyed);
let found = values.find((item) => closure_0.startsWith(item));
2026-07-29 08:29:29 +00:00
if (found == null) {
found = fullActionName;
2026-07-20 16:05:17 +00:00
}
DevtoolsExtensionAll.reportEvent({ type: "ComponentDispatch", description: found, data: { actionData, fullActionName }, durationMs });
2026-07-29 08:29:29 +00:00
}
});
const result = size.fileFinishedImporting("utils/ComponentDispatchUtils.tsx");
2026-07-20 16:05:17 +00:00
export const ComponentDispatcher = utils_ComponentDispatchUtils.ComponentDispatcher;
2026-07-20 16:05:17 +00:00
export const ComponentDispatch = componentDispatcher;