decord/source/modules/autocompleter/native/UserSearch.worker.tsx

81 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 7457
// Function ID: 7458
2026-07-29 08:29:29 +00:00
// Name: UserSearchWorkerManager
// Dependencies: [17, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 7457 (UserSearchWorkerManager)
2026-08-24 06:08:38 +00:00
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import set from "set" /* 2 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
const NativeEventEmitter = get_ActivityIndicator.NativeEventEmitter;
2026-08-24 06:08:38 +00:00
const UserSearchWorkerManager = get_ActivityIndicator.NativeModules.UserSearchWorkerManager;
let closure_0 = UserSearchWorkerManager;
2026-07-29 08:29:29 +00:00
class UserSearchWorker extends NativeEventEmitter {
constructor() {
2026-08-24 06:08:38 +00:00
tmp = new tmp(closure_0, new.target, tmp);
2026-07-29 08:29:29 +00:00
// ThrowIfThisInitialized (0x7c)
2026-08-24 06:08:38 +00:00
closure_0 = tmp;
2026-07-29 08:29:29 +00:00
set = new Set();
tmp.handlers = set;
tmp.subscription = null;
tmp.handleCallback = function handleCallback(arg0) {
2026-08-24 06:08:38 +00:00
let handlers = arg0;
handlers = handlers.handlers;
2026-07-29 08:29:29 +00:00
const item = handlers.forEach((arg0) => arg0({ data: closure_0 }));
};
return tmp;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const prototype = UserSearchWorker.prototype;
prototype["postMessage"] = function postMessage(arg0) {
if (arg0) {
const _JSON = JSON;
2026-08-24 06:08:38 +00:00
closure_0.onmessage(JSON.stringify(arg0));
2026-07-29 08:29:29 +00:00
} else {
const _Error = Error;
2026-08-24 06:08:38 +00:00
error = new Error("Invalid data");
2026-07-29 08:29:29 +00:00
throw error;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["addEventListener"] = function addEventListener(arg0, arg1) {
if ("message" === arg0) {
const self = this;
if (null == this.subscription) {
self.subscription = self.addListener("ReturnResults", self.handleCallback);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const handlers = self.handlers;
handlers.add(arg1);
}
};
prototype["removeEventListener"] = function removeEventListener(arg0, arg1) {
if ("message" === arg0) {
const self = this;
const handlers = this.handlers;
handlers.delete(arg1);
if (0 === this.handlers.size) {
const subscription = self.subscription;
if (subscription != null) {
subscription.remove();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
self.subscription = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
};
prototype["terminate"] = function terminate() {
2026-08-24 06:08:38 +00:00
closure_0.terminate();
2026-07-29 08:29:29 +00:00
};
tmp = new tmp(UserSearchWorkerManager, prototype, "terminate", UserSearchWorkerManager, UserSearchWorker);
// ThrowIfThisInitialized (0x7c)
2026-08-24 06:08:38 +00:00
closure_0 = tmp;
2026-07-29 08:29:29 +00:00
let set = new Set();
tmp.handlers = set;
tmp.subscription = null;
tmp.handleCallback = function handleCallback(arg0) {
2026-08-24 06:08:38 +00:00
let handlers = arg0;
handlers = handlers.handlers;
2026-07-29 08:29:29 +00:00
const item = handlers.forEach((arg0) => arg0({ data: closure_0 }));
};
const result = set.fileFinishedImporting("modules/autocompleter/native/UserSearch.worker.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default tmp;