Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,370 @@
/* Metro module 10012; source: modules/game_profile/AnnouncementMessageUtils.tsx; dependencies: [3794, 1909, 4630, 4631, 10013, 4625, 8433, 1244, 1471, 2] */
function _fun78204(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:6, offset: 0x01e211e2, size: 186 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(3794) /* metro dependency 3794: MessageRecord */).isMessageComponentsV2;
const env0_4 = RegExp('^#{1,3}\\s+(.+)$', '');
const env0_5 = RegExp('^https?:\\/\\/\\S+$', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/AnnouncementMessageUtils.tsx');
exports.toAnnouncementMessages = function(a0) {
return a0.map(_fun78206);
};
exports.getPollExpiryLabel = getPollExpiryLabel;
exports.getPosterUrl = getPosterUrl;
}
function toAnnouncementMessages(a0) { // fn#78205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:281, offset: 0x01e2129c, size: 24 bytes, params: 2, frame: 11
return a0.map(_fun78206);
}
function getPollExpiryLabel({expiry}) { // fn#78221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:3028, offset: 0x01e21a20, size: 108 bytes, params: 2, frame: 15
var r0;
var intl;
const value2 = (require(8433) /* metro dependency 8433: useFormattedExpirationLabel */).formatExpirationLabel(expiry);
if (value2 != null) {
r0 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['e+J3JZ']);
}
return r0;
}
function getPosterUrl(a0) { // fn#78222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:3184, offset: 0x01e21a8c, size: 87 bytes, params: 2, frame: 15
var r0;
let value = importDefault(1471) /* metro dependency 1471: URLUtils */;
value = value.toURLSafe(a0);
const value2 = null;
if (value2 == value) {
r0 = value2;
} else {
value.searchParams.append('format', 'webp');
value = value.toString();
r0 = value;
}
return r0;
}
function _fun78206(a0) { // fn#78206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:330, offset: 0x01e212b4, size: 635 bytes, params: 2, frame: 28
var r2;
var name;
var iconProxyURL;
var r14;
var r13;
var r12;
var r0;
var object2;
var property;
var author;
var footer;
var url;
const value2 = undefined;
const defaultImport = importDefault(10013) /* metro dependency 10013: maybeCreateMessageRecordFromSnapshot */;
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
const value3 = defaultImport(messageRecordUtilsModule.createMessageRecord(a0));
const content = value3.content;
const value4 = extractContent(value3);
const value5 = extractMedia(value3);
const value6 = value4.indexOf('\n');
const value7 = value6 === -1;
const value9 = (value7 ? value4 : value4.slice(0, value6)).match(env1_4);
if (value9 != null) {
object2 = {};
object2.title = value9[1].trim();
object2.body = value7 ? '' : value4.slice(value6 + 1).trimStart();
r2 = object2;
} else {
r2 = {body: value4};
}
const title = r2.title;
const body = r2.body;
const reactions = a0.reactions;
r2 = reactions == null ? value2 : reactions.reduce(function(a0, a1) {
return a0 + a1.count;
}, 0);
const value14 = 0;
const r3 = r2 ?? value14;
if (value4 === content) {
r2 = value2;
} else if (isMessageComponentsV2(value3)) {
r2 = value2;
} else {
property = value3.embeds[value14];
if (property != null) {
author = property.author;
name = author == null ? value2 : author.name;
author = property.author;
iconProxyURL = author == null ? value2 : author.iconProxyURL;
r14 = iconProxyURL ?? (property.author == null ? value2 : property.author.iconURL);
footer = property.footer;
r13 = (footer == null ? value2 : footer.text) ?? (property.provider == null ? value2 : property.provider.name);
footer = property.footer;
iconProxyURL = footer == null ? value2 : footer.iconProxyURL;
r12 = iconProxyURL ?? (property.footer == null ? value2 : property.footer.iconURL);
url = property.url;
r0 = name != null || r13 != null || url != null ? {authorName: name, authorIconUrl: r14, providerName: r13,
providerIconUrl: r12, url: url, color: property.color ?? value2} : value2;
} else {
r0 = value2;
}
r2 = r0;
}
return {id: value3.id, media: value5, title: title, body: body, content: value4, timestamp: a0.timestamp,
reactionCount: r3, embedSource: r2, poll: value3.poll};
}
function extractContent(a0) { // fn#78207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:399, offset: 0x01e2152f, size: 268 bytes, params: 2, frame: 20
var environment;
var r2;
var binding;
var property;
var items2;
let value = environment.__proto__.__proto__;
if (isMessageComponentsV2(a0)) {
value = a0.components.filter(function({type}) {
return type === require(dependencyMap[1]).ComponentType.TEXT_DISPLAY;
});
value = value.map(_fun78209);
return value.join('\n');
}
const content = a0.content;
if (content.length === 0) {
property = a0.embeds[0];
value = null;
if (value == property) {
r2 = value;
} else {
items2 = [];
if (value != property.rawTitle) {
items2.push('# ' + property.rawTitle);
}
if (value != property.rawDescription) {
items2.push(property.rawDescription);
}
r2 = items2.length > 0 ? items2.join('\n') : value;
}
r2 = value == r2 ? content : r2;
} else {
binding = env2_5;
if (binding.test(content.trim())) {
property = a0.embeds[0];
value = null;
if (value == property) {
r2 = value;
} else {
items2 = [];
if (value != property.rawTitle) {
items2.push('# ' + property.rawTitle);
}
if (value != property.rawDescription) {
items2.push(property.rawDescription);
}
r2 = items2.length > 0 ? items2.join('\n') : value;
}
r2 = value == r2 ? content : r2;
} else {
r2 = content;
}
}
return r2;
}
function extractMedia(a0) { // fn#78210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:836, offset: 0x01e2166e, size: 737 bytes, params: 2, frame: 29
var environment;
var media;
var thumbnail;
var image;
var r9;
var value3;
var unfurledMediaItemType;
var attachments;
var value5;
var value6;
var embeds;
var value7;
var value8;
var value9;
var embedMediaToMediaItem;
var object5;
var object6;
var object7;
var object8;
let value = environment.__proto__.__proto__;
const isMessageComponentsV2Binding = isMessageComponentsV2;
const value2 = undefined;
if (isMessageComponentsV2Binding(a0)) {
value3 = a0.components.find(function({type}) {
return type === require(dependencyMap[1]).ComponentType.MEDIA_GALLERY;
});
media = value3 == null || value3.items[0] == null ? value2 : value3.items[0].media;
if (media == null) {
attachments = a0.attachments;
value5 = attachments.find(_fun78212);
if (value5 != null) {
return (require(4630) /* metro dependency 4630: MediaTypes */).messageAttachmentToMediaItem(value5, a0);
}
attachments = a0.attachments;
value6 = attachments.find(_fun78213);
if (value6 != null) {
return (require(4630) /* metro dependency 4630: MediaTypes */).messageAttachmentToMediaItem(value6, a0);
}
embeds = a0.embeds;
value7 = embeds.find(_fun78214);
thumbnail = value7 == null ? value2 : value7.thumbnail;
if (thumbnail != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
thumbnail = value7.thumbnail;
object8 = {type: 'embed'};
object8.embedIndex = a0.embeds.findIndex(_fun78215);
return Reflect.apply(embedMediaToMediaItem, value, [thumbnail, {message: a0, identifier: object8},
'IMAGE']);
}
embeds = a0.embeds;
value8 = embeds.find(_fun78216);
image = value8 == null ? value2 : value8.image;
if (image != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
image = value8.image;
object7 = {type: 'embed'};
object7.embedIndex = a0.embeds.findIndex(_fun78217);
return Reflect.apply(embedMediaToMediaItem, value, [image, {message: a0, identifier: object7},
'IMAGE']);
}
embeds = a0.embeds;
value9 = embeds.find(_fun78218);
thumbnail = value9 == null ? value2 : value9.thumbnail;
if (thumbnail != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
thumbnail = value9.thumbnail;
object6 = {type: 'embed'};
object6.embedIndex = a0.embeds.findIndex(_fun78219);
value = Reflect.apply(embedMediaToMediaItem, value, [thumbnail, {message: a0, identifier: object6},
'IMAGE']);
r9 = value;
} else {
r9 = value2;
}
return r9;
}
unfurledMediaItemType = (require(4630) /* metro dependency 4630: MediaTypes */).getUnfurledMediaItemType(media);
if (unfurledMediaItemType !== 'INVALID') {
object5 = {};
copyDataProperties(object5, media, undefined);
object5['type'] = unfurledMediaItemType;
object5['sourceMetadata'] = {message: a0};
return object5;
}
attachments = a0.attachments;
value5 = attachments.find(_fun78212);
if (value5 != null) {
return (require(4630) /* metro dependency 4630: MediaTypes */).messageAttachmentToMediaItem(value5, a0);
}
attachments = a0.attachments;
value6 = attachments.find(_fun78213);
if (value6 != null) {
return (require(4630) /* metro dependency 4630: MediaTypes */).messageAttachmentToMediaItem(value6, a0);
}
embeds = a0.embeds;
value7 = embeds.find(_fun78214);
thumbnail = value7 == null ? value2 : value7.thumbnail;
if (thumbnail != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
thumbnail = value7.thumbnail;
object8 = {type: 'embed'};
object8.embedIndex = a0.embeds.findIndex(_fun78215);
return Reflect.apply(embedMediaToMediaItem, value, [thumbnail, {message: a0, identifier: object8},
'IMAGE']);
}
embeds = a0.embeds;
value8 = embeds.find(_fun78216);
image = value8 == null ? value2 : value8.image;
if (image != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
image = value8.image;
object7 = {type: 'embed'};
object7.embedIndex = a0.embeds.findIndex(_fun78217);
return Reflect.apply(embedMediaToMediaItem, value, [image, {message: a0, identifier: object7}, 'IMAGE']);
}
embeds = a0.embeds;
value9 = embeds.find(_fun78218);
} else {
value5 = a0.attachments.find(_fun78212);
if (value5 != null) {
return (require(4630) /* metro dependency 4630: MediaTypes */).messageAttachmentToMediaItem(value5, a0);
}
value6 = a0.attachments.find(_fun78213);
if (value6 != null) {
return (require(4630) /* metro dependency 4630: MediaTypes */).messageAttachmentToMediaItem(value6, a0);
}
value7 = a0.embeds.find(function(a0) {
return a0.video != null && a0.thumbnail != null;
});
thumbnail = value7 == null ? value2 : value7.thumbnail;
if (thumbnail != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
thumbnail = value7.thumbnail;
object8 = {type: 'embed'};
object8.embedIndex = a0.embeds.findIndex(_fun78215);
return Reflect.apply(embedMediaToMediaItem, value, [thumbnail, {message: a0, identifier: object8},
'IMAGE']);
}
value8 = a0.embeds.find(function(a0) {
return a0.image != null;
});
image = value8 == null ? value2 : value8.image;
if (image != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
image = value8.image;
object7 = {type: 'embed'};
object7.embedIndex = a0.embeds.findIndex(_fun78217);
return Reflect.apply(embedMediaToMediaItem, value, [image, {message: a0, identifier: object7}, 'IMAGE']);
}
value9 = a0.embeds.find(function(a0) {
return a0.thumbnail != null;
});
}
thumbnail = value9 == null ? value2 : value9.thumbnail;
if (thumbnail != null) {
value = require(4630) /* metro dependency 4630: MediaTypes */;
embedMediaToMediaItem = value.embedMediaToMediaItem;
thumbnail = value9.thumbnail;
object6 = {type: 'embed'};
object6.embedIndex = a0.embeds.findIndex(_fun78219);
value = Reflect.apply(embedMediaToMediaItem, value, [thumbnail, {message: a0, identifier: object6}, 'IMAGE']);
r9 = value;
} else {
r9 = value2;
}
return r9;
}
function _fun78212({content_type}) { // fn#78212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:1141, offset: 0x01e21982, size: 47 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (require(4631) /* metro dependency 4631: MediaFormatTesters */).isImageContentType(content_type);
}
function _fun78213({content_type}) { // fn#78213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:1277, offset: 0x01e219b1, size: 47 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (require(4631) /* metro dependency 4631: MediaFormatTesters */).isVideoContentType(content_type);
}
function _fun78214(a0) { // fn#78214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:1408, offset: 0x01e219e0, size: 30 bytes, params: 2, frame: 4
return a0.video != null && a0.thumbnail != null;
}
function _fun78216({image}) { // fn#78216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:1644, offset: 0x01e219fe, size: 17 bytes, params: 2, frame: 2
return image != null;
}
function _fun78218({thumbnail}) { // fn#78218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10198:1853, offset: 0x01e21a0f, size: 17 bytes, params: 2, frame: 2
return thumbnail != null;
}
@@ -0,0 +1,47 @@
/* Metro module 9959; source: modules/game_profile/GameProfileActionCreators.native.tsx; dependencies: [44, 4080, 9960, 1962, 694, 2] */
function _fun77958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10145:6, offset: 0x01e13f1c, size: 150 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const closure = clearGameProfilePendingReturn;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {openGameProfileModal: openGameProfileModal, returnToGameProfile: returnToGameProfile,
setGameProfilePendingReturn: setGameProfilePendingReturn, clearGameProfilePendingReturn: closure};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/GameProfileActionCreators.native.tsx');
exports.default = object2;
}
function clearGameProfilePendingReturn(a0) { // fn#77959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10145:43, offset: 0x01e13fb2, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GAME_PROFILE_CLEAR_PENDING_RETURN',
gameId: a0});
}
function openGameProfileModal({gameId, gameProfileModalChecks, source, sourceUserId}) { // fn#77960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10145:232, offset: 0x01e13feb, size: 200 bytes, params: 2, frame: 22
importDefault(dependencyMap[0])(gameProfileModalChecks.shouldOpenGameProfile,
'Passed a false value for [gameProfileModalChecks]. Are you using the useShouldOpenGameProfile hook correctly?');
importDefault(dependencyMap[0])(gameProfileModalChecks.gameId === gameId,
'Passed an unexpected [gameId]. Are you passing a different one than you passed to useShouldOpenGameProfileModal?');
const defaultImport3 = importDefault(dependencyMap[1]);
const openLazy = defaultImport3.openLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport3, [value, 'game-profile-' + gameId, {gameId: gameId, source: source,
sourceUserId: sourceUserId}]);
}
function returnToGameProfile({gameId, source, initialScrollOffset}) { // fn#77961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10145:721, offset: 0x01e140b3, size: 143 bytes, params: 2, frame: 19
clearGameProfilePendingReturn(gameId);
const defaultImport = importDefault(dependencyMap[1]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'game-profile-' + gameId, {gameId: gameId, source: source,
initialScrollOffset: initialScrollOffset}]);
}
function setGameProfilePendingReturn({gameId, channelId, initialScrollOffset}) { // fn#77962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10145:957, offset: 0x01e14142, size: 83 bytes, params: 2, frame: 16
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'GAME_PROFILE_SET_PENDING_RETURN', gameId: gameId, channelId: channelId,
initialScrollOffset: initialScrollOffset});
}
@@ -0,0 +1,161 @@
/* Metro module 9963; source: modules/game_profile/GameProfileAnalyticUtils.tsx; dependencies: [9570, 661, 9588, 491, 683, 2] */
function _fun78003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:6, offset: 0x01e156a8, size: 1308 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const contentInventoryStore = importDefault(9570) /* metro dependency 9570: ContentInventoryStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticEvents;
const env0_5 = constantsModule.GuildFeatures;
const env0_6 = (require(9588) /* metro dependency 9588: ContentInventoryConstants */).ContentInventoryFeedKey;
object2 = {FollowGame: 0};
object2[0] = 'FollowGame';
object2.UnfollowGame = 1;
object2[1] = 'UnfollowGame';
object2.ClickMessageUser = 2;
object2[2] = 'ClickMessageUser';
object2.SendMessageUser = 3;
object2[3] = 'SendMessageUser';
object2.JoinVC = 4;
object2[4] = 'JoinVC';
object2.WatchStream = 5;
object2[5] = 'WatchStream';
object2.ClickSimilarGame = 6;
object2[6] = 'ClickSimilarGame';
object2.WebsiteLink = 7;
object2[7] = 'WebsiteLink';
object2.XLink = 8;
object2[8] = 'XLink';
object2.YouTubeLink = 9;
object2[9] = 'YouTubeLink';
object2.ShowMore = 10;
object2[10] = 'ShowMore';
object2.ShowLess = 11;
object2[11] = 'ShowLess';
object2.JoinServer = 12;
object2[12] = 'JoinServer';
object2.ClickImage = 13;
object2[13] = 'ClickImage';
object2.GameShop = 14;
object2[14] = 'GameShop';
object2.LinkAccount = 15;
object2[15] = 'LinkAccount';
object2.ClaimGame = 16;
object2[16] = 'ClaimGame';
object2.FacebookLink = 17;
object2[17] = 'FacebookLink';
object2.InstagramLink = 18;
object2[18] = 'InstagramLink';
object2.BlueskyLink = 19;
object2[19] = 'BlueskyLink';
object2.RedditLink = 20;
object2[20] = 'RedditLink';
object2.TwitchLink = 21;
object2[21] = 'TwitchLink';
object2.SteamStoreLink = 22;
object2[22] = 'SteamStoreLink';
object2.EpicStoreLink = 23;
object2[23] = 'EpicStoreLink';
object2.RobloxStoreLink = 24;
object2[24] = 'RobloxStoreLink';
object2.BattlenetStoreLink = 25;
object2[25] = 'BattlenetStoreLink';
object2.RiotStoreLink = 26;
object2[26] = 'RiotStoreLink';
object2.MinecraftStoreLink = 27;
object2[27] = 'MinecraftStoreLink';
object2.DiscordCollectiblesShop = 28;
object2[28] = 'DiscordCollectiblesShop';
object2.DiscordCollectiblesShopItem = 29;
object2[29] = 'DiscordCollectiblesShopItem';
object2.GameShopItem = 30;
object2[30] = 'GameShopItem';
object2.SteamReviews = 31;
object2[31] = 'SteamReviews';
object2.OpenCriticReviews = 32;
object2[32] = 'OpenCriticReviews';
object2.Announcements = 33;
object2[33] = 'Announcements';
object2.AnnouncementsItem = 34;
object2[34] = 'AnnouncementsItem';
object2.CloudPlay = 35;
object2[35] = 'CloudPlay';
object2.ClickTrailer = 36;
object2[36] = 'ClickTrailer';
object2.Feedback = 37;
object2[37] = 'Feedback';
object2.XboxGamePassStoreLink = 38;
object2[38] = 'XboxGamePassStoreLink';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/GameProfileAnalyticUtils.tsx');
exports.GameProfileTrackActionActions = object2;
exports.GameProfileSources = {ActivityCard: 'activity_card', ActivityCardContextMenu: 'activity_card_context_menu',
UserProfile: 'user_profile', UserProfileCardContextMenu: 'user_profile_card_context_menu',
SimilarGames: 'similar_games', DevTools: 'dev_tools', Embed: 'embed', RtcPanel: 'rtc_panel',
FriendsActivityFeed: 'friends_activity_feed', MiniGameProfile: 'mini_game_profile', GameMention: 'game_mention',
GameSheet: 'game_sheet', QuestBar: 'quest_bar', QuestHome: 'quest_home_desktop',
QuestInGameModal: 'quest_in_game_modal', QuestActivityPanel: 'quest_activity_panel', QuestEmbed: 'quest_embed',
QuestLiveStream: 'quest_live_stream', ClipEmbed: 'clip_embed', ClipsReminder: 'clips_reminder',
AnnouncementChannelReturn: 'announcement_channel_return', CallTile: 'call_tile',
InAppBrowserReturn: 'in_app_browser_return', Deeplink: 'deeplink', DmHeaderActivity: 'dm_header_activity'};
exports.GameProfileTypes = {FullProfile: 'full_profile', MiniProfile: 'mini_profile'};
exports.getGuildIdAndVerifiedFromInvite = function(a0) {
var r4;
var object = {};
var value = null;
var value2 = undefined;
r4 = value == a0 || value == a0.guild ? value2 : a0.guild.id;
var r2 = value != r4 ? r4 : value;
object.guildId = r2;
r2 = value == a0 || value == a0.guild ? value2 : a0.guild.features.includes(GuildFeatures.VERIFIED);
value = value != r2;
object.isVerified = value && r2;
return object;
};
exports.generateViewId = generateViewId;
exports.trackGameProfileOpen = trackGameProfileOpen;
exports.trackGameProfileClose = trackGameProfileClose;
exports.trackGameProfileAction = trackGameProfileAction;
exports.trackGameProfileFeedback = function({viewId, applicationId, suggestedGameName, suggestedGameApplicationId,
feedback, submitted}) {
var defaultImport = importDefault(dependencyMap[4]);
var GAME_PROFILE_FEEDBACK = AnalyticEvents.GAME_PROFILE_FEEDBACK;
return defaultImport.track(GAME_PROFILE_FEEDBACK, {view_id: viewId, application_id: applicationId,
suggested_game_name: suggestedGameName, suggested_game_application_id: suggestedGameApplicationId,
feedback: feedback, submitted: submitted});
};
}
function trackGameProfileOpen({viewId, source, gameName, gameId, authorId, profileType}) { // fn#78006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3108, offset: 0x01e15c3c, size: 149 bytes, params: 2, frame: 21
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const GAME_PROFILE_OPEN = AnalyticEvents.GAME_PROFILE_OPEN;
const getFeedRequestId = ContentInventoryStore.getFeedRequestId;
const GLOBAL_FEED = ContentInventoryFeedKey.GLOBAL_FEED;
Reflect.apply(track, defaultImport, [GAME_PROFILE_OPEN, {view_id: viewId, source: source, game_name: gameName,
application_id: gameId, author_id: authorId, request_id: Reflect.apply(getFeedRequestId, ContentInventoryStore,
[GLOBAL_FEED]), profile_type: profileType}]);
return viewId;
}
function trackGameProfileClose({viewId, gameName, gameId, playedFriendIds, playedFriendsData, similarGames, guildId, isVerified}) { // fn#78007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3361, offset: 0x01e15cd1, size: 181 bytes, params: 2, frame: 23
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const GAME_PROFILE_CLOSE = AnalyticEvents.GAME_PROFILE_CLOSE;
const getFeedRequestId = ContentInventoryStore.getFeedRequestId;
const GLOBAL_FEED = ContentInventoryFeedKey.GLOBAL_FEED;
Reflect.apply(track, defaultImport, [GAME_PROFILE_CLOSE, {view_id: viewId, game_name: gameName,
application_id: gameId, played_friend_ids: playedFriendIds, played_friends_data: playedFriendsData,
similar_games: similarGames, request_id: Reflect.apply(getFeedRequestId, ContentInventoryStore, [GLOBAL_FEED]),
official_guild_id: isVerified ? guildId : undefined, guild_id: guildId}]);
}
function trackGameProfileAction({gameName, gameId, action, recipientUserId, similarGameId, viewId, guildId, isVerified, source}) { // fn#78008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3718, offset: 0x01e15d86, size: 160 bytes, params: 2, frame: 23
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const GAME_PROFILE_ACTION = AnalyticEvents.GAME_PROFILE_ACTION;
Reflect.apply(track, defaultImport, [GAME_PROFILE_ACTION, {game_name: gameName, application_id: gameId,
action: action, recipient_user_id: recipientUserId, similar_game_id: similarGameId, view_id: viewId,
official_guild_id: isVerified ? guildId : undefined, guild_id: guildId, source: source}]);
}
@@ -0,0 +1,951 @@
/* Metro module 10017; source: modules/game_profile/GameProfileHttpUtils.tsx; dependencies: [5, 1949, 661, 694, 4141, 507, 4131, 10012, 2] */
function _fun78233(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:6, offset: 0x01e220f0, size: 196 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const value = _fun78234();
const value2 = _fun78239();
const value3 = _fun78244();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/GameProfileHttpUtils.tsx');
exports.getShopCollection = value;
exports.getSimilarGames = value2;
exports.getGameAnnouncements = value3;
}
function _fun78234() { // fn#78234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:142, offset: 0x01e221b4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun78236);
return _fun78238;
}
function _fun78239() { // fn#78239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:690, offset: 0x01e22323, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun78241);
return _fun78243;
}
function _fun78244() { // fn#78244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:1042, offset: 0x01e2245d, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun78246);
return _fun78247;
}
function* _fun78236(a0) { // fn#78236, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:162, offset: 0x01e221e3, size: 309 bytes, params: 2, frame: 19
var object4;
var environment;
var binding2;
var property;
var value4;
var httpGetWithCountryCodeQuery;
var STOREFRONT_COLLECTION_WITH_PRODUCTS;
var value5;
var object3;
var locale;
var value6;
var value7;
var value8;
var body;
var products;
var flatMap;
var closure;
var value9;
var binding3;
var value10;
var error;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[3]);
var dispatch = value3.dispatch;
Reflect.apply(dispatch, value3, [{type: 'GAME_PROFILE_GET_SHOP_COLLECTION_START', collectionId: a0}]);
reducibleJoin3: while (true) {
reduciblePort47: while (true) {
exceptionLanding46: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding46;
}
break reducibleJoin3;
}
binding = env2_1;
value = binding(env2_2[3]);
dispatch = value.dispatch;
Reflect.apply(dispatch, value, [{type: 'GAME_PROFILE_GET_SHOP_COLLECTION_ERROR', collectionId: a0}]);
break reduciblePort47;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding46;
}
try {
property = binding2[4];
} catch (error) {
break exceptionLanding46;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding46;
}
try {
httpGetWithCountryCodeQuery = value4.httpGetWithCountryCodeQuery;
} catch (error) {
break exceptionLanding46;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding46;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding46;
}
try {
STOREFRONT_COLLECTION_WITH_PRODUCTS = binding.STOREFRONT_COLLECTION_WITH_PRODUCTS;
} catch (error) {
break exceptionLanding46;
}
try {
value5 = Reflect.apply(STOREFRONT_COLLECTION_WITH_PRODUCTS, binding, [a0]);
} catch (error) {
break exceptionLanding46;
}
try {
object4.url = value5;
} catch (error) {
break exceptionLanding46;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding46;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding46;
}
try {
locale = binding.locale;
} catch (error) {
break exceptionLanding46;
}
try {
object3.locale = locale;
} catch (error) {
break exceptionLanding46;
}
try {
object4.query = object3;
} catch (error) {
break exceptionLanding46;
}
try {
object4.rejectWithError = false;
} catch (error) {
break exceptionLanding46;
}
try {
object4.retries = 2;
} catch (error) {
break exceptionLanding46;
}
try {
value6 = Reflect.apply(httpGetWithCountryCodeQuery, value4, [object4]);
} catch (error) {
break exceptionLanding46;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding46;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
break exceptionLanding46;
}
try {
products = body.products;
} catch (error) {
break exceptionLanding46;
}
try {
flatMap = products.flatMap;
} catch (error) {
break exceptionLanding46;
}
try {
} catch (error) {
break exceptionLanding46;
}
try {
closure = function(a0) {
return a0.sku_ids;
};
} catch (error) {
break exceptionLanding46;
}
try {
value9 = Reflect.apply(flatMap, products, [closure]);
} catch (error) {
break exceptionLanding46;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding46;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding46;
}
try {
property = binding3[3];
} catch (error) {
break exceptionLanding46;
}
try {
value10 = binding(property);
} catch (error) {
break exceptionLanding46;
}
try {
dispatch = value10.dispatch;
} catch (error) {
break exceptionLanding46;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding46;
}
try {
object4.type = 'GAME_PROFILE_GET_SHOP_COLLECTION_SUCCESS';
} catch (error) {
break exceptionLanding46;
}
try {
object4.collectionId = a0;
} catch (error) {
break exceptionLanding46;
}
try {
object4.skuIds = value9;
} catch (error) {
break exceptionLanding46;
}
try {
Reflect.apply(dispatch, value10, [object4]);
} catch (error) {
break exceptionLanding46;
}
}
}
function* _fun78241(a0) { // fn#78241, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:710, offset: 0x01e22352, size: 267 bytes, params: 2, frame: 20
var environment;
var r6;
var binding;
var binding2;
var property;
var value3;
var HTTP;
var get;
var object;
var SIMILAR_GAMES;
var value4;
var value5;
var value6;
var value7;
var body;
var similar_games;
var value8;
var filter;
var closure;
var value9;
var binding3;
var value10;
var dispatch;
var error;
var APIError;
var prototype;
var aPIError;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
property = binding2[5];
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
HTTP = value3.HTTP;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object = {};
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
SIMILAR_GAMES = binding.SIMILAR_GAMES;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value4 = Reflect.apply(SIMILAR_GAMES, binding, [a0]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.url = value4;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.rejectWithError = false;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value5 = Reflect.apply(get, HTTP, [object]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
if (value7) {
return value6;
}
try {
body = value6.body;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
similar_games = body.similar_games;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value8 = similar_games != null;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
if (value8) {
r6 = similar_games;
} else {
try {
object = [];
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
r6 = object;
}
try {
filter = r6.filter;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
closure = _fun78242;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value9 = Reflect.apply(filter, r6, [closure]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
dispatch = value10.dispatch;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object = {};
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.type = 'GAME_PROFILE_GET_SIMILAR_GAMES_SUCCESS';
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.gameId = a0;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.games = value9;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
Reflect.apply(dispatch, value10, [object]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[6]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
}
}
function* _fun78246(a0, a1) { // fn#78246, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10203:1062, offset: 0x01e2248c, size: 402 bytes, params: 3, frame: 25
var object4;
var limit;
var r12;
var r9;
var value5;
var value6;
var binding2;
var property;
var value7;
var HTTP;
var get;
var object3;
var GAME_ANNOUNCEMENTS;
var value8;
var value9;
var value10;
var value11;
var body;
var binding3;
var value12;
var value13;
var toAnnouncementMessages;
var messages;
var value14;
var channel_id;
var value15;
var guild_id;
var value16;
var error;
var value17;
if (false) {
return undefined;
}
value = undefined;
let binding = env2_1;
const value4 = binding(env2_2[3]);
let dispatch = value4.dispatch;
Reflect.apply(dispatch, value4, [{type: 'GAME_PROFILE_GET_ANNOUNCEMENTS_START', gameId: a0}]);
reducibleJoin3: while (true) {
reduciblePort67: while (true) {
exceptionLanding66: while (true) {
try {
object4 = {};
} catch (error) {
break exceptionLanding66;
}
break reducibleJoin3;
}
binding = env2_1;
value17 = binding(env2_2[3]);
dispatch = value17.dispatch;
Reflect.apply(dispatch, value17, [{type: 'GAME_PROFILE_GET_ANNOUNCEMENTS_ERROR', gameId: a0}]);
break reduciblePort67;
}
return value;
}
try {
value5 = a1 == null;
} catch (error) {
break exceptionLanding66;
}
reducibleJoin8: while (true) {
if (value5) {
limit = value;
break reducibleJoin8;
}
try {
limit = a1.limit;
} catch (error) {
break exceptionLanding66;
}
break reducibleJoin8;
}
try {
value6 = limit == null;
} catch (error) {
break exceptionLanding66;
}
reducibleJoin12: while (true) {
if (value6) {
break reducibleJoin12;
}
try {
limit = a1.limit;
} catch (error) {
break exceptionLanding66;
}
try {
object4.limit = limit;
} catch (error) {
break exceptionLanding66;
}
break reducibleJoin12;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding66;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding66;
}
try {
property = binding2[5];
} catch (error) {
break exceptionLanding66;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding66;
}
try {
HTTP = value7.HTTP;
} catch (error) {
break exceptionLanding66;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding66;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding66;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding66;
}
try {
GAME_ANNOUNCEMENTS = binding.GAME_ANNOUNCEMENTS;
} catch (error) {
break exceptionLanding66;
}
try {
value8 = Reflect.apply(GAME_ANNOUNCEMENTS, binding, [a0]);
} catch (error) {
break exceptionLanding66;
}
try {
object3.url = value8;
} catch (error) {
break exceptionLanding66;
}
try {
object3.query = object4;
} catch (error) {
break exceptionLanding66;
}
try {
object3.rejectWithError = false;
} catch (error) {
break exceptionLanding66;
}
try {
value9 = Reflect.apply(get, HTTP, [object3]);
} catch (error) {
break exceptionLanding66;
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
break exceptionLanding66;
}
if (value11) {
return value10;
}
try {
body = value10.body;
} catch (error) {
break exceptionLanding66;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding66;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding66;
}
try {
property = binding3[3];
} catch (error) {
break exceptionLanding66;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding66;
}
try {
dispatch = value12.dispatch;
} catch (error) {
break exceptionLanding66;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding66;
}
try {
object4.type = 'GAME_PROFILE_GET_ANNOUNCEMENTS_SUCCESS';
} catch (error) {
break exceptionLanding66;
}
try {
object4.gameId = a0;
} catch (error) {
break exceptionLanding66;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding66;
}
try {
property = binding3[7];
} catch (error) {
break exceptionLanding66;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding66;
}
try {
toAnnouncementMessages = value13.toAnnouncementMessages;
} catch (error) {
break exceptionLanding66;
}
try {
messages = body.messages;
} catch (error) {
break exceptionLanding66;
}
try {
value14 = Reflect.apply(toAnnouncementMessages, value13, [messages]);
} catch (error) {
break exceptionLanding66;
}
try {
object4.messages = value14;
} catch (error) {
break exceptionLanding66;
}
try {
channel_id = body.channel_id;
} catch (error) {
break exceptionLanding66;
}
try {
value15 = channel_id != null;
} catch (error) {
break exceptionLanding66;
}
reducibleJoin57: while (true) {
if (value15) {
r12 = channel_id;
break reducibleJoin57;
}
r12 = value;
break reducibleJoin57;
}
try {
object4.channelId = r12;
} catch (error) {
break exceptionLanding66;
}
try {
guild_id = body.guild_id;
} catch (error) {
break exceptionLanding66;
}
try {
value16 = guild_id != null;
} catch (error) {
break exceptionLanding66;
}
reducibleJoin63: while (true) {
if (value16) {
r9 = guild_id;
break reducibleJoin63;
}
r9 = value;
break reducibleJoin63;
}
try {
object4.guildId = r9;
} catch (error) {
break exceptionLanding66;
}
try {
Reflect.apply(dispatch, value12, [object4]);
} catch (error) {
break exceptionLanding66;
}
return value;
}
@@ -0,0 +1,107 @@
/* Metro module 9997; source: modules/game_profile/GameProfileReviewUtils.tsx; dependencies: [4269, 1244, 2] */
function _fun78149(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10183:6, offset: 0x01e1d126, size: 122 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/GameProfileReviewUtils.tsx');
exports.getSteamReviewScoreDescriptionColor = getSteamReviewScoreDescriptionColor;
exports.getSteamReviewScoreDescriptionIntl = getSteamReviewScoreDescriptionIntl;
exports.canShowLocalizedSteamReview = function(a0) {
var r0;
r0 = a0 != null && a0.localizedRating != null && a0.localizedRatingCount != null;
r0 = r0 && a0.ratingCount != null && a0.localizedRatingCount >= 200 && a0.ratingCount >= 2000;
return r0;
};
}
function getSteamReviewScoreDescriptionColor(a0) { // fn#78150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10183:211, offset: 0x01e1d1a0, size: 398 bytes, params: 2, frame: 14
const SteamReviewScoreDescription = (require(4269) /* metro dependency 4269: GameDetectionTypes */).SteamReviewScoreDescription;
const NO_USER_REVIEWS = SteamReviewScoreDescription.NO_USER_REVIEWS;
if (NO_USER_REVIEWS !== a0) {
var OVERWHELMINGLY_POSITIVE = SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE;
if (OVERWHELMINGLY_POSITIVE === a0) {
return 'steam-review-text-positive';
}
var VERY_POSITIVE = SteamReviewScoreDescription.VERY_POSITIVE;
if (VERY_POSITIVE === a0) {
return 'steam-review-text-positive';
}
var POSITIVE = SteamReviewScoreDescription.POSITIVE;
if (POSITIVE === a0) {
return 'steam-review-text-positive';
}
var MOSTLY_POSITIVE = SteamReviewScoreDescription.MOSTLY_POSITIVE;
if (MOSTLY_POSITIVE === a0) {
return 'steam-review-text-positive';
}
var MIXED = SteamReviewScoreDescription.MIXED;
if (MIXED === a0) {
return 'steam-review-text-mixed';
}
var MOSTLY_NEGATIVE = SteamReviewScoreDescription.MOSTLY_NEGATIVE;
if (MOSTLY_NEGATIVE === a0) {
return 'steam-review-text-negative';
}
var NEGATIVE = SteamReviewScoreDescription.NEGATIVE;
if (NEGATIVE === a0) {
return 'steam-review-text-negative';
}
var VERY_NEGATIVE = SteamReviewScoreDescription.VERY_NEGATIVE;
if (VERY_NEGATIVE === a0) {
return 'steam-review-text-negative';
}
var OVERWHELMINGLY_NEGATIVE = SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE;
if (OVERWHELMINGLY_NEGATIVE === a0) {
return 'steam-review-text-negative';
}
}
return 'text-subtle';
}
function getSteamReviewScoreDescriptionIntl(a0) { // fn#78151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10183:1016, offset: 0x01e1d32e, size: 958 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const SteamReviewScoreDescription = (require(4269) /* metro dependency 4269: GameDetectionTypes */).SteamReviewScoreDescription;
const NO_USER_REVIEWS = SteamReviewScoreDescription.NO_USER_REVIEWS;
if (NO_USER_REVIEWS === a0) {
return intl.string(t.CLMt8J);
}
const OVERWHELMINGLY_POSITIVE = SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE;
if (OVERWHELMINGLY_POSITIVE === a0) {
return intl.string(t['75sx1S']);
}
const VERY_POSITIVE = SteamReviewScoreDescription.VERY_POSITIVE;
if (VERY_POSITIVE === a0) {
return intl.string(t['EkOVg+']);
}
const POSITIVE = SteamReviewScoreDescription.POSITIVE;
if (POSITIVE === a0) {
return intl.string(t.ZUkFtr);
}
const MOSTLY_POSITIVE = SteamReviewScoreDescription.MOSTLY_POSITIVE;
if (MOSTLY_POSITIVE === a0) {
return intl.string(t.M7Z09a);
}
const MIXED = SteamReviewScoreDescription.MIXED;
if (MIXED === a0) {
return intl.string(t.c8yuHR);
}
const MOSTLY_NEGATIVE = SteamReviewScoreDescription.MOSTLY_NEGATIVE;
if (MOSTLY_NEGATIVE === a0) {
return intl.string(t.H0MSjG);
}
const NEGATIVE = SteamReviewScoreDescription.NEGATIVE;
if (NEGATIVE === a0) {
return intl.string(t.vpLrgz);
}
const VERY_NEGATIVE = SteamReviewScoreDescription.VERY_NEGATIVE;
if (VERY_NEGATIVE === a0) {
return intl.string(t['5spYuX']);
}
const OVERWHELMINGLY_NEGATIVE = SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE;
if (OVERWHELMINGLY_NEGATIVE === a0) {
return intl.string(t.A8uk5J);
}
return null;
}
@@ -0,0 +1,168 @@
/* Metro module 9965; source: modules/game_profile/GameProfileStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun78015(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:6, offset: 0x01e160e0, size: 447 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
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 */;
const env0_5 = {};
const env0_6 = {};
const env0_7 = {};
const env0_8 = {};
const env0_9 = {};
const env0_10 = {};
const env0_11 = {};
const env0_12 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun78019(Store);
value.displayName = 'GameProfileStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{GAME_PROFILE_GET_SIMILAR_GAMES_SUCCESS: GAME_PROFILE_GET_SIMILAR_GAMES_SUCCESS,
GAME_PROFILE_GET_SIMILAR_GAMES_ERROR: GAME_PROFILE_GET_SIMILAR_GAMES_ERROR,
GAME_PROFILE_GET_SHOP_COLLECTION_START: GAME_PROFILE_GET_SHOP_COLLECTION_START,
GAME_PROFILE_GET_SHOP_COLLECTION_SUCCESS: GAME_PROFILE_GET_SHOP_COLLECTION_SUCCESS,
GAME_PROFILE_GET_SHOP_COLLECTION_ERROR: GAME_PROFILE_GET_SHOP_COLLECTION_ERROR,
GAME_PROFILE_GET_ANNOUNCEMENTS_START: GAME_PROFILE_GET_ANNOUNCEMENTS_START,
GAME_PROFILE_GET_ANNOUNCEMENTS_SUCCESS: GAME_PROFILE_GET_ANNOUNCEMENTS_SUCCESS,
GAME_PROFILE_GET_ANNOUNCEMENTS_ERROR: GAME_PROFILE_GET_ANNOUNCEMENTS_ERROR,
GAME_PROFILE_SET_PENDING_RETURN: GAME_PROFILE_SET_PENDING_RETURN,
GAME_PROFILE_CLEAR_PENDING_RETURN: GAME_PROFILE_CLEAR_PENDING_RETURN});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/GameProfileStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_78016() { // fn#78016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:148, offset: 0x01e1629f, size: 98 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_78016_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun78019(a0) { // fn#78019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:398, offset: 0x01e16301, size: 286 bytes, params: 2, frame: 16
const closure = GameProfileStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getSimilarGames', value: value_78021}, {key: 'getSimilarGamesError',
value: value_78022}, {key: 'getShopCollectionSkuIds', value: value_78023}, {key: 'hasShopCollectionBeenFetched',
value: value_78024}, {key: 'isShopCollectionFetching', value: value_78025}, {key: 'getAnnouncements',
value: value_78026}, {key: 'hasAnnouncementsBeenFetched', value: value_78027}, {key: 'isAnnouncementsFetching',
value: value_78028}, {key: 'getPendingReturn', value: value_78029}]);
}
function GAME_PROFILE_GET_SIMILAR_GAMES_SUCCESS({gameId, games}) { // fn#78030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1419, offset: 0x01e1649f, size: 30 bytes, params: 2, frame: 3
env0_5[gameId] = games;
}
function GAME_PROFILE_GET_SIMILAR_GAMES_ERROR({gameId, error}) { // fn#78031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1522, offset: 0x01e164bd, size: 29 bytes, params: 2, frame: 3
env0_6[gameId] = error;
}
function GAME_PROFILE_GET_SHOP_COLLECTION_START({collectionId}) { // fn#78032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1625, offset: 0x01e164da, size: 26 bytes, params: 2, frame: 3
env0_9[collectionId] = true;
}
function GAME_PROFILE_GET_SHOP_COLLECTION_SUCCESS({collectionId, skuIds}) { // fn#78033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1731, offset: 0x01e164f4, size: 50 bytes, params: 2, frame: 4
env0_7[collectionId] = skuIds;
env0_8[collectionId] = true;
env0_9[collectionId] = false;
}
function GAME_PROFILE_GET_SHOP_COLLECTION_ERROR({collectionId}) { // fn#78034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1861, offset: 0x01e16526, size: 36 bytes, params: 2, frame: 4
env0_8[collectionId] = true;
env0_9[collectionId] = false;
}
function GAME_PROFILE_GET_ANNOUNCEMENTS_START({gameId}) { // fn#78035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1971, offset: 0x01e1654a, size: 26 bytes, params: 2, frame: 3
env0_12[gameId] = true;
}
function GAME_PROFILE_GET_ANNOUNCEMENTS_SUCCESS({gameId, messages, channelId, guildId}) { // fn#78036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:2068, offset: 0x01e16564, size: 75 bytes, params: 2, frame: 7
env0_10[gameId] = {messages: messages, channelId: channelId, guildId: guildId};
env0_11[gameId] = true;
env0_12[gameId] = false;
}
function GAME_PROFILE_GET_ANNOUNCEMENTS_ERROR({gameId}) { // fn#78037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:2246, offset: 0x01e165af, size: 36 bytes, params: 2, frame: 4
env0_11[gameId] = true;
env0_12[gameId] = false;
}
function GAME_PROFILE_SET_PENDING_RETURN({gameId, channelId, initialScrollOffset}) { // fn#78038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:2344, offset: 0x01e165d3, size: 121 bytes, params: 2, frame: 9
var object;
let binding = env0_13;
const gameId = binding?.gameId;
if (gameId !== gameId) {
env0_13 = {gameId: gameId, channelId: channelId, initialScrollOffset: initialScrollOffset};
} else {
binding = env0_13;
var channelId = binding?.channelId;
if (channelId !== channelId) {
env0_13 = {gameId: gameId, channelId: channelId, initialScrollOffset: initialScrollOffset};
return undefined;
}
binding = env0_13;
var initialScrollOffset = binding?.initialScrollOffset;
if (initialScrollOffset === initialScrollOffset) {
return false;
}
object = {gameId: gameId, channelId: channelId, initialScrollOffset: initialScrollOffset};
}
}
function GAME_PROFILE_CLEAR_PENDING_RETURN({gameId}) { // fn#78039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:2646, offset: 0x01e1664c, size: 48 bytes, params: 2, frame: 4
if (env0_13 == null) {
return false;
}
if (env0_13.gameId !== gameId) {
return false;
}
}
function value_78024(a0) { // fn#78024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:904, offset: 0x01e1642f, size: 28 bytes, params: 2, frame: 3
const value = environment.__proto__;
const property = env1_8[a0];
return property != null && property;
}
function value_78025(a0) { // fn#78025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:987, offset: 0x01e1644b, size: 28 bytes, params: 2, frame: 3
const value = environment.__proto__;
const property = env1_9[a0];
return property != null && property;
}
function value_78027(a0) { // fn#78027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1129, offset: 0x01e16467, size: 28 bytes, params: 2, frame: 3
const value = environment.__proto__;
const property = env1_11[a0];
return property != null && property;
}
function value_78028(a0) { // fn#78028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10151:1211, offset: 0x01e16483, size: 28 bytes, params: 2, frame: 3
const value = environment.__proto__;
const property = env1_12[a0];
return property != null && property;
}
@@ -0,0 +1,40 @@
/* Metro module 10016; source: modules/game_profile/hooks/useGameAnnouncements.tsx; dependencies: [31, 9965, 566, 10017, 2] */
function _fun78229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:6, offset: 0x01e21ecf, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useEffect;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameAnnouncements.tsx');
exports.default = useGameAnnouncements;
}
function useGameAnnouncements(a0) { // fn#78230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:221, offset: 0x01e21f56, size: 190 bytes, params: 2, frame: 17
const env0_0 = a0;
const value2 = undefined;
const {data, hasFetched,
isFetching} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameProfileStore],
_fun78231);
useEffect(_fun78232, [a0, hasFetched]);
return {messages: (data == null ? value2 : data.messages) ?? [], channelId: data == null ? value2 : data.channelId,
guildId: data == null ? value2 : data.guildId, loading: isFetching};
}
function _fun78231() { // fn#78231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:300, offset: 0x01e22014, size: 128 bytes, params: 1, frame: 15
const object2 = {};
object2.data = env0_0 != null ? GameProfileStore.getAnnouncements(env0_0) : undefined;
object2.hasFetched = env0_0 != null && GameProfileStore.hasAnnouncementsBeenFetched(env0_0);
object2.isFetching = env0_0 != null && GameProfileStore.isAnnouncementsFetching(env0_0);
return object2;
}
function _fun78232() { // fn#78232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:503, offset: 0x01e22094, size: 92 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isAnnouncementsFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getGameAnnouncements(env0_0);
}
}
@@ -0,0 +1,60 @@
/* Metro module 9998; source: modules/game_profile/hooks/useGameProfileOpenCritic.tsx; dependencies: [9999, 1244, 10000, 10001, 10002, 10003, 2] */
function _fun78153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:6, offset: 0x01e1d741, size: 129 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameProfileOpenCritic.tsx');
exports.getOpenCriticTierText = getOpenCriticTierText;
exports.getOpenCriticTierImage = getOpenCriticTierImage;
exports.getOpenCriticCircleRatingColor = getOpenCriticCircleRatingColor;
}
function getOpenCriticTierText(a0) { // fn#78154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:205, offset: 0x01e1d7c2, size: 386 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const OpenCriticTier = (require(9999) /* metro dependency 9999: OpenCriticTier */).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
if (MIGHTY === a0) {
return intl.string(t.aZej2g);
}
const STRONG = OpenCriticTier.STRONG;
if (STRONG === a0) {
return intl.string(t.MLxnSg);
}
const FAIR = OpenCriticTier.FAIR;
if (FAIR === a0) {
return intl.string(t['3f19KA']);
}
const WEAK = OpenCriticTier.WEAK;
if (WEAK === a0) {
return intl.string(t.jtVgSh);
}
}
function getOpenCriticTierImage(a0) { // fn#78155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:595, offset: 0x01e1d944, size: 235 bytes, params: 2, frame: 14
const OpenCriticTier = (require(9999) /* metro dependency 9999: OpenCriticTier */).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
if (MIGHTY === a0) {
return importDefault(10000) /* metro dependency 10000: opencriticMightyPng */;
}
const STRONG = OpenCriticTier.STRONG;
if (STRONG === a0) {
return importDefault(10001) /* metro dependency 10001: opencriticStrongPng */;
}
const FAIR = OpenCriticTier.FAIR;
if (FAIR === a0) {
return importDefault(10002) /* metro dependency 10002: opencriticFairPng */;
}
const WEAK = OpenCriticTier.WEAK;
if (WEAK === a0) {
return importDefault(10003) /* metro dependency 10003: opencriticWeakPng */;
}
}
function getOpenCriticCircleRatingColor(a0) { // fn#78156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:871, offset: 0x01e1da2f, size: 192 bytes, params: 2, frame: 15
const OpenCriticTier = (require(9999) /* metro dependency 9999: OpenCriticTier */).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
return {foregroundColor: MIGHTY === a0 ? '#fc430a' : OpenCriticTier.STRONG === a0 ? '#9e00b4' : OpenCriticTier.FAIR === a0 ? '#4aa1ce' : OpenCriticTier.WEAK !== a0 ? '' : '#80b06a',
backgroundColor: '#2e2e2e'};
}
@@ -0,0 +1,45 @@
/* Metro module 10156; source: modules/game_profile/hooks/useGameProfileShopCollection.tsx; dependencies: [31, 9965, 566, 10017, 2] */
function _fun79138(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:6, offset: 0x01e4648e, size: 135 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useEffect;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameProfileShopCollection.tsx');
exports.useGameProfileShopCollection = function(a0) {
var env0_0 = a0;
var value2 = require(dependencyMap[2]).useStateFromStoresObject([GameProfileStore], _fun79140);
var hasFetched = value2.hasFetched;
var env0_1 = hasFetched;
var skuIds = value2.skuIds;
useEffect(_fun79141, [a0, hasFetched]);
return skuIds ?? [];
};
}
function useGameProfileShopCollection(a0) { // fn#79139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:250, offset: 0x01e46515, size: 122 bytes, params: 2, frame: 17
const env0_0 = a0;
const {hasFetched,
skuIds} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameProfileStore],
_fun79140);
useEffect(_fun79141, [a0, hasFetched]);
return skuIds ?? [];
}
function _fun79140() { // fn#79140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:335, offset: 0x01e4658f, size: 91 bytes, params: 1, frame: 15
const object2 = {};
object2.hasFetched = env0_0 != null && GameProfileStore.hasShopCollectionBeenFetched(env0_0);
object2.skuIds = env0_0 != null ? GameProfileStore.getShopCollectionSkuIds(env0_0) : undefined;
return object2;
}
function _fun79141() { // fn#79141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:486, offset: 0x01e465ea, size: 94 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isShopCollectionFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getShopCollection(env0_0);
}
}
@@ -0,0 +1,93 @@
/* Metro module 9966; source: modules/game_profile/hooks/useGameProfileStoreWebsites.tsx; dependencies: [31, 9967, 9968, 9970, 9969, 2] */
function _fun78040(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:6, offset: 0x01e1667c, size: 322 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Set = global.Set;
const set = new Set(['1402418703554842694', '356877880938070016']);
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const EPICGAMES = ThirdPartyGameApplicationWebsiteCategory.EPICGAMES;
items = [EPICGAMES];
const STEAM = ThirdPartyGameApplicationWebsiteCategory.STEAM;
items[1] = STEAM;
const ROBLOX = ThirdPartyGameApplicationWebsiteCategory.ROBLOX;
items[2] = ROBLOX;
const BATTLENET = ThirdPartyGameApplicationWebsiteCategory.BATTLENET;
items[3] = BATTLENET;
const RIOT = ThirdPartyGameApplicationWebsiteCategory.RIOT;
items[4] = RIOT;
const MINECRAFT = ThirdPartyGameApplicationWebsiteCategory.MINECRAFT;
items[5] = MINECRAFT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameProfileStoreWebsites.tsx');
exports.useGameProfileStoreWebsites = useGameProfileStoreWebsites;
}
function useGameProfileStoreWebsites(a0) { // fn#78041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:632, offset: 0x01e167be, size: 194 bytes, params: 2, frame: 19
const value2 = undefined;
const useSteamWebsiteUrlModule = require(9968) /* metro dependency 9968: useSteamWebsiteUrl */;
const useSteamWebsiteUrl = useSteamWebsiteUrlModule.useSteamWebsiteUrl;
let id = a0 == null ? value2 : a0.id;
const value3 = Reflect.apply(useSteamWebsiteUrl, useSteamWebsiteUrlModule, [id]);
const value4 = (importDefault(9970) /* metro dependency 9970: useXboxGamePassStoreUrl */)(a0);
id = a0 == null ? value2 : a0.id;
const websites = a0 == null ? value2 : a0.websites;
return websites.useMemo(_fun78042, [value3, websites, id, a0 == null ? value2 : a0.steamReleaseStatus, value4]);
}
function _fun78042() { // fn#78042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:845, offset: 0x01e16880, size: 281 bytes, params: 1, frame: 18
var environment;
const SteamReleaseStatus = (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus;
var push;
var value8;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
if (websites == null) {
if (env0_1 == null) {
return [];
}
}
if (id == null) {
return [];
}
let r4 = websites?.filter(_fun78043);
r4 = r4 ?? [];
let r1 = env0_0 == null || steamReleaseStatus === SteamReleaseStatus.RETIRED_ABANDONED;
r1 = !r1 ? r4.some(function({category}) {
return category === require(dependencyMap[1]).ThirdPartyGameApplicationWebsiteCategory.STEAM;
}) : r1;
if (!r1) {
push = r4.push;
value8 = environment.__proto__;
Reflect.apply(push, r4, [{category: ThirdPartyGameApplicationWebsiteCategory.STEAM, url: env0_0}]);
}
const value9 = r4.sort(_fun78045);
if (env0_1 != null) {
value9.unshift({category: 'XBOX_GAME_PASS', url: env0_1});
}
return value9;
}
function _fun78043(a0) { // fn#78043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:934, offset: 0x01e16999, size: 193 bytes, params: 2, frame: 17
var r0;
const category = a0.category;
const value = environment.__proto__.__proto__;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const EPICGAMES = ThirdPartyGameApplicationWebsiteCategory.EPICGAMES;
let r1 = category === EPICGAMES && !env2_4.has(id);
if (r1) {
r0 = !r1;
} else {
r1 = a0.category !== ThirdPartyGameApplicationWebsiteCategory.STEAM || steamReleaseStatus !== (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus.RETIRED_ABANDONED;
r1 = r1 && env2_5.includes(a0.category);
r0 = r1;
}
return r0;
}
function _fun78045({category}, a1) { // fn#78045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:1413, offset: 0x01e16a8d, size: 106 bytes, params: 3, frame: 14
const value = environment.__proto__.__proto__;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const STEAM = ThirdPartyGameApplicationWebsiteCategory.STEAM;
return category === STEAM ? -1 : a1.category !== ThirdPartyGameApplicationWebsiteCategory.STEAM ? 0 : 1;
}
@@ -0,0 +1,205 @@
/* Metro module 9961; source: modules/game_profile/hooks/useOpenExternalUrlFromGameProfile.tsx; dependencies: [57, 5, 31, 6871, 9962, 3847, 2] */
function _fun77987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:6, offset: 0x01e150fd, size: 208 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_7 = RegExp('^\\/app\\/(\\d+)(?:\\/)?', '');
const env0_8 = RegExp('^\\/games\\/store\\/title\\/([^/]+)', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useOpenExternalUrlFromGameProfile.tsx');
exports.default = useOpenExternalUrlFromGameProfile;
}
function _getDeepLinkUrl() { // fn#77988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:197, offset: 0x01e151cd, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun77990).apply(this, arguments);
}
function useOpenExternalUrlFromGameProfile(a0) { // fn#77991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:838, offset: 0x01e1537f, size: 100 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_5;
const value = env0_3(binding.useState(false), 2);
const property = value[0];
const env0_2 = value[1];
return binding.useCallback(_fun77992(), [a0, property]);
}
function* _fun77990(a0) { // fn#77990, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:250, offset: 0x01e1520a, size: 373 bytes, params: 2, frame: 22
var r6;
var r8;
var binding;
var isProtocolRegistered;
var value7;
var value8;
var binding2;
var value9;
var value10;
var value12;
let value = undefined;
if (false) {
return value;
}
let hostname = a0.hostname;
if (hostname !== 'store.steampowered.com') {
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
} else {
value = environment.__proto__.__proto__;
binding = env2_1;
var value3 = undefined;
var value4 = binding(env2_2[3]);
isProtocolRegistered = value4.isProtocolRegistered;
yield Reflect.apply(isProtocolRegistered, value4, [env2_6]);
var value5 = undefined;
if (false) {
return value5;
}
if (value5) {
value7 = a0.pathname.match(env2_7);
r6 = value7 == null ? value3 : value7[1];
if (r6 != null) {
return '' + env2_6 + '://store/' + r6;
}
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
return null;
}
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
}
return null;
}
function _fun77992() { // fn#77992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:949, offset: 0x01e153e3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun77994);
return _fun77999;
}
function* _fun77994(a0) { // fn#77994, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:969, offset: 0x01e15412, size: 252 bytes, params: 2, frame: 21
var environment;
var URL;
var prototype;
var value3;
var uRL;
var value4;
var error;
if (true) {
value = null;
if (value != a0) {
try {
URL = global.URL;
prototype = URL.prototype;
value3 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL(a0);
value4 = uRL instanceof Object ? uRL : value3;
} catch (error) {
return undefined;
}
yield getDeepLinkUrl(value4);
var value5 = undefined;
if (false) {
return value5;
}
var r6 = value != value5 && importDefault ? value : value5;
value4.searchParams.set('utm_source', 'discord');
var value9 = value4.toString();
if (value != require) {
require(value9);
} else if (value != r6) {
openDeepLink(r6, dependencyMap);
} else {
value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[5])(value9);
}
}
}
}
function getDeepLinkUrl() { // fn#77995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1045, offset: 0x01e1550e, size: 30 bytes, params: 1, frame: 13
return env4_9.apply(this, arguments);
}
function openDeepLink(a0, a1) { // fn#77996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1220, offset: 0x01e1552c, size: 114 bytes, params: 3, frame: 16
var environment;
const env0_0 = a1;
const env0_1 = global.setTimeout(function() {
return require(true);
}, 5000);
global.window.addEventListener('blur', _fun77998, {once: true});
const value = environment.__proto__.__proto__.__proto__.__proto__;
env4_1(env4_2[5])(a0);
}
@@ -0,0 +1,37 @@
/* Metro module 9953; source: modules/game_profile/hooks/useOpenGameProfileModal.tsx; dependencies: [9954, 9959, 2] */
function _fun77942(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:6, offset: 0x01e1348e, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useOpenGameProfileModal.tsx');
exports.default = useOpenGameProfileModal;
}
function useOpenGameProfileModal(a0) { // fn#77943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:193, offset: 0x01e134f1, size: 112 bytes, params: 2, frame: 14
let value = a1;
const env0_0 = a0;
const value2 = undefined;
const env0_1 = (value !== value2 ? value : {}).onOpened;
value = (importDefault(9954) /* metro dependency 9954: useShouldOpenGameProfileModal */)(a0);
return value.shouldOpenGameProfile && value.gameId != null ? _fun77944 : value2;
}
function _fun77944(a0) { // fn#77944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:313, offset: 0x01e13561, size: 129 bytes, params: 2, frame: 17
if (a0 != null) {
a0.stopPropagation();
}
if (a0 != null) {
a0.preventDefault();
}
let value = environment.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
const openGameProfileModal = value.openGameProfileModal;
const object2 = {};
copyDataProperties(object2, env0_0, undefined);
object2['gameId'] = gameId;
object2['gameProfileModalChecks'] = env0_2;
Reflect.apply(openGameProfileModal, value, [object2]);
if (onOpened != null) {
onOpened();
}
}
@@ -0,0 +1,76 @@
/* Metro module 11890; source: modules/game_profile/hooks/usePendingGameProfileReturn.tsx; dependencies: [31, 5199, 9965, 661, 566, 9959, 9963, 1423, 2] */
function _fun91268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:6, offset: 0x02059a12, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AVATAR_SIZE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/usePendingGameProfileReturn.tsx');
exports.default = usePendingGameProfileReturn;
}
function usePendingGameProfileReturn({channelId}) { // fn#91269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:250, offset: 0x02059ac1, size: 347 bytes, params: 2, frame: 19
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameProfileStore], _fun91270);
const binding = env0_3;
const value4 = binding.useCallback(_fun91271, [value3]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameStore], _fun91272);
binding.useEffect(_fun91273, [value5?.id]);
const name = value5?.name;
if (value5 == null) {
return null;
}
if (name == null) {
return null;
}
return {gameId: value5.id, gameName: name,
gameIconUrl: value5?.iconHash != null ? value5.iconHash === '' ? undefined : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGameAssetURL({id: value5.id,
hash: value5.iconHash, size: AVATAR_SIZE}) : undefined, onReturnToGameProfile: value4};
}
function _fun91270() { // fn#91270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:340, offset: 0x02059c1c, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = GameProfileStore.getPendingReturn();
const value2 = null;
return value2 == value || value.channelId !== channelId ? value2 : value;
}
function _fun91271() { // fn#91271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:431, offset: 0x02059c4f, size: 113 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var returnToGameProfile;
var object2;
var binding;
if (env0_1 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
returnToGameProfile = defaultImport.returnToGameProfile;
object2 = {};
binding = env0_1;
object2.gameId = binding.gameId;
object2.source = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources.AnnouncementChannelReturn;
object2.initialScrollOffset = binding.initialScrollOffset;
Reflect.apply(returnToGameProfile, defaultImport, [object2]);
}
}
function _fun91272() { // fn#91272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:635, offset: 0x02059cc0, size: 67 bytes, params: 1, frame: 12
const value2 = null;
return value2 != (value2 == env0_1 ? undefined : env0_1.gameId) ? GameStore.getGame(env0_1.gameId) : value2;
}
function _fun91273() { // fn#91273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:711, offset: 0x02059d03, size: 46 bytes, params: 1, frame: 5
const value2 = undefined;
if ((env0_2 == null ? value2 : env0_2.id) != null) {
return _fun91274;
}
return value2;
}
function _fun91274() { // fn#91274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:753, offset: 0x02059d31, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
return value.clearGameProfilePendingReturn(env1_2.id);
}
@@ -0,0 +1,44 @@
/* Metro module 9957; source: modules/game_profile/hooks/useResolveGameForProfile.tsx; dependencies: [6777, 4483, 9958, 4484, 5198, 2] */
function _fun77953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10143:6, offset: 0x01e13be2, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useResolveGameForProfile.tsx');
exports.default = useResolveGameForProfile;
}
function useResolveGameForProfile({applicationId, gameId}) { // fn#77954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10143:191, offset: 0x01e13c49, size: 352 bytes, params: 2, frame: 19
var r1;
var moduleValue3;
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
let r0 = gameId == null ? applicationId : undefined;
const value4 = Reflect.apply(useGetOrFetchApplication, useGetOrFetchApplicationsModule, [r0]);
const r4 = value4 != null && (require(4483) /* metro dependency 4483: RobloxSubgameUtils */).isRobloxSubgameApplication(value4);
const defaultImport = importDefault(9958) /* metro dependency 9958: useResolveGame */;
let object2 = {applicationId: applicationId};
object2.gameId = r4 ? (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID : gameId;
const value6 = defaultImport(object2);
const value7 = value6.gameRecord != null;
if (value7) {
moduleValue3 = require(4483) /* metro dependency 4483: RobloxSubgameUtils */;
r1 = moduleValue3.isRobloxSubgameGame(value6.gameRecord);
} else {
r1 = value7;
}
const useGameModule = require(5198) /* metro dependency 5198: useGame */;
const useGame = useGameModule.useGame;
const ROBLOX_GAME_ID = r1 ? (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID : undefined;
const value8 = Reflect.apply(useGame, useGameModule, [ROBLOX_GAME_ID]);
if (r1) {
object2 = {};
object2.gameId = (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID;
object2.gameRecord = value8.data ?? null;
object2.isLoading = value8.isLoading;
r0 = object2;
} else {
r0 = value6;
}
return r0;
}
@@ -0,0 +1,91 @@
/* Metro module 9954; source: modules/game_profile/hooks/useShouldOpenGameProfileModal.tsx; dependencies: [31, 5199, 661, 683, 1391, 9955, 9956, 9957, 44, 2] */
function _fun77945(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:6, offset: 0x01e135e2, size: 248 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object = {NoMatch: 'no match', NSFW: 'nsfw', Disabled: 'profile disabled'};
const closure = function(a0) {
return getRejectionReasons(a0).length === 0;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useShouldOpenGameProfileModal.tsx');
exports.default = _default_77948;
exports.gameIsAcceptable = closure;
exports.gameIdIsAcceptable = gameIdIsAcceptable;
}
function getRejectionReasons(a0) { // fn#77946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:257, offset: 0x01e136da, size: 206 bytes, params: 2, frame: 19
if (a0 == null) {
return [env0_7.NoMatch];
}
const items2 = [];
const flagUtilsModule = importAll(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const gameFlags = a0.gameFlags;
const GameFlags = (require(9955) /* metro dependency 9955: GameFlags */).GameFlags;
const GAME_PROFILE_DISABLED = GameFlags.GAME_PROFILE_DISABLED;
if (Reflect.apply(hasFlag, flagUtilsModule, [gameFlags, GAME_PROFILE_DISABLED])) {
items2.push(env0_7.Disabled);
}
const themes = a0.themes;
const includes = themes.includes;
const ThirdPartyGameApplicationThemes = (require(9956) /* metro dependency 9956: ThirdPartyGameApplicationThemes */).ThirdPartyGameApplicationThemes;
const EROTIC = ThirdPartyGameApplicationThemes.EROTIC;
if (Reflect.apply(includes, themes, [EROTIC])) {
items2.push(env0_7.NSFW);
}
return items2;
}
function _default_77948({applicationId, gameId, source, trackEntryPointImpression}) { // fn#77948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:543, offset: 0x01e137c6, size: 221 bytes, params: 2, frame: 20
applicationId = applicationId === undefined ? '' : applicationId;
trackEntryPointImpression = trackEntryPointImpression === undefined || trackEntryPointImpression;
const binding = undefined;
const env0_2 = binding.useRef(false);
const {gameId, gameRecord,
isLoading} = (importDefault(9957) /* metro dependency 9957: useResolveGameForProfile */)({applicationId: applicationId,
gameId: gameIdBinding});
const value = gameIsAcceptable(gameRecord);
binding.useEffect(_fun77949, [gameRecord, value, isLoading, source, trackEntryPointImpression]);
return {shouldOpenGameProfile: value, gameId: gameIdBinding};
}
function gameIdIsAcceptable(a0) { // fn#77950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:1299, offset: 0x01e13975, size: 34 bytes, params: 2, frame: 12
return gameIsAcceptable(GameStore.getGame(a0));
}
function _fun77949() { // fn#77949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:756, offset: 0x01e138a3, size: 210 bytes, params: 1, frame: 19
var r6;
var value2;
var defaultImport;
var sourceBinding;
var rejectionReasons;
var binding;
var id;
var defaultImport2;
if (!env0_2.current) {
if (trackEntryPointImpression) {
if (!isLoading) {
if (gameRecord != null) {
value2 = environment.__proto__;
defaultImport = importDefault(44) /* metro dependency 44 */;
sourceBinding = source;
defaultImport(sourceBinding != null,
'Cannot track a Game Profile Entry Point Impressions without a source.');
rejectionReasons = getRejectionReasons(gameRecord);
binding = env0_5;
id = gameRecord.id;
r6 = rejectionReasons !== undefined ? rejectionReasons : [];
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.GAME_PROFILE_ENTRY_POINT_AVAILABLE,
{game_profile_available: binding,
application_id: id, rejection_reason: r6, source: sourceBinding});
env0_2.current = true;
}
}
}
}
}
@@ -0,0 +1,67 @@
/* Metro module 9968; source: modules/game_profile/hooks/useSteamWebsiteUrl.tsx; dependencies: [5199, 661, 566, 9969, 9967, 1861, 2] */
function _fun78047(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:6, offset: 0x01e16cd1, size: 155 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function(a0) {
return 'https://store.steampowered.com/app/' + (0, global.encodeURIComponent)(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Distributors;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useSteamWebsiteUrl.tsx');
exports.buildSteamStoreUrl = closure;
exports.useSteamWebsiteUrl = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([GameStore], _fun78050, [a0]);
};
}
function useSteamWebsiteUrl(a0) { // fn#78049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:372, offset: 0x01e16d96, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GameStore], _fun78050, [a0]);
}
function _fun78050() { // fn#78050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:442, offset: 0x01e16de1, size: 272 bytes, params: 1, frame: 17
const value2 = null;
if (value2 == env0_0) {
return value2;
}
let value = GameStore.getGame(env0_0);
if (value2 == value) {
return value2;
}
const steamReleaseStatus = value.steamReleaseStatus;
const value4 = undefined;
const SteamReleaseStatus = (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus;
const RETIRED_ABANDONED = SteamReleaseStatus.RETIRED_ABANDONED;
if (steamReleaseStatus === RETIRED_ABANDONED) {
return value2;
}
const value5 = value.websites.find(function({category}) {
return category === require(dependencyMap[4]).ThirdPartyGameApplicationWebsiteCategory.STEAM;
});
const url = value2 == value5 ? value4 : value5.url;
value = value.thirdPartySkus.filter(_fun78052);
const property = value[0];
const id = value2 == property ? value4 : property.id;
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
const r2 = stringUtilsModule.isNullOrEmpty(id) ? value2 : buildSteamStoreUrl(id);
return value.length > 1 && value2 != url ? url : value2 == r2 ? value2 != url ? url : value2 : r2;
}
function _fun78052(a0) { // fn#78052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:749, offset: 0x01e16f24, size: 72 bytes, params: 2, frame: 13
var r0;
const distributor = a0.distributor;
let value = environment.__proto__.__proto__;
const STEAM = Distributors.STEAM;
const value2 = distributor === STEAM;
if (value2) {
value = require(1861) /* metro dependency 1861: StringUtils */;
value = !value.isNullOrEmpty(a0.id);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,43 @@
/* Metro module 9970; source: modules/game_profile/hooks/useXboxGamePassStoreUrl.tsx; dependencies: [661, 1861, 9962, 2] */
function _fun78054(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:6, offset: 0x01e17021, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).Distributors;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useXboxGamePassStoreUrl.tsx');
exports.default = useXboxGamePassStoreUrl;
}
function useXboxGamePassStoreUrl(a0) { // fn#78055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:217, offset: 0x01e17096, size: 103 bytes, params: 2, frame: 15
var r1;
let value = null;
if (value == a0) {
return value;
}
const value2 = a0.thirdPartySkus.find(_fun78056);
if (value == (value == value2 ? undefined : value2.id)) {
r1 = value;
} else {
value = require(9962) /* metro dependency 9962: distributorStoreUrls */;
value = value.buildXboxGamePassStoreUrl(value2.id);
r1 = value;
}
return r1;
}
function _fun78056(a0) { // fn#78056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:305, offset: 0x01e170fd, size: 72 bytes, params: 2, frame: 13
var r0;
const distributor = a0.distributor;
let value = environment.__proto__;
const XBOX_GAME_PASS = Distributors.XBOX_GAME_PASS;
const value2 = distributor === XBOX_GAME_PASS;
if (value2) {
value = require(1861) /* metro dependency 1861: StringUtils */;
value = !value.isNullOrEmpty(a0.id);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,33 @@
/* Metro module 10180; source: modules/game_profile/native/GameDetectionReportActionCreators.tsx; dependencies: [5, 4267, 10181, 507, 2] */
function _fun79229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10366:6, offset: 0x01e49bb7, size: 169 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(4267) /* metro dependency 4267: DetectableGameStore */).gameFromServer;
const env0_4 = (require(10181) /* metro dependency 10181: Constants */).DETECTABLE_GAMES_CDN_URL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/GameDetectionReportActionCreators.tsx');
exports.fetchDetectableGames = function() {
return _fetchDetectableGames.apply(this, arguments);
};
}
function _fetchDetectableGames() { // fn#79230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10366:166, offset: 0x01e49c60, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun79232).apply(this, arguments);
}
function* _fun79232() { // fn#79232, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10366:231, offset: 0x01e49c9d, size: 89 bytes, params: 1, frame: 13
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_1[3]).HTTP;
const get = HTTP.get;
yield Reflect.apply(get, HTTP, [env2_4]);
const value3 = undefined;
if (false) {
return value3;
}
return value3.body.map(env2_3);
}
@@ -0,0 +1,314 @@
/* Metro module 10179; source: modules/game_profile/native/components/GameDetectionReportModal.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1484, 9963, 10180, 5080, 1244, 5277, 5312, 5282, 4573, 7988, 7987, 7981, 4578, 7681, 5280, 2] */
function _fun79203(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:6, offset: 0x01e48c49, size: 383 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.gap = PX_24;
object2.content = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.submitContainer = {padding: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameDetectionReportModal.tsx');
exports.default = GameDetectionReportModal;
exports.MODAL_KEY = 'game-detection-report';
}
function ReportContent({applicationId}) { // fn#79204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:421, offset: 0x01e48dc8, size: 557 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value4 = env0_3(env0_4.useState('issue_selection'), 2);
const property = value4[0];
var env0_3 = property;
var env0_4 = value4[1];
const [property2, env0_6] = env0_3(env0_4.useState([]), 2);
const [property3, env0_8] = env0_3(env0_4.useState(''), 2);
const [property4, env0_10] = env0_3(env0_4.useState(null), 2);
const [property5, env0_12] = env0_3(env0_4.useState(''), 2);
const value13 = env0_4.useMemo(_fun79205, []);
env0_4.useEffect(_fun79206, []);
const value14 = env0_4.useCallback(_fun79208, []);
env0_4.useLayoutEffect(_fun79209, [property, value2, value14]);
const env0_15 = env0_4.useCallback(_fun79216, [value13, applicationId, property3, property4, property5, value14]);
const env0_16 = env0_4.useMemo(_fun79217, [property2, property3]);
return (
<ScrollView style={styles.container} keyboardShouldPersistTaps="handled">
{_fun79219()}
</ScrollView>
);
}
function GameDetectionReportModal({applicationId}) { // fn#79226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:3799, offset: 0x01e49b01, size: 120 bytes, params: 2, frame: 16
const value2 = env0_4.useMemo(function() {
return {['REPORT']: {render: _fun79228}};
}, []);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator screens={value2} initialRouteStack={[{name: 'REPORT', params: {applicationId: applicationId}}]} />;
}
function _fun79205() { // fn#79205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:729, offset: 0x01e48ff5, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).generateViewId();
}
function _fun79206() { // fn#79206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:776, offset: 0x01e4901a, size: 74 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__;
value = require(10180) /* metro dependency 10180: GameDetectionReportActionCreators */;
value = value.fetchDetectableGames();
value = value.then(env0_6);
value.catch(function() {
});
}
function _fun79208() { // fn#79208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:863, offset: 0x01e49064, size: 42 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(env1_10);
}
function _fun79209() { // fn#79209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:915, offset: 0x01e4908e, size: 413 bytes, params: 1, frame: 19
var environment;
var binding;
var setOptions;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (env0_3 === 'issue_selection') {
binding = env0_2;
setOptions = binding.setOptions;
object2 = {};
value = environment.__proto__;
object2.title = intl.string(t['6tnjbD']);
object2.headerLeft = function() {
return null;
};
object2.headerRight = headerRight_79211;
Reflect.apply(setOptions, binding, [object2]);
} else if (env0_3 === 'game_search') {
binding = env0_2;
setOptions = binding.setOptions;
object2 = {};
value = environment.__proto__;
object2.title = intl.string(t.TZgkxY);
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
object2.headerLeft = value.getHeaderBackButton(_fun79212);
object2.headerRight = headerRight_79213;
Reflect.apply(setOptions, binding, [object2]);
} else {
binding = env0_2;
setOptions = binding.setOptions;
object2 = {};
value = environment.__proto__;
object2.title = intl.string(t.tdDpJj);
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
object2.headerLeft = value.getHeaderBackButton(_fun79214);
object2.headerRight = headerRight_79215;
Reflect.apply(setOptions, binding, [object2]);
}
}
function _fun79216() { // fn#79216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:1531, offset: 0x01e492c2, size: 198 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = undefined;
const gameProfileAnalyticUtilsModule = require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */;
const trackGameProfileFeedback = gameProfileAnalyticUtilsModule.trackGameProfileFeedback;
const object2 = {};
object2.viewId = env0_13;
object2.applicationId = applicationId;
let binding = env0_7;
object2.suggestedGameName = binding.trim() === '' ? value : env0_7.trim();
const value5 = null;
const id = value5 == env0_9 ? value : env0_9.id;
object2.suggestedGameApplicationId = value5 != id ? id : value5;
binding = env0_11;
object2.feedback = binding.trim() === '' ? value : env0_11.trim();
object2.submitted = true;
Reflect.apply(trackGameProfileFeedback, gameProfileAnalyticUtilsModule, [object2]);
env0_14();
return value;
}
function _fun79217() { // fn#79217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:1801, offset: 0x01e49388, size: 90 bytes, params: 1, frame: 13
if (env0_7.trim() === '') {
return [];
}
const env0_0 = env0_7.toLowerCase();
return env0_5.filter(_fun79218).slice(0, 10);
}
function _fun79219() { // fn#79219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:2006, offset: 0x01e49407, size: 1465 bytes, params: 1, frame: 30
var environment;
var value2;
var jsxRuntimeEnv1_9Binding;
var object;
var stylesBinding;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items7;
var TextArea;
var object4;
var items2;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var value6;
var value7;
var items3;
var TextInput;
var object9;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
var items4;
var value13;
var items5;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
var items6;
var value;
let binding = env0_3;
if (binding === 'issue_selection') {
value13 = environment.__proto__;
var viewBindingProps = {style: styles.content};
string = intl.string;
value = <Text variant="text-sm/normal" color="text-muted">{Reflect.apply(string, intl, [t.IQHicr])}</Text>;
items5 = [value];
string = intl.string;
value = <TableRadioRow value="wrong_game_shown" label={Reflect.apply(string, intl, [t.TZgkxY])} />;
items6 = [value];
string = intl.string;
items6[1] = <TableRadioRow value="other_feedback" label={Reflect.apply(string, intl, [t.tdDpJj])} />;
items5[1] = <TableRadioGroup value={undefined} onChange={function(a0) {
var env0_0 = a0;
global.setTimeout(_fun79221, 100);
}} hasIcons={false}>{items6}</TableRadioGroup>;
return (
<View {...viewBindingProps}>
{items5}
</View>
);
}
if (binding === 'game_search') {
value6 = environment.__proto__;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
var viewBindingProps = {style: styles.content};
value7 = undefined;
string = intl.string;
items3 = [<Text variant="text-sm/normal" color="text-muted">{Reflect.apply(string, intl,
[t['79o/iq']])}</Text>];
TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
items3[1] = <TextInput value={env0_7} onChange={onChange_79222} placeholder={intl.string(t['/SGi7v'])} />;
items3[2] = env0_16.length > 0 && <TableRadioGroup value={env0_9 == null ? value7 : env0_9.id} onChange={onChange_79223} hasIcons={false}>{env0_16.map(_fun79225)}</TableRadioGroup>;
items4 = [<View {...viewBindingProps}>{items3}</View>];
string = intl.string;
items4[1] = <View style={styles.submitContainer}><Button variant="primary" size="md" text={Reflect.apply(string,
intl, [t.geKm7t])} disabled={env0_7.trim() === ''} onPress={env0_15} /></View>;
return (
<>
{items4}
</>
);
}
if (binding === 'other_feedback') {
value2 = environment.__proto__;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
object = {};
stylesBinding = styles;
object.style = stylesBinding.content;
string = intl.string;
items7 = [<Text variant="text-sm/normal" color="text-muted">{Reflect.apply(string, intl, [t.IblYEw])}</Text>];
TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
binding = env0_11;
items7[1] = <TextArea value={binding} onChange={env0_12} placeholder={intl.string(t.aiPKV4)} maxLength={300} />;
items2 = [<View {...object}>{items7}</View>];
string = intl.string;
items2[1] = <View style={stylesBinding.submitContainer}><Button variant="primary" size="md" text={Reflect.apply(string,
intl, [t.geKm7t])} disabled={binding.trim() === ''} onPress={env0_15} /></View>;
return (
<>
{items2}
</>
);
}
}
function _fun79227() { // fn#79227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:3869, offset: 0x01e49b79, size: 29 bytes, params: 1, frame: 3
return {['REPORT']: {render: render_79228}};
}
function headerRight_79211() { // fn#79211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:1037, offset: 0x01e4922b, size: 129 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
IconComponent={XSmallIcon}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={env1_14}
/>
);
}
function _fun79212() { // fn#79212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:1298, offset: 0x01e492ac, size: 22 bytes, params: 1, frame: 11
return env1_4('issue_selection');
}
function onChange_79220(a0) { // fn#79220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:2243, offset: 0x01e499c0, size: 37 bytes, params: 2, frame: 13
const env0_0 = a0;
global.setTimeout(_fun79221, 100);
}
function onChange_79222(a0) { // fn#79222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:2778, offset: 0x01e49a12, size: 57 bytes, params: 2, frame: 14
env1_8(a0);
if (env1_9 != null && a0 !== env1_9.name) {
env1_10(null);
}
}
function onChange_79223(a0) { // fn#79223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:2949, offset: 0x01e49a4b, size: 79 bytes, params: 2, frame: 13
const env0_0 = a0;
const value2 = env1_16.find(_fun79224);
const value3 = null;
const r1 = value3 != value2 ? value2 : value3;
env1_10(r1);
if (value3 != r1) {
env1_8(r1.name);
}
}
function _fun79225(a0, a1) { // fn#79225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:3053, offset: 0x01e49a9a, size: 103 bytes, params: 3, frame: 19
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={a0.id}
label={a0.name}
key={'' + a0.id + '-' + a1}
/>
);
}
function render_79228(a0) { // fn#79228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:3887, offset: 0x01e49b96, size: 33 bytes, params: 2, frame: 13
return <ReportContent {...a0} />;
}
function _fun79221() { // fn#79221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10365:2259, offset: 0x01e499e5, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
env2_4(env0_0 !== 'wrong_game_shown' ? 'other_feedback' : 'game_search');
}
@@ -0,0 +1,413 @@
/* Metro module 10011; source: modules/game_profile/native/components/GameProfileAnnouncements.tsx; dependencies: [31, 27, 33, 4501, 697, 6518, 4597, 10012, 4573, 10014, 3826, 7950, 1244, 6771, 10016, 9963, 9959, 10018, 4578, 6818, 2] */
function _fun78190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:6, offset: 0x01e1f88f, size: 1242 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Image;
const env0_6 = value.View;
const env0_7 = value.Pressable;
const env0_8 = value.ActivityIndicator;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {gap: PX_8};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.cardsContainer = {flexDirection: 'column', gap: PX_12};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.smallCardsContainer = {flexDirection: 'row', gap: PX_12};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.sectionHeader = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
paddingHorizontal: PX_8};
object2.loadingContainer = {'height': 180, 'alignItems': 'center', 'justifyContent': 'center'};
const object3 = {'flexDirection': 'column', 'borderRadius': null, 'overflow': 'hidden', 'backgroundColor': null,
'borderWidth': 1, 'borderColor': null, 'flex': 1};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object2.card = object3;
object2.mainCardTextOnly = {minHeight: 148};
object2.mainCardMedia = {'height': 180, 'overflow': 'hidden', 'flexShrink': 0};
const object4 = {'flex': 1, 'flexDirection': 'column', 'gap': null, 'overflow': 'hidden'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.gap = PX_4;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.padding = PX_12;
object2.cardBody = object4;
object2.smallCardMedia = {'height': 120, 'overflow': 'hidden', 'flexShrink': 0};
object2.mediaImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.metadataRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'marginTop': 'auto', gap: PX_8};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.reactionInfo = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
const object5 = {'flex': 1, 'gap': null, 'borderLeftWidth': 4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.gap = PX_4;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderLeftColor = BORDER_SUBTLE;
object5.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingLeft = PX_8;
object2.embedContentArea = object5;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.embedAuthorRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
const object7 = {'width': 20, 'height': 20};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.embedAuthorIcon = object7;
object2.embedProviderIcon = {'width': 16, 'height': 16};
const object9 = {'overflow': 'hidden', 'borderRadius': null, 'aspectRatio': 1.7777777777777777};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.embedMedia = object9;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.pollAnswers = {'flexDirection': 'column', 'gap': null, 'flex': 1, gap: PX_4};
const object10 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.paddingVertical = PX_8;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingHorizontal = PX_12;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object10.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.pollAnswerOption = object10;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.pollMoreOptions = {paddingHorizontal: PX_12};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileAnnouncements.tsx');
exports.default = GameProfileAnnouncements;
}
function EmbedAnnouncementCard({variant, message, onPress, guildId, channelId}) { // fn#78191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:2069, offset: 0x01e1fd69, size: 1526 bytes, params: 2, frame: 42
var r17;
var object;
var ImageWithPlaceholder;
var placeholder;
var items8;
var NumberFormat;
var currentLocale;
var numberFormat;
const styles = useStyles();
const value4 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun78192);
const value5 = variant === 'main';
let media = message.media;
const r2 = media?.proxyUrl ?? message.media?.url;
const r29 = (r2 != null ? (require(10012) /* metro dependency 10012: AnnouncementMessageUtils */).getPosterUrl(r2) : null) ?? r2;
const embedSource = message.embedSource;
if (embedSource == null) {
return null;
}
let r13 = embedSource.color != null ? {borderLeftColor: embedSource.color} : undefined;
const pressableProps = {style: [styles.card, value5 && styles.mainCardTextOnly], onPress: onPress,
accessibilityRole: 'button', accessibilityLabel: message.title};
const r9 = embedSource.url != null && <Text variant="text-xs/medium" color="text-link" lineClamp={1}>{embedSource.url}</Text>;
const items3 = [styles.embedContentArea, r13];
const items5 = [embedSource.authorName != null && <View style={styles.embedAuthorRow}>{embedSource.authorIconUrl != null && <Image source={{uri: embedSource.authorIconUrl}} style={styles.embedAuthorIcon} />}<Text variant="text-xs/semibold" color="text-strong" lineClamp={1}>{embedSource.authorName}</Text></View>];
r13 = message.media != null && r29 != null;
if (r13) {
var viewBinding4Props = {style: styles.embedMedia};
ImageWithPlaceholder = (require(10014) /* metro dependency 10014: ImageWithPlaceholder */).ImageWithPlaceholder;
media = message.media;
placeholder = media.placeholder;
media = message.media;
r13 = <View {...viewBinding4Props}><ImageWithPlaceholder uri={r29} placeholder={placeholder} placeholderVersion={media.placeholderVersion} style={styles.mediaImage} /></View>;
}
items5[1] = r13;
items5[2] = message.title != null && <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={value5 ? 1 : 2}>{value4(message.title,
true, {guildId: guildId, channelId: channelId})}</Text>;
items5[3] = message.body.length > 0 && <Text variant="text-sm/medium" color="text-default" lineClamp={value5 ? 5 : 3}>{value4(message.body,
true, {guildId: guildId, channelId: channelId})}</Text>;
const items6 = [embedSource.providerIconUrl != null && <Image source={{uri: embedSource.providerIconUrl}} style={styles.embedProviderIcon} />];
var Text = (require(4573) /* metro dependency 4573: Text */).Text;
const providerName = embedSource.providerName;
const value26 = '';
const items7 = [providerName != null ? value26 + embedSource.providerName + ' · ' : value26];
const dateUtilsModule = require(3826) /* metro dependency 3826: DateUtils */;
const dateFormat = dateUtilsModule.dateFormat;
const Date = global.Date;
const timestamp = message.timestamp;
const value28 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(timestamp);
items7[1] = Reflect.apply(dateFormat, dateUtilsModule, [date instanceof Object ? date : value28, 'LL']);
items6[1] = <Text variant="text-xs/medium" color="text-muted">{items7}</Text>;
const value30 = message.reactionCount > 0;
if (value30) {
var viewBinding6Props = {style: styles.reactionInfo};
items8 = [((ReactionIcon) => <ReactionIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} />)((require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon)];
NumberFormat = global.Intl.NumberFormat;
currentLocale = (require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale;
numberFormat = new NumberFormat();
items8[1] = <Text variant="text-xs/medium" color="text-muted">{numberFormat.format(message.reactionCount)}</Text>;
numberFormat = <View {...viewBinding6Props}>{items8}</View>;
r17 = numberFormat;
} else {
r17 = value30;
}
items6[2] = r17;
items5[4] = <View style={styles.metadataRow}>{items6}</View>;
return (
<Pressable {...pressableProps}>
<View style={styles.cardBody}>
{r9}
<View style={items3}>
{items5}
</View>
</View>
</Pressable>
);
}
function MessageAnnouncementCard({variant, message, onPress, guildId, channelId}) { // fn#78193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:4064, offset: 0x01e20384, size: 1097 bytes, params: 2, frame: 38
var r13;
var ImageWithPlaceholder;
var placeholder;
var items5;
var NumberFormat;
var currentLocale;
var numberFormat;
const styles = useStyles();
const value4 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun78194);
const value5 = variant === 'main';
let media = message.media;
const r1 = media?.proxyUrl ?? message.media?.url;
const r12 = (r1 != null ? (require(10012) /* metro dependency 10012: AnnouncementMessageUtils */).getPosterUrl(r1) : null) ?? r1;
const r7 = message.media != null && r12 != null;
const pressableProps = {style: [styles.card, !r7 && value5 && styles.mainCardTextOnly], onPress: onPress,
accessibilityRole: 'button', accessibilityLabel: message.title};
let r5 = message.media != null && r12 != null;
if (r5) {
var viewBindingProps = {style: value5 ? styles.mainCardMedia : styles.smallCardMedia};
ImageWithPlaceholder = (require(10014) /* metro dependency 10014: ImageWithPlaceholder */).ImageWithPlaceholder;
media = message.media;
placeholder = media.placeholder;
media = message.media;
r5 = <View {...viewBindingProps}><ImageWithPlaceholder uri={r12} placeholder={placeholder} placeholderVersion={media.placeholderVersion} style={styles.mediaImage} /></View>;
}
const items3 = [message.title != null && <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={value5 ? 1 : 2}>{value4(message.title,
true, {guildId: guildId, channelId: channelId})}</Text>];
items3[1] = message.body.length > 0 && <Text variant="text-sm/medium" color="text-default" lineClamp={value5 ? 5 : 3}>{value4(message.body,
true, {guildId: guildId, channelId: channelId})}</Text>;
var Text = (require(4573) /* metro dependency 4573: Text */).Text;
const dateUtilsModule = require(3826) /* metro dependency 3826: DateUtils */;
const dateFormat = dateUtilsModule.dateFormat;
const Date = global.Date;
const timestamp = message.timestamp;
const value21 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(timestamp);
const text = <Text variant="text-xs/medium" color="text-muted">{Reflect.apply(dateFormat, dateUtilsModule,
[date instanceof Object ? date : value21, 'LL'])}</Text>;
const value24 = message.reactionCount > 0;
if (value24) {
var viewBinding3Props = {style: styles.reactionInfo};
items5 = [((ReactionIcon) => <ReactionIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} />)((require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon)];
NumberFormat = global.Intl.NumberFormat;
currentLocale = (require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale;
numberFormat = new NumberFormat();
items5[1] = <Text variant="text-xs/medium" color="text-muted">{numberFormat.format(message.reactionCount)}</Text>;
numberFormat = <View {...viewBinding3Props}>{items5}</View>;
r13 = numberFormat;
} else {
r13 = value24;
}
items3[2] = <View style={styles.metadataRow}>{text}{r13}</View>;
return (
<Pressable {...pressableProps}>
{r5}
<View style={styles.cardBody}>
{items3}
</View>
</Pressable>
);
}
function PollAnnouncementCard({variant, message, onPress}) { // fn#78195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:5492, offset: 0x01e207cd, size: 665 bytes, params: 2, frame: 37
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const poll = message.poll;
if (poll == null) {
return null;
}
const value2 = poll.answers.slice(0, 3);
const value3 = poll.answers.length - value2.length;
const pressableProps = {style: [styles.card, variant === 'main' && styles.mainCardTextOnly], onPress: onPress,
accessibilityRole: 'button', accessibilityLabel: poll.question.text};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="text-md/semibold" color="mobile-text-heading-primary">{poll.question.text}</Text>];
items2[1] = <View style={styles.pollAnswers}>{value2.map(_fun78196)}{value3 > 0 && <Text variant="text-xs/medium" color="text-muted" style={styles.pollMoreOptions}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['mv/nIa'],
{count: value3})}</Text>}</View>;
const format = intl.format;
const t0FTsH = (require(1244) /* metro dependency 1244: indexNative */).t.t0FTsH;
const object = {};
const Date = global.Date;
object.createdAt = new Date(message.timestamp);
object.expiryLabel = (require(10012) /* metro dependency 10012: AnnouncementMessageUtils */).getPollExpiryLabel(poll);
items2[2] = <View style={styles.metadataRow}><Text variant="text-xs/medium" color="text-muted">{Reflect.apply(format,
intl, [t0FTsH, object])}</Text></View>;
return (
<Pressable {...pressableProps}>
<View style={styles.cardBody}>
{items2}
</View>
</Pressable>
);
}
function AnnouncementCard(a0) { // fn#78197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:6546, offset: 0x01e20aec, size: 134 bytes, params: 2, frame: 15
return a0.message.poll != null ? <PollAnnouncementCard {...a0} /> : a0.message.embedSource != null ? <EmbedAnnouncementCard {...a0} /> : <MessageAnnouncementCard {...a0} />;
}
function GameProfileAnnouncements({gameId, invite, closeModal, trackAction, scrollOffsetRef}) { // fn#78198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:6840, offset: 0x01e20b72, size: 1046 bytes, params: 2, frame: 35
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_4 = scrollOffsetRef;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const {messages, channelId, guildId,
loading} = (importDefault(10016) /* metro dependency 10016: useGameAnnouncements */)(gameId);
const binding = env0_4;
const value3 = binding.useCallback(_fun78199, [trackAction, closeModal, invite, guildId, channelId,
analyticsLocations, gameId, scrollOffsetRef]);
const env0_8 = binding.useCallback(_fun78200, [trackAction, closeModal, invite, guildId, channelId,
analyticsLocations, gameId, scrollOffsetRef]);
if (loading) {
return (
<View style={styles.container}>
<View style={styles.sectionHeader}>
<Text variant="heading-sm/semibold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B0BV3Y)}
</Text>
</View>
<View style={styles.loadingContainer}>
<ActivityIndicator />
</View>
</View>
);
}
if (channelId == null) {
return null;
}
if (messages.length === 0) {
return null;
}
const value5 = messages.length !== 2;
const r20 = value5 ? messages[0] : null;
const r18 = value5 ? messages.slice(1, 3) : messages;
let string = intl.string;
const B0BV3Y = (require(1244) /* metro dependency 1244: indexNative */).t.B0BV3Y;
const text = <Text variant="heading-sm/semibold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
[B0BV3Y])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const budhsM = (require(1244) /* metro dependency 1244: indexNative */).t.budhsM;
const ChevronSmallRightIcon = (require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon;
const view = <View style={styles.sectionHeader}>{text}<Button text={Reflect.apply(string, intl,
[budhsM])} variant="tertiary" size="sm" icon={<ChevronSmallRightIcon size="sm" />} iconPosition="end" onPress={value3} /></View>;
const items3 = [r20 != null && <AnnouncementCard variant="main" message={r20} onPress={onPress_78201} guildId={guildId} channelId={channelId} />];
items3[1] = r18.length > 0 && <View style={styles.smallCardsContainer}>{r18.map(_fun78202)}</View>;
return (
<View style={styles.container}>
{view}
<View style={styles.cardsContainer}>
{items3}
</View>
</View>
);
}
function _fun78192() { // fn#78192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:2182, offset: 0x01e2035f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importAll(4597) /* metro dependency 4597: CustomMarkupNative */).getParser();
}
function _fun78196(a0) { // fn#78196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:5971, offset: 0x01e20a66, size: 134 bytes, params: 2, frame: 21
const value = environment.__proto__;
const viewBindingProps = {style: styles.pollAnswerOption};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View {...viewBindingProps} key={a0.answer_id}>
<Text
variant="text-sm/medium"
color="text-default"
lineClamp={1}
>
{a0.poll_media.text ?? ''}
</Text>
</View>
);
}
function _fun78199() { // fn#78199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:7064, offset: 0x01e20f88, size: 231 bytes, params: 1, frame: 18
var channelIdBinding;
var trackActionBinding;
var value5;
var defaultImport;
var setGameProfilePendingReturn;
const inviteBinding = invite;
const value2 = undefined;
const r5 = (inviteBinding == null || invite.guild == null ? value2 : invite.guild.id) ?? guildId;
if (r5 != null && channelId != null) {
trackActionBinding = trackAction;
value5 = environment.__proto__;
trackActionBinding((require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.Announcements);
defaultImport = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
setGameProfilePendingReturn = defaultImport.setGameProfilePendingReturn;
channelIdBinding = channelId;
Reflect.apply(setGameProfilePendingReturn, defaultImport, [{gameId: gameId, channelId: channelIdBinding,
initialScrollOffset: scrollOffsetRef.current}]);
closeModal();
(importDefault(10018) /* metro dependency 10018: navigateToGameAnnouncement */)({invite: invite, guildId: r5,
channelId: channelIdBinding, analyticsLocationStack: analyticsLocations});
}
return value2;
}
function _fun78200(a0) { // fn#78200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:7409, offset: 0x01e2106f, size: 238 bytes, params: 2, frame: 18
var channelIdBinding;
var trackActionBinding;
var value5;
var defaultImport;
var setGameProfilePendingReturn;
const inviteBinding = invite;
const value2 = undefined;
const r5 = (inviteBinding == null || invite.guild == null ? value2 : invite.guild.id) ?? guildId;
if (r5 != null && channelId != null) {
trackActionBinding = trackAction;
value5 = environment.__proto__;
trackActionBinding((require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.AnnouncementsItem);
defaultImport = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
setGameProfilePendingReturn = defaultImport.setGameProfilePendingReturn;
channelIdBinding = channelId;
Reflect.apply(setGameProfilePendingReturn, defaultImport, [{gameId: gameId, channelId: channelIdBinding,
initialScrollOffset: scrollOffsetRef.current}]);
closeModal();
(importDefault(10018) /* metro dependency 10018: navigateToGameAnnouncement */)({invite: invite, guildId: r5,
channelId: channelIdBinding, messageId: a0, analyticsLocationStack: analyticsLocations});
}
return value2;
}
function GameProfileAnnouncementsOnPress() { // fn#78201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:8597, owner: GameProfileAnnouncements.onPress, offset: 0x01e2115d, size: 25 bytes, params: 1, frame: 11
return env0_8(env0_9.id);
}
function _fun78202(a0) { // fn#78202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10197:8694, offset: 0x01e21176, size: 80 bytes, params: 2, frame: 16
const env0_0 = a0;
return (
<AnnouncementCard
variant="small"
message={a0}
onPress={onPress_78203}
guildId={guildId}
channelId={channelId}
key={a0.id}
/>
);
}
@@ -0,0 +1,367 @@
/* Metro module 10009; source: modules/game_profile/native/components/GameProfileCommunity.tsx; dependencies: [5, 57, 31, 27, 1381, 33, 4501, 697, 9967, 4096, 4101, 9439, 566, 9963, 6947, 10010, 1418, 4573, 1244, 5475, 1423, 6819, 6915, 1305, 4578, 2] */
function _fun78175(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:6, offset: 0x01e1ea26, size: 1005 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const guildMembershipStore = importDefault(1381) /* metro dependency 1381: GuildMembershipStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerText = {paddingHorizontal: PX_8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.borderWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object3.overflow = 'hidden';
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object2.card = object3;
object2.guildBanner = {'height': 112, 'width': '100%', 'resizeMode': 'cover'};
const object7 = {flexDirection: 'column'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.gap = PX_16;
object2.guildContent = object7;
const object9 = {'width': 56, 'height': 56, 'borderRadius': null, 'overflow': 'hidden'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.borderWidth = PX_4;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object9.borderColor = BACKGROUND_BASE_LOW;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.marginLeft = -PX_4;
object2.guildIcon = object9;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object2.guildIconWithBanner = {marginTop: -PX_48};
const object10 = {'width': '100%', 'height': '100%'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object2.guildIconImage = object10;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.guildInfo = {flex: 1, gap: PX_16};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.guildNameDescriptionContainer = {gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.guildNameRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.memberCountsContainer = {flexDirection: 'row', gap: PX_16};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.memberCountContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
const object11 = {'width': 8, 'height': 8};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object11.backgroundColor = STATUS_POSITIVE;
object2.onlineEllipse = object11;
const object12 = {'width': 8, 'height': 8};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object12.backgroundColor = TEXT_DEFAULT;
object2.membersEllipse = object12;
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileCommunity.tsx');
exports.default = GameProfileCommunityServer;
}
function GameProfileCommunityServer({game, trackAction, onInviteResolved, closeModal}) { // fn#78176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:1474, offset: 0x01e1ee13, size: 1632 bytes, params: 2, frame: 46
var r22;
var items8;
var items10;
const styles = useStyles();
let binding = env0_5;
var [property, env0_5] = env0_4(binding.useState(null), 2);
const env0_6 = binding.useRef(onInviteResolved);
binding.useEffect(_fun78177, [onInviteResolved]);
const value6 = binding.useMemo(_fun78178, [game?.websites]);
binding = env0_5;
binding.useEffect(_fun78180, [value6]);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMembershipStore], _fun78185);
const value8 = binding.useCallback(_fun78186, [property, value7, trackAction, closeModal]);
if (property == null) {
return null;
}
if (property.guild == null) {
return null;
}
const guildRecordUtilsModule = require(1418) /* metro dependency 1418: GuildRecordUtils */;
const value9 = guildRecordUtilsModule.fromInviteGuild(property.guild);
let approximate_member_count = property.approximate_member_count;
approximate_member_count = approximate_member_count ?? property.guild.approximate_member_count;
let approximate_presence_count = property.approximate_presence_count;
approximate_presence_count = approximate_presence_count ?? property.guild.approximate_presence_count;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const text = <Text variant="heading-sm/semibold" color="mobile-text-heading-primary" style={styles.headerText}>{Reflect.apply(string,
intl, [t['U2N+ci']])}</Text>;
const r8 = value9.banner != null && ((Component) => <Component source={(importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildBannerSource(value9)} style={styles.guildBanner} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items3 = [styles.guildIcon];
items3[1] = value9.banner != null ? styles.guildIconWithBanner : null;
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
const items4 = [<View style={items3}><GuildIcon guild={value9} size={LARGE} style={styles.guildIconImage} /></View>];
const text2 = <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1}>{value9.name}</Text>;
const GuildBadgeV2 = importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const view = <View style={styles.guildNameDescriptionContainer}><View style={styles.guildNameRow}>{text2}<GuildBadgeV2 guild={value9} size={REFRESH_SMALL_16} /></View><Text variant="text-sm/medium" color="text-default" lineClamp={3}>{value9.description}</Text></View>;
if (approximate_presence_count != null) {
var viewBinding4Props = {style: styles.memberCountContainer};
items8 = [<View style={styles.onlineEllipse} />];
items8[1] = <Text variant="text-xs/normal" color="text-default">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
{membersOnline: approximate_presence_count})}</Text>;
r22 = <View {...viewBinding4Props}>{items8}</View>;
} else {
r22 = null;
}
const items9 = [r22];
if (approximate_member_count != null) {
var viewBinding5Props = {style: styles.memberCountContainer};
items10 = [<View style={styles.membersEllipse} />];
items10[1] = <Text variant="text-xs/normal" color="text-default">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.zRl6XR,
{count: approximate_member_count})}</Text>;
r22 = <View {...viewBinding5Props}>{items10}</View>;
} else {
r22 = null;
}
items9[1] = r22;
items4[1] = <View style={styles.guildInfo}>{view}<View style={styles.memberCountsContainer}>{items9}</View></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items4[2] = <Button variant="secondary" size="md" text={value7 ? Reflect.apply(string, intl,
[t.cEnaWx]) : Reflect.apply(string, intl, [t.XpeFYr])} onPress={value8} />;
return (
<View style={styles.container}>
{text}
<View style={styles.card}>
{r8}
<View style={styles.guildContent}>
{items4}
</View>
</View>
</View>
);
}
function _fun78178() { // fn#78178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:1690, offset: 0x01e1f488, size: 59 bytes, params: 1, frame: 13
return game == null || game.websites == null ? undefined : game.websites.find(function({category}) {
return category === require(dependencyMap[8]).ThirdPartyGameApplicationWebsiteCategory.DISCORD;
});
}
function _fun78180() { // fn#78180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:1876, offset: 0x01e1f4f6, size: 36 bytes, params: 1, frame: 9
if (env0_7 != null) {
_fun78181()();
}
}
function _fun78185() { // fn#78185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:2259, offset: 0x01e1f64c, size: 82 bytes, params: 1, frame: 14
return (env0_4 == null || env0_4.guild == null ? undefined : env0_4.guild.id) != null && GuildMembershipStore.isMember(env0_4.guild.id);
}
function _fun78186() { // fn#78186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:2368, offset: 0x01e1f69e, size: 195 bytes, params: 1, frame: 15
var trackActionBinding;
var value2;
var value3;
var guild;
var moduleValue;
var moduleValue2;
if (env0_4 != null) {
trackActionBinding = trackAction;
value2 = environment.__proto__;
value3 = undefined;
trackActionBinding((require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.JoinServer);
closeModal();
if (env0_8) {
guild = env0_4.guild;
if ((guild == null ? value3 : guild.id) != null) {
moduleValue2 = require(6947) /* metro dependency 6947: transitionToGuildNative */;
moduleValue2.transitionToGuild(env0_4.guild.id);
} else {
moduleValue = require(10010) /* metro dependency 10010: DisplayedInviteActionCreators */;
moduleValue.showInvite(env0_4.code);
}
} else {
moduleValue = require(10010) /* metro dependency 10010: DisplayedInviteActionCreators */;
moduleValue.showInvite(env0_4.code);
}
}
}
function _fun78181() { // fn#78181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:1899, offset: 0x01e1f51a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun78183);
return _fun78184;
}
function* _fun78183() { // fn#78183, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10195:1919, offset: 0x01e1f549, size: 259 bytes, params: 1, frame: 21
var r5;
var binding;
var value3;
var findCodedLink;
var value4;
var url;
var codedLink;
var type;
var CodedLinkType;
var INVITE;
var binding2;
var property;
var code;
var value5;
var invite;
var banned;
var current;
var error;
let value = undefined;
if (false) {
return value;
}
reduciblePort32: while (true) {
exceptionLanding31: while (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_0;
value3 = binding(env4_2[9]);
findCodedLink = value3.findCodedLink;
value4 = environment.__proto__.__proto__.__proto__;
url = GuildMembershipStore.url;
codedLink = Reflect.apply(findCodedLink, value3, [url]);
if (codedLink == null) {
break reduciblePort32;
}
type = codedLink.type;
binding = env4_0;
CodedLinkType = binding(env4_2[10]).CodedLinkType;
INVITE = CodedLinkType.INVITE;
if (type !== INVITE) {
break reduciblePort32;
}
try {
binding = env4_1;
} catch (error) {
break exceptionLanding31;
}
try {
binding2 = env4_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding2[11];
} catch (error) {
break exceptionLanding31;
}
try {
value = binding(property);
} catch (error) {
break exceptionLanding31;
}
try {
code = codedLink.code;
} catch (error) {
break exceptionLanding31;
}
try {
value = value(code, 'game_profile');
} catch (error) {
break exceptionLanding31;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
break exceptionLanding31;
}
if (value5) {
return value;
}
try {
invite = value.invite;
} catch (error) {
break exceptionLanding31;
}
try {
banned = value.banned;
} catch (error) {
break exceptionLanding31;
}
try {
value = invite != null;
} catch (error) {
break exceptionLanding31;
}
reducibleJoin20: while (true) {
if (value) {
value = banned !== true;
r5 = value;
break reducibleJoin20;
}
r5 = value;
break reducibleJoin20;
}
if (r5) {
try {
binding = env3_5;
} catch (error) {
break exceptionLanding31;
}
try {
binding(invite);
} catch (error) {
break exceptionLanding31;
}
try {
} catch (error) {
break exceptionLanding31;
}
try {
current = View.current;
} catch (error) {
break exceptionLanding31;
}
try {
value = current == null;
} catch (error) {
break exceptionLanding31;
}
if (value) {
break reduciblePort32;
}
try {
} catch (error) {
break exceptionLanding31;
}
try {
current = View.current;
} catch (error) {
break exceptionLanding31;
}
try {
Reflect.apply(current, View, [invite]);
} catch (error) {
break exceptionLanding31;
}
break reduciblePort32;
}
break reduciblePort32;
}
break reduciblePort32;
}
}
@@ -0,0 +1,235 @@
/* Metro module 10158; source: modules/game_profile/native/components/GameProfileDetails.tsx; dependencies: [31, 27, 9588, 33, 4501, 697, 3853, 9991, 1244, 1909, 3826, 10159, 10168, 4573, 2] */
function _fun79155(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:6, offset: 0x01e46bd2, size: 613 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Pressable;
const env0_7 = (require(9588) /* metro dependency 9588: ContentInventoryConstants */).IGDB_ATTRIBUTION_LINK;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerText = {paddingHorizontal: PX_8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.borderWidth = 1;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object3.overflow = 'hidden';
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object2.detailsContainer = object3;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.detailsRow = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
padding: PX_12};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.detailsRowValue = {'flexDirection': 'column', 'flexShrink': 1, paddingLeft: PX_32};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.detailsRowBottomBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.platformsContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.linksContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileDetails.tsx');
exports.default = GameProfileDetails;
}
function GameProfileWebsiteButton({icon, action, title, trackAction, url}) { // fn#79156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:938, offset: 0x01e46e37, size: 160 bytes, params: 2, frame: 19
const value2 = env0_4.useCallback(_fun79157, [trackAction, action, url]);
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={title}
onPress={value2}
hitSlop={PX_4}
>
{icon}
</Pressable>
);
}
function GameProfileDetails({game, trackAction}) { // fn#79158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:1196, offset: 0x01e46f11, size: 314 bytes, params: 2, frame: 26
var r0;
var Text;
var intl;
const styles = useStyles();
const value2 = env0_4.useMemo(_fun79159, [styles.linksContainer, styles.platformsContainer, game, trackAction]);
if (value2.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'heading-sm/semibold', 'color': 'mobile-text-heading-primary',
style: styles.headerText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7OjmmH'])}</Text><View style={styles.detailsContainer}>{value2.map(_fun79166)}</View></View>;
}
return r0;
}
function _fun79157() { // fn#79157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:1040, offset: 0x01e46ed7, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
value.openURL(url);
trackAction(action);
}
function _fun79159() { // fn#79159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:1271, offset: 0x01e4704b, size: 1672 bytes, params: 1, frame: 24
var environment;
var push;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object;
var value34;
var moduleValue;
var dateFormat;
var Date;
var value35;
var date;
var object2;
var value43;
var object3;
var value48;
var object6;
if (game == null) {
return [];
}
const items2 = [];
gameBinding = game;
const value2 = undefined;
const r4 = gameBinding == null ? value2 : game.genres.map((require(9991) /* metro dependency 9991: SKUUtils */).getGenreText).join(', ');
if (r4 != null && r4 !== '') {
items2.push({label: game.genres.length !== 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pDgwYB) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mjFKqn),
value: r4});
}
let r3 = game == null ? value2 : game.getCompanyByRole((require(1909) /* metro dependency 1909: Server */).GameCompanyRole.PUBLISHER);
const value15 = r3.map(function(a0) {
return a0.name;
}).join(', ');
if (value15 != null && value15 !== '') {
items2.push({label: r3.length !== 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Hc7Enk) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4Byy/G']),
value: value15});
}
r3 = game == null ? value2 : game.getCompanyByRole((require(1909) /* metro dependency 1909: Server */).GameCompanyRole.DEVELOPER);
const value25 = r3.map(function(a0) {
return a0.name;
}).join(', ');
if (value25 != null && value25 !== '') {
items2.push({label: r3.length !== 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KATEJB) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.na3PT0),
value: value25});
}
const firstReleaseDate = game == null ? value2 : game.firstReleaseDate;
if (firstReleaseDate != null && firstReleaseDate !== '') {
push = items2.push;
object = {};
value34 = environment.__proto__;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3mPDT);
moduleValue = importAll(3826) /* metro dependency 3826: DateUtils */;
dateFormat = moduleValue.dateFormat;
Date = global.Date;
value35 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(firstReleaseDate);
object.value = Reflect.apply(dateFormat, moduleValue, [date instanceof Object ? date : value35, 'LL']);
Reflect.apply(push, items2, [object]);
}
const platforms = game == null ? value2 : game.platforms;
if (platforms != null && platforms.length > 0) {
push = items2.push;
object2 = {};
object2.label = game.platforms.length !== 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PNqxNe) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UxAag+']);
value43 = environment.__proto__;
object2.value = <View style={styles.platformsContainer}>{platforms.map(_fun79162)}</View>;
Reflect.apply(push, items2, [object2]);
}
let r9 = game == null || game.websites == null ? value2 : game.websites.map(_fun79163).filter(function(a0) {
return a0 != null;
});
r9 = r9 ?? [];
if (r9 != null && r9.length > 0) {
push = items2.push;
object3 = {};
value48 = environment.__proto__;
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Oj3o1/']);
object3.value = <View style={styles.linksContainer}>{r9.map(_fun79165)}</View>;
Reflect.apply(push, items2, [object3]);
}
if (items2.length > 0) {
push = items2.push;
object6 = {};
value = environment.__proto__;
object6.label = intl.string(t['BwQ+9e']);
object6.value = intl.format(t.XPFZVl, {igdbLink: IGDB_ATTRIBUTION_LINK});
Reflect.apply(push, items2, [object6]);
}
return items2;
}
function _fun79166(a0, a1) { // fn#79166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:3284, offset: 0x01e477b6, size: 283 bytes, params: 3, frame: 22
var r6;
let value = environment.__proto__;
const items2 = [styles.detailsRow];
items2[1] = env0_3.length > 1 && a1 < env0_3.length - 1 ? styles.detailsRowBottomBorder : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/medium" color="text-subtle" lineClamp={1}>{a0.label}</Text>;
if (typeof a0.value === 'string') {
value = a0.value;
value = <Text variant="text-sm/normal" color="text-subtle" lineClamp={1} style={styles.detailsRowValue}>{value}</Text>;
r6 = value;
} else {
r6 = a0.value;
}
return (
<View style={items2} key={a0.label}>
{text}
{r6}
</View>
);
}
function _fun79162(a0) { // fn#79162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:2369, offset: 0x01e476d3, size: 93 bytes, params: 2, frame: 18
const GameUpdatePlatformIcon = (require(10159) /* metro dependency 10159: GameUpdatePlatformIcon */).GameUpdatePlatformIcon;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
return (
<GameUpdatePlatformIcon
platform={a0}
size="md"
color={ICON_SUBTLE}
key={a0}
/>
);
}
function _fun79163(a0) { // fn#79163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:2530, offset: 0x01e47730, size: 59 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(10168) /* metro dependency 10168: getGameProfileWebsiteData */;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
return value(a0, ICON_SUBTLE);
}
function _fun79165({title, icon, action, url}) { // fn#79165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10344:2734, offset: 0x01e4776b, size: 75 bytes, params: 2, frame: 17
return (
<GameProfileWebsiteButton
icon={icon}
action={action}
title={title}
url={url}
trackAction={trackAction}
key={url}
/>
);
}
@@ -0,0 +1,40 @@
/* Metro module 10177; source: modules/game_profile/native/components/GameProfileGameClaimCta.tsx; dependencies: [5, 31, 661, 33, 9963, 6906, 1909, 4578, 1244, 2] */
function _fun79195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10363:6, offset: 0x01e48835, size: 180 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).RelativeMarketingURLs;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileGameClaimCta.tsx');
exports.default = GameProfileGameClaimCta;
}
function GameProfileGameClaimCta({game, trackAction}) { // fn#79196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10363:272, offset: 0x01e488e9, size: 217 bytes, params: 2, frame: 20
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value4 = env0_4.useCallback(env0_3(_fun79198), [trackAction]);
const r2 = game.linkedApplications?.some(function({type}) {
return type === require(dependencyMap[6]).GameLinkTypes.OFFICIAL;
});
return r2 == null ? <Button variant="secondary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['mqg+to'])} onPress={value4} /> : r2 ? null : <Button variant="secondary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['mqg+to'])} onPress={value4} />;
}
function* _fun79198() { // fn#79198, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10363:356, offset: 0x01e489cd, size: 112 bytes, params: 1, frame: 15
if (true) {
value = environment.__proto__;
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var GameProfileTrackActionActions = binding(binding2[4]).GameProfileTrackActionActions;
var ClaimGame = GameProfileTrackActionActions.ClaimGame;
require(ClaimGame);
var value3 = env2_1(binding2[5]);
var redirectDeveloperPortalWithHandoffToken = value3.redirectDeveloperPortalWithHandoffToken;
var DEVELOPER_PORTAL_APPLICATIONS_GAME_IDENTITY = env2_5.DEVELOPER_PORTAL_APPLICATIONS_GAME_IDENTITY;
yield Reflect.apply(redirectDeveloperPortalWithHandoffToken, value3,
[DEVELOPER_PORTAL_APPLICATIONS_GAME_IDENTITY]);
}
}
@@ -0,0 +1,160 @@
/* Metro module 9990; source: modules/game_profile/native/components/GameProfileHeader.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 9991, 1423, 4589, 9992, 4573, 2] */
function _fun78091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10176:6, offset: 0x01e188a6, size: 748 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWEST};
const PX_80 = (importDefault(697) /* metro dependency 697: native */).space.PX_80;
object2.artHero = {'width': '100%', 'position': 'absolute', 'top': 0, 'bottom': null, 'left': 0, 'right': 0,
bottom: -PX_80};
object2.artHeroImage = {'height': '100%', 'width': '100%', 'resizeMode': 'cover'};
object2.artHeroGradient = {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0};
const object3 = {'paddingTop': null, 'paddingHorizontal': null, 'gap': null, 'flexDirection': 'row',
'alignItems': 'flex-end', 'maxWidth': 520, 'alignSelf': 'center', 'width': '100%'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.paddingTop = PX_32;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.gap = PX_12;
object2.headerContent = object3;
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object8, SHADOW_LOW, undefined);
object2.shadowContainer = object8;
const object9 = {'width': 85, 'height': 114, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object9.backgroundColor = BACKGROUND_BASE_LOW;
object2.coverContainer = object9;
const object10 = {'width': 85, 'height': 85, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object10.backgroundColor = BACKGROUND_BASE_LOW;
object2.iconContainer = object10;
object2.image = {'width': '100%', 'height': '100%'};
object2.titleContainer = {'flex': 1, 'flexDirection': 'column', 'alignItems': 'flex-start'};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.textShadow = {textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}, textShadowRadius: 1};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function GameProfileHeaderTsx1(){const{effectiveScrollY}=this.__closure;return{top:-Math.max(0,-effectiveScrollY.get())};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileHeader.tsx');
exports.default = GameProfileHeader;
}
function GameProfileHeader({game, scrollY, onHeightMeasured}) { // fn#78092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10176:1382, offset: 0x01e18b92, size: 1071 bytes, params: 2, frame: 33
var object4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object2;
var object3;
const env0_3 = undefined;
const styles = useStyles();
let binding = env0_4;
const property = env0_3(binding.useState(function() {
var Math = global.Math;
return Math.random();
}), 1)[0];
let r10 = scrollY ?? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = GameProfileHeaderX;
closure.__closure = {effectiveScrollY: r10};
closure.__workletHash = 1177397229282;
closure.__initData = env0_10;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const name = game?.name;
const r17 = game == null ? undefined : game.genres.map((require(9991) /* metro dependency 9991: SKUUtils */).getGenreText).join(', ');
const l30Rank = game?.l30Rank;
binding = env0_4;
const value10 = binding.useMemo(_fun78095, [game, property]);
const value11 = binding.useMemo(_fun78096, [game]);
const value12 = binding.useMemo(_fun78097, [game]);
object4 = {style: styles.container, onLayout: binding.useCallback(function(a0) {
if (onHeightMeasured != null) {
onHeightMeasured(a0.nativeEvent.layout.height);
}
}, [onHeightMeasured])};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View2 style={[styles.artHero,
value7]}>{value10 != null && <Image source={{uri: value10}} style={styles.artHeroImage} />}{((Component) => <Component colors={['rgba(0,0,0,0.3)',
styles.container.backgroundColor]} style={styles.artHeroGradient} />)(importDefault(4589) /* metro dependency 4589 */)}</View2>;
if (value11 != null) {
object3 = {};
object3.style = styles.coverContainer;
object3.children = <Image source={{uri: value11}} style={styles.image} />;
r10 = object3;
} else {
object2 = {};
object2.style = styles.iconContainer;
object2.children = value12 != null && <Image source={{uri: value12}} style={styles.image} />;
r10 = object2;
}
const view2 = <View style={styles.shadowContainer}><View {...r10} /></View>;
const items6 = [l30Rank != null && ((Component) => <Component rank={l30Rank} />)(importDefault(9992) /* metro dependency 9992: GameProfileRankPill */)];
items6[1] = <Text variant="heading-xxl/semibold" color="text-overlay-light" lineClamp={2} style={styles.textShadow}>{name}</Text>;
items6[2] = r17 != null ? r17 === '' ? null : <Text variant="text-md/normal" color="text-overlay-light" lineClamp={2} style={styles.textShadow}>{r17}</Text> : null;
return (
<View {...object4}>
{view}
<View style={styles.headerContent}>
{view2}
<View style={styles.titleContainer}>
{items6}
</View>
</View>
</View>
);
}
function GameProfileHeaderX() { // fn#78094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10176:1579, owner: GameProfileHeader.x, offset: 0x01e18fc1, size: 51 bytes, params: 1, frame: 14
const Math = global.Math;
const max = Math.max;
const binding = env0_3;
const get = binding.get;
return {top: -Reflect.apply(max, Math, [0, -Reflect.apply(get, binding, [])])};
}
function _fun78095() { // fn#78095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10176:1833, offset: 0x01e18ff4, size: 224 bytes, params: 1, frame: 16
var r0;
var value4;
var defaultImport;
var getGameAssetURL;
let gameBinding = game;
const value2 = null;
const value3 = undefined;
if (value2 != (value2 == gameBinding ? value3 : game.bannerHash)) {
value4 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGameAssetURL = defaultImport.getGameAssetURL;
gameBinding = game;
r0 = Reflect.apply(getGameAssetURL, defaultImport, [{id: gameBinding.id, hash: gameBinding.bannerHash,
size: 1024,
keepAspectRatio: true}]);
} else {
r0 = value2 != (value2 == game ? value3 : game.screenshotUrls) && game.screenshotUrls.length > 0 ? game.screenshotUrls[global.Math.floor(env0_2 * game.screenshotUrls.length)] : value2;
}
return r0;
}
function _fun78096() { // fn#78096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10176:2104, offset: 0x01e190d4, size: 34 bytes, params: 1, frame: 10
return game?.getCoverURL();
}
function _fun78097() { // fn#78097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10176:2158, offset: 0x01e190f6, size: 38 bytes, params: 1, frame: 12
return game?.getIconURL(114);
}
@@ -0,0 +1,149 @@
/* Metro module 10006; source: modules/game_profile/native/components/GameProfileLinkAccount.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 6774, 566, 9963, 4573, 1244, 5475, 1305, 4578, 10007, 2] */
function _fun78168(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10192:6, offset: 0x01e1e22b, size: 691 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerText = {paddingHorizontal: PX_8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.borderWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.gap = PX_16;
object2.card = object3;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.cardImagesContainer = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center', 'alignSelf': 'center',
gap: PX_8};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.ellipseGroup = {'flexDirection': 'row', 'justifyContent': 'space-between', gap: PX_4};
const object5 = {'width': 4, 'height': 4, 'backgroundColor': null, 'opacity': 0.3};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object5.backgroundColor = MOBILE_TEXT_HEADING_PRIMARY;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.ellipse = object5;
const object6 = {'width': 48, 'height': 48};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.cardImageApplication = object6;
const object10 = {'gap': null, 'alignSelf': 'center', 'flexDirection': 'column', 'alignItems': 'center',
'justifyContent': 'center'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.gap = PX_4;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object10.paddingHorizontal = PX_24;
object2.cardContent = object10;
object2.cardText = {textAlign: 'center'};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileLinkAccount.tsx');
exports.default = GameProfileLinkAccount;
}
function GameProfileLinkAccount({game, trackAction, analyticsLocations}) { // fn#78169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10192:1056, offset: 0x01e1e4de, size: 1073 bytes, params: 2, frame: 33
var r7;
var value4;
var iconSource;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items6;
var items2;
var ellipse;
var items3;
var items4;
var cardText;
var items5;
var Button;
const styles = useStyles();
const {fetched, hasAlreadyLinked, canStartAuthorization, startAuthorization,
connectionApp} = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(game);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const binding = env0_3;
const useCallback = binding.useCallback;
if (fetched) {
value4 = null;
if (value4 == connectionApp) {
return null;
}
if (canStartAuthorization) {
if (hasAlreadyLinked) {
return null;
}
if (value4 == currentUser) {
return null;
}
iconSource = connectionApp.getIconSource(48);
var viewBindingProps = {style: styles.container};
string = intl.string;
items6 = [<Text variant="heading-sm/semibold" color="mobile-text-heading-primary" style={styles.headerText}>{Reflect.apply(string,
intl, [t['VDAhr+']])}</Text>];
var viewBindingProps2 = {style: styles.card};
if (value4 != iconSource) {
var viewBinding2Props = {style: styles.cardImagesContainer};
items2 = [((Component) => <Component source={iconSource} style={styles.cardImageApplication} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
var viewBinding2Props2 = {style: styles.ellipseGroup};
ellipse = styles.ellipse;
items3 = [<View style={ellipse} />];
ellipse = styles.ellipse;
items3[1] = <View style={ellipse} />;
ellipse = styles.ellipse;
items3[2] = <View style={ellipse} />;
items2[1] = <View {...viewBinding2Props2}>{items3}</View>;
items2[2] = ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} user={currentUser} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar);
r7 = <View {...viewBinding2Props}>{items2}</View>;
} else {
r7 = value4;
}
items4 = [r7];
var viewBinding3Props = {style: styles.cardContent};
cardText = styles.cardText;
items5 = [<Text variant="heading-md/semibold" color="mobile-text-heading-primary" style={cardText}>{intl.formatToPlainString(t.hUbQT2,
{gameName: connectionApp.name})}</Text>];
cardText = styles.cardText;
string = intl.string;
items5[1] = <Text variant="text-sm/medium" color="text-default" style={cardText}>{Reflect.apply(string,
intl,
[t['JKqu+4']])}</Text>;
items4[1] = <View {...viewBinding3Props}>{items5}</View>;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items4[2] = <Button variant="secondary" size="md" text={Reflect.apply(string, intl,
[t.jynBQ5])} onPress={Reflect.apply(useCallback, binding, [function() {
trackAction(require(dependencyMap[8]).GameProfileTrackActionActions.LinkAccount);
startAuthorization({analyticsLocations: analyticsLocations});
}, [trackAction, startAuthorization,
analyticsLocations]])} icon={((ExperimentalGameControllerLinkIcon) => <ExperimentalGameControllerLinkIcon size="sm" />)((require(10007) /* metro dependency 10007: ExperimentalGameControllerLinkIcon */).ExperimentalGameControllerLinkIcon)} />;
items6[1] = <View {...viewBindingProps2}>{items4}</View>;
return (
<View {...viewBindingProps}>
{items6}
</View>
);
}
}
return null;
}
@@ -0,0 +1,390 @@
/* Metro module 9993; source: modules/game_profile/native/components/GameProfileMedia.tsx; dependencies: [57, 31, 27, 482, 33, 4501, 697, 9963, 9544, 9543, 478, 4141, 2] */
function _fun78110(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:6, offset: 0x01e1acd9, size: 549 bytes, params: 8, frame: 22
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
const env0_7 = value.Image;
const env0_8 = value.Pressable;
const env0_9 = (require(482) /* metro dependency 482: Constants */).NOOP;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = -PX_16;
object5.container = object6;
object5.scrollView = {'flexDirection': 'row', 'overflow': 'visible'};
const object7 = {};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object7.gap = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingHorizontal = PX_16;
object5.scrollViewContent = object7;
const object8 = {'maxWidth': 366, 'maxHeight': 200, 'borderRadius': null, 'overflow': 'hidden'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object8, SHADOW_HIGH, undefined);
object5.mediaItem = object8;
object5.mediaImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object5.mediaVideo = {'width': '100%', 'height': '100%', backgroundColor: BLACK};
const env0_11 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileMedia.tsx');
exports.default = GameProfileMedia;
}
function ImageItem({url, index, sources, trackAction, width, height, onScrollToIndex, setMediaModalOpen}) { // fn#78111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:714, offset: 0x01e1aefe, size: 246 bytes, params: 2, frame: 25
const env0_4 = setMediaModalOpen;
const styles = useStyles();
return (
<Pressable
ref={env0_4.useRef(null)}
style={[styles.mediaItem, {width: width, height: height}]}
onPress={env0_4.useCallback(_fun78112, [sources, index, trackAction, onScrollToIndex, setMediaModalOpen])}
>
<Image source={{uri: url}} style={styles.mediaImage} />
</Pressable>
);
}
function TrailerItem({url, posterUrl, active, index, sources, trackAction, width, height, onScrollToIndex, setMediaModalOpen}) { // fn#78115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:1256, offset: 0x01e1b0ae, size: 561 bytes, params: 2, frame: 35
const env0_3 = trackAction;
const env0_4 = onScrollToIndex;
const styles = useStyles();
let binding = env0_4;
let useRef = binding.useRef;
const value3 = Reflect.apply(useRef, binding, [null]);
const env0_7 = env0_4.useRef(0);
const [property, env0_8] = env0_3(env0_4.useState(0), 2);
const value6 = env0_4.useCallback(_fun78116, []);
binding = env0_4;
useRef = binding.useRef;
const videoModule = require(9543) /* metro dependency 9543: Video */;
const value7 = Reflect.apply(useRef, binding, [videoModule.createVideoControls(NOOP)]);
let current = value7.current;
current.useSubscribe(value6, NOOP, NOOP);
env0_4.useEffect(_fun78117, [active]);
const value8 = env0_4.useCallback(_fun78119, [trackAction, sources, index, onScrollToIndex, setMediaModalOpen]);
const items2 = [styles.mediaItem];
items2[1] = {width: width, height: height};
const VideoComponent = videoModule.VideoComponent;
const object = {uri: url};
current = value7.current;
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
return (
<Pressable
ref={value3}
style={items2}
onPress={value8}
>
<VideoComponent
style={styles.mediaVideo}
source={object}
poster={posterUrl}
paused={!active}
muted
resizeMode="cover"
pauseWhileAppInactive
controls={current}
key={platformUtilsModule.isAndroid() ? 'render-' + property : undefined}
/>
</Pressable>
);
}
function GameProfileMedia({game, trackAction}) { // fn#78122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:2269, offset: 0x01e1b42c, size: 603 bytes, params: 2, frame: 25
const styles = useStyles();
let [property, env0_3] = env0_3Binding(env0_4Binding.useState(0), 2);
var [env0_4, env0_5] = env0_3Binding(env0_4Binding.useState(0), 2);
const [env0_6, env0_7] = env0_3Binding(env0_4Binding.useState(false), 2);
const value9 = env0_4Binding.useRef(null);
const value10 = env0_4Binding.useCallback(_fun78123, []);
const value11 = env0_4Binding.useMemo(function() {
var r5;
var r0;
var property;
var items;
var value2;
var value3;
if (game == null) {
r0 = [];
} else {
property = game.trailers;
r5 = property ?? [];
value2 = r5.map(_fun78125);
items = [];
value3 = arraySpread(items, value2, 0, r5);
property = game.screenshotUrls;
arraySpread(items, (property ?? []).map(_fun78126), value3, r5);
r0 = items;
}
return r0;
}, [game]);
const value12 = env0_4Binding.useMemo(_fun78127, [property]);
const env0_11 = env0_4Binding.useMemo(_fun78128, [value12]);
const env0_12 = env0_4Binding.useMemo(_fun78129, [value11]);
const value13 = env0_4Binding.useMemo(_fun78131, [value11, property, value12]);
const value14 = env0_4Binding.useCallback(_fun78133, [value13]);
const env0_14 = env0_4Binding.useCallback(_fun78134, [value13]);
return value11.length === 0 ? null : <View style={styles.container} onLayout={value10}><ScrollView ref={value9} horizontal showsHorizontalScrollIndicator={false} style={styles.scrollView} contentContainerStyle={styles.scrollViewContent} decelerationRate="fast" snapToOffsets={value13} snapToStart={false} snapToEnd={false} onMomentumScrollEnd={value14}>{value11.map(_fun78135)}</ScrollView></View>;
}
function _fun78112() { // fn#78112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:873, offset: 0x01e1aff4, size: 167 bytes, params: 1, frame: 15
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const ClickImage = GameProfileTrackActionActions.ClickImage;
trackActionBinding(ClickImage);
setMediaModalOpen(true);
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: sources,
initialIndex: index, originViewOrOriginLayout: env0_5.current, analyticsSource: 'game_profile',
openAs: 'action-sheet', onIndexChange: function(a0) {
return onScrollToIndex(a0);
}, onClose: function() {
return setMediaModalOpen(false);
}});
}
function _fun78116(a0) { // fn#78116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:1491, offset: 0x01e1b2df, size: 20 bytes, params: 2, frame: 2
env0_7.current = a0;
}
function _fun78117() { // fn#78117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:1599, offset: 0x01e1b2f3, size: 95 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__;
value = require(478) /* metro dependency 478: PlatformUtils */;
if (value.isAndroid()) {
if (active) {
env0_9.current.seek(0);
} else {
env0_8(function(a0) {
return a0 + 1;
});
}
} else {
env0_9.current.seek(0);
}
}
function _fun78119() { // fn#78119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:1687, offset: 0x01e1b352, size: 181 bytes, params: 1, frame: 15
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const ClickTrailer = GameProfileTrackActionActions.ClickTrailer;
trackActionBinding(ClickTrailer);
setMediaModalOpen(true);
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: sources,
initialIndex: index, initialIndexVideoStartTime: env0_7.current, originViewOrOriginLayout: env0_6.current,
analyticsSource: 'game_profile', openAs: 'action-sheet', onIndexChange: function(a0) {
return onScrollToIndex(a0);
}, onClose: function() {
return setMediaModalOpen(false);
}});
}
function _fun78124() { // fn#78124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:2542, offset: 0x01e1b6ab, size: 116 bytes, params: 1, frame: 16
var r5;
var r4;
var r0;
var items2;
var value2;
var value3;
if (game == null) {
r0 = [];
} else {
r5 = game.trailers ?? [];
value2 = r5.map(_fun78125);
items2 = [];
value3 = arraySpread(items2, value2, 0, r5);
r4 = game.screenshotUrls ?? [];
arraySpread(items2, r4.map(function(a0) {
return {type: 'image', url: a0};
}), value3, r5);
r0 = items2;
}
return r0;
}
function _fun78127() { // fn#78127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:2850, offset: 0x01e1b7b3, size: 123 bytes, params: 1, frame: 19
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const min = Math2.min;
const binding = env0_2;
let value = environment.__proto__;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
value = binding - PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
value = Reflect.apply(min, Math2, [366, value - 2 * PX_16]);
return Reflect.apply(max, Math, [0, value]);
}
function _fun78128() { // fn#78128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:2945, offset: 0x01e1b82e, size: 45 bytes, params: 1, frame: 13
const Math = global.Math;
return Math.min(200, env0_10 / 1.83);
}
function _fun78129() { // fn#78129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:2989, offset: 0x01e1b85b, size: 28 bytes, params: 1, frame: 11
return env0_9.map(_fun78130);
}
function _fun78131() { // fn#78131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:3273, offset: 0x01e1b90d, size: 142 bytes, params: 1, frame: 17
const binding = env0_2;
const binding2 = env0_10;
const value2 = binding - binding2;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const value4 = value2 - PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_0 = (value4 - PX_16) / 2;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const env0_1 = binding2 + PX_12;
return env0_9.map(_fun78132);
}
function _fun78133(a0) { // fn#78133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:3428, offset: 0x01e1b9c8, size: 164 bytes, params: 2, frame: 18
var r3;
var r4;
var r5;
var r2;
var x;
var Math;
var abs;
var binding;
var value3;
var value4;
var value5;
var value6;
let length = env0_13.length;
const value2 = 0;
if (value2 !== length) {
x = a0.nativeEvent.contentOffset.x;
Math = global.Math;
abs = Math.abs;
binding = env0_13;
value3 = Reflect.apply(abs, Math, [binding[value2] - x]);
length = binding.length;
value4 = 1;
if (value4 < length) {
r3 = value3;
r4 = value2;
r5 = value4;
while (true) {
Math = global.Math;
value5 = Math.abs(env0_13[r5] - x);
if (value5 < r3) {
r3 = value5;
r4 = r5;
}
value6 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
length = env0_13.length;
if (value6 < length) {
r5 = value6;
continue;
}
r2 = r4;
break;
}
} else {
r2 = value2;
}
env0_5(r2);
}
}
function _fun78134(a0) { // fn#78134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:3600, offset: 0x01e1ba6c, size: 69 bytes, params: 2, frame: 14
const current = env0_8.current;
if (current != null) {
current.scrollTo({'x': null, 'y': 0, 'animated': false, x: env0_13[a0]});
}
env0_5(a0);
}
function _fun78135(a0, a1) { // fn#78135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:3974, offset: 0x01e1bab1, size: 311 bytes, params: 3, frame: 19
var r0;
var value;
var object2;
var url;
if (a0.type === 'trailer') {
value = environment.__proto__;
object2 = {};
url = a0.url;
object2.url = url;
object2.posterUrl = a0.posterUrl;
object2.active = !env0_6 && env0_4 === a1;
object2.index = a1;
object2.sources = env0_12;
object2.trackAction = trackAction;
object2.width = env0_10;
object2.height = env0_11;
object2.onScrollToIndex = env0_14;
object2.setMediaModalOpen = env0_7;
url = a0.url;
value = '' + url + '-' + a1;
value = <TrailerItem {...object2} key={value} />;
r0 = value;
} else {
value = environment.__proto__;
object2 = {};
url = a0.url;
object2.url = url;
object2.index = a1;
object2.sources = env0_12;
object2.trackAction = trackAction;
object2.width = env0_10;
object2.height = env0_11;
object2.onScrollToIndex = env0_14;
object2.setMediaModalOpen = env0_7;
url = a0.url;
value = '' + url + '-' + a1;
value = <ImageItem {...object2} key={value} />;
r0 = value;
}
return r0;
}
function _fun78125(a0) { // fn#78125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:2610, offset: 0x01e1b71f, size: 129 bytes, params: 2, frame: 23
const object2 = {type: 'trailer'};
const value = environment.__proto__.__proto__;
object2.url = (require(4141) /* metro dependency 4141: StoreUtils */).getAssetURL(a0.application_id, a0.id, 1920,
'mp4');
object2.posterUrl = (require(4141) /* metro dependency 4141: StoreUtils */).getAssetURL(a0.application_id, a0.id,
1920, 'webp');
return object2;
}
function _fun78130(a0, a1) { // fn#78130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:3000, offset: 0x01e1b877, size: 150 bytes, params: 3, frame: 5
var r0;
var object2;
var url;
if (a0.type === 'trailer') {
object2 = {};
url = a0.url;
object2.uri = url;
object2.mediaIndex = a1;
object2.width = 1920;
object2.height = 1080;
url = a0.url;
object2.videoURI = url;
object2.thumbnail = {'width': 1920, 'height': 1080, uri: a0.posterUrl};
object2.accessoryType = 'embed';
object2.disableDownload = true;
r0 = object2;
} else {
r0 = {'uri': null, 'mediaIndex': null, 'width': 1920, 'height': 1080, 'accessoryType': 'embed',
'disableDownload': true, uri: a0.url, mediaIndex: a1};
}
return r0;
}
function _fun78132(a0, a1) { // fn#78132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10179:3373, offset: 0x01e1b99b, size: 45 bytes, params: 3, frame: 14
const Math = global.Math;
return Math.max(0, a1 * env0_1 - env0_0);
}
@@ -0,0 +1,178 @@
/* Metro module 10182; source: modules/game_profile/native/components/GameProfileNavigationHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 1423, 8554, 4573, 9992, 2] */
function _fun79236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10368:6, offset: 0x01e49dd3, size: 503 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.Image;
const env0_5 = value.View;
const StyleSheet = value.StyleSheet;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {'height': 56, 'paddingHorizontal': null, 'borderBottomWidth': null, 'borderBottomColor': null,
'overflow': 'hidden', 'justifyContent': 'center'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object5.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderBottomColor = BORDER_SUBTLE;
object3.headerContainer = object5;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.headerRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
const object6 = {'width': 32, 'height': 32};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.icon = object6;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.titleContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'minWidth': 0,
gap: PX_8};
object3.headerRight = {'flexDirection': 'row', 'alignItems': 'center'};
object3.rankPillContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
object3 = {code: 'function GameProfileNavigationHeaderTsx1(){const{headerRightProgress}=this.__closure;return{opacity:headerRightProgress.get()};}'};
object3 = {code: 'function GameProfileNavigationHeaderTsx2(){const{headerRightProgress}=this.__closure;return{opacity:1-headerRightProgress.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileNavigationHeader.tsx');
exports.default = GameProfileNavigationHeader;
}
function GameProfileNavigationHeader({game, application, headerRight}) { // fn#79237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10368:1139, offset: 0x01e49fca, size: 877 bytes, params: 2, frame: 42
var l30Rank;
var r18;
var r0;
var items5;
var items2;
var items3;
var value15;
var GameProfileRankPill;
var items4;
var View2;
var GameProfileRankPill2;
let value = undefined;
const styles = useStyles();
const value4 = headerRight != null;
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value4 ? 1 : 0);
const binding = value7;
binding.useEffect(_fun79238, [value4, value7]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = GameProfileNavigationHeaderX;
closure.__closure = {headerRightProgress: value7};
closure.__workletHash = 16001524280109;
closure.__initData = env0_10;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = GameProfileNavigationHeaderB;
closure.__closure = {headerRightProgress: value7};
closure.__workletHash = 5182160908530;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const value10 = binding.useMemo(_fun79241, [game, application]);
const r20 = (game == null ? value : game.name) ?? (application == null ? value : application.name);
if (r20 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.headerContainer};
items5 = [((BackgroundBlurFill) => <BackgroundBlurFill />)((require(8554) /* metro dependency 8554: native */).BackgroundBlurFill)];
var viewBindingProps2 = {style: styles.headerRow};
items2 = [value10 != null && <Image source={{uri: value10}} style={styles.icon} />];
var viewBinding2Props = {style: styles.titleContainer};
items3 = [((Heading) => <Heading variant="redesign/heading-18/bold" color="mobile-text-heading-primary" lineClamp={1}>{r20}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading)];
l30Rank = game == null ? value : game.l30Rank;
value15 = l30Rank != null;
if (value15) {
var viewBinding3Props = {style: styles.rankPillContainer};
GameProfileRankPill = importDefault(9992) /* metro dependency 9992: GameProfileRankPill */;
l30Rank = game.l30Rank;
items4 = [<GameProfileRankPill rank={l30Rank} compact />];
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [StyleSheet.absoluteFill, value9]};
GameProfileRankPill2 = importDefault(9992) /* metro dependency 9992: GameProfileRankPill */;
l30Rank = game.l30Rank;
items4[1] = <View2 {...view2Props}><GameProfileRankPill2 rank={l30Rank} /></View2>;
r18 = <View {...viewBinding3Props}>{items4}</View>;
} else {
r18 = value15;
}
items3[1] = r18;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
items2[2] = headerRight != null && ((View) => <View style={[styles.headerRight,
value8]}>{headerRight()}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
items5[1] = <View {...viewBindingProps2}>{items2}</View>;
value = <View {...viewBindingProps}>{items5}</View>;
r0 = value;
}
return r0;
}
function _fun79238() { // fn#79238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10368:1281, offset: 0x01e4a337, size: 76 bytes, params: 1, frame: 17
const binding = env0_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(result ? 1 : 0, {duration: 200})]);
}
function GameProfileNavigationHeaderB() { // fn#79240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10368:1521, owner: GameProfileNavigationHeader.b, offset: 0x01e4a383, size: 31 bytes, params: 1, frame: 10
const object2 = {};
object2.opacity = 1 - env0_3.get();
return object2;
}
function _fun79241() { // fn#79241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10368:1644, offset: 0x01e4a3a2, size: 244 bytes, params: 1, frame: 19
var r1;
var r0;
var applicationBinding;
var getIconURL;
const SUPPORTS_WEBP = (require(1423) /* metro dependency 1423: AvatarUtils */).SUPPORTS_WEBP;
var value4;
var defaultImport;
var getGameAssetURL;
var value;
let gameBinding = game;
const value2 = null;
const value3 = undefined;
if (value2 == (value2 == gameBinding ? value3 : game.iconHash)) {
applicationBinding = application;
if (value2 == applicationBinding) {
r1 = value3;
} else {
applicationBinding = application;
getIconURL = applicationBinding.getIconURL;
value = environment.__proto__;
value = 'png';
value = Reflect.apply(getIconURL, applicationBinding, [32, SUPPORTS_WEBP ? 'webp' : value]);
r1 = value;
}
r0 = value2 != r1 ? r1 : value2;
} else if (game.iconHash !== '') {
value4 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGameAssetURL = defaultImport.getGameAssetURL;
gameBinding = game;
value = 'png';
value = Reflect.apply(getGameAssetURL, defaultImport, [{id: gameBinding.id, hash: gameBinding.iconHash,
size: 32,
format: SUPPORTS_WEBP ? 'webp' : value}]);
r0 = value;
} else {
applicationBinding = application;
if (value2 == applicationBinding) {
r1 = value3;
} else {
applicationBinding = application;
getIconURL = applicationBinding.getIconURL;
value = environment.__proto__;
value = 'png';
value = Reflect.apply(getIconURL, applicationBinding, [32, SUPPORTS_WEBP ? 'webp' : value]);
r1 = value;
}
r0 = value2 != r1 ? r1 : value2;
}
return r0;
}
@@ -0,0 +1,53 @@
/* Metro module 9992; source: modules/game_profile/native/components/GameProfileRankPill.tsx; dependencies: [31, 27, 33, 4501, 697, 8653, 4573, 1244, 2] */
function _fun78108(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10178:6, offset: 0x01e1aa31, size: 362 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {flexDirection: 'row'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object.backgroundColor = WHITE;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.paddingHorizontal = PX_8;
object.alignItems = 'center';
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.gap = PX_4;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object, SHADOW_LOW, undefined);
const env0_6 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'flexDirection': 'row',
'alignItems': 'flex-end'}, gameRankPill: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileRankPill.tsx');
exports.default = GameProfileRankPill;
}
function GameProfileRankPill({rank, compact}) { // fn#78109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10178:554, offset: 0x01e1ab9b, size: 318 bytes, params: 2, frame: 25
compact = !(compact === undefined) && compact;
const styles = useStyles();
const TrophyIcon = (require(8653) /* metro dependency 8653: TrophyIcon */).TrophyIcon;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
const trophyIcon = <TrophyIcon size="xxs" color={BLACK} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.container}>
<View style={styles.gameRankPill}>
{trophyIcon}
<Text variant="text-xs/bold" color="black">
{(compact ? Reflect.apply(formatToPlainString, intl, [t.UA6RoE,
{rank: rank}]) : Reflect.apply(formatToPlainString, intl, [t.ehZXlZ,
{rank: rank}])).toUpperCase()}
</Text>
</View>
</View>
);
}
@@ -0,0 +1,41 @@
/* Metro module 10178; source: modules/game_profile/native/components/GameProfileReportButton.tsx; dependencies: [31, 33, 4080, 9963, 5080, 10179, 1962, 10179, 4578, 1244, 2] */
function _fun79200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10364:6, offset: 0x01e48a70, size: 142 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 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileReportButton.tsx');
exports.default = GameProfileReportButton;
}
function GameProfileReportButton({applicationId, trackAction}) { // fn#79201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10364:126, offset: 0x01e48afe, size: 171 bytes, params: 2, frame: 19
const value2 = env0_3.useCallback(_fun79202, [applicationId, trackAction]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Button
variant="secondary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qP2cXd)}
onPress={value2}
/>
);
}
function _fun79202() { // fn#79202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10364:213, offset: 0x01e48ba9, size: 160 bytes, params: 1, frame: 19
let value = environment.__proto__;
importDefault(dependencyMap[2]).hideActionSheet();
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = require(dependencyMap[3]).GameProfileTrackActionActions;
const Feedback = GameProfileTrackActionActions.Feedback;
trackActionBinding(Feedback);
value = importDefault(dependencyMap[4]);
const pushLazy = value.pushLazy;
const value3 = require(dependencyMap[6])(dependencyMap[5], dependencyMap.paths);
const object2 = {};
object2.applicationId = applicationId;
const MODAL_KEY = require(dependencyMap[7]).MODAL_KEY;
Reflect.apply(pushLazy, value, [value3, object2, MODAL_KEY]);
}
@@ -0,0 +1,293 @@
/* Metro module 9995; source: modules/game_profile/native/components/GameProfileReviews.tsx; dependencies: [31, 27, 33, 4501, 697, 9961, 3853, 9996, 9997, 9963, 1244, 9972, 4573, 4269, 9998, 10004, 9968, 9969, 2] */
function _fun78141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10181:6, offset: 0x01e1c002, size: 715 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.Pressable;
const env0_6 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerText = {paddingHorizontal: PX_8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.borderWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object3.overflow = 'hidden';
object2.reviewContainer = object3;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.reviewRow = {'height': 56, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', padding: PX_12};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object2.reviewRowNotLast = {borderBottomWidth: 1, borderBottomColor: BACKGROUND_MOD_SUBTLE};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.steamNameContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
const object5 = {'flexDirection': 'row', 'alignItems': 'flex-end', 'flexShrink': 1};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.paddingLeft = PX_32;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.gap = PX_4;
object2.steamRatingContainer = object5;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.opencriticRightContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const object6 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.opencriticTopCriticContainer = object6;
object2.opencriticTopCriticImage = {'width': 32, 'height': 32};
object2.opencriticTopCriticRatingContainer = {'position': 'absolute', 'top': 0, 'left': 1, 'right': 0, 'bottom': 0,
'alignItems': 'center', 'justifyContent': 'center'};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileReviews.tsx');
exports.default = GameProfileReviews;
}
function SteamReviewRow({url, showBorderBottom, trackAction, title, rating, ratingCount, isRecentRating}) { // fn#78142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10181:1290, offset: 0x01e1c2cd, size: 777 bytes, params: 2, frame: 32
var format;
var sgIoin;
var object2;
var value;
const styles = useStyles();
const value2 = (importDefault(9961) /* metro dependency 9961: useOpenExternalUrlFromGameProfile */)((importDefault(3853) /* metro dependency 3853: Linking */).openURL);
const value3 = (require(9996) /* metro dependency 9996: calculateSteamReviewScoreDescription */).calculateSteamReviewScoreDescription(rating,
ratingCount, isRecentRating);
const steamReviewScoreDescriptionColor = (require(9997) /* metro dependency 9997: GameProfileReviewUtils */).getSteamReviewScoreDescriptionColor(value3);
const binding = env0_3;
const useCallback = binding.useCallback;
let object = [value2, url, trackAction];
object = {onPress: Reflect.apply(useCallback, binding, [_fun78143, object]), accessibilityRole: 'link'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const YNC5Di = (require(1244) /* metro dependency 1244: indexNative */).t.YNC5Di;
object.accessibilityLabel = Reflect.apply(string, intl, [YNC5Di]);
object.style = [styles.reviewRow, showBorderBottom && styles.reviewRowNotLast];
const SteamNeutralIcon = (require(9972) /* metro dependency 9972: SteamNeutralIcon */).SteamNeutralIcon;
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
const steamNeutralIcon = <SteamNeutralIcon size="sm" color={ICON_STRONG} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.steamNameContainer}>{steamNeutralIcon}<Text variant="heading-sm/medium" color="mobile-text-heading-primary">{title}</Text></View>;
const text = <Text variant="text-sm/medium" color={steamReviewScoreDescriptionColor}>{(require(9997) /* metro dependency 9997: GameProfileReviewUtils */).getSteamReviewScoreDescriptionIntl(value3)}</Text>;
let r9 = ratingCount != null && value3 !== (require(4269) /* metro dependency 4269: GameDetectionTypes */).SteamReviewScoreDescription.NO_USER_REVIEWS;
if (r9) {
format = intl.format;
sgIoin = (require(1244) /* metro dependency 1244: indexNative */).t.sgIoin;
object2 = {};
object2.rating_count = ratingCount.toLocaleString();
value = Reflect.apply(format, intl, [sgIoin, object2]);
value = <Text variant="text-sm/medium" color="text-subtle">{value.toString()}</Text>;
r9 = value;
}
return (
<Pressable {...object}>
{view}
<View style={styles.steamRatingContainer}>
{text}
{r9}
</View>
</Pressable>
);
}
function OpenCriticReview({game, url, trackAction}) { // fn#78144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10181:2389, offset: 0x01e1c616, size: 1183 bytes, params: 2, frame: 39
var r9;
var object2;
var object7;
var object12;
var moduleValue4;
const styles = useStyles();
const r1 = game.reviews?.opencritic ?? ({topCriticRating: undefined, topCriticRatingCount: undefined,
tier: undefined});
const tier = r1.tier;
const r15 = r1.topCriticRating ?? -1;
const r14 = r1.topCriticRatingCount ?? -1;
const value6 = env0_3.useCallback(_fun78145,
[(importDefault(9961) /* metro dependency 9961: useOpenExternalUrlFromGameProfile */)((importDefault(3853) /* metro dependency 3853: Linking */).openURL),
url, trackAction]);
const r24 = tier != null ? (require(9998) /* metro dependency 9998: useGameProfileOpenCritic */).getOpenCriticTierText(tier) : '';
const {foregroundColor,
backgroundColor} = tier != null ? (require(9998) /* metro dependency 9998: useGameProfileOpenCritic */).getOpenCriticCircleRatingColor(tier) : {'foregroundColor': '',
'backgroundColor': ''};
const object3 = {onPress: value6, accessibilityRole: 'link'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aLNBAw);
object3.style = styles.reviewRow;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-sm/medium" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UxvER+'])}</Text>;
if (tier != null) {
var viewBinding2Props = {style: styles.opencriticTopCriticContainer, accessibilityLabel: r24,
accessibilityRole: 'image'};
object2 = {};
object2.uri = (require(9998) /* metro dependency 9998: useGameProfileOpenCritic */).getOpenCriticTierImage(tier);
r9 = <View {...viewBinding2Props}><Image source={object2} style={styles.opencriticTopCriticImage} accessible accessibilityLabel={r24} /></View>;
} else {
r9 = null;
}
const items2 = [r9];
if (tier != null) {
if (r15 > 0) {
if (r14 > 0) {
r9 = <View style={[styles.opencriticTopCriticContainer,
{backgroundColor: backgroundColor}]} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ub4YR1)} accessibilityRole="image">{((Component) => <Component rating={r15} strokeColor={foregroundColor} size={32} />)(importDefault(10004) /* metro dependency 10004: OpenCriticRatingCircle */)}<View style={styles.opencriticTopCriticRatingContainer}><Text variant="text-xs/bold" color="always-white">{global.Math.floor(r15)}</Text></View></View>;
} else {
r9 = null;
}
} else {
r9 = null;
}
} else {
r9 = null;
}
items2[1] = r9;
if (r15 <= 0) {
if (tier == null) {
moduleValue4 = require(9997) /* metro dependency 9997: GameProfileReviewUtils */;
r9 = <Text variant="text-xs/medium" color={moduleValue4.getSteamReviewScoreDescriptionColor((require(4269) /* metro dependency 4269: GameDetectionTypes */).SteamReviewScoreDescription.NO_USER_REVIEWS)}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0xYzpO'])}</Text>;
} else {
r9 = null;
}
} else if (r14 <= 0) {
if (tier == null) {
moduleValue4 = require(9997) /* metro dependency 9997: GameProfileReviewUtils */;
r9 = <Text variant="text-xs/medium" color={moduleValue4.getSteamReviewScoreDescriptionColor((require(4269) /* metro dependency 4269: GameDetectionTypes */).SteamReviewScoreDescription.NO_USER_REVIEWS)}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0xYzpO'])}</Text>;
} else {
r9 = null;
}
} else {
r9 = null;
}
items2[2] = r9;
return (
<Pressable {...object3}>
{text}
<View style={styles.opencriticRightContainer}>
{items2}
</View>
</Pressable>
);
}
function GameProfileReviews({game, trackAction}) { // fn#78146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10181:4137, offset: 0x01e1caf5, size: 968 bytes, params: 2, frame: 41
var r11;
var r1;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items3;
var items2;
const styles = useStyles();
const value4 = (require(9968) /* metro dependency 9968: useSteamWebsiteUrl */).useSteamWebsiteUrl(game?.id);
const opencriticUrl = game?.opencriticUrl;
if (game == null) {
return null;
}
const steamReleaseStatus = game.steamReleaseStatus;
const SteamReleaseStatus = (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus;
const RETIRED_ABANDONED = SteamReleaseStatus.RETIRED_ABANDONED;
const r14 = steamReleaseStatus !== RETIRED_ABANDONED && value4 != null;
const steam = game.reviews?.steam;
const calculateSteamReviewScoreDescriptionModule = require(9996) /* metro dependency 9996: calculateSteamReviewScoreDescription */;
const r10 = r14 && calculateSteamReviewScoreDescriptionModule.calculateSteamReviewScoreDescription(steam?.recentRating,
steam?.recentRatingCount,
true) !== (require(4269) /* metro dependency 4269: GameDetectionTypes */).SteamReviewScoreDescription.NO_USER_REVIEWS;
const canShowLocalizedSteamReview2 = (require(9997) /* metro dependency 9997: GameProfileReviewUtils */).canShowLocalizedSteamReview(steam);
const value9 = steam == null;
const r21 = canShowLocalizedSteamReview2 ? value9 ? undefined : steam.localizedRating : value9 ? undefined : steam.rating;
const value10 = steam == null;
const r20 = canShowLocalizedSteamReview2 ? value10 ? undefined : steam.localizedRatingCount : value10 ? undefined : steam.ratingCount;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r24 = canShowLocalizedSteamReview2 ? t['aWb+V4'] : t['8e4LiB'];
const r13 = game.reviews?.opencritic != null && opencriticUrl != null;
if (r14) {
var viewBindingProps = {style: styles.container};
items3 = [<Text variant="heading-sm/semibold" color="mobile-text-heading-primary" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GaAQXP)}</Text>];
var viewBinding2Props = {style: styles.reviewContainer};
if (r10) {
if (value4 != null) {
r11 = <SteamReviewRow url={value4} showBorderBottom={r14 || r13} trackAction={trackAction} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MQGNsN)} rating={steam?.recentRating} ratingCount={steam?.recentRatingCount} isRecentRating />;
} else {
r11 = null;
}
} else {
r11 = null;
}
items2 = [r11];
r11 = r14 && value4 != null ? <SteamReviewRow url={value4} showBorderBottom={r13} trackAction={trackAction} title={(require(1244) /* metro dependency 1244: indexNative */).intl.string(r24)} rating={r21} ratingCount={r20} isRecentRating={false} /> : null;
items2[1] = r11;
r11 = r13 && opencriticUrl != null ? <OpenCriticReview game={game} url={opencriticUrl} trackAction={trackAction} /> : null;
items2[2] = r11;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
r1 = <View {...viewBindingProps}>{items3}</View>;
} else if (r10) {
var viewBindingProps = {style: styles.container};
items3 = [<Text variant="heading-sm/semibold" color="mobile-text-heading-primary" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GaAQXP)}</Text>];
var viewBinding2Props = {style: styles.reviewContainer};
if (r10) {
if (value4 != null) {
r11 = <SteamReviewRow url={value4} showBorderBottom={r14 || r13} trackAction={trackAction} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MQGNsN)} rating={steam?.recentRating} ratingCount={steam?.recentRatingCount} isRecentRating />;
} else {
r11 = null;
}
} else {
r11 = null;
}
items2 = [r11];
r11 = r14 && value4 != null ? <SteamReviewRow url={value4} showBorderBottom={r13} trackAction={trackAction} title={(require(1244) /* metro dependency 1244: indexNative */).intl.string(r24)} rating={r21} ratingCount={r20} isRecentRating={false} /> : null;
items2[1] = r11;
r11 = r13 && opencriticUrl != null ? <OpenCriticReview game={game} url={opencriticUrl} trackAction={trackAction} /> : null;
items2[2] = r11;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
r1 = <View {...viewBindingProps}>{items3}</View>;
} else if (r13) {
var viewBindingProps = {style: styles.container};
items3 = [<Text variant="heading-sm/semibold" color="mobile-text-heading-primary" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GaAQXP)}</Text>];
var viewBinding2Props = {style: styles.reviewContainer};
if (r10) {
if (value4 != null) {
r11 = <SteamReviewRow url={value4} showBorderBottom={r14 || r13} trackAction={trackAction} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MQGNsN)} rating={steam?.recentRating} ratingCount={steam?.recentRatingCount} isRecentRating />;
} else {
r11 = null;
}
} else {
r11 = null;
}
items2 = [r11];
r11 = r14 && value4 != null ? <SteamReviewRow url={value4} showBorderBottom={r13} trackAction={trackAction} title={(require(1244) /* metro dependency 1244: indexNative */).intl.string(r24)} rating={r21} ratingCount={r20} isRecentRating={false} /> : null;
items2[1] = r11;
r11 = r13 && opencriticUrl != null ? <OpenCriticReview game={game} url={opencriticUrl} trackAction={trackAction} /> : null;
items2[2] = r11;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
r1 = <View {...viewBindingProps}>{items3}</View>;
} else {
r1 = null;
}
return r1;
}
function _fun78143() { // fn#78143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10181:1561, offset: 0x01e1c5d6, size: 64 bytes, params: 1, frame: 13
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const SteamReviews = GameProfileTrackActionActions.SteamReviews;
trackActionBinding(SteamReviews);
env0_2(url);
}
function _fun78145() { // fn#78145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10181:2710, offset: 0x01e1cab5, size: 64 bytes, params: 1, frame: 13
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const OpenCriticReviews = GameProfileTrackActionActions.OpenCriticReviews;
trackActionBinding(OpenCriticReviews);
env0_2(url);
}
@@ -0,0 +1,326 @@
/* Metro module 9960; source: modules/game_profile/native/components/GameProfileScreen.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4578, 1244, 7326, 9961, 3853, 9963, 5198, 4017, 9964, 4504, 9966, 9971, 4080, 9988, 6275, 6277, 9989, 10182, 6515, 2] */
function _fun77963(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:6, offset: 0x01e14195, size: 417 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.ActivityIndicator;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.loadingContainer = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'minHeight': 300,
backgroundColor: BACKGROUND_BASE_LOWEST};
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.scrollView = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
object2.stickyHeader = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function GameProfileScreenTsx1(){const{heroHeaderHeight,scrollY,STICKY_HEADER_HEIGHT}=this.__closure;return heroHeaderHeight.get()>0&&scrollY.get()>=heroHeaderHeight.get()-STICKY_HEADER_HEIGHT;}'};
object2 = {code: 'function GameProfileScreenTsx2(isVisible,wasVisible){const{stickyHeaderVisible,withTiming}=this.__closure;if(isVisible!==wasVisible){stickyHeaderVisible.set(withTiming(isVisible?1:0,{duration:150}));}}'};
object2 = {code: 'function GameProfileScreenTsx3(){const{interpolate,stickyHeaderVisible,STICKY_HEADER_HEIGHT}=this.__closure;return{transform:[{translateY:interpolate(stickyHeaderVisible.get(),[0,1],[-1*STICKY_HEADER_HEIGHT,0])}]};}'};
object2 = {code: 'function GameProfileScreenTsx4(){const{scrollY,storeLinksSectionBottomY,STICKY_HEADER_HEIGHT}=this.__closure;return scrollY.get()>storeLinksSectionBottomY.get()-STICKY_HEADER_HEIGHT;}'};
object2 = {code: 'function GameProfileScreenTsx5(shouldShow,prevShouldShow){const{runOnJS,setShowGetButton}=this.__closure;if(shouldShow!==prevShouldShow){runOnJS(setShowGetButton)(shouldShow);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileScreen.tsx');
exports.default = GameProfileScreen;
}
function GetButton({onPress}) { // fn#77964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:480, offset: 0x01e14336, size: 171 bytes, params: 2, frame: 20
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const object2 = {'variant': 'primary', 'size': 'sm'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.text = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.l8JeHg]);
object2.onPress = onPress;
string = intl.string;
const Vsxqmz = (require(1244) /* metro dependency 1244: indexNative */).t.Vsxqmz;
object2.accessibilityLabel = Reflect.apply(string, intl, [Vsxqmz]);
return <Button {...object2} />;
}
function GameProfileScreen({gameId, source, sourceUserId, initialScrollOffset}) { // fn#77965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:1717, offset: 0x01e143e1, size: 1872 bytes, params: 2, frame: 47
var object2;
initialScrollOffset = initialScrollOffset === undefined ? 0 : initialScrollOffset;
const env0_3 = initialScrollOffset;
const styles = useStyles();
const {bottomSheetRef,
bottomSheetClose} = (require(7326) /* metro dependency 7326: useBottomSheetRef */).useBottomSheetRef();
const value5 = (importDefault(9961) /* metro dependency 9961: useOpenExternalUrlFromGameProfile */)((importDefault(3853) /* metro dependency 3853: Linking */).openURL);
const env0_4 = value5;
let binding = env0_4;
const value6 = binding.useState(_fun77966);
const binding2 = env0_3;
const property = binding2(value6, 1)[0];
const value8 = binding.useRef(null);
const value9 = binding.useRef(0);
const {data, isLoading} = (require(5198) /* metro dependency 5198: useGame */).useGame(gameId);
const [property2, property3] = binding2(binding.useState(null), 2);
const name = data?.name;
const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_10 = value13;
binding = env0_4;
const value14 = binding.useCallback(_fun77967, [value13]);
const env0_11 = binding.useRef(false);
const value15 = binding.useCallback(_fun77968, [initialScrollOffset]);
(importDefault(9964) /* metro dependency 9964: useInAppBrowserReturn */)({gameId: data?.id,
scrollOffsetRef: value9});
const value16 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_12 = value16;
const value17 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_13 = value17;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = GameProfileScreenM;
closure.__closure = {heroHeaderHeight: value16, scrollY: value13, STICKY_HEADER_HEIGHT: 56};
closure.__workletHash = 15395308691297;
closure.__initData = env0_10;
const closure2 = GameProfileScreenJ;
object2 = {stickyHeaderVisible: value17};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure2.__closure = object2;
closure2.__workletHash = 3161097061646;
closure2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const moduleValue7 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = GameProfileScreenZ;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, stickyHeaderVisible: value17,
STICKY_HEADER_HEIGHT: 56};
closure.__workletHash = 16452163547712;
closure.__initData = env0_12;
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const value19 = reanimatedRexportModule.useSharedValue(Infinity);
const env0_14 = value19;
binding = env0_4;
const [property4, property5] = env0_3(binding.useState(false), 2);
const moduleValue9 = reanimatedRexportModule;
useAnimatedReaction = moduleValue9.useAnimatedReaction;
closure = GameProfileScreenQ;
closure.__closure = {scrollY: value13, storeLinksSectionBottomY: value19, STICKY_HEADER_HEIGHT: 56};
closure.__workletHash = 14521195063038;
closure.__initData = env0_13;
const closure3 = GameProfileScreenW;
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setShowGetButton: property5};
closure3.__workletHash = 15045914286853;
closure3.__initData = env0_14;
Reflect.apply(useAnimatedReaction, moduleValue9, [closure, closure3]);
const value23 = binding.useMemo(_fun77974,
[(require(9966) /* metro dependency 9966: useGameProfileStoreWebsites */).useGameProfileStoreWebsites(data)]);
const env0_19 = binding.useRef(undefined);
const env0_20 = binding.useRef(null);
binding.useEffect(_fun77976, [name]);
binding.useEffect(_fun77977, [property2]);
const value24 = binding.useCallback(_fun77978, [gameId, property, source]);
const value25 = binding.useCallback(_fun77979, [value23, value24, value5]);
binding.useEffect(_fun77980, [gameId, source, sourceUserId, property]);
binding.useEffect(function() {
return _fun77982;
}, [gameId, source, sourceUserId, property]);
const value26 = binding.useCallback(_fun77983, [value16]);
const value27 = binding.useCallback(_fun77984, [value19]);
const value28 = binding.useMemo(_fun77985, [value23, property4, value25]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const items2 = [isLoading || data == null ? <View style={styles.loadingContainer}><ActivityIndicator animating size="large" /></View> : ((BottomSheetScrollView) => <BottomSheetScrollView ref={value8} style={styles.scrollView} onScroll={value14}>{((Component) => <Component game={data} invite={property2} viewId={property} source={source} trackAction={value24} onGuildInviteResolved={property3} closeModal={bottomSheetClose} scrollY={value13} websiteButtons={value23} onStoreLinksMeasured={value27} onHeaderHeightMeasured={value26} scrollOffsetRef={value9} />)(importDefault(9989) /* metro dependency 9989: GameProfileView */)}</BottomSheetScrollView>)((require(6277) /* metro dependency 6277 */).BottomSheetScrollView)];
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[1] = <View2 style={[styles.stickyHeader,
value18]} pointerEvents="box-none">{((Component) => <Component game={data} headerRight={value28} />)(importDefault(10182) /* metro dependency 10182: GameProfileNavigationHeader */)}</View2>;
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
items2[2] = <ActionSheetHeaderBar variant="overlay" onPress={bottomSheetClose} />;
return (
<BottomSheet
ref={bottomSheetRef}
startExpanded
scrollable
handleDisabled
onExpand={value15}
>
{items2}
</BottomSheet>
);
}
function _fun77966() { // fn#77966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:1926, offset: 0x01e14b31, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).generateViewId();
}
function _fun77967({nativeEvent}) { // fn#77967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:2158, offset: 0x01e14b56, size: 51 bytes, params: 2, frame: 12
const y = nativeEvent.contentOffset.y;
env0_10.set(y);
env0_7.current = y;
}
function _fun77968() { // fn#77968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:2258, offset: 0x01e14b89, size: 90 bytes, params: 1, frame: 12
var current;
if (initialScrollOffset > 0 && !env0_11.current) {
env0_11.current = true;
current = env0_6.current;
if (current != null) {
current.scrollTo({y: initialScrollOffset, animated: false});
}
}
}
function GameProfileScreenM() { // fn#77969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:2515, owner: GameProfileScreen.M, offset: 0x01e14be3, size: 64 bytes, params: 1, frame: 11
var r0;
var value4;
var value;
let binding = env0_12;
const value3 = binding.get() > 0;
if (value3) {
binding = env0_10;
value4 = binding.get();
binding = env0_12;
value = binding.get();
value = value4 >= value - 56;
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function GameProfileScreenJ(a0, a1) { // fn#77970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:2668, owner: GameProfileScreen.J, offset: 0x01e14c23, size: 84 bytes, params: 3, frame: 16
var value;
var binding;
var set;
if (a0 !== a1) {
binding = env0_13;
set = binding.set;
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [value.withTiming(a0 ? 1 : 0, {duration: 150})]);
}
}
function GameProfileScreenZ() { // fn#77971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:2896, owner: GameProfileScreen.z, offset: 0x01e14c77, size: 107 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object.translateY = value.interpolate(env0_13.get(), [0, 1], [-56, 0]);
return {transform: [object]};
}
function GameProfileScreenQ() { // fn#77972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:3232, owner: GameProfileScreen.q, offset: 0x01e14ce2, size: 42 bytes, params: 1, frame: 10
return env0_10.get() > env0_14.get() - 56;
}
function GameProfileScreenW(a0, a1) { // fn#77973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:3381, owner: GameProfileScreen.W, offset: 0x01e14d0c, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_16)(a0);
}
}
function _fun77974() { // fn#77974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:3595, offset: 0x01e14d49, size: 63 bytes, params: 1, frame: 13
var environment;
const binding = env0_17;
const map = binding.map;
const value = environment.__proto__;
return Reflect.apply(map, binding,
[importDefault(9971) /* metro dependency 9971: getGameProfileStoreWebsiteData */]).filter(function(a0) {
return a0 != null;
});
}
function _fun77976() { // fn#77976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:3695, offset: 0x01e14d88, size: 21 bytes, params: 1, frame: 2
env0_19.current = name;
}
function _fun77977() { // fn#77977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:3733, offset: 0x01e14d9d, size: 21 bytes, params: 1, frame: 2
env0_20.current = env0_8;
}
function _fun77978(a0) { // fn#77978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:3780, offset: 0x01e14db2, size: 155 bytes, params: 2, frame: 18
let value = environment.__proto__;
const getGuildIdAndVerifiedFromInvite = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).getGuildIdAndVerifiedFromInvite;
value = Reflect.apply(getGuildIdAndVerifiedFromInvite, value, [env0_20.current]);
const guildId = value.guildId;
const isVerified = value.isVerified;
value = require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */;
value.trackGameProfileAction({gameName: env0_19.current ?? '', gameId: gameId, action: a0, viewId: env0_5,
guildId: guildId, isVerified: isVerified, source: source});
}
function _fun77979() { // fn#77979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4030, offset: 0x01e14e4d, size: 243 bytes, params: 1, frame: 21
var value2;
var moduleValue;
var showActionSheet;
var object2;
var value4;
var binding;
var property;
if (env0_18.length === 1) {
value4 = environment.__proto__;
binding = env1_3;
property = binding(env0_18, 1)[0];
binding = env0_21;
binding(property.action);
binding = env0_4;
binding(property.url);
} else if (env0_18.length > 1) {
value2 = environment.__proto__;
moduleValue = require(4080) /* metro dependency 4080: ActionSheetActionCreators */;
showActionSheet = moduleValue.showActionSheet;
object2 = {};
object2.key = (require(9988) /* metro dependency 9988: GameProfileStoreLinksActionSheet */).ACTION_SHEET_KEY;
object2.content = ((Component) => <Component gameName={env0_19.current ?? ''} websiteButtons={env0_18} trackAction={env0_21} />)(importDefault(9988) /* metro dependency 9988: GameProfileStoreLinksActionSheet */);
object2.stackingBehavior = 'stack';
Reflect.apply(showActionSheet, moduleValue, [object2]);
}
}
function _fun77980() { // fn#77980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4319, offset: 0x01e14f40, size: 142 bytes, params: 1, frame: 18
const gameProfileAnalyticUtilsModule = require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */;
const trackGameProfileOpen = gameProfileAnalyticUtilsModule.trackGameProfileOpen;
const object2 = {};
object2.source = source;
object2.viewId = env0_5;
object2.gameId = gameId;
object2.gameName = env0_19.current ?? '';
object2.authorId = sourceUserId;
const GameProfileTypes = gameProfileAnalyticUtilsModule.GameProfileTypes;
const FullProfile = GameProfileTypes.FullProfile;
object2.profileType = FullProfile;
Reflect.apply(trackGameProfileOpen, gameProfileAnalyticUtilsModule, [object2]);
}
function _fun77981() { // fn#77981, offset: 0x01e14fce, size: 11 bytes, params: 1, frame: 1
return _fun77982;
}
function _fun77983(a0) { // fn#77983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4810, offset: 0x01e15080, size: 24 bytes, params: 2, frame: 11
env0_12.set(a0);
}
function _fun77984(a0) { // fn#77984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4848, offset: 0x01e15098, size: 24 bytes, params: 2, frame: 11
env0_14.set(a0);
}
function _fun77985() { // fn#77985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4882, offset: 0x01e150b0, size: 43 bytes, params: 1, frame: 4
return env0_18.length > 0 && env0_15 ? _fun77986 : undefined;
}
function _fun77982() { // fn#77982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4516, offset: 0x01e14fd9, size: 167 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
const getGuildIdAndVerifiedFromInvite = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).getGuildIdAndVerifiedFromInvite;
value = Reflect.apply(getGuildIdAndVerifiedFromInvite, value, [env1_20.current]);
const guildId = value.guildId;
const isVerified = value.isVerified;
value = require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */;
value.trackGameProfileClose({viewId: env1_5, gameId: gameId, gameName: env1_19.current ?? '', playedFriendIds: [],
playedFriendsData: [], similarGames: [], guildId: guildId, isVerified: isVerified});
}
function _fun77986() { // fn#77986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10146:4902, offset: 0x01e150db, size: 34 bytes, params: 1, frame: 13
return <GetButton onPress={env1_22} />;
}
@@ -0,0 +1,130 @@
/* Metro module 10019; source: modules/game_profile/native/components/GameProfileShopCarousel.tsx; dependencies: [31, 27, 5121, 33, 4501, 697, 10020, 10156, 10157, 632, 9963, 5120, 6789, 4573, 1244, 4578, 6818, 8416, 2] */
function _fun78253(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:6, offset: 0x01e2291e, size: 400 bytes, params: 8, frame: 23
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = -1 * PX_16;
object5.container = object6;
const object7 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.paddingHorizontal = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginHorizontal = PX_16;
object5.header = object7;
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.card = object8;
const env0_8 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileShopCarousel.tsx');
exports.default = GameProfileShopCarousel;
}
function GameProfileShopCarouselContent({collectionId, closeModal, trackAction}) { // fn#78254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:528, offset: 0x01e22aae, size: 665 bytes, params: 2, frame: 33
var r0;
var Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var Button;
const styles = useStyles();
const value2 = (require(10156) /* metro dependency 10156: useGameProfileShopCollection */).useGameProfileShopCollection(collectionId);
const env0_3 = value2;
(require(10157) /* metro dependency 10157: useFetchCollectiblesProducts */).useFetchCollectiblesProducts(value2);
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([CollectiblesCategoryStore],
_fun78255);
const binding = env0_3;
const useCallback = binding.useCallback;
if (value3.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
var viewBinding2Props = {style: styles.header};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
items2 = [<Text variant="heading-sm/semibold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
[t['5DYPT8']])}</Text>];
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[1] = <Button text={Reflect.apply(string, intl,
[t.budhsM])} variant="tertiary" size="sm" icon={((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)} iconPosition="end" onPress={Reflect.apply(useCallback,
binding, [_fun78258, [trackAction, closeModal]])} />;
r0 = <View {...viewBindingProps}><View {...viewBinding2Props}>{items2}</View>{((FlashList) => <FlashList horizontal data={value3} renderItem={renderItem_78259} showsHorizontalScrollIndicator={false} ItemSeparatorComponent={HorizontalSpacing} ListHeaderComponent={HorizontalSpacing} ListFooterComponent={HorizontalSpacing} decelerationRate="fast" snapToInterval={(require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH + (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP} key={collectionId} />)((require(8416) /* metro dependency 8416: flashList */).FlashList)}</View>;
}
return r0;
}
function HorizontalSpacing() { // fn#78261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:468, offset: 0x01e22f17, size: 59 bytes, params: 1, frame: 16
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
return <View style={{width: COLLECTIBLES_SHOP_CARD_GAP}} />;
}
function GameProfileShopCarousel({game, closeModal, trackAction}) { // fn#78262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:2187, offset: 0x01e22f52, size: 100 bytes, params: 2, frame: 17
const value = null;
const r7 = value == game || value == game.shopCollectionIds ? undefined : game.shopCollectionIds[0];
return value == r7 ? value : <GameProfileShopCarouselContent collectionId={r7} closeModal={closeModal} trackAction={trackAction} />;
}
function _fun78255() { // fn#78255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:748, offset: 0x01e22d47, size: 45 bytes, params: 1, frame: 12
return env0_3.map(function(a0) {
return CollectiblesCategoryStore.getProduct(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun78258() { // fn#78258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:820, offset: 0x01e22d8b, size: 139 bytes, params: 1, frame: 17
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const DiscordCollectiblesShop = GameProfileTrackActionActions.DiscordCollectiblesShop;
trackActionBinding(DiscordCollectiblesShop);
closeModal();
const value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShop = value.openCollectiblesShop;
const object2 = {};
let GAME_PROFILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_PROFILE;
object2.analyticsLocations = [GAME_PROFILE];
GAME_PROFILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_PROFILE;
object2.analyticsSource = GAME_PROFILE;
Reflect.apply(openCollectiblesShop, value, [object2]);
}
function GameProfileShopCarouselContentRenderItem({item}) { // fn#78259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:1475, owner: GameProfileShopCarouselContent.renderItem, offset: 0x01e22e16, size: 101 bytes, params: 2, frame: 16
var environment;
const value = environment.__proto__;
return ((Component) => <Component solidBackground cardStyle={styles.card} product={item} hideWishlistButton hidePrice onPress={onPress_78260} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
}
function renderItemOnPress_78260() { // fn#78260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10205:1587, owner: GameProfileShopCarouselContent.renderItem.onPress, offset: 0x01e22e7b, size: 156 bytes, params: 1, frame: 17
let value = environment.__proto__;
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const DiscordCollectiblesShop = GameProfileTrackActionActions.DiscordCollectiblesShop;
trackActionBinding(DiscordCollectiblesShop);
closeModal();
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShop = value.openCollectiblesShop;
const object2 = {};
let GAME_PROFILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_PROFILE;
object2.analyticsLocations = [GAME_PROFILE];
GAME_PROFILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_PROFILE;
object2.analyticsSource = GAME_PROFILE;
object2.initialProductSkuId = item.skuId;
Reflect.apply(openCollectiblesShop, value, [object2]);
}
@@ -0,0 +1,79 @@
/* Metro module 9994; source: modules/game_profile/native/components/GameProfileStoreLinks.tsx; dependencies: [31, 27, 33, 4501, 697, 9961, 3853, 4578, 1244, 4080, 9988, 9963, 2] */
function _fun78136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10180:6, offset: 0x01e1bbe8, size: 247 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_6 = Reflect.apply(createStyles, value, [{container: {flexDirection: 'column', gap: PX_8}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileStoreLinks.tsx');
exports.default = GameProfileStoreLinks;
}
function WebsiteGameStoreLinkButton({data, trackAction}) { // fn#78137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10180:230, offset: 0x01e1bcdf, size: 152 bytes, params: 2, frame: 17
const env0_2 = (importDefault(9961) /* metro dependency 9961: useOpenExternalUrlFromGameProfile */)((importDefault(3853) /* metro dependency 3853: Linking */).openURL);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Button
variant="secondary"
size="md"
text={data.title}
icon={data.icon}
onPress={onPress_78138}
/>
);
}
function GameProfileStoreLinks({game, trackAction, websiteButtons}) { // fn#78139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10180:444, offset: 0x01e1bd9e, size: 491 bytes, params: 2, frame: 26
const styles = useStyles();
const name = game?.name;
if (websiteButtons.length === 0) {
return null;
}
if (name == null) {
return null;
}
if (websiteButtons.length === 1) {
return <WebsiteGameStoreLinkButton data={websiteButtons[0]} trackAction={trackAction} />;
}
if (websiteButtons.length === 2) {
return (
<View style={styles.container}>
<WebsiteGameStoreLinkButton data={websiteButtons[0]} trackAction={trackAction} />
<WebsiteGameStoreLinkButton data={websiteButtons[1]} trackAction={trackAction} />
</View>
);
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const button = <Button variant="secondary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/hMurx'])} onPress={onPress_78140} />;
const action = websiteButtons[0]?.action;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
const XboxGamePassStoreLink = GameProfileTrackActionActions.XboxGamePassStoreLink;
return action !== XboxGamePassStoreLink ? button : <View style={styles.container}><WebsiteGameStoreLinkButton data={websiteButtons[0]} trackAction={trackAction} />{button}</View>;
}
function WebsiteGameStoreLinkButtonOnPress() { // fn#78138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10180:409, owner: WebsiteGameStoreLinkButton.onPress, offset: 0x01e1bd77, size: 39 bytes, params: 1, frame: 13
const trackActionBinding = trackAction;
const dataBinding = data;
trackActionBinding(dataBinding.action);
env0_2(dataBinding.url);
}
function GameProfileStoreLinksOnPress() { // fn#78140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10180:947, owner: GameProfileStoreLinks.onPress, offset: 0x01e1bf89, size: 121 bytes, params: 1, frame: 18
const value = environment.__proto__;
const actionSheetActionCreatorsModule = require(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const showActionSheet = actionSheetActionCreatorsModule.showActionSheet;
const object2 = {};
const ACTION_SHEET_KEY = (require(9988) /* metro dependency 9988: GameProfileStoreLinksActionSheet */).ACTION_SHEET_KEY;
object2.key = ACTION_SHEET_KEY;
object2.content = ((Component) => <Component gameName={name} websiteButtons={websiteButtons} trackAction={trackAction} />)(importDefault(9988) /* metro dependency 9988: GameProfileStoreLinksActionSheet */);
return Reflect.apply(showActionSheet, actionSheetActionCreatorsModule, [object2]);
}
@@ -0,0 +1,81 @@
/* Metro module 9988; source: modules/game_profile/native/components/GameProfileStoreLinksActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 9961, 3853, 1585, 6805, 6277, 4573, 1244, 4578, 4080, 2] */
function _fun78082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10174:6, offset: 0x01e17ece, size: 358 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingTop = PX_8;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingBottom = PX_24;
object3.header = object4;
object3.headerText = {textAlign: 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.buttons = {gap: PX_12};
const env0_6 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileStoreLinksActionSheet.tsx');
exports.default = GameProfileStoreLinksActionSheet;
exports.ACTION_SHEET_KEY = 'game-profile-store-links';
}
function GameProfileStoreLinksActionSheet({gameName, websiteButtons, trackAction}) { // fn#78083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10174:378, offset: 0x01e18034, size: 510 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_1 = (importDefault(9961) /* metro dependency 9961: useOpenExternalUrlFromGameProfile */)((importDefault(3853) /* metro dependency 3853: Linking */).openURL);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = bottom + PX_16;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = <Text variant="heading-lg/semibold" color="mobile-text-heading-primary" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/4gj6r'])}</Text>;
value = <View style={styles.header}>{value}<Text variant="text-md/medium" color="text-subtle" style={styles.headerText}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0acM2Y'],
{gameName: gameName})}</Text></View>;
return (
<ActionSheet>
<BottomSheetScrollView contentContainerStyle={object}>
{value}
<View style={styles.buttons}>
{websiteButtons.map(_fun78084)}
</View>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun78084({icon, title, url, action}) { // fn#78084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10174:1037, offset: 0x01e18232, size: 113 bytes, params: 2, frame: 18
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Button
icon={icon}
text={title}
variant="secondary"
size="md"
onPress={onPress_78085}
key={url}
/>
);
}
function onPress_78085() { // fn#78085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10174:1143, offset: 0x01e182a3, size: 69 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = environment.__proto__;
trackAction(action);
env1_1(url);
}
@@ -0,0 +1,71 @@
/* Metro module 10005; source: modules/game_profile/native/components/GameProfileSummary.tsx; dependencies: [57, 31, 27, 33, 4501, 9963, 1244, 4573, 2] */
function _fun78164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10191:6, offset: 0x01e1dec1, size: 236 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.Pressable;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flexDirection: 'column'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileSummary.tsx');
exports.default = GameProfileSummary;
}
function GameProfileSummary({game, trackAction}) { // fn#78165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10191:245, offset: 0x01e1dfad, size: 505 bytes, params: 2, frame: 26
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
const binding = env0_3;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_2;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_2 = value4[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value6[0];
const env0_4 = value6[1];
const value7 = binding.useCallback(_fun78166, [property2]);
const value8 = binding.useCallback(_fun78167, [property, trackAction]);
const r9 = game?.summaryLocalized ?? game?.description;
if (r9 == null) {
return null;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value9 = Reflect.apply(string, intl, [property ? t['6MwJo/'] : t.lBeKY2]);
return (
<View style={styles.container}>
<Text
variant="text-md/normal"
color="interactive-text-active"
lineClamp={property || property2 == null ? undefined : 3}
onTextLayout={value7}
>
{r9}
</Text>
{property2 ? <Pressable onPress={value8} accessibilityRole="button" accessibilityLabel={value9}><Text variant="text-md/medium" color="text-brand">{value9}</Text></Pressable> : null}
</View>
);
}
function _fun78166(a0) { // fn#78166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10191:408, offset: 0x01e1e1a6, size: 55 bytes, params: 2, frame: 11
if (env0_3 == null) {
env0_4(a0.nativeEvent.lines.length > 3);
}
}
function _fun78167() { // fn#78167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10191:477, offset: 0x01e1e1dd, size: 78 bytes, params: 1, frame: 15
const binding = env0_1;
const trackActionBinding = trackAction;
const GameProfileTrackActionActions = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions;
trackActionBinding(binding ? GameProfileTrackActionActions.ShowLess : GameProfileTrackActionActions.ShowMore);
env0_2(!binding);
}
@@ -0,0 +1,93 @@
/* Metro module 9989; source: modules/game_profile/native/components/GameProfileView.tsx; dependencies: [31, 27, 33, 4501, 697, 6771, 6789, 9990, 9993, 9994, 9995, 10005, 10006, 10009, 10011, 10019, 10158, 10177, 10178, 2] */
function _fun78086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10175:6, offset: 0x01e182e8, size: 393 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {flex: 1};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object5.backgroundColor = BACKGROUND_BASE_LOWEST;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingBottom = PX_16;
object4.container = object5;
const object6 = {'flexDirection': 'column', 'paddingVertical': null, 'paddingHorizontal': null, 'gap': null,
'maxWidth': 520, 'alignSelf': 'center', 'width': '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingVertical = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.gap = PX_32;
object4.body = object6;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.buttonsContainer = {flexDirection: 'column', gap: PX_8};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/GameProfileView.tsx');
exports.default = GameProfileView;
}
function GameProfileView({game, invite, viewId, source, trackAction, onGuildInviteResolved, closeModal, scrollY, websiteButtons, onStoreLinksMeasured, onHeaderHeightMeasured, scrollOffsetRef}) { // fn#78087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10175:527, offset: 0x01e18471, size: 914 bytes, params: 2, frame: 38
const styles = useStyles();
const binding = env0_3;
const env0_1 = binding.useRef(null);
const env0_2 = binding.useRef(null);
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const GAME_PROFILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_PROFILE;
const analyticsLocations = defaultImport(GAME_PROFILE).analyticsLocations;
var env0_3 = binding.useCallback(_fun78088, [onStoreLinksMeasured]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const value2 = ((Component) => <Component game={game} scrollY={scrollY} onHeightMeasured={onHeaderHeightMeasured} />)(importDefault(9990) /* metro dependency 9990: GameProfileHeader */);
const viewBindingProps = {style: styles.body, onLayout: onLayout_78089};
const items2 = [((Component) => <Component game={game} viewId={viewId} source={source} trackAction={trackAction} />)(importDefault(9993) /* metro dependency 9993: GameProfileMedia */)];
items2[1] = websiteButtons.length > 0 && <View onLayout={onLayout_78090}>{((Component) => <Component game={game} websiteButtons={websiteButtons} trackAction={trackAction} />)(importDefault(9994) /* metro dependency 9994: GameProfileStoreLinks */)}</View>;
items2[2] = ((Component) => <Component game={game} trackAction={trackAction} />)(importDefault(9995) /* metro dependency 9995: GameProfileReviews */);
items2[3] = ((Component) => <Component game={game} viewId={viewId} source={source} trackAction={trackAction} />)(importDefault(10005) /* metro dependency 10005: GameProfileSummary */);
items2[4] = ((Component) => <Component game={game} analyticsLocations={analyticsLocations} trackAction={trackAction} />)(importDefault(10006) /* metro dependency 10006: GameProfileLinkAccount */);
items2[5] = ((Component) => <Component closeModal={closeModal} game={game} onInviteResolved={onGuildInviteResolved} trackAction={trackAction} />)(importDefault(10009) /* metro dependency 10009: GameProfileCommunity */);
items2[6] = ((Component) => <Component gameId={game.id} invite={invite} closeModal={closeModal} trackAction={trackAction} scrollOffsetRef={scrollOffsetRef} />)(importDefault(10011) /* metro dependency 10011: GameProfileAnnouncements */);
items2[7] = ((Component) => <Component game={game} closeModal={closeModal} trackAction={trackAction} />)(importDefault(10019) /* metro dependency 10019: GameProfileShopCarousel */);
items2[8] = ((Component) => <Component game={game} viewId={viewId} source={source} trackAction={trackAction} />)(importDefault(10158) /* metro dependency 10158: GameProfileDetails */);
let value = importDefault(10177) /* metro dependency 10177: GameProfileGameClaimCta */;
value = ((Component) => <Component game={game} trackAction={trackAction} />)(value);
items2[9] = <View style={styles.buttonsContainer}>{value}{((Component) => <Component applicationId={game.id} trackAction={trackAction} />)(importDefault(10178) /* metro dependency 10178: GameProfileReportButton */)}</View>;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{value2}
<View {...viewBindingProps}>
{items2}
</View>
</View>
</AnalyticsLocationProvider>
);
}
function _fun78088() { // fn#78088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10175:845, offset: 0x01e18803, size: 64 bytes, params: 1, frame: 14
const current = env0_1.current;
const current2 = env0_2.current;
if (current != null && current2 != null) {
if (onStoreLinksMeasured != null) {
onStoreLinksMeasured(current + current2);
}
}
}
function GameProfileViewOnLayout({nativeEvent}) { // fn#78089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10175:1091, owner: GameProfileView.onLayout, offset: 0x01e18843, size: 45 bytes, params: 2, frame: 10
env0_1.current = nativeEvent.layout.y;
env0_3();
}
function GameProfileViewOnLayout_78090({nativeEvent}) { // fn#78090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10175:1221, owner: GameProfileView.onLayout, offset: 0x01e18870, size: 54 bytes, params: 2, frame: 11
const layout = nativeEvent.layout;
env0_2.current = layout.y + layout.height;
env0_3();
}
@@ -0,0 +1,26 @@
/* Metro module 10004; source: modules/game_profile/native/components/OpenCriticRatingCircle.tsx; dependencies: [33, 7744, 2] */
function _fun78162(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10190:6, offset: 0x01e1dd1f, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/components/OpenCriticRatingCircle.tsx');
exports.default = OpenCriticRatingCircle;
}
function OpenCriticRatingCircle({rating, strokeColor, size}) { // fn#78163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10190:219, offset: 0x01e1dd9a, size: 295 bytes, params: 2, frame: 30
const value = size / 2;
const value2 = (size - 4) / 2;
let Math = global.Math;
const PI = Math.PI;
const value3 = 2 * PI * value2;
Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const value5 = Reflect.apply(min, Math, [Math2.max(rating, 0), 100]) / 100;
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const value7 = 1 - value5;
return ((Component) => <Component width={size} height={size}><Circle transform={'rotate(' + 360 * value7 / 2 + ' ' + value + ' ' + value + ')'} cx={value} cy={value} r={value2} stroke={strokeColor} strokeWidth={2} fill="none" strokeDasharray={value3} strokeDashoffset={value3 * value7} /></Component>)(defaultImport);
}
@@ -0,0 +1,81 @@
/* Metro module 9964; source: modules/game_profile/native/hooks/useInAppBrowserReturn.tsx; dependencies: [31, 9965, 478, 4078, 9959, 9963, 2] */
function _fun78010(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10150:6, offset: 0x01e15ea0, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/hooks/useInAppBrowserReturn.tsx');
exports.default = useInAppBrowserReturn;
}
function useInAppBrowserReturn({gameId, scrollOffsetRef}) { // fn#78011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10150:219, offset: 0x01e15f29, size: 66 bytes, params: 2, frame: 15
env0_3.useEffect(_fun78012, [gameId, scrollOffsetRef]);
}
function _fun78012() { // fn#78012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10150:293, offset: 0x01e15f6b, size: 114 bytes, params: 1, frame: 13
var environment;
var value;
if (gameId != null) {
value = environment.__proto__;
var moduleValue = require(478) /* metro dependency 478: PlatformUtils */;
if (moduleValue.isIOS()) {
var env0_1 = (require(4078) /* metro dependency 4078: BrowserManager */).subscribeToIsInAppBrowserOpen(_fun78013);
return _fun78014;
}
}
}
function _fun78013(a0, a1) { // fn#78013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10150:377, offset: 0x01e15fdd, size: 235 bytes, params: 3, frame: 16
var value;
var setGameProfilePendingReturn;
var value2;
var pendingReturn;
const GameProfileSources = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources;
if (a1) {
if (a1) {
if (!a0) {
env0_1();
value = environment.__proto__.__proto__;
pendingReturn = GameProfileStore.getPendingReturn();
if (pendingReturn != null) {
(importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */).returnToGameProfile({gameId: pendingReturn.gameId,
source: GameProfileSources.InAppBrowserReturn,
initialScrollOffset: pendingReturn.initialScrollOffset});
}
}
}
} else if (a0) {
value = environment.__proto__.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
setGameProfilePendingReturn = value.setGameProfilePendingReturn;
value2 = environment.__proto__;
Reflect.apply(setGameProfilePendingReturn, value, [{gameId: gameId,
initialScrollOffset: scrollOffsetRef.current}]);
} else if (a1) {
if (!a0) {
env0_1();
value = environment.__proto__.__proto__;
pendingReturn = GameProfileStore.getPendingReturn();
if (pendingReturn != null) {
(importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */).returnToGameProfile({gameId: pendingReturn.gameId,
source: GameProfileSources.InAppBrowserReturn,
initialScrollOffset: pendingReturn.initialScrollOffset});
}
}
}
}
function _fun78014() { // fn#78014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10150:689, offset: 0x01e160c8, size: 24 bytes, params: 1, frame: 9
if (!env0_0) {
env0_1();
}
}
@@ -0,0 +1,81 @@
/* Metro module 9971; source: modules/game_profile/native/utils/getGameProfileStoreWebsiteData.tsx; dependencies: [31, 33, 9967, 9972, 9963, 1244, 9974, 9976, 9978, 9980, 9982, 9986, 2] */
function _fun78057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10157:6, offset: 0x01e17145, size: 131 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/utils/getGameProfileStoreWebsiteData.tsx');
exports.default = getGameProfileStoreWebsiteData;
}
function getGameProfileStoreWebsiteData(a0) { // fn#78058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10157:124, offset: 0x01e171c8, size: 1252 bytes, params: 2, frame: 19
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const category = a0.category;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const STEAM = ThirdPartyGameApplicationWebsiteCategory.STEAM;
if (STEAM === category) {
object2 = {};
object2.icon = ((SteamNeutralIcon) => <SteamNeutralIcon size="md" />)((require(9972) /* metro dependency 9972: SteamNeutralIcon */).SteamNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.SteamStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FsANs4);
object2.url = a0.url;
return object2;
}
const EPICGAMES = ThirdPartyGameApplicationWebsiteCategory.EPICGAMES;
if (EPICGAMES === category) {
object2 = {};
object2.icon = ((EpicGamesNeutralIcon) => <EpicGamesNeutralIcon size="md" />)((require(9974) /* metro dependency 9974: EpicGamesNeutralIcon */).EpicGamesNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.EpicStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZbBMHa);
object2.url = a0.url;
return object2;
}
const ROBLOX = ThirdPartyGameApplicationWebsiteCategory.ROBLOX;
if (ROBLOX === category) {
object2 = {};
object2.icon = ((RobloxNeutralIcon) => <RobloxNeutralIcon size="md" />)((require(9976) /* metro dependency 9976: RobloxNeutralIcon */).RobloxNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.RobloxStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pJ+P+h']);
object2.url = a0.url;
return object2;
}
const BATTLENET = ThirdPartyGameApplicationWebsiteCategory.BATTLENET;
if (BATTLENET === category) {
object2 = {};
object2.icon = ((BattlenetNeutralIcon) => <BattlenetNeutralIcon size="md" />)((require(9978) /* metro dependency 9978: BattlenetNeutralIcon */).BattlenetNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.BattlenetStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A7grp+']);
object2.url = a0.url;
return object2;
}
const RIOT = ThirdPartyGameApplicationWebsiteCategory.RIOT;
if (RIOT === category) {
object2 = {};
object2.icon = ((RiotGamesNeutralIcon) => <RiotGamesNeutralIcon size="md" />)((require(9980) /* metro dependency 9980: RiotGamesNeutralIcon */).RiotGamesNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.RiotStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h6MapL);
object2.url = a0.url;
return object2;
}
const MINECRAFT = ThirdPartyGameApplicationWebsiteCategory.MINECRAFT;
if (MINECRAFT === category) {
object2 = {};
object2.icon = ((MinecraftNeutralIcon) => <MinecraftNeutralIcon size="md" />)((require(9982) /* metro dependency 9982: MinecraftNeutralIcon */).MinecraftNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.MinecraftStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['HZbmO+']);
object2.url = a0.url;
return object2;
}
if (category === 'XBOX_GAME_PASS') {
object2 = {};
object2.icon = ((XboxNeutralIcon) => <XboxNeutralIcon size="md" />)((require(9986) /* metro dependency 9986: XboxNeutralIcon */).XboxNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.XboxGamePassStoreLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['QpN/Iz']);
object2.url = a0.url;
return object2;
}
return null;
}
@@ -0,0 +1,90 @@
/* Metro module 10168; source: modules/game_profile/native/utils/getGameProfileWebsiteData.tsx; dependencies: [33, 9967, 9404, 9963, 1244, 8343, 10169, 8345, 8347, 10171, 10173, 10175, 2] */
function _fun79181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10354:6, offset: 0x01e47ead, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/native/utils/getGameProfileWebsiteData.tsx');
exports.default = getGameProfileWebsiteData;
}
function getGameProfileWebsiteData(a0, a1) { // fn#79182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10354:116, offset: 0x01e47f21, size: 1492 bytes, params: 3, frame: 20
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const category = a0.category;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const OFFICIAL = ThirdPartyGameApplicationWebsiteCategory.OFFICIAL;
if (OFFICIAL === category) {
object2 = {};
object2.icon = ((GlobeEarthIcon) => <GlobeEarthIcon size="md" color={a1} />)((require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.WebsiteLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fOUKvg);
object2.url = a0.url;
return object2;
}
const TWITTER = ThirdPartyGameApplicationWebsiteCategory.TWITTER;
if (TWITTER === category) {
object2 = {};
object2.icon = ((XNeutralIcon) => <XNeutralIcon size="md" color={a1} />)((require(8343) /* metro dependency 8343: XNeutralIcon */).XNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.XLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.INic4y);
object2.url = a0.url;
return object2;
}
const YOUTUBE = ThirdPartyGameApplicationWebsiteCategory.YOUTUBE;
if (YOUTUBE === category) {
object2 = {};
object2.icon = ((YoutubeNeutralIcon) => <YoutubeNeutralIcon size="md" color={a1} />)((require(10169) /* metro dependency 10169: YoutubeNeutralIcon */).YoutubeNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.YouTubeLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lNmxbE);
object2.url = a0.url;
return object2;
}
const FACEBOOK = ThirdPartyGameApplicationWebsiteCategory.FACEBOOK;
if (FACEBOOK === category) {
object2 = {};
object2.icon = ((FacebookNeutralIcon) => <FacebookNeutralIcon size="md" color={a1} />)((require(8345) /* metro dependency 8345: FacebookNeutralIcon */).FacebookNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.FacebookLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FjyREK);
object2.url = a0.url;
return object2;
}
const INSTAGRAM = ThirdPartyGameApplicationWebsiteCategory.INSTAGRAM;
if (INSTAGRAM === category) {
object2 = {};
object2.icon = ((InstagramNeutralIcon) => <InstagramNeutralIcon size="md" color={a1} />)((require(8347) /* metro dependency 8347: InstagramNeutralIcon */).InstagramNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.InstagramLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cgR+IK']);
object2.url = a0.url;
return object2;
}
const BLUESKY = ThirdPartyGameApplicationWebsiteCategory.BLUESKY;
if (BLUESKY === category) {
object2 = {};
object2.icon = ((BlueskyNeutralIcon) => <BlueskyNeutralIcon size="md" color={a1} />)((require(10171) /* metro dependency 10171: BlueskyNeutralIcon */).BlueskyNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.BlueskyLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['D/PHq5']);
object2.url = a0.url;
return object2;
}
const REDDIT = ThirdPartyGameApplicationWebsiteCategory.REDDIT;
if (REDDIT === category) {
object2 = {};
object2.icon = ((RedditNeutralIcon) => <RedditNeutralIcon size="md" color={a1} />)((require(10173) /* metro dependency 10173: RedditNeutralIcon */).RedditNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.RedditLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Hgb+fc']);
object2.url = a0.url;
return object2;
}
const TWITCH = ThirdPartyGameApplicationWebsiteCategory.TWITCH;
if (TWITCH === category) {
object2 = {};
object2.icon = ((TwitchNeutralIcon) => <TwitchNeutralIcon size="md" color={a1} />)((require(10175) /* metro dependency 10175: TwitchNeutralIcon */).TwitchNeutralIcon);
object2.action = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileTrackActionActions.TwitchLink;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7xtz4G']);
object2.url = a0.url;
return object2;
}
return null;
}
@@ -0,0 +1,101 @@
/* Metro module 10018; source: modules/game_profile/navigateToGameAnnouncement.tsx; dependencies: [5, 1867, 661, 44, 6946, 8879, 1230, 2] */
function _fun78248(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10204:6, offset: 0x01e2261e, size: 187 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.GuildFeatures;
const env0_6 = constantsModule.JoinGuildSources;
const env0_7 = constantsModule.Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/navigateToGameAnnouncement.tsx');
exports.default = function() {
return _navigateToGameAnnouncement.apply(this, arguments);
};
}
function _navigateToGameAnnouncement() { // fn#78249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10204:176, offset: 0x01e226d9, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun78251).apply(this, arguments);
}
async function _fun78251({invite, guildId, channelId, messageId, analyticsLocationStack}) { // fn#78251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10204:253, offset: 0x01e2271f, size: 511 bytes, params: 2, frame: 28
var id;
var features;
var r7;
var r13;
var guild;
var Set;
var set;
var value14;
var transitionTo;
var value16;
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_1;
binding(env2_2[3])(analyticsLocationStack.length > 0, 'analyticsLocationStack must have at least one location');
const property = analyticsLocationStack[analyticsLocationStack.length - 1];
if (invite != null) {
guild = invite.guild;
id = guild == null ? value : guild.id;
Set = global.Set;
guild = invite.guild;
features = guild == null ? value : guild.features;
set = new Set();
r7 = id;
r13 = set;
} else {
r7 = guildId;
r13 = null;
}
if (r7 != null) {
var guild2 = env2_4.getGuild(r7);
if ((guild2 == null ? value : guild2.joinedAt) != null) {
binding = env2_0;
value14 = binding(env2_2[6]);
transitionTo = value14.transitionTo;
binding = env2_7;
Reflect.apply(transitionTo, value14, [binding.CHANNEL(r7, channelId, messageId),
{sourceLocationStack: analyticsLocationStack}]);
return value;
}
if (r13 == null) {
value16 = env2_0(env2_2[4]);
await value16.startLurking(r7, {}, {shouldNavigate: true, channelId: channelId, messageId: messageId,
joinSource: env2_6.GAME_PROFILE_ANNOUNCEMENTS}, analyticsLocationStack);
return value;
}
var has = r13.has;
var PREVIEW_ENABLED = env2_5.PREVIEW_ENABLED;
if (Reflect.apply(has, r13, [PREVIEW_ENABLED])) {
value16 = env2_0(env2_2[4]);
await value16.startLurking(r7, {}, {shouldNavigate: true, channelId: channelId, messageId: messageId,
joinSource: env2_6.GAME_PROFILE_ANNOUNCEMENTS}, analyticsLocationStack);
return value;
}
if (invite == null) {
binding = env2_0;
value14 = binding(env2_2[6]);
transitionTo = value14.transitionTo;
binding = env2_7;
Reflect.apply(transitionTo, value14, [binding.CHANNEL(r7, channelId, messageId),
{sourceLocationStack: analyticsLocationStack}]);
return value;
}
var value11 = env2_1(env2_2[5]);
await value11.acceptInvite({inviteKey: invite.code, context: {location: property}, skipOnboarding: true});
if (false) {
return undefined;
}
value14 = env2_0(env2_2[6]);
value14.transitionTo(env2_7.CHANNEL(r7, channelId, messageId), {sourceLocationStack: analyticsLocationStack});
}
return value;
}