Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,333 @@
|
||||
/* Metro module 16164; source: modules/global_discovery_servers/GlobalDiscoveryServersUtils.tsx; dependencies: [5, 1949, 12551, 9114, 661, 1244, 1360, 6946, 683, 16163, 491, 2] */
|
||||
function _fun124951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:6, offset: 0x025c80ae, size: 435 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const globalDiscoveryServersSearchResultsStore = importDefault(12551) /* metro dependency 12551: GlobalDiscoveryServersSearchResultsStore */;
|
||||
const globalDiscoveryServersConstantsModule = require(9114) /* metro dependency 9114: GlobalDiscoveryServersConstants */;
|
||||
const env0_7 = globalDiscoveryServersConstantsModule.GlobalDiscoveryServerTab;
|
||||
const env0_8 = globalDiscoveryServersConstantsModule.FEATURED_GUILDS_CACHE_DURATION;
|
||||
const env0_9 = globalDiscoveryServersConstantsModule.FEATURED_GUILDS_SEARCH_OPTIONS;
|
||||
const env0_10 = globalDiscoveryServersConstantsModule.CategoryId;
|
||||
const env0_11 = globalDiscoveryServersConstantsModule.DISCOVERY_ALL_CATEGORIES_ID;
|
||||
const env0_12 = globalDiscoveryServersConstantsModule.getLanguageOptions;
|
||||
const env0_13 = globalDiscoveryServersConstantsModule.HUBS_CATEGORY_ID;
|
||||
const env0_14 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/global_discovery_servers/GlobalDiscoveryServersUtils.tsx');
|
||||
exports.getGlobalDiscoveryServersTabTitle = getGlobalDiscoveryServersTabTitle;
|
||||
exports.getGlobalDiscoveryServersBannerTitle = getGlobalDiscoveryServersBannerTitle;
|
||||
exports.getGlobalDiscoveryServersBannerDescription = getGlobalDiscoveryServersBannerDescription;
|
||||
exports.getGlobalDiscoveryServersTabSectionTitle = getGlobalDiscoveryServersTabSectionTitle;
|
||||
exports.getCategoryIdFromServerTab = getCategoryIdFromServerTab;
|
||||
exports.isStaleFeaturedGuilds = isStaleFeaturedGuilds;
|
||||
exports.fromDiscoverableGuildServer = fromDiscoverableGuildServer;
|
||||
exports.fromDiscoverableGuildSearchResult = fromDiscoverableGuildSearchResult;
|
||||
exports.getLanguageCodeFallback = getLanguageCodeFallback;
|
||||
exports.navigateToGuild = function() {
|
||||
return _navigateToGuild.apply(this, arguments);
|
||||
};
|
||||
exports.handleTabPressPrefetch = handleTabPressPrefetch;
|
||||
exports.makeAnalyticsID = makeAnalyticsID;
|
||||
}
|
||||
|
||||
function _navigateToGuild() { // fn#124952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:351, offset: 0x025c8261, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun124954).apply(this, arguments);
|
||||
}
|
||||
|
||||
function getGlobalDiscoveryServersTabTitle(a0) { // fn#124955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:815, offset: 0x025c8375, size: 540 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FEATURED = GlobalDiscoveryServerTab.FEATURED;
|
||||
if (FEATURED === a0) {
|
||||
return intl.string(t['RU+DCe']);
|
||||
}
|
||||
const GAMING = GlobalDiscoveryServerTab.GAMING;
|
||||
if (GAMING === a0) {
|
||||
return intl.string(t['CD/USA']);
|
||||
}
|
||||
const MUSIC = GlobalDiscoveryServerTab.MUSIC;
|
||||
if (MUSIC === a0) {
|
||||
return intl.string(t['nt9PL+']);
|
||||
}
|
||||
const ENTERTAINMENT = GlobalDiscoveryServerTab.ENTERTAINMENT;
|
||||
if (ENTERTAINMENT === a0) {
|
||||
return intl.string(t.gSbmdt);
|
||||
}
|
||||
const TECH = GlobalDiscoveryServerTab.TECH;
|
||||
if (TECH === a0) {
|
||||
return intl.string(t['0A0By5']);
|
||||
}
|
||||
const EDUCATION = GlobalDiscoveryServerTab.EDUCATION;
|
||||
if (EDUCATION === a0) {
|
||||
return intl.string(t.Gy9woq);
|
||||
}
|
||||
const HUBS = GlobalDiscoveryServerTab.HUBS;
|
||||
if (HUBS === a0) {
|
||||
return intl.string(t['q469/Z']);
|
||||
}
|
||||
}
|
||||
|
||||
function getGlobalDiscoveryServersBannerTitle(a0) { // fn#124956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:1347, offset: 0x025c8591, size: 591 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FEATURED = GlobalDiscoveryServerTab.FEATURED;
|
||||
if (FEATURED === a0) {
|
||||
return intl.string(t.OlDfzP);
|
||||
}
|
||||
const GAMING = GlobalDiscoveryServerTab.GAMING;
|
||||
if (GAMING === a0) {
|
||||
return intl.string(t['CD/USA']);
|
||||
}
|
||||
const MUSIC = GlobalDiscoveryServerTab.MUSIC;
|
||||
if (MUSIC === a0) {
|
||||
return intl.string(t['nt9PL+']);
|
||||
}
|
||||
const ENTERTAINMENT = GlobalDiscoveryServerTab.ENTERTAINMENT;
|
||||
if (ENTERTAINMENT === a0) {
|
||||
return intl.string(t.gSbmdt);
|
||||
}
|
||||
const TECH = GlobalDiscoveryServerTab.TECH;
|
||||
if (TECH === a0) {
|
||||
return intl.string(t['0A0By5']);
|
||||
}
|
||||
const EDUCATION = GlobalDiscoveryServerTab.EDUCATION;
|
||||
if (EDUCATION === a0) {
|
||||
return intl.string(t.Gy9woq);
|
||||
}
|
||||
const HUBS = GlobalDiscoveryServerTab.HUBS;
|
||||
if (HUBS === a0) {
|
||||
return intl.string(t.X5xPlb);
|
||||
}
|
||||
const Error = global.Error;
|
||||
const value = '[getGlobalDiscoveryServerTabTitle] Unsupported tab: ' + a0;
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
function getGlobalDiscoveryServersBannerDescription(a0) { // fn#124957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:1966, offset: 0x025c87e0, size: 601 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FEATURED = GlobalDiscoveryServerTab.FEATURED;
|
||||
if (FEATURED === a0) {
|
||||
return intl.string(t.SdMhrk);
|
||||
}
|
||||
const GAMING = GlobalDiscoveryServerTab.GAMING;
|
||||
if (GAMING === a0) {
|
||||
return intl.string(t.AAJ5ov);
|
||||
}
|
||||
const MUSIC = GlobalDiscoveryServerTab.MUSIC;
|
||||
if (MUSIC === a0) {
|
||||
return intl.string(t['SOio+D']);
|
||||
}
|
||||
const ENTERTAINMENT = GlobalDiscoveryServerTab.ENTERTAINMENT;
|
||||
if (ENTERTAINMENT === a0) {
|
||||
return intl.string(t.R09vf0);
|
||||
}
|
||||
const TECH = GlobalDiscoveryServerTab.TECH;
|
||||
if (TECH === a0) {
|
||||
return intl.string(t.Ew4d56);
|
||||
}
|
||||
const EDUCATION = GlobalDiscoveryServerTab.EDUCATION;
|
||||
if (EDUCATION === a0) {
|
||||
return intl.string(t.sasIWU);
|
||||
}
|
||||
const HUBS = GlobalDiscoveryServerTab.HUBS;
|
||||
if (HUBS === a0) {
|
||||
return intl.string(t['F/IQCI']);
|
||||
}
|
||||
const Error = global.Error;
|
||||
const value = '[getGlobalDiscoveryServerTabTitle] Unsupported tab: ' + a0;
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
function getGlobalDiscoveryServersTabSectionTitle(a0) { // fn#124958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:2586, offset: 0x025c8a39, size: 472 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FEATURED = GlobalDiscoveryServerTab.FEATURED;
|
||||
if (FEATURED === a0) {
|
||||
return intl.string(t.crt84X);
|
||||
}
|
||||
const GAMING = GlobalDiscoveryServerTab.GAMING;
|
||||
if (GAMING === a0) {
|
||||
return intl.string(t.fWbIpf);
|
||||
}
|
||||
const MUSIC = GlobalDiscoveryServerTab.MUSIC;
|
||||
if (MUSIC === a0) {
|
||||
return intl.string(t.nfgDzz);
|
||||
}
|
||||
const ENTERTAINMENT = GlobalDiscoveryServerTab.ENTERTAINMENT;
|
||||
if (ENTERTAINMENT === a0) {
|
||||
return intl.string(t.k1CYxv);
|
||||
}
|
||||
const TECH = GlobalDiscoveryServerTab.TECH;
|
||||
if (TECH === a0) {
|
||||
return intl.string(t['4dawps']);
|
||||
}
|
||||
const EDUCATION = GlobalDiscoveryServerTab.EDUCATION;
|
||||
if (EDUCATION === a0) {
|
||||
return intl.string(t.uexPgT);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getCategoryIdFromServerTab(a0) { // fn#124959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:3066, offset: 0x025c8c11, size: 220 bytes, params: 2, frame: 13
|
||||
const FEATURED = GlobalDiscoveryServerTab.FEATURED;
|
||||
if (FEATURED === a0) {
|
||||
return DISCOVERY_ALL_CATEGORIES_ID;
|
||||
}
|
||||
const GAMING = GlobalDiscoveryServerTab.GAMING;
|
||||
if (GAMING === a0) {
|
||||
return CategoryId.Activity;
|
||||
}
|
||||
const MUSIC = GlobalDiscoveryServerTab.MUSIC;
|
||||
if (MUSIC === a0) {
|
||||
return CategoryId.Music;
|
||||
}
|
||||
const ENTERTAINMENT = GlobalDiscoveryServerTab.ENTERTAINMENT;
|
||||
if (ENTERTAINMENT === a0) {
|
||||
return CategoryId.Television;
|
||||
}
|
||||
const TECH = GlobalDiscoveryServerTab.TECH;
|
||||
if (TECH === a0) {
|
||||
return CategoryId.Science;
|
||||
}
|
||||
const EDUCATION = GlobalDiscoveryServerTab.EDUCATION;
|
||||
if (EDUCATION === a0) {
|
||||
return CategoryId.Education;
|
||||
}
|
||||
const HUBS = GlobalDiscoveryServerTab.HUBS;
|
||||
if (HUBS === a0) {
|
||||
return HUBS_CATEGORY_ID;
|
||||
}
|
||||
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
|
||||
}
|
||||
|
||||
function isStaleFeaturedGuilds(a0) { // fn#124960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:3384, offset: 0x025c8ced, size: 46 bytes, params: 2, frame: 11
|
||||
var r0;
|
||||
var Date;
|
||||
let value = a0 == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
value = Date.now() - a0;
|
||||
value = value > FEATURED_GUILDS_CACHE_DURATION;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function fromDiscoverableGuildServer({id, name, description, splash, banner, icon, features, approximate_presence_count, approximate_member_count, premium_subscription_count, preferred_locale, discovery_splash, emojis, emoji_count}) { // fn#124961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:3480, offset: 0x025c8d1b, size: 181 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.id = id;
|
||||
object2.name = name;
|
||||
object2.description = description;
|
||||
object2.splash = splash;
|
||||
object2.banner = banner;
|
||||
object2.icon = icon;
|
||||
const Set = global.Set;
|
||||
object2.features = new Set(features);
|
||||
object2.presenceCount = approximate_presence_count;
|
||||
object2.memberCount = approximate_member_count;
|
||||
object2.premiumSubscriptionCount = premium_subscription_count;
|
||||
object2.preferredLocale = preferred_locale;
|
||||
object2.discoverySplash = discovery_splash;
|
||||
object2.emojis = emojis;
|
||||
object2.emojiCount = emoji_count;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function fromDiscoverableGuildSearchResult({id, name, description, splash, banner, icon, features, approximate_presence_count, approximate_member_count, discovery_splash}) { // fn#124962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:3931, offset: 0x025c8dd0, size: 158 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.id = id;
|
||||
object2.name = name;
|
||||
object2.description = description;
|
||||
object2.splash = splash;
|
||||
object2.banner = banner;
|
||||
object2.icon = icon;
|
||||
const Set = global.Set;
|
||||
object2.features = new Set(features);
|
||||
object2.presenceCount = approximate_presence_count;
|
||||
object2.memberCount = approximate_member_count;
|
||||
object2.premiumSubscriptionCount = undefined;
|
||||
object2.preferredLocale = undefined;
|
||||
object2.discoverySplash = discovery_splash;
|
||||
object2.emojis = [];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getLanguageCodeFallback() { // fn#124963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:4313, offset: 0x025c8e6e, size: 122 bytes, params: 1, frame: 15
|
||||
let value = a0;
|
||||
const value2 = undefined;
|
||||
const iterator = (value !== value2 ? value : [LocaleStore])[Symbol.iterator]();
|
||||
let item2 = iterator.next();
|
||||
const item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
value = item2 === value2;
|
||||
const r1 = value ? value2 : item;
|
||||
if (!value) {
|
||||
item2.return();
|
||||
}
|
||||
value = getLanguageOptions();
|
||||
const env0_0 = r1.locale;
|
||||
return (value.find(function({code}) {
|
||||
return code === locale;
|
||||
}) ?? value[0]).code;
|
||||
}
|
||||
|
||||
function handleTabPressPrefetch() { // fn#124966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:4550, offset: 0x025c8efd, size: 148 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
const error = GlobalDiscoveryServersSearchResultsStore.getError(FEATURED_GUILDS_SEARCH_OPTIONS);
|
||||
const isFetching = GlobalDiscoveryServersSearchResultsStore.getIsFetching(FEATURED_GUILDS_SEARCH_OPTIONS);
|
||||
const isInitialFetchComplete = GlobalDiscoveryServersSearchResultsStore.getIsInitialFetchComplete(FEATURED_GUILDS_SEARCH_OPTIONS);
|
||||
if (isInitialFetchComplete) {
|
||||
r1 = isInitialFetchComplete && !isFetching;
|
||||
r1 = r1 && error != null;
|
||||
if (r1) {
|
||||
(importDefault(16163) /* metro dependency 16163: GlobalDiscoveryServersFeaturedSearchManager */).fetchFeaturedGuilds({forceRefresh: true});
|
||||
}
|
||||
} else if (isFetching) {
|
||||
r1 = isInitialFetchComplete && !isFetching;
|
||||
r1 = r1 && error != null;
|
||||
if (r1) {
|
||||
(importDefault(16163) /* metro dependency 16163: GlobalDiscoveryServersFeaturedSearchManager */).fetchFeaturedGuilds({forceRefresh: true});
|
||||
}
|
||||
} else {
|
||||
(importDefault(16163) /* metro dependency 16163: GlobalDiscoveryServersFeaturedSearchManager */).fetchFeaturedGuilds();
|
||||
}
|
||||
}
|
||||
|
||||
function makeAnalyticsID() { // fn#124967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:4775, offset: 0x025c8f91, size: 66 bytes, params: 1, frame: 13
|
||||
let value = require(491) /* metro dependency 491 */;
|
||||
value = value.v4();
|
||||
return value.replace(RegExp('-', 'g'), '');
|
||||
}
|
||||
|
||||
async function _fun124954({loadId, guildId, index, categoryId, analyticsLocation, options}) { // fn#124954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16372:406, offset: 0x025c82a7, size: 206 bytes, params: 2, frame: 23
|
||||
if (true) {
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, options, undefined);
|
||||
object2['loadId'] = loadId;
|
||||
value = environment.__proto__.__proto__;
|
||||
var value4 = env2_2(env2_3[7]);
|
||||
await value4.startLurking(guildId, analyticsLocation, object2);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var value7 = env2_1(env2_3[8]);
|
||||
var track = value7.track;
|
||||
var GUILD_DISCOVERY_GUILD_SELECTED = env2_14.GUILD_DISCOVERY_GUILD_SELECTED;
|
||||
Reflect.apply(track, value7, [GUILD_DISCOVERY_GUILD_SELECTED, {guild_id: guildId, load_id: loadId,
|
||||
card_index: index, category_id: categoryId, location: analyticsLocation}]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user