82 lines
4.1 KiB
TypeScript
82 lines
4.1 KiB
TypeScript
/* Metro module 10367; source: modules/user_profile/hooks/useVisibleUserProfileConnectionsAndAppIdentities.tsx; dependencies: [31, 10368, 10371, 4239, 6777, 1360, 4915, 2] */
|
|
function _fun80305(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:6, offset: 0x01e75fb6, size: 121 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/useVisibleUserProfileConnectionsAndAppIdentities.tsx');
|
|
exports.default = useVisibleUserProfileConnectionsAndAppIdentities;
|
|
}
|
|
|
|
function useVisibleUserProfileConnectionsAndAppIdentities(a0) { // fn#80306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:229, offset: 0x01e7602f, size: 290 bytes, params: 2, frame: 22
|
|
const filteredAppIdentities = importDefault(dependencyMap[1])(a0).filteredAppIdentities;
|
|
const value2 = importDefault(dependencyMap[2])(a0);
|
|
const value3 = require(dependencyMap[3]).useIsRiotSocialSDKMigrationEnabled({location: 'useVisibleUserProfileConnectionsAndAppIdentities'});
|
|
const binding = env0_3;
|
|
const value = binding.useMemo(_fun80307, [filteredAppIdentities, value3]);
|
|
const defaultImport = importDefault(dependencyMap[4]);
|
|
object = [];
|
|
arraySpread(object, value, 0, dependencyMap);
|
|
const value4 = defaultImport(object);
|
|
const value5 = value4.filter(require(dependencyMap[5]).isNotNullish);
|
|
object = {};
|
|
object.appIdentities = binding.useMemo(_fun80309, [filteredAppIdentities, value5]);
|
|
object.connections = binding.useMemo(_fun80313, [value2, value, value3]);
|
|
return object;
|
|
}
|
|
|
|
function _fun80307() { // fn#80307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:463, offset: 0x01e76151, size: 115 bytes, params: 1, frame: 15
|
|
var r1;
|
|
var set;
|
|
const binding = env0_2;
|
|
const Set = global.Set;
|
|
if (binding) {
|
|
r1 = filteredAppIdentities?.map(function(a0) {
|
|
return a0.application_id;
|
|
});
|
|
r1 = r1 ?? [];
|
|
set = new Set();
|
|
} else {
|
|
set = new Set([]);
|
|
}
|
|
return set;
|
|
}
|
|
|
|
function _fun80309() { // fn#80309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:651, offset: 0x01e761cf, size: 45 bytes, params: 1, frame: 12
|
|
return filteredAppIdentities.map(_fun80310).filter(function(a0) {
|
|
return a0.application != null;
|
|
});
|
|
}
|
|
|
|
function _fun80313() { // fn#80313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:799, offset: 0x01e76256, size: 40 bytes, params: 1, frame: 12
|
|
const binding = env0_2;
|
|
const binding2 = env0_1;
|
|
return binding ? binding2.filter(_fun80314) : binding2;
|
|
}
|
|
|
|
function _fun80310(a0) { // fn#80310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:662, offset: 0x01e761fc, size: 47 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
const object2 = {identity: a0};
|
|
object2.application = env1_4.find(_fun80311);
|
|
return object2;
|
|
}
|
|
|
|
function _fun80314({type}) { // fn#80314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10553:815, offset: 0x01e7627e, size: 93 bytes, params: 2, frame: 12
|
|
var r0;
|
|
var binding;
|
|
let value = environment.__proto__.__proto__;
|
|
value = undefined;
|
|
const value2 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(type);
|
|
value = (value2 == null ? value : value2.replacedBy) == null;
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
binding = env1_3;
|
|
value = !binding.has(value2.replacedBy);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|