Files
discord-decomp/sources/by-id/module-03903-getHostComponent.js
2026-07-28 01:06:53 +03:00

206 lines
8.0 KiB
JavaScript

/* Metro module 3903; source: unknown; dependencies: [27, 42] */
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
function _fun32121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4042:6, offset: 0x0100ce95, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(ReactNativeModule).Platform;
exports.getHostComponent = getHostComponent;
exports.callback = function(a0) {
var value = a0;
return typeof value !== 'function' ? value : {f: value};
};
function getHostComponent(a0, a1) { // fn#32122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4042:130, offset: 0x0100cef6, size: 114 bytes, params: 3, frame: 15
const env0_0 = a1;
if ((importAll(42) /* metro dependency 42 */) == null) {
throw new global.Error('NativeComponentRegistry is not available on android!');
}
return (importAll(42) /* metro dependency 42 */).get(a0, _fun32123);
function _fun32123() { // fn#32123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4042:274, offset: 0x0100cf68, size: 39 bytes, params: 1, frame: 12
const moduleValue = require();
moduleValue.validAttributes = ((a0) => {
var object;
var closure;
var error;
var Object = global.Object;
var iterator = Object.keys(a0)[Symbol.iterator]();
var iterator2 = iterator.next;
var r2 = iterator;
var item2 = Reflect.apply(iterator2, r2, []);
var item = item2.value;
item2 = item2.done ? undefined : r2;
reducibleJoin2: while (true) {
if (item2 === undefined) {
return a0;
}
break reducibleJoin2;
}
reducibleLoop2: while (true) {
try {
object = {};
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
closure = _fun32125;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
object.diff = closure;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
closure = _fun32126;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
object.process = closure;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
a0[item] = object;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r2 = item2;
item2 = Reflect.apply(iterator2, r2, []);
item = item2.value;
item2 = item2.done ? undefined : r2;
if (item2 === undefined) {
break reducibleLoop2;
}
continue reducibleLoop2;
}
return a0;
})(moduleValue.validAttributes);
return moduleValue;
function wrapValidAttributes(a0) { // fn#32124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4042:320, offset: 0x0100cf8f, size: 85 bytes, params: 2, frame: 17
var object;
var closure;
var error;
const Object = global.Object;
const iterator = Object.keys(a0)[Symbol.iterator]();
const iterator2 = iterator.next;
let r2 = iterator;
let item2 = Reflect.apply(iterator2, r2, []);
let item = item2.value;
item2 = item2.done ? undefined : r2;
reducibleJoin2: while (true) {
if (item2 === undefined) {
return a0;
}
break reducibleJoin2;
}
reducibleLoop2: while (true) {
try {
object = {};
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
closure = function(a0, a1) {
return a0 !== a1;
};
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
object.diff = closure;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
closure = process_32126;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
object.process = closure;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
a0[item] = object;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r2 = item2;
item2 = Reflect.apply(iterator2, r2, []);
item = item2.value;
item2 = item2.done ? undefined : r2;
if (item2 === undefined) {
break reducibleLoop2;
}
continue reducibleLoop2;
}
return a0;
}
}
}
}
function wrapValidAttributesDiff(a0, a1) { // fn#32125, owner: wrapValidAttributes.diff, offset: 0x0100cfe4, size: 12 bytes, params: 3, frame: 2
return a0 !== a1;
}
function wrapValidAttributesProcess(a0) { // fn#32126, owner: wrapValidAttributes.process, offset: 0x00c37049, size: 5 bytes, params: 2, frame: 1
return a0;
}
global.__d(_fun32121, 3903, [27, 42]) /* metro module 3903, dependencies: [27, 42] */;