119 lines
5.2 KiB
TypeScript
119 lines
5.2 KiB
TypeScript
/* Metro module 7239; source: modules/autocompleter/native/UserSearch.worker.tsx; dependencies: [6, 7, 15, 17, 18, 27, 2] */
|
|
function _fun58211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:6, offset: 0x016c1d35, size: 206 bytes, params: 8, frame: 14
|
|
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const NativeModules = value.NativeModules;
|
|
const NativeEventEmitter = value.NativeEventEmitter;
|
|
const env0_5 = NativeModules.UserSearchWorkerManager;
|
|
value = _fun58215(NativeEventEmitter);
|
|
value = new value();
|
|
module.exports = value;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/native/UserSearch.worker.tsx');
|
|
}
|
|
|
|
function _isNativeReflectConstruct_58212() { // fn#58212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:149, offset: 0x016c1e03, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_58212_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun58215(a0) { // fn#58215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:376, offset: 0x016c1e61, size: 137 bytes, params: 2, frame: 16
|
|
const closure = UserSearchWorker;
|
|
env0_4(closure, a0);
|
|
return env0_1(closure, [{key: 'postMessage', value: value_58219}, {key: 'addEventListener', value: function(a0,
|
|
a1) {
|
|
if (a0 === 'message') {
|
|
if (this.subscription == null) {
|
|
this.subscription = this.addListener('ReturnResults', this.handleCallback);
|
|
}
|
|
this.handlers.add(a1);
|
|
}
|
|
}}, {key: 'removeEventListener', value: function(a0, a1) {
|
|
var property;
|
|
if (a0 === 'message') {
|
|
property = this.handlers;
|
|
property.delete(a1);
|
|
if (this.handlers.size === 0) {
|
|
property = this.subscription;
|
|
if (property != null) {
|
|
property.remove();
|
|
}
|
|
this.subscription = null;
|
|
}
|
|
}
|
|
}}, {key: 'terminate', value: function() {
|
|
UserSearchWorkerManager.terminate();
|
|
}}]);
|
|
}
|
|
|
|
function UserSearchWorker() { // fn#58216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:388, offset: 0x016c1eea, size: 175 bytes, params: 1, frame: 20
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
env1_0(this, UserSearchWorker);
|
|
const items2 = [UserSearchWorkerManager];
|
|
const value3 = env1_3(UserSearchWorker);
|
|
value = env1_2(this, _isNativeReflectConstruct_58212() ? global.Reflect.construct(value3, items2,
|
|
env1_3(this).constructor) : value3.apply(this, items2));
|
|
const Set = global.Set;
|
|
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set();
|
|
value.handlers = set instanceof Object ? set : value4;
|
|
value.subscription = null;
|
|
value.handleCallback = function(a0) {
|
|
a0.handlers.forEach(_fun58218);
|
|
};
|
|
return value;
|
|
}
|
|
|
|
function value_58219(a0) { // fn#58219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:789, offset: 0x016c1fdb, size: 81 bytes, params: 2, frame: 13
|
|
var value;
|
|
var onmessage;
|
|
var JSON;
|
|
if (a0) {
|
|
value = environment.__proto__;
|
|
onmessage = UserSearchWorkerManager.onmessage;
|
|
JSON = global.JSON;
|
|
Reflect.apply(onmessage, UserSearchWorkerManager, [JSON.stringify(a0)]);
|
|
return undefined;
|
|
}
|
|
const Error = global.Error;
|
|
throw new Error('Invalid data');
|
|
}
|
|
|
|
function UserSearchWorkerHandleCallback(a0) { // fn#58217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:671, owner: UserSearchWorker.handleCallback, offset: 0x016c1f99, size: 41 bytes, params: 2, frame: 11
|
|
a0.handlers.forEach(_fun58218);
|
|
}
|
|
|
|
function _fun58218(a0) { // fn#58218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:695, offset: 0x016c1fc2, size: 25 bytes, params: 2, frame: 11
|
|
return a0({data: env0_0});
|
|
}
|
|
|