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,76 @@
/* Metro module 8448; source: modules/activities/ActivitiesInTextUtils.tsx; dependencies: [1379, 3784, 482, 677, 566, 2] */
function _fun67023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8633:6, offset: 0x01c13185, size: 223 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = isActivityInTextSupportedForChannel;
const isActivitiesInTextEnabledForChannelWithPermissions = function(a0, a1) {
if (a0 != null) {
if (a0 === undefined) {
return false;
}
if (isActivityInTextSupportedForChannel(a0)) {
if (a0.guild_id == null) {
return true;
}
if (a1.can(Permissions.USE_EMBEDDED_ACTIVITIES, a0)) {
return true;
}
return false;
}
}
return false;
};
const closure2 = function(a0) {
return a0?.guild_id != null || isActivityInTextSupportedForChannel(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_4 = (require(482) /* metro dependency 482: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/ActivitiesInTextUtils.tsx');
exports.isActivityInTextSupportedForChannel = closure;
exports.isActivitiesInTextEnabled = function(a0) {
return isActivitiesInTextEnabledForChannelWithPermissions(a0, PermissionStore);
};
exports.useIsActivitiesInTextEnabled = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([ChannelStore, PermissionStore], _fun67029);
};
exports.getIsAppLauncherEnabled = closure2;
exports.useIsAppLauncherEnabled = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([ChannelStore], _fun67031);
};
}
function isActivityInTextSupportedForChannel(a0) { // fn#67024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8633:138, offset: 0x01c13264, size: 238 bytes, params: 2, frame: 16
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
if (a0 == null) {
return false;
}
const channel = ChannelStore.getChannel(a0.parent_id);
return (channel == null || channel?.type === ChannelTypes.GUILD_CATEGORY) && [ChannelTypes.GUILD_TEXT,
ChannelTypes.GUILD_VOICE, ChannelTypes.GROUP_DM, ChannelTypes.DM].includes(a0.type);
}
function useIsActivitiesInTextEnabled(a0) { // fn#67028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8633:1172, offset: 0x01c133e7, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, PermissionStore],
_fun67029);
}
function useIsAppLauncherEnabled(a0) { // fn#67030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8633:1407, offset: 0x01c1345b, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun67031);
}
function _fun67029() { // fn#67029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8633:1254, offset: 0x01c13431, size: 42 bytes, params: 1, frame: 14
return isActivitiesInTextEnabledForChannelWithPermissions(ChannelStore.getChannel(env0_0), PermissionStore);
}
function _fun67031() { // fn#67031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8633:1482, offset: 0x01c1349d, size: 46 bytes, params: 1, frame: 12
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
return channel != null && getIsAppLauncherEnabled(channel);
}
@@ -0,0 +1,13 @@
/* Metro module 8110; source: modules/activities/ActivityPopoutUtils.native.tsx; dependencies: [2] */
function _fun64996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8295:6, offset: 0x01bbc8c6, size: 96 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/ActivityPopoutUtils.native.tsx');
exports.shouldOpenActivityInPopoutWindow = function() {
return false;
};
exports.wrapPreemptiveActivityPopout = function(a0, a1) {
return a1();
};
}
@@ -0,0 +1,62 @@
/* Metro module 8098; source: modules/activities/ActivityShelfStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun64941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8283:6, offset: 0x01bba7ab, size: 287 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 */;
object = {usageByApplicationId: {}, shelfOrder: []};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun64945(PersistedStore);
value.displayName = 'ActivityShelfStore';
value.persistKey = 'ActivityShelfStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
env0_5 = {usageByApplicationId: {}, shelfOrder: []};
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/ActivityShelfStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_64942() { // fn#64942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8283:148, offset: 0x01bba8ca, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_64942_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun64945(a0) { // fn#64945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8283:393, offset: 0x01bba928, size: 91 bytes, params: 2, frame: 16
const closure = ActivityShelfStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_64947}, {key: 'getState', value: value_64948}]);
}
function value_64947(a0) { // fn#64947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8283:713, offset: 0x01bba983, size: 50 bytes, params: 2, frame: 12
copyDataProperties({usageByApplicationId: {}, shelfOrder: []}, a0 ?? ({}), null);
value = environment.__proto__;
}
+150
View File
@@ -0,0 +1,150 @@
/* Metro module 4237; source: modules/activities/Constants.tsx; dependencies: [661, 1909, 2] */
function _fun35041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4408:6, offset: 0x010697ae, size: 1681 bytes, params: 8, frame: 51
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const ChannelTypes = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const object = {PLAY: 0};
object[0] = 'PLAY';
object.SPECTATE = 1;
object[1] = 'SPECTATE';
const object2 = {UNLOCKED: 1};
object2[1] = 'UNLOCKED';
object2.PORTRAIT = 2;
object2[2] = 'PORTRAIT';
object2.LANDSCAPE = 3;
object2[3] = 'LANDSCAPE';
const Set = global.Set;
const set = new Set(['755600276941176913', '880218832743055411', '1050941315912835122', '880218394199220334']);
const object4 = {PORTRAIT: 0};
object4[0] = 'PORTRAIT';
object4.LANDSCAPE = 1;
object4[1] = 'LANDSCAPE';
const object5 = {FOCUSED: 0};
object5[0] = 'FOCUSED';
object5.PIP = 1;
object5[1] = 'PIP';
object5.GRID = 2;
object5[2] = 'GRID';
const object11 = {'label_type': null, 'release_phase': '', 'label_from': null, 'label_until': null};
const EmbeddedActivityLabelTypes = (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes;
const NONE = EmbeddedActivityLabelTypes.NONE;
object11.label_type = NONE;
object11.omit_badge_from_surfaces = [];
const object12 = {'application_id': '', 'requires_age_gate': false, 'legacy_responsive_aspect_ratio': false};
let UNLOCKED = object2.UNLOCKED;
object12.default_orientation_lock_state = UNLOCKED;
UNLOCKED = object2.UNLOCKED;
object12.tablet_default_orientation_lock_state = UNLOCKED;
const EmbeddedActivitySupportedPlatforms = (require(1909) /* metro dependency 1909: Server */).EmbeddedActivitySupportedPlatforms;
let WEB = EmbeddedActivitySupportedPlatforms.WEB;
object12.supported_platforms = [WEB];
WEB = EmbeddedActivitySupportedPlatforms.WEB;
const IOS = EmbeddedActivitySupportedPlatforms.IOS;
const ANDROID = EmbeddedActivitySupportedPlatforms.ANDROID;
object12.client_platform_config = {[WEB]: object11, [IOS]: object11, [ANDROID]: object11};
object12.has_csp_exception = false;
object12.displays_advertisements = false;
object12.blocked_locales = [];
object12.supported_locales = [];
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
const items4 = [GUILD_TEXT];
const DM = ChannelTypes.DM;
items4[1] = DM;
const GROUP_DM = ChannelTypes.GROUP_DM;
items4[2] = GROUP_DM;
const items5 = [];
const value2 = arraySpread(items5, items4, 0, object11);
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
items5[value2] = GUILD_VOICE;
value2 + 1;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/Constants.tsx');
exports.ACTIVITY_INVITE_COVER_IMAGE_SIZE = 160;
exports.validStreamURL = RegExp('^https?:\\/\\/(?:www\\.)?(twitch\\.tv\\/(.+)|youtube.com\\/watch\\?v=)', '');
exports.XBOX_ACTIVITY_APPLICATION_ID = '438122941302046720';
exports.META_PRESENCE_APPLICATION_ID = '1417273808645259344';
exports.END_GAME_APPLICATION_ID = '773336526917861400';
exports.FISHINGTON_APPLICATION_ID = '814288819477020702';
exports.YOUTUBE_APPLICATION_ID = '755600276941176913';
exports.WATCH_YOUTUBE_DEV_APP_ID = '880218832743055411';
exports.WATCH_YOUTUBE_QA_APP_ID = '1050941315912835122';
exports.PUTT_PARTY_DEV_APP_ID = '910224161476083792';
exports.PUTT_PARTY_QA_APP_ID = '945748195256979606';
exports.JAM_SPACE_APPLICATION_ID = '1070087967294631976';
exports.GARTIC_PHONE_APPLICATION_ID = '1007373802981822582';
exports.GARTIC_PHONE_DEV_APPLICATION_ID = '1067803140071620628';
exports.COLOR_TOGETHER_APPLICATION_ID = '1039835161136746497';
exports.SPELL_CAST_APPLICATION_ID = '852509694341283871';
exports.LAND_IO_APPLICATION_ID = '903769130790969345';
exports.WATCH_YOUTUBE_PROD_APP_ID = '880218394199220334';
exports.KWIM_APPLICATION_ID = '1078728822972764312';
exports.BOBBLE_LEAGUE_APPLICATION_ID = '947957217959759964';
exports.CHECKERS_IN_THE_PARK_APP_ID = '832013003968348200';
exports.CHESS_IN_THE_PARK_APP_ID = '832012774040141894';
exports.BLAZIN_8S_APPLICATION_ID = '832025144389533716';
exports.POKER_NIGHT_APPLICATION_ID = '755827207812677713';
exports.LETTER_LEAGUE_APPLICATION_ID = '879863686565621790';
exports.SKETCH_HEADS_APPLICATION_ID = '902271654783242291';
exports.CHEF_SHOWDOWN_APPLICATION_ID = '1037680572660727838';
exports.PUTT_PARTY_PROD_APPLICATION_ID = '945737671223947305';
exports.KRUNKER_STAGING_APPLICATION_ID = '1010174316991762534';
exports.KRUNKER_STRIKE_APPLICATION_ID = '1011683823555199066';
exports.COLONIST_APPLICATION_ID = '1106787098452832296';
exports.AM_HARMONY_STG_APPLICATION_ID = '1234546995360694434';
exports.AM_HARMONY_PRD_APPLICATION_ID = '1214629548377768066';
exports.RYTHM_APPLICATION_ID = '235088799074484224';
exports.PAPERY_MATCH_APPLICATION_ID = '1235205910863806484';
exports.EXORACER_APPLICATION_ID = '1220052815590723654';
exports.CLASH_GEM_CARD_PARTY_APPLICATION_ID = '1222080278672179220';
exports.MAGIC_CIRCLE_APPLICATION_ID = '1227719606223765687';
exports.DEATH_BY_AI_APPLICATION_ID = '1194351737264406548';
exports.TINY_ROYALE_APP_1 = '1245041113882955918';
exports.TINY_ROYALE_APP_2 = '1245040907732910201';
exports.TINY_ROYALE_APP_3 = '1245040436427489471';
exports.TINY_ROYALE_APP_4 = '1208090049871351890';
exports.TWELVE_BULLETS_DEV = '1247266306231898122';
exports.TWELVE_BULLETS_STG = '1257458870390099989';
exports.TWELVE_BULLETS_PRD = '1276239071764680926';
exports.EMBEDDED_ACTIVITY_SURVEY_URL = 'https://discord.sjc1.qualtrics.com/jfe/form/SV_6SvWAOxlcSRWiEu';
exports.EMBEDDED_ACTIVITIES_BLOG_POST_URL = 'https://discord.com/blog/server-activities-games-voice-watch-together';
exports.ImageSizes = {'SMALL': 64, 'LARGE': 160};
exports.STAFF_RELEASE_PHASES = ['in_development', 'activities_team', 'employee_release'];
exports.EXCLUDE_FULL_SCREEN_APPS = ['1037680572660727838', '235088799074484224', '1007373802981822582',
'1067803140071620628', '1194351737264406548', '1245041113882955918', '1245040907732910201',
'1245040436427489471', '1208090049871351890', '1235205910863806484', '1227719606223765687'];
exports.SHARE_INTERACTION_APPS = ['1247266306231898122', '1257458870390099989', '1276239071764680926'];
exports.ActivityFeedbackReasons = {ADS: 'ADS', FAILED_LOAD: 'FAILED_LOAD', LAGGING: 'LAGGING',
CONFUSING: 'CONFUSING', NOT_FUN: 'NOT_FUN', OTHER: 'OTHER'};
exports.ActivityIntent = object;
exports.ActivityPlatform = {DESKTOP: 'desktop', MOBILE: 'mobile'};
exports.ActivityTooltipName = {BETRAYAL_MARKETING_TOOLTIP: 'BETRAYAL_MARKETING_TOOLTIP',
FISHINGTON_MARKETING_TOOLTIP: 'FISHINGTON_MARKETING_TOOLTIP',
POKER_MARKETING_TOOLTIP: 'POKER_MARKETING_TOOLTIP', YOUTUBE_MARKETING_TOOLTIP: 'YOUTUBE_MARKETING_TOOLTIP'};
exports.OrientationLockState = object2;
exports.APPLICATIONS_WITH_ALLOWED_POPUPS = set;
exports.ActivityScreenOrientation = object4;
exports.ActivityLayoutMode = object5;
exports.DEFAULT_EMBEDDED_ACTIVITY_CONFIG = object12;
exports.SUPPORTED_ACTIVITY_IN_TEXT_CHANNEL_TYPES = items4;
exports.SUPPORTED_ACTIVITIES_CHANNEL_TYPES = items5;
exports.getAppIntentScheme = function(a0) {
if (a0 === 'tiktok') {
return 'tiktok://';
}
if (a0 === 'photos') {
return 'photos-redirect://';
}
if (a0 === 'snapchat') {
return 'snapchat://';
}
if (a0 === 'instagram') {
return 'instagram://';
}
};
exports.PRIVATE_APPS_HELP_ARTICLE = 'https://support-dev.discord.com/hc/en-us/articles/21692628851351-Private-Activity-Safety';
exports.DISALLOWED_NAVIGATION_ERROR_CLOSE_ACTIVITY = 'disallowed_navigation_error_close_activity';
exports.ACTIVITY_PORTRAIT_ASPECT_RATIO = 0.5625;
exports.ACTIVITY_LANDSCAPE_ASPECT_RATIO = 1.7777777777777777;
exports.ActivityPopoutWindowLayouts = {NORMAL: 'normal', FULL_SCREEN: 'full-screen'};
exports.INVITE_EXPIRATION_MS = 21600000;
}
@@ -0,0 +1,36 @@
/* Metro module 9475; source: modules/activities/DeveloperActivityShelfActionCreators.tsx; dependencies: [694, 2] */
function _fun73691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9661:6, offset: 0x01d74ceb, size: 140 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/DeveloperActivityShelfActionCreators.tsx');
exports.toggleUseActivityUrlOverride = toggleUseActivityUrlOverride;
exports.setActivityUrlOverride = setActivityUrlOverride;
exports.markActivityUsed = markActivityUsed;
exports.updateFilter = updateFilter;
}
function toggleUseActivityUrlOverride() { // fn#73692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9661:216, offset: 0x01d74d77, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE'});
}
function setActivityUrlOverride(a0) { // fn#73693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9661:367, offset: 0x01d74da7, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE',
activityUrlOverride: a0});
}
function markActivityUsed(a0) { // fn#73694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9661:522, offset: 0x01d74ddf, size: 98 bytes, params: 2, frame: 14
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {type: 'DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED', applicationId: a0};
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
object2.timestamp = (date instanceof Object ? date : value2).getTime();
Reflect.apply(dispatch, value, [object2]);
}
function updateFilter(a0) { // fn#73695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9661:685, offset: 0x01d74e41, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER',
filter: a0});
}
@@ -0,0 +1,179 @@
/* Metro module 7503; source: modules/activities/DeveloperActivityShelfStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 7504, 3829, 566, 694, 2] */
function _fun60481(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:6, offset: 0x01704658, size: 502 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ApplicationFlags;
({'lastUsedObject': null, 'useActivityUrlOverride': false, 'activityUrlOverride': null,
'filter': ''}).lastUsedObject = {};
object2 = {INITIALIZED: 'INITIALIZED', LOADING: 'LOADING', LOADED: 'LOADED', ERROR: 'ERROR'};
const env0_10 = object2.INITIALIZED;
const env0_11 = [];
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun60485(PersistedStore);
value.displayName = 'DeveloperActivityShelfStore';
value.persistKey = 'DeveloperActivityShelfStore';
value.migrations = [function(a0) {
delete a0.isEnabled;
var object = {};
copyDataProperties(object, a0, a0);
return object;
}];
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_60499,
DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE: DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE,
DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE: DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE,
DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED: DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED,
DEVELOPER_ACTIVITY_SHELF_FETCH_START: DEVELOPER_ACTIVITY_SHELF_FETCH_START,
DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS: DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS_60505,
DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL: DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL,
DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER: DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER,
USER_SETTINGS_PROTO_UPDATE: function() {
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/DeveloperActivityShelfStore.tsx');
exports.default = value;
exports.DevShelfFetchState = object2;
}
function _isNativeReflectConstruct_60482() { // fn#60482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:175, offset: 0x0170484e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_60482_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun60485(a0) { // fn#60485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:592, offset: 0x017048ac, size: 281 bytes, params: 2, frame: 16
const closure = DeveloperActivityShelfStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_60487}, {key: 'getState', value: value_60488},
{key: 'getIsEnabled', value: value_60489}, {key: 'getLastUsedObject', value: value_60490},
{key: 'getUseActivityUrlOverride', value: value_60491}, {key: 'getActivityUrlOverride', value: value_60492},
{key: 'getFetchState', value: function() {
return INITIALIZED;
}}, {key: 'getFilter', value: value_60494}, {key: 'getDeveloperShelfItems', value: value_60495},
{key: 'inDevModeForApplication', value: value_60496}]);
}
function LOGOUT_60499() { // fn#60499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1983, offset: 0x01704b16, size: 55 bytes, params: 1, frame: 2
({'lastUsedObject': null, 'useActivityUrlOverride': false, 'activityUrlOverride': null,
'filter': ''}).lastUsedObject = {};
env0_10 = env0_9.INITIALIZED;
env0_11 = [];
}
function DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE() { // fn#60500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2163, offset: 0x01704b4d, size: 26 bytes, params: 1, frame: 2
const binding = env0_8;
const useActivityUrlOverride = binding.useActivityUrlOverride;
binding.useActivityUrlOverride = !useActivityUrlOverride;
}
function DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE({activityUrlOverride}) { // fn#60501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2312, offset: 0x01704b67, size: 26 bytes, params: 2, frame: 2
env0_8.activityUrlOverride = activityUrlOverride;
}
function DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED({applicationId, timestamp}) { // fn#60502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2444, offset: 0x01704b81, size: 71 bytes, params: 2, frame: 14
if (env0_11.find(function({id}) {
return id === applicationId;
}) == null) {
return false;
}
env0_8.lastUsedObject[applicationId] = timestamp;
}
function DEVELOPER_ACTIVITY_SHELF_FETCH_START() { // fn#60504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2570, offset: 0x01704bc8, size: 21 bytes, params: 1, frame: 2
env0_10 = env0_9.LOADING;
}
function DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS_60505({applications}) { // fn#60505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2661, offset: 0x01704bdd, size: 51 bytes, params: 2, frame: 12
env0_10 = env0_9.LOADED;
env0_11 = applications.filter(function(a0) {
return require(dependencyMap[6]).hasApplicationFlag(a0, ApplicationFlags.EMBEDDED);
});
}
function DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL(a0) { // fn#60507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2852, offset: 0x01704c44, size: 29 bytes, params: 2, frame: 2
a0.type;
env0_10 = env0_9.ERROR;
}
function DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER({filter}) { // fn#60508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2976, offset: 0x01704c61, size: 25 bytes, params: 2, frame: 2
env0_8.filter = filter;
}
function value_60487(a0) { // fn#60487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:957, offset: 0x017049c5, size: 54 bytes, params: 2, frame: 12
copyDataProperties({'lastUsedObject': null, 'useActivityUrlOverride': false, 'activityUrlOverride': null,
'filter': '', lastUsedObject: {}}, a0 ?? ({}), null);
value = environment.__proto__;
}
function value_60489() { // fn#60489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1140, offset: 0x017049fb, size: 61 bytes, params: 1, frame: 12
const value = environment.__proto__;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
return DeveloperMode.getSetting() && env1_11.length > 0;
}
function value_60490() { // fn#60490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1238, offset: 0x01704a38, size: 15 bytes, params: 1, frame: 1
return env1_8.lastUsedObject;
}
function value_60491() { // fn#60491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1314, offset: 0x01704a47, size: 31 bytes, params: 1, frame: 9
return this.getIsEnabled() && env1_8.useActivityUrlOverride;
}
function value_60492() { // fn#60492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1416, offset: 0x01704a66, size: 33 bytes, params: 1, frame: 9
return this.getIsEnabled() ? env1_8.activityUrlOverride : null;
}
function value_60494() { // fn#60494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1555, offset: 0x01704a87, size: 34 bytes, params: 1, frame: 9
return this.getIsEnabled() ? env1_8.filter : '';
}
function value_60495() { // fn#60495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1643, offset: 0x01704aa9, size: 31 bytes, params: 1, frame: 9
const getIsEnabled = this.getIsEnabled;
return Reflect.apply(getIsEnabled, this, []) ? env1_11 : [];
}
function value_60496(a0) { // fn#60496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1725, offset: 0x01704ac8, size: 56 bytes, params: 2, frame: 12
var environment;
var r0;
const env0_0 = a0;
let value = this.getIsEnabled();
if (value) {
value = environment.__proto__;
value = env1_11.find(_fun60497);
value = value != null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,14 @@
/* Metro module 10597; source: modules/activities/MessageActivityInviteCoverImageActionCreators.tsx; dependencies: [694, 2] */
function _fun81710(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10783:6, offset: 0x01edafc0, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/MessageActivityInviteCoverImageActionCreators.tsx');
exports.setCoverImageURL = setCoverImageURL;
}
function setCoverImageURL({messageId, coverImageURL}) { // fn#81711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10783:213, offset: 0x01edb023, size: 71 bytes, params: 2, frame: 15
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'SET_MESSAGE_ACTIVITY_INVITE_COVER_IMAGE_URL', messageId: messageId,
coverImageURL: coverImageURL});
}
@@ -0,0 +1,68 @@
/* Metro module 10596; source: modules/activities/MessageActivityInviteCoverImageStore.tsx; dependencies: [6, 7, 15, 17, 18, 1393, 566, 694, 2] */
function _fun81702(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10782:6, offset: 0x01edad83, size: 318 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 */;
let value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 500});
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun81706(Store).displayName = 'MessageActivityInviteCoverImageStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{SET_MESSAGE_ACTIVITY_INVITE_COVER_IMAGE_URL: SET_MESSAGE_ACTIVITY_INVITE_COVER_IMAGE_URL});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/MessageActivityInviteCoverImageStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_81703() { // fn#81703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10782:148, offset: 0x01edaec1, 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_81703_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun81706(a0) { // fn#81706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10782:377, offset: 0x01edaf23, size: 72 bytes, params: 2, frame: 15
const closure = MessageActivityInviteCoverImageStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getCoverImageURL', value: value_81708}]);
}
function SET_MESSAGE_ACTIVITY_INVITE_COVER_IMAGE_URL({messageId, coverImageURL}) { // fn#81709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10782:971, offset: 0x01edaf86, size: 58 bytes, params: 2, frame: 14
const binding = env0_5;
const get = binding.get;
if (Reflect.apply(get, binding, [messageId]) === coverImageURL) {
return false;
}
env0_5.set(messageId, coverImageURL);
}
function value_81708({messageId}) { // fn#81708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10782:793, offset: 0x01edaf6b, size: 27 bytes, params: 2, frame: 11
return env1_5.get(messageId);
}
@@ -0,0 +1,63 @@
/* Metro module 10649; source: modules/activities/confirmActivityAgeGateAlert.native.tsx; dependencies: [31, 27, 33, 4501, 697, 10650, 4573, 1244, 4647, 1305, 2] */
function _fun81928(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10835:6, offset: 0x01ee3dd4, size: 274 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 INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_6 = Reflect.apply(createStyles, value, [{alertContainer: {'display': 'flex', 'alignItems': 'center',
'padding': 8}, alertBodyText: {'fontSize': 16, 'lineHeight': 24, 'color': null, 'textAlign': 'center',
color: INTERACTIVE_TEXT_DEFAULT}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/confirmActivityAgeGateAlert.native.tsx');
exports.confirmActivityAgeGateAlert = confirmActivityAgeGateAlert;
}
function ConfirmActivityGateContent({description}) { // fn#81929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10835:341, offset: 0x01ee3ee6, size: 154 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = ((Component) => <Component />)(importDefault(10650) /* metro dependency 10650: ActivityAnnouncement */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.alertContainer}>
{value2}
<Text style={styles.alertBodyText} variant="text-md/normal">
{description}
</Text>
</View>
);
}
function confirmActivityAgeGateAlert(a0) { // fn#81930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10835:664, offset: 0x01ee3f80, size: 362 bytes, params: 2, frame: 25
var object2;
const application = a0.application;
a0.channelId;
const onAgree = a0.onAgree;
const onDisagree = a0.onDisagree;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const OgmIqy = (require(1244) /* metro dependency 1244: indexNative */).t.OgmIqy;
const value2 = Reflect.apply(formatToPlainString, intl, [OgmIqy, {applicationName: application.name}]);
const Promise = global.Promise;
const resolve = Promise.resolve;
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
object2 = {};
const string = intl.string;
const SSDPOF = (require(1244) /* metro dependency 1244: indexNative */).t.SSDPOF;
object2.title = Reflect.apply(string, intl, [SSDPOF]);
object2.children = <ConfirmActivityGateContent description={value2} />;
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hg1uxn);
object2.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wVq7uo);
object2.onConfirm = onAgree;
object2.onCancel = onDisagree;
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
const RED = ButtonColors.RED;
object2.confirmColor = RED;
return Reflect.apply(resolve, Promise, [Reflect.apply(show, defaultImport, [object2])]);
}
@@ -0,0 +1,52 @@
/* Metro module 10648; source: modules/activities/confirmActivityChangeAlert.tsx; dependencies: [3793, 1878, 4805, 4647, 1244, 1861, 2] */
function _fun81926(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10834:6, offset: 0x01ee3b57, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/confirmActivityChangeAlert.tsx');
exports.default = confirmActivityChangeModal;
}
function confirmActivityChangeModal(a0, a1, a2, a3) { // fn#81927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10834:209, offset: 0x01ee3bdd, size: 503 bytes, params: 5, frame: 26
var r10;
var intl2;
var intl3;
let r8 = a1 != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(a1, UserStore,
RelationshipStore) : '';
const value2 = undefined;
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const XkIWkk = t.XkIWkk;
object3.title = Reflect.apply(string, intl, [XkIWkk]);
object3.cancelText = intl.string(t['ETE/oC']);
object3.confirmText = intl.string(t['cY+Oob']);
object3.onConfirm = a2;
object3.onCancel = a3;
const format = intl.format;
const property = t['5/Xort'];
const object4 = {};
const name = a0 == null ? value2 : a0.name;
if (name != null) {
r10 = name;
} else {
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r10 = intl2.string(t.G99XFs);
}
object4.currentApplicationName = r10;
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
if (stringUtilsModule.isNullOrEmpty(r8)) {
intl3 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl3.string(t.OGUjmt);
}
object4.currentApplicationChannelName = r8;
object3.body = Reflect.apply(format, intl, [property, object4]);
Reflect.apply(show, defaultImport, [object3]);
return value2;
}
@@ -0,0 +1,74 @@
/* Metro module 10651; source: modules/activities/confirmExternalAppLaunchAlert.native.tsx; dependencies: [31, 27, 4237, 33, 4501, 10652, 4573, 1244, 4578, 3853, 4647, 2] */
function _fun81933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10837:6, offset: 0x01ee4d61, size: 359 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.View;
const env0_5 = (require(4237) /* metro dependency 4237: Constants */).PRIVATE_APPS_HELP_ARTICLE;
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({alertContainer: {'display': 'flex',
'alignItems': 'center', 'padding': 8}, alertEyebrowText: {'marginTop': 40, 'textAlign': 'center'},
alertTitleText: {'marginTop': 16, 'textAlign': 'center'}, alertSubtitleText: {'marginTop': 16,
'textAlign': 'center'}, announcementBirb: {'width': 90, 'height': 100, 'position': 'absolute', 'top': -66},
linkWrapper: {marginTop: 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/confirmExternalAppLaunchAlert.native.tsx');
exports.confirmExternalAppLaunchAlert = confirmExternalAppLaunchAlert;
}
function ConfirmActivityGateContent_81934({application}) { // fn#81934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10837:529, offset: 0x01ee4ec8, size: 434 bytes, params: 2, frame: 28
const styles = useStyles();
const items2 = [<Image source={importDefault(10652) /* metro dependency 10652 */} style={styles.announcementBirb} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.alertEyebrowText} variant="eyebrow">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['06YebE'])}</Text>;
items2[2] = <Text style={styles.alertTitleText} variant="heading-lg/bold">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['Z/eMDT'],
{activityName: application.name})}</Text>;
items2[3] = <Text style={styles.alertSubtitleText} variant="text-sm/normal">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z81WwD)}</Text>;
return (
<View style={styles.alertContainer}>
{items2}
</View>
);
}
function LinkButton_81935() { // fn#81935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10837:1053, offset: 0x01ee507a, size: 160 bytes, params: 1, frame: 21
const styles = useStyles();
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const E0gf5l = (require(1244) /* metro dependency 1244: indexNative */).t.E0gf5l;
return (
<View style={styles.linkWrapper}>
<Button
variant="secondary"
size="sm"
onPress={function() {
importDefault(dependencyMap[9]).openURL(PRIVATE_APPS_HELP_ARTICLE);
}}
text={Reflect.apply(string, intl, [E0gf5l])}
/>
</View>
);
}
function confirmExternalAppLaunchAlert({application, onConfirm, onCancel}) { // fn#81937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10837:1380, offset: 0x01ee5144, size: 246 bytes, params: 2, frame: 23
const Promise = global.Promise;
const resolve = Promise.resolve;
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {title: ''};
object2.children = <ConfirmActivityGateContent_81934 application={application} />;
object2.onConfirm = onConfirm;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3PatSz']);
object2.onCancel = onCancel;
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
object2.footer = <LinkButton_81935 />;
return Reflect.apply(resolve, Promise, [Reflect.apply(show, defaultImport, [object2])]);
}
@@ -0,0 +1,11 @@
/* Metro module 13032; source: modules/activities/getActivitiesModalContextKey.native.tsx; dependencies: [2] */
function _fun99480(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13222:6, offset: 0x021ca73e, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/getActivitiesModalContextKey.native.tsx');
exports.getActivitiesModalContextKey = function(a0) {
a0.application;
a0.channelId;
};
}
@@ -0,0 +1,45 @@
/* Metro module 15703; source: modules/activities/getActivityReportOptions.tsx; dependencies: [4237, 1244, 2] */
function _fun120532(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15911:6, offset: 0x0252e58b, 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(4237) /* metro dependency 4237: Constants */).ActivityFeedbackReasons;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/getActivityReportOptions.tsx');
exports.default = getActivityReportOptions;
}
function getActivityReportOptions(a0) { // fn#120533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15911:221, offset: 0x0252e600, size: 591 bytes, params: 2, frame: 20
var push;
const value = a1;
const r1 = value !== undefined ? value : false;
const object2 = {};
const FAILED_LOAD = ActivityFeedbackReasons.FAILED_LOAD;
object2.value = FAILED_LOAD;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = a0 ? Reflect.apply(string, intl, [t.uaiF6B]) : Reflect.apply(string, intl, [t.aO6OMZ]);
const items2 = [object2];
const LAGGING = ActivityFeedbackReasons.LAGGING;
string = intl.string;
items2[1] = {value: LAGGING, label: a0 ? Reflect.apply(string, intl, [t['/nJOlj']]) : Reflect.apply(string, intl,
[t['79HFwf']])};
const CONFUSING = ActivityFeedbackReasons.CONFUSING;
string = intl.string;
items2[2] = {value: CONFUSING, label: a0 ? Reflect.apply(string, intl, [t['/8psS7']]) : Reflect.apply(string, intl,
[t.iSv55N])};
const NOT_FUN = ActivityFeedbackReasons.NOT_FUN;
string = intl.string;
items2[3] = {value: NOT_FUN, label: a0 ? Reflect.apply(string, intl, [t['7GVmLm']]) : Reflect.apply(string, intl,
[t.GnVff5])};
const OTHER = ActivityFeedbackReasons.OTHER;
items2[4] = {value: OTHER, label: intl.string(t.emlT91)};
if (r1) {
push = items2.push;
string = intl.string;
Reflect.apply(push, items2, [{value: ActivityFeedbackReasons.ADS, label: a0 ? Reflect.apply(string, intl,
[t['5o1UL6']]) : Reflect.apply(string, intl, [t.XeeDhK])}]);
}
return items2;
}
@@ -0,0 +1,31 @@
/* Metro module 8099; source: modules/activities/getShelfItemData.tsx; dependencies: [4234, 2] */
function _fun64950(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8284:6, offset: 0x01bba9d2, size: 104 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/getShelfItemData.tsx');
exports.default = function(a0) {
var r2;
var applicationId = a0.applicationId;
var env0_0 = applicationId;
var activityConfigs = a0.activityConfigs;
var applications = a0.applications;
var value = null;
r2 = value == applications ? undefined : applications.find(_fun64952);
r2 = value == r2 ? ApplicationStore.getApplication(applicationId) : r2;
var value6 = activityConfigs.find(_fun64953);
return value == value6 || value == r2 ? value : {activity: value6, application: r2};
};
}
function getShelfItemData({applicationId, activityConfigs, applications}) { // fn#64951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8284:189, offset: 0x01bbaa3a, size: 125 bytes, params: 2, frame: 16
let r2 = applications?.find(function({id}) {
return id === applicationId;
});
r2 = r2 ?? ApplicationStore.getApplication(applicationId);
const value6 = activityConfigs.find(function({application_id}) {
return application_id === applicationId;
});
return value6 == null || r2 == null ? null : {activity: value6, application: r2};
}
@@ -0,0 +1,28 @@
/* Metro module 8067; source: modules/activities/getURLForApplication.tsx; dependencies: [7505, 7503, 2] */
function _fun64045(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8245:6, offset: 0x01b99e44, size: 152 bytes, params: 8, frame: 20
const closure = function(a0) {
var ACTIVITY_APPLICATION_HOST = global.window.GLOBAL_ENV.ACTIVITY_APPLICATION_HOST;
var value = null;
return value == ACTIVITY_APPLICATION_HOST ? value : 'https://' + a0 + '.' + ACTIVITY_APPLICATION_HOST;
};
const closure2 = isUsingDevShelfActivityUrlOverride;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const testModeStore = importDefault(7505) /* metro dependency 7505: TestModeStore */;
const developerActivityShelfStore = importDefault(7503) /* metro dependency 7503: DeveloperActivityShelfStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/getURLForApplication.tsx');
exports.default = getURLForApplication;
exports.getNonTestModeUrlForApplication = closure;
exports.isUsingDevShelfActivityUrlOverride = closure2;
}
function isUsingDevShelfActivityUrlOverride() { // fn#64047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8245:250, offset: 0x01b99f1a, size: 57 bytes, params: 1, frame: 11
const state = DeveloperActivityShelfStore.getState();
const useActivityUrlOverride = state.useActivityUrlOverride;
return useActivityUrlOverride && state.activityUrlOverride != null && state.activityUrlOverride !== '';
}
function getURLForApplication(a0) { // fn#64048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8245:491, offset: 0x01b99f53, size: 86 bytes, params: 2, frame: 13
return isUsingDevShelfActivityUrlOverride() ? DeveloperActivityShelfStore.getState().activityUrlOverride : TestModeStore.inTestModeForEmbeddedApplication(a0) ? TestModeStore.testModeOriginURL : getNonTestModeUrlForApplication(a0);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,178 @@
/* Metro module 8106; source: modules/activities/handlePressJoinActivity.tsx; dependencies: [5, 4235, 1379, 1867, 3784, 1878, 4297, 1378, 8107, 8108, 4647, 1244, 6772, 7858, 8109, 2] */
function _fun64971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:6, offset: 0x01bbb5a2, size: 252 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = handlePressJoinActivity;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/handlePressJoinActivity.tsx');
exports.default = closure;
exports.maybeJoinEmbeddedActivity = function() {
return _maybeJoinEmbeddedActivity.apply(this, arguments);
};
}
function handlePressJoinActivity({embeddedActivityJoinability, handleCanJoin}) { // fn#64972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:176, offset: 0x01bbb69e, size: 973 bytes, params: 2, frame: 20
var defaultImport;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport2;
var defaultImport3;
var defaultImport4;
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
const CAN_JOIN = EmbeddedActivityJoinability.CAN_JOIN;
if (CAN_JOIN === embeddedActivityJoinability) {
if (handleCanJoin != null) {
handleCanJoin();
}
} else if (EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === embeddedActivityJoinability) {
(require(8108) /* metro dependency 8108: showActivitiesInvalidPermissionsAlert */).showActivitiesInvalidPermissionsAlert();
} else if (EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === embeddedActivityJoinability) {
defaultImport4 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport4.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t.UXoQTp);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport4, [object2]);
} else if (EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === embeddedActivityJoinability) {
defaultImport3 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport3.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t.uGDCcw);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport3, [object2]);
} else if (EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === embeddedActivityJoinability) {
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t['4WuFRE']);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport2, [object2]);
} else if (EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === embeddedActivityJoinability) {
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t.FUCQco);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
} else if (EmbeddedActivityJoinability.CHANNEL_FULL === embeddedActivityJoinability) {
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t.FUCQco);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
} else if (EmbeddedActivityJoinability.NO_CHANNEL === embeddedActivityJoinability) {
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t.FUCQco);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
} else if (EmbeddedActivityJoinability.NO_USER === embeddedActivityJoinability) {
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t.FUCQco);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
}
}
function _maybeJoinEmbeddedActivity() { // fn#64973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:1435, offset: 0x01bbba6b, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun64975).apply(this, arguments);
}
async function _fun64975({channelId, applicationId, launchId, inputApplication, analyticsLocations, launchingComponentId, sectionName, inviterUserId}) { // fn#64975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:1510, offset: 0x01bbbaad, size: 414 bytes, params: 2, frame: 23
var r12;
var currentUser;
var object3;
var value12;
var object4;
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_10;
const value7 = binding.getEmbeddedActivitiesForChannel(channelId).find(_fun64979);
if (inputApplication != null) {
r12 = inputApplication;
} else {
var value8 = env2_1(env2_2[12]);
await value8.fetchApplication(applicationId);
if (false) {
return undefined;
}
r12 = env2_4.createFromServer(undefined);
}
if (value7 != null) {
if (r12 != null) {
binding = env2_8;
currentUser = binding.getCurrentUser();
binding = env2_11;
object3 = {};
value12 = env2_1(env2_2[8]);
object4 = {};
object4.userId = currentUser == null ? value : currentUser.id;
object4.application = r12;
object4.channelId = channelId;
object4.currentUser = currentUser;
object4.isActivitiesEnabledForCurrentPlatform = env2_0(env2_2[13]).getIsActivitiesEnabledForCurrentPlatform();
object4.ChannelStore = env2_5;
object4.VoiceStateStore = env2_9;
object4.PermissionStore = env2_7;
object4.GuildStore = env2_6;
object3.embeddedActivityJoinability = value12(object4);
object3.handleCanJoin = function() {
return _handleCanJoin_64976.apply(this, arguments);
};
binding(object3);
}
}
return value;
}
function _handleCanJoin_64976() { // fn#64976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:2254, offset: 0x01bbbc4b, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__.__proto__;
return env3_3(_fun64978).apply(this, arguments);
}
function _fun64979(a0) { // fn#64979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:1704, offset: 0x01bbbd14, size: 54 bytes, params: 2, frame: 5
return a0.applicationId === applicationId && (launchId == null || a0.launchId === launchId);
}
function* _fun64978() { // fn#64978, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8291:2305, offset: 0x01bbbc87, size: 141 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__;
if (env2_7 != null) {
yield env5_1(env5_2[14])({applicationId: env2_7.applicationId, activityChannelId: env2_0,
locationObject: {},
analyticsLocations: env2_3, componentId: env2_4, sectionName: env2_5, inviterUserId: env2_6});
if (false) {
return undefined;
}
}
}
}
@@ -0,0 +1,198 @@
/* Metro module 9472; source: modules/activities/handleUsePrimaryEntryPointAppCommand.tsx; dependencies: [5, 1379, 1878, 9473, 8110, 8091, 9475, 7860, 2] */
function _fun73655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:6, offset: 0x01d74249, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/handleUsePrimaryEntryPointAppCommand.tsx');
exports.default = function() {
return _handleUsePrimaryEntryPointAppCommand.apply(this, arguments);
};
}
function _handleUsePrimaryEntryPointAppCommand() { // fn#73656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:126, offset: 0x01d742fc, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun73658).apply(this, arguments);
}
function _handleUsePrimaryEntryPointAppCommandInternal() { // fn#73661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:681, offset: 0x01d74442, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun73663).apply(this, arguments);
}
function* _fun73658(a0) { // fn#73658, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:223, offset: 0x01d74339, size: 188 bytes, params: 2, frame: 19
var environment;
var binding;
var binding2;
var property;
var value3;
var channelId;
var value4;
var value5;
var value6;
var binding3;
var value7;
var shouldOpenActivityInPopoutWindow;
var shouldOpenActivityInPopoutWindow2;
var error;
if (false) {
return undefined;
}
const env0_0 = a0;
var env0_1;
let targetApplicationId = a0.targetApplicationId;
if (targetApplicationId == null) {
return false;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
return false;
}
try {
binding2 = env2_3;
} catch (error) {
return false;
}
try {
property = binding2[3];
} catch (error) {
return false;
}
try {
value3 = binding(property);
} catch (error) {
return false;
}
try {
targetApplicationId = a0.targetApplicationId;
} catch (error) {
return false;
}
try {
channelId = a0.channelId;
} catch (error) {
return false;
}
try {
value4 = value3(targetApplicationId, channelId);
} catch (error) {
return false;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
return false;
}
if (value6) {
return value5;
}
try {
env0_1 = value5;
} catch (error) {
return false;
}
try {
binding = env2_0;
} catch (error) {
return false;
}
try {
binding3 = env2_3;
} catch (error) {
return false;
}
try {
property = binding3[4];
} catch (error) {
return false;
}
try {
value7 = binding(property);
} catch (error) {
return false;
}
try {
shouldOpenActivityInPopoutWindow = value7.shouldOpenActivityInPopoutWindow;
} catch (error) {
return false;
}
try {
shouldOpenActivityInPopoutWindow2 = Reflect.apply(shouldOpenActivityInPopoutWindow, value7, []);
} catch (error) {
return false;
}
return env2_0(env2_3[4]).wrapPreemptiveActivityPopout(shouldOpenActivityInPopoutWindow2, _fun73659);
}
async function _fun73663({targetApplication, locationObject, channelId, analyticsLocations, componentId, commandOrigin, sectionName, source, onExecutedCallback, referrerId, customId, inviterUserId, onConfirmActivityLaunchChecksAlertOpen}) { // fn#73663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:794, offset: 0x01d74488, size: 372 bytes, params: 2, frame: 33
var r5;
var value7;
var binding2;
var value10;
var markActivityUsed;
var id;
var runPrimaryAppCommandOrJoinEmbeddedActivity;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
const value4 = binding(env2_3[5])();
const currentUser = env2_6.getCurrentUser();
const value6 = channelId != null;
if (value6) {
binding = env2_5;
value7 = binding.getChannel(channelId) != null;
if (value7) {
r5 = currentUser != null && targetApplication != null;
if (r5) {
binding = env2_2;
binding2 = env2_3;
value10 = binding(binding2[6]);
markActivityUsed = value10.markActivityUsed;
id = targetApplication.id;
Reflect.apply(markActivityUsed, value10, [id]);
binding = env2_0;
value = binding(binding2[7]);
runPrimaryAppCommandOrJoinEmbeddedActivity = value.runPrimaryAppCommandOrJoinEmbeddedActivity;
id = targetApplication.id;
await Reflect.apply(runPrimaryAppCommandOrJoinEmbeddedActivity, value, [{channelId: channelId,
applicationId: id,
isStart: true, embeddedActivitiesManager: value4, componentId: componentId,
commandOrigin: commandOrigin,
sectionName: sectionName, locationObject: locationObject, analyticsLocations: analyticsLocations,
source: source, onExecutedCallback: onExecutedCallback, referrerId: referrerId, customId: customId,
inviterUserId: inviterUserId,
onConfirmActivityLaunchChecksAlertOpen: onConfirmActivityLaunchChecksAlertOpen}]);
value = undefined;
if (false) {
return value;
}
return value;
}
return r5;
}
return value7;
}
return value6;
}
function _fun73659() { // fn#73659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:452, offset: 0x01d743f5, size: 47 bytes, params: 1, frame: 12
const object2 = {};
copyDataProperties(object2, env0_0, object2);
object2['targetApplication'] = env0_1;
return handleUsePrimaryEntryPointAppCommandInternal(object2);
}
function handleUsePrimaryEntryPointAppCommandInternal() { // fn#73660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:456, offset: 0x01d74424, size: 30 bytes, params: 1, frame: 13
return env4_8.apply(this, arguments);
}
@@ -0,0 +1,26 @@
/* Metro module 12711; source: modules/activities/isActivityParticipantCurrentUserCurrentSession.tsx; dependencies: [1226, 2] */
function _fun97367(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12901:6, offset: 0x0217dfa0, size: 106 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/isActivityParticipantCurrentUserCurrentSession.tsx');
exports.isActivityParticipantCurrentUserCurrentSession = function(a0) {
var r3;
var r1;
var r0;
var value = a1;
r3 = value !== undefined ? value : AuthenticationStore;
value = r3.getId();
var value2 = r3.getSessionId();
value = a0.userId === value;
if (value) {
r1 = a0.sessionId == null || a0.sessionId === undefined;
r1 = !r1 ? a0.sessionId === value2 : r1;
r0 = r1;
} else {
r0 = value;
}
return r0;
};
}
@@ -0,0 +1,10 @@
/* Metro module 1908; source: modules/activities/isActivityParticipantValidGuildMember.tsx; dependencies: [2] */
function _fun20949(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2035:6, offset: 0x00ee6199, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/isActivityParticipantValidGuildMember.tsx');
exports.default = function(a0) {
return a0.member != null && a0.member.joined_at != null && a0.member.user.username !== '';
};
}
@@ -0,0 +1,76 @@
/* Metro module 15498; source: modules/activities/native/ActivitiesDebugOverlay.tsx; dependencies: [31, 27, 33, 4501, 4000, 697, 8095, 1585, 4573, 2] */
function _fun118674(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15695:6, offset: 0x024e761f, size: 292 bytes, params: 8, frame: 23
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.jsxs;
const env0_5 = value.jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
const env0_6 = Reflect.apply(createStyles, value, [{container: {'position': 'absolute', 'top': 0, 'left': 0,
'backgroundColor': null, 'paddingRight': 16, 'paddingBottom': 16, backgroundColor: Reflect.apply(hexWithOpacity,
colorUtilsModule, [BLACK, 0.7])}, row: {flexDirection: 'row'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/ActivitiesDebugOverlay.tsx');
exports.default = ActivitiesDebugOverlay;
}
function ActivitiesDebugOverlay() { // fn#118675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15695:446, offset: 0x024e7743, size: 508 bytes, params: 1, frame: 24
var r9;
var r10;
var SERIOUS;
var value10;
var value11;
const value2 = undefined;
const styles = useStyles();
const value3 = (importDefault(8095) /* metro dependency 8095: useThermalState */)();
const ThermalStates = (require(8095) /* metro dependency 8095: useThermalState */).ThermalStates;
const UNHANDLED = ThermalStates.UNHANDLED;
if (UNHANDLED === value3) {
r9 = '';
r10 = 'always-white';
} else if ((require(8095) /* metro dependency 8095: useThermalState */).ThermalStates.NOMINAL === value3) {
r9 = 'nominal';
r10 = 'text-feedback-positive';
} else if ((require(8095) /* metro dependency 8095: useThermalState */).ThermalStates.FAIR === value3) {
r9 = 'fair';
r10 = 'text-feedback-warning';
} else {
SERIOUS = (require(8095) /* metro dependency 8095: useThermalState */).ThermalStates.SERIOUS;
value10 = 'serious';
value11 = 'text-feedback-critical';
if (SERIOUS === value3) {
r9 = value10;
r10 = value11;
} else if ((require(8095) /* metro dependency 8095: useThermalState */).ThermalStates.CRITICAL !== value3) {
r9 = value2;
r10 = value2;
} else {
r9 = 'critical';
r10 = value11;
}
}
const {top, left} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.container];
items2[1] = {paddingTop: top + 16, paddingLeft: left + 16};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2} pointerEvents="none">
<View style={styles.row}>
<Text variant="text-md/normal" color="always-white">
{'thermal state:'}
{' '}
</Text>
<Text variant="text-md/normal" color={r10}>
{r9}
</Text>
</View>
</View>
);
}
@@ -0,0 +1,85 @@
/* Metro module 12071; source: modules/activities/native/ActivitiesPrivateChannelCallTooltip.tsx; dependencies: [31, 27, 4502, 4237, 33, 4501, 566, 4017, 4504, 1305, 1244, 4578, 2] */
function _fun92739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12257:6, offset: 0x020974ff, size: 367 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;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_5 = (require(4237) /* metro dependency 4237: Constants */).EMBEDDED_ACTIVITIES_BLOG_POST_URL;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
object = {duration: 500};
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({arrow: {'marginLeft': 200,
'top': 9, 'position': 'relative', 'borderTopWidth': 0, 'borderRightWidth': 0, 'borderBottomWidth': 16,
'borderLeftWidth': 16, transform: [{rotateZ: '225deg'}]}, tooltip: {padding: 16},
tooltipContainer: {'position': 'absolute', 'width': 280, 'zIndex': 2, 'right': -48, 'top': -8},
tooltipText: {'textAlign': 'center', 'fontSize': 14}, closeButtonWrapper: {marginTop: 14}});
object = {code: 'function ActivitiesPrivateChannelCallTooltipTsx1(){const{withRepeat,withSequence,withTiming,OFFSET,translateBounceOffset,TIMING_CONFIG}=this.__closure;return{transform:[{translateY:withRepeat(withSequence(withTiming(OFFSET,{duration:0}),withTiming(OFFSET+translateBounceOffset,TIMING_CONFIG),withTiming(OFFSET,TIMING_CONFIG)),10)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/ActivitiesPrivateChannelCallTooltip.tsx');
exports.default = ActivitiesPrivateChannelCallTooltip;
}
function ActivitiesPrivateChannelCallTooltip({onClosePress}) { // fn#92740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12257:1017, offset: 0x0209766e, size: 612 bytes, params: 2, frame: 26
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const r7 = useReducedMotion ? 0 : 4;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ActivitiesPrivateChannelCallTooltipT;
closure.__closure = {withRepeat: reanimatedRexportModule.withRepeat,
withSequence: reanimatedRexportModule.withSequence,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, OFFSET: 40,
translateBounceOffset: r7, TIMING_CONFIG: env0_7};
closure.__workletHash = 4621705591670;
closure.__initData = env0_9;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.tooltipContainer, value4];
const Tooltip = (require(1305) /* metro dependency 1305: native */).Tooltip;
const tooltipProps = {containerStyle: styles.tooltip, labelStyle: styles.tooltipText, arrowStyle: [styles.arrow]};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tooltipProps.label = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.xAW71b,
{helpdeskUrl: EMBEDDED_ACTIVITIES_BLOG_POST_URL});
const string = intl.string;
const HOPqzR = (require(1244) /* metro dependency 1244: indexNative */).t.HOPqzR;
tooltipProps.title = Reflect.apply(string, intl, [HOPqzR]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View2 style={items2}>
<Tooltip {...tooltipProps}>
<View style={styles.closeButtonWrapper}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])}
onPress={onClosePress}
variant="secondary"
size="sm"
grow
/>
</View>
</Tooltip>
</View2>
);
}
function ActivitiesPrivateChannelCallTooltipT() { // fn#92742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12257:1186, owner: ActivitiesPrivateChannelCallTooltip.T, offset: 0x020978d2, size: 174 bytes, params: 1, frame: 26
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withRepeat = reanimatedRexportModule.withRepeat;
const moduleValue2 = reanimatedRexportModule;
const withSequence = moduleValue2.withSequence;
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
const value2 = Reflect.apply(withTiming, timingModule, [40, {duration: 0}]);
const moduleValue4 = timingModule;
withTiming = moduleValue4.withTiming;
const value4 = 40 + env0_0;
const binding = env1_7;
value = Reflect.apply(withTiming, moduleValue4, [value4, binding]);
const moduleValue5 = timingModule;
value = Reflect.apply(withSequence, moduleValue2, [value2, value, moduleValue5.withTiming(40, binding)]);
return {transform: [{translateY: Reflect.apply(withRepeat, reanimatedRexportModule, [value, 10])}]};
}
@@ -0,0 +1,86 @@
/* Metro module 10650; source: modules/activities/native/ActivityAnnouncement.tsx; dependencies: [31, 33, 7744, 2] */
function _fun81931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10836:6, offset: 0x01ee40ea, size: 147 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 value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/ActivityAnnouncement.tsx');
exports.default = _default_81932;
}
function _default_81932(a0) { // fn#81932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10836:140, offset: 0x01ee417d, size: 3044 bytes, params: 2, frame: 27
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const defaultImportProps = {'width': 324, 'height': 227, 'fill': 'none', ...a0};
const Path = (require(7744) /* metro dependency 7744 */).Path;
const items2 = [<Path fill="#5865F2" d="m180.747 219.024 29.309.136s-13.284-17.969-30.586-3.674a2.005 2.005 0 0 0-.598 2.215 2.006 2.006 0 0 0 1.875 1.323ZM279.165 161.961l20.489 16.006a2.122 2.122 0 0 1-.058 3.413 2.13 2.13 0 0 1-1.238.397c-6.35-.045-16.711-1.75-23.911-11.113l4.718-8.703Z" />];
items2[1] = <Path fill="#242145" d="m190.667 112.195-2.682 37.96a138.277 138.277 0 0 0 .097 20.736s.279 37.15 3.564 39.126c6.765.959 13.802 9.143 13.802 9.143h9.895a2.08 2.08 0 0 0 1.509-.643 2.073 2.073 0 0 0 .578-1.534l-.246-5.333-2.806-60.621 23.892 34.072a8.718 8.718 0 0 0 9.02 3.467l30.054-6.648a2.896 2.896 0 0 0 2.236-2.495l2.086-18.792a1.985 1.985 0 0 0-1.475-2.138 1.984 1.984 0 0 0-.935-.014l-27.988 6.293-20.865-27.398a7.256 7.256 0 0 1-1.257-6.26c.991-3.654 1.723-9.895-2.294-15.467l-36.185-3.454Z" />;
items2[2] = <Path fill="url(#a)" d="M203.738 112.24c-10.264 46.727 8.242 106.92 8.242 106.92h-4.419c-17.386-53.11-7.329-107.568-7.329-108.19l3.506 1.27Z" />;
items2[3] = <Path fill="#000" d="m245.41 73.425 30.126 4.095a3.057 3.057 0 0 1 2.541 3.86 3.057 3.057 0 0 1-.915 1.46c-3.24 2.839-8.56 5.457-16.323 2.67l4.322 3.61a2.41 2.41 0 0 1 .793 2.5 2.416 2.416 0 0 1-1.953 1.75c-3.35.474-8.339-.388-13.841-6.693l-.35 2.637a3.06 3.06 0 0 1-4.536 2.274 16.336 16.336 0 0 1-7.458-8.89 7.04 7.04 0 0 1 4.075-8.844 7.043 7.043 0 0 1 3.519-.429Z" />;
items2[4] = <Path fill="#8CD9FF" d="m192.968 47.66-.136-3.052c2.249-1.587 2.139-6.033 2.139-6.033l-16.2-.382c.11 3.836 3.622 6.195 3.622 6.195l.039 3.493s-.11 15.889 9.908 23.84l12.312-5.664s-10.485-5.987-11.684-18.397Z" />;
items2[5] = <Path fill="#29CC7A" d="m192.968 47.66-.136-3.052c2.249-1.587 2.139-6.033 2.139-6.033l-16.2-.382c.11 3.836 3.622 6.195 3.622 6.195l.039 3.493s-.11 15.889 9.908 23.84l12.312-5.664s-10.485-5.987-11.684-18.397Z" />;
items2[6] = <Path fill="#91FFAD" d="M194.082 52.857a16.847 16.847 0 0 0-9.24 7.99 30.555 30.555 0 0 0 1.743 3.888c1.944-4.912 6.422-7.594 8.819-8.728a23.45 23.45 0 0 1-1.322-3.15Z" />;
items2[7] = <Path fill="#8CD9FF" d="m192.968 47.66-.136-3.052c2.249-1.587 2.139-6.033 2.139-6.033l-16.2-.382c.11 3.836 3.622 6.195 3.622 6.195l.039 3.493c.105 4.423.928 8.8 2.436 12.96a16.846 16.846 0 0 1 9.241-7.99 23.063 23.063 0 0 1-1.141-5.19Z" />;
items2[8] = <Path fill="#8CD9FF" d="M195.696 35.73c-1.549 2.852-1.445 5.496-3.065 5.107-1.737-.421-2.003-4.082-.454-6.927 1.549-2.845 4.834-4.692 6.059-3.39 1.225 1.303-1.024 2.366-2.54 5.21ZM262.246 136.553l.732 16.66c0 3.065-.732 5.067-3.052 7.018a25.312 25.312 0 0 1-5.437 3.739l12.027-2.702v-24.624l-4.27-.091Z" />;
items2[9] = <Path fill="#8CD9FF" d="m265.408 137.914 8.34 13.608 14.904-5.703a1.837 1.837 0 0 1 2.033.492c.165.185.292.401.371.636l1.562 4.646a.698.698 0 0 0 1.03.343.7.7 0 0 0 .266-.311c.745-1.944 2.261-4.685 5.067-5.637a.7.7 0 0 0 .071-1.296l-7.426-3.311a1.791 1.791 0 0 0-1.296-.065l-15.202 6.732-5.495-11.553-4.225 1.419Z" />;
items2[10] = <Path fill="url(#b)" d="M213.976 56.61a18.402 18.402 0 0 0 14.853 2.242 10.256 10.256 0 0 1 12.026 5.106c3.299 6.668 3.156 20.12-12.461 47.181l-1.542 4.484-36.184-3.428-.596-6.908c-5.832-9.843-1.899-19.88 2.145-23.075l21.759-25.603" />;
items2[11] = <Path fill="#5865F2" d="m240.519 67.165 35.892-12.046a3.81 3.81 0 0 1 4.75 5.041c-2.015 4.945-6.551 10.815-16.757 11.982l6.817 1.646a3.021 3.021 0 0 1 1.05 5.391c-3.474 2.378-9.526 4.167-19.142.156l1.062 3.136c.862 2.553-1.14 4.633-3.803 5.041-3.163.48-9.468-.959-12.649-6.227-6.532-10.802-3.415-12.04 2.78-14.12Z" />;
items2[12] = <Path fill="#3442D9" d="M69.277 30.184s30.897 30.994 67.263 6.143c0 0-19.622 84.765 8.314 146.059 0 0-28.979-12.493-42.846-49.384 0 0-12.033 19.971-13.2 47.641 0 0-34.415-53.486-19.53-150.46Z" />;
items2[13] = <Path fill="url(#c)" d="M132.879 163.477s-19.531-32.581-2.975-123.184c-23.386 12.033-43.72 2.268-53.849-4.653a23.975 23.975 0 0 1-2.183-1.484c-2.275 18.43-6.428 80.657 12.409 122.258 0 0 3.402-22.498 17.269-36.89.026 0 11.275 32.445 29.329 43.953Z" />;
items2[14] = <Path fill="#91FFAD" d="M190.071 105.287s13.738 7.938 38.323 5.832l-1.542 4.484s-17.943 2.592-36.185-3.428l-.596-6.888Z" />;
items2[15] = <Path fill="#3442D9" d="M87.596 175.329s-9.13 21.255 3.24 20.678a7.99 7.99 0 0 0 4.362-1.445c2.844-2.106 5.631-7.387-7.602-19.233ZM141.037 178.103s1.471 23.082 12.234 16.977a7.89 7.89 0 0 0 3.24-3.24c1.601-3.188 1.685-9.162-15.474-13.737Z" />;
items2[16] = <Path fill="url(#d)" d="m248.482 183.851 31.33-6.48.804-7.252-30.417 8.956a8.706 8.706 0 0 1-9.416-3.124l-27.216-35.601.448 5.23 25.66 34.895a8.726 8.726 0 0 0 3.907 2.982 8.728 8.728 0 0 0 4.9.394Z" />;
items2[17] = <Path fill="#000" d="M256.057 82.659a.976.976 0 0 1-.421-.097 40.245 40.245 0 0 1-5.729-3.558.975.975 0 0 1-.194-1.36.973.973 0 0 1 1.361-.195 39.139 39.139 0 0 0 5.404 3.363.976.976 0 0 1 .524 1.091.972.972 0 0 1-.945.756Z" />;
items2[18] = <Path fill="#EB459F" d="M242.488 14.684c-.059.22 8.288-8.651 1.03-11.14-7.258-2.488.959 4.07-1.03 11.14Z" />;
items2[19] = <Path fill="#EB459F" d="M242.397 14.509s9.202-11.38 15.838-3.713c6.635 7.665-9.111.687-15.838 3.713Z" />;
items2[20] = <Path fill="url(#e)" d="M223.016 61.203c11.849 0 21.455-9.605 21.455-21.455 0-11.85-9.606-21.455-21.455-21.455-11.85 0-21.455 9.606-21.455 21.455 0 11.85 9.605 21.456 21.455 21.456Z" />;
items2[21] = <Path fill="#EB459F" d="M254.534 41.57s6.889 11.436-.414 15.454c-15.481 8.424-19.019-20.004-19.019-20.004-11.988 19.291-13.012-14.074-13.012-14.074s-28.784 5.637-22.771-11.282c0 0 3.474-8.534 14.84-.356 0 0 3.59 3.272 10.419-.227 9.131-4.685 21.929-1.523 24.469 11.016 0 0 2.644 10.09 13.064 9.201 10.419-.887 4.412 19.706-7.576 10.271Z" />;
items2[22] = <Path fill="#000" d="M218.175 38.575c-.7-.53-1.497-.919-2.345-1.147a6.975 6.975 0 0 0-7.867 3.189 7.461 7.461 0 0 1-3.83-.525.97.97 0 0 0-1.389 1.08.97.97 0 0 0 .404.592c1.23.61 2.594.9 3.966.842h.058a6.997 6.997 0 0 0 4.958 8.314c.363.098.734.167 1.108.207h.11a.97.97 0 0 0 1.02-.923.973.973 0 0 0-.923-1.02 5.053 5.053 0 0 1-4.479-4.389 5.046 5.046 0 0 1 2.516-5.02 4.995 4.995 0 0 1 3.836-.487 5.059 5.059 0 0 1 1.698.83.97.97 0 0 0 1.575-.518.973.973 0 0 0-.416-1.038v.013ZM212.959 30.456c.985-1.063 1.84-1.555 1.464-2.184-.479-.784-2.436.11-3.622 1.653-1.069 1.393-1.445 3.24-.862 3.784h.032c.558.473 1.64-.5 3.351-.953 1.892-.499 3.278 0 3.343-1.043.065-1.043-1.885-1.633-3.706-1.257Z" />;
items2[23] = <Path fill="url(#f)" d="M202.091 33.696a1.807 1.807 0 0 0-1.25.402 7.946 7.946 0 0 1-5.45 1.691L73.931 24.624a56.118 56.118 0 0 1-22.15-6.817L36.69 9.383a5.787 5.787 0 0 0-7.776 2.048c-5.184 8.612-3.713 17.95-1.945 23.69a5.83 5.83 0 0 0 7.375 3.765l15.947-5.365a56.099 56.099 0 0 1 23.03-2.696l120.528 11.062a7.662 7.662 0 0 1 5.586 3.35 2.006 2.006 0 0 0 1.445.991c1.665.162 3.285-2.514 3.622-5.974.337-3.46-.739-6.39-2.411-6.558Z" />;
items2[24] = <Path fill="#000" d="M36.937 24.277c.476-6.543-1.135-11.992-3.598-12.17-2.463-.18-4.845 4.979-5.321 11.521-.476 6.543 1.135 11.992 3.598 12.171 2.462.18 4.845-4.98 5.32-11.522Z" />;
items2[25] = <Path fill="#8CD9FF" d="M179.982 28.862c-1.944-.26-3.356 1.983-2.903 3.888.571 2.398 1.944 5.249 5.139 6.013 1.569.37 3.171.574 4.782.61a6.96 6.96 0 0 0 7.083-6.001c.253-1.866.123-4.432-2.262-4.121-6.292.823-6.123.362-11.839-.39Z" />;
items2[26] = <Path fill="#57F287" d="M212.414 58.463c-11.56-4.62-17.865 11.268-17.865 11.268-15.753-9.622-21.384-25.92-21.384-25.92l-.111-1.691a14.975 14.975 0 0 1 .098-3.188 20.99 20.99 0 0 0-.136-7.44 4.933 4.933 0 0 0-2.315-3.124 4.925 4.925 0 0 0-3.861-.472l-.939.273a11.365 11.365 0 0 1-4.692.324l-1.801-.247a4.34 4.34 0 0 0-3.475 1.04 4.33 4.33 0 0 0-1.47 3.316c.059 7.516 6.817 15.778 6.817 15.778s8.385 44.77 31.506 42.71c27.495-2.457 29.251-28.772 19.628-32.627Z" />;
items2[27] = <Path fill="#91FFAD" d="M177.351 52.183c-5.832 3.059-9.02 10.699-10.407 14.982a80.718 80.718 0 0 0 2.242 5.048c1.886-8.903 8.055-13.977 10.958-15.908a50.157 50.157 0 0 1-2.793-4.122Z" />;
items2[28] = <Path fill="#29CC7A" d="M209.654 86.832a.81.81 0 0 1-.512-1.439c7.212-5.76 8.722-14.288 8.735-14.372a.814.814 0 0 1 .933-.668.81.81 0 0 1 .667.933 27.116 27.116 0 0 1-9.318 15.37.783.783 0 0 1-.505.176Z" />;
items2[29] = <Path fill="#8CD9FF" d="M173.054 42.12a14.975 14.975 0 0 1 .098-3.188 20.99 20.99 0 0 0-.136-7.44 4.933 4.933 0 0 0-2.315-3.124 4.925 4.925 0 0 0-3.861-.472l-.939.273a11.365 11.365 0 0 1-4.692.324l-1.801-.247a4.34 4.34 0 0 0-3.475 1.04 4.33 4.33 0 0 0-1.47 3.316c.059 7.516 6.817 15.778 6.817 15.778a110.157 110.157 0 0 0 5.651 18.792c1.387-4.284 4.588-11.923 10.407-14.982a47.609 47.609 0 0 1-4.154-8.353l-.13-1.717Z" />;
items2[30] = <Path fill="#3F99F2" d="M184.032 39.113a19.099 19.099 0 0 1-.693-6.09.816.816 0 0 0-.458-.778.808.808 0 0 0-.307-.078.805.805 0 0 0-.855.758c-.086 1.96.095 3.921.538 5.832.596.162 1.186.266 1.775.356ZM189.216 39.074a19.622 19.622 0 0 1-.57-5.65.812.812 0 0 0-.758-.91.807.807 0 0 0-.793.495.818.818 0 0 0-.063.324c-.09 2.028.104 4.059.577 6.033a7.323 7.323 0 0 0 1.607-.292Z" />;
items2[31] = <Path fill="#000" d="m266.516 136.65-4.27-.097.376 8.573c1.069.266 2.21.084 3.888-.421l.006-8.055Z" />;
items2[32] = <Path fill="#000" d="m269.627 136.469-4.219 1.445 3.921 6.389a6.62 6.62 0 0 0 3.7-.687l-3.402-7.147Z" />;
items2[33] = <Path fill="#EB459F" d="m272.893 101.036 2.592-4.043a3.882 3.882 0 0 1 4.197-1.71c.524.126 1.017.36 1.447.686l2.592 1.944a1 1 0 0 1-.875 1.756l-2.041-.583a5.346 5.346 0 0 0-3.467.175l-4.445 1.775Z" />;
items2[34] = <Path fill="url(#g)" d="M260.832 108.125s-16.031-1.367-13.983 15.688c2.047 17.056 39.884 27.54 48.431-8.359 2.56-10.744-15.688-.168-15.688-.168s.68-31.208-18.76-7.161Z" />;
items2[35] = <Path fill="url(#h)" d="m263.678 106.499-3.033-.875a22.842 22.842 0 0 1-8.294-4.536l-5.741-4.886a1.887 1.887 0 0 0-2.489 0c-3.492 3.175-3.376 7.854-2.987 10.368a1.877 1.877 0 0 0 2.106 1.568l7.271-.926a22.865 22.865 0 0 1 9.409.764l3.032.901a1.298 1.298 0 0 0 1.581-.868 1.294 1.294 0 0 0-.855-1.51Z" />;
items2[36] = <Path fill="#000" d="M245.891 103.128c.766-2.724.543-5.17-.498-5.463-1.041-.293-2.506 1.679-3.272 4.403-.766 2.725-.544 5.171.497 5.463 1.041.293 2.506-1.678 3.273-4.403Z" />;
items2[37] = <Path fill="#5865F2" d="M288.528 118.94c.707 1.296-.557 3.305-2.592 4.88-1.814 5.722-4.892 6.732-6.875 7.342-2.644.803-6.311.337-7.951-2.631-1.639-2.968-1.166-6.37 2.022-8.126 3.188-1.756 13.763-4.413 15.396-1.465Z" />;
items2[38] = <Path fill="#000" d="M268.408 108.404a.969.969 0 0 1-.863-.527.978.978 0 0 1 .073-1.009c.097-.13 2.384-3.298 6.395-2.702a.993.993 0 0 1 .362.128.98.98 0 0 1 .339 1.348.981.981 0 0 1-.986.468 4.947 4.947 0 0 0-4.536 1.912.963.963 0 0 1-.784.382ZM285.956 123.82c-2.184 1.49-5.236 1.393-5.269 1.393a.958.958 0 0 0-1.01.927.96.96 0 0 0 .257.699.985.985 0 0 0 .676.312h.246a13.118 13.118 0 0 0 3.979-.648c.456-.858.832-1.756 1.121-2.683Z" />;
items2[39] = <Path fill="#91FFAD" d="M40.824 159.168a10.869 10.869 0 0 1-4.931-7.646l-.817-5.34a.57.57 0 0 0-.175-.337.493.493 0 0 0-.35-.148.495.495 0 0 0-.35.148.61.61 0 0 0-.174.337l-.817 5.34a11.017 11.017 0 0 1-4.931 7.646l-.706.447a.564.564 0 0 0-.169.707.54.54 0 0 0 .169.194l.706.447a11.026 11.026 0 0 1 4.931 7.647l.817 5.339a.53.53 0 0 0 1.05 0l.816-5.339c.225-1.553.78-3.04 1.626-4.362a10.88 10.88 0 0 1 3.305-3.285l.706-.447a.538.538 0 0 0 .227-.447.556.556 0 0 0-.227-.454l-.706-.447Z" />;
items2[40] = <Path fill="#8CD9FF" d="M155.229 119.796a8.415 8.415 0 0 1-2.545-2.534 8.415 8.415 0 0 1-1.259-3.363l-.648-4.115a.42.42 0 0 0-.136-.259.36.36 0 0 0-.269-.116.367.367 0 0 0-.269.116.42.42 0 0 0-.136.259l-.648 4.115a8.562 8.562 0 0 1-3.804 5.897l-.544.343a.342.342 0 0 0-.13.156.435.435 0 0 0 0 .388.361.361 0 0 0 .13.149l.544.344a8.563 8.563 0 0 1 3.804 5.903l.648 4.115a.423.423 0 0 0 .136.246.406.406 0 0 0 .266.097.41.41 0 0 0 .272-.097.423.423 0 0 0 .136-.246l.648-4.115a8.504 8.504 0 0 1 1.257-3.369 8.432 8.432 0 0 1 2.547-2.534l.544-.344a.348.348 0 0 0 .13-.149.422.422 0 0 0 .045-.194.383.383 0 0 0-.045-.194.336.336 0 0 0-.13-.156l-.544-.343Z" />;
items2[41] = <Path fill="#FF78B9" d="M306.31 106.343a8.555 8.555 0 0 1-2.547-2.533 8.377 8.377 0 0 1-1.251-3.364l-.648-4.114a.392.392 0 0 0-.136-.26.413.413 0 0 0-.265-.116.438.438 0 0 0-.273.116.411.411 0 0 0-.129.26l-.648 4.114a8.597 8.597 0 0 1-1.264 3.357 8.463 8.463 0 0 1-2.54 2.54l-.544.344a.398.398 0 0 0-.13.149.435.435 0 0 0-.045.201.422.422 0 0 0 .045.194c.03.06.075.111.13.149l.544.343a8.51 8.51 0 0 1 3.804 5.897l.648 4.115a.397.397 0 0 0 .402.35.408.408 0 0 0 .265-.097.417.417 0 0 0 .136-.253l.648-4.115a8.378 8.378 0 0 1 1.251-3.363 8.559 8.559 0 0 1 2.547-2.534l.55-.343a.476.476 0 0 0 .13-.149.42.42 0 0 0 .039-.194.433.433 0 0 0-.039-.201.476.476 0 0 0-.13-.149l-.55-.344ZM48.302 84.694a8.458 8.458 0 0 1-2.54-2.534 8.289 8.289 0 0 1-1.258-3.363l-.648-4.115a.414.414 0 0 0-.13-.26.446.446 0 0 0-.271-.116.402.402 0 0 0-.266.117.395.395 0 0 0-.136.259l-.648 4.115a8.521 8.521 0 0 1-3.797 5.897l-.551.343a.48.48 0 0 0-.13.15.364.364 0 0 0-.039.2.35.35 0 0 0 .04.194.48.48 0 0 0 .129.15l.55.343a8.605 8.605 0 0 1 2.534 2.54 8.495 8.495 0 0 1 1.296 3.357l.648 4.114a.408.408 0 0 0 .804 0l.648-4.114a8.289 8.289 0 0 1 1.257-3.364 8.458 8.458 0 0 1 2.54-2.533l.55-.344a.48.48 0 0 0 .13-.149.35.35 0 0 0 .04-.194.362.362 0 0 0-.04-.2.48.48 0 0 0-.13-.15l-.582-.343Z" />;
items2[42] = <Path fill="#FFE75C" d="M58.222 139.275a7.139 7.139 0 0 1-3.24-5.042l-.55-3.512a.366.366 0 0 0-.117-.22.315.315 0 0 0-.355-.071.309.309 0 0 0-.105.071.366.366 0 0 0-.117.22l-.538 3.512a7.296 7.296 0 0 1-3.24 5.042l-.466.291a.355.355 0 0 0-.11.13.374.374 0 0 0 0 .33.355.355 0 0 0 .11.13l.466.298a7.128 7.128 0 0 1 2.165 2.171c.56.866.93 1.843 1.082 2.864l.538 3.512a.37.37 0 0 0 .116.214.358.358 0 0 0 .46 0 .371.371 0 0 0 .117-.214l.538-3.512a7.125 7.125 0 0 1 3.24-5.035l.466-.298a.355.355 0 0 0 .11-.13.374.374 0 0 0 0-.33.355.355 0 0 0-.11-.13l-.46-.291Z" />;
items2[43] = <Path fill="#fff" d="M88.341 88.128c-1.367 1.374-1.82 6.713-1.82 6.713s5.346-.447 6.72-1.814a3.48 3.48 0 0 0 1.004-2.3H90.66v-3.59c-.87.029-1.697.382-2.32.99Z" />;
items2[44] = <Path fill="#fff" fillRule="evenodd" d="m90.292 83.8 7.284 7.276 1.82-1.82 1.368 5.922 2.274-2.28v-7.284l4.536-4.536c1.821-1.821 5.463-6.195 3.642-10.925-4.737-1.821-9.072 1.82-10.925 3.641L90.292 83.8Zm14.34-4.485a2.59 2.59 0 0 0 1.833-4.425 2.59 2.59 0 0 0-3.988.393 2.59 2.59 0 0 0 2.155 4.032Z" clipRule="evenodd" />;
items2[45] = <Path fill="#fff" d="M95.755 78.33H88.47l-2.287 2.281 5.916 1.361 3.655-3.642Z" />;
items2[46] = <Path fill="#29CC7A" d="M199.098 71.28h.071a.81.81 0 1 0 .065-1.62 10.545 10.545 0 0 1-3.986-1.458c-.408.803-.648 1.348-.686 1.47a11.822 11.822 0 0 0 4.536 1.608Z" />;
items2[47] = <Path fill="#000" d="m268.92 73.224-4.498-1.089a11.725 11.725 0 0 1-3.816-.37.974.974 0 0 0-1.136 1.347c.104.225.29.402.52.494 1.203.353 2.453.522 3.707.5a16.275 16.275 0 0 0 5.074-.824c.05-.016.1-.036.149-.058Z" />;
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
const LinearGradient = (require(7744) /* metro dependency 7744 */).LinearGradient;
const Stop = (require(7744) /* metro dependency 7744 */).Stop;
let value = <Stop stopColor="#FFE75C" />;
value = <LinearGradient id="a" x1={204.665} x2={204.665} y1={110.97} y2={219.147} gradientUnits="userSpaceOnUse">{value}<Stop offset={1} stopColor="#FFC619" /></LinearGradient>;
const items3 = [value];
items3[1] = <LinearGradient id="b" x1={221.642} x2={205.481} y1={54.413} y2={125.699} gradientUnits="userSpaceOnUse"><Stop offset={0.24} stopColor="#57F287" /><Stop offset={0.66} stopColor="#29CC7A" /></LinearGradient>;
const items5 = [<Stop offset={0.29} stopColor="#5865F2" />];
items5[1] = <Stop offset={0.51} stopColor="#5D6AF4" />;
items5[2] = <Stop offset={0.76} stopColor="#6C77F8" />;
items5[3] = <Stop offset={1} stopColor="#808AFF" />;
items3[2] = <LinearGradient id="c" x1={102.364} x2={102.364} y1={163.477} y2={34.156} gradientUnits="userSpaceOnUse">{items5}</LinearGradient>;
items3[3] = <LinearGradient id="d" x1={247.101} x2={247.101} y1={140.357} y2={184.032} gradientUnits="userSpaceOnUse"><Stop stopColor="#FFE75C" /><Stop offset={1} stopColor="#FFC619" /></LinearGradient>;
items3[4] = <LinearGradient id="e" x1={223.016} x2={223.016} y1={61.203} y2={18.287} gradientUnits="userSpaceOnUse"><Stop stopColor="#66BCFF" /><Stop offset={1} stopColor="#8CD9FF" /></LinearGradient>;
items3[5] = <LinearGradient id="f" x1={114.955} x2={114.955} y1={8.677} y2={46.235} gradientUnits="userSpaceOnUse"><Stop stopColor="#FFE75C" /><Stop offset={1} stopColor="#FFC619" /></LinearGradient>;
items3[6] = <LinearGradient id="g" x1={268.375} x2={279.113} y1={107.996} y2={148.729} gradientUnits="userSpaceOnUse"><Stop offset={0.24} stopColor="#57F287" /><Stop offset={0.66} stopColor="#29CC7A" /></LinearGradient>;
items3[7] = <LinearGradient id="h" x1={252.766} x2={252.766} y1={95.755} y2={108.987} gradientUnits="userSpaceOnUse"><Stop stopColor="#FFE75C" /><Stop offset={1} stopColor="#FFC619" /></LinearGradient>;
items2[48] = <Defs>{items3}</Defs>;
return ((Component) => <Component {...defaultImportProps}>{items2}</Component>)(defaultImport);
}
@@ -0,0 +1,76 @@
/* Metro module 15702; source: modules/activities/native/ActivityFeedbackActionSheet.tsx; dependencies: [31, 4237, 661, 9906, 33, 683, 15703, 9927, 1244, 9909, 3856, 15704, 2] */
function _fun120528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15910:6, offset: 0x0252e186, size: 242 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 ActivityFeedbackReasons = (require(4237) /* metro dependency 4237: Constants */).ActivityFeedbackReasons;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_5 = (require(9906) /* metro dependency 9906: Constants */).FeedbackType;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const OTHER = ActivityFeedbackReasons.OTHER;
items = [OTHER];
const ADS = ActivityFeedbackReasons.ADS;
items[1] = ADS;
const NOT_FUN = ActivityFeedbackReasons.NOT_FUN;
items[2] = NOT_FUN;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/ActivityFeedbackActionSheet.tsx');
exports.default = ActivityFeedbackActionSheet;
}
function ActivityFeedbackActionSheet({activityApplication, channel, embeddedActivityLocation, analyticsData}) { // fn#120529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15910:330, offset: 0x0252e278, size: 359 bytes, params: 2, frame: 25
const value3 = (importDefault(15703) /* metro dependency 15703: getActivityReportOptions */)(true,
activityApplication.embeddedActivityConfig?.displays_advertisements === true);
const FeedbackActionSheet = importDefault(9927) /* metro dependency 9927: FeedbackActionSheet */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const QXYwoD = (require(1244) /* metro dependency 1244: indexNative */).t.QXYwoD;
object2.headerLabel = Reflect.apply(formatToPlainString, intl, [QXYwoD,
{applicationName: activityApplication.name}]);
object2.showHeaderCloseButton = true;
object2.ratingsBodyLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9hk2KF']);
object2.reasonsHeaderLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g1q5fr);
object2.reasons = value3;
object2.feedbackReasons = env0_7;
const OTHER = ActivityFeedbackReasons.OTHER;
object2.otherKey = OTHER;
object2.trackOpen = function() {
var activityApplicationBinding = activityApplication;
var defaultImport = importDefault(dependencyMap[5]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: 'Activity Feedback Sheet',
application_id: activityApplicationBinding.id,
application_name: activityApplicationBinding.name, game_id: activityApplicationBinding.id,
source: 'Activity End'});
};
object2.trackReport = trackReport;
return <FeedbackActionSheet {...object2} />;
}
function ActivityFeedbackActionSheetTrackReport({rating, reason, feedback, dontShowAgain}) { // fn#120531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15910:1026, owner: ActivityFeedbackActionSheet.trackReport, offset: 0x0252e44c, size: 319 bytes, params: 2, frame: 21
var value3;
var defaultImport;
var value5;
var defaultImport2;
let value = null;
const r4 = value != reason ? reason.value : value;
if (dontShowAgain) {
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.ACTIVITY_REPORT_DONT_SHOW, {application_id: activityApplication.id,
rating: rating});
(require(9909) /* metro dependency 9909: FeedbackUtils */).processOptOut({feedbackType: FeedbackType.ACTIVITY,
location: 'ActivityFeedbackActionSheet'});
}
if (value != rating) {
value5 = environment.__proto__;
(require(3856) /* metro dependency 3856: ToastUtils */).presentFeedbackSent();
defaultImport2 = importDefault(15704) /* metro dependency 15704: trackActivityProblem */;
value = '';
defaultImport2({problem: r4, channel: channel, embeddedActivityLocation: embeddedActivityLocation,
feedback: value != feedback ? feedback : value, activityApplication: activityApplication,
analyticsData: analyticsData, location: 'Activity End', rating: rating});
}
}
@@ -0,0 +1,237 @@
/* Metro module 13034; source: modules/activities/native/ActivityShareLinkModal.tsx; dependencies: [5, 57, 31, 27, 1379, 1878, 1378, 7690, 4503, 33, 4501, 697, 566, 7232, 8809, 13033, 6777, 1360, 13035, 7067, 7076, 3857, 1244, 6797, 3856, 1478, 477, 5287, 9603, 5282, 5277, 4056, 7704, 9761, 9789, 2] */
function _fun99485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:6, offset: 0x021ca902, size: 465 bytes, params: 8, frame: 22
var object3;
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_10 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_11 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
let value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingVertical = PX_8;
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object3.headerContainer = object4;
object3.header = {'borderBottomWidth': 0, 'shadowColor': 'transparent', 'backgroundColor': 'transparent'};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.container = {'flex': 1, 'display': 'flex', backgroundColor: BACKGROUND_BASE_LOWER};
const env0_14 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/ActivityShareLinkModal.tsx');
exports.default = ActivityShareLinkModal;
}
function ActivityShareLinkModal({applicationId, customId, linkId, message, onShare}) { // fn#99486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:695, offset: 0x021caad3, size: 1220 bytes, params: 2, frame: 36
const env0_3 = message;
const env0_4 = onShare;
const styles = useStyles();
const connectedActivityChannelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getConnectedActivityChannelId();
});
const binding = connectedActivityChannelId;
const value3 = binding.useMemo(_fun99488, [connectedActivityChannelId]);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value7[0];
const env0_8 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [[]]), 2);
const property3 = value8[0];
const env0_10 = value8[1];
const length = property3.length;
const value9 = binding.useCallback(_fun99489, []);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property4 = value10[0];
binding.useEffect(_fun99491, [applicationId, currentUser, customId, linkId, value10[1]]);
const value11 = binding.useCallback(_fun99492, [property2, onShare]);
const value13 = binding.useCallback(env0_3(_fun99494),
[binding2((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([applicationId]), 1)[0],
property2, property4, message, onShare, property3]);
const env0_15 = binding.useCallback(_fun99499, [property4]);
const value14 = binding.useMemo(_fun99500,
[(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true}).height]);
const Header = (require(5287) /* metro dependency 5287 */).Header;
const headerProps = {headerStyle: styles.header};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.r9qKow);
headerProps.headerTitle = headerTitle_99501;
headerProps.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(value11);
headerProps.headerRight = headerRight_99502;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
headerProps.headerStatusBarHeight = platformUtilsModule.isIOS() ? 0 : undefined;
headerProps.headerTitleAlign = 'center';
const view = <View style={styles.headerContainer}><Header {...headerProps} /></View>;
const viewBinding2Props = {style: styles.container};
const items2 = [((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)];
const SearchableDestinationList = importDefault(9761) /* metro dependency 9761: SearchableDestinationList */;
const TOGGLE = UserRowModes.TOGGLE;
items2[1] = <SearchableDestinationList disableGradient disableStickySections initialSelectedDestinations={[]} insetEnd={0} onSelectedDestinationChange={value9} originDestination={value3} rowMode={TOGGLE} />;
const ModalFloatingAction = (require(9789) /* metro dependency 9789: ModalFloatingActionNative */).ModalFloatingAction;
items2[2] = <ModalFloatingAction disabled={property} floatingBackgroundColor={styles.container.backgroundColor} isVisible={length > 0} loading={property} onPress={property ? undefined : value13} text={length === 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.jWtYUm,
{count: length})} />;
return (
<View style={value14}>
{view}
<View {...viewBinding2Props}>
{items2}
</View>
</View>
);
}
function _fun99488() { // fn#99488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:884, offset: 0x021cafaa, size: 60 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
if (connectedActivityChannelId != null) {
value3 = environment.__proto__;
moduleValue = require(7232) /* metro dependency 7232: formatResults */;
r0 = moduleValue.getDestinationIdFromChannelId(connectedActivityChannelId);
} else {
r0 = undefined;
}
return r0;
}
function _fun99491() { // fn#99491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:1227, offset: 0x021cafe6, size: 107 bytes, params: 1, frame: 16
const binding = env0_13;
const value3 = undefined;
const getApplicationInstallURLModule = require(8809) /* metro dependency 8809: getApplicationInstallURL */;
const getActivityLaunchURL = getApplicationInstallURLModule.getActivityLaunchURL;
binding(Reflect.apply(getActivityLaunchURL, getApplicationInstallURLModule, [{applicationId: applicationId,
referrerId: currentUser == null ? value3 : currentUser.id, customId: customId, linkId: linkId}]));
return value3;
}
function _fun99492() { // fn#99492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:1371, offset: 0x021cb051, size: 56 bytes, params: 1, frame: 13
onShare(false, env0_7);
const value = environment.__proto__;
(require(13033) /* metro dependency 13033: openActivityShareLinkModalNative */).closeActivityShareLinkModal();
}
function* _fun99494() { // fn#99494, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:1479, offset: 0x021cb094, size: 368 bytes, params: 1, frame: 25
var environment;
if (true) {
var env0_0;
value = environment.__proto__;
if (useStyles != null) {
var Promise = global.Promise;
var all = Promise.all;
var map = EmbeddedActivitiesStore.map;
var binding = env2_0;
var getOrResolveChannelIdFromDestinationId = binding(env2_2[13]).getOrResolveChannelIdFromDestinationId;
yield Reflect.apply(all, Promise, [Reflect.apply(map, EmbeddedActivitiesStore,
[getOrResolveChannelIdFromDestinationId])]);
var value4 = undefined;
if (false) {
return value4;
}
var filter = value4.filter;
binding = env2_0;
var binding2 = env2_2;
var value6 = Reflect.apply(filter, value4, [binding(binding2[17]).isNotNullish]);
var value7 = binding(binding2[18]);
env0_0 = value7.resolveActivityShareMessageContent(env1_3, useStyles, env1_12);
View(true);
value6.forEach(_fun99495());
var value8 = env2_1(binding2[21]);
var open = value8.open;
var intl = binding(binding2[22]).intl;
Reflect.apply(open, value8, [{key: 'ACTIVITY_SHARE_LINK_SUCCESS',
content: intl.formatToPlainString(binding(binding2[22]).t.jQULqL, {applicationName: useStyles.name})}]);
env1_4(true, ChannelStore);
binding(binding2[15]).closeActivityShareLinkModal();
}
}
}
function _fun99499() { // fn#99499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:2108, offset: 0x021cb2c6, size: 78 bytes, params: 1, frame: 15
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_12);
env0_8(true);
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
}
function _fun99500() { // fn#99500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:2224, offset: 0x021cb314, size: 59 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
return {height: value ? height : '100%'};
}
function ActivityShareLinkModalHeaderTitle({children}) { // fn#99501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:2441, owner: ActivityShareLinkModal.headerTitle, offset: 0x021cb34f, size: 79 bytes, params: 2, frame: 14
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return (
<GenericHeaderTitle
title={children}
subtitle={message}
variant="redesign/heading-18/bold"
/>
);
}
function ActivityShareLinkModalHeaderRight(a0) { // fn#99502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:2600, owner: ActivityShareLinkModal.headerRight, offset: 0x021cb39e, size: 154 bytes, params: 2, frame: 18
const value = environment.__proto__;
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {...a0};
headerActionButtonProps['onPress'] = env0_15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Xrt5Po = (require(1244) /* metro dependency 1244: indexNative */).t.Xrt5Po;
headerActionButtonProps['accessibilityLabel'] = Reflect.apply(string, intl, [Xrt5Po]);
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
headerActionButtonProps['IconComponent'] = LinkIcon;
return <HeaderActionButton {...headerActionButtonProps} />;
}
function _fun99495() { // fn#99495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:1684, offset: 0x021cb204, size: 36 bytes, params: 1, frame: 12
const env0_0 = env3_3(_fun99497);
return _fun99498;
}
function* _fun99497(a0) { // fn#99497, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13224:1704, offset: 0x021cb233, size: 147 bytes, params: 2, frame: 21
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
var binding = env5_7;
var channel = binding.getChannel(a0);
if (channel != null) {
binding = env5_1;
var binding2 = env5_2;
var value4 = binding(binding2[19]);
var sendMessage = value4.sendMessage;
var value5 = binding(binding2[20]);
var value7 = value5.parse(channel, applicationId);
var ACTIVITY_SHARE = env5_11.ACTIVITY_SHARE;
yield Reflect.apply(sendMessage, value4, [a0, value7, false, {location: ACTIVITY_SHARE}]);
if (false) {
return undefined;
}
}
}
}
@@ -0,0 +1,51 @@
/* Metro module 11627; source: modules/activities/native/ActivityShelfBadge.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1305, 1909, 4573, 1244, 2] */
function _fun89193(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11813:6, offset: 0x020037f7, size: 459 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const STATUS_POSITIVE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE_BACKGROUND;
object2.badge = {'position': 'absolute', 'top': 4, 'right': 4, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', backgroundColor: STATUS_POSITIVE_BACKGROUND};
const object5 = {'paddingLeft': 4, 'paddingRight': 6, 'borderRadius': null, 'height': 16};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BADGE_NOTIFICATION_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_NOTIFICATION_BACKGROUND;
object5.backgroundColor = BADGE_NOTIFICATION_BACKGROUND;
object2.newBadge = object5;
const object6 = {'paddingLeft': 4, 'paddingRight': 6, 'borderRadius': null, 'height': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BADGE_BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_BACKGROUND_BRAND;
object6.backgroundColor = BADGE_BACKGROUND_BRAND;
object2.updatedBadge = object6;
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const FOUR_DP_ELEVATION_SHADOW_PARAMS = nativeModule.FOUR_DP_ELEVATION_SHADOW_PARAMS;
object2.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [FOUR_DP_ELEVATION_SHADOW_PARAMS]);
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
object2.badgeText = {'textTransform': 'uppercase', 'marginLeft': 2, 'fontFamily': null, 'lineHeight': 16,
'fontSize': 12, fontFamily: DISPLAY_EXTRABOLD};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/ActivityShelfBadge.tsx');
exports.default = ActivityShelfBadge;
}
function ActivityShelfBadge({labelType, replacementStyles}) { // fn#89194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11813:898, offset: 0x020039c2, size: 446 bytes, params: 2, frame: 24
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const r8 = replacementStyles ?? styles.badge;
const EmbeddedActivityLabelTypes = (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes;
const NEW = EmbeddedActivityLabelTypes.NEW;
return labelType === NEW ? <View style={[r8, styles.newBadge,
styles.elevationShadow]}><Text variant="text-xs/semibold" style={styles.badgeText} color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text></View> : labelType !== (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes.UPDATED ? null : <View style={[r8,
styles.updatedBadge,
styles.elevationShadow]}><Text variant="text-xs/semibold" style={styles.badgeText} color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/qdhkk'])}</Text></View>;
}
@@ -0,0 +1,479 @@
/* Metro module 8092; source: modules/activities/native/EmbeddedActivitiesNativeManager.tsx; dependencies: [6, 7, 15, 17, 102, 18, 5, 27, 1379, 4294, 1378, 4237, 661, 5269, 477, 8070, 8071, 1216, 8072, 4496, 1244, 8093, 3774, 683, 694, 8095, 7860, 3857, 8096, 1239, 1360, 491, 8097, 2] */
function _fun64844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:6, offset: 0x01bb6cf3, size: 505 bytes, params: 8, frame: 21
var nativeEventEmitter;
const env0_0 = require;
const postMessageToWebView_64850 = function() {
return _postMessageToWebView_64851.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(102) /* metro dependency 102 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const env0_9 = importDefault(5) /* metro dependency 5 */;
const NativeEventEmitter = (require(27) /* metro dependency 27 */).NativeEventEmitter;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_13 = (require(4237) /* metro dependency 4237: Constants */).DISALLOWED_NAVIGATION_ERROR_CLOSE_ACTIVITY;
let value = require(661) /* metro dependency 661: Constants */;
const env0_14 = value.AnalyticEvents;
const env0_15 = value.ComponentActions;
const env0_16 = (require(5269) /* metro dependency 5269 */).getWebViewProxy('EMBEDDED_ACTIVITY_WEB_VIEW_KEY');
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
if (value) {
nativeEventEmitter = new NativeEventEmitter(importDefault(8070) /* metro dependency 8070: NativeAppLifecycleModule */);
}
value = importDefault(8097) /* metro dependency 8097: EmbeddedActivitiesManager */;
value = _fun64854(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/EmbeddedActivitiesNativeManager.tsx');
exports.default = value;
exports.EMBEDDED_ACTIVITY_WEB_VIEW_KEY = 'EMBEDDED_ACTIVITY_WEB_VIEW_KEY';
}
function _isNativeReflectConstruct_64845() { // fn#64845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:337, offset: 0x01bb6eec, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_64845_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _superPropGet_64848(a0, a1, a2, a3) { // fn#64848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:530, offset: 0x01bb6f4a, size: 99 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
const binding = env0_7;
value = env0_6(1 & 3 ? value.prototype : value);
value = binding(value, a1, a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun64849 : value;
}
function _postMessageToWebView_64851() { // fn#64851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:862, offset: 0x01bb6fad, size: 48 bytes, params: 1, frame: 14
return env0_9(_fun64853).apply(this, arguments);
}
function _fun64854(a0) { // fn#64854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:1057, offset: 0x01bb705a, size: 329 bytes, params: 2, frame: 16
const closure = EmbeddedActivitiesNativeManager;
env0_8(closure, a0);
return env0_4(closure, [{key: '_initialize', value: value_64857}, {key: '_terminate', value: value_64861},
{key: 'showErrorModal', value: function({code, message}) {
var defaultImport = importDefault(dependencyMap[19]);
var object = {};
object.title = require(dependencyMap[20]).intl.formatToPlainString(require(dependencyMap[20]).t.hbiAO6,
{code: code});
object.body = message;
defaultImport.show(object);
}}, {key: 'showLaunchErrorModal', value: function(a0) {
var defaultImport = importDefault(dependencyMap[19]);
var object = {};
object.title = require(dependencyMap[20]).intl.string(require(dependencyMap[20]).t.PtobXW);
object.body = a0;
defaultImport.show(object);
}}, {key: 'showDevShelfOverrideEnabled', value: value_64864}, {key: 'releaseWebView', value: value_64865},
{key: 'leaveActivity', value: function({location, applicationId, showFeedback}) {
var clearEmbeddedActivityState;
var value = this.releaseWebView();
if (location != null && require(dependencyMap[30]).isNotNullish(applicationId)) {
clearEmbeddedActivityState = this.clearEmbeddedActivityState;
value = value != null;
Reflect.apply(clearEmbeddedActivityState, this, [location, applicationId, value && showFeedback]);
}
}}, {key: 'hidePIPEmbed', value: function(a0) {
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", a0);
throw undefined;
}
}}, {key: 'clearEmbeddedActivityState', value: value_64868}, {key: 'releaseFrameId', value: function() {
var frameId = this.frameId;
this.frameId = undefined;
return frameId;
}}, {key: 'hasFrameId', value: function() {
return this.frameId != null;
}}, {key: 'getOrCreateFrameId', value: value_64871}]);
}
function* _fun64853(a0) { // fn#64853, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:927, offset: 0x01bb6fe6, size: 116 bytes, params: 2, frame: 15
var binding;
var injectJavaScript;
var binding2;
var binding3;
var property;
var value3;
var value4;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_16;
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
injectJavaScript = binding.injectJavaScript;
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
binding2 = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
property = binding3[16];
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
value3 = binding2(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
value4 = value3(a0);
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
try {
value5 = Reflect.apply(injectJavaScript, binding, [value4]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[17]);
value.captureException(error);
return undefined;
}
if (value7) {
return value6;
}
}
}
function EmbeddedActivitiesNativeManager(a0) { // fn#64855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:1069, offset: 0x01bb71a3, size: 143 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, EmbeddedActivitiesNativeManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(EmbeddedActivitiesNativeManager);
binding = env1_5;
if (_isNativeReflectConstruct_64845()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleRPCDisconnect = handleRPCDisconnect;
return value;
}
function value_64857() { // fn#64857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:1666, offset: 0x01bb7297, size: 228 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__;
const _superPropGet_64848Binding = _superPropGet_64848;
const value3 = undefined;
_superPropGet_64848Binding(EmbeddedActivitiesNativeManager, '_initialize', this, 3)([]);
const lifecycleSubscription = this.lifecycleSubscription;
if (lifecycleSubscription != null) {
lifecycleSubscription.remove();
}
this.lifecycleSubscription = env1_17 == null ? value3 : env1_17.addListener('onHostDestroy', _fun64858);
const scriptMessageSubscription = this.scriptMessageSubscription;
if (scriptMessageSubscription != null) {
scriptMessageSubscription.remove();
}
const binding = env1_16;
this.scriptMessageSubscription = binding.addOnMessageListener(_fun64859);
const thermalStateSubscription = this.thermalStateSubscription;
if (thermalStateSubscription != null) {
thermalStateSubscription.remove();
}
value = importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */;
this.thermalStateSubscription = value.addListener(_fun64860);
return value3;
}
function value_64861() { // fn#64861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:3597, offset: 0x01bb7745, size: 108 bytes, params: 1, frame: 17
const value = environment.__proto__;
_superPropGet_64848(EmbeddedActivitiesNativeManager, '_terminate', this, 3)([]);
const lifecycleSubscription = this.lifecycleSubscription;
if (lifecycleSubscription != null) {
lifecycleSubscription.remove();
}
const scriptMessageSubscription = this.scriptMessageSubscription;
if (scriptMessageSubscription != null) {
scriptMessageSubscription.remove();
}
const thermalStateSubscription = this.thermalStateSubscription;
if (thermalStateSubscription != null) {
thermalStateSubscription.remove();
}
}
function value_64864() { // fn#64864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:4159, offset: 0x01bb788e, size: 134 bytes, params: 1, frame: 18
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const object2 = {key: 'EMBEDDED_ACTIVITIES_DEV_SHELF_URL_OVERRIDE_ENABLED'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const JfA7IK = (require(1244) /* metro dependency 1244: indexNative */).t.JfA7IK;
object2.content = Reflect.apply(string, intl, [JfA7IK]);
object2.icon = importDefault(8096) /* metro dependency 8096 */;
object2.iconColor = 'status-positive';
Reflect.apply(open, defaultImport, [object2]);
}
function value_64865() { // fn#64865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:4366, offset: 0x01bb7914, size: 93 bytes, params: 1, frame: 16
var value2;
var ComponentDispatch;
const value = this.releaseFrameId();
if (value != null) {
value2 = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.IFRAME_UNMOUNT, {id: value});
env1_16.releaseWebView();
}
return value;
}
function value_64868(a0, a1, a2) { // fn#64868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:4785, offset: 0x01bb79fc, size: 108 bytes, params: 4, frame: 16
const value = environment.__proto__;
(require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).stopEmbeddedActivity({location: a0,
applicationId: a1, showFeedback: a2});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'EMBEDDED_ACTIVITY_SET_ORIENTATION_LOCK_STATE',
'applicationId': null, 'lockState': null, 'pictureInPictureLockState': null, applicationId: a1});
}
function value_64871() { // fn#64871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:5198, offset: 0x01bb7a68, size: 60 bytes, params: 1, frame: 13
const frameId = this.frameId;
if (frameId != null) {
return frameId;
}
let value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
value = value.v4();
this.frameId = value;
return value;
}
function EmbeddedActivitiesNativeManagerHandleRPCDisconnect({reason, application}) { // fn#64856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:1370, owner: EmbeddedActivitiesNativeManager.handleRPCDisconnect, offset: 0x01bb7232, size: 101 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__;
value = EmbeddedActivitiesStore.getConnectedActivityLocation();
const id = application?.id;
const binding = env0_0;
binding.leaveActivity({location: value, applicationId: id});
binding.superHandleRPCDisconnect({reason: reason, application: application});
}
function _fun64858() { // fn#64858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:1881, offset: 0x01bb737b, size: 94 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const value3 = null;
const r3 = value3 != connectedActivityLocation ? EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation) : value3;
if (value3 != r3 && value3 != connectedActivityLocation) {
env0_0.leaveActivity({location: connectedActivityLocation, applicationId: r3.applicationId});
}
}
function _fun64859(a0) { // fn#64859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:2172, offset: 0x01bb73d9, size: 494 bytes, params: 2, frame: 25
var r9;
var url;
var applicationId;
var r1;
var r12;
var JSON;
var parse;
var data;
var value2;
var value3;
var connectedActivityLocation;
var value5;
var value6;
var selfEmbeddedActivityForLocation;
var value8;
var value9;
var value10;
var property;
var defaultImport;
var error;
var SyntaxError;
var value11;
var connectedActivityLocation2;
var selfEmbeddedActivityForLocation2;
var value14;
var value15;
var value16;
var binding;
var object2;
var defaultImport2;
var show;
const intl = require(dependencyMap[20]).intl;
var string;
const t = require(dependencyMap[20]).t;
var tYBBWz;
var BddRzS;
const value = undefined;
try {
JSON = global.JSON;
parse = JSON.parse;
data = a0.data;
value2 = Reflect.apply(parse, JSON, [data]);
value3 = environment.__proto__.__proto__;
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
value5 = null;
value6 = value5 != connectedActivityLocation;
if (value6) {
selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
r9 = selfEmbeddedActivityForLocation;
} else {
r9 = value5;
}
value8 = value5 == r9;
url = value8 ? value : r9.url;
value9 = typeof value2 === 'object';
if (value9) {
value10 = value5 != url;
r9 = value10;
} else {
r9 = value9;
}
if (r9) {
property = dependencyMap[18];
defaultImport = importDefault(property);
defaultImport.handleMessage(value2, url, postMessageToWebView_64850);
}
} catch (error) {
SyntaxError = global.SyntaxError;
if (!(error instanceof SyntaxError)) {
throw error;
}
data = a0.data;
value11 = environment.__proto__.__proto__;
if (data === DISALLOWED_NAVIGATION_ERROR_CLOSE_ACTIVITY) {
connectedActivityLocation2 = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation2 != null) {
selfEmbeddedActivityForLocation2 = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation2);
applicationId = selfEmbeddedActivityForLocation2 == null ? value : selfEmbeddedActivityForLocation2.applicationId;
r1 = applicationId;
} else {
r1 = value;
}
value14 = connectedActivityLocation2 != null;
if (value14) {
value15 = r1 != null;
r12 = value15;
} else {
r12 = value14;
}
if (r12) {
value16 = environment;
binding = env0_0;
binding.leaveActivity({location: connectedActivityLocation2, applicationId: r1, showFeedback: false});
defaultImport2 = importDefault(dependencyMap[19]);
show = defaultImport2.show;
object2 = {};
string = intl.string;
tYBBWz = t.tYBBWz;
object2.body = Reflect.apply(string, intl, [tYBBWz]);
string = intl.string;
BddRzS = t.BddRzS;
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
Reflect.apply(show, defaultImport2, [object2]);
}
}
}
return value;
}
function _fun64860({rawThermalState}) { // fn#64860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8277:2902, offset: 0x01bb75c7, size: 382 bytes, params: 2, frame: 21
const value = environment.__proto__.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const r4 = connectedActivityLocation != null ? EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation) : null;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
const basicChannel = ChannelStore.getBasicChannel(embeddedActivityLocationChannelId);
const compositeInstanceId = r4?.compositeInstanceId;
const applicationId = r4?.applicationId;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ACTIVITY_DEVICE_THERMAL_STATE_CHANGED = AnalyticEvents.ACTIVITY_DEVICE_THERMAL_STATE_CHANGED;
const object2 = {channel_id: embeddedActivityLocationChannelId, application_id: applicationId,
activity_session_id: compositeInstanceId, thermal_state: rawThermalState};
object2.guild_id = basicChannel?.guild_id;
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
Reflect.apply(track, defaultImport, [ACTIVITY_DEVICE_THERMAL_STATE_CHANGED, object2]);
const defaultImport2 = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport2.dispatch({type: 'THERMAL_STATE_CHANGE', applicationId: applicationId});
if (compositeInstanceId != null && applicationId != null && (require(8095) /* metro dependency 8095: useThermalState */).getThermalState() >= (require(8095) /* metro dependency 8095: useThermalState */).ThermalStates.SERIOUS) {
(require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).requestRespondToSeriousThermalState();
}
}
@@ -0,0 +1,45 @@
/* Metro module 10717; source: modules/activities/native/EmbeddedActivityBackgroundImageWithOverlay.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 10718, 2] */
function _fun82348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10903:6, offset: 0x01ef3e8a, size: 283 bytes, params: 8, frame: 21
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.ImageBackground;
const env0_5 = value.View;
const env0_6 = value.StyleSheet;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
const env0_8 = Reflect.apply(createStyles, value, [{overlay: {'flex': 1, 'opacity': 0.6, backgroundColor: BLACK}}]);
const env0_9 = ['embedded_background'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/EmbeddedActivityBackgroundImageWithOverlay.tsx');
exports.default = EmbeddedActivityBackgroundImageWithOverlay;
}
function EmbeddedActivityBackgroundImageWithOverlay({application, dimensionsStyle, borderRadius, resizeMode}) { // fn#82349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10903:417, offset: 0x01ef3fa5, size: 346 bytes, params: 2, frame: 24
var r0;
let value = undefined;
resizeMode = resizeMode === value ? 'contain' : resizeMode;
const styles = useStyles();
const [property, env0_0] = env0_2(env0_3.useState(false), 2);
const defaultImport = importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */;
const id = application == null ? value : application.id;
const value7 = '';
const url = defaultImport({applicationId: id ?? value7, names: env0_9, size: 1024}).url;
if (property) {
r0 = null;
} else if (url == null) {
r0 = null;
} else if (value7 === url) {
r0 = null;
} else {
value = <ImageBackground resizeMode={resizeMode} source={{uri: url ?? value}} style={dimensionsStyle ?? StyleSheet.absoluteFillObject} imageStyle={{borderRadius: borderRadius}} onError={onError}><View style={[styles.overlay,
{borderRadius: borderRadius}]} /></ImageBackground>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,226 @@
/* Metro module 10704; source: modules/activities/native/EmbeddedActivityView.tsx; dependencies: [57, 31, 27, 1378, 4237, 4238, 33, 4501, 10703, 1478, 694, 10705, 10706, 10701, 566, 10708, 8092, 10709, 10716, 2] */
function _fun82249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:6, offset: 0x01ef097a, size: 396 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = useBaseActivityView;
const closure2 = ActivityViewLoadingIndicator;
const closure3 = BaseActivityView;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.ActivityIndicator;
const env0_6 = value2.View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const constantsModule = require(4237) /* metro dependency 4237: Constants */;
const env0_8 = constantsModule.ActivityLayoutMode;
const env0_9 = constantsModule.ActivityScreenOrientation;
const env0_10 = (require(4238) /* metro dependency 4238: ApplicationConstants */).OBEY_SILENT_HARDWARE_SWITCH_APP_IDS;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.Fragment;
const env0_13 = value4.jsxs;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({loadingContainer: {'flex': 1,
'justifyContent': 'center'}});
value = value.memo(EmbeddedActivityViewInner);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/EmbeddedActivityView.tsx');
exports.default = value;
exports.useBaseActivityView = closure;
exports.ActivityViewLoadingIndicator = closure2;
exports.BaseActivityView = closure3;
exports.EmbeddedActivityView = value;
}
function useBaseActivityView({orientationLockState, showLoadingIndicator, setShowLoadingStateForLockingOrientation, application, setOrientationLockState}) { // fn#82250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:392, offset: 0x01ef0b06, size: 460 bytes, params: 2, frame: 27
const env0_3 = application;
const env0_4 = setOrientationLockState;
let value = undefined;
const [property, property2] = env0_3(env0_4.useState(false), 2);
const defaultOrientationLockState = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getDefaultOrientationLockState(application);
const id = application == null ? value : application.id;
const [property3, env0_8] = env0_3(env0_4.useState(false), 2);
value = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
value = value.width > value.height;
env0_4.useLayoutEffect(_fun82251, [value]);
env0_4.useLayoutEffect(_fun82252, [id]);
env0_4.useLayoutEffect(_fun82253, [defaultOrientationLockState, application, orientationLockState, value, property3,
setShowLoadingStateForLockingOrientation, setOrientationLockState]);
env0_4.useLayoutEffect(_fun82254, [orientationLockState, value, setShowLoadingStateForLockingOrientation]);
env0_4.useLayoutEffect(_fun82255, [showLoadingIndicator, property]);
return {isResetting: property, setIsResetting: property2, isLandscape: value};
}
function ActivityViewLoadingIndicator() { // fn#82256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:1168, offset: 0x01ef0e0c, size: 69 bytes, params: 1, frame: 17
const styles = useStyles();
return (
<View style={styles.loadingContainer}>
<ActivityIndicator size="large" />
</View>
);
}
function BaseActivityView(a0) { // fn#82257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:1286, offset: 0x01ef0e51, size: 133 bytes, params: 2, frame: 19
var r0;
var value;
var jsxRuntimeEnv0_12Binding;
if (a0.showLoadingIndicator) {
r0 = <ActivityViewLoadingIndicator />;
} else {
value = null;
if (a0.isResetting) {
r0 = value;
} else {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
value = importDefault(10706) /* metro dependency 10706: WakeLock */;
value = ((Component) => <Component wakeLockKey={a0.wakeLockKey} />)(value);
value = <>{value}{a0.children}</>;
r0 = value;
}
}
return r0;
}
function EmbeddedActivityViewInner({channel, layoutMode, portraitSafeAreasConfig, landscapeSafeAreasConfig}) { // fn#82258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:1490, offset: 0x01ef0ed6, size: 1004 bytes, params: 2, frame: 32
var object2;
var r7;
var r14;
var r0;
var location;
var EmbeddedActivityWebView;
let value = undefined;
let env0_3 = value;
const currentEmbeddedActivity2 = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const value4 = (importDefault(10701) /* metro dependency 10701: useCurrentEmbeddedApplication */)();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun82259, [value4]);
const [property, property2] = env0_3(env0_4.useState(true), 2);
object2 = {currentEmbeddedActivity: currentEmbeddedActivity2, channel: channel};
const currentEmbeddedActivity = object2.currentEmbeddedActivity;
const channel2 = object2.channel;
if (currentEmbeddedActivity == null) {
r14 = {instance_id: ''};
} else {
object2 = {};
object2.instance_id = currentEmbeddedActivity.compositeInstanceId ?? currentEmbeddedActivity.launchId;
location = currentEmbeddedActivity.location;
object2.location_id = location == null ? value : location.id;
object2.launch_id = currentEmbeddedActivity.launchId;
if (currentEmbeddedActivity.proxyTicket != null) {
object2.discord_proxy_ticket = currentEmbeddedActivity.proxyTicket;
}
r7 = channel2 != null && channel2.id != null;
r7 = r7 && channel2.id !== '';
if (r7) {
object2.channel_id = channel2.id;
}
r7 = (channel2 == null ? value : channel2.guild_id) != null && (channel2 == null ? value : channel2.guild_id) !== '';
if (r7) {
object2.guild_id = channel2 == null ? value : channel2.guild_id;
r14 = object2;
} else {
r14 = object2;
}
}
(importDefault(10708) /* metro dependency 10708: useDispatchOpenActivity */)({connectedEmbeddedActivity: currentEmbeddedActivity2});
env0_4.useLayoutEffect(_fun82260, [layoutMode, currentEmbeddedActivity2]);
const value14 = env0_4.useCallback(_fun82261, [value4, currentEmbeddedActivity2]);
const id = value4 == null ? value : value4.id;
let r6 = currentEmbeddedActivity2 == null || (currentEmbeddedActivity2 == null ? value : currentEmbeddedActivity2.launchId) == null;
r6 = !r6 ? property : r6;
r6 = !r6 ? id == null : r6;
r6 = !r6 ? value4 == null : r6;
object2 = {orientationLockState: value5, showLoadingIndicator: r6,
setShowLoadingStateForLockingOrientation: property2, application: value4};
object2.setOrientationLockState = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).setOrientationLockState;
const value19 = useBaseActivityView(object2);
const isResetting = value19.isResetting;
env0_3 = value19.setIsResetting;
if (currentEmbeddedActivity2 == null) {
r0 = null;
} else if (id == null) {
r0 = null;
} else {
object2 = {wakeLockKey: 'EmbeddedActivities', showLoadingIndicator: r6, isResetting: isResetting};
EmbeddedActivityWebView = importDefault(10709) /* metro dependency 10709: EmbeddedActivityWebView */;
value = <BaseActivityView {...object2}><EmbeddedActivityWebView onActivityCrash={function() {
setIsResetting(true);
global.setTimeout(_fun82263, 0);
}} applicationId={id} channelId={channel == null ? value : channel.id} guildId={channel == null ? value : channel.guild_id} activityUrl={currentEmbeddedActivity2.url} currentEmbeddedActivity={currentEmbeddedActivity2} activitySessionId={currentEmbeddedActivity2 == null ? value : currentEmbeddedActivity2.compositeInstanceId} queryParams={r14} onLoadError={value14} allowPopups={(require(10716) /* metro dependency 10716: allowPopups */).allowPopups(value4)} referrerPolicy="origin" isPipOrGridMode={layoutMode === ActivityLayoutMode.PIP || layoutMode === ActivityLayoutMode.GRID} webViewKey={(require(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).EMBEDDED_ACTIVITY_WEB_VIEW_KEY} safeAreasConfig={value19.isLandscape ? landscapeSafeAreasConfig : portraitSafeAreasConfig} ignoreSilentHardwareSwitch={!OBEY_SILENT_HARDWARE_SWITCH_APP_IDS.has(id)} /></BaseActivityView>;
r0 = value;
}
return r0;
}
function _fun82251() { // fn#82251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:760, offset: 0x01ef0cd2, size: 82 bytes, params: 1, frame: 14
const binding = env0_9;
let value = environment.__proto__;
const r4 = binding ? ActivityScreenOrientation.LANDSCAPE : ActivityScreenOrientation.PORTRAIT;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'ACTIVITY_SCREEN_ORIENTATION_UPDATE', screenOrientation: r4});
}
function _fun82252() { // fn#82252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:905, offset: 0x01ef0d24, size: 18 bytes, params: 1, frame: 11
env0_8(false);
}
function _fun82253() { // fn#82253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:942, offset: 0x01ef0d36, size: 122 bytes, params: 1, frame: 14
var value2;
if (env0_7) {
setShowLoadingStateForLockingOrientation(false);
} else if (orientationLockState != null) {
setShowLoadingStateForLockingOrientation(false);
} else {
value2 = environment.__proto__;
if ((importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_9, env0_6)) {
setShowLoadingStateForLockingOrientation(false);
} else {
setShowLoadingStateForLockingOrientation(true);
}
}
if (application != null) {
setOrientationLockState(application, orientationLockState);
}
}
function _fun82254() { // fn#82254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:1039, offset: 0x01ef0db0, size: 58 bytes, params: 1, frame: 14
const value = environment.__proto__;
if ((importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_9,
orientationLockState)) {
setShowLoadingStateForLockingOrientation(false);
}
}
function _fun82255() { // fn#82255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:1095, offset: 0x01ef0dea, size: 34 bytes, params: 1, frame: 11
if (!(showLoadingIndicator || env0_5)) {
env0_8(true);
}
}
function _fun82259() { // fn#82259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:1689, offset: 0x01ef12c2, size: 47 bytes, params: 1, frame: 12
return env0_2 != null ? EmbeddedActivitiesStore.getOrientationLockStateForApp(env0_2.id) : undefined;
}
function _fun82260() { // fn#82260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:2358, offset: 0x01ef12f1, size: 84 bytes, params: 1, frame: 13
var value2;
if (env0_1 != null) {
value2 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_LAYOUT_MODE_UPDATE',
layoutMode: layoutMode, applicationId: env0_1.applicationId});
}
}
function _fun82261() { // fn#82261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:2501, offset: 0x01ef1345, size: 97 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: env0_1 == null ? value : env0_1.location,
applicationId: env0_2 == null ? value : env0_2.id});
return value;
}
function EmbeddedActivityViewInnerOnActivityCrash() { // fn#82262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10890:3089, owner: EmbeddedActivityViewInner.onActivityCrash, offset: 0x01ef13a6, size: 43 bytes, params: 1, frame: 13
setIsResetting(true);
global.setTimeout(function() {
return setIsResetting(false);
}, 0);
}
@@ -0,0 +1,924 @@
/* Metro module 10709; source: modules/activities/native/EmbeddedActivityWebView.tsx; dependencies: [5, 57, 31, 27, 7503, 4237, 661, 33, 4501, 3, 477, 10710, 491, 5269, 1239, 10711, 1582, 10713, 10714, 683, 632, 4647, 1244, 507, 10715, 1471, 8071, 8072, 6266, 7712, 8092, 2] */
function _fun82275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:6, offset: 0x01ef180a, size: 458 bytes, params: 8, frame: 23
const env0_0 = require;
const _arrayLikeToArray_82278 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const getSafeArea = function(a0, a1) {
var r2;
var r1;
var r0;
var value2;
var value = a1;
if (a0 == null) {
r0 = value;
} else {
value2 = 0;
if (a0.disable) {
r1 = value2;
} else {
if (a0.override != null) {
r2 = global.Math.max(value2, a0.override);
} else if (a0.offset == null) {
r2 = value;
} else {
value = global.Math.max(value2, value + a0.offset);
r2 = value;
}
r1 = r2;
}
r0 = r1;
}
return r0;
};
const closure = BaseActivityWebView;
const closure2 = useHasInvalidUrlErrorState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).Linking;
const developerActivityShelfStore = importDefault(7503) /* metro dependency 7503: DeveloperActivityShelfStore */;
let value = require(4237) /* metro dependency 4237: Constants */;
const env0_9 = value.ActivityPlatform;
const env0_10 = value.DISALLOWED_NAVIGATION_ERROR_CLOSE_ACTIVITY;
value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.ComponentActions;
const env0_12 = value.AnalyticEvents;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({webView: {backgroundColor: 'transparent'}});
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('EmbeddedActivityWebView');
const env0_16 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/EmbeddedActivityWebView.tsx');
exports.default = EmbeddedActivityWebView;
exports.BaseActivityWebView = closure;
exports.useHasInvalidUrlErrorState = closure2;
}
function _createForOfIteratorHelperLoose_82276(a0, a1) { // fn#82276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:305, offset: 0x01ef19d4, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun82277;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_82278(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_82278(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_82278(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun82277;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function BaseActivityWebView({hasFrameId, getOrCreateFrameId, releaseFrameId, hasInvalidUrlError, setHasInvalidUrlError, hadInvalidUrlError, deepLinkQueryParams = {}, activityUrl, applicationId, queryParams, onActivityCrash, onLoadError, allowPopups, referrerPolicy, isPipOrGridMode, webViewKey, ignoreSilentHardwareSwitch, safeAreasConfig, channelId, guildId, activitySessionId}) { // fn#82280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:1483, offset: 0x01ef1bbb, size: 2206 bytes, params: 2, frame: 50
var r1;
var WebView;
const env0_5 = hadInvalidUrlError;
let value = undefined;
const env0_6 = applicationId;
ignoreSilentHardwareSwitch = ignoreSilentHardwareSwitch === value || ignoreSilentHardwareSwitch;
const styles = useStyles();
let binding = env0_6;
const useContext = binding.useContext;
const WebViewContext = (require(10710) /* metro dependency 10710: WebViewContext */).WebViewContext;
const value4 = Reflect.apply(useContext, binding, [WebViewContext]);
var property = env0_5(env0_6.useState(function() {
return hasFrameId();
}), 1)[0];
const env0_16 = property;
const property2 = env0_5(env0_6.useState(_fun82282), 1)[0];
const [property3, env0_19] = env0_5(env0_6.useState(null), 2);
const value12 = env0_6.useMemo(_fun82283, [webViewKey]);
const [property4, env0_21] = env0_5(env0_6.useState(null), 2);
env0_6.useEffect(_fun82284, [property, property2, webViewKey]);
env0_6.useEffect(function() {
return _fun82286;
}, [webViewKey, property2]);
const value15 = (importDefault(10711) /* metro dependency 10711: useStableSafeAreaInsetsNative */)();
const constants = (importAll(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
let object2 = {};
copyDataProperties(object2, queryParams, undefined);
copyDataProperties(object2, deepLinkQueryParams, undefined);
object2['frame_id'] = property2;
const MOBILE = ActivityPlatform.MOBILE;
object2['platform'] = MOBILE;
const Version = constants.Version;
object2['mobile_app_version'] = Version;
const value17 = (importDefault(10713) /* metro dependency 10713: getIFrameSandboxAttributes */)({allowPopups: allowPopups});
const URLSearchParams = global.URLSearchParams;
const value18 = Object.create(URLSearchParams.prototype, {constructor: {value: URLSearchParams}});
const uRLSearchParams = new URLSearchParams(object2);
const value20 = '' + activityUrl + '?' + (uRLSearchParams instanceof Object ? uRLSearchParams : value18);
const env0_25 = env0_6.useRef(safeAreasConfig);
env0_6.useEffect(function() {
_fun82288()();
}, [value20, value17, onLoadError, referrerPolicy]);
const value21 = env0_6.useCallback(_fun82292, [applicationId]);
const value22 = env0_6.useCallback(_fun82293, [applicationId]);
const value23 = env0_6.useCallback(_fun82294, [applicationId, channelId, guildId, activitySessionId, property2,
releaseFrameId, value12, onActivityCrash]);
const useActivityUrlOverride = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([DeveloperActivityShelfStore],
function() {
return DeveloperActivityShelfStore.getUseActivityUrlOverride();
});
env0_6.useEffect(_fun82296, [value20, useActivityUrlOverride, setHasInvalidUrlError]);
env0_6.useEffect(_fun82297, [hadInvalidUrlError, hasInvalidUrlError]);
let r24 = property3 != null ? env0_16 ? 'file://' + property4 : '' + property3.origin + '/' + property2 + '/activity.html' : null;
binding = env0_16;
var [property, env0_29] = env0_5(env0_6.useState(false), 2);
const [property5, env0_31] = env0_5(env0_6.useState([]), 2);
env0_6.useEffect(_fun82298, [applicationId, binding]);
const value30 = env0_6.useCallback(_fun82306, [r24, property5]);
const r32 = r24 != null && property3 != null && property4 != null;
const value34 = env0_6.useRef(null);
const value35 = env0_6.useCallback(_fun82307, []);
const value36 = env0_6.useCallback(_fun82308, [webViewKey, property3 == null ? value : property3.origin, value35]);
env0_6.useEffect(_fun82309, [value15, isPipOrGridMode, r32, value12, value35, safeAreasConfig]);
if (r24 == null) {
return null;
}
if (property3 == null) {
return null;
}
if (binding) {
if (property === false) {
return null;
}
}
object2 = {left: getSafeArea(safeAreasConfig == null ? value : safeAreasConfig.left,
(value15 == null ? value : value15.left) ?? 0),
right: getSafeArea(safeAreasConfig == null ? value : safeAreasConfig.right,
(value15 == null ? value : value15.right) ?? 0),
top: getSafeArea(safeAreasConfig == null ? value : safeAreasConfig.top,
(value15 == null ? value : value15.top) ?? 0),
bottom: getSafeArea(safeAreasConfig == null ? value : safeAreasConfig.bottom,
(value15 == null ? value : value15.bottom) ?? 0)};
if (property4 == null) {
r1 = null;
} else {
WebView = (require(5269) /* metro dependency 5269 */).WebView;
var webViewProps = {style: styles.webView, ref: value34, source: {uri: r24}};
r24 = property3.port === '' ? property3.host : '' + property3.hostname + ':' + property3.port;
webViewProps.androidAssetLoaderConfig = {domain: r24, httpAllowed: property3.protocol === 'http:',
pathHandlers: [{type: 'internal', path: '/' + property2 + '/', directory: property4.substring(0,
property4.lastIndexOf('/'))}]};
webViewProps.originWhitelist = ['*'];
webViewProps.overScrollMode = 'never';
webViewProps.scrollEnabled = false;
webViewProps.cacheEnabled = true;
webViewProps.onError = value21;
webViewProps.onContentProcessDidTerminate = value23;
webViewProps.onRenderProcessGone = value22;
webViewProps.webViewKey = webViewKey;
webViewProps.temporaryParentNodeTag = value4;
webViewProps.messagingWithWebViewKeyEnabled = webViewKey != null;
webViewProps.onMessage = value36;
webViewProps.allowFileAccess = env0_16;
webViewProps.injectedJavaScript = env0_16 ? (require(10714) /* metro dependency 10714: createWebviewHtmlFile */).createInjectedJavascriptForIOS(webViewProps) : value;
webViewProps.injectedJavaScriptForMainFrameOnly = false;
webViewProps.onShouldStartLoadWithRequest = env0_16 ? value30 : value;
webViewProps.mediaPlaybackRequiresUserAction = false;
webViewProps.ignoreSilentHardwareSwitch = ignoreSilentHardwareSwitch;
webViewProps.allowsInlineMediaPlayback = true;
webViewProps.minimumFontSize = 1;
webViewProps.bounces = false;
webViewProps.allowsProtectedMedia = true;
value = <WebView {...webViewProps} />;
r1 = value;
}
return r1;
}
function useHasInvalidUrlErrorState() { // fn#82314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:7586, offset: 0x01ef308d, size: 91 bytes, params: 1, frame: 15
const value3 = env0_5(env0_6.useState(false), 2);
const property = value3[0];
const object2 = {hasInvalidUrlError: property, setHasInvalidUrlError: value3[1]};
object2.hadInvalidUrlError = (importDefault(6266) /* metro dependency 6266: usePrevious */)(property);
return object2;
}
function EmbeddedActivityWebView(a0) { // fn#82315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:7754, offset: 0x01ef30e8, size: 293 bytes, params: 2, frame: 25
const channelId = a0.channelId;
const currentEmbeddedActivity = a0.currentEmbeddedActivity;
const applicationId = a0.applicationId;
const object3 = {'channelId': 0, 'currentEmbeddedActivity': 0, 'applicationId': 0};
silentSetPrototypeOf(object3, null, undefined);
const value = copyDataProperties({}, a0, object3, undefined);
const {hasInvalidUrlError, setHasInvalidUrlError, hadInvalidUrlError} = useHasInvalidUrlErrorState();
const object4 = {};
if (currentEmbeddedActivity != null) {
if (currentEmbeddedActivity.customId != null) {
object4.custom_id = currentEmbeddedActivity.customId;
}
if (currentEmbeddedActivity.referrerId != null) {
object4.referrer_id = currentEmbeddedActivity.referrerId;
}
}
env0_6.useEffect(_fun82316, [hasInvalidUrlError, hadInvalidUrlError, channelId, applicationId,
currentEmbeddedActivity]);
return (
<BaseActivityWebView
hasFrameId={hasFrameId}
getOrCreateFrameId={getOrCreateFrameId}
releaseFrameId={releaseFrameId}
hasInvalidUrlError={hasInvalidUrlError}
setHasInvalidUrlError={setHasInvalidUrlError}
hadInvalidUrlError={hadInvalidUrlError}
deepLinkQueryParams={object4}
applicationId={applicationId}
channelId={channelId}
{...value}
/>
);
}
function _fun82282() { // fn#82282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:1996, offset: 0x01ef2459, size: 62 bytes, params: 1, frame: 12
var r0;
var value;
if (webViewKey != null) {
r0 = getOrCreateFrameId();
} else {
value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
value = value.v4();
r0 = value;
}
return r0;
}
function _fun82283() { // fn#82283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:2096, offset: 0x01ef2497, size: 60 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
if (webViewKey != null) {
value3 = environment.__proto__;
moduleValue = require(5269) /* metro dependency 5269 */;
r0 = moduleValue.getWebViewProxy(webViewKey);
} else {
r0 = undefined;
}
return r0;
}
function _fun82284() { // fn#82284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:2210, offset: 0x01ef24d3, size: 89 bytes, params: 1, frame: 14
var value3;
var ComponentDispatch;
if (!(env0_16 && webViewKey != null)) {
value3 = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.IFRAME_MOUNT, {id: env0_17});
}
}
function _fun82285() { // fn#82285, offset: 0x01ef252c, size: 11 bytes, params: 1, frame: 1
return _fun82286;
}
function _fun82287() { // fn#82287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:2614, offset: 0x01ef2586, size: 21 bytes, params: 1, frame: 9
_fun82288()();
}
function _fun82292({nativeEvent}) { // fn#82292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:3282, offset: 0x01ef2756, size: 86 bytes, params: 2, frame: 17
const value = environment.__proto__;
const binding = env1_15;
const warn = binding.warn;
const applicationIdBinding = applicationId;
const JSON = global.JSON;
Reflect.apply(warn, binding,
['activity WebView error for appId ' + applicationIdBinding + '. ' + JSON.stringify(nativeEvent)]);
}
function _fun82293({nativeEvent}) { // fn#82293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:3401, offset: 0x01ef27ac, size: 86 bytes, params: 2, frame: 17
const value = environment.__proto__;
const binding = env1_15;
const warn = binding.warn;
const applicationIdBinding = applicationId;
const JSON = global.JSON;
Reflect.apply(warn, binding,
['activity WebView render process gone for appId ' + applicationIdBinding + '. ' + JSON.stringify(nativeEvent)]);
}
function _fun82294() { // fn#82294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:3534, offset: 0x01ef2802, size: 218 bytes, params: 1, frame: 18
const binding = env1_15;
const warn = binding.warn;
const applicationIdBinding = applicationId;
Reflect.apply(warn, binding, ['activity WebView content process terminated for appId ' + applicationIdBinding]);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ACTIVITY_WEB_VIEW_CONTENT_PROCESS_TERMINATED = AnalyticEvents.ACTIVITY_WEB_VIEW_CONTENT_PROCESS_TERMINATED;
Reflect.apply(track, defaultImport, [ACTIVITY_WEB_VIEW_CONTENT_PROCESS_TERMINATED,
{application_id: applicationIdBinding, channel_id: channelId, guild_id: guildId,
activity_session_id: activitySessionId}]);
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const IFRAME_UNMOUNT = ComponentActions.IFRAME_UNMOUNT;
Reflect.apply(dispatch, ComponentDispatch, [IFRAME_UNMOUNT, {id: env0_17}]);
releaseFrameId();
if (env0_20 != null) {
env0_20.releaseWebView();
}
onActivityCrash();
}
function _fun82296() { // fn#82296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:3941, offset: 0x01ef28ef, size: 79 bytes, params: 1, frame: 13
var URL;
var value;
var binding;
var prototype;
var value2;
var uRL;
var value3;
var error;
try {
URL = global.URL;
value = environment;
binding = env0_24;
prototype = URL.prototype;
value2 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL();
value3 = uRL instanceof Object ? uRL : value2;
binding = env0_19;
binding(value3);
} catch (error) {
value = environment;
if (!useActivityUrlOverride) {
throw error;
}
setHasInvalidUrlError(true);
}
}
function _fun82297() { // fn#82297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4030, offset: 0x01ef293e, size: 219 bytes, params: 1, frame: 18
var defaultImport;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (!hadInvalidUrlError && hasInvalidUrlError) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.PtobXW);
object2.body = intl.string(t['55iAUT']);
object2.confirmText = intl.string(t.BddRzS);
Reflect.apply(show, defaultImport, [object2]);
}
}
function _fun82298() { // fn#82298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4412, offset: 0x01ef2a19, size: 58 bytes, params: 1, frame: 9
if (env0_28) {
var env0_0 = ["'self'"];
var parseCsp = function(a0, a1) {
var r0;
var value = a1.match(a0);
if (value === null) {
r0 = [];
} else if (value.length >= 2) {
value = value[1].split(' ');
value = value.filter(_fun82300);
r0 = value;
} else {
r0 = [];
}
return r0;
};
_fun82301()();
}
}
function _fun82306(a0) { // fn#82306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4997, offset: 0x01ef2c69, size: 310 bytes, params: 2, frame: 18
var r3;
var r1;
var value4;
var RegExp;
var prototype;
var value5;
var regExp;
var value6;
var test;
var url;
var value7;
var value12;
var origin;
var pathname;
const mainDocumentURL = a0.mainDocumentURL;
var value;
if (env0_27 != null) {
reducibleJoin3: while (true) {
if (mainDocumentURL == null) {
break reducibleJoin3;
}
if (mainDocumentURL !== env0_27) {
value = environment.__proto__;
Linking.openURL(a0.url);
return false;
}
break reducibleJoin3;
}
}
value = _createForOfIteratorHelperLoose_82276(env0_30);
const value3 = value();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop4: while (true) {
value4 = r3.value;
RegExp = global.RegExp;
prototype = RegExp.prototype;
value5 = Object.create(prototype, {constructor: {value: RegExp}});
regExp = new RegExp();
value6 = regExp instanceof Object ? regExp : value5;
test = value6.test;
url = a0.url;
if (Reflect.apply(test, value6, [url])) {
return true;
}
value7 = value();
done = value7.done;
if (done) {
break reducibleLoop4;
}
r3 = value7;
continue reducibleLoop4;
}
}
value = Reflect.apply((importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe, value,
[DeveloperActivityShelfStore.getActivityUrlOverride() ?? '']);
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
const value10 = defaultImport.toURLSafe(a0.url);
const value11 = value != null;
reducibleJoin10: while (true) {
if (value11) {
value12 = value10 != null;
r1 = value12;
break reducibleJoin10;
}
r1 = value11;
break reducibleJoin10;
}
reducibleJoin12: while (true) {
if (r1) {
origin = value.origin;
pathname = value.pathname;
value = origin + pathname;
origin = value10.origin;
pathname = value10.pathname;
value = value === origin + pathname;
r1 = value;
break reducibleJoin12;
}
break reducibleJoin12;
}
return r1;
}
function _fun82307(a0) { // fn#82307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:5440, offset: 0x01ef2d9f, size: 66 bytes, params: 2, frame: 13
var injectJavaScript;
var value;
const current = env0_33.current;
if (current != null) {
injectJavaScript = current.injectJavaScript;
value = environment.__proto__;
value = importDefault(8071) /* metro dependency 8071: getPostMessageJavaScript */;
Reflect.apply(injectJavaScript, current, [value(a0)]);
}
}
function _fun82308(a0) { // fn#82308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:5528, offset: 0x01ef2de1, size: 160 bytes, params: 2, frame: 17
var JSON;
var value2;
var value6;
var value7;
var defaultImport;
if (webViewKey == null) {
JSON = global.JSON;
value2 = JSON.parse(a0.nativeEvent.data);
if (typeof value2 === 'object' && env0_18?.origin != null) {
value6 = environment.__proto__;
value7 = undefined;
defaultImport = importDefault(8072) /* metro dependency 8072: WebViewPostMessageTransport */;
defaultImport.handleMessage(value2, env0_18 == null ? value7 : env0_18.origin, env0_34);
}
}
}
function _fun82309() { // fn#82309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:5738, offset: 0x01ef2e81, size: 43 bytes, params: 1, frame: 9
if (env0_32) {
if (env0_20 != null) {
_fun82310()();
}
}
}
function _fun82316() { // fn#82316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:8084, offset: 0x01ef320d, size: 155 bytes, params: 1, frame: 16
var value3;
var defaultImport;
var value4;
if (!hadInvalidUrlError && hasInvalidUrlError) {
if (channelId != null) {
value3 = environment.__proto__;
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport.selectParticipant(channelId, null);
}
value4 = environment.__proto__;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity?.location,
applicationId: applicationId, showFeedback: false});
}
}
function EmbeddedActivityWebViewHasFrameId() { // fn#82317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:8284, owner: EmbeddedActivityWebView.hasFrameId, offset: 0x01ef32a8, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).hasFrameId();
}
function EmbeddedActivityWebViewGetOrCreateFrameId() { // fn#82318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:8329, owner: EmbeddedActivityWebView.getOrCreateFrameId, offset: 0x01ef32cd, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).getOrCreateFrameId();
}
function EmbeddedActivityWebViewReleaseFrameId() { // fn#82319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:8378, owner: EmbeddedActivityWebView.releaseFrameId, offset: 0x01ef32f2, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).releaseFrameId();
}
function _fun82286() { // fn#82286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:2315, offset: 0x01ef2537, size: 79 bytes, params: 1, frame: 14
var value2;
var ComponentDispatch;
if (webViewKey == null) {
value2 = environment.__proto__.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.IFRAME_UNMOUNT, {id: env1_17});
}
}
function _fun82288() { // fn#82288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:2625, offset: 0x01ef259b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun82290);
return _fun82291;
}
function parseCsp(a0, a1) { // fn#82299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4450, offset: 0x01ef2a53, size: 85 bytes, params: 3, frame: 12
var r0;
let value = a1.match(a0);
if (value === null) {
r0 = [];
} else if (value.length >= 2) {
value = value[1].split(' ');
value = value.filter(_fun82300);
r0 = value;
} else {
r0 = [];
}
return r0;
}
function _fun82301() { // fn#82301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4554, offset: 0x01ef2ac1, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun82303);
return _fun82305;
}
function _fun82310() { // fn#82310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:5765, offset: 0x01ef2eac, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun82312);
return _fun82313;
}
function* _fun82290() { // fn#82290, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:2645, offset: 0x01ef25ca, size: 396 bytes, params: 1, frame: 23
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
let binding = env4_0;
const value3 = undefined;
const stableSafeAreaInsets = binding(env4_3[15]).getStableSafeAreaInsets();
const current = env3_25.current;
const object2 = {};
binding = env4_19;
const left = current == null ? value3 : current.left;
const left2 = stableSafeAreaInsets == null ? value3 : stableSafeAreaInsets.left;
const value7 = 0;
object2.left = binding(left, left2 ?? value7);
object2.right = env4_19(current == null ? value3 : current.right,
(stableSafeAreaInsets == null ? value3 : stableSafeAreaInsets.right) ?? value7);
object2.top = env4_19(current == null ? value3 : current.top,
(stableSafeAreaInsets == null ? value3 : stableSafeAreaInsets.top) ?? value7);
object2.bottom = env4_19(current == null ? value3 : current.bottom,
(stableSafeAreaInsets == null ? value3 : stableSafeAreaInsets.bottom) ?? value7);
yield env4_1(env4_3[18])({iFrameUri: env3_24, iFrameSandboxAttributes: env3_23, referrerPolicy: ActivityPlatform,
insets: object2, messageForDisallowedNavigationError: env4_16 ? value3 : env4_10});
value = undefined;
if (false) {
return value;
}
if (value != null) {
useHasInvalidUrlErrorState(value);
} else {
DeveloperActivityShelfStore();
}
return value3;
}
function _fun82300(a0) { // fn#82300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4528, offset: 0x01ef2aa8, size: 25 bytes, params: 2, frame: 11
const binding = env1_0;
return !binding.includes(a0);
}
function* _fun82303() { // fn#82303, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4574, offset: 0x01ef2af0, size: 289 bytes, params: 1, frame: 20
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_6;
var HermesInternal = global.HermesInternal;
var concat = HermesInternal.concat;
var value3 = 'https://' + binding + '.' + 'discordsays.com';
var HTTP = env4_0(env4_3[23]).HTTP;
var get = HTTP.get;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
yield Reflect.apply(get, HTTP, [{url: '' + value3 + '/.discord/csp', rejectWithError: false}]);
var value5 = undefined;
if (false) {
return value5;
}
var property = value5.headers['content-security-policy'];
items = ['about:blank', 'file://*'];
items[2] = value3;
arraySpread(items, getOrCreateFrameId(RegExp('child-src (.*?);', ''), property), arraySpread(items,
getOrCreateFrameId(RegExp('frame-src (.*?);', ''), property), 3, concat), concat);
env3_31(items.map(_fun82304));
env3_29(true);
}
}
function* _fun82312() { // fn#82312, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:5785, offset: 0x01ef2edb, size: 434 bytes, params: 1, frame: 25
var left;
var left2;
var right;
var right2;
var top;
var top2;
var bottom;
var bottom2;
var left3;
var right3;
var top3;
var bottom3;
var injectJavaScript;
var binding2;
var property;
var value6;
var value7;
var value8;
var value9;
var value10;
var error;
var current;
var binding3;
if (false) {
return undefined;
}
value = undefined;
const r13 = DISALLOWED_NAVIGATION_ERROR_CLOSE_ACTIVITY ? {'top': 0, 'bottom': 0, 'left': 0, 'right': 0} : env3_22;
const object2 = {type: 'safeAreaUpdateEvent'};
const object4 = {};
let binding = env4_19;
reducibleJoin6: while (true) {
if (AnalyticEvents == null) {
left = value;
break reducibleJoin6;
}
left = AnalyticEvents.left;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (r13 == null) {
left2 = value;
break reducibleJoin8;
}
left3 = r13.left;
left2 = left3;
break reducibleJoin8;
}
const value5 = 0;
object4.left = binding(left, left2 ?? value5);
binding = env4_19;
reducibleJoin11: while (true) {
if (AnalyticEvents == null) {
right = value;
break reducibleJoin11;
}
right = AnalyticEvents.right;
break reducibleJoin11;
}
reducibleJoin13: while (true) {
if (r13 == null) {
right2 = value;
break reducibleJoin13;
}
right3 = r13.right;
right2 = right3;
break reducibleJoin13;
}
object4.right = binding(right, right2 ?? value5);
binding = env4_19;
reducibleJoin16: while (true) {
if (AnalyticEvents == null) {
top = value;
break reducibleJoin16;
}
top = AnalyticEvents.top;
break reducibleJoin16;
}
reducibleJoin18: while (true) {
if (r13 == null) {
top2 = value;
break reducibleJoin18;
}
top3 = r13.top;
top2 = top3;
break reducibleJoin18;
}
object4.top = binding(top, top2 ?? value5);
binding = env4_19;
reducibleJoin21: while (true) {
if (AnalyticEvents == null) {
bottom = value;
break reducibleJoin21;
}
bottom = AnalyticEvents.bottom;
break reducibleJoin21;
}
reducibleJoin23: while (true) {
if (r13 == null) {
bottom2 = value;
break reducibleJoin23;
}
bottom3 = r13.bottom;
bottom2 = bottom3;
break reducibleJoin23;
}
object4.bottom = binding(bottom, bottom2 ?? value5);
object2.data = {insets: object4};
reducibleJoin26: while (true) {
reduciblePort41: while (true) {
exceptionLanding39: while (true) {
try {
} catch (error) {
break exceptionLanding39;
}
break reducibleJoin26;
}
current = env3_33.current;
reducibleJoin41: while (true) {
if (current == null) {
break reducibleJoin41;
}
binding = env3_34;
binding3 = env4_1;
binding(binding3(env4_3[26])(object2));
break reducibleJoin41;
}
break reduciblePort41;
}
return value;
}
try {
injectJavaScript = BaseActivityWebView.injectJavaScript;
} catch (error) {
break exceptionLanding39;
}
try {
binding = env4_1;
} catch (error) {
break exceptionLanding39;
}
try {
binding2 = env4_3;
} catch (error) {
break exceptionLanding39;
}
try {
property = binding2[26];
} catch (error) {
break exceptionLanding39;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding39;
}
try {
value7 = value6(object2);
} catch (error) {
break exceptionLanding39;
}
try {
value8 = Reflect.apply(injectJavaScript, BaseActivityWebView, [value7]);
} catch (error) {
break exceptionLanding39;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding39;
}
return value10 ? value9 : value;
}
function _fun82304(a0) { // fn#82304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10895:4851, offset: 0x01ef2c11, size: 88 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
value = env5_1(env5_3[24]);
value = value(a0);
value = value.replace(RegExp('\\\\\\*', 'g'), '.*');
return '^' + value;
}
@@ -0,0 +1,51 @@
/* Metro module 10662; source: modules/activities/native/IgnoreThermalStateAlert.tsx; dependencies: [31, 33, 4501, 4596, 1244, 7860, 4573, 2] */
function _fun81998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10848:6, offset: 0x01ee6a12, size: 207 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({text: {'marginTop': 16,
'lineHeight': 20, 'textAlign': 'center'}, header: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/IgnoreThermalStateAlert.tsx');
exports.IgnoreThermalStateAlert = IgnoreThermalStateAlert;
}
function IgnoreThermalStateAlert(a0) { // fn#81999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10848:351, offset: 0x01ee6ae1, size: 434 bytes, params: 2, frame: 25
const env0_0 = a0.onConfirm;
let value = Object.create(null);
value.onConfirm = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const defaultImportProps = {...value2};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
defaultImportProps['cancelText'] = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['1fRDnT']]);
defaultImportProps['onCancel'] = IgnoreThermalStateAlertOnCancel;
defaultImportProps['confirmText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oEAioF);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={styles.header} variant="heading-lg/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v5X4fZ)}</Text>;
string = intl.string;
const VOgTjy = (require(1244) /* metro dependency 1244: indexNative */).t.VOgTjy;
return (
<Alert {...defaultImportProps}>
{value}
<Text style={styles.text} variant="text-md/medium">
{Reflect.apply(string, intl, [VOgTjy])}
</Text>
</Alert>
);
}
function IgnoreThermalStateAlertOnCancel() { // fn#82000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10848:498, owner: IgnoreThermalStateAlert.onCancel, offset: 0x01ee6c93, size: 60 bytes, params: 1, frame: 11
if (onConfirm != null) {
onConfirm();
}
const value = environment.__proto__;
(require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).disregardSeriousThermalState();
}
@@ -0,0 +1,65 @@
/* Metro module 15451; source: modules/activities/native/VoiceControlsToggleNuxActionSheet.tsx; dependencies: [57, 31, 27, 4502, 1376, 33, 4501, 697, 8750, 566, 6275, 9543, 4573, 1244, 4578, 2] */
function _fun118260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15648:6, offset: 0x024d343e, size: 383 bytes, params: 8, frame: 21
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 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
object = {videoURI: 'https://cdn.discordapp.com/assets/activities/platform/activities_pipfab_tutorial_redesign.mp4'};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.overflow = 'hidden';
const env0_11 = Reflect.apply(createStyles, value, [{videoContainer: object3,
bottomSheetWrapper: {paddingHorizontal: 24}, contentContainer: {'flex': 1, 'alignItems': 'center',
'paddingTop': 24, 'paddingBottom': 16}, title: {'marginTop': 16, 'textAlign': 'center'}, body: {'marginTop': 8,
'marginBottom': 24, 'textAlign': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/VoiceControlsToggleNuxActionSheet.tsx');
exports.default = VoiceControlsToggleActionSheet;
}
function VoiceControlsToggleActionSheet({markAsDismissed}) { // fn#118261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15648:724, offset: 0x024d35bd, size: 670 bytes, params: 2, frame: 29
const styles = useStyles();
const [property, env0_1] = env0_3(env0_4.useState(0), 2);
const value4 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const r16 = value4 ? 2.0875 : 1.5;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const viewBindingProps = {style: styles.contentContainer, onLayout: onLayout_118264};
const items2 = [((Component) => <Component style={styles.videoContainer} src={env0_10} poster="https://cdn.discordapp.com/assets/activities/platform/activities_pipfab_tutorial_redesign.png" width={property} height={property / r16} muted paused={useReducedMotion} />)(importDefault(9543) /* metro dependency 9543: Video */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pT6hue)}</Text>;
items2[2] = <Text style={styles.body} variant="text-sm/normal">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tNm8AZ)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <Button onPress={function() {
return markAsDismissed(ContentDismissActionType.UNKNOWN);
}} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} />;
return (
<BottomSheet startExpanded onDismiss={function() {
return markAsDismissed(ContentDismissActionType.UNKNOWN);
}}>
<View style={styles.bottomSheetWrapper}>
<View {...viewBindingProps}>
{items2}
</View>
</View>
</BottomSheet>
);
}
function VoiceControlsToggleActionSheetOnLayout({nativeEvent}) { // fn#118264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15648:1105, owner: VoiceControlsToggleActionSheet.onLayout, offset: 0x024d3878, size: 55 bytes, params: 2, frame: 12
const width = nativeEvent.layout.width;
env0_1(env0_2 ? width / 2 : width);
}
@@ -0,0 +1,43 @@
/* Metro module 10710; source: modules/activities/native/WebViewContext.tsx; dependencies: [57, 31, 27, 33, 4501, 2] */
function _fun82320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10896:6, offset: 0x01ef3317, size: 244 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
value = value.createContext(0);
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({placeholderWebView: {'width': 2,
'height': 2, 'position': 'absolute', 'opacity': 0}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/WebViewContext.tsx');
exports.WebViewContext = value;
exports.WebViewContextProvider = WebViewContextProvider;
}
function WebViewContextProvider({children}) { // fn#82321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10896:395, offset: 0x01ef340b, size: 176 bytes, params: 2, frame: 19
const styles = useStyles();
const binding = env0_1;
const value3 = env0_0(binding.useState(0), 2);
const property = value3[0];
const value4 = binding.useCallback(_fun82322, [value3[1]]);
const Provider = env0_5.Provider;
return (
<Provider value={property}>
<View
style={styles.placeholderWebView}
ref={value4}
pointerEvents="none"
/>
{children}
</Provider>
);
}
function _fun82322(a0) { // fn#82322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10896:507, offset: 0x01ef34bb, size: 30 bytes, params: 2, frame: 11
if (a0) {
env0_0(a0._nativeTag);
}
}
@@ -0,0 +1,24 @@
/* Metro module 15362; source: modules/activities/native/applyActivityOrientationLock.tsx; dependencies: [4237, 10703, 7717, 2] */
function _fun117442(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15559:6, offset: 0x024b320f, 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(4237) /* metro dependency 4237: Constants */).OrientationLockState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/applyActivityOrientationLock.tsx');
exports.default = applyActivityOrientationLock;
}
function applyActivityOrientationLock(a0) { // fn#117443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15559:229, offset: 0x024b3284, size: 208 bytes, params: 2, frame: 15
const getDefaultOrientationLockStateModule = require(10703) /* metro dependency 10703: getDefaultOrientationLockState */;
const getIsTabletActivitySurface = getDefaultOrientationLockStateModule.getIsTabletActivitySurface;
if (!Reflect.apply(getIsTabletActivitySurface, getDefaultOrientationLockStateModule, [])) {
if (OrientationLockState.UNLOCKED === a0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: true});
} else if (OrientationLockState.PORTRAIT === a0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
} else if (OrientationLockState.LANDSCAPE === a0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('LANDSCAPE', true);
}
}
}
@@ -0,0 +1,301 @@
/* Metro module 10714; source: modules/activities/native/createWebviewHtmlFile.tsx; dependencies: [5, 27, 477, 1279, 1216, 2] */
function _fun82335(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10900:6, offset: 0x01ef3893, size: 186 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 = (require(27) /* metro dependency 27 */).NativeModules;
const safeAreasUpdateListenerJs = function({iframeWindowVarName, isIframeLoadedVarName}) {
return '\n function updateSafeAreaVars(insets) {\n var iframeDoc = ' + iframeWindowVarName + ".document;\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-left', `${insets.left}px`);\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-right', `${insets.right}px`);\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-top', `${insets.top}px`);\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-bottom', `${insets.bottom}px`);\n " + iframeWindowVarName + ".dispatchEvent(new Event('resize'));\n // Force redraw\n iframeDoc.documentElement.offsetHeight;\n }\n " + iframeWindowVarName + ".addEventListener('message', function (e) {\n const messageData = e.data;\n const {type, data} = messageData;\n if (type === 'safeAreaUpdateEvent') {\n const {insets} = data;\n if (" + isIframeLoadedVarName + ') {\n updateSafeAreaVars(insets);\n } else {\n ' + iframeWindowVarName + '.addEventListener("load", () => {\n updateSafeAreaVars(insets);\n });\n }\n }\n });\n';
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/createWebviewHtmlFile.tsx');
exports.default = function() {
return _createWebviewHtmlFile.apply(this, arguments);
};
exports.createInjectedJavascriptForIOS = createInjectedJavascriptForIOS;
}
function _createWebviewHtmlFile() { // fn#82336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10900:1868, offset: 0x01ef394d, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun82338).apply(this, arguments);
}
function safeAreaInitJs({insets, iframeWindowVarName, isIframeLoadedVarName}) { // fn#82340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10900:147, offset: 0x01ef3c2d, size: 133 bytes, params: 2, frame: 36
const r0 = insets ?? ({'top': 0, 'bottom': 0, 'left': 0, 'right': 0});
return '\n ' + iframeWindowVarName + '.addEventListener("load", () => {\n var iframeDoc = ' + iframeWindowVarName + ".document;\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-left', '" + r0.left + "px');\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-right', '" + r0.right + "px');\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-top', '" + r0.top + "px');\n iframeDoc.documentElement.style.setProperty('--discord-safe-area-inset-bottom', '" + r0.bottom + "px');\n " + isIframeLoadedVarName + ' = true;\n });\n';
}
function createInjectedJavascriptForIOS(a0) { // fn#82343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10900:4771, offset: 0x01ef3d04, size: 98 bytes, params: 2, frame: 16
return '\nvar iframeWindow = window;\nvar isIframeLoaded = false;\n' + safeAreaInitJs({'insets': null,
'iframeWindowVarName': 'iframeWindow', 'isIframeLoadedVarName': 'isIframeLoaded',
insets: a0}) + '\n' + safeAreasUpdateListenerJs({'iframeWindowVarName': 'iframeWindow',
'isIframeLoadedVarName': 'isIframeLoaded'}) + '\n';
}
async function _fun82338({iFrameUri, iFrameSandboxAttributes, referrerPolicy, insets, messageForDisallowedNavigationError}) { // fn#82338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10900:1935, offset: 0x01ef3993, size: 346 bytes, params: 2, frame: 23
var r2;
var binding;
var binding2;
var property;
var value7;
var isAndroid;
var isAndroid2;
var DCDFileManager;
var writeFile;
var value8;
var value9;
var value10;
var binding3;
var value11;
var value12;
var binding4;
var value13;
var value14;
var value15;
var value16;
var error;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
const value5 = _fun82339({iFrameUri: iFrameUri, iFrameSandboxAttributes: iFrameSandboxAttributes,
referrerPolicy: referrerPolicy, insets: insets,
messageForDisallowedNavigationError: messageForDisallowedNavigationError});
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
property = binding2[2];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
isAndroid = value7.isAndroid;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
isAndroid2 = Reflect.apply(isAndroid, value7, []);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
if (isAndroid2) {
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
value11 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
value12 = value11 == null;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
if (value12) {
r2 = value;
} else {
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
binding4 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
property = binding4[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
value13 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
writeFile = value13.writeFile;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
value14 = Reflect.apply(writeFile, value13, ['cache', 'discord_activity_data/activity.html', value5,
'utf8']);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
r2 = value14;
}
await r2;
try {
value15 = undefined;
value16 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
if (value16) {
return value15;
}
return value15;
}
try {
binding = env2_4;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
DCDFileManager = binding.DCDFileManager;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
writeFile = DCDFileManager.writeFile;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
try {
value8 = Reflect.apply(writeFile, DCDFileManager, ['cache', 'discord_activity_data/activity.html', value5,
'utf8']);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
await value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.captureException(error);
return null;
}
if (value10) {
}
return value9;
}
function _fun82339({iFrameUri, iFrameSandboxAttributes, referrerPolicy, insets, messageForDisallowedNavigationError}) { // fn#82339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10900:2097, offset: 0x01ef3aed, size: 320 bytes, params: 2, frame: 29
var r7;
var r8;
var value4;
let value = environment.__proto__.__proto__.__proto__;
let binding = env3_0;
const isAndroid2 = binding(env3_2[2]).isAndroid();
const value3 = '';
if (isAndroid2) {
binding = env3_5;
value4 = binding({'insets': null, 'iframeWindowVarName': 'iframeWindow',
'isIframeLoadedVarName': 'isIframeLoaded',
insets: insets});
binding = env3_6;
value = binding({'iframeWindowVarName': 'iframeWindow', 'isIframeLoadedVarName': 'isIframeLoaded'});
value = '\n <script type="text/javascript">\n var iframe = document.getElementById("activityFrame");\n var iframeWindow = iframe.contentWindow;\n var isIframeLoaded = false;\n ' + value4 + '\n ' + value + '\n </script>\n ';
r7 = value;
} else {
r7 = value3;
}
if (messageForDisallowedNavigationError != null) {
value = '\n ' + 'iframeWindow' + ".addEventListener('beforeunload', function (e) {\n window.ReactNativeWebView.postMessage('" + messageForDisallowedNavigationError + "');\n e.preventDefault();\n });\n";
value = '\n <script type="text/javascript">\n var iframe = document.getElementById("activityFrame");\n var iframeWindow = iframe.contentWindow;\n ' + value + '\n </script>\n ';
r8 = value;
} else {
r8 = value3;
}
return '\n <html>\n <head>\n <style>\n body {\n padding: 0;\n margin: 0;\n width: 100vw;\n min-height: 100vh; /* This keeps a small white gap at the bottom of the screen, the options below help prevent this. */\n min-height: -moz-available; /* See: https://ilxanlar.medium.com/you-shouldnt-rely-on-css-100vh-and-here-s-why-1b4721e74487 for more info */\n min-height: -webkit-fill-available;\n min-height: fill-available;\n }\n </style>\n <meta\n name="viewport"\n content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"\n />\n </head>\n <body>\n <script type="text/javascript">\n window.addEventListener(\'message\', e => {\n window.ReactNativeWebView.postMessage(JSON.stringify(e.data));\n });\n </script>\n <iframe id="activityFrame" width="100%" height="100%" src="' + iFrameUri + '" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen sandbox="' + iFrameSandboxAttributes + '" referrerPolicy="' + referrerPolicy + '">\n </iframe>\n ' + r7 + '\n ' + r8 + '\n </body>\n </html>\n';
}
@@ -0,0 +1,17 @@
/* Metro module 10705; source: modules/activities/native/doesOrientationMatchLockState.tsx; dependencies: [4237, 2] */
function _fun82264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10891:6, offset: 0x01ef13e3, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/doesOrientationMatchLockState.tsx');
exports.default = doesOrientationMatchLockState;
}
function doesOrientationMatchLockState(a0, a1) { // fn#82265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10891:230, offset: 0x01ef1450, size: 89 bytes, params: 3, frame: 5
const value = a0;
let r0 = a1 == null || a1 === OrientationLockState.UNLOCKED;
r0 = !r0 ? !value && a1 === OrientationLockState.PORTRAIT : r0;
r0 = !r0 ? value && a1 === OrientationLockState.LANDSCAPE : r0;
return r0;
}
@@ -0,0 +1,43 @@
/* Metro module 10703; source: modules/activities/native/getDefaultOrientationLockState.tsx; dependencies: [4092, 1581, 694, 2] */
function _fun82245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10889:6, offset: 0x01ef080f, size: 184 bytes, params: 8, frame: 20
const closure = getIsTabletActivitySurface;
const closure2 = getDefaultOrientationLockState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS();
const env0_3 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/getDefaultOrientationLockState.tsx');
exports.getIsTabletActivitySurface = closure;
exports.setOrientationLockState = setOrientationLockState;
exports.getDefaultOrientationLockState = closure2;
}
function getIsTabletActivitySurface() { // fn#82246, offset: 0x01ef08c7, size: 16 bytes, params: 1, frame: 3
return env0_2 || env0_3;
}
function getDefaultOrientationLockState(a0) { // fn#82247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10889:191, offset: 0x01ef08d7, size: 68 bytes, params: 2, frame: 12
var value;
var getIsTabletActivitySurfaceBinding;
var isTabletActivitySurfaceBinding;
var embeddedActivityConfig;
var value3;
if (a0 != null) {
getIsTabletActivitySurfaceBinding = getIsTabletActivitySurface;
value = undefined;
isTabletActivitySurfaceBinding = getIsTabletActivitySurfaceBinding();
embeddedActivityConfig = a0.embeddedActivityConfig;
value3 = embeddedActivityConfig == null;
return isTabletActivitySurfaceBinding ? value3 ? value : embeddedActivityConfig.tablet_default_orientation_lock_state : value3 ? value : embeddedActivityConfig.default_orientation_lock_state;
}
}
function setOrientationLockState(a0, a1) { // fn#82248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10889:622, offset: 0x01ef091b, size: 95 bytes, params: 3, frame: 14
const r3 = a1 ?? getDefaultOrientationLockState(a0);
if (r3 != null) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMBEDDED_ACTIVITY_SET_ORIENTATION_LOCK_STATE',
applicationId: a0.id, lockState: r3});
}
}
@@ -0,0 +1,11 @@
/* Metro module 8071; source: modules/activities/native/getPostMessageJavaScript.tsx; dependencies: [2] */
function _fun64075(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8249:6, offset: 0x01b9a96d, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/getPostMessageJavaScript.tsx');
exports.default = function(a0) {
var JSON = global.JSON;
return "\n (function() {\n const iFrame = document.getElementById('activityFrame');\n iFrame.contentWindow.postMessage(" + JSON.stringify(a0) + ", '*');\n })()\n ";
};
}
@@ -0,0 +1,88 @@
/* Metro module 12705; source: modules/activities/native/openActivityDMLauncher.tsx; dependencies: [5, 1483, 6772, 4603, 9468, 9472, 6789, 5068, 4015, 1583, 2] */
function _fun97348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12895:6, offset: 0x0217cb3e, size: 151 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 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/openActivityDMLauncher.tsx');
exports.default = function() {
return _openActivityDMLauncher.apply(this, arguments);
};
}
function _openActivityDMLauncher() { // fn#97349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12895:137, offset: 0x0217cbd5, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun97351).apply(this, arguments);
}
async function _fun97351(a0, a1, a2, a3) { // fn#97351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12895:206, offset: 0x0217cc1b, size: 504 bytes, params: 5, frame: 25
var bestActiveInput;
var openCustomKeyboard;
let value = a4;
if (false) {
return undefined;
}
const value4 = undefined;
const r7 = value !== value4 ? value : false;
await value4;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
const value6 = binding(env2_2[2]);
await value6.fetchApplication(a0);
const value7 = undefined;
if (false) {
return value7;
}
const bot = value7.bot;
const id = bot == null ? value4 : bot.id;
if (value7 != null) {
if (id == null) {
return value4;
}
var value9 = env2_1(env2_2[3]);
var openPrivateChannel = value9.openPrivateChannel;
var object2 = {recipientIds: id};
await Reflect.apply(openPrivateChannel, value9, [object2]);
var value10 = undefined;
if (false) {
return value10;
}
var value12 = env2_0(env2_2[4]);
var getCustomActivityLinkParams = value12.getCustomActivityLinkParams;
await Reflect.apply(getCustomActivityLinkParams, value12, [a0, a3, a2]);
var value13 = undefined;
if (false) {
return value13;
}
var customId = value13.customId;
if (r7) {
bestActiveInput = env2_0(env2_2[8]).getBestActiveInput();
if (bestActiveInput != null) {
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
object2 = {};
object2.type = env2_0(env2_2[9]).KeyboardTypes.APP_LAUNCHER;
object2.context = {application: value7, initialRouteName: env2_4.APPLICATION_VIEW, customId: customId,
referrerId: a1};
Reflect.apply(openCustomKeyboard, bestActiveInput, [object2]);
}
return value4;
}
binding = env2_1;
var binding2 = env2_2;
var value15 = binding(binding2[5]);
object2 = {targetApplicationId: a0, locationObject: {}, channelId: value10};
var ACTIVITY_BOOKMARK = binding(binding2[6]).ACTIVITY_BOOKMARK;
object2.analyticsLocations = [ACTIVITY_BOOKMARK];
var CommandOrigin = env2_0(binding2[7]).CommandOrigin;
var ACTIVITY_BOOKMARK_EMBED = CommandOrigin.ACTIVITY_BOOKMARK_EMBED;
object2.commandOrigin = ACTIVITY_BOOKMARK_EMBED;
object2.referrerId = a1;
object2.customId = customId;
await value15(object2);
}
return value4;
}
@@ -0,0 +1,35 @@
/* Metro module 10661; source: modules/activities/native/openIgnoreThermalStateAlert.tsx; dependencies: [31, 33, 4496, 10662, 1962, 2] */
function _fun81993(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10847:6, offset: 0x01ee68bf, size: 138 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_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/openIgnoreThermalStateAlert.tsx');
exports.openIgnoreThermalStateAlert = openIgnoreThermalStateAlert;
}
function openIgnoreThermalStateAlert(a0) { // fn#81994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10847:239, offset: 0x01ee6949, size: 61 bytes, params: 2, frame: 13
const env0_0 = a0;
const value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_81995});
}
function openIgnoreThermalStateAlertImporter() { // fn#81995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10847:306, owner: openIgnoreThermalStateAlert.importer, offset: 0x01ee6986, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
return value.then(function({IgnoreThermalStateAlert}) {
return _fun81997;
});
}
function _fun81996({IgnoreThermalStateAlert}) { // fn#81996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10847:338, offset: 0x01ee69c6, size: 24 bytes, params: 2, frame: 2
return _fun81997;
}
function _fun81997(a0) { // fn#81997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10847:369, offset: 0x01ee69de, size: 52 bytes, params: 2, frame: 14
return <IgnoreThermalStateAlert {...a0} {...{['onConfirm']: env2_0}} />;
}
@@ -0,0 +1,17 @@
/* Metro module 7737; source: modules/activities/native/useIsViewingActivity.tsx; dependencies: [4606, 7724, 4007, 7714, 566, 2] */
function _fun61932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7915:6, offset: 0x01b4ee3a, size: 116 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/useIsViewingActivity.tsx');
exports.useIsViewingActivity = useIsViewingActivity;
}
function useIsViewingActivity({channelId}) { // fn#61933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7915:213, offset: 0x01b4eeae, size: 146 bytes, params: 2, frame: 21
return (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channelId) && (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */) && !(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore],
function() {
return ChannelRTCStore.getChatOpen(channelId);
}, [channelId]);
}
@@ -0,0 +1,23 @@
/* Metro module 13033; source: modules/activities/openActivityShareLinkModal.native.tsx; dependencies: [4015, 5080, 13034, 1962, 2] */
function _fun99482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13223:6, offset: 0x021ca7a6, size: 130 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/activities/openActivityShareLinkModal.native.tsx');
exports.ACTIVITY_SHARE_LINK_MODAL = 'ACTIVITY_SHARE_LINK_MODAL';
exports.openActivityShareLinkModal = openActivityShareLinkModal;
exports.closeActivityShareLinkModal = closeActivityShareLinkModal;
}
function openActivityShareLinkModal({applicationId, customId, linkId, message, onShare}) { // fn#99483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13223:275, offset: 0x021ca828, size: 174 bytes, params: 2, frame: 22
require(dependencyMap[0]).dismissKeyboard();
const defaultImport = importDefault(dependencyMap[1]);
defaultImport.pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths),
{applicationId: applicationId, customId: customId, linkId: linkId, message: message, onShare: onShare},
'ACTIVITY_SHARE_LINK_MODAL', {presentation: 'modal'});
}
function closeActivityShareLinkModal() { // fn#99484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13223:517, offset: 0x021ca8d6, size: 44 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('ACTIVITY_SHARE_LINK_MODAL');
}
@@ -0,0 +1,23 @@
/* Metro module 8044; source: modules/activities/panel/ActivityPanelConstants.tsx; dependencies: [2] */
function _fun63763(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8222:6, offset: 0x01b8f517, size: 301 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {NO_CHAT: 0};
object[0] = 'NO_CHAT';
object.RESIZABLE = 1;
object[1] = 'RESIZABLE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/ActivityPanelConstants.tsx');
exports.ActivityPanelModes = {DISCONNECTED: 'disconnected',
LAUNCHING_WITH_ORIENTATION_CHANGE: 'launching_with_orientation_change', PANEL: 'panel', PIP: 'pip',
ACTIVITY_POPOUT_WINDOW: 'activity_popout_window'};
exports.SCREEN_HEADER_HEIGHT = 64;
exports.ACTIVITY_PANEL_LAYOUT_PHYSICS = {'stiffness': 320, 'mass': 0.25, 'damping': 15, 'overshootClamping': true};
exports.FocusedActivityLayouts = object;
exports.LANDSCAPE_ACTIVITY_ASPECT_RATIO = 1.7777777777777777;
exports.ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT = 48;
exports.LANDSCAPE_IFRAME_HORIZONTAL_MARGIN = 64;
exports.ACTIVITY_PIP_SIZE = {'width': 120, 'height': 120};
exports.ACTIVITY_LAYOUT_PHYSICS_GESTURE = {'stiffness': 150, 'mass': 0.25, 'damping': 40, 'overshootClamping': true};
exports.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = {'stiffness': 150, 'mass': 0.35, 'damping': 40, 'overshootClamping': true};
}
@@ -0,0 +1,512 @@
/* Metro module 15380; source: modules/activities/panel/native/ActivityInviteSheet.tsx; dependencies: [57, 31, 27, 9208, 9163, 661, 4118, 482, 33, 4501, 697, 9161, 6771, 6789, 4080, 8743, 9153, 11328, 566, 9164, 6275, 6758, 1244, 1305, 9165, 6984, 15381, 2] */
function _fun117571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:6, offset: 0x024b87cf, size: 653 bytes, params: 8, frame: 23
var object4;
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 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(9208) /* metro dependency 9208: InstantInviteSendStateStore */;
const env0_6 = value.setSendState;
const env0_7 = value.useInstantInviteSendStates;
const inviteSuggestionsStore = importDefault(9163) /* metro dependency 9163: InviteSuggestionsStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ActivityActionTypes;
value = require(4118) /* metro dependency 4118: Constants */;
const env0_10 = value.InviteSendStates;
const env0_11 = value.InviteTargetTypes;
const env0_12 = (require(482) /* metro dependency 482: Constants */).NOOP_NULL;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object6 = {'height': 16, 'width': '80%', 'margin': 16, 'marginBottom': 8};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object4.placeholderHeader = object6;
const object7 = {'height': 16, 'width': '40%', 'margin': 16};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object7.backgroundColor = BACKGROUND_MOD_MUTED;
object4.placeholderLabel = object7;
object4.emptyState = {backgroundColor: 'transparent'};
const object8 = {borderTopWidth: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.borderColor = BORDER_SUBTLE;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingVertical = PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.paddingHorizontal = PX_12;
object8.flexDirection = 'column';
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.gap = PX_12;
object4.searchAndShareContainer = object8;
const env0_16 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheet.tsx');
exports.default = ActivityInviteSheet;
}
function Loading_117572() { // fn#117572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:947, offset: 0x024b8a5c, size: 167 bytes, params: 1, frame: 22
var push;
var jsxRuntimeEnv0_13Binding;
var UserPlaceholderRow;
var value3;
const styles = useStyles();
const items2 = [];
let r2 = 0;
reducibleLoop1: while (true) {
push = items2.push;
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
UserPlaceholderRow = importDefault(9161) /* metro dependency 9161: UserPlaceholderRow */;
Reflect.apply(push, items2, [<UserPlaceholderRow row={r2} key={r2} />]);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value3 < 10) {
r2 = value3;
continue reducibleLoop1;
}
break reducibleLoop1;
}
return (
<>
<View style={styles.placeholderHeader} />
<View style={styles.placeholderLabel} />
{items2}
</>
);
}
function ActivityInviteSheet({activity}) { // fn#117573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:1221, offset: 0x024b8b03, size: 1021 bytes, params: 2, frame: 39
var jsxRuntimeEnv0_14Binding;
var SearchField;
var items2;
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var value;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const ACTIVITY_INVITE_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTIVITY_INVITE_SHEET;
const analyticsLocations = defaultImport(ACTIVITY_INVITE_SHEET).analyticsLocations;
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
const value5 = binding.useCallback(_fun117575, [activity, useInstantInviteSendStates(function(a0) {
return a0;
})]);
const value6 = binding.useCallback(_fun117576, [analyticsLocations]);
const value7 = binding.useCallback(_fun117577, [activity]);
const inviteSuggestionRows = (require(566) /* metro dependency 566: flux */).useStateFromStores([InviteSuggestionsStore],
function() {
return InviteSuggestionsStore.getInviteSuggestionRows();
});
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value8[0];
var env0_4 = value8[1];
binding.useEffect(_fun117582, []);
let r7 = inviteSuggestionRows.length === 0 && property2;
let r14 = inviteSuggestionRows.length === 0 && !property2;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object = {'showGradient': null, 'scrollable': true, 'startExpanded': true};
let r10 = property != null || !r7;
r10 = !r10 ? !r14 : r10;
object.showGradient = r10;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OzOM/q'])} />;
if (property != null) {
r7 = <EmptyState style={styles.emptyState} Illustration={(require(9165) /* metro dependency 9165: AppCrash */).AppCrash} title={property} />;
} else if (r7) {
r7 = <Loading_117572 />;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
var viewBindingProps = {style: styles.searchAndShareContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2 = [<View><View {...viewBindingProps}><SearchField size="md" isRound onChange={(require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */).searchInviteSuggestions} placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iI1gMg)} /></View></View>];
if (r14) {
r14 = <EmptyState style={styles.emptyState} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ojoWgX)} />;
} else {
value = importDefault(15381) /* metro dependency 15381: ActivityInviteSheetList */;
value = ((Component) => <Component data={inviteSuggestionRows} error={property} getSendState={value5} onInviteSent={value7} onPressAvatar={value6} />)(value);
r14 = value;
}
items2[1] = r14;
value = <>{items2}</>;
r7 = value;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...object}>
{r7}
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function _fun117575({item}) { // fn#117575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:1409, offset: 0x024b8f00, size: 77 bytes, params: 2, frame: 7
const id = activity.party?.id;
return id != null ? env0_3[id]?.[item.id] : null;
}
function _fun117576(a0) { // fn#117576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:1538, offset: 0x024b8f4d, size: 75 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun117577(a0) { // fn#117577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:1643, offset: 0x024b8f98, size: 550 bytes, params: 2, frame: 23
var environment;
var id;
var value;
var closure;
var value2;
var activityBinding;
var party;
var value3;
var setSendStateBinding;
var item;
var id2;
var SENDING;
var type;
const RowTypes = require(dependencyMap[16]).RowTypes;
var CHANNEL;
var DM;
var FRIEND;
var property;
var defaultImport;
var sendActivityInviteUser;
var object2;
var JOIN;
var defaultImport2;
var ACTIVITY_INVITE_SHEET;
var value4;
var then;
var value5;
var error;
var binding;
var String;
var defaultImport3;
var sendActivityInvite;
var defaultImport4;
var value6;
var value7;
reduciblePort60: while (true) {
exceptionLanding33: while (true) {
exceptionLanding59: while (true) {
var env0_0 = a0;
value = undefined;
closure = markInviteSent;
value2 = environment;
if (activity == null) {
break reduciblePort60;
}
party = activity.party;
reducibleJoin3: while (true) {
if (party == null) {
id = value;
break reducibleJoin3;
}
id = party.id;
break reducibleJoin3;
}
var env0_1 = id;
if (id == null) {
break reduciblePort60;
}
value3 = environment.__proto__;
setSendStateBinding = setSendState;
item = a0.item;
id2 = item.id;
SENDING = InviteSendStates.SENDING;
setSendStateBinding(id, id2, SENDING);
type = a0.type;
CHANNEL = RowTypes.CHANNEL;
if (type === CHANNEL) {
id = a0.item.id;
try {
} catch (error) {
break exceptionLanding59;
}
try {
} catch (error) {
break exceptionLanding59;
}
try {
property = dependencyMap[17];
} catch (error) {
break exceptionLanding59;
}
try {
defaultImport3 = importDefault(property);
} catch (error) {
break exceptionLanding59;
}
try {
sendActivityInvite = defaultImport3.sendActivityInvite;
} catch (error) {
break exceptionLanding59;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding59;
}
try {
object2.channelId = id;
} catch (error) {
break exceptionLanding59;
}
try {
} catch (error) {
break exceptionLanding59;
}
try {
JOIN = ActivityActionTypes.JOIN;
} catch (error) {
break exceptionLanding59;
}
try {
object2.type = JOIN;
} catch (error) {
break exceptionLanding59;
}
try {
activityBinding = activity;
} catch (error) {
break exceptionLanding59;
}
try {
object2.activity = activityBinding;
} catch (error) {
break exceptionLanding59;
}
try {
property = dependencyMap[13];
} catch (error) {
break exceptionLanding59;
}
try {
defaultImport4 = importDefault(property);
} catch (error) {
break exceptionLanding59;
}
try {
ACTIVITY_INVITE_SHEET = defaultImport4.ACTIVITY_INVITE_SHEET;
} catch (error) {
break exceptionLanding59;
}
try {
object2.location = ACTIVITY_INVITE_SHEET;
} catch (error) {
break exceptionLanding59;
}
try {
value6 = Reflect.apply(sendActivityInvite, defaultImport3, [object2]);
} catch (error) {
break exceptionLanding59;
}
try {
then = value6.then;
} catch (error) {
break exceptionLanding59;
}
try {
value7 = Reflect.apply(then, value6, [closure]);
} catch (error) {
break exceptionLanding59;
}
try {
property = value7.catch;
} catch (error) {
break exceptionLanding59;
}
try {
closure = _fun117579;
} catch (error) {
break exceptionLanding59;
}
try {
Reflect.apply(property, value7, [closure]);
} catch (error) {
break exceptionLanding59;
}
break reduciblePort60;
}
type = a0.type;
DM = RowTypes.DM;
if (type !== DM) {
type = a0.type;
FRIEND = RowTypes.FRIEND;
if (type !== FRIEND) {
break reduciblePort60;
}
}
item = a0.item;
id = item.id;
try {
} catch (error) {
break exceptionLanding33;
}
try {
} catch (error) {
break exceptionLanding33;
}
try {
property = dependencyMap[17];
} catch (error) {
break exceptionLanding33;
}
try {
defaultImport = importDefault(property);
} catch (error) {
break exceptionLanding33;
}
try {
sendActivityInviteUser = defaultImport.sendActivityInviteUser;
} catch (error) {
break exceptionLanding33;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding33;
}
try {
object2.userId = id;
} catch (error) {
break exceptionLanding33;
}
try {
} catch (error) {
break exceptionLanding33;
}
try {
JOIN = ActivityActionTypes.JOIN;
} catch (error) {
break exceptionLanding33;
}
try {
object2.type = JOIN;
} catch (error) {
break exceptionLanding33;
}
try {
activityBinding = activity;
} catch (error) {
break exceptionLanding33;
}
try {
object2.activity = activityBinding;
} catch (error) {
break exceptionLanding33;
}
try {
property = dependencyMap[13];
} catch (error) {
break exceptionLanding33;
}
try {
defaultImport2 = importDefault(property);
} catch (error) {
break exceptionLanding33;
}
try {
ACTIVITY_INVITE_SHEET = defaultImport2.ACTIVITY_INVITE_SHEET;
} catch (error) {
break exceptionLanding33;
}
try {
object2.location = ACTIVITY_INVITE_SHEET;
} catch (error) {
break exceptionLanding33;
}
try {
value4 = Reflect.apply(sendActivityInviteUser, defaultImport, [object2]);
} catch (error) {
break exceptionLanding33;
}
try {
then = value4.then;
} catch (error) {
break exceptionLanding33;
}
try {
value5 = Reflect.apply(then, value4, [closure]);
} catch (error) {
break exceptionLanding33;
}
try {
property = value5.catch;
} catch (error) {
break exceptionLanding33;
}
try {
closure = _fun117580;
} catch (error) {
break exceptionLanding33;
}
try {
Reflect.apply(property, value5, [closure]);
} catch (error) {
break exceptionLanding33;
}
break reduciblePort60;
}
binding = env0_2;
String = global.String;
binding(String(error));
break reduciblePort60;
}
binding = env0_2;
String = global.String;
binding(String(error));
break reduciblePort60;
}
return value;
}
function _fun117582() { // fn#117582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:2435, offset: 0x024b924e, size: 137 bytes, params: 1, frame: 15
var environment;
env0_4(true);
const value = environment.__proto__;
const inviteSuggestionsActionCreatorsModule = require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */;
const loadInviteSuggestions = inviteSuggestionsActionCreatorsModule.loadInviteSuggestions;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
Reflect.apply(loadInviteSuggestions, inviteSuggestionsActionCreatorsModule,
[{omitUserIds: set instanceof Object ? set : value2,
inviteTargetType: EMBEDDED_APPLICATION}]).catch(NOOP_NULL).finally(_fun117583);
}
function markInviteSent() { // fn#117578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:2248, offset: 0x024b91be, size: 61 bytes, params: 1, frame: 15
var value2;
if (id != null) {
value2 = environment.__proto__.__proto__;
setSendState(id, env0_0.item.id, InviteSendStates.SENT);
}
}
function _fun117579(a0) { // fn#117579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:1932, offset: 0x024b91fb, size: 32 bytes, params: 2, frame: 12
const binding = env1_2;
const String = global.String;
binding(String(a0));
}
function _fun117580(a0) { // fn#117580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15577:2206, offset: 0x024b921b, size: 32 bytes, params: 2, frame: 12
const binding = env1_2;
const String = global.String;
return binding(String(a0));
}
@@ -0,0 +1,104 @@
/* Metro module 15381; source: modules/activities/panel/native/ActivityInviteSheetList.tsx; dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 15382, 5463, 6277, 2] */
function _fun117584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:6, offset: 0x024b92d7, size: 416 bytes, params: 8, frame: 27
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 Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object5, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object5['textTransform'] = 'none';
object5['lineHeight'] = 24;
object4.emptyTitle = object5;
const object6 = {};
const value3 = textStyles;
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object6, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object6['lineHeight'] = 20;
object6['fontWeight'] = '600';
object4.emptyBody = object6;
object4.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
const keyExtractor_117587 = function(a0) {
return a0.item.id;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheetList.tsx');
exports.default = ActivityInviteSheetList;
}
function FriendsEmptyComponent_117585() { // fn#117585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:479, offset: 0x024b9477, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object.body = Reflect.apply(string, intl, [MBQBI7]);
object.titleStyle = styles.emptyTitle;
object.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_117586, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
}
function ActivityInviteSheetList({data, error, getSendState, isSubmitting, onInviteSent, onPressAvatar}) { // fn#117588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:1294, offset: 0x024b962c, size: 307 bytes, params: 2, frame: 23
const value2 = isSubmitting.useCallback(_fun117589, [error, isSubmitting, getSendState, onPressAvatar, onInviteSent,
data.length]);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const object = {};
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = bottom + PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_117587}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent_117585}
/>
);
}
function _fun117589({item, index}) { // fn#117589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:1427, offset: 0x024b975f, size: 143 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} isSubmitting={isSubmitting} error={error} sendState={getSendState(item)} />)(importDefault(15382) /* metro dependency 15382: ActivityInviteSheetRow */);
}
@@ -0,0 +1,193 @@
/* Metro module 15382; source: modules/activities/panel/native/ActivityInviteSheetRow.tsx; dependencies: [31, 27, 1379, 1867, 1878, 4118, 33, 4501, 697, 566, 4805, 9153, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */
function _fun117590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:6, offset: 0x024b97ee, size: 367 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden', 'marginTop': 0, 'marginRight': 10, 'borderColor': null,
'borderStyle': 'solid', 'borderWidth': 2};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object.borderColor = BORDER_MUTED;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{acronym: object}]);
value = value.memo(_fun117591);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheetRow.tsx');
exports.default = value;
}
function _fun117591({end, error, isSubmitting, onInviteSent, onPressAvatar, row, sendState, start}) { // fn#117591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:501, offset: 0x024b995d, size: 1388 bytes, params: 2, frame: 40
var r25;
var r12;
var r11;
var r13;
var r2;
var r23;
var r1;
var r4;
var r5;
var r6;
var moduleValue2;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var value10;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var value14;
var pressableOpacity;
var value17;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const styles = useStyles();
const id = row.item.id;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const closure = function() {
onInviteSent(row);
};
const type = row.type;
const RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
const DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
value14 = null;
r23 = value14 == user ? undefined : user.getAvatarSource(undefined);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={value14 != r23 ? r23 : value14} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value17 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r1 = value14 != onPressAvatar ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: value14 == user ? undefined : user.tag})}] : undefined;
r4 = I_117595;
r5 = r1;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value17,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
value14 = null;
r23 = value14 == user ? undefined : user.getAvatarSource(undefined);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={value14 != r23 ? r23 : value14} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value17 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r1 = value14 != onPressAvatar ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: value14 == user ? undefined : user.tag})}] : undefined;
r4 = I_117595;
r5 = r1;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value17,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
value10 = null;
if (value10 != channel) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = <Avatar source={Reflect.apply(makeSource, defaultImport3,
[defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
r13 = value10;
}
r2 = value10 != value3 ? value3 : '';
r4 = undefined;
r5 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r2,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r12 = <Avatar source={Reflect.apply(makeSource, defaultImport, [defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
r12 = <View style={styles.acronym}>{((Text) => <Text variant="text-sm/bold">{moduleValue2.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
r11 = value3 == null ? '' : '#' + value3;
r4 = undefined;
r5 = undefined;
var tableRowProps = {start: start, end: end, icon: r12, label: r11,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
return null;
}
function I_117595({nativeEvent}) { // fn#117595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:1321, offset: 0x024b9f10, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
}
}
}
@@ -0,0 +1,51 @@
/* Metro module 15359; source: modules/activities/panel/native/ActivityPanelContainer.tsx; dependencies: [31, 1379, 1934, 1378, 33, 566, 3774, 677, 15360, 15369, 2] */
function _fun117414(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:6, offset: 0x024b20b5, size: 196 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ActivityPanelContainer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelContainer.tsx');
exports.default = value;
}
function ActivityPanelContainer() { // fn#117415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:164, offset: 0x024b2179, size: 141 bytes, params: 1, frame: 18
var r0;
var value;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [EmbeddedActivitiesStore];
items[1] = ChannelStore;
items[2] = SelectedChannelStore;
if (Reflect.apply(useStateFromStores, fluxModule, [items, _fun117416, []])) {
value = importDefault(15360) /* metro dependency 15360: ActivityPanelController */;
value = ((Component) => <Component>{((Component) => <Component />)(importDefault(15369) /* metro dependency 15369: ActivityPanelUI */)}</Component>)(value);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun117416() { // fn#117416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:241, offset: 0x024b2206, size: 188 bytes, params: 1, frame: 17
const value = environment.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
const value3 = undefined;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
if (embeddedActivityLocationChannelId == null) {
return false;
}
const channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
const type = channel == null ? value3 : channel.type;
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
return type === GUILD_TEXT || ((channel == null ? value3 : channel.isPrivate()) !== true ? value3 : SelectedChannelStore.getVoiceChannelId() !== embeddedActivityLocationChannelId);
}
@@ -0,0 +1,402 @@
/* Metro module 15360; source: modules/activities/panel/native/ActivityPanelController.tsx; dependencies: [57, 31, 4234, 9559, 10724, 1379, 1378, 4237, 8044, 33, 1944, 15361, 4017, 7717, 15362, 1585, 1478, 15363, 15366, 10703, 7713, 15367, 5286, 10705, 4015, 566, 3774, 8102, 4796, 4601, 15368, 7860, 2] */
function _fun117417(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:6, offset: 0x024b22c2, size: 407 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = BaseActivityPanelController;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const appFreezeStore = importDefault(9559) /* metro dependency 9559: AppFreezeStore */;
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const constantsModule = require(4237) /* metro dependency 4237: Constants */;
const env0_11 = constantsModule.OrientationLockState;
const env0_12 = constantsModule.ACTIVITY_PORTRAIT_ASPECT_RATIO;
const env0_13 = constantsModule.ACTIVITY_LANDSCAPE_ASPECT_RATIO;
const env0_14 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
const env0_16 = {'x': 0, 'y': 0, 'gestureActive': false};
const env0_17 = (require(1944) /* metro dependency 1944: FunctionUtils */).cachedFunction(_fun117435);
object = {code: 'function ActivityPanelControllerTsx1(){const{wrapperOffset}=this.__closure;return wrapperOffset.get().gestureActive;}'};
object = {code: 'function ActivityPanelControllerTsx2(gestureActive,previous){const{runOnJS,setWrapperGestureInProgress}=this.__closure;if(gestureActive===previous)return;runOnJS(setWrapperGestureInProgress)(gestureActive);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelController.tsx');
exports.default = ActivityPanelController;
exports.BaseActivityPanelController = closure;
}
function BaseActivityPanelController({children, context, orientationLockStateForApp, mode, hasConnectedActivity, connectedActivityAppId, currentApp, updateActivityPanelMode}) { // fn#117418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1197, offset: 0x024b2459, size: 708 bytes, params: 2, frame: 33
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'x': -1, 'y': -1});
const value5 = (importDefault(15363) /* metro dependency 15363: usePIPAvoidanceSpecs */)(value2);
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(env0_16);
const env0_5 = value6;
const env0_6 = env0_5.useRef(mode);
const value7 = (importDefault(15366) /* metro dependency 15366: useActivityWebViewLockManager */)();
const isTabletActivitySurface = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getIsTabletActivitySurface();
const r20 = orientationLockStateForApp ?? (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getDefaultOrientationLockState(currentApp);
const value10 = env0_17(value3, value2.top, r20, isTabletActivitySurface);
const env0_11 = env0_5.useRef(connectedActivityAppId);
const value11 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelFullscreen();
(importDefault(15367) /* metro dependency 15367: useHandleOAuthNavigation */)();
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(_fun117419);
env0_5.useEffect(_fun117420, [connectedActivityAppId, r20, mode, value10.isWindowLandscape, isTabletActivitySurface,
updateActivityPanelMode]);
env0_5.useEffect(_fun117421, [mode, value6]);
BaseActivityPanelControllerUseActivityOrientationState({isConnected: hasConnectedActivity, selectedMode: mode,
isVoicePanelFullscreen: value11, applicationId: connectedActivityAppId,
orientationLockStateForApp: orientationLockStateForApp});
useSafeAreaLock({isActivityConnected: hasConnectedActivity,
isActivityFocused: hasConnectedActivity && mode === ActivityPanelModes.PANEL, isVoicePanelFullscreen: value11});
useAppFreeze(value6);
const value13 = env0_5.useMemo(_fun117434, [mode, value5, value4, updateActivityPanelMode, value7, value10, value6]);
const Provider = context.Provider;
return (
<Provider value={value13}>
{children}
</Provider>
);
}
function _fun117435({width, height}, a1, a2, a3) { // fn#117435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:371, offset: 0x024b2d4f, size: 312 bytes, params: 5, frame: 19
var r6;
var r0;
var object2;
var Math;
const value = width > height;
const LANDSCAPE = OrientationLockState.LANDSCAPE;
if (LANDSCAPE === a2) {
if (a3) {
if (value) {
object2 = {};
Math = global.Math;
object2.width = Math.max(width, height);
Math = global.Math;
object2.height = Math.min(height, width);
object2.isLandscape = true;
object2.isWindowLandscape = true;
r0 = object2;
} else {
r0 = {width: width, height: width * ACTIVITY_LANDSCAPE_ASPECT_RATIO - a1, isLandscape: true,
isWindowLandscape: value};
}
} else {
object2 = {};
Math = global.Math;
object2.width = Math.max(width, height);
Math = global.Math;
object2.height = Math.min(height, width);
object2.isLandscape = true;
object2.isWindowLandscape = true;
r0 = object2;
}
return r0;
}
const PORTRAIT = OrientationLockState.PORTRAIT;
if (PORTRAIT === a2) {
if (a3) {
if (value) {
r6 = {width: height * ACTIVITY_PORTRAIT_ASPECT_RATIO, height: height, isLandscape: false,
isWindowLandscape: value};
} else {
object2 = {};
Math = global.Math;
object2.width = Math.min(width, height);
Math = global.Math;
object2.height = Math.max(height, width) - a1;
object2.isLandscape = false;
object2.isWindowLandscape = false;
r6 = object2;
}
} else {
object2 = {};
Math = global.Math;
object2.width = Math.min(width, height);
Math = global.Math;
object2.height = Math.max(height, width) - a1;
object2.isLandscape = false;
object2.isWindowLandscape = false;
r6 = object2;
}
return r6;
}
OrientationLockState.UNLOCKED;
return {width: width, height: value ? height : height - a1, isLandscape: value, isWindowLandscape: value};
}
function ActivityPanelController({children}) { // fn#117436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3937, offset: 0x024b2e87, size: 249 bytes, params: 2, frame: 25
const {mode, connectedActivityInTextChannelId, hasConnectedActivity, connectedActivityAppId, currentApp,
orientationLockStateForApp} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
ApplicationStore], _fun117437, []);
env0_5.useEffect(_fun117438, [mode, connectedActivityInTextChannelId]);
return (
<BaseActivityPanelController
context={importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */}
orientationLockStateForApp={orientationLockStateForApp}
mode={mode}
hasConnectedActivity={hasConnectedActivity}
connectedActivityAppId={connectedActivityAppId}
currentApp={currentApp}
updateActivityPanelMode={(importAll(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).updateActivityPanelMode}
>
{children}
</BaseActivityPanelController>
);
}
function _fun117419() { // fn#117419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1735, offset: 0x024b271d, size: 52 bytes, params: 1, frame: 12
var r0;
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
const value3 = modeBinding === PANEL;
if (value3) {
updateActivityPanelMode(ActivityPanelModes.PIP);
r0 = true;
} else {
r0 = value3;
}
return r0;
}
function _fun117420() { // fn#117420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1781, offset: 0x024b2751, size: 284 bytes, params: 1, frame: 16
var modeBinding;
var value2;
var updateActivityPanelModeBinding;
var value5;
var value6;
if (connectedActivityAppId == null) {
if (connectedActivityAppId != null) {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
} else if (env0_11.current != null) {
updateActivityPanelModeBinding = updateActivityPanelMode;
value5 = environment.__proto__;
updateActivityPanelModeBinding(ActivityPanelModes.DISCONNECTED);
} else {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
}
} else if (env0_11.current == null) {
value6 = environment.__proto__;
if ((importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
} else if (env0_8) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
} else {
updateActivityPanelMode(ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE);
}
} else if (connectedActivityAppId != null) {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
} else if (env0_11.current != null) {
updateActivityPanelModeBinding = updateActivityPanelMode;
value5 = environment.__proto__;
updateActivityPanelModeBinding(ActivityPanelModes.DISCONNECTED);
} else {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
}
env0_11.current = connectedActivityAppId;
}
function _fun117421() { // fn#117421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2084, offset: 0x024b286d, size: 121 bytes, params: 1, frame: 13
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
if (modeBinding === PANEL && env0_6.current !== ActivityPanelModes.PANEL) {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
env0_5.set(env1_16);
}
env0_6.current = mode;
}
function BaseActivityPanelControllerUseActivityOrientationState({isConnected, selectedMode, isVoicePanelFullscreen, applicationId, orientationLockStateForApp}) { // fn#117422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2182, owner: BaseActivityPanelController.useActivityOrientationState, offset: 0x024b28e6, size: 154 bytes, params: 2, frame: 20
env1_5.useLayoutEffect(_fun117423, [applicationId, isConnected, selectedMode,
orientationLockStateForApp ?? OrientationLockState.UNLOCKED, isVoicePanelFullscreen]);
env1_5.useLayoutEffect(function() {
return _fun117425;
}, []);
}
function useSafeAreaLock({isActivityConnected, isActivityFocused, isVoicePanelFullscreen}) { // fn#117426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2670, owner: BaseActivityPanelController.useSafeAreaLock, offset: 0x024b2a2d, size: 103 bytes, params: 2, frame: 17
env1_5.useLayoutEffect(_fun117427, [env1_5.useId(), isActivityConnected, isActivityFocused, isVoicePanelFullscreen]);
}
function useAppFreeze(a0) { // fn#117429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3059, owner: BaseActivityPanelController.useAppFreeze, offset: 0x024b2b19, size: 292 bytes, params: 2, frame: 24
var object2;
const env0_0 = a0;
const value2 = (require(15361) /* metro dependency 15361: ActivityPanelUtils */).useIsActivityPanelFullscreen();
const [property, property2] = env1_4(env1_5.useState(false), 2);
const value5 = env1_5.useId();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useAppFreezeL;
closure.__closure = {wrapperOffset: a0};
closure.__workletHash = 5299695936442;
closure.__initData = env1_18;
const closure2 = useAppFreezeS;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setWrapperGestureInProgress = property2;
closure2.__closure = object2;
closure2.__workletHash = 5831467313798;
closure2.__initData = env1_19;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
env1_5.useEffect(_fun117432, [value2, property, value5]);
}
function _fun117434() { // fn#117434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3656, offset: 0x024b2d0a, size: 69 bytes, params: 1, frame: 3
return {mode: mode, setMode: updateActivityPanelMode, wrapperDimensions: env0_10, pipState: env0_3,
pipAvoidanceSpecs: env0_4, wrapperOffset: env0_5, useActivityWebViewLock: env0_7};
}
function _fun117437() { // fn#117437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:4031, offset: 0x024b2f80, size: 214 bytes, params: 1, frame: 20
const value = environment.__proto__;
const activityPanelMode = EmbeddedActivitiesStore.getActivityPanelMode();
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
const value5 = undefined;
const applicationId = selfEmbeddedActivityForLocation == null ? value5 : selfEmbeddedActivityForLocation.applicationId;
const r5 = applicationId != null ? ApplicationStore.getApplication(applicationId) : value5;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
const object2 = {mode: activityPanelMode};
object2.connectedActivityInTextChannelId = embeddedActivityLocationChannelId == null || (importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId) ? value5 : embeddedActivityLocationChannelId;
object2.hasConnectedActivity = selfEmbeddedActivityForLocation != null;
object2.connectedActivityAppId = applicationId;
object2.currentApp = r5;
object2.orientationLockStateForApp = applicationId == null ? value5 : EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationId);
return object2;
}
function _fun117438() { // fn#117438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:4657, offset: 0x024b3056, size: 135 bytes, params: 1, frame: 16
var defaultImport;
var selectChannel;
var id;
var moduleValue;
var transitionToChannel;
var value;
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
if (modeBinding === PANEL) {
value = ChannelStore.getChannel(connectedActivityInTextChannelId);
if (value !== undefined) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
selectChannel = defaultImport.selectChannel;
id = value.id;
Reflect.apply(selectChannel, defaultImport, [{guildId: value.guild_id, channelId: id}]);
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
transitionToChannel = moduleValue.transitionToChannel;
id = value.id;
Reflect.apply(transitionToChannel, moduleValue, [id]);
}
}
}
function _fun117423() { // fn#117423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2367, offset: 0x024b2980, size: 125 bytes, params: 1, frame: 13
var selectedModeBinding;
var value2;
if (!isVoicePanelFullscreen) {
selectedModeBinding = selectedMode;
value2 = environment.__proto__.__proto__;
if (selectedModeBinding === ActivityPanelModes.PANEL) {
if (isConnected) {
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(env0_3);
} else {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
} else if (selectedMode !== ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
} else if (isConnected) {
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(env0_3);
} else {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
}
}
function _fun117424() { // fn#117424, offset: 0x024b29fd, size: 11 bytes, params: 1, frame: 1
return _fun117425;
}
function _fun117427() { // fn#117427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2800, offset: 0x024b2a94, size: 81 bytes, params: 1, frame: 15
var environment;
var r1;
var value3;
const isVoicePanelFullscreenBinding = isVoicePanelFullscreen;
const value2 = undefined;
if (isVoicePanelFullscreenBinding) {
return value2;
}
if (isActivityConnected) {
value3 = environment.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env0_3, lockEnabled: isActivityFocused});
r1 = _fun117428;
} else {
r1 = value2;
}
return r1;
}
function useAppFreezeL() { // fn#117430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3219, owner: BaseActivityPanelController.useAppFreeze.l, offset: 0x024b2c3d, size: 24 bytes, params: 1, frame: 9
const binding = env0_0;
const get = binding.get;
return Reflect.apply(get, binding, []).gestureActive;
}
function useAppFreezeS(a0, a1) { // fn#117431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3326, owner: BaseActivityPanelController.useAppFreeze.s, offset: 0x024b2c55, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_3)(a0);
}
}
function _fun117432() { // fn#117432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3501, offset: 0x024b2c92, size: 68 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
value = AppFreezeStore.getState();
value.requestFreezeLock({lockEnabled: env0_1 && env0_2, key: env0_4});
return _fun117433;
}
function _fun117425() { // fn#117425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2521, offset: 0x024b2a08, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
function _fun117428() { // fn#117428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2884, offset: 0x024b2ae5, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_3, lockEnabled: false});
}
function _fun117433() { // fn#117433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3563, offset: 0x024b2cd6, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
AppFreezeStore.getState().requestFreezeLock({lockEnabled: false, key: env1_4});
}
@@ -0,0 +1,337 @@
/* Metro module 15376; source: modules/activities/panel/native/ActivityPanelFocusedView.tsx; dependencies: [31, 27, 4502, 1379, 1378, 4237, 8044, 15371, 661, 11795, 33, 4501, 697, 1585, 566, 1478, 15366, 15319, 4017, 4508, 4504, 4577, 3868, 4556, 3774, 15368, 15377, 7860, 10704, 2] */
function _fun117537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6, offset: 0x024b6bf1, size: 614 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const closure = useBaseActivityPanelFocusedView;
const closure2 = BaseActivityPanelFocusedView;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_7 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
const activityPanelConstantsModule = require(8044) /* metro dependency 8044: ActivityPanelConstants */;
const env0_8 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_GESTURE;
const env0_9 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
const env0_10 = activityPanelConstantsModule.ActivityPanelModes;
const activityPanelNativeConstantsModule = require(15371) /* metro dependency 15371: ActivityPanelNativeConstants */;
const env0_11 = activityPanelNativeConstantsModule.DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG;
const env0_12 = activityPanelNativeConstantsModule.DEFAULT_PORTRAIT_LETTERBOX_CONFIG;
const env0_13 = activityPanelNativeConstantsModule.DEFAULT_LANDSCAPE_PILLERBOX_CONFIG;
const env0_14 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_15 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).IS_IOS;
const value4 = require(33) /* metro dependency 33 */;
const env0_16 = value4.jsx;
const env0_17 = value4.jsxs;
object2 = {duration: 300};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrapper = {'position': 'absolute', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden', backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object4['backgroundColor'] = BLACK;
object2.shade = object4;
const env0_19 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function ActivityPanelFocusedViewTsx1(){const{wrapperDimensions,lg,IS_IOS,animatedKeyboardHeight,windowDimensions,safeArea,shown,wrapperOffset,transitionState,TransitionStates,runOnJS,transitionCleanUp,reduceMotion,withTiming,REDUCED_MOTION_TIMING,withSpring,ACTIVITY_LAYOUT_PHYSICS_GESTURE,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const topBorderRadius=!wrapperDimensions.isWindowLandscape?lg:0;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;const width=windowDimensions.width;const height=windowDimensions.height-keyboardHeight-(!wrapperDimensions.isWindowLandscape?safeArea.top:0);const y=shown.get()?wrapperOffset.get().y:windowDimensions.height;const transitionComplete=function(finished=false){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}};const targetOpacity=reduceMotion&&shown.get()?1-wrapperOffset.get().y/windowDimensions.height:0;return{opacity:reduceMotion?withTiming(targetOpacity,REDUCED_MOTION_TIMING,shown.get()&&wrapperOffset.get().gestureActive?'animate-never':'animate-always',transitionComplete):1,transform:[{translateY:!reduceMotion?withSpring(y,wrapperOffset.get().gestureActive&&transitionState!==TransitionStates.YEETED?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always',transitionComplete):0}],top:!wrapperDimensions.isWindowLandscape?safeArea.top:0,width:width,height:height,borderTopStartRadius:topBorderRadius,borderTopEndRadius:topBorderRadius};}"};
object2 = {code: 'function ActivityPanelFocusedViewTsx2(finished=false){const{transitionState,TransitionStates,runOnJS,transitionCleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}}'};
object2 = {code: 'function ActivityPanelFocusedViewTsx3(){const{wrapperOffset,shown,windowDimensions,withSpring,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const opacity=function(){if(!wrapperOffset.get().gestureActive){return shown.get()?1:0;}return 1-wrapperOffset.get().y/windowDimensions.height;}();return{opacity:withSpring(opacity,ACTIVITY_LAYOUT_PHYSICS_DEFAULT)};}'};
object2 = {code: 'function ActivityPanelFocusedViewTsx4(){const{IS_IOS,animatedKeyboardHeight,wrapperDimensions}=this.__closure;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;return{width:wrapperDimensions.width,height:wrapperDimensions.height-keyboardHeight};}'};
value = value.memo(_fun117549);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelFocusedView.tsx');
exports.default = value;
exports.useBaseActivityPanelFocusedView = closure;
exports.BaseActivityPanelFocusedView = closure2;
}
function useBaseActivityPanelFocusedView({context}) { // fn#117538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:761, offset: 0x024b6e57, size: 174 bytes, params: 2, frame: 16
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_3;
const useContext = binding.useContext;
const wrapperDimensions = Reflect.apply(useContext, binding, [context]).wrapperDimensions;
let r4 = wrapperDimensions.isLandscape && !wrapperDimensions.isWindowLandscape;
const r5 = !wrapperDimensions.isLandscape && wrapperDimensions.isWindowLandscape;
r4 = r4 ? DEFAULT_PORTRAIT_LETTERBOX_CONFIG : DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG;
binding = env0_3;
const useMemo = binding.useMemo;
return {portraitSafeAreasConfig: r4, landscapeSafeAreasConfig: Reflect.apply(useMemo, binding, [_fun117539,
[value2.right, r5]])};
}
function BaseActivityPanelFocusedView({children, header, transitionState, transitionCleanUp, updateActivityPanelModeToPIP, hasActivity, context}) { // fn#117540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:3446, offset: 0x024b6f4d, size: 1028 bytes, params: 2, frame: 37
var object2;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const env0_3 = useReducedMotion;
const styles = useStyles();
const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const {wrapperDimensions, wrapperOffset} = env0_3.useContext(context);
const {shown,
renderWebView} = (require(15366) /* metro dependency 15366: useActivityWebViewLockManager */).useLockedWebView({transitionState: transitionState,
context: context});
const value6 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = BaseActivityPanelFocusedView_;
object2 = {wrapperDimensions: wrapperDimensions, lg: lg};
object2.IS_IOS = IS_IOS;
object2.animatedKeyboardHeight = value6;
object2.windowDimensions = value2;
object2.safeArea = value3;
object2.shown = shown;
object2.wrapperOffset = wrapperOffset;
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.transitionCleanUp = transitionCleanUp;
object2.reduceMotion = useReducedMotion;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.REDUCED_MOTION_TIMING = env0_18;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.ACTIVITY_LAYOUT_PHYSICS_GESTURE = ACTIVITY_LAYOUT_PHYSICS_GESTURE;
object2.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object2;
closure.__workletHash = 14941136536014;
closure.__initData = env0_20;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = BaseActivityPanelFocusedViewT;
object2 = {wrapperOffset: wrapperOffset, shown: shown, windowDimensions: value2};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object2;
closure.__workletHash = 8351375063373;
closure.__initData = env0_22;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const value9 = env0_3.useMemo(_fun117546, [value7, styles.wrapper]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = BaseActivityPanelFocusedViewA;
closure.__closure = {IS_IOS: IS_IOS, animatedKeyboardHeight: value6, wrapperDimensions: wrapperDimensions};
closure.__workletHash = 10029372697959;
closure.__initData = env0_23;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const value11 = env0_3.useCallback(function() {
updateActivityPanelModeToPIP();
}, [updateActivityPanelModeToPIP]);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View style={[styles.shade, value8]} pointerEvents="none" />;
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
let value = null;
value = <View style={value10}>{renderWebView && hasActivity ? children : value}</View>;
return (
<ThemeContextProvider theme={DARK}>
{view}
<AccessibilityViewAnimated
style={value9}
nativeID="activity-panel-focused-view"
accessibilityViewIsModal
onAccessibilityEscape={value11}
>
{value}
{header}
</AccessibilityViewAnimated>
</ThemeContextProvider>
);
}
function _fun117549({transitionState, transitionCleanUp}) { // fn#117549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6239, offset: 0x024b7730, size: 284 bytes, params: 2, frame: 23
var object2;
const {channel,
hasActivity} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
ChannelStore], function() {
var value2 = EmbeddedActivitiesStore.getConnectedActivityLocation();
var value3 = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(value2);
var value4 = require(dependencyMap[24]).getEmbeddedActivityLocationChannelId(value2);
var object = {};
object.channel = ChannelStore.getChannel(value4);
object.hasActivity = value3 != null;
return object;
}, []);
const env0_3 = hasActivity;
object2 = {};
object2.context = importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */;
const {portraitSafeAreasConfig, landscapeSafeAreasConfig} = useBaseActivityPanelFocusedView(object2);
return env0_3.useMemo(_fun117553, [transitionState, transitionCleanUp, env0_3.useCallback(function() {
require(dependencyMap[27]).updateActivityPanelMode(ActivityPanelModes.PIP);
}, []), hasActivity, env0_3.useMemo(_fun117551, []), channel, portraitSafeAreasConfig, landscapeSafeAreasConfig]);
}
function _fun117539() { // fn#117539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:1017, offset: 0x024b6f05, size: 72 bytes, params: 1, frame: 15
return env0_1 ? DEFAULT_LANDSCAPE_PILLERBOX_CONFIG : {right: {disable: false, override: global.Math.max(64,
env0_0.right)}};
}
function BaseActivityPanelFocusedView_() { // fn#117542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:3912, owner: BaseActivityPanelFocusedView._, offset: 0x024b7351, size: 533 bytes, params: 1, frame: 30
var r13;
var r14;
var r7;
var r6;
var wrapperOffsetBinding;
var moduleValue;
var withTiming;
var value10;
var value11;
var moduleValue2;
var withSpring;
const isWindowLandscape = wrapperDimensions.isWindowLandscape;
const value2 = 0;
const lg2 = isWindowLandscape ? value2 : lg;
const r2 = IS_IOS ? env0_10.get() : value2;
let binding = env0_5;
const width = binding.width;
const value6 = binding.height - r2 - (wrapperDimensions.isWindowLandscape ? value2 : env0_6.top);
let shownBinding = shown;
const get = shownBinding.get;
if (Reflect.apply(get, shownBinding, [])) {
wrapperOffsetBinding = wrapperOffset;
r13 = wrapperOffsetBinding.get().y;
} else {
r13 = env0_5.height;
}
const value7 = _fun117543();
if (useReducedMotion) {
shownBinding = shown;
if (shownBinding.get()) {
wrapperOffsetBinding = wrapperOffset;
r14 = 1 - wrapperOffsetBinding.get().y / env0_5.height;
} else {
r14 = value2;
}
} else {
r14 = value2;
}
const object2 = {};
if (useReducedMotion) {
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
binding = env1_18;
value10 = shown.get();
value11 = 'animate-always';
if (value10) {
wrapperOffsetBinding = wrapperOffset;
r7 = wrapperOffsetBinding.get().gestureActive ? 'animate-never' : value11;
} else {
r7 = value11;
}
r6 = Reflect.apply(withTiming, moduleValue, [r14, binding, r7, value7]);
} else {
r6 = 1;
}
object2.opacity = r6;
if (useReducedMotion) {
r6 = value2;
} else {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
wrapperOffsetBinding = wrapperOffset;
r6 = Reflect.apply(withSpring, moduleValue2, [r13,
wrapperOffsetBinding.get().gestureActive && transitionState !== (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT,
'animate-always', value7]);
}
object2.transform = [{translateY: r6}];
object2.top = wrapperDimensions.isWindowLandscape ? value2 : env0_6.top;
object2.width = width;
object2.height = value6;
object2.borderTopStartRadius = lg2;
object2.borderTopEndRadius = lg2;
return object2;
}
function BaseActivityPanelFocusedViewT() { // fn#117545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5319, owner: BaseActivityPanelFocusedView.T, offset: 0x024b764e, size: 134 bytes, params: 1, frame: 15
const get = wrapperOffset.get;
const r4 = Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? 1 - wrapperOffset.get().y / env0_5.height : shown.get() ? 1 : 0;
const object2 = {};
const value = environment.__proto__;
object2.opacity = (require(4577) /* metro dependency 4577: spring */).withSpring(r4,
ACTIVITY_LAYOUT_PHYSICS_DEFAULT);
return object2;
}
function _fun117546() { // fn#117546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5616, offset: 0x024b76d4, size: 31 bytes, params: 1, frame: 3
return [styles.wrapper, env0_12];
}
function BaseActivityPanelFocusedViewA() { // fn#117547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5682, owner: BaseActivityPanelFocusedView.A, offset: 0x024b76f3, size: 61 bytes, params: 1, frame: 11
const value = environment.__proto__;
const r2 = IS_IOS ? env0_10.get() : 0;
const wrapperDimensionsBinding = wrapperDimensions;
return {width: wrapperDimensionsBinding.width, height: wrapperDimensionsBinding.height - r2};
}
function _fun117551() { // fn#117551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6683, offset: 0x024b78aa, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15377) /* metro dependency 15377: ActivityPanelHeader */);
}
function _fun117553() { // fn#117553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6793, offset: 0x024b7901, size: 163 bytes, params: 1, frame: 19
const baseActivityPanelFocusedViewProps = {transitionState: transitionState, transitionCleanUp: transitionCleanUp,
updateActivityPanelModeToPIP: env0_7, hasActivity: hasActivity,
context: importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */, header: env0_6};
const EmbeddedActivityView = importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */;
const channelBinding = channel;
const FOCUSED = ActivityLayoutMode.FOCUSED;
return (
<BaseActivityPanelFocusedView {...baseActivityPanelFocusedViewProps}>
<EmbeddedActivityView
channel={channelBinding}
layoutMode={FOCUSED}
portraitSafeAreasConfig={portraitSafeAreasConfig}
landscapeSafeAreasConfig={landscapeSafeAreasConfig}
/>
</BaseActivityPanelFocusedView>
);
}
function _fun117543() { // fn#117543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:4051, offset: 0x024b7566, size: 123 bytes, params: 1, frame: 16
const closure = ActivityPanelFocusedViewTsx2;
const object2 = {};
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.transitionCleanUp = transitionCleanUp;
closure.__closure = object2;
closure.__workletHash = 2890456430056;
closure.__initData = env2_21;
return closure;
}
function ActivityPanelFocusedViewTsx2() { // fn#117544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:4097, offset: 0x024b75e1, size: 109 bytes, params: 1, frame: 14
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
let r1 = value !== undefined ? value : false;
if (r1) {
value = environment.__proto__.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [transitionCleanUp])();
}
}
@@ -0,0 +1,212 @@
/* Metro module 15377; source: modules/activities/panel/native/ActivityPanelHeader.tsx; dependencies: [57, 31, 27, 1378, 8044, 482, 33, 4501, 697, 1585, 4017, 15374, 3868, 5321, 15378, 566, 6777, 15379, 15383, 15384, 15389, 15368, 2] */
function _fun117554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:6, offset: 0x024b79a4, size: 670 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const closure = useBaseActivityPanelHeaderContent;
const closure2 = BaseActivityPanelContent;
const closure3 = useBaseActivityPanelHeader;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const StyleSheet = value2.StyleSheet;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const activityPanelConstantsModule = require(8044) /* metro dependency 8044: ActivityPanelConstants */;
const env0_8 = activityPanelConstantsModule.ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
const env0_9 = activityPanelConstantsModule.LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
const env0_10 = activityPanelConstantsModule.ActivityPanelModes;
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_12 = value4.jsx;
const env0_13 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['justifyContent'] = 'space-between';
object5['alignItems'] = 'center';
object5['flexDirection'] = 'row';
object5['gap'] = 8;
object3.panelHeader = object5;
object3.panelLandscape = {flexDirection: 'column-reverse'};
object3.headerContainer = {'position': 'absolute', 'top': 0};
const object6 = {'backgroundColor': null, 'borderRadius': null, 'width': 32, 'height': 4, 'alignSelf': 'center',
'marginTop': 4, 'opacity': 0.3};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object6.backgroundColor = WHITE;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.pullIndicator = object6;
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function ActivityPanelHeaderTsx1(){const{runOnJS,setMode,ActivityPanelModes}=this.__closure;runOnJS(setMode)(ActivityPanelModes.PIP);}'};
const value6 = createStylesModule;
createStyles = value6.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const styles = Reflect.apply(createStyles, value6, [{buttonContainer: {'flexDirection': 'row',
'alignItems': 'center', 'gap': null, 'flexShrink': 1, gap: PX_8},
buttonContainerLandscape: {flexDirection: 'column-reverse'}}]);
const env0_17 = value.memo(ActivityPanelHeaderContentInner);
value = value.memo(_fun117564);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelHeader.tsx');
exports.default = value;
exports.useBaseActivityPanelHeaderContent = closure;
exports.BaseActivityPanelContent = closure2;
exports.useMinimizeAndQuestButtonContainerStyles = styles;
exports.useBaseActivityPanelHeader = closure3;
}
function useBaseActivityPanelHeaderContent({landscape, setMode, wrapperOffset, pipState}) { // fn#117555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:844, offset: 0x024b7c42, size: 369 bytes, params: 2, frame: 25
var object2;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_4;
const value3 = binding.useMemo(_fun117556, [landscape]);
const value4 = env0_4.useMemo(_fun117557, [landscape, value2, styles.panelHeader, styles.panelLandscape]);
binding = env0_4;
const useCallback = binding.useCallback;
const closure = function() {
require(dependencyMap[10]).runOnJS(setMode)(ActivityPanelModes.PIP);
};
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setMode = setMode;
object2.ActivityPanelModes = ActivityPanelModes;
closure.__closure = object2;
closure.__workletHash = 14504167937928;
closure.__initData = env0_15;
const value = Reflect.apply(useCallback, binding, [closure, [setMode]]);
object2 = {};
const defaultImport = importDefault(15374) /* metro dependency 15374: useMorphablePanelGesture */;
const MorphablePanelModes = (require(15374) /* metro dependency 15374: useMorphablePanelGesture */).MorphablePanelModes;
const PANEL = MorphablePanelModes.PANEL;
object2.gesture = defaultImport({mode: PANEL, panGestureEnabled: true, pipState: pipState, swipeRequiresPop: true,
wrapperOffset: wrapperOffset, onPanMinimizeGestureEnd: value, disableHorizontalSafeAreas: true});
object2.headerWrapperStyles = value3;
object2.headerStyles = value4;
object2.styles = styles;
return object2;
}
function BaseActivityPanelContent({children, hasConnectedActivity, gesture, headerWrapperStyles, headerStyles, landscape}) { // fn#117559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:1712, offset: 0x024b7ed8, size: 280 bytes, params: 2, frame: 29
var r0;
var ThemeContextProvider;
var GestureDetector;
var object;
var object4;
var items2;
const styles = useStyles();
if (hasConnectedActivity) {
ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
var themeContextProviderProps = {theme: ThemeTypes.DARK};
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
object = {gesture: gesture};
object4 = {style: headerWrapperStyles};
items2 = [((Component) => <Component />)(importDefault(15378) /* metro dependency 15378: BlurVisualEffectView */)];
items2[1] = !landscape && <View style={styles.pullIndicator} />;
items2[2] = <View style={headerStyles}>{children}</View>;
r0 = <ThemeContextProvider {...themeContextProviderProps}><GestureDetector {...object}><View {...object4}>{items2}</View></GestureDetector></ThemeContextProvider>;
} else {
r0 = null;
}
return r0;
}
function useBaseActivityPanelHeader({context}) { // fn#117560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:3138, offset: 0x024b7ff0, size: 145 bytes, params: 2, frame: 19
const styles = useStyles();
let binding = env0_4;
const {wrapperDimensions, setMode, wrapperOffset, pipState} = binding.useContext(context);
binding = env0_4;
const useMemo = binding.useMemo;
return {headerStyles: Reflect.apply(useMemo, binding, [function() {
var r2;
var r3;
var r4;
var r5;
var value3;
var value4;
var value6;
var value7;
if (wrapperDimensions.isWindowLandscape) {
value6 = 'auto';
value7 = null;
r2 = 0;
r3 = value7;
r4 = value6;
r5 = LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
} else {
value3 = 'auto';
value4 = 0;
r2 = null;
r3 = value4;
r4 = ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
r5 = value3;
}
return [styles.headerContainer, {width: r5, height: r4, right: 0, left: r3, bottom: r2}];
}, [styles.headerContainer, wrapperDimensions.isWindowLandscape]]), wrapperDimensions: wrapperDimensions,
setMode: setMode, wrapperOffset: wrapperOffset, pipState: pipState};
}
function ActivityPanelHeaderContentInner({landscape, setMode, pipState, wrapperOffset}) { // fn#117562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:2268, offset: 0x024b80de, size: 566 bytes, params: 2, frame: 30
const {gesture, headerWrapperStyles, headerStyles} = useBaseActivityPanelHeaderContent({landscape: landscape,
setMode: setMode, wrapperOffset: wrapperOffset, pipState: pipState});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(EmbeddedActivitiesStore.getConnectedActivityLocation());
}, []);
const applicationId = value4?.applicationId;
const property = env0_3((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([applicationId]),
1)[0];
const styles = useStyles();
const value8 = ((Component) => <Component applicationId={property?.id} />)(importDefault(15379) /* metro dependency 15379: InviteActivityButton */);
const items3 = [styles.buttonContainer];
items3[1] = landscape ? styles.buttonContainerLandscape : undefined;
const items2 = [((Component) => <Component activityName={landscape || property == null ? undefined : property.name} setMode={setMode} />)(importDefault(15383) /* metro dependency 15383: MinimizeActivityButton */)];
items2[1] = applicationId != null && ((Component) => <Component applicationId={applicationId} />)(importDefault(15384) /* metro dependency 15384: QuestActivityButton */);
items2[2] = landscape ? value8 : null;
return (
<BaseActivityPanelContent
hasConnectedActivity={value4 != null}
gesture={gesture}
headerWrapperStyles={headerWrapperStyles}
headerStyles={headerStyles}
landscape={landscape}
>
<View style={items3}>
{items2}
</View>
{landscape ? null : value8}
{((Component) => <Component selfEmbeddedActivity={value4 ?? undefined} setMode={setMode} />)(importDefault(15389) /* metro dependency 15389: LeaveActivityButton */)}
</BaseActivityPanelContent>
);
}
function _fun117564() { // fn#117564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:3592, offset: 0x024b8332, size: 138 bytes, params: 1, frame: 20
const object2 = {};
object2.context = importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */;
const {headerStyles, wrapperDimensions, setMode, wrapperOffset, pipState} = useBaseActivityPanelHeader(object2);
return (
<View style={headerStyles}>
{((Component) => <Component landscape={wrapperDimensions.isWindowLandscape} setMode={setMode} wrapperOffset={wrapperOffset} pipState={pipState} />)(env0_17)}
</View>
);
}
function _fun117556() { // fn#117556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:976, offset: 0x024b7db3, size: 87 bytes, params: 1, frame: 12
const lg = landscape ? 0 : (importDefault(697) /* metro dependency 697: native */).radii.lg;
const value = environment.__proto__;
return [StyleSheet.absoluteFill, {borderTopStartRadius: lg, borderTopEndRadius: lg}];
}
function _fun117557() { // fn#117557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:1097, offset: 0x024b7e0a, size: 147 bytes, params: 1, frame: 7
let landscapeBinding = landscape;
const value2 = 8;
const r2 = landscapeBinding ? 24 : value2;
landscapeBinding = landscape;
const value6 = 16;
return [styles.panelHeader, landscape ? styles.panelLandscape : undefined, {paddingTop: r2,
paddingBottom: landscape ? 24 : value2, paddingLeft: landscapeBinding ? value6 : value2 + env0_3.left,
paddingRight: landscape ? value6 : value2 + env0_3.right}];
}
@@ -0,0 +1,14 @@
/* Metro module 15371; source: modules/activities/panel/native/ActivityPanelNativeConstants.tsx; dependencies: [8044, 2] */
function _fun117509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15568:6, offset: 0x024b53ad, size: 176 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
object2.top = {disable: false, override: ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelNativeConstants.tsx');
exports.DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG = object2;
exports.DEFAULT_PORTRAIT_LETTERBOX_CONFIG = {top: {disable: true}, bottom: {disable: true}};
exports.DEFAULT_LANDSCAPE_PILLERBOX_CONFIG = {left: {disable: true}, right: {disable: true}};
}
@@ -0,0 +1,323 @@
/* Metro module 15370; source: modules/activities/panel/native/ActivityPanelPIPView.tsx; dependencies: [31, 27, 4502, 10724, 1379, 1378, 4237, 8044, 15371, 661, 11796, 33, 1305, 4501, 697, 1585, 566, 1478, 15366, 11282, 4017, 15372, 4508, 4504, 4577, 15373, 15374, 1244, 3868, 5321, 3774, 15368, 10704, 2] */
function _fun117490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6, offset: 0x024b451b, size: 682 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const closure = useBaseActivityPanelPIPView;
const closure2 = BaseActivityPanelPIPView;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_9 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
const activityPanelConstantsModule = require(8044) /* metro dependency 8044: ActivityPanelConstants */;
const ACTIVITY_PIP_SIZE = activityPanelConstantsModule.ACTIVITY_PIP_SIZE;
const env0_11 = activityPanelConstantsModule.ActivityPanelModes;
const env0_12 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_GESTURE;
const env0_13 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
const env0_14 = activityPanelConstantsModule.LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
const env0_15 = (require(15371) /* metro dependency 15371: ActivityPanelNativeConstants */).DEFAULT_PORTRAIT_LETTERBOX_CONFIG;
const env0_16 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_17 = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).PIP_WINDOW_OFFSET;
const env0_18 = (require(33) /* metro dependency 33 */).jsx;
object4 = {duration: 300};
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS = nativeModule.EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS;
const value4 = Reflect.apply(generateBoxShadowStyle, nativeModule, [EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
copyDataProperties(object5, ACTIVITY_PIP_SIZE, undefined);
copyDataProperties(object5, value4, undefined);
object4.wrapper = object5;
const object6 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object6, ACTIVITY_PIP_SIZE, undefined);
object4.mask = object6;
const env0_20 = Reflect.apply(createStyles, createStylesModule, [object4]);
object4 = {code: "function ActivityPanelPIPViewTsx1(){const{pipState,getClampedPIPPosition,ACTIVITY_PIP_SIZE,windowDimensions,safeArea,pipAvoidanceSpecs,wrapperOffset,disableHorizontalSafeAreas,shown,reduceMotion,PIP_WINDOW_OFFSET,transitionState,TransitionStates,runOnJS,transitionCleanUp,withTiming,REDUCED_MOTION_TIMING,withSpring,ACTIVITY_LAYOUT_PHYSICS_GESTURE,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const{x:pipX,y:pipY}=pipState.get();let{x:x,y:y}=getClampedPIPPosition({pipX:pipX,pipY:pipY,width:ACTIVITY_PIP_SIZE.width,height:ACTIVITY_PIP_SIZE.height,windowDimensions:windowDimensions,safeArea:safeArea,bottomAvoidanceRegion:pipAvoidanceSpecs.get().bottom,topAvoidanceRegion:pipAvoidanceSpecs.get().top,positionOffset:wrapperOffset.get().gestureActive?wrapperOffset.get():undefined,disableHorizontalSafeAreas:disableHorizontalSafeAreas});if(!shown.get()&&!reduceMotion){if(pipX<0.5&&pipX>=0){x=-(ACTIVITY_PIP_SIZE.width+Math.max(safeArea.right,PIP_WINDOW_OFFSET));}else{x=windowDimensions.width+Math.max(safeArea.right,PIP_WINDOW_OFFSET);}}const transitionComplete=function(finished=false){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}};return{opacity:reduceMotion?withTiming(shown.get()?1:0,REDUCED_MOTION_TIMING,'animate-always',transitionComplete):1,transform:[{translateY:withSpring(y,wrapperOffset.get().gestureActive?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always')},{translateX:withSpring(x,wrapperOffset.get().gestureActive?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always',!reduceMotion?transitionComplete:undefined)}]};}"};
object4 = {code: 'function ActivityPanelPIPViewTsx2(finished=false){const{transitionState,TransitionStates,runOnJS,transitionCleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}}'};
object4 = {code: 'function ActivityPanelPIPViewTsx3(){const{runOnJS,setMode,ActivityPanelModes}=this.__closure;runOnJS(setMode)(ActivityPanelModes.PANEL);}'};
value = value.memo(_fun117504);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelPIPView.tsx');
exports.default = value;
exports.useBaseActivityPanelPIPView = closure;
exports.BaseActivityPanelPIPView = closure2;
}
function useBaseActivityPanelPIPView() { // fn#117491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:823, offset: 0x024b47c5, size: 79 bytes, params: 1, frame: 15
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const binding = env0_3;
const useMemo = binding.useMemo;
return {landscapeSafeAreasConfig: Reflect.apply(useMemo, binding, [_fun117492, [value2.right]])};
}
function BaseActivityPanelPIPView({children, transitionState, transitionCleanUp, pipOrientationLockState, hasActivity, context}) { // fn#117493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3061, offset: 0x024b486b, size: 1120 bytes, params: 2, frame: 38
var object2;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const env0_3 = value2;
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_3;
const {wrapperOffset, setMode, pipState, pipAvoidanceSpecs, wrapperDimensions} = binding.useContext(context);
const {shown,
renderWebView} = (require(15366) /* metro dependency 15366: useActivityWebViewLockManager */).useLockedWebView({transitionState: transitionState,
context: context});
env0_3.useEffect(_fun117495, [wrapperOffset]);
const value6 = SafeAreaDisabledStore(function(a0) {
return a0.shouldDisableSafeAreas();
});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = BaseActivityPanelPIPViewJ;
object2 = {pipState: pipState};
const getClampedPIPPosition = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).getClampedPIPPosition;
object2.getClampedPIPPosition = getClampedPIPPosition;
object2.ACTIVITY_PIP_SIZE = ACTIVITY_PIP_SIZE;
object2.windowDimensions = value2;
object2.safeArea = value3;
object2.pipAvoidanceSpecs = pipAvoidanceSpecs;
object2.wrapperOffset = wrapperOffset;
object2.disableHorizontalSafeAreas = value6;
object2.shown = shown;
object2.reduceMotion = useReducedMotion;
object2.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.transitionCleanUp = transitionCleanUp;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.REDUCED_MOTION_TIMING = env0_19;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.ACTIVITY_LAYOUT_PHYSICS_GESTURE = ACTIVITY_LAYOUT_PHYSICS_GESTURE;
object2.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object2;
closure.__workletHash = 8039199265160;
closure.__initData = env0_21;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value8 = (importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */)({pipWidth: ACTIVITY_PIP_SIZE.width,
pipHeight: ACTIVITY_PIP_SIZE.height, pipOrientationLockState: pipOrientationLockState,
isLandscape: wrapperDimensions.isLandscape});
const value9 = env0_3.useMemo(function() {
return {width: width, height: height, pointerEvents: 'none'};
}, [value8.width, value8.height]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = function() {
require(dependencyMap[20]).runOnJS(setMode)(ActivityPanelModes.PANEL);
};
closure.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setMode: setMode,
ActivityPanelModes: ActivityPanelModes};
closure.__workletHash = 2951177166574;
closure.__initData = env0_23;
const value10 = Reflect.apply(useCallback, binding, [closure, [setMode]]);
const defaultImport2 = importDefault(15374) /* metro dependency 15374: useMorphablePanelGesture */;
object2 = {panGestureEnabled: true, onTapGestureStart: value10};
const MorphablePanelModes = (require(15374) /* metro dependency 15374: useMorphablePanelGesture */).MorphablePanelModes;
const PIP = MorphablePanelModes.PIP;
object2.mode = PIP;
object2.pipState = pipState;
object2.wrapperOffset = wrapperOffset;
object2.disableHorizontalSafeAreas = false;
const value11 = defaultImport2(object2);
const value12 = env0_3.useMemo(function() {
var object = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
object.accessibilityLabel = require(dependencyMap[27]).intl.string(require(dependencyMap[27]).t['3ejJer']);
object.accessibilityActions = [{name: 'activate'}];
object.onAccessibilityAction = _fun117503;
return object;
}, [setMode]);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view2Props = {style: [styles.wrapper, value7], ...value12};
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<ThemeContextProvider theme={DARK}>
<View2 {...view2Props}>
<GestureDetector gesture={value11}>
<View style={styles.mask}>
{!(renderWebView ? !hasActivity : !renderWebView) && <View style={value9}>{children}</View>}
</View>
</GestureDetector>
</View2>
</ThemeContextProvider>
);
}
function _fun117504({transitionState, transitionCleanUp}) { // fn#117504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6187, offset: 0x024b516c, size: 300 bytes, params: 2, frame: 22
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
_fun117505);
const env0_2 = value3.channelId;
const activity = value3.activity;
const env0_3 = activity;
const env0_4 = activity?.applicationId;
return env0_3.useMemo(_fun117508, [activity,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}), useBaseActivityPanelPIPView().landscapeSafeAreasConfig,
(require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], _fun117506),
transitionCleanUp, transitionState]);
}
function _fun117492() { // fn#117492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:922, offset: 0x024b4814, size: 87 bytes, params: 1, frame: 18
const Math = global.Math;
const max = Math.max;
const value = environment.__proto__;
return {right: {disable: false, override: Reflect.apply(max, Math, [LANDSCAPE_IFRAME_HORIZONTAL_MARGIN,
env0_0?.right ?? 0])}};
}
function _fun117495() { // fn#117495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3498, offset: 0x024b4ccb, size: 49 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
{gestureActive: false});
}
function BaseActivityPanelPIPViewJ() { // fn#117497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3618, owner: BaseActivityPanelPIPView.J, offset: 0x024b4d0b, size: 650 bytes, params: 1, frame: 24
var r1;
var moduleValue2;
const pipStateBinding = pipState;
let get = pipStateBinding.get;
let {x, y} = Reflect.apply(get, pipStateBinding, []);
const value4 = undefined;
const morphablePanelUtilsModule = require(15372) /* metro dependency 15372: MorphablePanelUtils */;
const getClampedPIPPosition = morphablePanelUtilsModule.getClampedPIPPosition;
let object2 = {pipX: x, pipY: y};
object2.width = ACTIVITY_PIP_SIZE.width;
object2.height = ACTIVITY_PIP_SIZE.height;
object2.windowDimensions = env0_3;
object2.safeArea = env0_4;
const pipAvoidanceSpecsBinding = pipAvoidanceSpecs;
get = pipAvoidanceSpecsBinding.get;
object2.bottomAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).bottom;
get = pipAvoidanceSpecsBinding.get;
object2.topAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).top;
let wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
object2.positionOffset = Reflect.apply(get, wrapperOffsetBinding, []).gestureActive ? wrapperOffset.get() : value4;
object2.disableHorizontalSafeAreas = env0_10;
const value6 = Reflect.apply(getClampedPIPPosition, morphablePanelUtilsModule, [object2]);
const x2 = value6.x;
y = value6.y;
const r8 = shown.get() || useReducedMotion ? x2 : x < 0.5 && x >= 0 ? -(ACTIVITY_PIP_SIZE.width + global.Math.max(env0_4.right,
PIP_WINDOW_OFFSET)) : env0_3.width + global.Math.max(env0_4.right, PIP_WINDOW_OFFSET);
const value10 = _fun117498();
object2 = {};
const value11 = 1;
if (useReducedMotion) {
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
r1 = moduleValue2.withTiming(shown.get() ? value11 : 0, env1_19, 'animate-always', value10);
} else {
r1 = value11;
}
object2.opacity = r1;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
const items2 = [{translateY: Reflect.apply(withSpring, springModule, [y, Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT, 'animate-always'])}];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
items2[1] = {translateX: Reflect.apply(withSpring, moduleValue4, [r8, Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT, 'animate-always',
useReducedMotion ? value4 : value10])};
object2.transform = items2;
return object2;
}
function _fun117502() { // fn#117502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:5744, offset: 0x024b50d8, size: 119 bytes, params: 1, frame: 15
const object2 = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3ejJer']);
object2.accessibilityActions = [{name: 'activate'}];
object2.onAccessibilityAction = function() {
setMode(ActivityPanelModes.PANEL);
};
return object2;
}
function _fun117505() { // fn#117505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6282, offset: 0x024b5298, size: 74 bytes, params: 1, frame: 14
const value = environment.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const object2 = {};
object2.channelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
object2.activity = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
return object2;
}
function _fun117506() { // fn#117506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6540, offset: 0x024b52e2, size: 42 bytes, params: 1, frame: 12
return applicationId == null ? undefined : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
}
function _fun117508() { // fn#117508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6731, offset: 0x024b530c, size: 161 bytes, params: 1, frame: 19
const baseActivityPanelPIPViewProps = {transitionState: transitionState, transitionCleanUp: transitionCleanUp,
pipOrientationLockState: env0_5, hasActivity: activity != null,
context: importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */};
const EmbeddedActivityView = importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */;
const channelBinding = channel;
const PIP = ActivityLayoutMode.PIP;
return (
<BaseActivityPanelPIPView {...baseActivityPanelPIPViewProps}>
<EmbeddedActivityView
channel={channelBinding}
layoutMode={PIP}
portraitSafeAreasConfig={DEFAULT_PORTRAIT_LETTERBOX_CONFIG}
landscapeSafeAreasConfig={landscapeSafeAreasConfig}
/>
</BaseActivityPanelPIPView>
);
}
function _fun117498() { // fn#117498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:4018, offset: 0x024b4f95, size: 123 bytes, params: 1, frame: 16
const closure = ActivityPanelPIPViewTsx2;
const object2 = {};
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.transitionCleanUp = transitionCleanUp;
closure.__closure = object2;
closure.__workletHash = 5141562491372;
closure.__initData = env2_22;
return closure;
}
function ActivityPanelPIPViewTsx2() { // fn#117499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:4060, offset: 0x024b5010, size: 109 bytes, params: 1, frame: 14
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
let r1 = value !== undefined ? value : false;
if (r1) {
value = environment.__proto__.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [transitionCleanUp])();
}
}
@@ -0,0 +1,30 @@
/* Metro module 15368; source: modules/activities/panel/native/ActivityPanelStateContext.tsx; dependencies: [31, 8044, 8142, 2] */
function _fun117478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15565:6, offset: 0x024b403c, size: 297 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
object2 = {};
const ActivityPanelModes = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const PANEL = ActivityPanelModes.PANEL;
object2.mode = PANEL;
object2.setMode = function() {
var Error = global.Error;
throw new Error('ActivityPanelStateContextType.Provider.setMode: not called within a context provider');
};
object2.wrapperDimensions = {'width': 9, 'height': 16, 'isLandscape': false, 'isWindowLandscape': false};
object2.pipState = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'x': -1,
'y': -1});
object2.pipAvoidanceSpecs = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'top': 0,
'bottom': 0});
object2.wrapperOffset = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'x': 0,
'y': 0, 'gestureActive': false});
object2.useActivityWebViewLock = function() {
return true;
};
value = value.createContext(object2);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelStateContext.tsx');
exports.default = value;
exports.activityPanelStateContextDefault = object2;
}
@@ -0,0 +1,38 @@
/* Metro module 15391; source: modules/activities/panel/native/ActivityPanelSystemUIManager.tsx; dependencies: [31, 8044, 33, 15368, 477, 7725, 7727, 2] */
function _fun117669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:6, offset: 0x024bd494, size: 210 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = BaseActivityPanelSystemUIManager;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.Fragment;
const env0_7 = value2.jsxs;
value = value.memo(_fun117671);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelSystemUIManager.tsx');
exports.default = value;
exports.BaseActivityPanelSystemUIManager = closure;
}
function BaseActivityPanelSystemUIManager({mode, isWindowLandscape}) { // fn#117670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:348, offset: 0x024bd566, size: 233 bytes, params: 2, frame: 22
const PANEL = ActivityPanelModes.PANEL;
const value2 = mode === PANEL;
const PIP = ActivityPanelModes.PIP;
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
const r8 = isIOS2 ? value2 : !!isIOS2;
return (
<>
{mode === PIP ? null : ((Component) => <Component hidden={!(isWindowLandscape ? !value2 : !isWindowLandscape)} barStyle="light-content" />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)}
{((Component) => <Component prefersHidden={value2 && !r8} prefersDeferringSystemGestures={r8} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</>
);
}
function _fun117671() { // fn#117671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:185, offset: 0x024bd64f, size: 84 bytes, params: 1, frame: 15
const {mode,
wrapperDimensions} = env0_3.useContext(importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */);
return <BaseActivityPanelSystemUIManager mode={mode} isWindowLandscape={wrapperDimensions.isWindowLandscape} />;
}
@@ -0,0 +1,83 @@
/* Metro module 15369; source: modules/activities/panel/native/ActivityPanelUI.tsx; dependencies: [31, 27, 8044, 33, 15370, 15376, 15390, 6517, 4508, 15391, 15368, 2] */
function _fun117481(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:6, offset: 0x024b4189, size: 290 bytes, params: 8, frame: 19
const env0_0 = require;
const getKey_117483 = function(a0) {
return a0;
};
const closure = BaseActivityPanelUI;
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.StyleSheet;
const env0_6 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = [];
const env0_10 = ['pip'];
const env0_11 = ['activity'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelUI.tsx');
exports.default = ActivityPanelUI;
exports.BaseActivityPanelUI = closure;
}
function renderActivityOrPIP(a0, a1, a2, a3) { // fn#117482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:196, offset: 0x024b42ab, size: 83 bytes, params: 5, frame: 15
return ((Component) => <Component transitionState={a2} transitionCleanUp={a3} key={a0} />)(importDefault(a1 === 'pip' ? dependencyMap[4] : dependencyMap[5]));
}
function wrapChildren_117484(a0) { // fn#117484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:337, offset: 0x024b42fe, size: 55 bytes, params: 2, frame: 13
return (
<View style={StyleSheet.absoluteFill} pointerEvents="box-none">
{a0}
</View>
);
}
function BaseActivityPanelUI({renderActivityOrPIP, context, renderActivityPanelSystemUIManager}) { // fn#117485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:467, offset: 0x024b4335, size: 227 bytes, params: 2, frame: 21
const binding = env0_3;
const useContext = binding.useContext;
const value3 = env0_3.useMemo(_fun117486, [Reflect.apply(useContext, binding, [context]).mode,
(importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)()]);
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
const value4 = renderActivityPanelSystemUIManager();
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<LayerScope>
{value4}
<TransitionGroup
items={value3}
renderItem={renderActivityOrPIP}
getItemKey={getKey_117483}
wrapChildren={wrapChildren_117484}
/>
</LayerScope>
);
}
function ActivityPanelUI() { // fn#117487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:917, offset: 0x024b446d, size: 67 bytes, params: 1, frame: 15
return env0_3.useMemo(_fun117489, [env0_3.useCallback(_fun117488, [])]);
}
function _fun117486() { // fn#117486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:620, offset: 0x024b4418, size: 85 bytes, params: 1, frame: 4
const modeBinding = mode;
const DISCONNECTED = ActivityPanelModes.DISCONNECTED;
return modeBinding === DISCONNECTED ? env1_9 : mode !== ActivityPanelModes.PIP ? mode === ActivityPanelModes.PIP ? env1_10 : env1_11 : env0_1 ? env1_9 : mode === ActivityPanelModes.PIP ? env1_10 : env1_11;
}
function _fun117488() { // fn#117488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:965, offset: 0x024b44b0, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15391) /* metro dependency 15391: ActivityPanelSystemUIManager */);
}
function _fun117489() { // fn#117489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:1006, offset: 0x024b44d7, size: 68 bytes, params: 1, frame: 15
return (
<BaseActivityPanelUI
renderActivityOrPIP={renderActivityOrPIP}
context={importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */}
renderActivityPanelSystemUIManager={env0_0}
/>
);
}
@@ -0,0 +1,26 @@
/* Metro module 15378; source: modules/activities/panel/native/BlurVisualEffectView.tsx; dependencies: [31, 27, 33, 4000, 697, 3860, 4564, 2] */
function _fun117565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15575:6, offset: 0x024b83bc, size: 231 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
const env0_5 = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.24]);
value = value.memo(_fun117566);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/BlurVisualEffectView.tsx');
exports.default = value;
}
function _fun117566() { // fn#117566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15575:212, offset: 0x024b84a3, size: 161 bytes, params: 1, frame: 18
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK = (importDefault(697) /* metro dependency 697: native */).colors.VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK;
return ((Component) => <Component style={StyleSheet.absoluteFill} blurStyle="default" blurTintRgba={(require(4000) /* metro dependency 4000: ColorUtils */).hexToRgbaString(env0_5)} android_fallbackColor={Reflect.apply(useToken,
useTokenModule, [VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK,
'dark'])} blurAmount={0.24} blurTheme="dark" />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
}
@@ -0,0 +1,44 @@
/* Metro module 15379; source: modules/activities/panel/native/InviteActivityButton.tsx; dependencies: [31, 6877, 6876, 33, 4080, 15380, 1962, 566, 10259, 4578, 10858, 1244, 2] */
function _fun117567(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:6, offset: 0x024b8544, size: 180 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(InviteActivityButton);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/InviteActivityButton.tsx');
exports.default = value;
}
function InviteActivityButton({applicationId}) { // fn#117568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:154, offset: 0x024b85f8, size: 304 bytes, params: 2, frame: 21
var r0;
var Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [LocalActivityStore];
items[1] = SelfPresenceStore;
if (Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return importDefault(dependencyMap[8])(LocalActivityStore, SelfPresenceStore, applicationId);
}, [applicationId]]) == null) {
r0 = null;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = <Button onPress={onPress_117570} icon={importDefault(10858) /* metro dependency 10858 */} text={intl.string(t['OzOM/q'])} accessibilityLabel={intl.string(t['OzOM/q'])} variant="secondary-overlay" size="sm" shrink maxFontSizeMultiplier={1} />;
}
return r0;
}
function InviteActivityButtonOnPress() { // fn#117570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:314, owner: InviteActivityButton.onPress, offset: 0x024b8759, size: 118 bytes, params: 1, frame: 18
const binding = env0_1;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[4]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ActivityInviteSheet-' + binding.session_id, {activity: binding}]);
}
@@ -0,0 +1,53 @@
/* Metro module 15389; source: modules/activities/panel/native/LeaveActivityButton.tsx; dependencies: [31, 8044, 33, 4578, 10634, 1244, 8092, 2] */
function _fun117661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:6, offset: 0x024bd0bc, size: 187 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = BaseLeaveActivityButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(LeaveActivityButton_117663);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/LeaveActivityButton.tsx');
exports.default = value;
exports.BaseLeaveActivityButton = closure;
}
function BaseLeaveActivityButton({onPress}) { // fn#117662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:149, offset: 0x024bd177, size: 201 bytes, params: 2, frame: 19
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {onPress: onPress, icon: importDefault(10634) /* metro dependency 10634 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Hi1/aQ']);
buttonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k0Aph0);
buttonProps.variant = 'destructive';
buttonProps.size = 'sm';
buttonProps.maxFontSizeMultiplier = 1;
return <Button {...buttonProps} />;
}
function LeaveActivityButton_117663({selfEmbeddedActivity, setMode}) { // fn#117663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:418, offset: 0x024bd240, size: 59 bytes, params: 2, frame: 13
return (
<BaseLeaveActivityButton
onPress={function() {
setMode(ActivityPanelModes.DISCONNECTED);
global.setTimeout(_fun117665, 400);
}}
/>
);
}
function LeaveActivityButton_117663OnPress() { // fn#117664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:525, owner: LeaveActivityButton_117663.onPress, offset: 0x024bd27b, size: 58 bytes, params: 1, frame: 13
const setModeBinding = setMode;
const DISCONNECTED = ActivityPanelModes.DISCONNECTED;
setModeBinding(DISCONNECTED);
global.setTimeout(_fun117665, 400);
}
function _fun117665() { // fn#117665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:560, offset: 0x024bd2b5, size: 97 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: selfEmbeddedActivity == null ? value : selfEmbeddedActivity.location,
applicationId: selfEmbeddedActivity == null ? value : selfEmbeddedActivity.applicationId});
return value;
}
@@ -0,0 +1,36 @@
/* Metro module 15383; source: modules/activities/panel/native/MinimizeActivityButton.tsx; dependencies: [31, 27, 8044, 33, 4501, 4578, 8709, 1244, 8341, 2] */
function _fun117596(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15580:6, offset: 0x024b9f5c, size: 235 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonParent: {flexShrink: 1}});
value = value.memo(MinimizeActivityButton);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/MinimizeActivityButton.tsx');
exports.default = value;
}
function MinimizeActivityButton({activityName, setMode}) { // fn#117597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15580:232, offset: 0x024ba047, size: 392 bytes, params: 2, frame: 23
var r0;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Button;
const value2 = env0_3.useCallback(function() {
setMode(ActivityPanelModes.PIP);
}, [setMode]);
const styles = useStyles();
if (activityName === undefined) {
r0 = <IconButton icon={importDefault(8709) /* metro dependency 8709 */} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)} onPress={value2} size="sm" variant="secondary-overlay" maxFontSizeMultiplier={1} />;
} else if (activityName !== '') {
var viewBindingProps = {style: styles.buttonParent};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = <View {...viewBindingProps}><Button icon={importDefault(8709) /* metro dependency 8709 */} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)} onPress={value2} text={activityName} size="sm" variant="secondary-overlay" maxFontSizeMultiplier={1} shrink /></View>;
} else {
r0 = <IconButton icon={importDefault(8709) /* metro dependency 8709 */} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)} onPress={value2} size="sm" variant="secondary-overlay" maxFontSizeMultiplier={1} />;
}
return r0;
}
@@ -0,0 +1,91 @@
/* Metro module 15373; source: modules/activities/panel/native/pip/getActivityContainerPIPStylesSpec.tsx; dependencies: [4237, 8044, 11624, 2] */
function _fun117523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15570:6, offset: 0x024b5c40, size: 211 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const OrientationLockState = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
const LANDSCAPE_ACTIVITY_ASPECT_RATIO = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).LANDSCAPE_ACTIVITY_ASPECT_RATIO;
const closure = t_117524;
closure.__closure = {OrientationLockState: OrientationLockState,
LANDSCAPE_ACTIVITY_ASPECT_RATIO: LANDSCAPE_ACTIVITY_ASPECT_RATIO,
roundToNearestPixel: importDefault(11624) /* metro dependency 11624: roundToNearestPixel */};
closure.__workletHash = 7141745103186;
closure.__initData = {code: 'function getActivityContainerPipStylesSpec_getActivityContainerPIPStylesSpecTsx1({pipWidth:pipWidth,pipHeight:pipHeight,pipOrientationLockState:pipOrientationLockState,isLandscape:isLandscape}){const{OrientationLockState,LANDSCAPE_ACTIVITY_ASPECT_RATIO,roundToNearestPixel}=this.__closure;const nonNullPipOrientationLockState=pipOrientationLockState!==null&&pipOrientationLockState!==void 0?pipOrientationLockState:OrientationLockState.UNLOCKED;const shouldUsePortraitAspectRatio=nonNullPipOrientationLockState===OrientationLockState.PORTRAIT||nonNullPipOrientationLockState===OrientationLockState.UNLOCKED&&!isLandscape;let width=pipWidth;let height=pipHeight;let shouldHorizontallyCenter=false;let shouldVerticallyCenter=false;let marginLeft=0;let marginTop=0;if(shouldUsePortraitAspectRatio){width=pipWidth;height=width*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldVerticallyCenter=true;marginTop=roundToNearestPixel(height/2)*-1;}else{height=pipHeight;width=height*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldHorizontallyCenter=true;marginLeft=roundToNearestPixel(width/2)*-1;}return{width:width,height:height,shouldHorizontallyCenter:shouldHorizontallyCenter,shouldVerticallyCenter:shouldVerticallyCenter,marginLeft:marginLeft,marginTop:marginTop};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/pip/getActivityContainerPIPStylesSpec.tsx');
exports.default = closure;
}
function t_117524({pipWidth, pipHeight, pipOrientationLockState, isLandscape}) { // fn#117524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15570:1430, offset: 0x024b5d13, size: 229 bytes, params: 2, frame: 20
var r1;
var r2;
var r4;
var r5;
var r6;
var value;
var value2;
var value3;
var value4;
var value6;
var value7;
var value8;
var value9;
let r3 = pipOrientationLockState ?? OrientationLockState.UNLOCKED;
const PORTRAIT = OrientationLockState.PORTRAIT;
if (r3 === PORTRAIT) {
value6 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value6 / 2);
value = -1 * value;
value7 = false;
value8 = true;
value9 = 0;
r1 = value;
r2 = value9;
r3 = value8;
r4 = value7;
r5 = value6;
r6 = pipWidth;
} else if (r3 !== OrientationLockState.UNLOCKED) {
value2 = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value2 / 2);
value = -1 * value;
value3 = true;
value4 = false;
r1 = 0;
r2 = value;
r3 = value4;
r4 = value3;
r5 = pipHeight;
r6 = value2;
} else if (isLandscape) {
value2 = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value2 / 2);
value = -1 * value;
value3 = true;
value4 = false;
r1 = 0;
r2 = value;
r3 = value4;
r4 = value3;
r5 = pipHeight;
r6 = value2;
} else {
value6 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value6 / 2);
value = -1 * value;
value7 = false;
value8 = true;
value9 = 0;
r1 = value;
r2 = value9;
r3 = value8;
r4 = value7;
r5 = value6;
r6 = pipWidth;
}
return {width: r6, height: r5, shouldHorizontallyCenter: r4, shouldVerticallyCenter: r3, marginLeft: r2,
marginTop: r1};
}
@@ -0,0 +1,67 @@
/* Metro module 15363; source: modules/activities/panel/native/pip/usePIPAvoidanceSpecs.tsx; dependencies: [4017, 15319, 15364, 7739, 15263, 15365, 11282, 2] */
function _fun117444(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:6, offset: 0x024b3354, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function usePIPAvoidanceSpecsTsx1(){const{keyboardHeight,safeArea,screenName}=this.__closure;return{keyboardHeight:keyboardHeight.get(),safeAreaBottom:safeArea.bottom,screenName:screenName.get()};}'};
object = {code: 'function usePIPAvoidanceSpecsTsx2(props,previous){const{cheapWorkletShallowEqual,getPIPBottomOffsetForPIPMode,getAdjustedBottomOffsets,updateSharedValueIfChanged,pipAvoidanceSpecs}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{keyboardHeight:keyboardHeight,safeAreaBottom:safeAreaBottom,screenName:screenName}=props;const screenBottomOffset=getPIPBottomOffsetForPIPMode(screenName);const{bottomOffset:bottomOffset}=getAdjustedBottomOffsets({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeAreaBottom,keyboardHeight:keyboardHeight});updateSharedValueIfChanged(pipAvoidanceSpecs,{top:0,bottom:bottomOffset});}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/pip/usePIPAvoidanceSpecs.tsx');
exports.default = usePIPAvoidanceSpecs;
}
function usePIPAvoidanceSpecs(a0) { // fn#117445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1108, offset: 0x024b33db, size: 301 bytes, params: 2, frame: 23
var object2;
const env0_0 = a0;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'top': 0,
'bottom': 0});
const value3 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const value4 = (importDefault(15364) /* metro dependency 15364: useScreenNameSharedValue */)();
const env0_3 = value4;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = usePIPAvoidanceSpecsF;
closure.__closure = {keyboardHeight: value3, safeArea: a0, screenName: value4};
closure.__workletHash = 9790941132204;
closure.__initData = env0_3;
const closure2 = usePIPAvoidanceSpecsN;
object2 = {};
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object2.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
object2.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object2.pipAvoidanceSpecs = value2;
closure2.__closure = object2;
closure2.__workletHash = 643938425459;
closure2.__initData = env0_4;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return value2;
}
function usePIPAvoidanceSpecsF() { // fn#117446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1255, owner: usePIPAvoidanceSpecs.f, offset: 0x024b3508, size: 57 bytes, params: 1, frame: 11
const object2 = {};
object2.keyboardHeight = env0_2.get();
object2.safeAreaBottom = env0_0.bottom;
object2.screenName = env0_3.get();
return object2;
}
function usePIPAvoidanceSpecsN(a0, a1) { // fn#117447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1435, owner: usePIPAvoidanceSpecs.n, offset: 0x024b3541, size: 182 bytes, params: 3, frame: 17
var keyboardHeight;
var safeAreaBottom;
var bottomOffset;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
keyboardHeight = a0.keyboardHeight;
safeAreaBottom = a0.safeAreaBottom;
value = (importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */)(a0.screenName);
bottomOffset = (importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */)({screenBottomOffset: value,
safeAreaBottom: safeAreaBottom, keyboardHeight: keyboardHeight}).bottomOffset;
value = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
value(env0_1, {top: 0, bottom: bottomOffset});
}
return value3;
}
@@ -0,0 +1,260 @@
/* Metro module 15366; source: modules/activities/panel/native/useActivityWebViewLockManager.tsx; dependencies: [57, 31, 4017, 4508, 2] */
function _fun117455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:6, offset: 0x024b38a0, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_117458 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/useActivityWebViewLockManager.tsx');
exports.default = useActivityWebViewLockManager;
exports.useLockedWebView = useLockedWebView;
}
function _createForOfIteratorHelperLoose_117456(a0, a1) { // fn#117456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:121, offset: 0x024b3948, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun117457;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_117458(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_117458(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_117458(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun117457;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useActivityWebViewLockManager() { // fn#117459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1142, offset: 0x024b3abc, size: 34 bytes, params: 1, frame: 11
return env0_3.useState(function() {
var env0_3 = _fun117461;
var env0_4 = _fun117462;
var env0_1 = new global.Set();
var env0_2 = new global.Map();
return _fun117464;
})[0];
}
function useLockedWebView({transitionState, context}) { // fn#117470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1938, offset: 0x024b3d5b, size: 139 bytes, params: 2, frame: 17
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_3;
const useContext = binding.useContext;
const useActivityWebViewLock = Reflect.apply(useContext, binding, [context]).useActivityWebViewLock;
const value = useActivityWebViewLock();
binding.useEffect(_fun117471, [value2, transitionState, value]);
return {shown: value2, renderWebView: value};
}
function _fun117460() { // fn#117460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1202, offset: 0x024b3ade, size: 95 bytes, params: 1, frame: 11
const Set = global.Set;
const set = new Set();
const Map = global.Map;
const map = new Map();
return _fun117464;
}
function _fun117471() { // fn#117471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:2096, offset: 0x024b3de6, size: 91 bytes, params: 1, frame: 13
const transitionStateBinding = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (transitionStateBinding === YEETED) {
env0_1.set(false);
} else if (env0_2) {
env0_1.set(true);
} else {
env0_1.set(false);
}
}
function getCanRender(a0) { // fn#117461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1233, offset: 0x024b3b3d, size: 68 bytes, params: 2, frame: 11
var r0;
var value;
const value2 = env0_1.size === 0;
if (value2) {
r0 = value2;
} else {
value = env0_1.values();
value = value.next();
value = value?.value === a0;
r0 = value;
}
return r0;
}
function queueRenderUpdate() { // fn#117462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1332, offset: 0x024b3b81, size: 57 bytes, params: 1, frame: 12
if (env0_0 == null) {
env0_0 = global.Promise.resolve().then(_fun117463);
}
}
function _fun117464() { // fn#117464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1615, offset: 0x024b3c48, size: 132 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__.__proto__;
const binding = env2_3;
const value2 = binding.useId();
value = env2_2(binding.useState(_fun117465), 2);
const property = value[0];
const property2 = value[1];
binding.useInsertionEffect(_fun117466, [value2]);
binding.useLayoutEffect(function() {
queueRenderUpdate();
return _fun117469;
}, [value2, property2]);
return property;
}
function _fun117463() { // fn#117463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1397, offset: 0x024b3bba, size: 142 bytes, params: 1, frame: 24
var r3;
var value5;
var value6;
var property;
var property2;
var canRender;
var callback;
var canRender2;
var binding;
var value8;
const value3 = _createForOfIteratorHelperLoose_117456(env1_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
value6 = env3_2(value5, 2);
property = value6[0];
property2 = value6[1];
canRender = property2.canRender;
callback = property2.callback;
canRender2 = getCanRender(property);
if (canRender2 !== canRender) {
binding = env1_2;
binding.set(property, {canRender: canRender2, callback: callback});
callback(canRender2);
}
value8 = value3();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
}
}
function _fun117466() { // fn#117466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1730, offset: 0x024b3ccc, size: 77 bytes, params: 1, frame: 15
let binding = env1_1;
const add = binding.add;
const binding2 = env0_0;
Reflect.apply(add, binding, [binding2]);
binding = env1_2;
const set = binding.set;
const object2 = {callback: env0_1};
object2.canRender = getCanRender(binding2);
Reflect.apply(set, binding, [binding2, object2]);
return _fun117467;
}
function _fun117468() { // fn#117468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1848, offset: 0x024b3d43, size: 24 bytes, params: 1, frame: 9
queueRenderUpdate();
return function() {
queueRenderUpdate();
};
}
function _fun117467() { // fn#117467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1792, offset: 0x024b3d19, size: 42 bytes, params: 1, frame: 12
const binding = env2_1;
const binding2 = env1_0;
binding.delete(binding2);
env2_2.delete(binding2);
}
@@ -0,0 +1,29 @@
/* Metro module 15361; source: modules/activities/panel/native/utils/ActivityPanelUtils.tsx; dependencies: [1378, 8044, 566, 3774, 8102, 2] */
function _fun117439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:6, offset: 0x024b30dd, size: 140 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_4 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/utils/ActivityPanelUtils.tsx');
exports.useIsActivityPanelFullscreen = function() {
return require(dependencyMap[2]).useStateFromStores([EmbeddedActivitiesStore], _fun117441);
};
}
function useIsActivityPanelFullscreen() { // fn#117440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:260, offset: 0x024b3169, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], _fun117441);
}
function _fun117441() { // fn#117441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:339, offset: 0x024b31a4, size: 107 bytes, params: 1, frame: 14
const value = environment.__proto__;
const embeddedActivityLocationUtilsModule = require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */;
const getEmbeddedActivityLocationChannelId = embeddedActivityLocationUtilsModule.getEmbeddedActivityLocationChannelId;
const getConnectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation;
const value2 = Reflect.apply(getEmbeddedActivityLocationChannelId, embeddedActivityLocationUtilsModule,
[Reflect.apply(getConnectedActivityLocation, EmbeddedActivitiesStore, [])]);
const activityPanelMode = EmbeddedActivitiesStore.getActivityPanelMode();
const PANEL = ActivityPanelModes.PANEL;
return activityPanelMode === PANEL && !(importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(value2);
}
@@ -0,0 +1,57 @@
/* Metro module 9470; source: modules/activities/records/CustomActivityLinkRecord.tsx; dependencies: [6, 7, 9471, 6873, 9468, 2] */
function _fun73649(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9656:6, offset: 0x01d73ee6, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun73650();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/records/CustomActivityLinkRecord.tsx');
exports.default = value;
}
function _fun73650() { // fn#73650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9656:118, offset: 0x01d73f6c, size: 59 bytes, params: 1, frame: 14
return env0_3(CustomActivityLinkRecord, [{key: 'getAssetURL', value: value_73652}]);
}
function CustomActivityLinkRecord(a0) { // fn#73651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9656:139, offset: 0x01d73fa7, size: 213 bytes, params: 2, frame: 16
let value = environment.__proto__;
const binding = env1_2;
const value3 = undefined;
binding(this, CustomActivityLinkRecord);
value = Reflect.apply((require(9471) /* metro dependency 9471: CustomActivityLinkUtils */).decodeCustomActivityLink,
value, [a0.link_id]);
const value4 = null;
const type = value4 == value ? value3 : value.type;
this.type = value4 != type ? type : value4;
this.applicationId = a0.application_id;
this.linkId = a0.link_id;
this.assetId = 'asset_id' in a0 ? a0.asset_id : value3;
this.assetPath = 'asset_path' in a0 ? a0.asset_path : value3;
this.title = a0.title;
this.description = a0.description;
this.customId = a0.custom_id;
return value3;
}
function value_73652() { // fn#73652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9656:574, offset: 0x01d7407c, size: 180 bytes, params: 1, frame: 17
var r0;
const type = this.type;
let value = environment.__proto__;
const value2 = undefined;
const CustomLinkType = (require(9471) /* metro dependency 9471: CustomActivityLinkUtils */).CustomLinkType;
const MANAGED = CustomLinkType.MANAGED;
if (type === MANAGED) {
value = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
value = value.getAssetImage(this.applicationId, this.assetId, 512);
r0 = value;
} else if (this.type !== CustomLinkType.QUICK) {
r0 = value2;
} else {
value = require(9468) /* metro dependency 9468: CustomActivityLinkUtils */;
value = value.getQuickLinkImage(this.assetPath);
r0 = value;
}
return r0;
}
@@ -0,0 +1,75 @@
/* Metro module 9469; source: modules/activities/stores/CustomActivityLinksStore.tsx; dependencies: [6, 7, 15, 17, 18, 9470, 566, 694, 2] */
function _fun73640(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9655:6, offset: 0x01d73c7a, size: 301 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 customActivityLinkRecord = importDefault(9470) /* metro dependency 9470: CustomActivityLinkRecord */;
let env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun73644(Store);
value.displayName = 'CustomActivityLinksStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CUSTOM_ACTIVITY_LINK_FETCH_SUCCESS: CUSTOM_ACTIVITY_LINK_FETCH_SUCCESS, LOGOUT: function() {
env0_6 = {};
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/stores/CustomActivityLinksStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_73641() { // fn#73641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9655:158, offset: 0x01d73da7, 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_73641_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun73644(a0) { // fn#73644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9655:366, offset: 0x01d73e09, size: 74 bytes, params: 2, frame: 15
const closure = CustomActivityLinksStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getOne', value: value_73646}]);
}
function CUSTOM_ACTIVITY_LINK_FETCH_SUCCESS({applicationId, link}) { // fn#73647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9655:872, offset: 0x01d73e7c, size: 106 bytes, params: 2, frame: 15
var binding;
var Object;
if (env0_6[applicationId] == null) {
binding = env0_6;
Object = global.Object;
binding[applicationId] = Object.create(null);
}
env0_6[applicationId][link.link_id] = new CustomActivityLinkRecord(link);
}
function value_73646(a0, a1) { // fn#73646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9655:712, offset: 0x01d73e53, size: 41 bytes, params: 3, frame: 4
if (env1_6[a0] != null) {
return env1_6[a0][a1];
}
}
@@ -0,0 +1,28 @@
/* Metro module 15704; source: modules/activities/trackActivityProblem.tsx; dependencies: [661, 683, 2] */
function _fun120534(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15912:6, offset: 0x0252e84f, size: 120 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/trackActivityProblem.tsx');
exports.default = trackActivityProblem;
}
function trackActivityProblem({problem, channel, embeddedActivityLocation, feedback, activityApplication, analyticsData = {}, location, rating}) { // fn#120535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15912:208, offset: 0x0252e8c7, size: 243 bytes, params: 2, frame: 24
rating = rating === undefined ? null : rating;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ACTIVITY_REPORT_PROBLEM = AnalyticEvents.ACTIVITY_REPORT_PROBLEM;
const object2 = {reason: problem};
object2.guild_id = channel?.getGuildId();
object2.channel_id = channel?.id;
object2.application_id = activityApplication?.id;
object2.application_name = activityApplication?.name;
object2.location = location;
object2.rating = rating;
object2.feedback = feedback;
object2.embedded_activity_location_kind = embeddedActivityLocation.kind;
object2.rtc_connection_id = analyticsData.rtc_connection_id;
object2.media_session_id = analyticsData.media_session_id;
Reflect.apply(track, defaultImport, [ACTIVITY_REPORT_PROBLEM, object2]);
}
@@ -0,0 +1,31 @@
/* Metro module 15409; source: modules/activities/trackActivityThermalStateNoticeShown.tsx; dependencies: [1379, 4294, 1378, 661, 3774, 683, 2] */
function _fun117868(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15606:6, offset: 0x024c397f, size: 172 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/trackActivityThermalStateNoticeShown.tsx');
exports.trackActivityThermalStateNoticeShown = trackActivityThermalStateNoticeShown;
}
function trackActivityThermalStateNoticeShown() { // fn#117869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15606:283, offset: 0x024c3a2b, size: 206 bytes, params: 1, frame: 20
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const value3 = undefined;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(currentEmbeddedActivity == null ? value3 : currentEmbeddedActivity.location);
const basicChannel = ChannelStore.getBasicChannel(embeddedActivityLocationChannelId);
const compositeInstanceId = currentEmbeddedActivity == null ? value3 : currentEmbeddedActivity.compositeInstanceId;
const applicationId = currentEmbeddedActivity == null ? value3 : currentEmbeddedActivity.applicationId;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ACTIVITY_THERMAL_STATE_NOTICE_SHOWN = AnalyticEvents.ACTIVITY_THERMAL_STATE_NOTICE_SHOWN;
const object2 = {channel_id: embeddedActivityLocationChannelId, application_id: applicationId,
activity_session_id: compositeInstanceId};
object2.guild_id = basicChannel == null ? value3 : basicChannel.guild_id;
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
Reflect.apply(track, defaultImport, [ACTIVITY_THERMAL_STATE_NOTICE_SHOWN, object2]);
return value3;
}
@@ -0,0 +1,126 @@
/* Metro module 11581; source: modules/activities/useActivityShelfData.tsx; dependencies: [31, 1878, 7505, 1378, 566, 6777, 1360, 8049, 477, 8040, 2] */
function _fun88672(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:6, offset: 0x01fee1cd, size: 169 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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const testModeStore = importDefault(7505) /* metro dependency 7505: TestModeStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useActivityShelfData.tsx');
exports.useActivityShelfData = useActivityShelfData;
}
function useActivityShelfData(a0) { // fn#88673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:237, offset: 0x01fee276, size: 385 bytes, params: 2, frame: 21
var r5;
const env0_0 = a0;
var value;
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let items2 = [UserStore];
const getCurrentUser = UserStore.getCurrentUser;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [items2, getCurrentUser]);
const value4 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], _fun88674);
const testModeEmbeddedApplicationId = fluxModule.useStateFromStores([TestModeStore], function() {
return TestModeStore.testModeEmbeddedApplicationId;
});
const env0_3 = testModeEmbeddedApplicationId;
const value5 = value4.map(function(a0) {
return a0.application_id;
});
if (testModeEmbeddedApplicationId == null) {
r5 = value5;
} else {
items2 = [testModeEmbeddedApplicationId];
arraySpread(items2, value5, 1, value5);
r5 = items2;
}
const value6 = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(r5);
const binding = env0_3;
const value7 = binding.useMemo(_fun88678, [binding.useMemo(_fun88677, [value6]), testModeEmbeddedApplicationId]);
value = binding.useMemo(_fun88679, [value4, value]);
return binding.useMemo(_fun88682, [value3 == null ? value2 : value3.nsfwAllowed, value, value7]);
}
function _fun88674() { // fn#88674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:364, offset: 0x01fee3f7, size: 27 bytes, params: 1, frame: 11
return EmbeddedActivitiesStore.getShelfActivities(env0_0);
}
function _fun88677() { // fn#88677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:544, offset: 0x01fee423, size: 50 bytes, params: 1, frame: 13
const binding = env0_4;
return binding.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun88678() { // fn#88678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:598, offset: 0x01fee455, size: 119 bytes, params: 1, frame: 5
return testModeEmbeddedApplicationId == null ? [] : env0_5.length > 0 ? env0_5[0].id !== testModeEmbeddedApplicationId ? [] : env0_5[0].embeddedActivityConfig != null ? [{activity: env0_5[0].embeddedActivityConfig,
application: env0_5[0]}] : [] : [];
}
function _fun88679() { // fn#88679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:752, offset: 0x01fee4cc, size: 69 bytes, params: 1, frame: 13
const value = env0_2.map(_fun88680);
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun88682() { // fn#88682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:915, offset: 0x01fee54c, size: 86 bytes, params: 1, frame: 15
const binding = env0_6;
const items2 = [];
arraySpread(items2, env0_7, arraySpread(items2, binding, 0, undefined), undefined);
let value = items2.filter(_fun88683);
value = value.filter(_fun88684);
return value.filter(_fun88685);
}
function _fun88680(a0) { // fn#88680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:763, offset: 0x01fee511, size: 59 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = env1_5.find(_fun88681);
const value2 = null;
return value2 == value ? value2 : {activity: a0, application: value};
}
function _fun88683({activity}) { // fn#88683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:939, offset: 0x01fee5a2, size: 93 bytes, params: 2, frame: 15
const r2 = activity.supported_platforms ?? [];
const includes = r2.includes;
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
value = require(477) /* metro dependency 477: PlatformUtils */;
const getOS = value.getOS;
return Reflect.apply(includes, r2, [defaultImport(Reflect.apply(getOS, value, []))]);
}
function _fun88684({activity}) { // fn#88684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:1053, offset: 0x01fee5ff, size: 92 bytes, params: 2, frame: 5
var r0;
const requires_age_gate = activity.requires_age_gate;
let value = !requires_age_gate;
if (requires_age_gate) {
value = environment.__proto__;
value = env1_1?.nsfwAllowed === true;
r0 = value;
} else {
r0 = value;
}
if (!r0) {
value = environment.__proto__;
value = env1_1?.nsfwAllowed == null;
r0 = value;
}
return r0;
}
function _fun88685({application}) { // fn#88685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11767:1175, offset: 0x01fee65b, size: 85 bytes, params: 2, frame: 14
var r0;
let value = environment.__proto__;
value = env1_1?.nsfwAllowed === false;
if (value) {
value = environment.__proto__.__proto__;
value = importDefault(8040) /* metro dependency 8040: isApplicationAgeRestricted */;
value = value(application.id);
r0 = value;
} else {
r0 = value;
}
return !r0;
}
@@ -0,0 +1,23 @@
/* Metro module 15497; source: modules/activities/useActivityShelfItemData.tsx; dependencies: [31, 11580, 2] */
function _fun118670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15694:6, offset: 0x024e750f, size: 117 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useActivityShelfItemData.tsx');
exports.useActivityShelfItemData = useActivityShelfItemData;
}
function useActivityShelfItemData(a0, a1) { // fn#118671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15694:214, offset: 0x024e7584, size: 88 bytes, params: 3, frame: 16
const env0_0 = a1;
return env0_2.useMemo(_fun118672,
[(importDefault(11580) /* metro dependency 11580: useActivityShelfItems */)({guildId: a0}), a1]);
}
function _fun118672() { // fn#118672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15694:298, offset: 0x024e75dc, size: 41 bytes, params: 1, frame: 11
const value = env0_1.find(function(a0) {
return a0.application.id === require;
});
const value2 = null;
return value2 != value ? value : value2;
}
@@ -0,0 +1,208 @@
/* Metro module 11580; source: modules/activities/useActivityShelfItems.tsx; dependencies: [31, 7503, 566, 11581, 11582, 11583, 2] */
function _fun88663(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11766:6, offset: 0x01fedda7, size: 159 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_88666 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const developerActivityShelfStore = importDefault(7503) /* metro dependency 7503: DeveloperActivityShelfStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useActivityShelfItems.tsx');
exports.default = useActivityShelfItems;
}
function _createForOfIteratorHelperLoose_88664(a0, a1) { // fn#88664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11766:121, offset: 0x01fede46, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun88665;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_88666(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_88666(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_88666(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun88665;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useActivityShelfItems({guildId, enableFilter}) { // fn#88667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11766:1121, offset: 0x01fedfba, size: 223 bytes, params: 2, frame: 20
enableFilter = !(enableFilter === undefined) && enableFilter;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const filter = Reflect.apply(useStateFromStoresObject, fluxModule, [[DeveloperActivityShelfStore], function() {
var object = {};
object.filter = DeveloperActivityShelfStore.getFilter();
return object;
}]).filter;
const value3 = (importDefault(11582) /* metro dependency 11582: useActivityShelfItemsSorting */)((require(11581) /* metro dependency 11581: useActivityShelfData */).useActivityShelfData(guildId));
const value4 = (require(11583) /* metro dependency 11583: useDeveloperActivityShelfItems */).useDeveloperActivityShelfItems();
return value4.useMemo(_fun88669, [value4, enableFilter, filter, value3]);
}
function _fun88669() { // fn#88669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11766:1376, offset: 0x01fee0b4, size: 180 bytes, params: 1, frame: 19
var r2;
var r1;
var value8;
var has;
var application;
var id;
var value9;
var value10;
var value11;
var value12;
const closure = shouldKeepShelfItem;
const binding = env0_3;
const items2 = [];
arraySpread(items2, binding, 0, undefined);
const value2 = items2.filter(closure);
const Set = global.Set;
const set = new Set(value2.map(function(a0) {
return a0.application.id;
}));
const value = _createForOfIteratorHelperLoose_88664(env0_2);
const value7 = value();
let done = value7.done;
if (!done) {
r2 = value7;
while (true) {
value8 = r2.value;
has = set.has;
application = value8.application;
id = application.id;
value9 = Reflect.apply(has, set, [id]);
value10 = !value9;
if (value9) {
r1 = value10;
} else {
value11 = closure(value8);
r1 = value11;
}
if (!r1) {
continue;
}
value2.push(value8);
value12 = value();
done = value12.done;
if (done) {
break;
}
r2 = value12;
continue;
}
}
return value2;
}
function shouldKeepShelfItem(a0) { // fn#88670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11766:1381, offset: 0x01fee168, size: 86 bytes, params: 2, frame: 14
var r1;
var r0;
var filterBinding;
var value3;
var value4;
var includes;
const value = environment.__proto__;
const enableFilterBinding = enableFilter;
if (enableFilterBinding) {
value3 = filter === '';
if (value3) {
r1 = value3;
} else {
value4 = a0.application.name.toLowerCase();
includes = value4.includes;
filterBinding = filter;
r1 = !!Reflect.apply(includes, value4, [filterBinding.toLowerCase()]);
}
r0 = r1;
} else {
r0 = !enableFilterBinding;
}
return r0;
}
@@ -0,0 +1,186 @@
/* Metro module 11582; source: modules/activities/useActivityShelfItemsSorting.tsx; dependencies: [31, 1362, 8049, 477, 1909, 2] */
function _fun88686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:6, offset: 0x01fee6b0, size: 132 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useActivityShelfItemsSorting.tsx');
exports.default = useActivityShelfItemsSorting;
}
function applySorting(a0, a1) { // fn#88687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:125, offset: 0x01fee734, size: 109 bytes, params: 3, frame: 15
const items2 = [];
arraySpread(items2, a0, 0, undefined);
const env0_0 = items2;
a1.forEach(_fun88688);
let value = env0_0.map(function(a0, a1) {
return [a0, a1];
});
value = value.filter(_fun88691);
value.forEach(_fun88692);
return env0_0;
}
function useActivityShelfItemsSorting(a0) { // fn#88693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:930, offset: 0x01feea1d, size: 82 bytes, params: 2, frame: 15
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.loadIfNecessary();
return env0_3.useMemo(function() {
var items = [];
var binding = items;
binding.forEach(_fun88695);
var items2 = [];
arraySpread(items2, items, 0, items);
items2.sort(_fun88696);
return applySorting(binding, items2);
}, [a0]);
}
function _fun88688(a0) { // fn#88688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:168, offset: 0x01fee7a1, size: 158 bytes, params: 2, frame: 17
var property;
var value2;
var items2;
var value3;
var value4;
var binding2;
const env0_0 = a0;
let binding = env0_0;
const index = binding.findIndex(_fun88689);
if (index !== -1) {
property = env0_0[index];
binding = env0_0;
binding.splice(index, 1);
binding = env0_0;
value2 = binding.slice(0, env0_1);
items2 = [];
value3 = arraySpread(items2, value2, 0, binding);
items2[value3] = property;
value4 = value3 + 1;
binding2 = env0_0;
arraySpread(items2, binding2.slice(env0_1), value4, binding);
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function _fun88691(a0) { // fn#88691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:327, offset: 0x01fee859, size: 221 bytes, params: 2, frame: 16
var label_type;
var client_platform_config;
var value3;
var defaultImport;
var moduleValue;
var property;
const EmbeddedActivityLabelTypes = (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes;
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
const embeddedActivityConfig = r0.application.embeddedActivityConfig;
if (embeddedActivityConfig == null) {
label_type = value;
} else {
client_platform_config = embeddedActivityConfig.client_platform_config;
value3 = environment.__proto__;
defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
property = client_platform_config[defaultImport(moduleValue.getOS())];
label_type = property == null ? value : property.label_type;
}
return label_type != null && (label_type === EmbeddedActivityLabelTypes.NEW || label_type === EmbeddedActivityLabelTypes.UPDATED);
}
function _fun88692(a0) { // fn#88692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:593, offset: 0x01fee936, size: 231 bytes, params: 2, frame: 18
var r2;
var r3;
var r7;
var item3;
var value3;
var property;
var binding;
var value6;
var items2;
var value7;
var value8;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (value2) {
r2 = item2;
r3 = value2;
r7 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r2 = item3;
r3 = value3;
r7 = value;
} else {
r2 = item3;
r3 = value3;
r7 = item;
}
}
if (!r3) {
r2.return();
}
const r6 = r1.application.embeddedActivityConfig == null || r1.application.embeddedActivityConfig.shelf_rank == null ? r7 : r1.application.embeddedActivityConfig.shelf_rank - 1;
if (r6 < r7) {
property = env0_0[r7];
binding = env0_0;
binding.splice(r7, 1);
binding = env0_0;
value6 = binding.slice(0, r6);
items2 = [];
value7 = arraySpread(items2, value6, 0, 0);
items2[value7] = property;
value8 = value7 + 1;
binding = env0_0;
arraySpread(items2, binding.slice(r6), value8, 0);
}
return value;
}
function _fun88694() { // fn#88694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:1050, offset: 0x01feea6f, size: 85 bytes, params: 1, frame: 15
const items3 = [];
const binding = items3;
binding.forEach(_fun88695);
const items2 = [];
arraySpread(items2, items3, 0, items3);
items2.sort(_fun88696);
return applySorting(binding, items2);
}
function _fun88689({application}) { // fn#88689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:191, offset: 0x01fee83f, size: 26 bytes, params: 2, frame: 2
return application.id === env0_0;
}
function _fun88695({application}) { // fn#88695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:1075, offset: 0x01feeac4, size: 32 bytes, params: 2, frame: 11
const binding = env0_0;
return binding.push(application.id);
}
function _fun88696(a0, a1) { // fn#88696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11768:1133, offset: 0x01feeae4, size: 77 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_0;
let value = binding.findIndex(_fun88697);
value = value < binding.findIndex(function(a0) {
return a0 === require;
});
return value ? -1 : 1;
}
@@ -0,0 +1,45 @@
/* Metro module 15502; source: modules/activities/useActivityUsers.tsx; dependencies: [1878, 1378, 632, 2] */
function _fun118688(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15699:6, offset: 0x024e835b, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useActivityUsers.tsx');
exports.default = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[2]).useStateFromStoresArray([EmbeddedActivitiesStore, UserStore], _fun118690, [a1,
a0]);
};
}
function useActivityUsers(a0, a1) { // fn#118689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15699:200, offset: 0x024e83dd, size: 95 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([EmbeddedActivitiesStore,
UserStore], _fun118690, [a1, a0]);
}
function _fun118690() { // fn#118690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15699:277, offset: 0x024e843c, size: 131 bytes, params: 1, frame: 13
var r0;
var Array;
if (require == null) {
return [];
}
let value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(require);
value = value.find(_fun118691);
if (value == null) {
r0 = [];
} else {
Array = global.Array;
value = Array.from(value.userIds);
value = value.map(function(a0) {
return UserStore.getUser(a0);
});
value = value.filter(_fun118693);
r0 = value;
}
return r0;
}
@@ -0,0 +1,58 @@
/* Metro module 11583; source: modules/activities/useDeveloperActivityShelfItems.tsx; dependencies: [31, 7503, 4237, 566, 2] */
function _fun88699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11769:6, offset: 0x01feeb31, size: 155 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const developerActivityShelfStore = importDefault(7503) /* metro dependency 7503: DeveloperActivityShelfStore */;
const env0_4 = (require(4237) /* metro dependency 4237: Constants */).DEFAULT_EMBEDDED_ACTIVITY_CONFIG;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useDeveloperActivityShelfItems.tsx');
exports.useDeveloperActivityShelfItems = useDeveloperActivityShelfItems;
}
function useDeveloperActivityShelfItems() { // fn#88700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11769:281, offset: 0x01feebcc, size: 168 bytes, params: 1, frame: 22
const {isEnabled,
lastUsedObject} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DeveloperActivityShelfStore],
function() {
var object = {};
object.isEnabled = DeveloperActivityShelfStore.getIsEnabled();
object.lastUsedObject = DeveloperActivityShelfStore.getLastUsedObject();
return object;
}, []);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([DeveloperActivityShelfStore],
function() {
return DeveloperActivityShelfStore.getDeveloperShelfItems();
}, []);
return value3.useMemo(_fun88703, [value3, isEnabled, lastUsedObject]);
}
function _fun88703() { // fn#88703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11769:533, offset: 0x01feecb4, size: 59 bytes, params: 1, frame: 13
var r0;
var value;
if (isEnabled) {
value = env0_2.map(_fun88704);
value = value.sort(_fun88705);
r0 = value;
} else {
r0 = [];
}
return r0;
}
function _fun88704(a0) { // fn#88704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11769:546, offset: 0x01feecef, size: 59 bytes, params: 2, frame: 13
const object = {};
let value = environment.__proto__.__proto__;
value = copyDataProperties(object, DEFAULT_EMBEDDED_ACTIVITY_CONFIG, value);
copyDataProperties(object, a0.embeddedActivityConfig, value);
object['application_id'] = a0.id;
return {application: a0, activity: object};
}
function _fun88705({application}, {application}) { // fn#88705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11769:639, offset: 0x01feed2a, size: 75 bytes, params: 3, frame: 5
const value = environment.__proto__;
const lastUsedObjectBinding = lastUsedObject;
const property = lastUsedObjectBinding[application.id];
const property2 = lastUsedObjectBinding[application.id];
return property == null ? 1 : property2 == null ? -1 : property2 - property;
}
@@ -0,0 +1,22 @@
/* Metro module 10708; source: modules/activities/useDispatchOpenActivity.tsx; dependencies: [31, 694, 2] */
function _fun82272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10894:6, offset: 0x01ef16e4, size: 117 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useDispatchOpenActivity.tsx');
exports.default = useDispatchOpenActivity;
}
function useDispatchOpenActivity({connectedEmbeddedActivity}) { // fn#82273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10894:196, offset: 0x01ef1759, size: 80 bytes, params: 2, frame: 16
env0_2.useEffect(_fun82274, [connectedEmbeddedActivity?.applicationId, connectedEmbeddedActivity]);
}
function _fun82274() { // fn#82274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10894:310, offset: 0x01ef17a9, size: 97 bytes, params: 1, frame: 13
var value4;
if (connectedEmbeddedActivity != null && applicationId != null) {
value4 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMBEDDED_ACTIVITY_OPEN',
location: connectedEmbeddedActivity.location, applicationId: applicationId});
}
}
@@ -0,0 +1,372 @@
/* Metro module 11600; source: modules/activities/useEmbeddedAppsForChannel.tsx; dependencies: [31, 4396, 1878, 1378, 566, 3774, 6777, 1360, 2] */
function _fun88829(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:6, offset: 0x01ff3c55, size: 259 bytes, params: 8, frame: 20
let env0_0 = require;
const _arrayLikeToArray_88832 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = useEmbeddedApps;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_7 = (require(1378) /* metro dependency 1378: EmbeddedActivitiesStore */).NO_ACTIVITIES;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useEmbeddedAppsForChannel.tsx');
exports.default = useEmbeddedAppsForChannel;
exports.useEmbeddedAppsByChannel = useEmbeddedAppsByChannel;
exports.useEmbeddedApps = closure;
exports.useEmbeddedAppsWithPresence = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([PresenceStore], _fun88846, [a0],
require(dependencyMap[4]).statesWillNeverBeEqual);
};
}
function _createForOfIteratorHelperLoose_88830(a0, a1) { // fn#88830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:166, offset: 0x01ff3d58, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun88831;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_88832(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_88832(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_88832(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun88831;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useEmbeddedApps(a0, a1) { // fn#88833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:1076, offset: 0x01ff3ecc, size: 309 bytes, params: 3, frame: 23
var r5;
var r10;
var value7;
var userIds;
var value8;
var value9;
var value10;
var add;
var value11;
var value12;
const env0_0 = a0;
const env0_1 = a1;
let value = a0.map(function(a0) {
return a0.applicationId;
});
value = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(value);
const Set = global.Set;
const set = new Set([]);
const env0_3 = set;
const value5 = _createForOfIteratorHelperLoose_88830(a0);
const value6 = value5();
let done = value6.done;
if (!done) {
r5 = value6;
reducibleLoop1: while (true) {
_createForOfIteratorHelperLoose_88830Binding = _createForOfIteratorHelperLoose_88830;
value7 = r5.value;
userIds = value7.userIds;
value8 = _createForOfIteratorHelperLoose_88830Binding(userIds);
value9 = value8();
done = value9.done;
if (!done) {
r10 = value9;
reducibleLoop2: while (true) {
value10 = r10.value;
add = set.add;
Reflect.apply(add, set, [value10]);
value11 = value8();
done = value11.done;
if (done) {
break reducibleLoop2;
}
r10 = value11;
continue reducibleLoop2;
}
}
value12 = value5();
done = value12.done;
if (done) {
break reducibleLoop1;
}
r5 = value12;
continue reducibleLoop1;
}
}
return env0_3.useMemo(_fun88836, [a0, value,
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun88835, [set]), a1]);
}
function useEmbeddedAppsForChannel(a0, a1) { // fn#88839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2003, offset: 0x01ff41ad, size: 80 bytes, params: 3, frame: 16
const env0_0 = a0;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
return useEmbeddedApps(Reflect.apply(useStateFromStoresArray, fluxModule, [[EmbeddedActivitiesStore], _fun88840]),
a1);
}
function useEmbeddedAppsByChannel(a0) { // fn#88841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2215, offset: 0x01ff424e, size: 109 bytes, params: 2, frame: 17
const env0_0 = a0;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return env0_3.useMemo(_fun88843, [useEmbeddedApps(Reflect.apply(useStateFromStores, fluxModule,
[[EmbeddedActivitiesStore], _fun88842]))]);
}
function useEmbeddedAppsWithPresence(a0) { // fn#88845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2644, offset: 0x01ff4391, size: 96 bytes, params: 2, frame: 21
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], function() {
var Map = global.Map;
var value2 = new Map();
value2.forEach(_fun88847);
return value2;
}, [a0], (require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
}
function _fun88835() { // fn#88835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:1369, offset: 0x01ff4001, size: 84 bytes, params: 1, frame: 17
var r2;
var value5;
var push;
var getUser;
var value6;
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_88830(env0_3);
const value4 = value3();
let done = value4.done;
if (!done) {
for (r2 = value4; true; r2 = value6) {
value5 = r2.value;
push = items2.push;
getUser = UserStore.getUser;
Reflect.apply(push, items2, [Reflect.apply(getUser, UserStore, [value5])]);
value6 = value3();
done = value6.done;
if (done) {
break;
}
}
}
return items2;
}
function _fun88836() { // fn#88836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:1506, offset: 0x01ff4055, size: 122 bytes, params: 1, frame: 13
const Map = global.Map;
let map = new Map();
const env0_0 = map;
env0_4.forEach(_fun88837);
map = env0_0.map(_fun88838);
return map.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun88840() { // fn#88840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2104, offset: 0x01ff41fd, size: 81 bytes, params: 1, frame: 12
return env0_0 == null || env0_0.id == null ? NO_ACTIVITIES : env0_0.id !== '' ? EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(env0_0.id) : NO_ACTIVITIES;
}
function _fun88842() { // fn#88842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2307, offset: 0x01ff42bb, size: 46 bytes, params: 1, frame: 12
return env0_0 != null ? EmbeddedActivitiesStore.getEmbeddedActivitiesForGuild(env0_0) : NO_ACTIVITIES;
}
function _fun88843() { // fn#88843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2377, offset: 0x01ff42e9, size: 60 bytes, params: 1, frame: 12
const Map = global.Map;
const map = new Map();
env0_1.forEach(_fun88844);
return map;
}
function _fun88846() { // fn#88846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2724, offset: 0x01ff43f1, size: 60 bytes, params: 1, frame: 12
const Map = global.Map;
const map = new Map();
map.forEach(_fun88847);
return map;
}
function _fun88837(a0) { // fn#88837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:1536, offset: 0x01ff40cf, size: 36 bytes, params: 2, frame: 13
var binding;
if (a0 != null) {
binding = env0_0;
binding.set(a0.id, a0);
}
}
function _fun88838(a0, a1) { // fn#88838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:1579, offset: 0x01ff40f3, size: 186 bytes, params: 3, frame: 21
var r6;
var value3;
var value4;
var value5;
var done;
var value7;
var binding;
var value8;
var moduleValue;
var value9;
const property = env1_2[a1];
const items2 = [];
const value2 = null;
if (value2 != items2) {
value3 = environment.__proto__.__proto__;
value4 = _createForOfIteratorHelperLoose_88830(a0.userIds);
value5 = value4();
done = value5.done;
if (!done) {
r6 = value5;
while (true) {
value7 = r6.value;
binding = env0_0;
value8 = binding.get(value7);
if (value2 != value8) {
if (value2 == require) {
break;
}
moduleValue = require(value8);
if (value2 == moduleValue) {
break;
}
items2.push(moduleValue);
break;
}
value9 = value4();
done = value9.done;
if (done) {
break;
}
r6 = value9;
continue;
}
}
}
return value2 == property ? value2 : {embeddedActivity: a0, application: property,
userParticipantAvatarUrls: items2};
}
function _fun88844(a0) { // fn#88844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2414, offset: 0x01ff4325, size: 108 bytes, params: 2, frame: 16
var r3;
var binding;
let value = environment.__proto__.__proto__;
const getEmbeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId;
value = Reflect.apply(getEmbeddedActivityLocationChannelId, value, [a0.embeddedActivity.location]);
if (value != null) {
binding = env0_0;
r3 = binding.get(value) ?? [];
r3.push(a0);
binding = env0_0;
binding.set(value, r3);
}
}
function _fun88847(a0) { // fn#88847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2761, offset: 0x01ff442d, size: 152 bytes, params: 2, frame: 18
var r8;
var environment;
var r2;
var value2;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
const findActivity = PresenceStore.findActivity;
value = undefined;
if (a0 == null) {
r2 = value;
} else {
value2 = a0.embeddedActivity.userIds.values();
r2 = value2.next().value;
r8 = value2;
}
const activity = Reflect.apply(findActivity, PresenceStore, [r2, _fun88848]);
const binding = env0_0;
const set = binding.set;
const id = a0 == null || a0.application == null ? value : a0.application.id;
const object2 = {};
copyDataProperties(object2, a0, r8);
object2['presenceActivity'] = activity;
Reflect.apply(set, binding, [id, object2]);
return value;
}
function _fun88848({application_id}) { // fn#88848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11786:2853, offset: 0x01ff44c5, size: 56 bytes, params: 2, frame: 6
return application_id === (env0_0 == null || env0_0.application == null ? undefined : env0_0.application.id);
}
@@ -0,0 +1,41 @@
/* Metro module 11660; source: modules/activities/useFetchDeveloperActivityShelfItems.tsx; dependencies: [31, 7503, 7858, 3829, 566, 7860, 2] */
function _fun89374(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11846:6, offset: 0x0200bf39, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const developerActivityShelfStore = importDefault(7503) /* metro dependency 7503: DeveloperActivityShelfStore */;
const env0_4 = (require(7503) /* metro dependency 7503: DeveloperActivityShelfStore */).DevShelfFetchState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useFetchDeveloperActivityShelfItems.tsx');
exports.useFetchDeveloperActivityShelfItems = useFetchDeveloperActivityShelfItems;
}
function useFetchDeveloperActivityShelfItems() { // fn#89375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11846:275, offset: 0x0200bfd1, size: 166 bytes, params: 1, frame: 19
const value2 = (require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */).useIsActivitiesEnabledForCurrentPlatform();
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const setting = DeveloperMode.getSetting();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DeveloperActivityShelfStore],
function() {
return DeveloperActivityShelfStore.getFetchState();
}, []);
value4.useEffect(_fun89377, [value2, value4, setting]);
return null;
}
function _fun89377() { // fn#89377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11846:497, offset: 0x0200c08a, size: 80 bytes, params: 1, frame: 11
var value;
let binding = env0_0;
let r0 = binding && env0_1;
if (r0) {
binding = env0_2;
value = environment.__proto__;
value = binding === DevShelfFetchState.INITIALIZED;
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
value.fetchDeveloperApplications();
}
}
@@ -0,0 +1,31 @@
/* Metro module 7857; source: modules/activities/useIsActivitiesAvailableInShelf.tsx; dependencies: [31, 7858, 7859, 7860, 2] */
function _fun62723(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8035:6, offset: 0x01b64d92, size: 119 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useIsActivitiesAvailableInShelf.tsx');
exports.default = useIsActivitiesAvailableInShelf;
}
function useIsActivitiesAvailableInShelf(a0, a1) { // fn#62724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8035:204, offset: 0x01b64e09, size: 143 bytes, params: 3, frame: 17
const env0_0 = a0;
const value2 = (require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */).useIsActivitiesEnabledForCurrentPlatform();
const value3 = (importDefault(7859) /* metro dependency 7859: useIsPrivateChannelWithEnabledActivities */)(a1);
let r0 = a0 != null && a0 !== '';
r0 = !r0 ? value3 : r0;
env0_3.useEffect(_fun62725, [a0, value2, r0]);
r0 = r0 && value2;
return r0;
}
function _fun62725() { // fn#62725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8035:369, offset: 0x01b64e98, size: 67 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_2 && env0_1) {
value2 = environment.__proto__;
moduleValue = require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
moduleValue.fetchShelf({guildId: env0_0});
}
}
@@ -0,0 +1,17 @@
/* Metro module 7858; source: modules/activities/useIsActivitiesEnabledForCurrentPlatform.tsx; dependencies: [4140, 2] */
function _fun62726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8036:6, offset: 0x01b64edb, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const isActivitiesAllowed = function() {
return !require(dependencyMap[0]).isTablet;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useIsActivitiesEnabledForCurrentPlatform.tsx');
exports.useIsActivitiesEnabledForCurrentPlatform = function() {
return isActivitiesAllowed();
};
exports.getIsActivitiesEnabledForCurrentPlatform = function() {
return isActivitiesAllowed();
};
}
@@ -0,0 +1,45 @@
/* Metro module 7724; source: modules/activities/useIsActivityFocused.tsx; dependencies: [4606, 1378, 4610, 566, 2] */
function _fun61782(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7902:6, offset: 0x01b4a965, size: 143 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = isActivityFocused;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useIsActivityFocused.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([ChannelRTCStore, EmbeddedActivitiesStore], _fun61785);
};
exports.isActivityFocused = closure;
}
function isActivityFocused({channelId, ChannelRTCStore, EmbeddedActivitiesStore}) { // fn#61783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7902:116, offset: 0x01b4a9f4, size: 133 bytes, params: 2, frame: 17
var id;
var moduleValue;
let value = ChannelRTCStore.getSelectedParticipant(channelId);
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
let r0 = value != null && currentEmbeddedActivity != null;
if (r0) {
id = value.id;
value = undefined;
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
value = id === moduleValue.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
instanceId: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.compositeInstanceId});
r0 = value;
}
return r0;
}
function useIsActivityFocused(a0) { // fn#61784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7902:510, offset: 0x01b4aa79, size: 72 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
EmbeddedActivitiesStore], _fun61785);
}
function _fun61785() { // fn#61785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7902:584, offset: 0x01b4aac1, size: 47 bytes, params: 1, frame: 12
return isActivityFocused({channelId: env0_0, ChannelRTCStore: ChannelRTCStore,
EmbeddedActivitiesStore: EmbeddedActivitiesStore});
}
@@ -0,0 +1,254 @@
/* Metro module 11326; source: modules/activities/useSubscribeMissingActivities.tsx; dependencies: [57, 31, 11327, 4396, 566, 11329, 2] */
function _fun86455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:6, offset: 0x01f95348, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_86458 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
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 */;
const presenceSubscriptionsStore = importDefault(11327) /* metro dependency 11327: PresenceSubscriptionsStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_6 = [];
const env0_7 = [];
const env0_8 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/useSubscribeMissingActivities.tsx');
exports.default = useSubscribeMissingActivities;
}
function _createForOfIteratorHelperLoose_86456(a0, a1) { // fn#86456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:141, offset: 0x01f95426, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun86457;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_86458(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_86458(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_86458(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun86457;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useMissingActivities(a0, a1) { // fn#86459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1070, offset: 0x01f9559a, size: 197 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
let binding = env0_3;
let useMemo = binding.useMemo;
const value3 = env0_2(Reflect.apply(useMemo, binding, [_fun86460, [a0, a1]]), 2);
const property = value3[0];
const property2 = value3[1];
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([PresenceStore], _fun86464,
[property]);
var env0_3 = value4;
binding = env0_3;
useMemo = binding.useMemo;
return [property2, Reflect.apply(useMemo, binding, [_fun86467, [property, value4]])];
}
function useSubscribeMissingActivities(a0, a1) { // fn#86470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:2198, offset: 0x01f958df, size: 97 bytes, params: 3, frame: 16
const value3 = env0_2(useMissingActivities(a0, a1), 2);
const property = value3[0];
const property2 = value3[1];
env0_3.useEffect(_fun86471, [property2]);
return [property, property2];
}
function _fun86460() { // fn#86460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1122, offset: 0x01f9565f, size: 30 bytes, params: 1, frame: 13
return getMessagesWithActivities(env0_0, require);
}
function _fun86464() { // fn#86464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1434, offset: 0x01f95715, size: 36 bytes, params: 1, frame: 12
env0_2.forEach(_fun86465);
return [];
}
function _fun86467() { // fn#86467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1708, offset: 0x01f957eb, size: 30 bytes, params: 1, frame: 13
return makeActivitySubscriptions(env0_2, env0_3);
}
function _fun86471() { // fn#86471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:2317, offset: 0x01f95940, size: 104 bytes, params: 1, frame: 16
var r2;
var value5;
var isSubscribed;
var moduleValue;
var value6;
const value3 = _createForOfIteratorHelperLoose_86456(env0_0);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
isSubscribed = PresenceSubscriptionsStore.isSubscribed;
if (!Reflect.apply(isSubscribed, PresenceSubscriptionsStore, [value5])) {
moduleValue = require(11329) /* metro dependency 11329: PresenceSubscriptionsActionCreators */;
moduleValue.subscribe(value5);
}
value6 = value3();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
}
}
function getMessagesWithActivities(a0, a1) { // fn#86461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1126, offset: 0x01f9567d, size: 94 bytes, params: 3, frame: 13
var environment;
var value;
if (a1.isPrivate()) {
value = a0.filter(function(a0) {
var property = a0.application;
var value = undefined;
return (property == null ? value : property.id) != null && (a0.activity == null ? value : a0.activity.party_id) != null;
});
return [value, value.map(_fun86463)];
}
value = environment.__proto__.__proto__;
return [env2_8, env2_7];
}
function _fun86465(a0) { // fn#86465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1466, offset: 0x01f95739, size: 83 bytes, params: 2, frame: 18
var binding;
if (PresenceStore.findActivity(a0.author.id, _fun86466, null, true) != null) {
binding = a0;
binding.push(a0.id);
}
}
function makeActivitySubscriptions(a0, a1) { // fn#86468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1712, offset: 0x01f95809, size: 59 bytes, params: 3, frame: 12
var environment;
var value;
const env0_0 = a1;
if (a0.length === 0) {
value = environment.__proto__.__proto__;
return env2_6;
}
a0.forEach(_fun86469);
return [];
}
function _fun86466(a0) { // fn#86466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1504, offset: 0x01f9578c, size: 95 bytes, params: 2, frame: 8
const application_id = a0.application_id;
const application = env0_0.application;
const value2 = undefined;
return application_id === (application == null ? value2 : application.id) && (a0.party == null ? value2 : a0.party.id) === (env0_0.activity == null ? value2 : env0_0.activity.party_id);
}
function _fun86469(a0) { // fn#86469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11512:1804, offset: 0x01f95844, size: 155 bytes, params: 2, frame: 16
var time;
var object2;
const application = a0.application;
const value = undefined;
let id = application == null ? value : application.id;
const activity = a0.activity;
const party_id = activity == null ? value : activity.party_id;
if (!(a0.id in require)) {
if (id != null) {
if (party_id != null) {
time = a0.timestamp.getTime();
object2 = {};
object2.userId = a0.author.id;
object2.applicationId = id;
object2.partyId = party_id;
id = a0.id;
object2.messageId = id;
object2.channelId = a0.channel_id;
object2.inviteTime = time;
env0_1.push(object2);
}
}
}
return value;
}
@@ -0,0 +1,57 @@
/* Metro module 6884; source: modules/activities/utils/ActivityFlagUtils.tsx; dependencies: [661, 3829, 587, 1391, 6885, 2] */
function _fun54659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7062:6, offset: 0x0136b2cc, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.ActivityFlags;
const env0_4 = constantsModule.ActivityPartyPrivacy;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/ActivityFlagUtils.tsx');
exports.computeActivityFlags = computeActivityFlags;
exports.isContextlessEmbeddedActivity = isContextlessEmbeddedActivity;
}
function _computeActivityPartyPrivacyFlags(a0) { // fn#54660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7062:149, offset: 0x0136b364, size: 123 bytes, params: 2, frame: 16
const AllowActivityPartyPrivacyFriends = (require(3829) /* metro dependency 3829: UserSettings */).AllowActivityPartyPrivacyFriends;
const setting = AllowActivityPartyPrivacyFriends.getSetting();
const AllowActivityPartyPrivacyVoiceChannel = (require(3829) /* metro dependency 3829: UserSettings */).AllowActivityPartyPrivacyVoiceChannel;
const setting2 = AllowActivityPartyPrivacyVoiceChannel.getSetting();
const PARTY_PRIVACY_FRIENDS = ActivityFlags.PARTY_PRIVACY_FRIENDS;
const r2 = setting ? a0 | PARTY_PRIVACY_FRIENDS : a0 & ~PARTY_PRIVACY_FRIENDS;
const PARTY_PRIVACY_VOICE_CHANNEL = ActivityFlags.PARTY_PRIVACY_VOICE_CHANNEL;
return setting2 ? r2 | PARTY_PRIVACY_VOICE_CHANNEL : r2 & ~PARTY_PRIVACY_VOICE_CHANNEL;
}
function computeActivityFlags({secrets}) { // fn#54661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7062:554, offset: 0x0136b3df, size: 257 bytes, params: 2, frame: 17
var value8;
const value = a1;
const value2 = a2;
const value3 = a3;
const value4 = a4;
let r4 = value !== undefined ? value : false;
let r0 = value2 !== undefined ? value2 : false;
const r1 = value3 !== undefined ? value3 : false;
let r2 = value4 !== undefined ? value4 : ActivityPartyPrivacy.PRIVATE;
const r6 = r4 ? ActivityFlags.INSTANCE | 0 : 0;
const r5 = secrets?.join == null ? r6 : r6 | ActivityFlags.JOIN;
r4 = r1 ? r5 | ActivityFlags.CONTEXTLESS : r5;
if (r0) {
value8 = r4 | ActivityFlags.EMBEDDED;
r0 = value8 | _computeActivityPartyPrivacyFlags(value8);
} else {
r2 = r2 === ActivityPartyPrivacy.PUBLIC || (require(587) /* metro dependency 587: Storage */).Storage.get('ACTIVITIES_FORCE_PUBLIC');
r0 = r2 ? r4 | _computeActivityPartyPrivacyFlags(r4) : r4;
}
return r0;
}
function isContextlessEmbeddedActivity(a0) { // fn#54662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7062:926, offset: 0x0136b4e0, size: 108 bytes, params: 2, frame: 17
const value2 = undefined;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r4 = (a0 == null ? value2 : a0.flags) ?? 0;
const CONTEXTLESS = ActivityFlags.CONTEXTLESS;
return Reflect.apply(hasFlag, flagUtilsModule, [r4,
CONTEXTLESS]) && (importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(a0);
}
@@ -0,0 +1,218 @@
/* Metro module 9468; source: modules/activities/utils/CustomActivityLinkUtils.tsx; dependencies: [5, 9469, 661, 9471, 507, 694, 2] */
function _fun73625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:6, offset: 0x01d73770, size: 283 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = function() {
return _fetchCustomActivityLink.apply(this, arguments);
};
const closure2 = function() {
return _loadCustomActivityLink.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const customActivityLinksStore = importDefault(9469) /* metro dependency 9469: CustomActivityLinksStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const Set = global.Set;
const set = new Set();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/CustomActivityLinkUtils.tsx');
exports.fetchCustomActivityLink = closure;
exports.getCustomActivityLinkParams = function() {
return _getCustomActivityLinkParams.apply(this, arguments);
};
exports.getQuickLinkImage = function(a0) {
if (a0 != null) {
return '' + global.location.protocol + '//' + global.window.GLOBAL_ENV.CDN_HOST + '/attachments-quick-links/' + a0;
}
};
exports.loadCustomActivityLink = closure2;
exports.getOrFetchCustomActivityLink = getOrFetchCustomActivityLink;
}
function _fetchCustomActivityLink() { // fn#73627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:225, offset: 0x01d7388b, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73629).apply(this, arguments);
}
function _getCustomActivityLinkParams() { // fn#73630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:779, offset: 0x01d73a22, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73632).apply(this, arguments);
}
function _loadCustomActivityLink() { // fn#73634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:1206, offset: 0x01d73aef, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73636).apply(this, arguments);
}
function getOrFetchCustomActivityLink(a0, a1) { // fn#73639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:2089, offset: 0x01d73c28, size: 82 bytes, params: 3, frame: 16
var r0;
var binding;
const one = CustomActivityLinksStore.getOne(a0, a1);
const value3 = null;
if (value3 != one) {
r0 = one;
} else {
binding = env0_6;
if (binding.has(a1)) {
r0 = value3;
} else {
loadCustomActivityLink(a0, a1);
env0_6.add(a1);
r0 = value3;
}
}
return r0;
}
function* _fun73629(a0, a1) { // fn#73629, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:296, offset: 0x01d738c8, size: 346 bytes, params: 3, frame: 21
var HTTP;
var get;
let value = undefined;
if (false) {
return value;
}
if (a0 != null) {
if (a1 == null) {
return null;
}
value = environment.__proto__.__proto__;
var binding = env2_0;
var value4 = binding(env2_2[3]).decodeCustomActivityLink(a1);
if (value4 == null) {
return null;
}
var type = value4.type;
binding = env2_0;
var CustomLinkType = binding(env2_2[3]).CustomLinkType;
var MANAGED = CustomLinkType.MANAGED;
if (MANAGED === type) {
binding = env2_0;
HTTP = binding(env2_2[4]).HTTP;
get = HTTP.get;
binding = env2_5;
yield Reflect.apply(get, HTTP, [{url: binding.APPLICATION_MANAGED_ACTIVITY_LINK(a0, value4.decodedLinkId),
rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
binding = env2_0;
CustomLinkType = binding(env2_2[3]).CustomLinkType;
var QUICK = CustomLinkType.QUICK;
if (QUICK === type) {
binding = env2_0;
HTTP = binding(env2_2[4]).HTTP;
get = HTTP.get;
binding = env2_5;
yield Reflect.apply(get, HTTP, [{url: binding.APPLICATION_QUICK_ACTIVITY_LINK(a0, value4.decodedLinkId),
rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
value4.type;
}
return null;
}
function* _fun73632(a0, a1, a2) { // fn#73632, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:858, offset: 0x01d73a5f, size: 144 bytes, params: 4, frame: 18
var r4;
var binding;
var value5;
var value6;
var object2;
var custom_id;
var error;
let value = a2;
if (false) {
return undefined;
}
const value4 = undefined;
const r2 = value ?? value4;
if (a1 == null) {
return {customId: r2};
}
if (r2 != null) {
return {customId: r2};
}
value = environment.__proto__.__proto__;
try {
binding = env2_7;
} catch (error) {
return {customId: value4};
}
try {
value = binding(a0, a1);
} catch (error) {
return {customId: value4};
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
return {customId: value4};
}
if (value5) {
return value;
}
try {
value6 = value == null;
} catch (error) {
return {customId: value4};
}
if (value6) {
try {
object2 = {};
} catch (error) {
return {customId: value4};
}
try {
object2.customId = value4;
} catch (error) {
return {customId: value4};
}
r4 = object2;
} else {
try {
object2 = {};
} catch (error) {
return {customId: value4};
}
try {
custom_id = value.custom_id;
} catch (error) {
return {customId: value4};
}
try {
object2.customId = custom_id;
} catch (error) {
return {customId: value4};
}
r4 = object2;
}
return r4;
}
function* _fun73636(a0, a1) { // fn#73636, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9654:1275, offset: 0x01d73b2c, size: 171 bytes, params: 3, frame: 17
if (true) {
if (a0 == null) {
return global.Promise.reject('appId or linkId null');
}
if (a1 == null) {
return global.Promise.reject('appId or linkId null');
}
value = environment.__proto__.__proto__;
yield env2_7(a0, a1);
var value3 = undefined;
if (false) {
return value3;
}
if (value3 == null) {
return global.Promise.reject('fetchCustomActivityLink body is null');
}
value = env2_1(env2_2[5]);
value.dispatch({type: 'CUSTOM_ACTIVITY_LINK_FETCH_SUCCESS', applicationId: a0, link: value3});
}
}
@@ -0,0 +1,123 @@
/* Metro module 10586; source: modules/activities/utils/InviteEmbedTextUtils.tsx; dependencies: [1878, 661, 1244, 2678, 4617, 2] */
function _fun81670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:6, offset: 0x01ed9388, size: 202 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = getRequestToStreamText;
const closure2 = getAskToJoinText;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ActivityActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/InviteEmbedTextUtils.tsx');
exports.getHeaderText = getHeaderText_81673;
exports.getRequestToStreamText = closure;
exports.getAskToJoinText = closure2;
exports.getDeadGameInviteText = getDeadGameInviteText;
exports.getPartyText = getPartyText;
}
function getRequestToStreamText(a0, a1, a2) { // fn#81671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:136, offset: 0x01ed9452, size: 205 bytes, params: 4, frame: 20
var r0;
var value;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var property;
if (a0.author.id === a2) {
r0 = intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */)['8B3U5O']);
} else {
formatToPlainString = intl.formatToPlainString;
property = (importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */)['d/qbC0'];
value = require(4617) /* metro dependency 4617: NicknameUtils */;
value = Reflect.apply(formatToPlainString, intl, [property, {username: value.getName(a1.guild_id, a1.id,
a0.author)}]);
r0 = value;
}
return r0;
}
function getAskToJoinText(a0, a1, a2, a3, a4) { // fn#81672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:342, offset: 0x01ed951f, size: 425 bytes, params: 6, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value2;
if (a0.author.id === a3) {
if (a2.isPrivate()) {
value2 = UserStore.getUser(a2.getRecipientId());
if (value2 != null) {
formatToPlainString = intl.formatToPlainString;
return a4 ? Reflect.apply(formatToPlainString, intl, [t.JddpN2, {username: value2.globalName,
appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.gYVkSW, {username: value2.globalName,
appName: a1}]);
}
formatToPlainString = intl.formatToPlainString;
return a4 ? Reflect.apply(formatToPlainString, intl, [t['2N1kNS'],
{appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]);
}
formatToPlainString = intl.formatToPlainString;
return a4 ? Reflect.apply(formatToPlainString, intl, [t['2N1kNS'],
{appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]);
}
formatToPlainString = intl.formatToPlainString;
return a4 ? Reflect.apply(formatToPlainString, intl, [t.XE8axA, {username: a0.author.globalName,
appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.hgcjOn, {username: a0.author.globalName,
appName: a1}]);
}
function getHeaderText_81673(a0, a1, a2) { // fn#81673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1073, offset: 0x01ed96c8, size: 411 bytes, params: 4, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const LISTEN = ActivityActionTypes.LISTEN;
if (LISTEN === a1) {
return intl.formatToPlainString(t['/8czH4'], {name: a0});
}
const WATCH = ActivityActionTypes.WATCH;
if (WATCH === a1) {
return intl.formatToPlainString(t.BBJXVk, {name: a0});
}
const JOIN = ActivityActionTypes.JOIN;
if (JOIN === a1) {
return a2 ? undefined : intl.string(t.pkq6Vq);
}
const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST;
if (STREAM_REQUEST === a1) {
return intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */).DKHhec);
}
ActivityActionTypes.JOIN_REQUEST;
const string = intl.string;
const Ckxb6j = t.Ckxb6j;
return Reflect.apply(string, intl, [Ckxb6j]);
}
function getDeadGameInviteText(a0, a1, a2, a3, a4) { // fn#81674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1591, offset: 0x01ed9863, size: 224 bytes, params: 6, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const type = a0.activity?.type;
const LISTEN = ActivityActionTypes.LISTEN;
if (LISTEN === type) {
return intl.string(a4 ? t.x1UXGR : t['Ek+51n']);
}
const WATCH = ActivityActionTypes.WATCH;
if (WATCH === type) {
return intl.string(a4 ? t.x1UXGR : t['Ek+51n']);
}
const JOIN = ActivityActionTypes.JOIN;
if (JOIN === type) {
return intl.string(a4 ? t.x1UXGR : t['Ek+51n']);
}
const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST;
if (STREAM_REQUEST === type) {
return getRequestToStreamText(a0, a2, a3);
}
ActivityActionTypes.JOIN_REQUEST;
return getAskToJoinText(a0, a1, a2, a3, true);
}
function getPartyText({activityActionType, maxPartySize, partySize}) { // fn#81675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1928, offset: 0x01ed9943, size: 369 bytes, params: 2, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST;
return activityActionType === STREAM_REQUEST ? '' : activityActionType === ActivityActionTypes.LISTEN ? maxPartySize > 0 ? intl.formatToPlainString(t.Zogoou,
{partySize: partySize, maxPartySize: maxPartySize}) : intl.formatToPlainString(t.UGei0j,
{partySize: partySize}) : maxPartySize > 0 ? intl.formatToPlainString(t.gLu7NU, {partySize: partySize,
maxPartySize: maxPartySize}) : intl.formatToPlainString(t['65JnWC'], {partySize: partySize});
}
@@ -0,0 +1,257 @@
/* Metro module 8103; source: modules/activities/utils/activityLaunchErrorUtils.tsx; dependencies: [5, 7503, 661, 1244, 8104, 3829, 7860, 8059, 8056, 2] */
function _fun64962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8288:6, offset: 0x01bbad9a, size: 238 bytes, params: 8, frame: 20
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 developerActivityShelfStore = importDefault(7503) /* metro dependency 7503: DeveloperActivityShelfStore */;
const env0_5 = (require(7503) /* metro dependency 7503: DeveloperActivityShelfStore */).DevShelfFetchState;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
object2 = {ClientError: 0};
object2[0] = 'ClientError';
object2.CallbackError = 1;
object2[1] = 'CallbackError';
object2.ApiError = 2;
object2[2] = 'ApiError';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/activityLaunchErrorUtils.tsx');
exports.ActivityLaunchFailErrorType = object2;
exports.getActivityLaunchErrorInfo = function() {
return _getActivityLaunchErrorInfo.apply(this, arguments);
};
}
function _getActivityLaunchErrorInfo() { // fn#64963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8288:291, offset: 0x01bbae88, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun64965).apply(this, arguments);
}
function* _fun64965(a0, a1) { // fn#64965, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8288:368, offset: 0x01bbaec1, size: 1281 bytes, params: 3, frame: 29
var r1;
var r3;
var r4;
var r5;
var r6;
var ApiError;
var status;
var code;
var code2;
var binding3;
var binding4;
var binding5;
var binding6;
var binding7;
var binding8;
var binding9;
var CallbackError;
var reason;
var ClientError;
var fetchState;
var value9;
var reason3;
var detailCode;
var binding10;
var binding11;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const binding2 = env2_2;
const value3 = undefined;
let intl = binding(binding2[3]).intl;
const value4 = intl.string(binding(binding2[3]).t['IOy+I5']);
binding = env2_1;
if (a0 instanceof binding(binding2[4])) {
ClientError = env2_7.ClientError;
reason = a0.reason;
binding = env2_4;
fetchState = binding.getFetchState();
binding = env2_0;
if (binding(env2_2[5]).DeveloperMode.getSetting() && fetchState !== env2_5.LOADED) {
binding = env2_0;
value9 = binding(env2_2[6]);
yield value9.fetchDeveloperApplications();
if (false) {
return undefined;
}
reason3 = a0.reason;
binding = env2_1;
if (binding(env2_2[4]).Reasons.PRIMARY_APP_COMMAND_NOT_FOUND === reason3) {
binding = env2_4;
if (binding.inDevModeForApplication(a1)) {
binding = env2_0;
binding11 = env2_2;
intl = binding(binding11[3]).intl;
value = intl.string(binding(binding11[3]).t.hXRXfz);
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value;
} else {
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value4;
}
} else {
binding = env2_1;
if (binding(env2_2[4]).Reasons.INVALID_CHANNEL === reason3) {
binding = env2_0;
binding10 = env2_2;
intl = binding(binding10[3]).intl;
value = intl.string(binding(binding10[3]).t.j29zCr);
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value;
} else if (env2_1(env2_2[4]).Reasons.LEGACY_LAUNCH_CLIENT_VALIDATION_FAILED !== reason3) {
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value4;
} else {
detailCode = a0.detailCode;
r3 = reason;
r4 = detailCode;
r5 = ClientError;
r6 = value4;
}
}
return {message: r6, errorType: r5, errorStatus: r4, errorCode: r3};
}
reason3 = a0.reason;
binding = env2_1;
if (binding(env2_2[4]).Reasons.PRIMARY_APP_COMMAND_NOT_FOUND === reason3) {
binding = env2_4;
if (binding.inDevModeForApplication(a1)) {
binding = env2_0;
binding11 = env2_2;
intl = binding(binding11[3]).intl;
value = intl.string(binding(binding11[3]).t.hXRXfz);
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value;
} else {
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value4;
}
} else {
binding = env2_1;
if (binding(env2_2[4]).Reasons.INVALID_CHANNEL === reason3) {
binding = env2_0;
binding10 = env2_2;
intl = binding(binding10[3]).intl;
value = intl.string(binding(binding10[3]).t.j29zCr);
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value;
} else if (env2_1(env2_2[4]).Reasons.LEGACY_LAUNCH_CLIENT_VALIDATION_FAILED !== reason3) {
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value4;
} else {
detailCode = a0.detailCode;
r3 = reason;
r4 = detailCode;
r5 = ClientError;
r6 = value4;
}
}
} else {
var value5 = a0 instanceof env2_1(env2_2[7]);
binding = env2_7;
if (value5) {
CallbackError = binding.CallbackError;
reason = a0.reason;
binding = env2_0;
value = binding(env2_2[8]);
value = value.interactionCallbackErrorReason(a0.reason, a1);
r1 = value ?? value4;
r3 = reason;
r4 = value3;
r5 = CallbackError;
r6 = r1;
} else {
ApiError = binding.ApiError;
status = a0.status;
code = a0.code;
code2 = a0.code;
if (env2_6.INVALID_ACTIVITY_LAUNCH_NO_ACCESS === code2) {
binding = env2_0;
binding9 = env2_2;
intl = binding(binding9[3]).intl;
value = intl.string(binding(binding9[3]).t.GyzcrS);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
} else if (env2_6.INVALID_ACTIVITY_LAUNCH_PREMIUM_TIER === code2) {
binding = env2_0;
binding8 = env2_2;
intl = binding(binding8[3]).intl;
value = intl.string(binding(binding8[3]).t.zxv7EF);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
} else if (env2_6.INVALID_PERMISSIONS === code2) {
binding = env2_0;
binding7 = env2_2;
intl = binding(binding7[3]).intl;
value = intl.string(binding(binding7[3]).t.hHGrWz);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
} else if (env2_6.INVALID_ACTIVITY_LAUNCH_AFK_CHANNEL === code2) {
binding = env2_0;
binding6 = env2_2;
intl = binding(binding6[3]).intl;
value = intl.string(binding(binding6[3]).t.j29zCr);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
} else if (env2_6.INVALID_ACTIVITY_LAUNCH_AGE_GATED === code2) {
binding = env2_0;
binding5 = env2_2;
intl = binding(binding5[3]).intl;
value = intl.string(binding(binding5[3]).t['4WuFRE']);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
} else if (env2_6.INVALID_ACTIVITY_LAUNCH_DEV_PREVIEW_GUILD_SIZE === code2) {
binding = env2_0;
binding4 = env2_2;
intl = binding(binding4[3]).intl;
value = intl.string(binding(binding4[3]).t.RvkXdb);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
} else if (env2_6.ACTIVITY_CONFIGURATION_DOES_NOT_SUPPORT_PLATFORM !== code2) {
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value4;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[3]).intl;
value = intl.string(binding(binding3[3]).t.uGDCcw);
r3 = code;
r4 = status;
r5 = ApiError;
r6 = value;
}
}
}
return {message: r6, errorType: r5, errorStatus: r4, errorCode: r3};
}
@@ -0,0 +1,42 @@
/* Metro module 13035; source: modules/activities/utils/activityShareLink.tsx; dependencies: [4096, 1471, 1244, 2] */
function _fun99503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13225:6, offset: 0x021cb438, size: 132 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = [(require(4096) /* metro dependency 4096: findCodedLinks */).parseQuestsEmbedCode];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/activityShareLink.tsx');
exports.resolveActivityShareMessageContent = resolveActivityShareMessageContent;
}
function resolveActivityShareMessageContent(a0, a1, a2) { // fn#99504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13225:246, offset: 0x021cb4bc, size: 185 bytes, params: 4, frame: 18
var r0;
var intl;
const env0_0 = false;
const replaceAll = a0.replaceAll;
var value;
const URL_REGEX = (importDefault(1471) /* metro dependency 1471: URLUtils */).URL_REGEX;
const value2 = Reflect.apply(replaceAll, a0, [URL_REGEX, _fun99505]);
if (env0_0) {
r0 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.formatToMarkdownString((require(1244) /* metro dependency 1244: indexNative */).t.dZJpdG,
{applicationName: a1.name, link: a2});
value = '' + value2 + '\n\n' + value;
r0 = value;
}
return r0;
}
function _fun99505(a0) { // fn#99505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13225:340, offset: 0x021cb575, size: 77 bytes, params: 2, frame: 13
const value = a0;
const value3 = env1_3.some(_fun99506);
if (value3) {
}
return value3 ? value : '`' + value + '`';
}
function _fun99506(a0) { // fn#99506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13225:358, offset: 0x021cb5c2, size: 25 bytes, params: 2, frame: 11
return a0(env0_0) != null;
}
@@ -0,0 +1,46 @@
/* Metro module 10716; source: modules/activities/utils/allowPopups.tsx; dependencies: [4237, 2] */
function _fun82346(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10902:6, offset: 0x01ef3d9c, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4237) /* metro dependency 4237: Constants */).APPLICATIONS_WITH_ALLOWED_POPUPS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/allowPopups.tsx');
exports.allowPopups = allowPopups;
}
function allowPopups(a0) { // fn#82347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10902:227, offset: 0x01ef3e09, size: 129 bytes, params: 2, frame: 16
var r2;
var r1;
var r0;
var embedded_activity_config;
var embeddedActivityConfig;
let value = a0 != null;
if (value) {
value = APPLICATIONS_WITH_ALLOWED_POPUPS.has(a0.id);
if (value) {
r1 = !!value;
} else {
if ('embeddedActivityConfig' in a0) {
embeddedActivityConfig = a0.embeddedActivityConfig;
value = undefined;
value = (embeddedActivityConfig == null ? value : embeddedActivityConfig.displays_advertisements) === true;
r2 = value;
} else {
value = 'embedded_activity_config' in a0;
if (value) {
embedded_activity_config = a0.embedded_activity_config;
value = undefined;
value = (embedded_activity_config == null ? value : embedded_activity_config.displays_advertisements) === true;
r2 = value;
} else {
r2 = value;
}
}
r1 = r2;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
@@ -0,0 +1,17 @@
/* Metro module 10654; source: modules/activities/utils/closeCustomKeyboard.native.tsx; dependencies: [4015, 2] */
function _fun81952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10840:6, offset: 0x01ee5642, size: 96 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/activities/utils/closeCustomKeyboard.native.tsx');
exports.default = closeCustomKeyboard;
}
function closeCustomKeyboard(a0) { // fn#81953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10840:191, offset: 0x01ee56a2, size: 56 bytes, params: 2, frame: 12
let value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInputForChannelId(a0);
if (value != null) {
value.closeCustomKeyboard();
}
}
@@ -0,0 +1,499 @@
/* Metro module 10646; source: modules/activities/utils/confirmActivityLaunchChecks.tsx; dependencies: [5, 1379, 1378, 661, 9473, 10647, 694, 4131, 3774, 10648, 8091, 10649, 7504, 10651, 2] */
function _fun81895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:6, offset: 0x01ee3185, size: 238 bytes, params: 8, frame: 19
const env0_0 = require;
const getOrFetchApplicationForLaunch = function() {
return _getOrFetchApplicationForLaunch.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ApplicationFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/confirmActivityLaunchChecks.tsx');
exports.confirmActivityLaunchChecks = function() {
return _confirmActivityLaunchChecks.apply(this, arguments);
};
}
function _getOrFetchApplicationForLaunch() { // fn#81897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:258, offset: 0x01ee3273, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun81899).apply(this, arguments);
}
function _confirmActivityChange() { // fn#81900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:754, offset: 0x01ee340b, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun81902).apply(this, arguments);
}
function _confirmActivityAgeGate() { // fn#81906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1344, offset: 0x01ee35f7, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun81908).apply(this, arguments);
}
function _confirmExternalAppLaunch() { // fn#81912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2013, offset: 0x01ee37d9, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun81914).apply(this, arguments);
}
function _confirmActivityLaunchChecks() { // fn#81918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2622, offset: 0x01ee39bb, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun81920).apply(this, arguments);
}
async function _fun81899({applicationId, channelId, guildId}) { // fn#81899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:343, offset: 0x01ee32b9, size: 338 bytes, params: 2, frame: 23
var r3;
var r11;
var r9;
var binding;
var binding2;
var property;
var value4;
var value5;
var value6;
var value7;
var error;
var value8;
var EmbeddedActivityLocationKind;
var PRIVATE_CHANNEL;
var GUILD_CHANNEL;
var value9;
var dispatch;
var object2;
var APIError;
var prototype;
var aPIError;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
value8 = null;
if (value8 != guildId) {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
r3 = GUILD_CHANNEL;
} else {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
PRIVATE_CHANNEL = EmbeddedActivityLocationKind.PRIVATE_CHANNEL;
r3 = PRIVATE_CHANNEL;
}
binding = env2_1;
value9 = binding(env2_2[6]);
dispatch = value9.dispatch;
object2 = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object2.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object2.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object2.guildId = r9;
binding = env2_0;
APIError = binding(env2_2[7]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
object2.error = value;
object2.locationKind = r3;
Reflect.apply(dispatch, value9, [object2]);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
value8 = null;
if (value8 != guildId) {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
r3 = GUILD_CHANNEL;
} else {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
PRIVATE_CHANNEL = EmbeddedActivityLocationKind.PRIVATE_CHANNEL;
r3 = PRIVATE_CHANNEL;
}
binding = env2_1;
value9 = binding(env2_2[6]);
dispatch = value9.dispatch;
object2 = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object2.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object2.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object2.guildId = r9;
binding = env2_0;
APIError = binding(env2_2[7]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
object2.error = value;
object2.locationKind = r3;
Reflect.apply(dispatch, value9, [object2]);
return undefined;
}
try {
property = binding2[4];
} catch (error) {
value8 = null;
if (value8 != guildId) {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
r3 = GUILD_CHANNEL;
} else {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
PRIVATE_CHANNEL = EmbeddedActivityLocationKind.PRIVATE_CHANNEL;
r3 = PRIVATE_CHANNEL;
}
binding = env2_1;
value9 = binding(env2_2[6]);
dispatch = value9.dispatch;
object2 = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object2.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object2.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object2.guildId = r9;
binding = env2_0;
APIError = binding(env2_2[7]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
object2.error = value;
object2.locationKind = r3;
Reflect.apply(dispatch, value9, [object2]);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
value8 = null;
if (value8 != guildId) {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
r3 = GUILD_CHANNEL;
} else {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
PRIVATE_CHANNEL = EmbeddedActivityLocationKind.PRIVATE_CHANNEL;
r3 = PRIVATE_CHANNEL;
}
binding = env2_1;
value9 = binding(env2_2[6]);
dispatch = value9.dispatch;
object2 = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object2.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object2.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object2.guildId = r9;
binding = env2_0;
APIError = binding(env2_2[7]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
object2.error = value;
object2.locationKind = r3;
Reflect.apply(dispatch, value9, [object2]);
return undefined;
}
try {
value5 = value4(applicationId, channelId);
} catch (error) {
value8 = null;
if (value8 != guildId) {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
r3 = GUILD_CHANNEL;
} else {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
PRIVATE_CHANNEL = EmbeddedActivityLocationKind.PRIVATE_CHANNEL;
r3 = PRIVATE_CHANNEL;
}
binding = env2_1;
value9 = binding(env2_2[6]);
dispatch = value9.dispatch;
object2 = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object2.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object2.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object2.guildId = r9;
binding = env2_0;
APIError = binding(env2_2[7]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
object2.error = value;
object2.locationKind = r3;
Reflect.apply(dispatch, value9, [object2]);
return undefined;
}
await value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
value8 = null;
if (value8 != guildId) {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
r3 = GUILD_CHANNEL;
} else {
EmbeddedActivityLocationKind = env2_0(env2_2[5]).EmbeddedActivityLocationKind;
PRIVATE_CHANNEL = EmbeddedActivityLocationKind.PRIVATE_CHANNEL;
r3 = PRIVATE_CHANNEL;
}
binding = env2_1;
value9 = binding(env2_2[6]);
dispatch = value9.dispatch;
object2 = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object2.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object2.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object2.guildId = r9;
binding = env2_0;
APIError = binding(env2_2[7]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
object2.error = value;
object2.locationKind = r3;
Reflect.apply(dispatch, value9, [object2]);
return undefined;
}
return value7 ? value6 : value6;
}
async function _fun81902({currentEmbeddedApplication, shouldClosePopoutOnLeaveCurrentEmbeddedApplication, onConfirmActivityLaunchChecksAlertOpen}) { // fn#81902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:821, offset: 0x01ee3451, size: 127 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
if (currentEmbeddedApplication == null) {
return true;
}
const Promise = global.Promise;
let promise = new Promise(_fun81903);
await promise;
promise = undefined;
if (false) {
return promise;
}
if (promise) {
return true;
}
return false;
}
async function _fun81908({application, applicationId, channel, user, onConfirmActivityLaunchChecksAlertOpen}) { // fn#81908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1413, offset: 0x01ee363d, size: 282 bytes, params: 2, frame: 19
var r5;
var requires_age_gate;
var embeddedActivityConfig;
var promise;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
if (user.nsfwAllowed == null) {
if (application != null) {
r5 = application;
if (r5 == null) {
return false;
}
embeddedActivityConfig = r5.embeddedActivityConfig;
requires_age_gate = embeddedActivityConfig == null ? value : embeddedActivityConfig.requires_age_gate;
if (requires_age_gate == null) {
return true;
}
if (requires_age_gate) {
promise = new global.Promise(_fun81909);
await promise;
promise = undefined;
if (false) {
return promise;
}
if (promise) {
return true;
}
return false;
}
return true;
}
var binding = env2_7;
var object2 = {applicationId: applicationId};
object2.channelId = channel == null ? value : channel.id;
object2.guildId = (channel == null ? value : channel.getGuildId()) ?? value;
await binding(object2);
var value7 = undefined;
if (false) {
return value7;
}
r5 = value7;
if (r5 == null) {
return false;
}
embeddedActivityConfig = r5.embeddedActivityConfig;
requires_age_gate = embeddedActivityConfig == null ? value : embeddedActivityConfig.requires_age_gate;
if (requires_age_gate == null) {
return true;
}
if (requires_age_gate) {
promise = new global.Promise(_fun81909);
await promise;
promise = undefined;
if (false) {
return promise;
}
if (promise) {
return true;
}
return false;
}
}
return true;
}
async function _fun81914({application, applicationId, channel, onConfirmActivityLaunchChecksAlertOpen}) { // fn#81914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2086, offset: 0x01ee381f, size: 308 bytes, params: 2, frame: 21
var environment;
var r3;
var r6;
var r2;
var binding;
var value9;
var value10;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
if (application != null) {
r3 = application;
value9 = r3 != null;
} else {
binding = env2_7;
var object2 = {applicationId: applicationId};
object2.channelId = channel == null ? value : channel.id;
object2.guildId = (channel == null ? value : channel.getGuildId()) ?? value;
await binding(object2);
if (false) {
return undefined;
}
value9 = null != undefined;
}
if (value9) {
value10 = environment.__proto__.__proto__;
value = env2_0(env2_2[12]);
value = value.hasApplicationFlag(r3, env2_6.EMBEDDED_RELEASED);
r6 = !value && !r3.isVerified;
value = !r6;
if (r6) {
value = env2_5.hasActivityEverBeenLaunched(applicationId);
r3 = value ? !!value : new global.Promise(_fun81915);
} else {
r3 = value;
}
r2 = r3;
} else {
r2 = value9;
}
return r2;
}
function* _fun81920(a0) { // fn#81920, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2701, offset: 0x01ee39f8, size: 155 bytes, params: 2, frame: 15
if (false) {
return undefined;
}
yield confirmActivityChange({currentEmbeddedApplication: a0.currentEmbeddedApplication,
shouldClosePopoutOnLeaveCurrentEmbeddedApplication: a0.shouldClosePopoutOnLeaveCurrentEmbeddedApplication,
onConfirmActivityLaunchChecksAlertOpen: a0.onConfirmActivityLaunchChecksAlertOpen});
if (false) {
return undefined;
}
if (value) {
yield confirmActivityAgeGate(a0);
value = undefined;
if (false) {
return value;
}
if (value) {
yield confirmExternalAppLaunch(a0);
value = undefined;
if (false) {
return value;
}
return !!value;
}
}
return false;
}
function _fun81903(a0) { // fn#81903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:990, offset: 0x01ee34d0, size: 197 bytes, params: 2, frame: 22
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__.__proto__;
let binding = env3_5;
const value4 = binding.getSelfEmbeddedActivities().get(currentEmbeddedApplication.id);
binding = env3_0;
const value5 = undefined;
const value6 = binding(env3_2[8]);
const getEmbeddedActivityLocationChannelId = value6.getEmbeddedActivityLocationChannelId;
const channel = env3_4.getChannel(Reflect.apply(getEmbeddedActivityLocationChannelId, value6,
[value4 == null ? value5 : value4.location]));
if (value4 == null) {
a0(true);
} else if (channel != null) {
if (onConfirmActivityLaunchChecksAlertOpen != null) {
onConfirmActivityLaunchChecksAlertOpen();
}
env3_1(env3_2[9])(currentEmbeddedApplication, channel, _fun81904, _fun81905);
} else {
a0(true);
}
return value5;
}
function _fun81909(a0) { // fn#81909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1825, offset: 0x01ee3757, size: 130 bytes, params: 2, frame: 16
const env0_0 = a0;
if (onConfirmActivityLaunchChecksAlertOpen != null) {
onConfirmActivityLaunchChecksAlertOpen();
}
const binding = env3_0;
const value3 = undefined;
binding(env3_2[11]).confirmActivityAgeGateAlert({application: env0_2,
channelId: channel == null ? value3 : channel.id, onAgree: onAgree, onDisagree: onDisagree_81911});
return value3;
}
function _fun81915(a0) { // fn#81915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2479, offset: 0x01ee3953, size: 104 bytes, params: 2, frame: 14
const env0_0 = a0;
if (onConfirmActivityLaunchChecksAlertOpen != null) {
onConfirmActivityLaunchChecksAlertOpen();
}
const value3 = env3_0(env3_2[13]);
value3.confirmExternalAppLaunchAlert({application: env0_1, onConfirm: onConfirm_81916, onCancel: onCancel_81917});
}
function confirmExternalAppLaunch() { // fn#81923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:3200, offset: 0x01ee3ab1, size: 30 bytes, params: 1, frame: 13
return env3_11.apply(this, arguments);
}
function _fun81904() { // fn#81904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1176, offset: 0x01ee3595, size: 98 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__.__proto__;
env4_1(env4_2[10])().leaveActivity({location: env0_1.location, applicationId: currentEmbeddedApplication.id,
shouldClosePopout: shouldClosePopoutOnLeaveCurrentEmbeddedApplication});
env0_0(true);
}
@@ -0,0 +1,15 @@
/* Metro module 8918; source: modules/activities/utils/deferJoinActivityInChannel.tsx; dependencies: [694, 2] */
function _fun69600(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9103:6, offset: 0x01c780a8, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/deferJoinActivityInChannel.tsx');
exports.default = deferJoinActivityApplication;
}
function deferJoinActivityApplication({channelId, applicationId, intent, inviterUserId, analyticsLocations, commandOrigin}) { // fn#69601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9103:191, offset: 0x01c7810b, size: 113 bytes, params: 2, frame: 19
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'EMBEDDED_ACTIVITY_DEFERRED_OPEN', channelId: channelId, applicationId: applicationId,
intent: intent, inviterUserId: inviterUserId, analyticsLocations: analyticsLocations,
commandOrigin: commandOrigin});
}
@@ -0,0 +1,17 @@
/* Metro module 9962; source: modules/activities/utils/distributorStoreUrls.tsx; dependencies: [2] */
function _fun78000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10148:6, offset: 0x01e1559e, size: 138 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/distributorStoreUrls.tsx');
exports.XBOX_DISCORD_OCID = 'discord7937464';
exports.XBOX_GAME_PASS_STORE_HOSTNAME = 'www.xbox.com';
exports.XBOX_GAME_PASS_PROTOCOL = 'msxbox';
exports.buildXboxGamePassStoreUrl = function(a0) {
return 'https://' + 'www.xbox.com' + '/games/store/title/' + (0,
global.encodeURIComponent)(a0) + '?ocid=' + 'discord7937464';
};
exports.buildXboxGamePassStoreDeepLinkUrl = function(a0) {
return '' + 'msxbox' + '://game/?productid=' + (0, global.encodeURIComponent)(a0) + '&ocid=' + 'discord7937464';
};
}
@@ -0,0 +1,17 @@
/* Metro module 3774; source: modules/activities/utils/embeddedActivityLocationUtils.tsx; dependencies: [2] */
function _fun28574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3901:6, offset: 0x00f7dce9, size: 96 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/embeddedActivityLocationUtils.tsx');
exports.getEmbeddedActivityLocationChannelId = function(a0) {
if (a0 != null) {
return 'channel_id' in a0 ? a0.channel_id : undefined;
}
};
exports.getEmbeddedActivityLocationGuildId = function(a0) {
if (a0 != null) {
return 'guild_id' in a0 ? a0.guild_id : undefined;
}
};
}
@@ -0,0 +1,156 @@
/* Metro module 13031; source: modules/activities/utils/fetchIsLinkTrusted.tsx; dependencies: [5, 661, 507, 2] */
function _fun99475(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13221:6, offset: 0x021ca5c4, size: 147 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(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/fetchIsLinkTrusted.tsx');
exports.fetchIsLinkTrusted = function() {
return _fetchIsLinkTrusted.apply(this, arguments);
};
}
function _fetchIsLinkTrusted() { // fn#99476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13221:126, offset: 0x021ca657, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun99478).apply(this, arguments);
}
function* _fun99478(a0, a1) { // fn#99478, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13221:187, offset: 0x021ca694, size: 170 bytes, params: 3, frame: 17
var binding;
var binding2;
var property;
var value3;
var HTTP;
var get;
var object3;
var ACTIVITIES_TRUSTED_LINKS;
var object4;
var value4;
var body;
var Boolean;
var trusted;
var error;
if (false) {
return undefined;
}
if (a0 === undefined) {
return false;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
return false;
}
try {
binding2 = env2_1;
} catch (error) {
return false;
}
try {
property = binding2[2];
} catch (error) {
return false;
}
try {
value3 = binding(property);
} catch (error) {
return false;
}
try {
HTTP = value3.HTTP;
} catch (error) {
return false;
}
try {
get = HTTP.get;
} catch (error) {
return false;
}
try {
object3 = {};
} catch (error) {
return false;
}
try {
binding = env2_3;
} catch (error) {
return false;
}
try {
ACTIVITIES_TRUSTED_LINKS = binding.ACTIVITIES_TRUSTED_LINKS;
} catch (error) {
return false;
}
try {
value = Reflect.apply(ACTIVITIES_TRUSTED_LINKS, binding, [a0]);
} catch (error) {
return false;
}
try {
object3.url = value;
} catch (error) {
return false;
}
try {
object3.rejectWithError = false;
} catch (error) {
return false;
}
try {
object4 = {};
} catch (error) {
return false;
}
try {
object4.url = a1;
} catch (error) {
return false;
}
try {
object3.query = object4;
} catch (error) {
return false;
}
try {
object3.timeout = 500;
} catch (error) {
return false;
}
try {
value = Reflect.apply(get, HTTP, [object3]);
} catch (error) {
return false;
}
yield value;
try {
value = undefined;
value4 = false;
} catch (error) {
return false;
}
if (!value4) {
try {
body = value.body;
} catch (error) {
return false;
}
try {
Boolean = global.Boolean;
} catch (error) {
return false;
}
try {
trusted = body.trusted;
} catch (error) {
return false;
}
try {
value = Boolean(trusted);
} catch (error) {
return false;
}
}
return value;
}
@@ -0,0 +1,54 @@
/* Metro module 14492; source: modules/activities/utils/findActivityWithMostParticipants.tsx; dependencies: [3793, 2] */
function _fun109680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:6, offset: 0x023568cc, size: 119 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/findActivityWithMostParticipants.tsx');
exports.default = function(a0) {
var property = a0.length;
return property === 0 ? null : property === 1 ? a0[0] : a0.reduce(_fun109682, a0[0]);
};
exports.findActivityWithMostNonBlockedOrIgnoredParticipants = findActivityWithMostNonBlockedOrIgnoredParticipants;
}
function findActivityWithMostParticipants(a0) { // fn#109681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:211, offset: 0x02356943, size: 59 bytes, params: 2, frame: 15
const length = a0.length;
return length === 0 ? null : length === 1 ? a0[0] : a0.reduce(function(a0, a1) {
var value = a0;
var value2 = a1;
return value.userIds.size < value2.userIds.size ? value2 : value;
}, a0[0]);
}
function findActivityWithMostNonBlockedOrIgnoredParticipants(a0) { // fn#109683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:413, offset: 0x023569a3, size: 133 bytes, params: 2, frame: 18
const length = a0.length;
if (length === 0) {
return null;
}
if (length === 1) {
return a0[0];
}
const items3 = [a0[0]];
const userIds = a0[0].userIds;
const items2 = [];
arraySpread(items2, userIds, 0, items2);
items3[1] = items2.map(function(a0) {
return !RelationshipStore.isBlockedOrIgnored(a0);
}).length;
const env0_0 = items3[0];
const env0_1 = items3[1];
a0.forEach(_fun109685);
return env0_0;
}
function _fun109685(a0) { // fn#109685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:639, offset: 0x02356a42, size: 69 bytes, params: 2, frame: 14
const userIds = a0.userIds;
const items2 = [];
arraySpread(items2, userIds, 0, items2);
if (items2.filter(function(a0) {
return !RelationshipStore.isBlockedOrIgnored(a0);
}).length > env0_1) {
env0_0 = a0;
}
}
@@ -0,0 +1,18 @@
/* Metro module 10257; source: modules/activities/utils/getActivityChannelId.tsx; dependencies: [1383, 1379, 4297, 2] */
function _fun79656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10443:6, offset: 0x01e5d183, size: 144 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1383) /* metro dependency 1383: ChannelRecord */).isTextChannel;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getActivityChannelId.tsx');
exports.default = getActivityChannelId;
}
function getActivityChannelId({channelId, userId, activity}) { // fn#79657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10443:233, offset: 0x01e5d213, size: 148 bytes, params: 2, frame: 18
const channel = ChannelStore.getChannel(channelId);
return (activity?.session_id == null ? channelId : channel == null ? VoiceStateStore.getVoiceStateForSession(userId,
activity?.session_id)?.channelId : isTextChannel(channel.type) ? channelId : VoiceStateStore.getVoiceStateForSession(userId,
activity?.session_id)?.channelId) ?? undefined;
}
@@ -0,0 +1,275 @@
/* Metro module 10258; source: modules/activities/utils/getActivityJoinability.tsx; dependencies: [661, 10259, 10260, 8107, 7858, 6886, 10261, 477, 10262, 10263, 10264, 2] */
function _fun79658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10444:6, offset: 0x01e5d2a7, size: 192 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.ActivityFlags;
const env0_4 = constantsModule.ChannelTypes;
const env0_5 = constantsModule.GuildFeatures;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getActivityJoinability.tsx');
exports.default = getActivityJoinability;
exports.ActivityJoinability = {CAN_JOIN: 'can_join', CANNOT_JOIN: 'cannot_join', JOINED: 'joined'};
}
function getActivityJoinability({user, activity, application, channelId, currentUser, isEmbedded, ChannelStore, GuildStore, GuildMemberCountStore, RelationshipStore, SelectedChannelStore, VoiceStateStore, PermissionStore, LocalActivityStore, SelfPresenceStore, EmbeddedActivitiesStore}) { // fn#79659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10444:355, offset: 0x01e5d367, size: 1064 bytes, params: 2, frame: 32
var application_id;
var r1;
var r0;
var value;
var value2;
var defaultImport;
var value3;
var value4;
var getIsInParty;
var value5;
var applicationId;
var defaultImport2;
var CONTEXTLESS;
var CANNOT_JOIN;
var moduleValue;
var platformSupportsActivityJoin;
var moduleValue4;
var defaultImport3;
var PARTY_PRIVACY_FRIENDS;
var isFriend;
var id;
var defaultImport4;
var PARTY_PRIVACY_VOICE_CHANNEL;
var getChannel;
var getVoiceChannelId;
var value7;
var isInChannel;
var id2;
var type;
var DM;
var GROUP_DM;
var getGuild;
var getGuildId;
var value8;
var features;
var has;
var COMMUNITY;
var getMemberCount;
var value9;
var CAN_JOIN;
var defaultImport5;
var object2;
var moduleValue5;
if (!isEmbedded) {
value = environment;
value2 = undefined;
defaultImport = importDefault(10259) /* metro dependency 10259: getCurrentUserPresenceActivity */;
reducibleJoin3: while (true) {
if (activity == null) {
application_id = value2;
break reducibleJoin3;
}
application_id = activity.application_id;
break reducibleJoin3;
}
value3 = defaultImport(LocalActivityStore, SelfPresenceStore, application_id);
value4 = value3 != null;
reducibleJoin5: while (true) {
if (value4) {
value = require(10260) /* metro dependency 10260: getIsInParty */;
getIsInParty = value.getIsInParty;
value = Reflect.apply(getIsInParty, value, [value3, activity]);
r1 = value;
break reducibleJoin5;
}
r1 = value4;
break reducibleJoin5;
}
reducibleJoin6: while (true) {
if (r1) {
value = environment;
return env0_6.JOINED;
}
break reducibleJoin6;
}
}
if (isEmbedded) {
value = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
value5 = value != null;
reducibleJoin11: while (true) {
if (value5) {
applicationId = value.applicationId;
value = undefined;
reducibleJoin10: while (true) {
if (activity == null) {
application_id = value;
break reducibleJoin10;
}
application_id = activity.application_id;
break reducibleJoin10;
}
value = applicationId === application_id;
r1 = value;
break reducibleJoin11;
}
r1 = value5;
break reducibleJoin11;
}
reducibleJoin12: while (true) {
if (r1) {
value = environment;
return env0_6.JOINED;
}
break reducibleJoin12;
}
}
if (user != null) {
if (isEmbedded) {
reducibleJoin15: while (true) {
if (channelId != null) {
value = environment;
defaultImport5 = importDefault(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */;
object2 = {};
object2.userId = user.id;
object2.activity = activity;
object2.channelId = channelId;
object2.currentUser = currentUser;
object2.application = application;
moduleValue5 = require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */;
object2.isActivitiesEnabledForCurrentPlatform = moduleValue5.getIsActivitiesEnabledForCurrentPlatform();
object2.ChannelStore = ChannelStore;
object2.VoiceStateStore = VoiceStateStore;
object2.PermissionStore = PermissionStore;
object2.GuildStore = GuildStore;
if (defaultImport5(object2) === (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability.CAN_JOIN) {
r0 = env0_6.CAN_JOIN;
} else {
r0 = env0_6.CANNOT_JOIN;
}
return r0;
}
break reducibleJoin15;
}
}
if (isEmbedded) {
reducibleJoin19: while (true) {
if (channelId != null) {
break reducibleJoin19;
}
value = environment;
defaultImport2 = importDefault(6886) /* metro dependency 6886: hasFlag */;
CONTEXTLESS = ActivityFlags.CONTEXTLESS;
if (!defaultImport2(activity, CONTEXTLESS)) {
return env0_6.CANNOT_JOIN;
}
break reducibleJoin19;
}
}
if (!isEmbedded) {
reducibleJoin23: while (true) {
reducibleJoin22: while (true) {
if ((importDefault(10261) /* metro dependency 10261: isActivityJoinableOnCurrentPlatform */)(activity)) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
platformSupportsActivityJoin = moduleValue.platformSupportsActivityJoin;
if (Reflect.apply(platformSupportsActivityJoin, moduleValue, [])) {
break reducibleJoin23;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
return env0_6.CANNOT_JOIN;
}
}
var partySize = (require(10262) /* metro dependency 10262: getPartySize */).getPartySize(activity);
var moduleValue3 = require(10263) /* metro dependency 10263: hasPartySize */;
if (moduleValue3.hasPartySize(partySize)) {
moduleValue4 = require(10264) /* metro dependency 10264: isPartyFull */;
reducibleJoin44: while (true) {
if (!moduleValue4.isPartyFull(partySize)) {
defaultImport3 = importDefault(6886) /* metro dependency 6886: hasFlag */;
PARTY_PRIVACY_FRIENDS = ActivityFlags.PARTY_PRIVACY_FRIENDS;
if (defaultImport3(activity, PARTY_PRIVACY_FRIENDS)) {
isFriend = RelationshipStore.isFriend;
id = user.id;
reducibleJoin27: while (true) {
if (Reflect.apply(isFriend, RelationshipStore, [id])) {
return env0_6.CAN_JOIN;
}
break reducibleJoin27;
}
}
defaultImport4 = importDefault(6886) /* metro dependency 6886: hasFlag */;
PARTY_PRIVACY_VOICE_CHANNEL = ActivityFlags.PARTY_PRIVACY_VOICE_CHANNEL;
if (defaultImport4(activity, PARTY_PRIVACY_VOICE_CHANNEL)) {
getChannel = ChannelStore.getChannel;
getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
value7 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getVoiceChannelId,
SelectedChannelStore,
[])]);
if (value7 != null) {
isInChannel = VoiceStateStore.isInChannel;
id = value7.id;
id2 = user.id;
reducibleJoin42: while (true) {
if (Reflect.apply(isInChannel, VoiceStateStore, [id, id2])) {
type = value7.type;
DM = ChannelTypes.DM;
if (DM !== type) {
GROUP_DM = ChannelTypes.GROUP_DM;
reducibleJoin41: while (true) {
if (GROUP_DM !== type) {
getGuild = GuildStore.getGuild;
getGuildId = value7.getGuildId;
value8 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId,
value7,
[])]);
if (value8 != null) {
features = value8.features;
has = features.has;
COMMUNITY = GuildFeatures.COMMUNITY;
reducibleJoin40: while (true) {
if (!Reflect.apply(has, features, [COMMUNITY])) {
getMemberCount = GuildMemberCountStore.getMemberCount;
id = value8.id;
value9 = Reflect.apply(getMemberCount,
GuildMemberCountStore,
[id]);
reducibleJoin39: while (true) {
reducibleJoin37: while (true) {
if (value9 == null) {
break reducibleJoin37;
}
if (value9 < 100) {
CAN_JOIN = env0_6.CAN_JOIN;
r1 = CAN_JOIN;
break reducibleJoin39;
}
break reducibleJoin37;
}
CANNOT_JOIN = env0_6.CANNOT_JOIN;
r1 = CANNOT_JOIN;
break reducibleJoin39;
}
return r1;
}
break reducibleJoin40;
}
}
return env0_6.CANNOT_JOIN;
}
break reducibleJoin41;
}
}
return env0_6.CAN_JOIN;
}
break reducibleJoin42;
}
}
return env0_6.CANNOT_JOIN;
}
return env0_6.CANNOT_JOIN;
}
break reducibleJoin44;
}
}
}
return env0_6.CANNOT_JOIN;
}
@@ -0,0 +1,15 @@
/* Metro module 10583; source: modules/activities/utils/getApplicationFromMessage.tsx; dependencies: [4235, 10579, 6868, 2] */
function _fun81664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10769:6, offset: 0x01ed90a3, size: 150 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const env0_1 = (require(10579) /* metro dependency 10579: SpotifyApplicationRecord */).SpotifyApplication;
const env0_2 = (require(6868) /* metro dependency 6868: SpotifyConstants */).isSpotifyParty;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getApplicationFromMessage.tsx');
exports.getApplicationFromMessage = getApplicationFromMessage;
}
function getApplicationFromMessage(a0) { // fn#81665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10769:276, offset: 0x01ed9139, size: 112 bytes, params: 2, frame: 14
return a0.application != null ? ApplicationRecord.createFromServer(a0.application) : a0.activity != null && a0.activity.party_id != null && isSpotifyParty(a0.activity.party_id) ? SpotifyApplication : undefined;
}
@@ -0,0 +1,54 @@
/* Metro module 9473; source: modules/activities/utils/getCachedOrFetchActivityApplicationForLaunch.tsx; dependencies: [5, 4234, 4235, 1379, 7860, 8099, 9474, 2] */
function _fun73665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9659:6, offset: 0x01d745fc, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const isUsableApplicationRecord = function(a0) {
return a0 != null && a0.embeddedActivityConfig != null;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getCachedOrFetchActivityApplicationForLaunch.tsx');
exports.default = function() {
return _getCachedOrFetchActivityApplicationForLaunch.apply(this, arguments);
};
}
function _getCachedOrFetchActivityApplicationForLaunch() { // fn#73666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9659:136, offset: 0x01d746b8, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73668).apply(this, arguments);
}
function* _fun73668(a0, a1) { // fn#73668, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9659:249, offset: 0x01d746f5, size: 298 bytes, params: 3, frame: 20
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const application = env2_4.getApplication(a0);
const value4 = undefined;
if (env2_8(application)) {
return application;
}
const channel = env2_6.getChannel(a1);
const guild_id = channel == null ? value4 : channel.guild_id;
const value6 = env2_0(env2_2[4]);
yield value6.fetchShelf({guildId: guild_id});
const value7 = undefined;
if (false) {
return value7;
}
const value10 = env2_1(env2_2[5])({applicationId: a0, activityConfigs: value7.activityConfigs,
applications: value7.applications});
if (env2_8(value10 == null ? value4 : value10.application)) {
return value10 == null ? value4 : value10.application;
}
const value11 = env2_0(env2_2[6]);
yield value11.fetchApplication(a0);
const value12 = undefined;
if (false) {
return value12;
}
return env2_5.createFromServer(value12);
}
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff. Show more