This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,57 +1,60 @@
/* Metro module 6884; source: modules/activities/utils/ActivityFlagUtils.tsx; dependencies: [661, 3829, 587, 1391, 6885, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
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');
(FileImportTrackerModule).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 = (UserSettingsModule).AllowActivityPartyPrivacyFriends;
const setting = AllowActivityPartyPrivacyFriends.getSetting();
const AllowActivityPartyPrivacyVoiceChannel = (UserSettingsModule).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 _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 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;
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 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);
}
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);
}
global.__d(_fun54659, 6884, [661, 3829, 587, 1391, 6885,
2]) /* metro module 6884, dependencies: [661, 3829, 587, 1391, 6885, 2] */;
@@ -1,4 +1,9 @@
/* Metro module 9468; source: modules/activities/utils/CustomActivityLinkUtils.tsx; dependencies: [5, 9469, 661, 9471, 507, 694, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import CustomActivityLinksStore from '../stores/CustomActivityLinksStore.tsx'; /* Metro dependency 9469 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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() {
@@ -9,12 +14,9 @@ function _fun73625(global, require, importDefault, importAll, module, exports, d
};
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');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/CustomActivityLinkUtils.tsx');
exports.fetchCustomActivityLink = closure;
exports.getCustomActivityLinkParams = function() {
return _getCustomActivityLinkParams.apply(this, arguments);
@@ -26,193 +28,195 @@ function _fun73625(global, require, importDefault, importAll, module, exports, d
};
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 Module00005(_fun73629).apply(this, arguments);
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 _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 _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 Module00005(_fun73632).apply(this, arguments);
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 object;
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 {
object = {};
} catch (error) {
return {customId: value4};
}
try {
object.customId = value4;
} catch (error) {
return {customId: value4};
}
r4 = object;
} else {
try {
object = {};
} catch (error) {
return {customId: value4};
}
try {
custom_id = value.custom_id;
} catch (error) {
return {customId: value4};
}
try {
object.customId = custom_id;
} catch (error) {
return {customId: value4};
}
r4 = object;
}
return r4;
}
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;
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 Module00005(_fun73636).apply(this, arguments);
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});
}
}
}
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 {
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;
binding = env0_6;
if (binding.has(a1)) {
r0 = value3;
} else {
loadCustomActivityLink(a0, a1);
env0_6.add(a1);
r0 = value3;
}
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});
return r0;
}
}
global.__d(_fun73625, 9468, [5, 9469, 661, 9471, 507, 694,
2]) /* metro module 9468, dependencies: [5, 9469, 661, 9471, 507, 694, 2] */;
@@ -1,123 +1,130 @@
/* Metro module 10586; source: modules/activities/utils/InviteEmbedTextUtils.tsx; dependencies: [1878, 661, 1244, 2678, 4617, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 getRequestToStreamText2 = getRequestToStreamText;
const getAskToJoinText2 = 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');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/InviteEmbedTextUtils.tsx');
exports.getHeaderText = getHeaderText_81673;
exports.getRequestToStreamText = closure;
exports.getAskToJoinText = closure2;
exports.getRequestToStreamText = getRequestToStreamText2;
exports.getAskToJoinText = getAskToJoinText2;
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;
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 = (IndexNativeModule).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;
}
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) {
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 = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var userStoreBinding;
var value2;
if (a0.author.id === a3) {
if (a2.isPrivate()) {
userStoreBinding = UserStore;
value2 = userStoreBinding.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.JddpN2, {username: value2.globalName,
appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.gYVkSW, {username: value2.globalName,
appName: a1}]);
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['2N1kNS'],
{appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]);
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}]);
}
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});
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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]);
}
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']);
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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);
}
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);
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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});
}
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});
}
global.__d(_fun81670, 10586, [1878, 661, 1244, 2678, 4617,
2]) /* metro module 10586, dependencies: [1878, 661, 1244, 2678, 4617, 2] */;
@@ -1,257 +1,260 @@
/* Metro module 8103; source: modules/activities/utils/activityLaunchErrorUtils.tsx; dependencies: [5, 7503, 661, 1244, 8104, 3829, 7860, 8059, 8056, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import DeveloperActivityShelfStore from '../DeveloperActivityShelfStore.tsx'; /* Metro dependency 7503 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as DeveloperActivityShelfStoreModule from '../DeveloperActivityShelfStore.tsx'; /* Metro dependency 7503 */
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;
object = {ClientError: 0};
object[0] = 'ClientError';
object.CallbackError = 1;
object[1] = 'CallbackError';
object.ApiError = 2;
object[2] = 'ApiError';
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/activityLaunchErrorUtils.tsx');
exports.ActivityLaunchFailErrorType = object;
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();
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 Module00005(_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;
}
reason3 = a0.reason;
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 (binding(env2_2[4]).Reasons.PRIMARY_APP_COMMAND_NOT_FOUND === reason3) {
if (a0 instanceof binding(binding2[4])) {
ClientError = env2_7.ClientError;
reason = a0.reason;
binding = env2_4;
if (binding.inDevModeForApplication(a1)) {
fetchState = binding.getFetchState();
binding = env2_0;
if (binding(env2_2[5]).DeveloperMode.getSetting() && fetchState !== env2_5.LOADED) {
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;
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 {
r3 = reason;
r4 = value3;
r5 = ClientError;
r6 = value4;
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 {
binding = env2_1;
if (binding(env2_2[4]).Reasons.INVALID_CHANNEL === reason3) {
var value5 = a0 instanceof env2_1(env2_2[7]);
binding = env2_7;
if (value5) {
CallbackError = binding.CallbackError;
reason = a0.reason;
binding = env2_0;
binding10 = env2_2;
intl = binding(binding10[3]).intl;
value = intl.string(binding(binding10[3]).t.j29zCr);
value = binding(env2_2[8]);
value = value.interactionCallbackErrorReason(a0.reason, a1);
r1 = value ?? value4;
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;
r5 = CallbackError;
r6 = r1;
} else {
detailCode = a0.detailCode;
r3 = reason;
r4 = detailCode;
r5 = ClientError;
r6 = value4;
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};
}
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};
}
global.__d(_fun64962, 8103, [5, 7503, 661, 1244, 8104, 3829, 7860, 8059, 8056,
2]) /* metro module 8103, dependencies: [5, 7503, 661, 1244, 8104, 3829, 7860, 8059, 8056, 2] */;
@@ -1,42 +1,46 @@
/* Metro module 13035; source: modules/activities/utils/activityShareLink.tsx; dependencies: [4096, 1471, 1244, 2] */
import URLUtils from '../../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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 = (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;
}
}
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;
}
global.__d(_fun99503, 13035, [4096, 1471, 1244, 2]) /* metro module 13035, dependencies: [4096, 1471, 1244, 2] */;
@@ -1,46 +1,49 @@
/* Metro module 10716; source: modules/activities/utils/allowPopups.tsx; dependencies: [4237, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 4237 */
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');
(FileImportTrackerModule).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);
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) {
r1 = !!value;
} else {
if ('embeddedActivityConfig' in a0) {
embeddedActivityConfig = a0.embeddedActivityConfig;
value = undefined;
value = (embeddedActivityConfig == null ? value : embeddedActivityConfig.displays_advertisements) === true;
r2 = value;
value = APPLICATIONS_WITH_ALLOWED_POPUPS.has(a0.id);
if (value) {
r1 = !!value;
} else {
value = 'embedded_activity_config' in a0;
if (value) {
embedded_activity_config = a0.embedded_activity_config;
if ('embeddedActivityConfig' in a0) {
embeddedActivityConfig = a0.embeddedActivityConfig;
value = undefined;
value = (embedded_activity_config == null ? value : embedded_activity_config.displays_advertisements) === true;
value = (embeddedActivityConfig == null ? value : embeddedActivityConfig.displays_advertisements) === true;
r2 = value;
} else {
r2 = value;
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;
}
r1 = r2;
r0 = r1;
} else {
r0 = value;
}
r0 = r1;
} else {
r0 = value;
return r0;
}
return r0;
}
global.__d(_fun82346, 10716, [4237, 2]) /* metro module 10716, dependencies: [4237, 2] */;
@@ -1,17 +1,21 @@
/* Metro module 10654; source: modules/activities/utils/closeCustomKeyboard.native.tsx; dependencies: [4015, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
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();
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/closeCustomKeyboard.native.tsx');
exports.default = closeCustomKeyboard_81953;
function closeCustomKeyboard_81953(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 = ChatInputUtilsModule;
value = value.getBestActiveInputForChannelId(a0);
if (value != null) {
value.closeCustomKeyboard();
}
}
}
global.__d(_fun81952, 10654, [4015, 2]) /* metro module 10654, dependencies: [4015, 2] */;
@@ -1,4 +1,10 @@
/* 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] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import EmbeddedActivitiesStore from '../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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() {
@@ -6,350 +12,262 @@ function _fun81895(global, require, importDefault, importAll, module, exports, d
};
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');
(FileImportTrackerModule).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;
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 Module00005(_fun81899).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 object;
var APIError;
var prototype;
var aPIError;
if (false) {
return undefined;
}
embeddedActivityConfig = r5.embeddedActivityConfig;
requires_age_gate = embeddedActivityConfig == null ? value : embeddedActivityConfig.requires_age_gate;
if (requires_age_gate == null) {
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;
object = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object.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;
object.error = value;
object.locationKind = r3;
Reflect.apply(dispatch, value9, [object]);
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;
object = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object.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;
object.error = value;
object.locationKind = r3;
Reflect.apply(dispatch, value9, [object]);
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;
object = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object.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;
object.error = value;
object.locationKind = r3;
Reflect.apply(dispatch, value9, [object]);
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;
object = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object.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;
object.error = value;
object.locationKind = r3;
Reflect.apply(dispatch, value9, [object]);
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;
object = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object.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;
object.error = value;
object.locationKind = r3;
Reflect.apply(dispatch, value9, [object]);
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;
object = {'type': 'EMBEDDED_ACTIVITY_LAUNCH_FAIL', 'nonce': ''};
object.applicationId = applicationId;
r11 = value8 != channelId ? channelId : value8;
object.channelId = r11;
r9 = value8 != guildId ? guildId : value8;
object.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;
object.error = value;
object.locationKind = r3;
Reflect.apply(dispatch, value9, [object]);
return undefined;
}
return value7 ? value6 : value6;
}
}
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 Module00005(_fun81902).apply(this, arguments);
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;
}
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);
const Promise = global.Promise;
let promise = new Promise(_fun81903);
await promise;
promise = undefined;
if (false) {
@@ -359,141 +277,255 @@ async function _fun81908({application, applicationId, channel, user, onConfirmAc
return true;
}
return false;
}
}
return true;
}
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 _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);
}
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 _fun81905() { // fn#81905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1277, offset: 0x00d6ca9a, size: 18 bytes, params: 1, frame: 11
return env0_0(false);
}
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();
}
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 Module00005(_fun81908).apply(this, arguments);
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 object = {applicationId: applicationId};
object.channelId = channel == null ? value : channel.id;
object.guildId = (channel == null ? value : channel.getGuildId()) ?? value;
await binding(object);
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;
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});
return value3;
function onAgree() { // fn#81910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1932, offset: 0x01d72e0f, size: 18 bytes, params: 1, frame: 11
return env0_0(true);
}
function onDisagree() { // fn#81911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:1953, offset: 0x00d6ca9a, size: 18 bytes, params: 1, frame: 11
return env0_0(false);
}
}
}
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();
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 Module00005(_fun81914).apply(this, arguments);
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 object = {applicationId: applicationId};
object.channelId = channel == null ? value : channel.id;
object.guildId = (channel == null ? value : channel.getGuildId()) ?? value;
await binding(object);
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 _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 onConfirm_81916() { // fn#81916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2560, offset: 0x01d72e0f, size: 18 bytes, params: 1, frame: 11
return env0_0(true);
}
function onCancel_81917() { // fn#81917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2579, offset: 0x00d6ca9a, size: 18 bytes, params: 1, frame: 11
return env0_0(false);
}
}
}
}
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();
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 Module00005(_fun81920).apply(this, arguments);
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 confirmActivityChange() { // fn#81921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:2726, offset: 0x01106d0d, size: 30 bytes, params: 1, frame: 13
return env3_9.apply(this, arguments);
}
function confirmActivityAgeGate() { // fn#81922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10832:3082, offset: 0x01ee3a93, size: 30 bytes, params: 1, frame: 13
return env3_10.apply(this, arguments);
}
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);
}
}
}
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);
}
global.__d(_fun81895, 10646, [5, 1379, 1378, 661, 9473, 10647, 694, 4131, 3774, 10648, 8091, 10649, 7504, 10651,
2]) /* metro module 10646, dependencies: [5, 1379, 1378, 661, 9473, 10647, 694, 4131, 3774, 10648, 8091, 10649, 7504, 10651, 2] */;
@@ -1,15 +1,18 @@
/* Metro module 8918; source: modules/activities/utils/deferJoinActivityInChannel.tsx; dependencies: [694, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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
Dispatcher.dispatch({type: 'EMBEDDED_ACTIVITY_DEFERRED_OPEN', channelId: channelId, applicationId: applicationId,
intent: intent, inviterUserId: inviterUserId, analyticsLocations: analyticsLocations,
commandOrigin: commandOrigin});
}
}
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});
}
global.__d(_fun69600, 8918, [694, 2]) /* metro module 8918, dependencies: [694, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 9962; source: modules/activities/utils/distributorStoreUrls.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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';
@@ -15,3 +17,4 @@ function _fun78000(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun78000, 9962, [2]) /* metro module 9962, dependencies: [2] */;
@@ -1,8 +1,10 @@
/* Metro module 3774; source: modules/activities/utils/embeddedActivityLocationUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/embeddedActivityLocationUtils.tsx');
exports.getEmbeddedActivityLocationChannelId = function(a0) {
if (a0 != null) {
return 'channel_id' in a0 ? a0.channel_id : undefined;
@@ -15,3 +17,4 @@ function _fun28574(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun28574, 3774, [2]) /* metro module 3774, dependencies: [2] */;
@@ -1,156 +1,159 @@
/* Metro module 13031; source: modules/activities/utils/fetchIsLinkTrusted.tsx; dependencies: [5, 661, 507, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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 Module00005(_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 object;
var ACTIVITIES_TRUSTED_LINKS;
var object2;
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 {
object = {};
} 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 {
object.url = value;
} catch (error) {
return false;
}
try {
object.rejectWithError = false;
} catch (error) {
return false;
}
try {
object2 = {};
} catch (error) {
return false;
}
try {
object2.url = a1;
} catch (error) {
return false;
}
try {
object.query = object2;
} catch (error) {
return false;
}
try {
object.timeout = 500;
} catch (error) {
return false;
}
try {
value = Reflect.apply(get, HTTP, [object]);
} 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;
}
}
}
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;
}
global.__d(_fun99475, 13031, [5, 661, 507, 2]) /* metro module 13031, dependencies: [5, 661, 507, 2] */;
@@ -1,54 +1,66 @@
/* Metro module 14492; source: modules/activities/utils/findActivityWithMostParticipants.tsx; dependencies: [3793, 2] */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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;
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]);
}
if (length === 1) {
return 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;
}
}
}
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;
}
function _fun109682(a0, a1) { // fn#109682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:310, offset: 0x0235697e, size: 37 bytes, params: 3, frame: 4
const value = a0;
const value2 = a1;
let userIds = value.userIds;
const size = userIds.size;
userIds = value2.userIds;
return size < userIds.size ? value2 : value;
}
global.__d(_fun109680, 14492, [3793, 2]) /* metro module 14492, dependencies: [3793, 2] */;
@@ -1,18 +1,21 @@
/* Metro module 10257; source: modules/activities/utils/getActivityChannelId.tsx; dependencies: [1383, 1379, 4297, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
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');
(FileImportTrackerModule).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;
}
}
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;
}
global.__d(_fun79656, 10257, [1383, 1379, 4297, 2]) /* metro module 10257, dependencies: [1383, 1379, 4297, 2] */;
@@ -1,275 +1,276 @@
/* Metro module 10258; source: modules/activities/utils/getActivityJoinability.tsx; dependencies: [661, 10259, 10260, 8107, 7858, 6886, 10261, 477, 10262, 10263, 10264, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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;
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 object;
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;
}
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;
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;
}
r1 = value4;
break reducibleJoin5;
}
reducibleJoin6: while (true) {
if (r1) {
value = environment;
return env0_6.JOINED;
reducibleJoin6: while (true) {
if (r1) {
value = environment;
return env0_6.JOINED;
}
break reducibleJoin6;
}
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;
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;
}
application_id = activity.application_id;
break reducibleJoin10;
value = applicationId === application_id;
r1 = value;
break reducibleJoin11;
}
value = applicationId === application_id;
r1 = value;
r1 = value5;
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) {
reducibleJoin12: while (true) {
if (r1) {
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;
return env0_6.JOINED;
}
break reducibleJoin15;
break reducibleJoin12;
}
}
if (isEmbedded) {
reducibleJoin19: while (true) {
if (channelId != null) {
if (user != null) {
if (isEmbedded) {
reducibleJoin15: while (true) {
if (channelId != null) {
value = environment;
defaultImport5 = importDefault(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */;
object = {};
object.userId = user.id;
object.activity = activity;
object.channelId = channelId;
object.currentUser = currentUser;
object.application = application;
moduleValue5 = require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */;
object.isActivitiesEnabledForCurrentPlatform = moduleValue5.getIsActivitiesEnabledForCurrentPlatform();
object.ChannelStore = ChannelStore;
object.VoiceStateStore = VoiceStateStore;
object.PermissionStore = PermissionStore;
object.GuildStore = GuildStore;
if (defaultImport5(object) === (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;
}
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;
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;
}
break reducibleJoin22;
return env0_6.CANNOT_JOIN;
}
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;
}
}
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 reducibleJoin42;
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;
}
return env0_6.CANNOT_JOIN;
break reducibleJoin44;
}
break reducibleJoin44;
}
}
return env0_6.CANNOT_JOIN;
}
return env0_6.CANNOT_JOIN;
}
global.__d(_fun79658, 10258, [661, 10259, 10260, 8107, 7858, 6886, 10261, 477, 10262, 10263, 10264,
2]) /* metro module 10258, dependencies: [661, 10259, 10260, 8107, 7858, 6886, 10261, 477, 10262, 10263, 10264, 2] */;
@@ -1,15 +1,18 @@
/* Metro module 10583; source: modules/activities/utils/getApplicationFromMessage.tsx; dependencies: [4235, 10579, 6868, 2] */
import ApplicationRecord from '../../../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SpotifyConstantsModule from '../../spotify/SpotifyConstants.tsx'; /* Metro dependency 6868 */
import * as SpotifyApplicationRecordModule from '../../../records/SpotifyApplicationRecord.tsx'; /* Metro dependency 10579 */
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');
(FileImportTrackerModule).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;
}
}
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;
}
global.__d(_fun81664, 10583, [4235, 10579, 6868, 2]) /* metro module 10583, dependencies: [4235, 10579, 6868, 2] */;
@@ -1,4 +1,10 @@
/* Metro module 9473; source: modules/activities/utils/getCachedOrFetchActivityApplicationForLaunch.tsx; dependencies: [5, 4234, 4235, 1379, 7860, 8099, 9474, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import ApplicationRecord from '../../../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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) {
@@ -6,49 +12,47 @@ function _fun73665(global, require, importDefault, importAll, module, exports, d
};
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');
(FileImportTrackerModule).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 Module00005(_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);
}
}
}
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);
}
global.__d(_fun73665, 9473, [5, 4234, 4235, 1379, 7860, 8099, 9474,
2]) /* metro module 9473, dependencies: [5, 4234, 4235, 1379, 7860, 8099, 9474, 2] */;
+92 -90
View File
@@ -1,47 +1,68 @@
/* Metro module 10588; source: modules/activities/utils/getCanJoin.tsx; dependencies: [661, 10584, 10262, 10263, 10264, 10260, 10585, 10589, 6886, 477, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81678(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10774:6, offset: 0x01ed9c3e, size: 149 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.ActivityActionTypes;
const env0_4 = constantsModule.ActivityFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getCanJoin.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getCanJoin.tsx');
exports.getCanJoin = getCanJoin;
exports.getCanSync = getCanSync;
}
function getCanJoin({presenceActivity, currentUserPresenceActivity, currentUserId, message, application, isEmbeddedApplication, isFrameApplication, isGameLaunchable}) { // fn#81679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10774:235, offset: 0x01ed9cd3, size: 601 bytes, params: 2, frame: 22
var partySize;
var moduleValue2;
var moduleValue3;
var moduleValue4;
var moduleValue5;
var activity;
var remoteJoinableActivityPlatform;
if (message.author.id !== currentUserId) {
var value;
var value2 = undefined;
if ((importDefault(10584) /* metro dependency 10584: isInviteActive */)(presenceActivity, message,
application.id)) {
partySize = (require(10262) /* metro dependency 10262: getPartySize */).getPartySize(presenceActivity);
moduleValue2 = require(10263) /* metro dependency 10263: hasPartySize */;
if (moduleValue2.hasPartySize(partySize)) {
moduleValue3 = require(10264) /* metro dependency 10264: isPartyFull */;
if (moduleValue3.isPartyFull(partySize)) {
return {'canJoin': false, 'remoteJoinPlatform': null};
}
moduleValue4 = require(10260) /* metro dependency 10260: getIsInParty */;
if (moduleValue4.getIsInParty(currentUserPresenceActivity, presenceActivity)) {
return {'canJoin': false, 'remoteJoinPlatform': null};
}
moduleValue5 = require(10585) /* metro dependency 10585: getIsAskToJoin */;
if (moduleValue5.getIsAskToJoin(message)) {
return {'canJoin': false, 'remoteJoinPlatform': null};
}
if (isEmbeddedApplication) {
if (isFrameApplication) {
return {'canJoin': true, 'remoteJoinPlatform': null};
function getCanJoin({presenceActivity, currentUserPresenceActivity, currentUserId, message, application, isEmbeddedApplication, isFrameApplication, isGameLaunchable}) { // fn#81679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10774:235, offset: 0x01ed9cd3, size: 601 bytes, params: 2, frame: 22
var partySize;
var moduleValue2;
var moduleValue3;
var moduleValue4;
var moduleValue5;
var activity;
var remoteJoinableActivityPlatform;
if (message.author.id !== currentUserId) {
var value;
var value2 = undefined;
if ((importDefault(10584) /* metro dependency 10584: isInviteActive */)(presenceActivity, message,
application.id)) {
partySize = (require(10262) /* metro dependency 10262: getPartySize */).getPartySize(presenceActivity);
moduleValue2 = require(10263) /* metro dependency 10263: hasPartySize */;
if (moduleValue2.hasPartySize(partySize)) {
moduleValue3 = require(10264) /* metro dependency 10264: isPartyFull */;
if (moduleValue3.isPartyFull(partySize)) {
return {'canJoin': false, 'remoteJoinPlatform': null};
}
moduleValue4 = require(10260) /* metro dependency 10260: getIsInParty */;
if (moduleValue4.getIsInParty(currentUserPresenceActivity, presenceActivity)) {
return {'canJoin': false, 'remoteJoinPlatform': null};
}
moduleValue5 = require(10585) /* metro dependency 10585: getIsAskToJoin */;
if (moduleValue5.getIsAskToJoin(message)) {
return {'canJoin': false, 'remoteJoinPlatform': null};
}
if (isEmbeddedApplication) {
if (isFrameApplication) {
return {'canJoin': true, 'remoteJoinPlatform': null};
}
activity = message.activity;
if ((activity == null ? value2 : activity.type) !== ActivityActionTypes.JOIN) {
value = require(477) /* metro dependency 477: PlatformUtils */;
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
}
if (presenceActivity == null) {
value = require(477) /* metro dependency 477: PlatformUtils */;
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
}
remoteJoinableActivityPlatform = (require(10589) /* metro dependency 10589: getRemoteJoinableActivityPlatform */).getRemoteJoinableActivityPlatform(presenceActivity);
if (remoteJoinableActivityPlatform != null) {
return {canJoin: true, remoteJoinPlatform: remoteJoinableActivityPlatform};
}
if ((importDefault(6886) /* metro dependency 6886: hasFlag */)(presenceActivity,
ActivityFlags.SUPPORTS_JOIN_URL)) {
return {'canJoin': true, 'remoteJoinPlatform': null};
}
value = require(477) /* metro dependency 477: PlatformUtils */;
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
}
activity = message.activity;
if ((activity == null ? value2 : activity.type) !== ActivityActionTypes.JOIN) {
@@ -66,69 +87,50 @@ function getCanJoin({presenceActivity, currentUserPresenceActivity, currentUserI
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
}
activity = message.activity;
if ((activity == null ? value2 : activity.type) !== ActivityActionTypes.JOIN) {
value = require(477) /* metro dependency 477: PlatformUtils */;
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
}
if (presenceActivity == null) {
value = require(477) /* metro dependency 477: PlatformUtils */;
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
}
remoteJoinableActivityPlatform = (require(10589) /* metro dependency 10589: getRemoteJoinableActivityPlatform */).getRemoteJoinableActivityPlatform(presenceActivity);
if (remoteJoinableActivityPlatform != null) {
return {canJoin: true, remoteJoinPlatform: remoteJoinableActivityPlatform};
}
if ((importDefault(6886) /* metro dependency 6886: hasFlag */)(presenceActivity,
ActivityFlags.SUPPORTS_JOIN_URL)) {
return {'canJoin': true, 'remoteJoinPlatform': null};
}
value = require(477) /* metro dependency 477: PlatformUtils */;
return value.platformSupportsActivityJoin() && isGameLaunchable ? {'canJoin': true,
'remoteJoinPlatform': null} : {'canJoin': false, 'remoteJoinPlatform': null};
return {'canJoin': false, 'remoteJoinPlatform': null};
}
return {'canJoin': false, 'remoteJoinPlatform': null};
}
return {'canJoin': false, 'remoteJoinPlatform': null};
}
return {'canJoin': false, 'remoteJoinPlatform': null};
}
function getCanSync(a0, a1, a2, a3) { // fn#81680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10774:1239, offset: 0x01ed9f2c, size: 199 bytes, params: 5, frame: 19
var r3;
var r2;
var r1;
var r0;
var value2;
var value4;
var isPlatformEmbedded;
let value = a0 != null;
if (value) {
value2 = (importDefault(10584) /* metro dependency 10584: isInviteActive */)(a0, a2, a3.id);
if (value2) {
value4 = (importDefault(6886) /* metro dependency 6886: hasFlag */)(a0, ActivityFlags.SYNC);
if (value4) {
isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
if (isPlatformEmbedded) {
value = require(10260) /* metro dependency 10260: getIsInParty */;
value = !value.getIsInParty(a1, a0);
r3 = value;
function getCanSync(a0, a1, a2, a3) { // fn#81680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10774:1239, offset: 0x01ed9f2c, size: 199 bytes, params: 5, frame: 19
var r3;
var r2;
var r1;
var r0;
var value2;
var value4;
var isPlatformEmbedded;
let value = a0 != null;
if (value) {
value2 = (importDefault(10584) /* metro dependency 10584: isInviteActive */)(a0, a2, a3.id);
if (value2) {
value4 = (importDefault(6886) /* metro dependency 6886: hasFlag */)(a0, ActivityFlags.SYNC);
if (value4) {
isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
if (isPlatformEmbedded) {
value = require(10260) /* metro dependency 10260: getIsInParty */;
value = !value.getIsInParty(a1, a0);
r3 = value;
} else {
r3 = !!isPlatformEmbedded;
}
r2 = r3;
} else {
r3 = !!isPlatformEmbedded;
r2 = !!value4;
}
r2 = r3;
r1 = r2;
} else {
r2 = !!value4;
r1 = !!value2;
}
r1 = r2;
r0 = r1;
} else {
r1 = !!value2;
r0 = value;
}
r0 = r1;
} else {
r0 = value;
return r0;
}
return r0;
}
global.__d(_fun81678, 10588, [661, 10584, 10262, 10263, 10264, 10260, 10585, 10589, 6886, 477,
2]) /* metro module 10588, dependencies: [661, 10584, 10262, 10263, 10264, 10260, 10585, 10589, 6886, 477, 2] */;
@@ -1,40 +1,42 @@
/* Metro module 10587; source: modules/activities/utils/getCanSendInvite.tsx; dependencies: [661, 10584, 6886, 10262, 10263, 10264, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10773:6, offset: 0x01ed9ab4, size: 134 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.ActivityActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getCanSendInvite.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getCanSendInvite.tsx');
exports.getCanSendInvite = getCanSendInvite;
}
function getCanSendInvite(a0, a1, a2, a3) { // fn#81677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10773:246, offset: 0x01ed9b3a, size: 260 bytes, params: 5, frame: 17
var r0;
var partySize;
var hasPartySize2;
if (a1.author.id !== a3) {
var value;
if ((importDefault(10584) /* metro dependency 10584: isInviteActive */)(a0, a1, a2.id)) {
if (a1.activity?.type !== ActivityActionTypes.JOIN_REQUEST) {
function getCanSendInvite(a0, a1, a2, a3) { // fn#81677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10773:246, offset: 0x01ed9b3a, size: 260 bytes, params: 5, frame: 17
var r0;
var partySize;
var hasPartySize2;
if (a1.author.id !== a3) {
var value;
if ((importDefault(10584) /* metro dependency 10584: isInviteActive */)(a0, a1, a2.id)) {
if (a1.activity?.type !== ActivityActionTypes.JOIN_REQUEST) {
return false;
}
if ((importDefault(6886) /* metro dependency 6886: hasFlag */)(a0, ActivityFlags.JOIN)) {
partySize = (require(10262) /* metro dependency 10262: getPartySize */).getPartySize(a0);
hasPartySize2 = (require(10263) /* metro dependency 10263: hasPartySize */).hasPartySize(partySize);
if (hasPartySize2) {
value = require(10264) /* metro dependency 10264: isPartyFull */;
value = value.isPartyFull(partySize);
r0 = value;
} else {
r0 = !hasPartySize2;
}
return !r0;
}
return false;
}
if ((importDefault(6886) /* metro dependency 6886: hasFlag */)(a0, ActivityFlags.JOIN)) {
partySize = (require(10262) /* metro dependency 10262: getPartySize */).getPartySize(a0);
hasPartySize2 = (require(10263) /* metro dependency 10263: hasPartySize */).hasPartySize(partySize);
if (hasPartySize2) {
value = require(10264) /* metro dependency 10264: isPartyFull */;
value = value.isPartyFull(partySize);
r0 = value;
} else {
r0 = !hasPartySize2;
}
return !r0;
}
return false;
}
return false;
}
return false;
}
global.__d(_fun81676, 10587, [661, 10584, 6886, 10262, 10263, 10264,
2]) /* metro module 10587, dependencies: [661, 10584, 6886, 10262, 10263, 10264, 2] */;
@@ -1,16 +1,20 @@
/* Metro module 8845; source: modules/activities/utils/getChannelCopyForEmbeddedActivity.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun69017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9030:6, offset: 0x01c65282, 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/getChannelCopyForEmbeddedActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getChannelCopyForEmbeddedActivity.tsx');
exports.default = getChannelCopyForEmbeddedActivity;
function getChannelCopyForEmbeddedActivity(a0) { // fn#69018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9030:198, offset: 0x01c652e2, size: 80 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value = a0;
return value == null ? intl.string(t['2YCamo']) : value !== '' ? value : intl.string(t['2YCamo']);
}
}
function getChannelCopyForEmbeddedActivity(a0) { // fn#69018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9030:198, offset: 0x01c652e2, size: 80 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = a0;
return value == null ? intl.string(t['2YCamo']) : value !== '' ? value : intl.string(t['2YCamo']);
}
global.__d(_fun69017, 8845, [1244, 2]) /* metro module 8845, dependencies: [1244, 2] */;
@@ -1,28 +1,31 @@
/* Metro module 10590; source: modules/activities/utils/getCoverImageFromActivity.tsx; dependencies: [4237, 6873, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun81683(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10776:6, offset: 0x01eda228, 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 */).ACTIVITY_INVITE_COVER_IMAGE_SIZE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getCoverImageFromActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getCoverImageFromActivity.tsx');
exports.default = getCoverImageFromActivity;
}
function getCoverImageFromActivity(a0, a1) { // fn#81684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10776:237, offset: 0x01eda29d, size: 121 bytes, params: 3, frame: 17
var r0;
var moduleValue;
const value = null;
if (value == a0) {
r0 = value;
} else if (value == a0.assets) {
r0 = value;
} else if (value == a0.assets.large_image) {
r0 = value;
} else {
moduleValue = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
r0 = moduleValue.getAssetImage(a1, a0.assets.large_image, [ACTIVITY_INVITE_COVER_IMAGE_SIZE,
ACTIVITY_INVITE_COVER_IMAGE_SIZE]);
function getCoverImageFromActivity(a0, a1) { // fn#81684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10776:237, offset: 0x01eda29d, size: 121 bytes, params: 3, frame: 17
var r0;
var moduleValue;
const value = null;
if (value == a0) {
r0 = value;
} else if (value == a0.assets) {
r0 = value;
} else if (value == a0.assets.large_image) {
r0 = value;
} else {
moduleValue = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
r0 = moduleValue.getAssetImage(a1, a0.assets.large_image, [ACTIVITY_INVITE_COVER_IMAGE_SIZE,
ACTIVITY_INVITE_COVER_IMAGE_SIZE]);
}
return r0;
}
return r0;
}
global.__d(_fun81683, 10590, [4237, 6873, 2]) /* metro module 10590, dependencies: [4237, 6873, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 10259; source: modules/activities/utils/getCurrentUserPresenceActivity.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79660(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10445:6, offset: 0x01e5d78f, 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/utils/getCurrentUserPresenceActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getCurrentUserPresenceActivity.tsx');
exports.default = function(a0, a1, a2) {
var r1;
var r0;
@@ -23,28 +25,33 @@ function _fun79660(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
}
function getCurrentUserPresenceActivity(a0, a1, a2) { // fn#79661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10445:195, offset: 0x01e5d7e6, size: 92 bytes, params: 4, frame: 17
var r1;
var r0;
var applicationActivity;
const env0_0 = a2;
let value = null;
if (value == a2) {
r0 = value;
} else {
applicationActivity = a0.getApplicationActivity(a2);
r1 = value != applicationActivity ? applicationActivity : a1.getApplicationActivity(a2, true);
if (value == r1) {
value = a1.getHiddenActivities();
value = value.find(function({application_id}) {
return application_id === importDefault;
});
r1 = value;
function getCurrentUserPresenceActivity(a0, a1, a2) { // fn#79661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10445:195, offset: 0x01e5d7e6, size: 92 bytes, params: 4, frame: 17
var r1;
var r0;
var applicationActivity;
const env0_0 = a2;
let value = null;
if (value == a2) {
r0 = value;
} else {
applicationActivity = a0.getApplicationActivity(a2);
r1 = value != applicationActivity ? applicationActivity : a1.getApplicationActivity(a2, true);
if (value == r1) {
value = a1.getHiddenActivities();
value = value.find(function({application_id}) {
return application_id === importDefault;
});
r1 = value;
}
r0 = r1;
}
r0 = r1;
return r0;
function _fun79662({application_id}) { // fn#79662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10445:383, offset: 0x0108da35, size: 22 bytes, params: 2, frame: 2
return application_id === importDefault;
}
}
return r0;
}
global.__d(_fun79660, 10259, [2]) /* metro module 10259, dependencies: [2] */;
@@ -1,10 +1,13 @@
/* Metro module 8091; source: modules/activities/utils/getEmbeddedActivitiesManager.native.tsx; dependencies: [8092, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8276:6, offset: 0x01bb6c92, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getEmbeddedActivitiesManager.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getEmbeddedActivitiesManager.native.tsx');
exports.default = function() {
return importDefault(dependencyMap[0]);
};
}
global.__d(_fun64842, 8091, [8092, 2]) /* metro module 8091, dependencies: [8092, 2] */;
@@ -1,123 +1,131 @@
/* Metro module 8107; source: modules/activities/utils/getEmbeddedActivityJoinability.tsx; dependencies: [1379, 1867, 3784, 1878, 4297, 661, 8105, 4800, 7858, 566, 2] */
import ChannelStore2 from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore2 from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore2 from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import VoiceStateStore2 from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseIsActivitiesEnabledForCurrentPlatformModule from '../useIsActivitiesEnabledForCurrentPlatform.tsx'; /* Metro dependency 7858 */
function _fun64982(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:6, offset: 0x01bbbd4a, size: 395 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = getEmbeddedActivityJoinability;
const getEmbeddedActivityJoinability2 = getEmbeddedActivityJoinability;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
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 env0_8 = (require(661) /* metro dependency 661: Constants */).Permissions;
object2 = {CAN_JOIN: 0};
object2[0] = 'CAN_JOIN';
object2.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION = 1;
object2[1] = 'NO_USE_EMBEDDED_ACTIVITIES_PERMISSION';
object2.NO_CHANNEL_CONNECT_PERMISSION = 2;
object2[2] = 'NO_CHANNEL_CONNECT_PERMISSION';
object2.CHANNEL_FULL = 3;
object2[3] = 'CHANNEL_FULL';
object2.NO_CHANNEL = 4;
object2[4] = 'NO_CHANNEL';
object2.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS = 5;
object2[5] = 'ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS';
object2.ACTIVITY_NOT_SUPPORTED_ON_OS = 6;
object2[6] = 'ACTIVITY_NOT_SUPPORTED_ON_OS';
object2.ACTIVITY_AGE_GATED = 7;
object2[7] = 'ACTIVITY_AGE_GATED';
object2.NO_USER = 8;
object2[8] = 'NO_USER';
object2.IS_AFK_CHANNEL = 9;
object2[9] = 'IS_AFK_CHANNEL';
object2.NO_GUILD = 10;
object2[10] = 'NO_GUILD';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getEmbeddedActivityJoinability.tsx');
exports.default = closure;
exports.EmbeddedActivityJoinability = object2;
const channelStore = ChannelStore2;
const guildStore = GuildStore2;
const permissionStore = PermissionStore2;
const voiceStateStore = VoiceStateStore2;
object = {CAN_JOIN: 0};
object[0] = 'CAN_JOIN';
object.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION = 1;
object[1] = 'NO_USE_EMBEDDED_ACTIVITIES_PERMISSION';
object.NO_CHANNEL_CONNECT_PERMISSION = 2;
object[2] = 'NO_CHANNEL_CONNECT_PERMISSION';
object.CHANNEL_FULL = 3;
object[3] = 'CHANNEL_FULL';
object.NO_CHANNEL = 4;
object[4] = 'NO_CHANNEL';
object.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS = 5;
object[5] = 'ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS';
object.ACTIVITY_NOT_SUPPORTED_ON_OS = 6;
object[6] = 'ACTIVITY_NOT_SUPPORTED_ON_OS';
object.ACTIVITY_AGE_GATED = 7;
object[7] = 'ACTIVITY_AGE_GATED';
object.NO_USER = 8;
object[8] = 'NO_USER';
object.IS_AFK_CHANNEL = 9;
object[9] = 'IS_AFK_CHANNEL';
object.NO_GUILD = 10;
object[10] = 'NO_GUILD';
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getEmbeddedActivityJoinability.tsx');
exports.default = getEmbeddedActivityJoinability2;
exports.EmbeddedActivityJoinability = object;
exports.useEmbeddedActivityJoinability = useEmbeddedActivityJoinability;
}
function getEmbeddedActivityJoinability({userId, activity, application, channelId, currentUser, isActivitiesEnabledForCurrentPlatform, ChannelStore, VoiceStateStore, PermissionStore, GuildStore}) { // fn#64983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:734, offset: 0x01bbbed5, size: 615 bytes, params: 2, frame: 24
var r4;
var channel;
var guildId;
var guild;
var value7;
if (userId == null) {
return env0_9.NO_USER;
}
let value = undefined;
if ((currentUser == null ? value : currentUser.nsfwAllowed) === false) {
if ((application == null || application.embeddedActivityConfig == null ? value : application.embeddedActivityConfig.requires_age_gate) === true) {
value = environment;
return env0_9.ACTIVITY_AGE_GATED;
function getEmbeddedActivityJoinability({userId, activity, application, channelId, currentUser, isActivitiesEnabledForCurrentPlatform, ChannelStore, VoiceStateStore, PermissionStore, GuildStore}) { // fn#64983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:734, offset: 0x01bbbed5, size: 615 bytes, params: 2, frame: 24
var r4;
var channel;
var guildId;
var guild;
var value7;
if (userId == null) {
return env0_9.NO_USER;
}
}
if (isActivitiesEnabledForCurrentPlatform) {
if ((importDefault(8105) /* metro dependency 8105: isActivitySupportedOnClientPlatform */)(application == null || application.embeddedActivityConfig == null ? value : application.embeddedActivityConfig.supported_platforms)) {
r4 = channelId ?? (VoiceStateStore.getVoiceStateForSession(userId,
activity == null ? value : activity.session_id) == null ? value : VoiceStateStore.getVoiceStateForSession(userId,
activity == null ? value : activity.session_id).channelId);
if (r4 == null) {
return env0_9.NO_CHANNEL;
let value = undefined;
if ((currentUser == null ? value : currentUser.nsfwAllowed) === false) {
if ((application == null || application.embeddedActivityConfig == null ? value : application.embeddedActivityConfig.requires_age_gate) === true) {
value = environment;
return env0_9.ACTIVITY_AGE_GATED;
}
channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return env0_9.NO_CHANNEL;
}
if (channel.isPrivate()) {
return env0_9.CAN_JOIN;
}
guildId = channel.getGuildId();
if (guildId == null) {
return env0_9.NO_GUILD;
}
guild = GuildStore.getGuild(guildId);
if ((guild == null ? value : guild.afkChannelId) === channel.id) {
return env0_9.IS_AFK_CHANNEL;
}
value7 = VoiceStateStore.getCurrentClientVoiceChannelId(channel.getGuildId());
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.isChannelFull(channel, VoiceStateStore, GuildStore);
if (PermissionStore.can(Permissions.USE_EMBEDDED_ACTIVITIES, channel)) {
if (channel.isVocal()) {
if (value7 === r4) {
return env0_9.CAN_JOIN;
}
if (value) {
return env0_9.CHANNEL_FULL;
}
if (PermissionStore.can(Permissions.CONNECT, channel)) {
return env0_9.CAN_JOIN;
}
return env0_9.NO_CHANNEL_CONNECT_PERMISSION;
}
if (isActivitiesEnabledForCurrentPlatform) {
if ((importDefault(8105) /* metro dependency 8105: isActivitySupportedOnClientPlatform */)(application == null || application.embeddedActivityConfig == null ? value : application.embeddedActivityConfig.supported_platforms)) {
r4 = channelId ?? (VoiceStateStore.getVoiceStateForSession(userId,
activity == null ? value : activity.session_id) == null ? value : VoiceStateStore.getVoiceStateForSession(userId,
activity == null ? value : activity.session_id).channelId);
if (r4 == null) {
return env0_9.NO_CHANNEL;
}
return env0_9.CAN_JOIN;
channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return env0_9.NO_CHANNEL;
}
if (channel.isPrivate()) {
return env0_9.CAN_JOIN;
}
guildId = channel.getGuildId();
if (guildId == null) {
return env0_9.NO_GUILD;
}
guild = GuildStore.getGuild(guildId);
if ((guild == null ? value : guild.afkChannelId) === channel.id) {
return env0_9.IS_AFK_CHANNEL;
}
value7 = VoiceStateStore.getCurrentClientVoiceChannelId(channel.getGuildId());
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.isChannelFull(channel, VoiceStateStore, GuildStore);
if (PermissionStore.can(Permissions.USE_EMBEDDED_ACTIVITIES, channel)) {
if (channel.isVocal()) {
if (value7 === r4) {
return env0_9.CAN_JOIN;
}
if (value) {
return env0_9.CHANNEL_FULL;
}
if (PermissionStore.can(Permissions.CONNECT, channel)) {
return env0_9.CAN_JOIN;
}
return env0_9.NO_CHANNEL_CONNECT_PERMISSION;
}
return env0_9.CAN_JOIN;
}
return env0_9.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION;
}
return env0_9.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION;
return env0_9.ACTIVITY_NOT_SUPPORTED_ON_OS;
}
return env0_9.ACTIVITY_NOT_SUPPORTED_ON_OS;
return env0_9.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS;
}
return env0_9.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS;
}
function useEmbeddedActivityJoinability({userId, activity, channelId, application}) { // fn#64984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:2151, offset: 0x01bbc13c, size: 217 bytes, params: 2, frame: 25
const value2 = (require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */).useIsActivitiesEnabledForCurrentPlatform();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, VoiceStateStore,
PermissionStore, GuildStore], _fun64986, [activity, application, channelId, currentUser, value2, userId]);
}
function useEmbeddedActivityJoinability({userId, activity, channelId, application}) { // fn#64984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:2151, offset: 0x01bbc13c, size: 217 bytes, params: 2, frame: 25
const value2 = (UseIsActivitiesEnabledForCurrentPlatformModule).useIsActivitiesEnabledForCurrentPlatform();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
return (require(566) /* metro dependency 566: flux */).useStateFromStores([channelStore, voiceStateStore,
permissionStore, guildStore], _fun64986, [activity, application, channelId, currentUser, value2, userId]);
function _fun64986() { // fn#64986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:2401, offset: 0x01bbc215, size: 108 bytes, params: 1, frame: 13
return getEmbeddedActivityJoinability({userId: userId, activity: activity, application: application,
channelId: channelId, currentUser: currentUser, isActivitiesEnabledForCurrentPlatform: env0_4,
ChannelStore: channelStore, VoiceStateStore: voiceStateStore, PermissionStore: permissionStore,
GuildStore: guildStore});
}
}
function _fun64986() { // fn#64986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8292:2401, offset: 0x01bbc215, size: 108 bytes, params: 1, frame: 13
return getEmbeddedActivityJoinability({userId: userId, activity: activity, application: application,
channelId: channelId, currentUser: currentUser, isActivitiesEnabledForCurrentPlatform: env0_4,
ChannelStore: ChannelStore, VoiceStateStore: VoiceStateStore, PermissionStore: PermissionStore,
GuildStore: GuildStore});
}
global.__d(_fun64982, 8107, [1379, 1867, 3784, 1878, 4297, 661, 8105, 4800, 7858, 566,
2]) /* metro module 8107, dependencies: [1379, 1867, 3784, 1878, 4297, 661, 8105, 4800, 7858, 566, 2] */;
@@ -1,117 +1,126 @@
/* Metro module 9467; source: modules/activities/utils/getEmbeddedActivityLaunchability.tsx; dependencies: [1379, 1867, 3784, 4297, 4237, 661, 7858, 566, 1244, 2] */
import ChannelStore2 from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore2 from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore2 from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import VoiceStateStore2 from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun73619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:6, offset: 0x01d732c5, size: 381 bytes, params: 8, frame: 24
var object2;
let env0_0 = require;
const closure = getEmbeddedActivityLaunchability;
const getEmbeddedActivityLaunchability2 = getEmbeddedActivityLaunchability;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
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 voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_6 = (require(4237) /* metro dependency 4237: Constants */).SUPPORTED_ACTIVITIES_CHANNEL_TYPES;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
object2 = {CAN_LAUNCH: 0};
object2[0] = 'CAN_LAUNCH';
object2.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION = 1;
object2[1] = 'NO_USE_EMBEDDED_ACTIVITIES_PERMISSION';
object2.NO_CHANNEL_CONNECT_PERMISSION = 2;
object2[2] = 'NO_CHANNEL_CONNECT_PERMISSION';
object2.NO_CHANNEL = 3;
object2[3] = 'NO_CHANNEL';
object2.NO_GUILD = 4;
object2[4] = 'NO_GUILD';
object2.IS_AFK_CHANNEL = 5;
object2[5] = 'IS_AFK_CHANNEL';
object2.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS = 6;
object2[6] = 'ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS';
object2.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_CHANNEL = 7;
object2[7] = 'ACTIVITIES_FEATURE_NOT_ENABLED_FOR_CHANNEL';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getEmbeddedActivityLaunchability.tsx');
exports.EmbeddedActivityLaunchability = object2;
exports.getEmbeddedActivityLaunchability = closure;
const channelStore = ChannelStore2;
const guildStore = GuildStore2;
const permissionStore = PermissionStore2;
const voiceStateStore = VoiceStateStore2;
object = {CAN_LAUNCH: 0};
object[0] = 'CAN_LAUNCH';
object.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION = 1;
object[1] = 'NO_USE_EMBEDDED_ACTIVITIES_PERMISSION';
object.NO_CHANNEL_CONNECT_PERMISSION = 2;
object[2] = 'NO_CHANNEL_CONNECT_PERMISSION';
object.NO_CHANNEL = 3;
object[3] = 'NO_CHANNEL';
object.NO_GUILD = 4;
object[4] = 'NO_GUILD';
object.IS_AFK_CHANNEL = 5;
object[5] = 'IS_AFK_CHANNEL';
object.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS = 6;
object[6] = 'ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS';
object.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_CHANNEL = 7;
object[7] = 'ACTIVITIES_FEATURE_NOT_ENABLED_FOR_CHANNEL';
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getEmbeddedActivityLaunchability.tsx');
exports.EmbeddedActivityLaunchability = object;
exports.getEmbeddedActivityLaunchability = getEmbeddedActivityLaunchability2;
exports.getEmbeddedActivityLaunchabilityForChannel = function(a0) {
return getEmbeddedActivityLaunchability({channelId: a0, ChannelStore: ChannelStore, GuildStore: GuildStore,
PermissionStore: PermissionStore, VoiceStateStore: VoiceStateStore});
return getEmbeddedActivityLaunchability({channelId: a0, ChannelStore: channelStore, GuildStore: guildStore,
PermissionStore: permissionStore, VoiceStateStore: voiceStateStore});
};
exports.useEmbeddedActivityLaunchability = function(a0) {
var env0_0 = a0;
return require(dependencyMap[7]).useStateFromStores([ChannelStore, GuildStore, PermissionStore,
VoiceStateStore],
return require(dependencyMap[7]).useStateFromStores([channelStore, guildStore, permissionStore,
voiceStateStore],
_fun73623, [a0]);
};
exports.getEmbeddedActivityLaunchabilityLabel = getEmbeddedActivityLaunchabilityLabel;
}
function getEmbeddedActivityLaunchability({channelId, ChannelStore, GuildStore, PermissionStore, VoiceStateStore}) { // fn#73620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:693, offset: 0x01d73442, size: 373 bytes, params: 2, frame: 19
var value3;
var moduleValue;
var guildId;
var guild;
let value = ChannelStore.getChannel(channelId);
if (value == null) {
value = environment;
return env0_8.NO_CHANNEL;
}
if (SUPPORTED_ACTIVITIES_CHANNEL_TYPES.includes(value.type)) {
value3 = undefined;
moduleValue = require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */;
if (moduleValue.getIsActivitiesEnabledForCurrentPlatform()) {
if (value == null) {
return env0_8.CAN_LAUNCH;
}
if (value.isPrivate()) {
return env0_8.CAN_LAUNCH;
}
guildId = value.getGuildId();
if (guildId == null) {
return env0_8.NO_GUILD;
}
guild = GuildStore.getGuild(guildId);
if ((guild == null ? value3 : guild.afkChannelId) === value.id) {
return env0_8.IS_AFK_CHANNEL;
}
if (PermissionStore.can(Permissions.USE_EMBEDDED_ACTIVITIES, value)) {
if (value.isVocal()) {
if (VoiceStateStore.getCurrentClientVoiceChannelId(value.getGuildId()) === channelId) {
return env0_8.CAN_LAUNCH;
}
if (PermissionStore.can(Permissions.CONNECT, value)) {
return env0_8.CAN_LAUNCH;
}
return env0_8.NO_CHANNEL_CONNECT_PERMISSION;
}
return env0_8.CAN_LAUNCH;
}
return env0_8.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION;
function getEmbeddedActivityLaunchability({channelId, ChannelStore, GuildStore, PermissionStore, VoiceStateStore}) { // fn#73620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:693, offset: 0x01d73442, size: 373 bytes, params: 2, frame: 19
var value3;
var moduleValue;
var guildId;
var guild;
let value = ChannelStore.getChannel(channelId);
if (value == null) {
value = environment;
return env0_8.NO_CHANNEL;
}
return env0_8.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS;
if (SUPPORTED_ACTIVITIES_CHANNEL_TYPES.includes(value.type)) {
value3 = undefined;
moduleValue = require(7858) /* metro dependency 7858: useIsActivitiesEnabledForCurrentPlatform */;
if (moduleValue.getIsActivitiesEnabledForCurrentPlatform()) {
if (value == null) {
return env0_8.CAN_LAUNCH;
}
if (value.isPrivate()) {
return env0_8.CAN_LAUNCH;
}
guildId = value.getGuildId();
if (guildId == null) {
return env0_8.NO_GUILD;
}
guild = GuildStore.getGuild(guildId);
if ((guild == null ? value3 : guild.afkChannelId) === value.id) {
return env0_8.IS_AFK_CHANNEL;
}
if (PermissionStore.can(Permissions.USE_EMBEDDED_ACTIVITIES, value)) {
if (value.isVocal()) {
if (VoiceStateStore.getCurrentClientVoiceChannelId(value.getGuildId()) === channelId) {
return env0_8.CAN_LAUNCH;
}
if (PermissionStore.can(Permissions.CONNECT, value)) {
return env0_8.CAN_LAUNCH;
}
return env0_8.NO_CHANNEL_CONNECT_PERMISSION;
}
return env0_8.CAN_LAUNCH;
}
return env0_8.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION;
}
return env0_8.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS;
}
return env0_8.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_CHANNEL;
}
return env0_8.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_CHANNEL;
}
function useEmbeddedActivityLaunchability(a0) { // fn#73622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:1912, offset: 0x01d735f4, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, GuildStore,
PermissionStore, VoiceStateStore], _fun73623, [a0]);
}
function useEmbeddedActivityLaunchability(a0) { // fn#73622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:1912, offset: 0x01d735f4, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([channelStore, guildStore,
permissionStore, voiceStateStore], _fun73623, [a0]);
function _fun73623() { // fn#73623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:2002, offset: 0x01d73657, size: 65 bytes, params: 1, frame: 12
return getEmbeddedActivityLaunchability({channelId: env0_0, ChannelStore: channelStore, GuildStore: guildStore,
PermissionStore: permissionStore, VoiceStateStore: voiceStateStore});
}
function getEmbeddedActivityLaunchabilityLabel(a0) { // fn#73624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:2165, offset: 0x01d73698, size: 216 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const CAN_LAUNCH = env0_8.CAN_LAUNCH;
if (CAN_LAUNCH === a0) {
return intl.string(t.qJvTKQ);
}
const NO_USE_EMBEDDED_ACTIVITIES_PERMISSION = env0_8.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION;
if (NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === a0) {
return intl.string(t.hHGrWz);
function getEmbeddedActivityLaunchabilityLabel(a0) { // fn#73624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:2165, offset: 0x01d73698, size: 216 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const CAN_LAUNCH = env0_8.CAN_LAUNCH;
if (CAN_LAUNCH === a0) {
return intl.string(t.qJvTKQ);
}
const NO_USE_EMBEDDED_ACTIVITIES_PERMISSION = env0_8.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION;
if (NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === a0) {
return intl.string(t.hHGrWz);
}
return intl.string(t.j29zCr);
}
return intl.string(t.j29zCr);
}
function _fun73623() { // fn#73623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9653:2002, offset: 0x01d73657, size: 65 bytes, params: 1, frame: 12
return getEmbeddedActivityLaunchability({channelId: env0_0, ChannelStore: ChannelStore, GuildStore: GuildStore,
PermissionStore: PermissionStore, VoiceStateStore: VoiceStateStore});
}
global.__d(_fun73619, 9467, [1379, 1867, 3784, 4297, 4237, 661, 7858, 566, 1244,
2]) /* metro module 9467, dependencies: [1379, 1867, 3784, 4297, 4237, 661, 7858, 566, 1244, 2] */;
@@ -1,14 +1,15 @@
/* Metro module 15128; source: modules/activities/utils/getGamePlatform.tsx; dependencies: [661, 10214, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun115325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15325:6, offset: 0x0245caf1, size: 130 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.ActivityTypes;
const env0_3 = constantsModule.ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getGamePlatform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getGamePlatform.tsx');
exports.default = function(a0) {
var value = null;
return value == a0 || value == a0.type || a0.type !== ActivityTypes.PLAYING ? value : importDefault(dependencyMap[1])(a0) ? ActivityGamePlatforms.XBOX : value != a0.platform ? a0.platform : ActivityGamePlatforms.DESKTOP;
};
}
global.__d(_fun115325, 15128, [661, 10214, 2]) /* metro module 15128, dependencies: [661, 10214, 2] */;
@@ -1,27 +1,30 @@
/* Metro module 10713; source: modules/activities/utils/getIFrameSandboxAttributes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun82333(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10899:6, offset: 0x01ef37d8, size: 101 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = ['allow-pointer-lock', 'allow-scripts', 'allow-same-origin', 'allow-forms'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getIFrameSandboxAttributes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getIFrameSandboxAttributes.tsx');
exports.default = getIFrameSandboxAttributes;
}
function getIFrameSandboxAttributes({allowPopups}) { // fn#82334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10899:270, offset: 0x01ef383d, size: 86 bytes, params: 2, frame: 14
var r2;
var items2;
var value;
let binding = env0_0;
if (allowPopups) {
binding = env0_0;
items2 = [];
value = arraySpread(items2, binding, 0, undefined);
items2[value] = 'allow-popups';
items2[value + 1] = 'allow-popups-to-escape-sandbox';
r2 = items2;
} else {
r2 = binding;
function getIFrameSandboxAttributes({allowPopups}) { // fn#82334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10899:270, offset: 0x01ef383d, size: 86 bytes, params: 2, frame: 14
var r2;
var items2;
var value;
let binding = env0_0;
if (allowPopups) {
binding = env0_0;
items2 = [];
value = arraySpread(items2, binding, 0, undefined);
items2[value] = 'allow-popups';
items2[value + 1] = 'allow-popups-to-escape-sandbox';
r2 = items2;
} else {
r2 = binding;
}
return r2.join(' ');
}
return r2.join(' ');
}
global.__d(_fun82333, 10713, [2]) /* metro module 10713, dependencies: [2] */;
@@ -1,15 +1,18 @@
/* Metro module 10585; source: modules/activities/utils/getIsAskToJoin.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10771:6, offset: 0x01ed92ef, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).ActivityActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getIsAskToJoin.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getIsAskToJoin.tsx');
exports.getIsAskToJoin = getIsAskToJoin;
function getIsAskToJoin({activity}) { // fn#81669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10771:220, offset: 0x01ed935c, size: 44 bytes, params: 2, frame: 3
const type = activity?.type;
const JOIN_REQUEST = ActivityActionTypes.JOIN_REQUEST;
return type === JOIN_REQUEST;
}
}
function getIsAskToJoin({activity}) { // fn#81669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10771:220, offset: 0x01ed935c, size: 44 bytes, params: 2, frame: 3
const type = activity?.type;
const JOIN_REQUEST = ActivityActionTypes.JOIN_REQUEST;
return type === JOIN_REQUEST;
}
global.__d(_fun81668, 10585, [661, 2]) /* metro module 10585, dependencies: [661, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 10260; source: modules/activities/utils/getIsInParty.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79663(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10446:6, offset: 0x01e5d842, 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/utils/getIsInParty.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getIsInParty.tsx');
exports.getIsInParty = function(a0, a1) {
var r0;
var r1;
@@ -20,3 +22,4 @@ function _fun79663(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun79663, 10260, [2]) /* metro module 10260, dependencies: [2] */;
@@ -1,41 +1,45 @@
/* Metro module 11684; source: modules/activities/utils/getItemSubtitleForMaxPlayers.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun89541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:6, offset: 0x02012c2d, size: 124 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/getItemSubtitleForMaxPlayers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getItemSubtitleForMaxPlayers.tsx');
exports.default = getItemSubtitleForMaxPlayers;
exports.getItemSubtitleForMaxPlayersShort = getItemSubtitleForMaxPlayersShort;
exports.getItemSubtitleForMaxPlayersShorter = getItemSubtitleForMaxPlayersShorter;
}
function getItemSubtitleForMaxPlayers(a0) { // fn#89542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:193, offset: 0x02012ca9, size: 138 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return a0 > 0 ? intl.formatToPlainString(t['p/YmkR'], {count: a0}) : intl.string(t.s1vQIL);
}
function getItemSubtitleForMaxPlayersShort(a0) { // fn#89543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:384, offset: 0x02012d33, size: 94 bytes, params: 2, frame: 15
var r0;
var intl;
if (a0 > 0) {
r0 = '1 - ' + a0;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zMNEiF);
function getItemSubtitleForMaxPlayers(a0) { // fn#89542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:193, offset: 0x02012ca9, size: 138 bytes, params: 2, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
return a0 > 0 ? intl.formatToPlainString(t['p/YmkR'], {count: a0}) : intl.string(t.s1vQIL);
}
return r0;
}
function getItemSubtitleForMaxPlayersShorter(a0) { // fn#89544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:529, offset: 0x02012d91, size: 94 bytes, params: 2, frame: 15
var r0;
var intl;
if (a0 > 0) {
r0 = '1-' + a0;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zMNEiF);
function getItemSubtitleForMaxPlayersShort(a0) { // fn#89543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:384, offset: 0x02012d33, size: 94 bytes, params: 2, frame: 15
var r0;
var intl;
if (a0 > 0) {
r0 = '1 - ' + a0;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zMNEiF);
}
return r0;
}
return r0;
function getItemSubtitleForMaxPlayersShorter(a0) { // fn#89544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11870:529, offset: 0x02012d91, size: 94 bytes, params: 2, frame: 15
var r0;
var intl;
if (a0 > 0) {
r0 = '1-' + a0;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zMNEiF);
}
return r0;
}
}
global.__d(_fun89541, 11684, [1244, 2]) /* metro module 11684, dependencies: [1244, 2] */;
@@ -1,26 +1,29 @@
/* Metro module 10262; source: modules/activities/utils/getPartySize.tsx; dependencies: [57, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10448:6, offset: 0x01e5db22, size: 106 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getPartySize.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getPartySize.tsx');
exports.getPartySize = getPartySize;
function getPartySize(a0) { // fn#79670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10448:196, offset: 0x01e5db8c, size: 126 bytes, params: 2, frame: 13
if (a0 == null) {
return {'partySize': -1, 'maxPartySize': -1};
}
if (a0.party == null) {
return {'partySize': -1, 'maxPartySize': -1};
}
if (a0.party.size == null) {
return {'partySize': -1, 'maxPartySize': -1};
}
if (a0.party.size.length < 2) {
return {'partySize': -1, 'maxPartySize': -1};
}
const value = Module00057(a0.party.size, 2);
return {partySize: value[0], maxPartySize: value[1]};
}
}
function getPartySize(a0) { // fn#79670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10448:196, offset: 0x01e5db8c, size: 126 bytes, params: 2, frame: 13
if (a0 == null) {
return {'partySize': -1, 'maxPartySize': -1};
}
if (a0.party == null) {
return {'partySize': -1, 'maxPartySize': -1};
}
if (a0.party.size == null) {
return {'partySize': -1, 'maxPartySize': -1};
}
if (a0.party.size.length < 2) {
return {'partySize': -1, 'maxPartySize': -1};
}
const value = env0_0(a0.party.size, 2);
return {partySize: value[0], maxPartySize: value[1]};
}
global.__d(_fun79669, 10262, [57, 2]) /* metro module 10262, dependencies: [57, 2] */;
@@ -1,20 +1,24 @@
/* Metro module 8049; source: modules/activities/utils/getPlatform.tsx; dependencies: [1909, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
function _fun63815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8227:6, offset: 0x01b90b6a, size: 94 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/getPlatform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getPlatform.tsx');
exports.default = getPlatform_63816;
function getPlatform_63816(a0) { // fn#63816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8227:176, offset: 0x01b90bc8, size: 133 bytes, params: 2, frame: 11
const EmbeddedActivitySupportedPlatforms = (ServerModule).EmbeddedActivitySupportedPlatforms;
if (a0 === 'android') {
return EmbeddedActivitySupportedPlatforms.ANDROID;
}
if (a0 === 'ios') {
return EmbeddedActivitySupportedPlatforms.IOS;
}
return EmbeddedActivitySupportedPlatforms.WEB;
}
}
function getPlatform_63816(a0) { // fn#63816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8227:176, offset: 0x01b90bc8, size: 133 bytes, params: 2, frame: 11
const EmbeddedActivitySupportedPlatforms = (require(1909) /* metro dependency 1909: Server */).EmbeddedActivitySupportedPlatforms;
if (a0 === 'android') {
return EmbeddedActivitySupportedPlatforms.ANDROID;
}
if (a0 === 'ios') {
return EmbeddedActivitySupportedPlatforms.IOS;
}
return EmbeddedActivitySupportedPlatforms.WEB;
}
global.__d(_fun63815, 8049, [1909, 2]) /* metro module 8049, dependencies: [1909, 2] */;
@@ -1,28 +1,31 @@
/* Metro module 11599; source: modules/activities/utils/getPreviewVideoAssetUrl.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun88827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11785:6, offset: 0x01ff3b46, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getPreviewVideoAssetUrl.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getPreviewVideoAssetUrl.tsx');
exports.default = getPreviewVideoAssetUrl;
}
function getPreviewVideoAssetUrl(a0, a1) { // fn#88828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11785:212, offset: 0x01ff3bb3, size: 162 bytes, params: 3, frame: 22
var r0;
var protocol;
var value;
let GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
GLOBAL_ENV = global.window.GLOBAL_ENV;
const API_ENDPOINT = GLOBAL_ENV.API_ENDPOINT;
if (CDN_HOST != null) {
r0 = 'https://' + CDN_HOST + '/app-assets/' + a0 + '/store/' + a1 + '.mp4';
} else {
protocol = global.location.protocol;
value = Endpoints.STORE_ASSET(a0, a1, 'mp4');
value = '' + protocol + API_ENDPOINT + value;
r0 = value;
function getPreviewVideoAssetUrl(a0, a1) { // fn#88828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11785:212, offset: 0x01ff3bb3, size: 162 bytes, params: 3, frame: 22
var r0;
var protocol;
var value;
let GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
GLOBAL_ENV = global.window.GLOBAL_ENV;
const API_ENDPOINT = GLOBAL_ENV.API_ENDPOINT;
if (CDN_HOST != null) {
r0 = 'https://' + CDN_HOST + '/app-assets/' + a0 + '/store/' + a1 + '.mp4';
} else {
protocol = global.location.protocol;
value = Endpoints.STORE_ASSET(a0, a1, 'mp4');
value = '' + protocol + API_ENDPOINT + value;
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun88827, 11599, [661, 2]) /* metro module 11599, dependencies: [661, 2] */;
@@ -1,39 +1,43 @@
/* Metro module 10582; source: modules/activities/utils/getRemoteJoinFooterLabel.tsx; dependencies: [661, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun81662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10768:6, offset: 0x01ed8e96, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getRemoteJoinFooterLabel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getRemoteJoinFooterLabel.tsx');
exports.getRemoteJoinFooterLabel = getRemoteJoinFooterLabel;
function getRemoteJoinFooterLabel(a0) { // fn#81663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10768:242, offset: 0x01ed8f0b, size: 408 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const DESKTOP = ActivityGamePlatforms.DESKTOP;
if (DESKTOP === a0) {
return intl.string(t.aqN8U9);
}
const IOS = ActivityGamePlatforms.IOS;
if (IOS === a0) {
return intl.string(t.CyQ5ia);
}
const ANDROID = ActivityGamePlatforms.ANDROID;
if (ANDROID === a0) {
return intl.string(t.fMs6uW);
}
const XBOX = ActivityGamePlatforms.XBOX;
if (XBOX === a0) {
return intl.string(t.o0hjdt);
}
const PS4 = ActivityGamePlatforms.PS4;
if (PS4 === a0) {
return intl.string(t['R/1GpG']);
}
const PS5 = ActivityGamePlatforms.PS5;
if (PS5 === a0) {
return intl.string(t['R/1GpG']);
}
}
}
function getRemoteJoinFooterLabel(a0) { // fn#81663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10768:242, offset: 0x01ed8f0b, size: 408 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DESKTOP = ActivityGamePlatforms.DESKTOP;
if (DESKTOP === a0) {
return intl.string(t.aqN8U9);
}
const IOS = ActivityGamePlatforms.IOS;
if (IOS === a0) {
return intl.string(t.CyQ5ia);
}
const ANDROID = ActivityGamePlatforms.ANDROID;
if (ANDROID === a0) {
return intl.string(t.fMs6uW);
}
const XBOX = ActivityGamePlatforms.XBOX;
if (XBOX === a0) {
return intl.string(t.o0hjdt);
}
const PS4 = ActivityGamePlatforms.PS4;
if (PS4 === a0) {
return intl.string(t['R/1GpG']);
}
const PS5 = ActivityGamePlatforms.PS5;
if (PS5 === a0) {
return intl.string(t['R/1GpG']);
}
}
global.__d(_fun81662, 10582, [661, 1244, 2]) /* metro module 10582, dependencies: [661, 1244, 2] */;
@@ -1,77 +1,83 @@
/* Metro module 10589; source: modules/activities/utils/getRemoteJoinableActivityPlatform.tsx; dependencies: [5110, 4296, 661, 478, 1391, 6884, 2] */
import SessionsStore from '../../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
import ConnectedAppsStore from '../../../stores/ConnectedAppsStore.tsx'; /* Metro dependency 5110 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81681(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10775:6, offset: 0x01ed9ff3, size: 162 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const connectedAppsStore = importDefault(5110) /* metro dependency 5110: ConnectedAppsStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ActivityFlags;
const env0_5 = constantsModule.ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getRemoteJoinableActivityPlatform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getRemoteJoinableActivityPlatform.tsx');
exports.getRemoteJoinableActivityPlatform = getRemoteJoinableActivityPlatform;
}
function getRemoteJoinableActivityPlatform(a0) { // fn#81682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10775:302, offset: 0x01eda095, size: 403 bytes, params: 2, frame: 20
var r4;
var r1;
var remoteApplicationActivity;
var moduleValue2;
var platform;
var moduleValue3;
var isIOS2;
var moduleValue5;
const value = null;
if (value != a0) {
var application_id = a0.application_id;
if (value == application_id) {
return value;
}
var moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
var hasFlag = moduleValue.hasFlag;
var flags = a0.flags;
var value3 = 0;
var r3 = value != flags ? flags : value3;
var SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN = ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN;
if (Reflect.apply(hasFlag, moduleValue, [r3, SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN])) {
remoteApplicationActivity = SessionsStore.getRemoteApplicationActivity(application_id);
if (value == remoteApplicationActivity) {
r1 = value;
} else {
moduleValue2 = require(6884) /* metro dependency 6884: ActivityFlagUtils */;
if (moduleValue2.isContextlessEmbeddedActivity(remoteApplicationActivity)) {
r1 = value;
} else if (value == remoteApplicationActivity.application_id) {
moduleValue5 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue5.hasFlag;
flags = remoteApplicationActivity.flags;
r1 = Reflect.apply(hasFlag, moduleValue5, [value != flags ? flags : value3,
ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN]) && value != remoteApplicationActivity.platform ? remoteApplicationActivity.platform : value;
} else if (ConnectedAppsStore.isConnected(remoteApplicationActivity.application_id)) {
function getRemoteJoinableActivityPlatform(a0) { // fn#81682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10775:302, offset: 0x01eda095, size: 403 bytes, params: 2, frame: 20
var r4;
var r1;
var remoteApplicationActivity;
var moduleValue2;
var connectedAppsStoreBinding;
var platform;
var moduleValue3;
var isIOS2;
var moduleValue5;
const value = null;
if (value != a0) {
var application_id = a0.application_id;
if (value == application_id) {
return value;
}
var moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
var hasFlag = moduleValue.hasFlag;
var flags = a0.flags;
var value3 = 0;
var r3 = value != flags ? flags : value3;
var SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN = ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN;
if (Reflect.apply(hasFlag, moduleValue, [r3, SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN])) {
remoteApplicationActivity = SessionsStore.getRemoteApplicationActivity(application_id);
if (value == remoteApplicationActivity) {
r1 = value;
} else {
platform = remoteApplicationActivity.platform;
moduleValue3 = require(478) /* metro dependency 478: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r4 = platform === ActivityGamePlatforms.ANDROID;
} else {
isIOS2 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS();
r4 = isIOS2 ? platform === ActivityGamePlatforms.IOS : !!isIOS2;
}
if (r4) {
moduleValue2 = require(6884) /* metro dependency 6884: ActivityFlagUtils */;
if (moduleValue2.isContextlessEmbeddedActivity(remoteApplicationActivity)) {
r1 = value;
} else {
} else if (value == remoteApplicationActivity.application_id) {
moduleValue5 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue5.hasFlag;
flags = remoteApplicationActivity.flags;
r1 = Reflect.apply(hasFlag, moduleValue5, [value != flags ? flags : value3,
ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN]) && value != remoteApplicationActivity.platform ? remoteApplicationActivity.platform : value;
} else {
connectedAppsStoreBinding = ConnectedAppsStore;
if (connectedAppsStoreBinding.isConnected(remoteApplicationActivity.application_id)) {
r1 = value;
} else {
platform = remoteApplicationActivity.platform;
moduleValue3 = require(478) /* metro dependency 478: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r4 = platform === ActivityGamePlatforms.ANDROID;
} else {
isIOS2 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS();
r4 = isIOS2 ? platform === ActivityGamePlatforms.IOS : !!isIOS2;
}
if (r4) {
r1 = value;
} else {
moduleValue5 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue5.hasFlag;
flags = remoteApplicationActivity.flags;
r1 = Reflect.apply(hasFlag, moduleValue5, [value != flags ? flags : value3,
ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN]) && value != remoteApplicationActivity.platform ? remoteApplicationActivity.platform : value;
}
}
}
}
return r1;
}
return r1;
}
return value;
}
return value;
}
global.__d(_fun81681, 10589, [5110, 4296, 661, 478, 1391, 6884,
2]) /* metro module 10589, dependencies: [5110, 4296, 661, 478, 1391, 6884, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 10266; source: modules/activities/utils/getStreamURL.tsx; dependencies: [4237, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun79695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10452:6, offset: 0x01e5e3c8, 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 */).validStreamURL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getStreamURL.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getStreamURL.tsx');
exports.default = function(a0) {
if (a0 != null) {
if (a0.url == null) {
@@ -16,3 +18,4 @@ function _fun79695(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun79695, 10266, [4237, 2]) /* metro module 10266, dependencies: [4237, 2] */;
@@ -1,14 +1,17 @@
/* Metro module 10592; source: modules/activities/utils/getSupportsRemoteJoin.tsx; dependencies: [661, 6886, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81688(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10778:6, offset: 0x01eda444, 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 */).ActivityFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/getSupportsRemoteJoin.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/getSupportsRemoteJoin.tsx');
exports.getSupportsRemoteJoin = getSupportsRemoteJoin;
function getSupportsRemoteJoin(a0) { // fn#81689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10778:228, offset: 0x01eda4bc, size: 55 bytes, params: 2, frame: 15
return a0 != null && (importDefault(6886) /* metro dependency 6886: hasFlag */)(a0,
ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN);
}
}
function getSupportsRemoteJoin(a0) { // fn#81689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10778:228, offset: 0x01eda4bc, size: 55 bytes, params: 2, frame: 15
return a0 != null && (importDefault(6886) /* metro dependency 6886: hasFlag */)(a0,
ActivityFlags.SUPPORTS_REMOTE_ACTIVITY_ACTION_JOIN);
}
global.__d(_fun81688, 10592, [661, 6886, 2]) /* metro module 10592, dependencies: [661, 6886, 2] */;
+23 -20
View File
@@ -1,30 +1,33 @@
/* Metro module 6886; source: modules/activities/utils/hasFlag.tsx; dependencies: [661, 1391, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun54665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7064:6, offset: 0x0136b5f0, size: 115 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ActivityFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/hasFlag.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/hasFlag.tsx');
exports.default = hasFlag_54666;
}
function hasFlag_54666(a0, a1) { // fn#54666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7064:200, offset: 0x0136b663, size: 103 bytes, params: 3, frame: 17
var r1;
var r0;
var value;
const INSTANCE = ActivityFlags.INSTANCE;
const value2 = a1 !== INSTANCE;
if (value2) {
r1 = a0 != null && a0.flags != null;
if (r1) {
value = require(1391) /* metro dependency 1391: FlagUtils */;
value = value.hasFlag(a0.flags ?? 0, a1);
r1 = value;
function hasFlag_54666(a0, a1) { // fn#54666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7064:200, offset: 0x0136b663, size: 103 bytes, params: 3, frame: 17
var r1;
var r0;
var value;
const INSTANCE = ActivityFlags.INSTANCE;
const value2 = a1 !== INSTANCE;
if (value2) {
r1 = a0 != null && a0.flags != null;
if (r1) {
value = require(1391) /* metro dependency 1391: FlagUtils */;
value = value.hasFlag(a0.flags ?? 0, a1);
r1 = value;
}
r0 = r1;
} else {
r0 = value2;
}
r0 = r1;
} else {
r0 = value2;
return r0;
}
return r0;
}
global.__d(_fun54665, 6886, [661, 1391, 2]) /* metro module 6886, dependencies: [661, 1391, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 10263; source: modules/activities/utils/hasPartySize.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10449:6, offset: 0x01e5dc0a, 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/utils/hasPartySize.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/hasPartySize.tsx');
exports.hasPartySize = function({partySize, maxPartySize}) {
return partySize > -1 && maxPartySize > -1;
};
}
global.__d(_fun79671, 10263, [2]) /* metro module 10263, dependencies: [2] */;
@@ -1,22 +1,25 @@
/* Metro module 4397; source: modules/activities/utils/hasRichActivity.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun37321(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4569:6, offset: 0x010a15c7, size: 107 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/hasRichActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/hasRichActivity.tsx');
exports.default = hasRichActivity;
}
function hasRichActivity(a0) { // fn#37322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4569:208, offset: 0x010a1632, size: 147 bytes, params: 2, frame: 7
var r1;
let r0 = a0 != null && a0.type !== ActivityTypes.CUSTOM_STATUS;
if (r0) {
r1 = a0.details != null || a0.assets != null && (a0.assets.large_image != null || a0.assets.small_text != null);
r1 = !r1 ? a0.party != null : r1;
r1 = !r1 ? a0.secrets != null : r1;
r1 = !r1 ? a0.state != null : r1;
r0 = r1;
function hasRichActivity(a0) { // fn#37322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4569:208, offset: 0x010a1632, size: 147 bytes, params: 2, frame: 7
var r1;
let r0 = a0 != null && a0.type !== ActivityTypes.CUSTOM_STATUS;
if (r0) {
r1 = a0.details != null || a0.assets != null && (a0.assets.large_image != null || a0.assets.small_text != null);
r1 = !r1 ? a0.party != null : r1;
r1 = !r1 ? a0.secrets != null : r1;
r1 = !r1 ? a0.state != null : r1;
r0 = r1;
}
return r0;
}
return r0;
}
global.__d(_fun37321, 4397, [661, 2]) /* metro module 4397, dependencies: [661, 2] */;
@@ -1,55 +1,56 @@
/* Metro module 10261; source: modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx; dependencies: [661, 478, 1581, 6886, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun79665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:6, offset: 0x01e5d908, size: 180 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getCurrentActivityGamePlatform;
const closure2 = isActivityJoinable;
const getCurrentActivityGamePlatform2 = getCurrentActivityGamePlatform;
const isActivityJoinable2 = isActivityJoinable;
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.ActivityGamePlatforms;
const env0_5 = constantsModule.ActivityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx');
exports.default = isActivityJoinableOnCurrentPlatform;
exports.getCurrentActivityGamePlatform = closure;
exports.isActivityJoinable = closure2;
}
function getCurrentActivityGamePlatform() { // fn#79666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:168, offset: 0x01e5d9bc, size: 145 bytes, params: 1, frame: 14
var r0;
var moduleValue2;
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
r0 = ActivityGamePlatforms.IOS;
} else {
moduleValue2 = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
r0 = moduleValue2.isMetaQuest() ? ActivityGamePlatforms.META_QUEST : platformUtilsModule.isAndroid() ? ActivityGamePlatforms.ANDROID : ActivityGamePlatforms.DESKTOP;
}
return r0;
}
function isActivityJoinable(a0) { // fn#79667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:314, offset: 0x01e5da4d, size: 86 bytes, params: 2, frame: 15
let r0 = a0 == null || !(importDefault(6886) /* metro dependency 6886: hasFlag */)(a0, ActivityFlags.JOIN);
r0 = !r0 ? a0.type !== ActivityTypes.PLAYING : r0;
return !r0;
}
function isActivityJoinableOnCurrentPlatform(a0) { // fn#79668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:510, offset: 0x01e5daa3, size: 127 bytes, params: 2, frame: 15
var supported_platforms;
var r0;
var currentActivityGamePlatform;
const isActivityJoinableBinding = isActivityJoinable;
const value2 = undefined;
if (isActivityJoinableBinding(a0)) {
currentActivityGamePlatform = getCurrentActivityGamePlatform();
if (((a0 == null ? value2 : a0.platform) != null ? a0.platform : ActivityGamePlatforms.DESKTOP) === currentActivityGamePlatform) {
return true;
exports.getCurrentActivityGamePlatform = getCurrentActivityGamePlatform2;
exports.isActivityJoinable = isActivityJoinable2;
function getCurrentActivityGamePlatform() { // fn#79666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:168, offset: 0x01e5d9bc, size: 145 bytes, params: 1, frame: 14
var r0;
var moduleValue2;
if (PlatformUtilsModule.isIOS()) {
r0 = ActivityGamePlatforms.IOS;
} else {
moduleValue2 = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
r0 = moduleValue2.isMetaQuest() ? ActivityGamePlatforms.META_QUEST : PlatformUtilsModule.isAndroid() ? ActivityGamePlatforms.ANDROID : ActivityGamePlatforms.DESKTOP;
}
supported_platforms = a0 == null ? value2 : a0.supported_platforms;
r0 = supported_platforms != null && supported_platforms.length !== 0;
r0 = r0 && supported_platforms.includes(currentActivityGamePlatform);
return r0;
}
return false;
function isActivityJoinable(a0) { // fn#79667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:314, offset: 0x01e5da4d, size: 86 bytes, params: 2, frame: 15
let r0 = a0 == null || !(importDefault(6886) /* metro dependency 6886: hasFlag */)(a0, ActivityFlags.JOIN);
r0 = !r0 ? a0.type !== ActivityTypes.PLAYING : r0;
return !r0;
}
function isActivityJoinableOnCurrentPlatform(a0) { // fn#79668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10447:510, offset: 0x01e5daa3, size: 127 bytes, params: 2, frame: 15
var supported_platforms;
var r0;
var currentActivityGamePlatform;
const isActivityJoinableBinding = isActivityJoinable;
const value2 = undefined;
if (isActivityJoinableBinding(a0)) {
currentActivityGamePlatform = getCurrentActivityGamePlatform();
if (((a0 == null ? value2 : a0.platform) != null ? a0.platform : ActivityGamePlatforms.DESKTOP) === currentActivityGamePlatform) {
return true;
}
supported_platforms = a0 == null ? value2 : a0.supported_platforms;
r0 = supported_platforms != null && supported_platforms.length !== 0;
r0 = r0 && supported_platforms.includes(currentActivityGamePlatform);
return r0;
}
return false;
}
}
global.__d(_fun79665, 10261, [661, 478, 1581, 6886,
2]) /* metro module 10261, dependencies: [661, 478, 1581, 6886, 2] */;
@@ -1,15 +1,19 @@
/* Metro module 8105; source: modules/activities/utils/isActivitySupportedOnClientPlatform.tsx; dependencies: [477, 1909, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
function _fun64969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8290:6, offset: 0x01bbb49b, size: 94 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/isActivitySupportedOnClientPlatform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isActivitySupportedOnClientPlatform.tsx');
exports.default = isActivitySupportedOnClientPlatform;
function isActivitySupportedOnClientPlatform(a0) { // fn#64970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8290:200, offset: 0x01bbb4f9, size: 169 bytes, params: 2, frame: 16
const EmbeddedActivitySupportedPlatforms = (ServerModule).EmbeddedActivitySupportedPlatforms;
const r1 = a0?.includes((require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? EmbeddedActivitySupportedPlatforms.IOS : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? EmbeddedActivitySupportedPlatforms.ANDROID : EmbeddedActivitySupportedPlatforms.WEB);
return r1 != null && r1;
}
}
function isActivitySupportedOnClientPlatform(a0) { // fn#64970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8290:200, offset: 0x01bbb4f9, size: 169 bytes, params: 2, frame: 16
const EmbeddedActivitySupportedPlatforms = (require(1909) /* metro dependency 1909: Server */).EmbeddedActivitySupportedPlatforms;
const r1 = a0?.includes((require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? EmbeddedActivitySupportedPlatforms.IOS : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? EmbeddedActivitySupportedPlatforms.ANDROID : EmbeddedActivitySupportedPlatforms.WEB);
return r1 != null && r1;
}
global.__d(_fun64969, 8105, [477, 1909, 2]) /* metro module 8105, dependencies: [477, 1909, 2] */;
@@ -1,13 +1,16 @@
/* Metro module 8846; source: modules/activities/utils/isCrunchyrollActivity.tsx; dependencies: [8847, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CrunchyrollConnectionConstantsModule from '../../connections/CrunchyrollConnectionConstants.tsx'; /* Metro dependency 8847 */
function _fun69019(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9031:6, offset: 0x01c65332, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(8847) /* metro dependency 8847: CrunchyrollConnectionConstants */).CRUNCHYROLL_CLIENT_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isCrunchyrollActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isCrunchyrollActivity.tsx');
exports.default = isCrunchyrollActivity;
function isCrunchyrollActivity(a0) { // fn#69020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9031:222, offset: 0x01c6539f, size: 33 bytes, params: 2, frame: 3
return a0?.application_id === CRUNCHYROLL_CLIENT_ID;
}
}
function isCrunchyrollActivity(a0) { // fn#69020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9031:222, offset: 0x01c6539f, size: 33 bytes, params: 2, frame: 3
return a0?.application_id === CRUNCHYROLL_CLIENT_ID;
}
global.__d(_fun69019, 8846, [8847, 2]) /* metro module 8846, dependencies: [8847, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 6885; source: modules/activities/utils/isEmbeddedActivity.tsx; dependencies: [661, 6886, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun54663(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7063:6, offset: 0x0136b54c, size: 118 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ActivityFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isEmbeddedActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isEmbeddedActivity.tsx');
exports.default = function(a0) {
return importDefault(dependencyMap[1])(a0, ActivityFlags.EMBEDDED);
};
}
global.__d(_fun54663, 6885, [661, 6886, 2]) /* metro module 6885, dependencies: [661, 6886, 2] */;
@@ -1,13 +1,16 @@
/* Metro module 8838; source: modules/activities/utils/isGameActivity.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun69005(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9023:6, offset: 0x01c6478d, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isGameActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isGameActivity.tsx');
exports.default = isGameActivity;
function isGameActivity(a0) { // fn#69006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9023:207, offset: 0x01c647fa, size: 36 bytes, params: 2, frame: 3
return a0 != null && a0.type === ActivityTypes.PLAYING;
}
}
function isGameActivity(a0) { // fn#69006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9023:207, offset: 0x01c647fa, size: 36 bytes, params: 2, frame: 3
return a0 != null && a0.type === ActivityTypes.PLAYING;
}
global.__d(_fun69005, 8838, [661, 2]) /* metro module 8838, dependencies: [661, 2] */;
@@ -1,27 +1,32 @@
/* Metro module 10584; source: modules/activities/utils/isInviteActive.tsx; dependencies: [672, 21, 2] */
import SnowflakeUtils from '../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Durations from '../../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun81666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10770:6, offset: 0x01ed91a9, size: 136 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
const value = 2 * HOUR;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isInviteActive.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isInviteActive.tsx');
exports.default = isInviteActive;
exports.EMBED_LIFETIME = value;
}
function isInviteActive(a0, a1, a2) { // fn#81667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10770:207, offset: 0x01ed9231, size: 190 bytes, params: 4, frame: 16
let value = null;
if (value == a0) {
return false;
function isInviteActive(a0, a1, a2) { // fn#81667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10770:207, offset: 0x01ed9231, size: 190 bytes, params: 4, frame: 16
let value = null;
if (value == a0) {
return false;
}
const party_id = value != a1.activity ? a1.activity.party_id : value;
const r3 = value != party_id && (value == a0.party ? undefined : a0.party.id) !== party_id;
const defaultImport = SnowflakeUtils;
const value7 = defaultImport.extractTimestamp(a1.id) + env0_2;
const Date = global.Date;
const value8 = value7 < Date.now();
value = value != a0.application_id;
return !r3 && !value8 && !(value && a0.application_id !== a2);
}
const party_id = value != a1.activity ? a1.activity.party_id : value;
const r3 = value != party_id && (value == a0.party ? undefined : a0.party.id) !== party_id;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value7 = defaultImport.extractTimestamp(a1.id) + env0_2;
const Date = global.Date;
const value8 = value7 < Date.now();
value = value != a0.application_id;
return !r3 && !value8 && !(value && a0.application_id !== a2);
}
global.__d(_fun81666, 10584, [672, 21, 2]) /* metro module 10584, dependencies: [672, 21, 2] */;
@@ -1,25 +1,26 @@
/* Metro module 6887; source: modules/activities/utils/isListeningOnSpotify.tsx; dependencies: [661, 6868, 4915, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as SpotifyConstantsModule from '../../spotify/SpotifyConstants.tsx'; /* Metro dependency 6868 */
function _fun54667(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7065:6, offset: 0x0136b6ca, size: 150 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.ActivityTypes;
const env0_3 = constantsModule.PlatformTypes;
const env0_4 = (require(6868) /* metro dependency 6868: SpotifyConstants */).isSpotifyParty;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isListeningOnSpotify.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isListeningOnSpotify.tsx');
exports.default = isListeningOnSpotify;
}
function isListeningOnSpotify(a0) { // fn#54668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7065:260, offset: 0x0136b760, size: 157 bytes, params: 2, frame: 16
var name;
var defaultImport;
let r0 = a0 != null && a0.type === ActivityTypes.LISTENING;
if (r0) {
name = a0.name;
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
r0 = name === defaultImport.get(PlatformTypes.SPOTIFY).name;
function isListeningOnSpotify(a0) { // fn#54668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7065:260, offset: 0x0136b760, size: 157 bytes, params: 2, frame: 16
var name;
var defaultImport;
let r0 = a0 != null && a0.type === ActivityTypes.LISTENING;
if (r0) {
name = a0.name;
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
r0 = name === defaultImport.get(PlatformTypes.SPOTIFY).name;
}
r0 = r0 && a0.party != null && a0.party.id != null && isSpotifyParty(a0.party.id);
return r0;
}
r0 = r0 && a0.party != null && a0.party.id != null && isSpotifyParty(a0.party.id);
return r0;
}
global.__d(_fun54667, 6887, [661, 6868, 4915, 2]) /* metro module 6887, dependencies: [661, 6868, 4915, 2] */;
@@ -1,47 +1,50 @@
/* Metro module 10591; source: modules/activities/utils/isMostRecentDeadEndInvite.tsx; dependencies: [661, 10584, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81685(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10777:6, offset: 0x01eda316, 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 */).ActivityActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isMostRecentDeadEndInvite.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isMostRecentDeadEndInvite.tsx');
exports.isMostRecentDeadEndInvite = function(a0, a1, a2, a3) {
var env0_0 = a2;
var env0_1 = a3;
return !a1.hasAnyAfter(a0, _fun81687, 25);
};
function isMostRecentDeadEndInvite(a0, a1, a2, a3) { // fn#81686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10777:242, offset: 0x01eda38e, size: 52 bytes, params: 5, frame: 15
const env0_0 = a2;
const env0_1 = a3;
return !a1.hasAnyAfter(a0, _fun81687, 25);
function _fun81687(a0) { // fn#81687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10777:310, offset: 0x01eda3c2, size: 130 bytes, params: 2, frame: 16
var r0;
var application;
var type;
let value = a0.activity != null;
if (value) {
application = a0.application;
value = undefined;
value = (application == null ? value : application.id) === importDefault;
r0 = value;
} else {
r0 = value;
}
if (r0) {
type = a0.activity.type;
value = environment.__proto__;
value = type === ActivityActionTypes.JOIN;
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = importDefault(10584) /* metro dependency 10584: isInviteActive */;
value = !value(importAll, a0, importDefault);
r0 = value;
}
return r0;
}
}
}
function isMostRecentDeadEndInvite(a0, a1, a2, a3) { // fn#81686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10777:242, offset: 0x01eda38e, size: 52 bytes, params: 5, frame: 15
const env0_0 = a2;
const env0_1 = a3;
return !a1.hasAnyAfter(a0, _fun81687, 25);
}
function _fun81687(a0) { // fn#81687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10777:310, offset: 0x01eda3c2, size: 130 bytes, params: 2, frame: 16
var r0;
var application;
var type;
let value = a0.activity != null;
if (value) {
application = a0.application;
value = undefined;
value = (application == null ? value : application.id) === importDefault;
r0 = value;
} else {
r0 = value;
}
if (r0) {
type = a0.activity.type;
value = environment.__proto__;
value = type === ActivityActionTypes.JOIN;
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = importDefault(10584) /* metro dependency 10584: isInviteActive */;
value = !value(importAll, a0, importDefault);
r0 = value;
}
return r0;
}
global.__d(_fun81685, 10591, [661, 10584, 2]) /* metro module 10591, dependencies: [661, 10584, 2] */;
@@ -1,12 +1,15 @@
/* Metro module 10267; source: modules/activities/utils/isOnConsole.tsx; dependencies: [10214, 10215, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10453:6, offset: 0x01e5e46b, 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/isOnConsole.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isOnConsole.tsx');
exports.default = isOnConsole;
function isOnConsole(a0) { // fn#79698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10453:176, offset: 0x01e5e4ce, size: 62 bytes, params: 2, frame: 14
return (importDefault(10214) /* metro dependency 10214: isOnXbox */)(a0) || (importDefault(10215) /* metro dependency 10215: isOnPlayStation */)(a0);
}
}
function isOnConsole(a0) { // fn#79698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10453:176, offset: 0x01e5e4ce, size: 62 bytes, params: 2, frame: 14
return (importDefault(10214) /* metro dependency 10214: isOnXbox */)(a0) || (importDefault(10215) /* metro dependency 10215: isOnPlayStation */)(a0);
}
global.__d(_fun79697, 10267, [10214, 10215, 2]) /* metro module 10267, dependencies: [10214, 10215, 2] */;
@@ -1,13 +1,16 @@
/* Metro module 10242; source: modules/activities/utils/isOnMetaHorizon.tsx; dependencies: [4237, 661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun79566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10428:6, offset: 0x01e585ee, size: 131 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4237) /* metro dependency 4237: Constants */).META_PRESENCE_APPLICATION_ID;
const env0_1 = (require(661) /* metro dependency 661: Constants */).ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isOnMetaHorizon.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isOnMetaHorizon.tsx');
exports.default = function(a0) {
var value = undefined;
return (a0 == null ? value : a0.application_id) === META_PRESENCE_APPLICATION_ID && ((a0 == null ? value : a0.platform) === ActivityGamePlatforms.ANDROID || (a0 == null ? value : a0.platform) === ActivityGamePlatforms.IOS);
};
}
global.__d(_fun79566, 10242, [4237, 661, 2]) /* metro module 10242, dependencies: [4237, 661, 2] */;
@@ -1,15 +1,18 @@
/* Metro module 10241; source: modules/activities/utils/isOnMetaQuest.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun79564(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10427:6, offset: 0x01e5855a, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isOnMetaQuest.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isOnMetaQuest.tsx');
exports.default = isOnMetaQuest;
function isOnMetaQuest(a0) { // fn#79565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10427:214, offset: 0x01e585c7, size: 39 bytes, params: 2, frame: 3
const platform = a0?.platform;
const META_QUEST = ActivityGamePlatforms.META_QUEST;
return platform === META_QUEST;
}
}
function isOnMetaQuest(a0) { // fn#79565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10427:214, offset: 0x01e585c7, size: 39 bytes, params: 2, frame: 3
const platform = a0?.platform;
const META_QUEST = ActivityGamePlatforms.META_QUEST;
return platform === META_QUEST;
}
global.__d(_fun79564, 10241, [661, 2]) /* metro module 10241, dependencies: [661, 2] */;
@@ -1,12 +1,15 @@
/* Metro module 10215; source: modules/activities/utils/isOnPlayStation.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun79433(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10401:6, offset: 0x01e541b9, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isOnPlayStation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isOnPlayStation.tsx');
exports.default = function(a0) {
var value = undefined;
return (a0 == null ? value : a0.platform) === ActivityGamePlatforms.PS4 || (a0 == null ? value : a0.platform) === ActivityGamePlatforms.PS5;
};
}
global.__d(_fun79433, 10215, [661, 2]) /* metro module 10215, dependencies: [661, 2] */;
@@ -1,13 +1,16 @@
/* Metro module 10214; source: modules/activities/utils/isOnXbox.tsx; dependencies: [4237, 661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun79431(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10400:6, offset: 0x01e540f5, size: 131 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4237) /* metro dependency 4237: Constants */).XBOX_ACTIVITY_APPLICATION_ID;
const env0_1 = (require(661) /* metro dependency 661: Constants */).ActivityGamePlatforms;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isOnXbox.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isOnXbox.tsx');
exports.default = function(a0) {
var value = undefined;
return (a0 == null ? value : a0.application_id) === XBOX_ACTIVITY_APPLICATION_ID || (a0 == null ? value : a0.platform) === ActivityGamePlatforms.XBOX;
};
}
global.__d(_fun79431, 10214, [4237, 661, 2]) /* metro module 10214, dependencies: [4237, 661, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 10264; source: modules/activities/utils/isPartyFull.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79673(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10450:6, offset: 0x01e5dc83, 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/utils/isPartyFull.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isPartyFull.tsx');
exports.isPartyFull = function({partySize, maxPartySize}) {
return partySize > -1 && maxPartySize > 0 && partySize >= maxPartySize;
};
}
global.__d(_fun79673, 10264, [2]) /* metro module 10264, dependencies: [2] */;
@@ -1,20 +1,23 @@
/* Metro module 8419; source: modules/activities/utils/isStreaming.tsx; dependencies: [4237, 661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun66872(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8604:6, offset: 0x01c0d7db, size: 142 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4237) /* metro dependency 4237: Constants */).validStreamURL;
const env0_1 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isStreaming.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isStreaming.tsx');
exports.default = isStreaming;
function _isStreaming(a0) { // fn#66873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8604:145, offset: 0x01c0d869, size: 66 bytes, params: 2, frame: 13
const type = a0.type;
const STREAMING = ActivityTypes.STREAMING;
return type === STREAMING && (a0.url != null && validStreamURL.test(a0.url));
}
function isStreaming(a0) { // fn#66874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8604:312, offset: 0x01c0d8ab, size: 69 bytes, params: 2, frame: 13
return a0 != null && (global.Array.isArray(a0) ? a0.some(_isStreaming) : _isStreaming(a0));
}
}
function _isStreaming(a0) { // fn#66873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8604:145, offset: 0x01c0d869, size: 66 bytes, params: 2, frame: 13
const type = a0.type;
const STREAMING = ActivityTypes.STREAMING;
return type === STREAMING && (a0.url != null && validStreamURL.test(a0.url));
}
function isStreaming(a0) { // fn#66874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8604:312, offset: 0x01c0d8ab, size: 69 bytes, params: 2, frame: 13
return a0 != null && (global.Array.isArray(a0) ? a0.some(_isStreaming) : _isStreaming(a0));
}
global.__d(_fun66872, 8419, [4237, 661, 2]) /* metro module 8419, dependencies: [4237, 661, 2] */;
@@ -1,54 +1,62 @@
/* Metro module 8102; source: modules/activities/utils/isVoiceEmbeddedActivity.tsx; dependencies: [1226, 1379, 1934, 4297, 677, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8287:6, offset: 0x01bbac36, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isVoiceEmbeddedActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isVoiceEmbeddedActivity.tsx');
exports.default = isVoiceEmbeddedActivity;
}
function isVoiceEmbeddedActivity(a0) { // fn#64961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8287:232, offset: 0x01bbacd6, size: 196 bytes, params: 2, frame: 18
var r2;
var r0;
var value6;
var isPrivate2;
var value8;
let value = a1;
const value2 = a2;
let r3 = value !== undefined ? value : ChannelStore;
let r1 = value2 !== undefined ? value2 : SelectedChannelStore;
value = r3.getChannel(a0);
const voiceChannelId = r1.getVoiceChannelId();
const value4 = value != null;
if (value4) {
value6 = value.type === (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_VOICE;
if (value6) {
r1 = value6;
} else {
isPrivate2 = value.isPrivate();
if (isPrivate2) {
value8 = value.id === voiceChannelId;
if (value8) {
r3 = value8;
} else {
value = VoiceStateStore.getVoiceStatesForChannel(value.id);
value = value[AuthenticationStore.getId()] != null;
r3 = value;
}
r2 = r3;
function isVoiceEmbeddedActivity(a0) { // fn#64961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8287:232, offset: 0x01bbacd6, size: 196 bytes, params: 2, frame: 18
var r2;
var r0;
var value6;
var isPrivate2;
var value8;
var voiceStateStoreBinding;
var authenticationStoreBinding;
let value = a1;
const value2 = a2;
let r3 = value !== undefined ? value : ChannelStore;
let r1 = value2 !== undefined ? value2 : SelectedChannelStore;
value = r3.getChannel(a0);
const voiceChannelId = r1.getVoiceChannelId();
const value4 = value != null;
if (value4) {
value6 = value.type === (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_VOICE;
if (value6) {
r1 = value6;
} else {
r2 = !!isPrivate2;
isPrivate2 = value.isPrivate();
if (isPrivate2) {
value8 = value.id === voiceChannelId;
if (value8) {
r3 = value8;
} else {
voiceStateStoreBinding = VoiceStateStore;
value = voiceStateStoreBinding.getVoiceStatesForChannel(value.id);
authenticationStoreBinding = AuthenticationStore;
value = value[authenticationStoreBinding.getId()] != null;
r3 = value;
}
r2 = r3;
} else {
r2 = !!isPrivate2;
}
r1 = r2;
}
r1 = r2;
r0 = r1;
} else {
r0 = value4;
}
r0 = r1;
} else {
r0 = value4;
return r0;
}
return r0;
}
global.__d(_fun64960, 8102, [1226, 1379, 1934, 4297, 677,
2]) /* metro module 8102, dependencies: [1226, 1379, 1934, 4297, 677, 2] */;
@@ -1,16 +1,16 @@
/* Metro module 10666; source: modules/activities/utils/isWatchTogetherApplication.tsx; dependencies: [4237, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 4237 */
function _fun82044(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10852:6, offset: 0x01ee8a38, size: 129 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(4237) /* metro dependency 4237: Constants */;
const env0_0 = constantsModule.WATCH_YOUTUBE_DEV_APP_ID;
const env0_1 = constantsModule.WATCH_YOUTUBE_PROD_APP_ID;
const env0_2 = constantsModule.WATCH_YOUTUBE_QA_APP_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/isWatchTogetherApplication.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/isWatchTogetherApplication.tsx');
exports.default = isWatchTogetherApplication;
function isWatchTogetherApplication(a0) { // fn#82045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10852:292, offset: 0x01ee8ab9, size: 55 bytes, params: 2, frame: 13
return a0 != null && [WATCH_YOUTUBE_DEV_APP_ID, WATCH_YOUTUBE_QA_APP_ID, WATCH_YOUTUBE_PROD_APP_ID].includes(a0);
}
}
function isWatchTogetherApplication(a0) { // fn#82045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10852:292, offset: 0x01ee8ab9, size: 55 bytes, params: 2, frame: 13
return a0 != null && [WATCH_YOUTUBE_DEV_APP_ID, WATCH_YOUTUBE_QA_APP_ID, WATCH_YOUTUBE_PROD_APP_ID].includes(a0);
}
global.__d(_fun82044, 10666, [4237, 2]) /* metro module 10666, dependencies: [4237, 2] */;
@@ -1,18 +1,21 @@
/* Metro module 8090; source: modules/activities/utils/leaveCurrentEmbeddedActivity.tsx; dependencies: [1378, 8091, 2] */
import EmbeddedActivitiesStore from '../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8275:6, offset: 0x01bb6bc7, size: 112 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/leaveCurrentEmbeddedActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/leaveCurrentEmbeddedActivity.tsx');
exports.leaveCurrentEmbeddedActivity = leaveCurrentEmbeddedActivity;
}
function leaveCurrentEmbeddedActivity() { // fn#64841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8275:228, offset: 0x01bb6c37, size: 91 bytes, params: 1, frame: 13
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity != null) {
(importDefault(8091) /* metro dependency 8091: getEmbeddedActivitiesManagerNative */)().leaveActivity({location: currentEmbeddedActivity.location,
applicationId: currentEmbeddedActivity.applicationId, showFeedback: false});
function leaveCurrentEmbeddedActivity() { // fn#64841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8275:228, offset: 0x01bb6c37, size: 91 bytes, params: 1, frame: 13
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity != null) {
(importDefault(8091) /* metro dependency 8091: getEmbeddedActivitiesManagerNative */)().leaveActivity({location: currentEmbeddedActivity.location,
applicationId: currentEmbeddedActivity.applicationId, showFeedback: false});
}
}
}
global.__d(_fun64840, 8090, [1378, 8091, 2]) /* metro module 8090, dependencies: [1378, 8091, 2] */;
@@ -1,16 +1,19 @@
/* Metro module 8064; source: modules/activities/utils/leaveCurrentFrame.tsx; dependencies: [8065, 8068, 2] */
import FramesStore from '../../frames/FramesStore.tsx'; /* Metro dependency 8065 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8242:6, offset: 0x01b9963c, size: 112 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/leaveCurrentFrame.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/leaveCurrentFrame.tsx');
exports.leaveCurrentFrame = leaveCurrentFrame;
}
function leaveCurrentFrame() { // fn#64019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8242:206, offset: 0x01b996ac, size: 75 bytes, params: 1, frame: 12
const connectedFrame = FramesStore.getConnectedFrame();
if (connectedFrame != null) {
(importDefault(8068) /* metro dependency 8068: getFramesManagerNative */)().leaveFrame({applicationId: connectedFrame.applicationId});
function leaveCurrentFrame() { // fn#64019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8242:206, offset: 0x01b996ac, size: 75 bytes, params: 1, frame: 12
const connectedFrame = FramesStore.getConnectedFrame();
if (connectedFrame != null) {
(importDefault(8068) /* metro dependency 8068: getFramesManagerNative */)().leaveFrame({applicationId: connectedFrame.applicationId});
}
}
}
global.__d(_fun64018, 8064, [8065, 8068, 2]) /* metro module 8064, dependencies: [8065, 8068, 2] */;
@@ -1,51 +1,63 @@
/* Metro module 15367; source: modules/activities/utils/native/useHandleOAuthNavigation.tsx; dependencies: [31, 661, 8871, 5080, 10206, 1962, 1239, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
import * as ConstantsModule2 from '../../../oauth2/native/Constants.tsx'; /* Metro dependency 8871 */
function _fun117472(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:6, offset: 0x024b3e41, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const env0_5 = (require(8871) /* metro dependency 8871: Constants */).OAUTH2_AUTHORIZE_MODAL_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/native/useHandleOAuthNavigation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/native/useHandleOAuthNavigation.tsx');
exports.default = useHandleOAuthNavigation;
function useHandleOAuthNavigation() { // fn#117473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:274, offset: 0x024b3ee6, size: 35 bytes, params: 1, frame: 13
ReactModule.useEffect(function() {
var closure = _fun117475;
var env0_0 = closure;
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.SHOW_OAUTH2_MODAL, closure);
return _fun117477;
}, []);
function _fun117474() { // fn#117474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:323, offset: 0x024b3f09, size: 75 bytes, params: 1, frame: 15
const showOAuth2Modal_1174752 = showOAuth2Modal_117475;
let ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const subscribe = ComponentDispatch.subscribe;
let SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
Reflect.apply(subscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, showOAuth2Modal_1174752]);
return function() {
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
var SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
ComponentDispatch.unsubscribe(SHOW_OAUTH2_MODAL, showOAuth2Modal_117475);
};
function showOAuth2Modal_117475(a0) { // fn#117475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:328, offset: 0x024b3f54, size: 128 bytes, params: 2, frame: 18
var environment;
let value = environment.__proto__.__proto__;
importDefault(dependencyMap[3]).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
const defaultImport2 = importDefault(dependencyMap[3]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[4], dependencyMap.paths);
const object = {};
copyDataProperties(object, a0, undefined);
object['dismissOAuthModal'] = function() {
importDefault(dependencyMap[3]).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
};
Reflect.apply(pushLazy, defaultImport2, [value, object, OAUTH2_AUTHORIZE_MODAL_KEY]);
}
function _fun117477() { // fn#117477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:553, offset: 0x024b3ffe, size: 62 bytes, params: 1, frame: 14
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const unsubscribe = ComponentDispatch.unsubscribe;
const SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
Reflect.apply(unsubscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, showOAuth2Modal_117475]);
}
}
}
}
function useHandleOAuthNavigation() { // fn#117473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:274, offset: 0x024b3ee6, size: 35 bytes, params: 1, frame: 13
env0_3.useEffect(function() {
var closure = _fun117475;
var env0_0 = closure;
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.SHOW_OAUTH2_MODAL, closure);
return _fun117477;
}, []);
}
function _fun117474() { // fn#117474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:323, offset: 0x024b3f09, size: 75 bytes, params: 1, frame: 15
const closure = showOAuth2Modal_117475;
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const subscribe = ComponentDispatch.subscribe;
let SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
Reflect.apply(subscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, closure]);
return function() {
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
var SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
ComponentDispatch.unsubscribe(SHOW_OAUTH2_MODAL, showOAuth2Modal_117475);
};
}
function showOAuth2Modal_117475(a0) { // fn#117475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15564:328, offset: 0x024b3f54, size: 128 bytes, params: 2, frame: 18
var environment;
let value = environment.__proto__.__proto__;
importDefault(dependencyMap[3]).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
const defaultImport2 = importDefault(dependencyMap[3]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[4], dependencyMap.paths);
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['dismissOAuthModal'] = function() {
importDefault(dependencyMap[3]).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
};
Reflect.apply(pushLazy, defaultImport2, [value, object2, OAUTH2_AUTHORIZE_MODAL_KEY]);
}
global.__d(_fun117472, 15367, [31, 661, 8871, 5080, 10206, 1962, 1239,
2]) /* metro module 15367, dependencies: [31, 661, 8871, 5080, 10206, 1962, 1239, 2] */;
@@ -1,19 +1,30 @@
/* Metro module 8101; source: modules/activities/utils/pendingFrameLaunch.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8286:6, offset: 0x01bbaba3, size: 113 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = {};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/pendingFrameLaunch.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/pendingFrameLaunch.tsx');
exports.stashPendingFrameLaunch = stashPendingFrameLaunch;
exports.consumePendingFrameLaunch = consumePendingFrameLaunch;
exports.discardPendingFrameLaunch = discardPendingFrameLaunch;
}
function consumePendingFrameLaunch(a0) { // fn#64958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8286:282, offset: 0x01bbac14, size: 34 bytes, params: 2, frame: 4
const property = env0_0[a0];
if (property != null) {
delete env0_0[a0];
return property;
function stashPendingFrameLaunch(a0, a1) { // fn#64957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8286:208, offset: 0x0106acc4, size: 21 bytes, params: 3, frame: 3
env0_0[a0] = a1;
}
function consumePendingFrameLaunch(a0) { // fn#64958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8286:282, offset: 0x01bbac14, size: 34 bytes, params: 2, frame: 4
const property = env0_0[a0];
if (property != null) {
delete env0_0[a0];
return property;
}
}
function discardPendingFrameLaunch(a0) { // fn#64959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8286:392, offset: 0x00d74aa8, size: 18 bytes, params: 2, frame: 2
delete env0_0[a0];
}
}
global.__d(_fun64956, 8101, [2]) /* metro module 8101, dependencies: [2] */;
@@ -1,127 +1,132 @@
/* Metro module 10653; source: modules/activities/utils/selectAndWaitForVoiceChannelJoin.native.tsx; dependencies: [5, 7, 6, 15, 17, 18, 162, 1934, 4796, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00162 from '../../../by-id/module-00162.js'; /* Metro dependency 162 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun81939(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:6, offset: 0x01ee5280, size: 271 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(162) /* metro dependency 162 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let value = Module00162;
const Error = global.Error;
value = value(Error);
const env0_9 = _fun81949(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/selectAndWaitForVoiceChannelJoin.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/selectAndWaitForVoiceChannelJoin.native.tsx');
exports.default = function() {
return _selectAndWaitForVoiceChannelJoin.apply(this, arguments);
};
}
function _isNativeReflectConstruct_81940() { // fn#81940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:178, offset: 0x01ee538f, 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_81940_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _selectAndWaitForVoiceChannelJoin() { // fn#81943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:674, offset: 0x01ee53f1, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun81945).apply(this, arguments);
}
function _fun81949(a0) { // fn#81949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:377, offset: 0x01ee55a7, size: 42 bytes, params: 2, frame: 14
const closure = JoinTimeoutError;
env0_7(closure, a0);
return env0_3(closure);
}
async function _fun81945({channelId, timeoutMs}) { // fn#81945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:763, offset: 0x01ee5437, size: 177 bytes, params: 2, frame: 18
var value6;
var error;
if (false) {
return undefined;
}
if (timeoutMs !== undefined) {
}
await undefined;
if (false) {
return undefined;
}
const Promise = global.Promise;
let promise = new Promise(_fun81946);
env2_0(env2_1[8]).selectVoiceChannel(channelId);
await promise;
try {
promise = undefined;
value6 = false;
} catch (error) {
if (error instanceof env2_9) {
return false;
function _isNativeReflectConstruct_81940() { // fn#81940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:178, offset: 0x01ee538f, 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) {
}
throw error;
return (_isNativeReflectConstruct_81940_isNativeReflectConstruct = function() {
return !!result;
})();
}
if (value6) {
return promise;
function _selectAndWaitForVoiceChannelJoin() { // fn#81943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:674, offset: 0x01ee53f1, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun81945).apply(this, arguments);
async function _fun81945({channelId, timeoutMs}) { // fn#81945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:763, offset: 0x01ee5437, size: 177 bytes, params: 2, frame: 18
var value6;
var error;
if (false) {
return undefined;
}
if (timeoutMs !== undefined) {
}
await undefined;
if (false) {
return undefined;
}
const Promise = global.Promise;
let promise = new Promise(_fun81946);
env2_0(env2_1[8]).selectVoiceChannel(channelId);
await promise;
try {
promise = undefined;
value6 = false;
} catch (error) {
if (error instanceof env2_9) {
return false;
}
throw error;
}
if (value6) {
return promise;
}
return true;
function _fun81946(a0, a1) { // fn#81946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:823, offset: 0x01ee54e8, size: 77 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = global.setTimeout(_fun81947, timeoutMs);
env3_8.addConditionalChangeListener(_fun81948);
function _fun81947() { // fn#81947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:849, offset: 0x01ee5535, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__.__proto__;
require(new env4_9('Joining voice channel has timed out.'));
}
function _fun81948() { // fn#81948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:940, offset: 0x01ee5566, size: 65 bytes, params: 1, frame: 13
var r0;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_8.getVoiceChannelId();
value = value !== channelId;
if (value) {
r0 = value;
} else {
global.clearTimeout(env0_2);
env0_0();
r0 = false;
}
return r0;
}
}
}
}
return true;
}
function JoinTimeoutError() { // fn#81950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:389, offset: 0x01ee55d1, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, JoinTimeoutError);
const value3 = env1_6(JoinTimeoutError);
return env1_5(this, _isNativeReflectConstruct_81940() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function _fun81949(a0) { // fn#81949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:377, offset: 0x01ee55a7, size: 42 bytes, params: 2, frame: 14
const JoinTimeoutError2 = JoinTimeoutError;
Inherits(JoinTimeoutError2, a0);
return CreateClass(JoinTimeoutError2);
function JoinTimeoutError() { // fn#81950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:389, offset: 0x01ee55d1, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, JoinTimeoutError);
const value3 = env1_6(JoinTimeoutError);
return env1_5(this, _isNativeReflectConstruct_81940() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function _fun81946(a0, a1) { // fn#81946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:823, offset: 0x01ee54e8, size: 77 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = global.setTimeout(_fun81947, timeoutMs);
env3_8.addConditionalChangeListener(_fun81948);
}
function _fun81947() { // fn#81947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:849, offset: 0x01ee5535, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__.__proto__;
require(new env4_9('Joining voice channel has timed out.'));
}
function _fun81948() { // fn#81948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:940, offset: 0x01ee5566, size: 65 bytes, params: 1, frame: 13
var r0;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_8.getVoiceChannelId();
value = value !== channelId;
if (value) {
r0 = value;
} else {
global.clearTimeout(env0_2);
env0_0();
r0 = false;
}
return r0;
}
global.__d(_fun81939, 10653, [5, 7, 6, 15, 17, 18, 162, 1934, 4796,
2]) /* metro module 10653, dependencies: [5, 7, 6, 15, 17, 18, 162, 1934, 4796, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 6872; source: modules/activities/utils/stopSyncingUserActivity.tsx; dependencies: [694, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54415(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7050:6, offset: 0x01364cb6, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/stopSyncingUserActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/stopSyncingUserActivity.tsx');
exports.default = stopSyncingUserActivity;
function stopSyncingUserActivity() { // fn#54416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7050:188, offset: 0x01364d17, size: 48 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'ACTIVITY_SYNC_STOP'});
}
}
function stopSyncingUserActivity() { // fn#54416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7050:188, offset: 0x01364d17, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_SYNC_STOP'});
}
global.__d(_fun54415, 6872, [694, 2]) /* metro module 6872, dependencies: [694, 2] */;
@@ -1,19 +1,23 @@
/* Metro module 10656; source: modules/activities/utils/trackApplicationOpen.tsx; dependencies: [661, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10842:6, offset: 0x01ee5aaf, 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/utils/trackApplicationOpen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/trackApplicationOpen.tsx');
exports.default = trackApplicationOpen;
function trackApplicationOpen({type, source, userId, guildId, channelId, channelType, applicationId, partyId, messageId, locationObject, analyticsLocations, referrerId, inviterUserId, remoteJoinPlatform}) { // fn#81966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10842:214, offset: 0x01ee5b27, size: 211 bytes, params: 2, frame: 28
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const APPLICATION_OPENED = AnalyticEvents.APPLICATION_OPENED;
Reflect.apply(track, defaultImport, [APPLICATION_OPENED, {type: type, source: source, guild_id: guildId,
channel_id: channelId, channel_type: channelType, application_id: applicationId, party_id: partyId ?? undefined,
other_user_id: userId, message_id: messageId, location: locationObject, location_stack: analyticsLocations,
referrer_id: referrerId, invite_inviter_id: inviterUserId, remote_join_platform: remoteJoinPlatform}]);
}
}
function trackApplicationOpen({type, source, userId, guildId, channelId, channelType, applicationId, partyId, messageId, locationObject, analyticsLocations, referrerId, inviterUserId, remoteJoinPlatform}) { // fn#81966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10842:214, offset: 0x01ee5b27, size: 211 bytes, params: 2, frame: 28
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const APPLICATION_OPENED = AnalyticEvents.APPLICATION_OPENED;
Reflect.apply(track, defaultImport, [APPLICATION_OPENED, {type: type, source: source, guild_id: guildId,
channel_id: channelId, channel_type: channelType, application_id: applicationId, party_id: partyId ?? undefined,
other_user_id: userId, message_id: messageId, location: locationObject, location_stack: analyticsLocations,
referrer_id: referrerId, invite_inviter_id: inviterUserId, remote_join_platform: remoteJoinPlatform}]);
}
global.__d(_fun81965, 10656, [661, 683, 2]) /* metro module 10656, dependencies: [661, 683, 2] */;
@@ -1,45 +1,50 @@
/* Metro module 8111; source: modules/activities/utils/transitionToActivity.native.tsx; dependencies: [7715, 1378, 8044, 7716, 3774, 4007, 7714, 8102, 8112, 7712, 4610, 4080, 7860, 2] */
import EmbeddedActivitiesStore from '../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as EmbeddedActivityLocationUtilsModule from './embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
import * as ChannelCallStoreModule from '../../video_calls/native/ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as ChannelCallConstantsModule from '../../video_calls/native/ChannelCallConstants.tsx'; /* Metro dependency 7716 */
import * as ActivityPanelConstantsModule from '../panel/ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun64999(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8296:6, offset: 0x01bbc931, size: 182 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(7715) /* metro dependency 7715: ChannelCallStore */).setVoiceChatDrawerState;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_5 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_6 = (require(7716) /* metro dependency 7716: ChannelCallConstants */).VoiceChatDrawerState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/transitionToActivity.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/transitionToActivity.native.tsx');
exports.default = transitionToActivity;
}
function transitionToActivity(a0, a1) { // fn#65000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8296:301, offset: 0x01bbc9e7, size: 375 bytes, params: 3, frame: 21
var selfEmbeddedActivityForLocation;
var moduleValue3;
var defaultImport;
var selectParticipant;
var moduleValue4;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(a1);
if (embeddedActivityLocationChannelId != null) {
if (!(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).isModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */) && (importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId)) {
(importDefault(8112) /* metro dependency 8112: openChannelCallModalForChannelId */)(embeddedActivityLocationChannelId);
}
selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(a1);
if (selfEmbeddedActivityForLocation != null) {
if ((importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId)) {
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
selectParticipant = defaultImport.selectParticipant;
moduleValue4 = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
Reflect.apply(selectParticipant, defaultImport, [embeddedActivityLocationChannelId,
moduleValue4.getEmbeddedActivityParticipantId({applicationId: selfEmbeddedActivityForLocation.applicationId,
instanceId: selfEmbeddedActivityForLocation.compositeInstanceId})]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
setVoiceChatDrawerState(embeddedActivityLocationChannelId, VoiceChatDrawerState.CLOSED);
} else {
moduleValue3 = require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
moduleValue3.updateActivityPanelMode(ActivityPanelModes.PANEL);
function transitionToActivity(a0, a1) { // fn#65000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8296:301, offset: 0x01bbc9e7, size: 375 bytes, params: 3, frame: 21
var selfEmbeddedActivityForLocation;
var moduleValue3;
var defaultImport;
var selectParticipant;
var moduleValue4;
const embeddedActivityLocationChannelId = (EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationChannelId(a1);
if (embeddedActivityLocationChannelId != null) {
if (!(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).isModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */) && (importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId)) {
(importDefault(8112) /* metro dependency 8112: openChannelCallModalForChannelId */)(embeddedActivityLocationChannelId);
}
selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(a1);
if (selfEmbeddedActivityForLocation != null) {
if ((importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId)) {
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
selectParticipant = defaultImport.selectParticipant;
moduleValue4 = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
Reflect.apply(selectParticipant, defaultImport, [embeddedActivityLocationChannelId,
moduleValue4.getEmbeddedActivityParticipantId({applicationId: selfEmbeddedActivityForLocation.applicationId,
instanceId: selfEmbeddedActivityForLocation.compositeInstanceId})]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
setVoiceChatDrawerState(embeddedActivityLocationChannelId, VoiceChatDrawerState.CLOSED);
} else {
moduleValue3 = require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
moduleValue3.updateActivityPanelMode(ActivityPanelModes.PANEL);
}
}
}
}
}
global.__d(_fun64999, 8111, [7715, 1378, 8044, 7716, 3774, 4007, 7714, 8102, 8112, 7712, 4610, 4080, 7860,
2]) /* metro module 8111, dependencies: [7715, 1378, 8044, 7716, 3774, 4007, 7714, 8102, 8112, 7712, 4610, 4080, 7860, 2] */;
@@ -1,34 +1,37 @@
/* Metro module 8100; source: modules/activities/utils/tryLaunchAsFrame.tsx; dependencies: [4234, 8045, 8087, 2] */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8285:6, offset: 0x01bbaab7, size: 116 bytes, params: 8, frame: 19
const env0_0 = require;
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/utils/tryLaunchAsFrame.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/tryLaunchAsFrame.tsx');
exports.tryLaunchAsFrame = tryLaunchAsFrame;
function tryLaunchAsFrame({applicationId}) { // fn#64955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8285:204, offset: 0x01bbab2b, size: 120 bytes, params: 2, frame: 15
var r2;
var r0;
var moduleValue;
var value;
const application = ApplicationStore.getApplication(applicationId);
const value3 = application == null;
if (value3) {
r2 = value3;
} else {
moduleValue = require(8045) /* metro dependency 8045: canLaunchFrame */;
r2 = !moduleValue.canLaunchFrame(application);
}
if (r2) {
r0 = !r2;
} else {
value = importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */;
value.launchFrame({applicationId: applicationId});
value = true;
r0 = value;
}
return r0;
}
}
function tryLaunchAsFrame({applicationId}) { // fn#64955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8285:204, offset: 0x01bbab2b, size: 120 bytes, params: 2, frame: 15
var r2;
var r0;
var moduleValue;
var value;
const application = ApplicationStore.getApplication(applicationId);
const value3 = application == null;
if (value3) {
r2 = value3;
} else {
moduleValue = require(8045) /* metro dependency 8045: canLaunchFrame */;
r2 = !moduleValue.canLaunchFrame(application);
}
if (r2) {
r0 = !r2;
} else {
value = importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */;
value.launchFrame({applicationId: applicationId});
value = true;
r0 = value;
}
return r0;
}
global.__d(_fun64954, 8100, [4234, 8045, 8087, 2]) /* metro module 8100, dependencies: [4234, 8045, 8087, 2] */;
@@ -1,439 +1,457 @@
/* Metro module 11598; source: modules/activities/utils/useActivityShelfItem.tsx; dependencies: [5, 1378, 4237, 661, 8049, 477, 10718, 11599, 11600, 1909, 7504, 10702, 10701, 6777, 3774, 6771, 8045, 8087, 4603, 9472, 8109, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import EmbeddedActivitiesStore from '../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import GetPlatform from './getPlatform.tsx'; /* Metro dependency 8049 */
import UseCurrentEmbeddedApplication from './useCurrentEmbeddedApplication.tsx'; /* Metro dependency 10701 */
import UseCurrentEmbeddedActivity from './useCurrentEmbeddedActivity.tsx'; /* Metro dependency 10702 */
import UseEmbeddedActivityBackground from './useEmbeddedActivityBackground.tsx'; /* Metro dependency 10718 */
import UseEmbeddedAppsForChannel from '../useEmbeddedAppsForChannel.tsx'; /* Metro dependency 11600 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as EmbeddedActivityLocationUtilsModule from './embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 4237 */
import * as UseGetOrFetchApplicationsModule from '../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as ApplicationFlagUtilsModule from '../../applications/utils/ApplicationFlagUtils.tsx'; /* Metro dependency 7504 */
import * as CanLaunchFrameModule from '../../frames/utils/canLaunchFrame.tsx'; /* Metro dependency 8045 */
function _fun88811(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:6, offset: 0x01ff307d, size: 285 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const closure = getStaffReleasePhase;
const closure2 = useActivityAction;
const closure3 = useOnActivityItemSelected;
const getStaffReleasePhase2 = getStaffReleasePhase;
const useActivityAction2 = useActivityAction;
const useOnActivityItemSelected2 = useOnActivityItemSelected;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_5 = (require(4237) /* metro dependency 4237: Constants */).STAFF_RELEASE_PHASES;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ApplicationFlags;
object2 = {START: 0};
object2[0] = 'START';
object2.JOIN = 1;
object2[1] = 'JOIN';
object2.LEAVE = 2;
object2[2] = 'LEAVE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useActivityShelfItem.tsx');
object = {START: 0};
object[0] = 'START';
object.JOIN = 1;
object[1] = 'JOIN';
object.LEAVE = 2;
object[2] = 'LEAVE';
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useActivityShelfItem.tsx');
exports.default = useActivityShelfItem;
exports.ActivityAction = object2;
exports.getStaffReleasePhase = closure;
exports.useActivityAction = closure2;
exports.useOnActivityItemSelected = closure3;
}
function getStaffReleasePhase(a0, a1) { // fn#88812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:266, offset: 0x01ff319a, size: 243 bytes, params: 3, frame: 16
var r0;
var client_platform_config;
var defaultImport;
var moduleValue3;
var release_phase;
var value;
const value2 = undefined;
const applicationFlagUtilsModule = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
let hasApplicationFlag = applicationFlagUtilsModule.hasApplicationFlag;
const EMBEDDED_RELEASED = ApplicationFlags.EMBEDDED_RELEASED;
if (Reflect.apply(hasApplicationFlag, applicationFlagUtilsModule, [a0, EMBEDDED_RELEASED])) {
client_platform_config = a1.client_platform_config;
defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
release_phase = client_platform_config[defaultImport(moduleValue3.getOS())].release_phase;
if (STAFF_RELEASE_PHASES.includes(release_phase)) {
value = release_phase.replace('_', ' ');
value = value.replace(RegExp('(^\\w|\\s\\w)', 'g'), function(a0) {
return a0.toUpperCase();
});
r0 = value;
} else {
r0 = value2;
}
return r0;
}
const moduleValue2 = applicationFlagUtilsModule;
hasApplicationFlag = moduleValue2.hasApplicationFlag;
const EMBEDDED_FIRST_PARTY = ApplicationFlags.EMBEDDED_FIRST_PARTY;
if (Reflect.apply(hasApplicationFlag, moduleValue2, [a0, EMBEDDED_FIRST_PARTY])) {
client_platform_config = a1.client_platform_config;
defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
release_phase = client_platform_config[defaultImport(moduleValue3.getOS())].release_phase;
if (STAFF_RELEASE_PHASES.includes(release_phase)) {
value = release_phase.replace('_', ' ');
value = value.replace(RegExp('(^\\w|\\s\\w)', 'g'), function(a0) {
return a0.toUpperCase();
});
r0 = value;
} else {
r0 = value2;
}
return r0;
}
return value2;
}
function useActivityAction({context, applicationId, fetchesApplication}) { // fn#88814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:574, offset: 0x01ff328d, size: 301 bytes, params: 2, frame: 22
fetchesApplication = fetchesApplication === undefined || fetchesApplication;
const START = env0_7.START;
const channel = context.type !== 'channel' ? undefined : context.channel;
const value4 = (importDefault(10702) /* metro dependency 10702: useCurrentEmbeddedActivity */)();
const value5 = (importDefault(10701) /* metro dependency 10701: useCurrentEmbeddedApplication */)({fetchesApplication: fetchesApplication});
const value6 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(applicationId,
fetchesApplication);
const value8 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(channel).find(_fun88815);
if (value6 == null) {
return START;
}
const embeddedActivityLocationUtilsModule = require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */;
const getEmbeddedActivityLocationChannelId = embeddedActivityLocationUtilsModule.getEmbeddedActivityLocationChannelId;
return channel == null || Reflect.apply(getEmbeddedActivityLocationChannelId, embeddedActivityLocationUtilsModule,
[value4?.location]) !== channel.id ? value8 == null ? START : env0_7.JOIN : value5?.id === value6.id ? env0_7.LEAVE : value8 == null ? START : env0_7.JOIN;
}
function useOnActivityItemSelected({application, botUserIdForAppDM, context, locationObject, embeddedActivitiesManager, onActivityItemSelectedProp, launchingComponentId, commandOrigin, sectionName, source, fetchesApplication, customId, referrerId, onConfirmActivityLaunchChecksAlertOpen}) { // fn#88816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:1058, offset: 0x01ff33e7, size: 408 bytes, params: 2, frame: 18
fetchesApplication = fetchesApplication === undefined || fetchesApplication;
const value5 = useActivityAction({context: context, applicationId: application?.id ?? '',
fetchesApplication: fetchesApplication});
const env0_13 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_14 = (importDefault(10702) /* metro dependency 10702: useCurrentEmbeddedActivity */)();
const env0_15 = (require(8045) /* metro dependency 8045: canLaunchFrame */).canLaunchFrame(application);
if (application == null) {
return function() {
if (onActivityItemSelectedProp != null) {
onActivityItemSelectedProp({applicationId: ''});
exports.ActivityAction = object;
exports.getStaffReleasePhase = getStaffReleasePhase2;
exports.useActivityAction = useActivityAction2;
exports.useOnActivityItemSelected = useOnActivityItemSelected2;
function getStaffReleasePhase(a0, a1) { // fn#88812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:266, offset: 0x01ff319a, size: 243 bytes, params: 3, frame: 16
var r0;
var client_platform_config;
var defaultImport;
var moduleValue3;
var release_phase;
var value;
const value2 = undefined;
let hasApplicationFlag = ApplicationFlagUtilsModule.hasApplicationFlag;
const EMBEDDED_RELEASED = ApplicationFlags.EMBEDDED_RELEASED;
if (Reflect.apply(hasApplicationFlag, ApplicationFlagUtilsModule, [a0, EMBEDDED_RELEASED])) {
client_platform_config = a1.client_platform_config;
defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
release_phase = client_platform_config[defaultImport(moduleValue3.getOS())].release_phase;
if (STAFF_RELEASE_PHASES.includes(release_phase)) {
value = release_phase.replace('_', ' ');
value = value.replace(RegExp('(^\\w|\\s\\w)', 'g'), function(a0) {
return a0.toUpperCase();
});
r0 = value;
} else {
r0 = value2;
}
};
return r0;
}
hasApplicationFlag = ApplicationFlagUtilsModule.hasApplicationFlag;
const EMBEDDED_FIRST_PARTY = ApplicationFlags.EMBEDDED_FIRST_PARTY;
if (Reflect.apply(hasApplicationFlag, ApplicationFlagUtilsModule, [a0, EMBEDDED_FIRST_PARTY])) {
client_platform_config = a1.client_platform_config;
defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
release_phase = client_platform_config[defaultImport(moduleValue3.getOS())].release_phase;
if (STAFF_RELEASE_PHASES.includes(release_phase)) {
value = release_phase.replace('_', ' ');
value = value.replace(RegExp('(^\\w|\\s\\w)', 'g'), function(a0) {
return a0.toUpperCase();
});
r0 = value;
} else {
r0 = value2;
}
return r0;
}
return value2;
}
const START = sectionName.START;
if (START === value5) {
return embeddedActivitiesManager(_fun88819);
}
const JOIN = sectionName.JOIN;
if (JOIN === value5) {
return embeddedActivitiesManager(_fun88822);
}
const LEAVE = sectionName.LEAVE;
if (LEAVE === value5) {
return _fun88824;
}
}
function useActivityShelfItem({activityItem, context, locationObject, onActivityItemSelected, embeddedActivitiesManager, assetNames = ['embedded_cover'], backgroundResolution, launchingComponentId, commandOrigin, source}) { // fn#88825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2720, offset: 0x01ff38bb, size: 619 bytes, params: 2, frame: 32
var object2;
backgroundResolution = backgroundResolution === undefined ? 250 : backgroundResolution;
const application = activityItem.application;
const activity = activityItem.activity;
const client_platform_config = activity.client_platform_config;
const defaultImport = importDefault(8049) /* metro dependency 8049: getPlatform */;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const getOS = platformUtilsModule.getOS;
const property = client_platform_config[defaultImport(Reflect.apply(getOS, platformUtilsModule, []))];
const Date = global.Date;
const value4 = Date.now();
const r4 = property.label_until != null && value4 < global.Date.parse(property.label_until) && property.label_from != null && value4 > global.Date.parse(property.label_from);
const value10 = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: application.id,
size: backgroundResolution, names: assetNames, format: 'webp'});
const r9 = activity.activity_preview_video_asset_id != null ? (importDefault(11599) /* metro dependency 11599: getPreviewVideoAssetUrl */)(application.id,
activity.activity_preview_video_asset_id) : null;
const value13 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(context.type !== 'channel' ? undefined : context.channel).find(function({embeddedActivity}) {
return application.id === embeddedActivity.applicationId;
});
const value14 = useActivityAction({context: context, applicationId: application.id});
const value15 = useOnActivityItemSelected({application: activityItem.application, context: context,
locationObject: locationObject, embeddedActivitiesManager: embeddedActivitiesManager,
onActivityItemSelectedProp: onActivityItemSelected, launchingComponentId: launchingComponentId,
commandOrigin: commandOrigin, source: source});
const staffReleasePhase = getStaffReleasePhase(application, activityItem.activity);
object2 = {imageBackground: value10, videoUrl: r9, joinableEmbeddedApp: value13, activityAction: value14,
onActivityItemSelected: value15};
object2.labelType = r4 ? property.label_type : (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes.NONE;
object2.staffReleasePhase = staffReleasePhase;
return object2;
}
function useActivityAction({context, applicationId, fetchesApplication}) { // fn#88814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:574, offset: 0x01ff328d, size: 301 bytes, params: 2, frame: 22
fetchesApplication = fetchesApplication === undefined || fetchesApplication;
const START = env0_7.START;
const channel = context.type !== 'channel' ? undefined : context.channel;
const value4 = (UseCurrentEmbeddedActivity)();
const value5 = (UseCurrentEmbeddedApplication)({fetchesApplication: fetchesApplication});
const value6 = (UseGetOrFetchApplicationsModule).useGetOrFetchApplication(applicationId,
fetchesApplication);
const value8 = (UseEmbeddedAppsForChannel)(channel).find(_fun88815);
if (value6 == null) {
return START;
}
const getEmbeddedActivityLocationChannelId = EmbeddedActivityLocationUtilsModule.getEmbeddedActivityLocationChannelId;
return channel == null || Reflect.apply(getEmbeddedActivityLocationChannelId, EmbeddedActivityLocationUtilsModule,
[value4?.location]) !== channel.id ? value8 == null ? START : env0_7.JOIN : value5?.id === value6.id ? env0_7.LEAVE : value8 == null ? START : env0_7.JOIN;
function _fun88815({embeddedActivity}) { // fn#88815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:814, offset: 0x01ff33ba, size: 45 bytes, params: 2, frame: 4
return env0_0 != null && env0_0.id === embeddedActivity.applicationId;
}
function _fun88815({embeddedActivity}) { // fn#88815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:814, offset: 0x01ff33ba, size: 45 bytes, params: 2, frame: 4
return env0_0 != null && env0_0.id === embeddedActivity.applicationId;
}
}
function* _fun88819() { // fn#88819, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:1639, offset: 0x01ff35b0, size: 401 bytes, params: 1, frame: 16
var environment;
var id;
var r6;
var value;
var value2;
var value3;
var type;
var channel;
var value4;
var binding;
var binding2;
var property;
var value5;
var openPrivateChannel;
var object2;
var value6;
var value7;
var value8;
var value9;
var value10;
var value11;
var then;
var value12;
var value13;
var error;
var value14;
var binding3;
var value15;
var launchFrame;
var value16;
var value17;
var value18;
var value19;
exceptionSkip51: while (true) {
exceptionLanding51: while (true) {
exceptionSkip26: while (true) {
exceptionLanding26: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__;
if (env1_15) {
value14 = environment.__proto__.__proto__;
try {
function useOnActivityItemSelected({application, botUserIdForAppDM, context, locationObject, embeddedActivitiesManager, onActivityItemSelectedProp, launchingComponentId, commandOrigin, sectionName, source, fetchesApplication, customId, referrerId, onConfirmActivityLaunchChecksAlertOpen}) { // fn#88816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:1058, offset: 0x01ff33e7, size: 408 bytes, params: 2, frame: 18
fetchesApplication = fetchesApplication === undefined || fetchesApplication;
const value5 = useActivityAction({context: context, applicationId: application?.id ?? '',
fetchesApplication: fetchesApplication});
const env0_13 = (UseAnalyticsLocations)().analyticsLocations;
const env0_14 = (UseCurrentEmbeddedActivity)();
const env0_15 = (CanLaunchFrameModule).canLaunchFrame(application);
if (application == null) {
return function() {
if (onActivityItemSelectedProp != null) {
onActivityItemSelectedProp({applicationId: ''});
}
};
}
const START = sectionName.START;
if (START === value5) {
return embeddedActivitiesManager(_fun88819);
}
const JOIN = sectionName.JOIN;
if (JOIN === value5) {
return embeddedActivitiesManager(_fun88822);
}
const LEAVE = sectionName.LEAVE;
if (LEAVE === value5) {
return _fun88824;
}
function* _fun88819() { // fn#88819, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:1639, offset: 0x01ff35b0, size: 401 bytes, params: 1, frame: 16
var environment;
var id;
var r6;
var value;
var value2;
var value3;
var type;
var channel;
var value4;
var binding;
var binding2;
var property;
var value5;
var openPrivateChannel;
var object;
var value6;
var value7;
var value8;
var value9;
var value10;
var value11;
var then;
var value12;
var value13;
var error;
var value14;
var binding3;
var value15;
var launchFrame;
var value16;
var value17;
var value18;
var embeddedActivitiesStoreBinding;
var value19;
exceptionSkip51: while (true) {
exceptionLanding51: while (true) {
exceptionSkip26: while (true) {
exceptionLanding26: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__;
if (env1_15) {
value14 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding51;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding51;
}
try {
property = binding3[17];
} catch (error) {
break exceptionLanding51;
}
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding51;
}
try {
launchFrame = value15.launchFrame;
} catch (error) {
break exceptionLanding51;
}
try {
object = {};
} catch (error) {
break exceptionLanding51;
}
try {
binding = env1_12;
} catch (error) {
break exceptionLanding51;
}
try {
object.applicationId = binding;
} catch (error) {
break exceptionLanding51;
}
try {
value16 = Reflect.apply(launchFrame, value15, [object]);
} catch (error) {
break exceptionLanding51;
}
yield value16;
try {
value17 = undefined;
value18 = false;
} catch (error) {
break exceptionLanding51;
}
if (value18) {
return value17;
}
try {
embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
} catch (error) {
break exceptionLanding51;
}
try {
value19 = embeddedActivitiesStoreBinding == null;
} catch (error) {
break exceptionLanding51;
}
if (!value19) {
try {
embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
} catch (error) {
break exceptionLanding51;
}
try {
object = {};
} catch (error) {
break exceptionLanding51;
}
try {
binding = env1_12;
} catch (error) {
break exceptionLanding51;
}
try {
object.applicationId = binding;
} catch (error) {
break exceptionLanding51;
}
try {
embeddedActivitiesStoreBinding(object);
} catch (error) {
break exceptionLanding51;
}
}
return value;
}
type = importDefault.type;
if (type !== 'channel') {
id = value;
} else {
channel = importDefault.channel;
id = channel.id;
}
if (require == null) {
r6 = id;
value9 = environment.__proto__.__proto__;
value11 = env2_1(env2_2[19])({targetApplicationId: env1_12, locationObject: dependencyMap,
channelId: r6,
analyticsLocations: env1_13, componentId: STAFF_RELEASE_PHASES,
commandOrigin: ApplicationFlags,
sectionName: env1_7, source: getStaffReleasePhase, customId: useActivityAction,
referrerId: useOnActivityItemSelected, onConfirmActivityLaunchChecksAlertOpen: env1_11});
yield value11.then(_fun88820);
return value;
}
value4 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding26;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding26;
}
try {
property = binding2[18];
} catch (error) {
break exceptionLanding26;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding26;
}
try {
openPrivateChannel = value5.openPrivateChannel;
} catch (error) {
break exceptionLanding26;
}
try {
object = {};
} catch (error) {
break exceptionLanding26;
}
try {
} catch (error) {
break exceptionLanding26;
}
try {
object.recipientIds = require;
} catch (error) {
break exceptionLanding26;
}
try {
object.navigateToChannel = true;
} catch (error) {
break exceptionLanding26;
}
try {
value6 = Reflect.apply(openPrivateChannel, value5, [object]);
} catch (error) {
break exceptionLanding26;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding26;
}
if (value8) {
return value7;
}
r6 = value7;
value9 = environment.__proto__.__proto__;
binding = env2_1;
} catch (error) {
break exceptionLanding51;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding51;
}
try {
property = binding3[17];
} catch (error) {
break exceptionLanding51;
}
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding51;
}
try {
launchFrame = value15.launchFrame;
} catch (error) {
break exceptionLanding51;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding51;
}
try {
binding = env1_12;
} catch (error) {
break exceptionLanding51;
}
try {
object2.applicationId = binding;
} catch (error) {
break exceptionLanding51;
}
try {
value16 = Reflect.apply(launchFrame, value15, [object2]);
} catch (error) {
break exceptionLanding51;
}
yield value16;
try {
value17 = undefined;
value18 = false;
} catch (error) {
break exceptionLanding51;
}
if (value18) {
return value17;
}
try {
} catch (error) {
break exceptionLanding51;
}
try {
value19 = EmbeddedActivitiesStore == null;
} catch (error) {
break exceptionLanding51;
}
if (!value19) {
try {
} catch (error) {
break exceptionLanding51;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding51;
}
try {
binding = env1_12;
} catch (error) {
break exceptionLanding51;
}
try {
object2.applicationId = binding;
} catch (error) {
break exceptionLanding51;
}
try {
EmbeddedActivitiesStore(object2);
} catch (error) {
break exceptionLanding51;
}
value10 = binding(env2_2[19]);
value11 = value10({targetApplicationId: env1_12, locationObject: dependencyMap, channelId: r6,
analyticsLocations: env1_13, componentId: STAFF_RELEASE_PHASES, commandOrigin: ApplicationFlags,
sectionName: env1_7, source: getStaffReleasePhase, customId: useActivityAction,
referrerId: useOnActivityItemSelected, onConfirmActivityLaunchChecksAlertOpen: env1_11});
then = value11.then;
yield Reflect.apply(then, value11, [_fun88820]);
value12 = undefined;
value13 = false;
return value13 ? value12 : value;
break exceptionSkip26;
}
return value;
break exceptionSkip26;
}
type = importDefault.type;
if (type !== 'channel') {
id = value;
} else {
channel = importDefault.channel;
id = channel.id;
}
if (require == null) {
r6 = id;
value9 = environment.__proto__.__proto__;
value11 = env2_1(env2_2[19])({targetApplicationId: env1_12, locationObject: dependencyMap,
channelId: r6,
analyticsLocations: env1_13, componentId: STAFF_RELEASE_PHASES,
commandOrigin: ApplicationFlags,
sectionName: env1_7, source: getStaffReleasePhase, customId: useActivityAction,
referrerId: useOnActivityItemSelected, onConfirmActivityLaunchChecksAlertOpen: env1_11});
yield value11.then(_fun88820);
return value;
}
value4 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding26;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding26;
}
try {
property = binding2[18];
} catch (error) {
break exceptionLanding26;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding26;
}
try {
openPrivateChannel = value5.openPrivateChannel;
} catch (error) {
break exceptionLanding26;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding26;
}
try {
} catch (error) {
break exceptionLanding26;
}
try {
object2.recipientIds = require;
} catch (error) {
break exceptionLanding26;
}
try {
object2.navigateToChannel = true;
} catch (error) {
break exceptionLanding26;
}
try {
value6 = Reflect.apply(openPrivateChannel, value5, [object2]);
} catch (error) {
break exceptionLanding26;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding26;
}
if (value8) {
return value7;
}
r6 = value7;
value9 = environment.__proto__.__proto__;
binding = env2_1;
value10 = binding(env2_2[19]);
value11 = value10({targetApplicationId: env1_12, locationObject: dependencyMap, channelId: r6,
analyticsLocations: env1_13, componentId: STAFF_RELEASE_PHASES, commandOrigin: ApplicationFlags,
sectionName: env1_7, source: getStaffReleasePhase, customId: useActivityAction,
referrerId: useOnActivityItemSelected, onConfirmActivityLaunchChecksAlertOpen: env1_11});
then = value11.then;
yield Reflect.apply(then, value11, [_fun88820]);
value12 = undefined;
value13 = false;
return value13 ? value12 : value;
break exceptionSkip26;
break exceptionSkip51;
}
return value;
break exceptionSkip26;
break exceptionSkip51;
}
function _fun88820(a0) { // fn#88820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2122, offset: 0x01ff3741, size: 50 bytes, params: 2, frame: 14
return a0 && EmbeddedActivitiesStore?.({applicationId: env2_12});
}
break exceptionSkip51;
}
return value;
break exceptionSkip51;
}
}
function* _fun88822() { // fn#88822, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2194, offset: 0x01ff377e, size: 213 bytes, params: 1, frame: 16
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
if (!binding.isLaunchingActivity()) {
binding = env2_1;
value = undefined;
value = binding(env2_2[20])({applicationId: env1_12,
activityChannelId: importDefault.type !== 'channel' ? value : importDefault.channel.id,
locationObject: dependencyMap, analyticsLocations: env1_13, componentId: STAFF_RELEASE_PHASES,
sectionName: env1_7, source: getStaffReleasePhase, customId: useActivityAction,
referrerId: useOnActivityItemSelected});
yield value.then(_fun88823);
value = undefined;
if (false) {
return value;
}
function* _fun88822() { // fn#88822, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2194, offset: 0x01ff377e, size: 213 bytes, params: 1, frame: 16
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
if (!binding.isLaunchingActivity()) {
binding = env2_1;
value = undefined;
value = binding(env2_2[20])({applicationId: env1_12,
activityChannelId: importDefault.type !== 'channel' ? value : importDefault.channel.id,
locationObject: dependencyMap, analyticsLocations: env1_13, componentId: STAFF_RELEASE_PHASES,
sectionName: env1_7, source: getStaffReleasePhase, customId: useActivityAction,
referrerId: useOnActivityItemSelected});
yield value.then(_fun88823);
value = undefined;
if (false) {
return value;
}
}
}
function _fun88823(a0) { // fn#88823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2428, offset: 0x01ff3741, size: 50 bytes, params: 2, frame: 14
return a0 && EmbeddedActivitiesStore?.({applicationId: env2_12});
}
}
function _fun88824() { // fn#88824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2497, offset: 0x01ff3853, size: 104 bytes, params: 1, frame: 14
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
if (!embeddedActivitiesStoreBinding.isLaunchingActivity()) {
if (env0_14 != null) {
embeddedActivitiesManager.leaveActivity({location: env0_14.location, applicationId: env0_12});
}
if (onActivityItemSelectedProp != null) {
onActivityItemSelectedProp({applicationId: env0_12});
}
}
}
}
}
function _fun88824() { // fn#88824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2497, offset: 0x01ff3853, size: 104 bytes, params: 1, frame: 14
if (!EmbeddedActivitiesStore.isLaunchingActivity()) {
if (env0_14 != null) {
embeddedActivitiesManager.leaveActivity({location: env0_14.location, applicationId: env0_12});
}
if (onActivityItemSelectedProp != null) {
onActivityItemSelectedProp({applicationId: env0_12});
}
function useActivityShelfItem({activityItem, context, locationObject, onActivityItemSelected, embeddedActivitiesManager, assetNames = ['embedded_cover'], backgroundResolution, launchingComponentId, commandOrigin, source}) { // fn#88825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2720, offset: 0x01ff38bb, size: 619 bytes, params: 2, frame: 32
backgroundResolution = backgroundResolution === undefined ? 250 : backgroundResolution;
const application = activityItem.application;
const activity = activityItem.activity;
const client_platform_config = activity.client_platform_config;
const defaultImport = GetPlatform;
const getOS = PlatformUtilsModule.getOS;
const property = client_platform_config[defaultImport(Reflect.apply(getOS, PlatformUtilsModule, []))];
const Date = global.Date;
const value4 = Date.now();
const r4 = property.label_until != null && value4 < global.Date.parse(property.label_until) && property.label_from != null && value4 > global.Date.parse(property.label_from);
const value10 = (UseEmbeddedActivityBackground)({applicationId: application.id,
size: backgroundResolution, names: assetNames, format: 'webp'});
const r9 = activity.activity_preview_video_asset_id != null ? (importDefault(11599) /* metro dependency 11599: getPreviewVideoAssetUrl */)(application.id,
activity.activity_preview_video_asset_id) : null;
const value13 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(context.type !== 'channel' ? undefined : context.channel).find(function({embeddedActivity}) {
return application.id === embeddedActivity.applicationId;
});
const value14 = useActivityAction({context: context, applicationId: application.id});
const value15 = useOnActivityItemSelected({application: activityItem.application, context: context,
locationObject: locationObject, embeddedActivitiesManager: embeddedActivitiesManager,
onActivityItemSelectedProp: onActivityItemSelected, launchingComponentId: launchingComponentId,
commandOrigin: commandOrigin, source: source});
const staffReleasePhase = getStaffReleasePhase(application, activityItem.activity);
object = {imageBackground: value10, videoUrl: r9, joinableEmbeddedApp: value13, activityAction: value14,
onActivityItemSelected: value15};
object.labelType = r4 ? property.label_type : (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes.NONE;
object.staffReleasePhase = staffReleasePhase;
return object;
}
}
function _fun88820(a0) { // fn#88820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11784:2122, offset: 0x01ff3741, size: 50 bytes, params: 2, frame: 14
return a0 && EmbeddedActivitiesStore?.({applicationId: env2_12});
}
global.__d(_fun88811, 11598, [5, 1378, 4237, 661, 8049, 477, 10718, 11599, 11600, 1909, 7504, 10702, 10701, 6777,
3774, 6771, 8045, 8087, 4603, 9472, 8109,
2]) /* metro module 11598, dependencies: [5, 1378, 4237, 661, 8049, 477, 10718, 11599, 11600, 1909, 7504, 10702, 10701, 6777, 3774, 6771, 8045, 8087, 4603, 9472, 8109, 2] */;
@@ -1,18 +1,25 @@
/* Metro module 10702; source: modules/activities/utils/useCurrentEmbeddedActivity.tsx; dependencies: [1378, 566, 2] */
import EmbeddedActivitiesStore from '../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun82242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10888:6, offset: 0x01ef0762, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useCurrentEmbeddedActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useCurrentEmbeddedActivity.tsx');
exports.default = function() {
return require(dependencyMap[1]).useStateFromStores([EmbeddedActivitiesStore], _fun82244);
};
function useCurrentEmbeddedActivity() { // fn#82243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10888:205, offset: 0x01ef07d4, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], function() {
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
});
function _fun82244() { // fn#82244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10888:282, offset: 0x01d7316a, size: 19 bytes, params: 1, frame: 9
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
}
}
}
function useCurrentEmbeddedActivity() { // fn#82243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10888:205, offset: 0x01ef07d4, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], function() {
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
});
}
global.__d(_fun82242, 10702, [1378, 566, 2]) /* metro module 10702, dependencies: [1378, 566, 2] */;
@@ -1,19 +1,23 @@
/* Metro module 10701; source: modules/activities/utils/useCurrentEmbeddedApplication.tsx; dependencies: [57, 10702, 6777, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseCurrentEmbeddedActivity from './useCurrentEmbeddedActivity.tsx'; /* Metro dependency 10702 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun82240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10887:6, offset: 0x01ef0675, size: 114 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useCurrentEmbeddedApplication.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useCurrentEmbeddedApplication.tsx');
exports.default = useCurrentEmbeddedApplication;
function useCurrentEmbeddedApplication() { // fn#82241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10887:208, offset: 0x01ef06e7, size: 123 bytes, params: 1, frame: 17
const value = a0;
const value2 = undefined;
let fetchesApplication = (value !== value2 ? value : {}).fetchesApplication;
fetchesApplication = fetchesApplication === value2 || fetchesApplication;
const value3 = (UseCurrentEmbeddedActivity)();
return Module00057((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(value3 == null ? [] : [value3.applicationId],
fetchesApplication), 1)[0] ?? value2;
}
}
function useCurrentEmbeddedApplication() { // fn#82241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10887:208, offset: 0x01ef06e7, size: 123 bytes, params: 1, frame: 17
const value = a0;
const value2 = undefined;
let fetchesApplication = (value !== value2 ? value : {}).fetchesApplication;
fetchesApplication = fetchesApplication === value2 || fetchesApplication;
const value3 = (importDefault(10702) /* metro dependency 10702: useCurrentEmbeddedActivity */)();
return env0_2((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(value3 == null ? [] : [value3.applicationId],
fetchesApplication), 1)[0] ?? value2;
}
global.__d(_fun82240, 10701, [57, 10702, 6777, 2]) /* metro module 10701, dependencies: [57, 10702, 6777, 2] */;
@@ -1,99 +1,107 @@
/* Metro module 10718; source: modules/activities/utils/useEmbeddedActivityBackground.tsx; dependencies: [57, 31, 6873, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ApplicationAssetUtilsModule from '../../../utils/ApplicationAssetUtils.tsx'; /* Metro dependency 6873 */
function _fun82351(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:6, offset: 0x01ef40ff, 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(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = ['embedded_cover', 'embedded_background'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useEmbeddedActivityBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useEmbeddedActivityBackground.tsx');
exports.default = useEmbeddedActivityBackground;
}
function useEmbeddedActivityBackground({applicationId, size, names, format}) { // fn#82352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:261, offset: 0x01ef4192, size: 287 bytes, params: 2, frame: 27
const r4 = names !== undefined ? names : env0_4;
format = format === undefined ? 'png' : format;
let env0_2 = undefined;
let env0_3 = undefined;
var env0_4;
let binding = env0_3;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
env0_2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value4[0];
env0_3 = value4[1];
const assetImage = (ApplicationAssetUtilsModule).getAssetImage(applicationId,
property, size, format);
const r1 = property2 ? 'loading' : assetImage != null ? 'fetched' : 'not-found';
binding = env0_3;
env0_4 = binding.useRef(r4);
binding.useEffect(_fun82353);
binding.useEffect(_fun82354, [applicationId]);
return {url: assetImage, state: r1};
function _fun82353() { // fn#82353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:548, offset: 0x01ef42b1, size: 21 bytes, params: 1, frame: 2
env0_4.current = env0_1;
}
function useEmbeddedActivityBackground({applicationId, size, names, format}) { // fn#82352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:261, offset: 0x01ef4192, size: 287 bytes, params: 2, frame: 27
const r4 = names !== undefined ? names : env0_4;
format = format === undefined ? 'png' : format;
let env0_2 = undefined;
let env0_3 = undefined;
var env0_4;
let binding = env0_3;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
env0_2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value4[0];
env0_3 = value4[1];
const assetImage = (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetImage(applicationId,
property, size, format);
const r1 = property2 ? 'loading' : assetImage != null ? 'fetched' : 'not-found';
binding = env0_3;
env0_4 = binding.useRef(r4);
binding.useEffect(_fun82353);
binding.useEffect(_fun82354, [applicationId]);
return {url: assetImage, state: r1};
}
function _fun82354() { // fn#82354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:581, offset: 0x01ef42c6, size: 89 bytes, params: 1, frame: 13
var environment;
var value2;
var moduleValue;
const env0_0 = env0_4.current;
if (applicationId != null) {
value2 = environment.__proto__;
moduleValue = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
moduleValue.getAssets(applicationId).then(_fun82355);
}
}
function _fun82355(a0) { // fn#82355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:638, offset: 0x01ef431f, size: 161 bytes, params: 2, frame: 24
var r4;
var property;
var value6;
var id;
var currentBinding;
var includes;
var name;
var value7;
env1_3(false);
const Object = global.Object;
const value2 = Object.entries(a0);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r4 = value3;
reducibleLoop1: while (true) {
property = value2[r4];
value6 = env2_2(property, 2);
value6[value3];
property = value6[1];
if (property != null) {
id = property.id;
reducibleJoin4: while (true) {
if (id === '') {
break reducibleJoin4;
function _fun82354() { // fn#82354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:581, offset: 0x01ef42c6, size: 89 bytes, params: 1, frame: 13
var environment;
var value2;
var moduleValue;
const env0_0 = env0_4.current;
if (applicationId != null) {
value2 = environment.__proto__;
moduleValue = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
moduleValue.getAssets(applicationId).then(_fun82355);
}
function _fun82355(a0) { // fn#82355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10904:638, offset: 0x01ef431f, size: 161 bytes, params: 2, frame: 24
var r4;
var property;
var value6;
var id;
var currentBinding;
var includes;
var name;
var value7;
env1_3(false);
const Object = global.Object;
const value2 = Object.entries(a0);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r4 = value3;
reducibleLoop1: while (true) {
property = value2[r4];
value6 = env2_2(property, 2);
value6[value3];
property = value6[1];
if (property != null) {
id = property.id;
reducibleJoin4: while (true) {
if (id === '') {
break reducibleJoin4;
}
currentBinding = current;
includes = currentBinding.includes;
name = property.name;
if (Reflect.apply(includes, currentBinding, [name])) {
env1_2(property.id);
return undefined;
}
break reducibleJoin4;
}
}
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value2.length;
if (!(value7 < length)) {
return undefined;
}
r4 = value7;
continue reducibleLoop1;
}
currentBinding = current;
includes = currentBinding.includes;
name = property.name;
if (Reflect.apply(includes, currentBinding, [name])) {
env1_2(property.id);
return undefined;
}
break reducibleJoin4;
}
}
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value2.length;
if (!(value7 < length)) {
return undefined;
}
r4 = value7;
continue reducibleLoop1;
}
}
}
global.__d(_fun82351, 10718, [57, 31, 6873, 2]) /* metro module 10718, dependencies: [57, 31, 6873, 2] */;
@@ -1,35 +1,43 @@
/* Metro module 7859; source: modules/activities/utils/useIsPrivateChannelWithEnabledActivities.tsx; dependencies: [1379, 632, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun62730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8037:6, offset: 0x01b64f7f, size: 125 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useIsPrivateChannelWithEnabledActivities.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useIsPrivateChannelWithEnabledActivities.tsx');
exports.default = useIsPrivateChannelWithEnabledActivities;
exports.isPrivateChannelWithEnabledActivities = isPrivateChannelWithEnabledActivities;
}
function useIsPrivateChannelWithEnabledActivities(a0) { // fn#62731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8037:219, offset: 0x01b64ffc, size: 93 bytes, params: 2, frame: 15
const env0_0 = a0;
const value2 = undefined;
const channel = (UseStateFromStoresModule).useStateFromStores([ChannelStore],
_fun62732);
const r1 = channel == null ? value2 : channel.isPrivate();
return r1 != null && r1;
function _fun62732() { // fn#62732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8037:312, offset: 0x01b65059, size: 26 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0);
}
function useIsPrivateChannelWithEnabledActivities(a0) { // fn#62731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8037:219, offset: 0x01b64ffc, size: 93 bytes, params: 2, frame: 15
const env0_0 = a0;
const value2 = undefined;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun62732);
const r1 = channel == null ? value2 : channel.isPrivate();
return r1 != null && r1;
}
function isPrivateChannelWithEnabledActivities(a0) { // fn#62733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8037:424, offset: 0x01b65073, size: 61 bytes, params: 2, frame: 12
var r1;
if (a0 == null) {
return false;
}
let value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.isPrivate();
r1 = value;
function isPrivateChannelWithEnabledActivities(a0) { // fn#62733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8037:424, offset: 0x01b65073, size: 61 bytes, params: 2, frame: 12
var r1;
if (a0 == null) {
return false;
}
let value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.isPrivate();
r1 = value;
}
return r1 != null && r1;
}
return r1 != null && r1;
}
global.__d(_fun62730, 7859, [1379, 632, 2]) /* metro module 7859, dependencies: [1379, 632, 2] */;
@@ -1,96 +1,131 @@
/* Metro module 10594; source: modules/activities/utils/useJoinFromSupportedPlatformsIconKeys.tsx; dependencies: [31, 661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun81692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10780:6, offset: 0x01eda683, size: 390 bytes, params: 8, frame: 21
var object3;
const closure = getJoinFromSupportedPlatformsIconKeys;
const getJoinFromSupportedPlatformsIconKeys2 = getJoinFromSupportedPlatformsIconKeys;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
const ActivityGamePlatforms = (require(661) /* metro dependency 661: Constants */).ActivityGamePlatforms;
object3 = {DESKTOP: 'desktop', MOBILE: 'mobile', ANDROID: 'android', IOS: 'ios', PLAYSTATION: 'playstation',
const ActivityGamePlatforms = (ConstantsModule).ActivityGamePlatforms;
object = {DESKTOP: 'desktop', MOBILE: 'mobile', ANDROID: 'android', IOS: 'ios', PLAYSTATION: 'playstation',
XBOX: 'xbox', VR: 'vr'};
const object4 = {};
const object2 = {};
const DESKTOP = ActivityGamePlatforms.DESKTOP;
const DESKTOP2 = object3.DESKTOP;
object4[DESKTOP] = DESKTOP2;
const DESKTOP2 = object.DESKTOP;
object2[DESKTOP] = DESKTOP2;
const ANDROID = ActivityGamePlatforms.ANDROID;
const ANDROID2 = object3.ANDROID;
object4[ANDROID] = ANDROID2;
const ANDROID2 = object.ANDROID;
object2[ANDROID] = ANDROID2;
const IOS = ActivityGamePlatforms.IOS;
const IOS2 = object3.IOS;
object4[IOS] = IOS2;
const IOS2 = object.IOS;
object2[IOS] = IOS2;
const XBOX = ActivityGamePlatforms.XBOX;
const XBOX2 = object3.XBOX;
object4[XBOX] = XBOX2;
const XBOX2 = object.XBOX;
object2[XBOX] = XBOX2;
const PS4 = ActivityGamePlatforms.PS4;
let PLAYSTATION = object3.PLAYSTATION;
object4[PS4] = PLAYSTATION;
let PLAYSTATION = object.PLAYSTATION;
object2[PS4] = PLAYSTATION;
const PS5 = ActivityGamePlatforms.PS5;
PLAYSTATION = object3.PLAYSTATION;
object4[PS5] = PLAYSTATION;
PLAYSTATION = object.PLAYSTATION;
object2[PS5] = PLAYSTATION;
const SAMSUNG = ActivityGamePlatforms.SAMSUNG;
object4[SAMSUNG] = null;
object2[SAMSUNG] = null;
const EMBEDDED = ActivityGamePlatforms.EMBEDDED;
object4[EMBEDDED] = null;
object2[EMBEDDED] = null;
const META_QUEST = ActivityGamePlatforms.META_QUEST;
const VR = object3.VR;
object4[META_QUEST] = VR;
const VR = object.VR;
object2[META_QUEST] = VR;
const env0_3 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useJoinFromSupportedPlatformsIconKeys.tsx');
exports.IconKey = object3;
exports.ACTIVITY_GAME_PLATFORM_TO_ICON_KEY = object4;
exports.getJoinFromSupportedPlatformsIconKeys = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useJoinFromSupportedPlatformsIconKeys.tsx');
exports.IconKey = object;
exports.ACTIVITY_GAME_PLATFORM_TO_ICON_KEY = object2;
exports.getJoinFromSupportedPlatformsIconKeys = getJoinFromSupportedPlatformsIconKeys2;
exports.useJoinFromSupportedPlatformsIconKeys = useJoinFromSupportedPlatformsIconKeys;
}
function getJoinFromSupportedPlatformsIconKeys({platforms, currentPlatform, isGameLaunchable}) { // fn#81693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10780:470, offset: 0x01eda809, size: 473 bytes, params: 2, frame: 15
var r0;
var has;
const Set = global.Set;
const set = new Set(platforms);
const items2 = [];
if (platforms == null) {
r0 = env0_3;
} else if (platforms.length === 0) {
r0 = env0_3;
} else if (currentPlatform == null) {
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.ANDROID])) {
if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.MOBILE);
function getJoinFromSupportedPlatformsIconKeys({platforms, currentPlatform, isGameLaunchable}) { // fn#81693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10780:470, offset: 0x01eda809, size: 473 bytes, params: 2, frame: 15
var r0;
var has;
const Set = global.Set;
const set = new Set(platforms);
const items2 = [];
if (platforms == null) {
r0 = env0_3;
} else if (platforms.length === 0) {
r0 = env0_3;
} else if (currentPlatform == null) {
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.ANDROID])) {
if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.MOBILE);
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
r0 = set.has(ActivityGamePlatforms.PS4) || set.has(ActivityGamePlatforms.PS5);
if (r0) {
items2.push(env0_2.PLAYSTATION);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.XBOX])) {
items2.push(env0_2.XBOX);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.DESKTOP])) {
items2.push(env0_2.DESKTOP);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.META_QUEST])) {
items2.push(env0_2.VR);
r0 = items2;
r0 = set.has(ActivityGamePlatforms.PS4) || set.has(ActivityGamePlatforms.PS5);
if (r0) {
items2.push(env0_2.PLAYSTATION);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.XBOX])) {
items2.push(env0_2.XBOX);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.DESKTOP])) {
items2.push(env0_2.DESKTOP);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.META_QUEST])) {
items2.push(env0_2.VR);
r0 = items2;
} else {
r0 = items2;
}
} else {
r0 = items2;
}
} else {
has = set.has;
if (Reflect.apply(has, set, [currentPlatform])) {
if (isGameLaunchable) {
r0 = env0_3;
has = set.has;
if (Reflect.apply(has, set, [currentPlatform])) {
if (isGameLaunchable) {
r0 = env0_3;
} else {
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.ANDROID])) {
if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.MOBILE);
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
r0 = set.has(ActivityGamePlatforms.PS4) || set.has(ActivityGamePlatforms.PS5);
if (r0) {
items2.push(env0_2.PLAYSTATION);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.XBOX])) {
items2.push(env0_2.XBOX);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.DESKTOP])) {
items2.push(env0_2.DESKTOP);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.META_QUEST])) {
items2.push(env0_2.VR);
r0 = items2;
} else {
r0 = items2;
}
}
} else {
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.ANDROID])) {
@@ -126,49 +161,17 @@ function getJoinFromSupportedPlatformsIconKeys({platforms, currentPlatform, isGa
r0 = items2;
}
}
} else {
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.ANDROID])) {
if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.MOBILE);
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
} else if (set.has(ActivityGamePlatforms.ANDROID)) {
items2.push(env0_2.ANDROID);
} else if (set.has(ActivityGamePlatforms.IOS)) {
items2.push(env0_2.IOS);
}
r0 = set.has(ActivityGamePlatforms.PS4) || set.has(ActivityGamePlatforms.PS5);
if (r0) {
items2.push(env0_2.PLAYSTATION);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.XBOX])) {
items2.push(env0_2.XBOX);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.DESKTOP])) {
items2.push(env0_2.DESKTOP);
}
has = set.has;
if (Reflect.apply(has, set, [ActivityGamePlatforms.META_QUEST])) {
items2.push(env0_2.VR);
r0 = items2;
} else {
r0 = items2;
}
}
return r0;
}
function useJoinFromSupportedPlatformsIconKeys({platforms, currentPlatform, isGameLaunchable}) { // fn#81694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10780:1180, offset: 0x01eda9e2, size: 78 bytes, params: 2, frame: 16
return platforms.useMemo(function() {
return getJoinFromSupportedPlatformsIconKeys({platforms: platforms, currentPlatform: currentPlatform,
isGameLaunchable: isGameLaunchable});
}, [currentPlatform, platforms, isGameLaunchable]);
}
return r0;
}
function useJoinFromSupportedPlatformsIconKeys({platforms, currentPlatform, isGameLaunchable}) { // fn#81694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10780:1180, offset: 0x01eda9e2, size: 78 bytes, params: 2, frame: 16
return platforms.useMemo(function() {
return getJoinFromSupportedPlatformsIconKeys({platforms: platforms, currentPlatform: currentPlatform,
isGameLaunchable: isGameLaunchable});
}, [currentPlatform, platforms, isGameLaunchable]);
}
global.__d(_fun81692, 10594, [31, 661, 2]) /* metro module 10594, dependencies: [31, 661, 2] */;
@@ -1,68 +1,72 @@
/* Metro module 10595; source: modules/activities/utils/usePresenceActivityInviteCoverImageURL.tsx; dependencies: [31, 10596, 1852, 6873, 566, 10597, 2] */
import GetDevicePixelRatioNative from '../../../utils/getDevicePixelRatio.native.tsx'; /* Metro dependency 1852 */
import MessageActivityInviteCoverImageStore from '../MessageActivityInviteCoverImageStore.tsx'; /* Metro dependency 10596 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun81696(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:6, offset: 0x01edaa60, size: 167 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const messageActivityInviteCoverImageStore = importDefault(10596) /* metro dependency 10596: MessageActivityInviteCoverImageStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/usePresenceActivityInviteCoverImageURL.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/usePresenceActivityInviteCoverImageURL.tsx');
exports.usePresenceActivityInviteCoverImageURL = usePresenceActivityInviteCoverImageURL;
exports.getPresenceActivityInviteCoverImageURL = getPresenceActivityInviteCoverImageURL;
}
function _getPresenceActivityInviteCoverImageURL({messageId, presenceActivity, application}) { // fn#81697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:156, offset: 0x01edab07, size: 242 bytes, params: 2, frame: 21
var object2;
var r3;
var value;
const coverImageURL = MessageActivityInviteCoverImageStore.getCoverImageURL({messageId: messageId});
if (coverImageURL === null) {
return {'cachedImageURL': null, 'imageURL': null};
function _getPresenceActivityInviteCoverImageURL({messageId, presenceActivity, application}) { // fn#81697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:156, offset: 0x01edab07, size: 242 bytes, params: 2, frame: 21
var r3;
var value;
const coverImageURL = MessageActivityInviteCoverImageStore.getCoverImageURL({messageId: messageId});
if (coverImageURL === null) {
return {'cachedImageURL': null, 'imageURL': null};
}
const value6 = 600 * (GetDevicePixelRatioNative)();
object = {cachedImageURL: coverImageURL};
if ((presenceActivity == null || presenceActivity.assets == null ? undefined : presenceActivity.assets.invite_cover_image) != null) {
value = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
value = value.getAssetImage(presenceActivity.application_id, presenceActivity.assets.invite_cover_image,
value6);
r3 = value;
} else {
r3 = null;
}
let r2 = r3 ?? coverImageURL;
r2 = r2 ?? application.getCoverImageURL(value6);
object.imageURL = r2 ?? null;
return object;
}
const value6 = 600 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
object2 = {cachedImageURL: coverImageURL};
if ((presenceActivity == null || presenceActivity.assets == null ? undefined : presenceActivity.assets.invite_cover_image) != null) {
value = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
value = value.getAssetImage(presenceActivity.application_id, presenceActivity.assets.invite_cover_image,
value6);
r3 = value;
} else {
r3 = null;
function usePresenceActivityInviteCoverImageURL({messageId, presenceActivity, application}) { // fn#81698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:710, offset: 0x01edabf9, size: 166 bytes, params: 2, frame: 20
const {cachedImageURL,
imageURL} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MessageActivityInviteCoverImageStore],
function() {
return _getPresenceActivityInviteCoverImageURL({messageId: messageId, presenceActivity: presenceActivity,
application: application});
}, [messageId, presenceActivity, application]);
imageURL.useEffect(_fun81700, [cachedImageURL, imageURL, messageId]);
return imageURL;
function _fun81700() { // fn#81700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:959, offset: 0x01edaccd, size: 74 bytes, params: 1, frame: 13
var value2;
if (cachedImageURL !== imageURL) {
value2 = environment.__proto__;
(importAll(10597) /* metro dependency 10597: MessageActivityInviteCoverImageActionCreators */).setCoverImageURL({messageId: messageId,
coverImageURL: imageURL});
}
}
}
let r2 = r3 ?? coverImageURL;
r2 = r2 ?? application.getCoverImageURL(value6);
object2.imageURL = r2 ?? null;
return object2;
}
function usePresenceActivityInviteCoverImageURL({messageId, presenceActivity, application}) { // fn#81698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:710, offset: 0x01edabf9, size: 166 bytes, params: 2, frame: 20
const {cachedImageURL,
imageURL} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MessageActivityInviteCoverImageStore],
function() {
return _getPresenceActivityInviteCoverImageURL({messageId: messageId, presenceActivity: presenceActivity,
application: application});
}, [messageId, presenceActivity, application]);
imageURL.useEffect(_fun81700, [cachedImageURL, imageURL, messageId]);
return imageURL;
}
function getPresenceActivityInviteCoverImageURL({messageId, presenceActivity, application}) { // fn#81701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:1082, offset: 0x01edad17, size: 108 bytes, params: 2, frame: 15
var value;
const {cachedImageURL, imageURL} = _getPresenceActivityInviteCoverImageURL({messageId: messageId,
presenceActivity: presenceActivity, application: application});
if (cachedImageURL !== imageURL) {
value = importAll(10597) /* metro dependency 10597: MessageActivityInviteCoverImageActionCreators */;
value.setCoverImageURL({messageId: messageId, coverImageURL: imageURL});
}
return imageURL;
}
function _fun81700() { // fn#81700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:959, offset: 0x01edaccd, size: 74 bytes, params: 1, frame: 13
var value2;
if (cachedImageURL !== imageURL) {
value2 = environment.__proto__;
(importAll(10597) /* metro dependency 10597: MessageActivityInviteCoverImageActionCreators */).setCoverImageURL({messageId: messageId,
coverImageURL: imageURL});
function getPresenceActivityInviteCoverImageURL({messageId, presenceActivity, application}) { // fn#81701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10781:1082, offset: 0x01edad17, size: 108 bytes, params: 2, frame: 15
var value;
const {cachedImageURL, imageURL} = _getPresenceActivityInviteCoverImageURL({messageId: messageId,
presenceActivity: presenceActivity, application: application});
if (cachedImageURL !== imageURL) {
value = importAll(10597) /* metro dependency 10597: MessageActivityInviteCoverImageActionCreators */;
value.setCoverImageURL({messageId: messageId, coverImageURL: imageURL});
}
return imageURL;
}
}
global.__d(_fun81696, 10595, [31, 10596, 1852, 6873, 566, 10597,
2]) /* metro module 10595, dependencies: [31, 10596, 1852, 6873, 566, 10597, 2] */;
@@ -1,399 +1,403 @@
/* Metro module 9526; source: modules/activities/utils/useRefocusOrLaunchActivity.tsx; dependencies: [5, 31, 8065, 1378, 8066, 6772, 566, 8045, 8087, 8111, 9527, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import EmbeddedActivitiesStore from '../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import FramesStore from '../../frames/FramesStore.tsx'; /* Metro dependency 8065 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ApplicationActionCreatorsModule from '../../applications/ApplicationActionCreators.tsx'; /* Metro dependency 6772 */
import * as FramesConstantsModule from '../../frames/FramesConstants.tsx'; /* Metro dependency 8066 */
function _fun74322(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9712:6, offset: 0x01d8a213, size: 191 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_7 = (require(8066) /* metro dependency 8066: FramesConstants */).FrameLayoutModes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useRefocusOrLaunchActivity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useRefocusOrLaunchActivity.tsx');
exports.default = useRefocusOrLaunchActivity;
}
function useRefocusOrLaunchActivity({applicationId, analyticsLocations, runBeforeLaunchAttempt, runAfterLaunchAttempt}) { // fn#74323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9712:263, offset: 0x01d8a2d2, size: 278 bytes, params: 2, frame: 24
const env0_3 = runAfterLaunchAttempt;
const applicationActionCreatorsModule = require(6772) /* metro dependency 6772: ApplicationActionCreators */;
const useApplication = applicationActionCreatorsModule.useApplication;
const data = Reflect.apply(useApplication, applicationActionCreatorsModule, [applicationId]).data;
return data.useCallback(env0_3(_fun74327), [analyticsLocations, data, applicationId,
(require(8045) /* metro dependency 8045: canLaunchFrame */).canLaunchFrame(data),
(require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], function() {
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([FramesStore], function() {
return FramesStore.getConnectedFrame();
}), runAfterLaunchAttempt, runBeforeLaunchAttempt]);
}
function* _fun74327() { // fn#74327, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9712:610, offset: 0x01d8a419, size: 514 bytes, params: 1, frame: 20
var r2;
var id;
var r7;
var guild_id;
var value5;
var applicationId;
var value6;
var binding;
var value7;
var bot;
var value8;
var value9;
var value10;
var binding2;
var property;
var value11;
var launchActivityInBotDM;
var object2;
var value12;
var value13;
var value14;
var items2;
var value15;
var value16;
var value17;
var value18;
var binding3;
var value19;
var launchFrame;
var value20;
var value21;
var value22;
var error;
var location;
var value23;
var value24;
var value25;
var value26;
var updateFrameLayoutMode;
var FOCUSED;
if (false) {
return undefined;
}
value = undefined;
const value4 = null;
if (value4 != require) {
reducibleJoin75: while (true) {
if (value4 == env1_4) {
break reducibleJoin75;
function useRefocusOrLaunchActivity({applicationId, analyticsLocations, runBeforeLaunchAttempt, runAfterLaunchAttempt}) { // fn#74323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9712:263, offset: 0x01d8a2d2, size: 278 bytes, params: 2, frame: 24
const runAfterLaunchAttempt2 = runAfterLaunchAttempt;
const useApplication = ApplicationActionCreatorsModule.useApplication;
const data = Reflect.apply(useApplication, ApplicationActionCreatorsModule, [applicationId]).data;
return data.useCallback(runAfterLaunchAttempt2(_fun74327), [analyticsLocations, data, applicationId,
(require(8045) /* metro dependency 8045: canLaunchFrame */).canLaunchFrame(data),
(require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], function() {
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([FramesStore], function() {
return FramesStore.getConnectedFrame();
}), runAfterLaunchAttempt, runBeforeLaunchAttempt]);
function* _fun74327() { // fn#74327, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9712:610, offset: 0x01d8a419, size: 514 bytes, params: 1, frame: 20
var r2;
var id;
var r7;
var guild_id;
var value5;
var applicationId;
var value6;
var binding;
var value7;
var bot;
var value8;
var value9;
var value10;
var binding2;
var property;
var value11;
var launchActivityInBotDM;
var object;
var value12;
var value13;
var value14;
var items2;
var value15;
var value16;
var value17;
var value18;
var binding3;
var value19;
var launchFrame;
var value20;
var value21;
var value22;
var error;
var location;
var value23;
var value24;
var value25;
var value26;
var updateFrameLayoutMode;
var FOCUSED;
if (false) {
return undefined;
}
value5 = value4 != FramesStore;
reducibleJoin5: while (true) {
if (value5) {
applicationId = FramesStore.applicationId;
value6 = applicationId === require;
r2 = value6;
break reducibleJoin5;
}
r2 = value5;
break reducibleJoin5;
}
if (value4 != EmbeddedActivitiesStore) {
applicationId = EmbeddedActivitiesStore.applicationId;
reducibleJoin7: while (true) {
if (applicationId === require) {
value25 = environment.__proto__.__proto__;
binding = env2_1;
value26 = binding(env2_2[8]);
updateFrameLayoutMode = value26.updateFrameLayoutMode;
applicationId = EmbeddedActivitiesStore.applicationId;
FOCUSED = env2_7.FOCUSED;
Reflect.apply(updateFrameLayoutMode, value26, [{applicationId: applicationId,
layoutMode: FOCUSED}]);
value = undefined;
const value4 = null;
if (value4 != require) {
reducibleJoin75: while (true) {
if (value4 == env1_4) {
break reducibleJoin75;
}
break reducibleJoin7;
}
}
if (r2) {
location = FramesStore.location;
value23 = environment.__proto__.__proto__;
binding = env2_1;
value24 = binding(env2_2[9]);
reducibleJoin73: while (true) {
if ('guild_id' in location) {
guild_id = location.guild_id;
break reducibleJoin73;
value5 = value4 != FramesStore;
reducibleJoin5: while (true) {
if (value5) {
applicationId = FramesStore.applicationId;
value6 = applicationId === require;
r2 = value6;
break reducibleJoin5;
}
r2 = value5;
break reducibleJoin5;
}
guild_id = value4;
break reducibleJoin73;
}
value24(guild_id, location);
break reducibleJoin75;
}
reducibleJoin10: while (true) {
if (value4 == dependencyMap) {
break reducibleJoin10;
}
dependencyMap();
break reducibleJoin10;
}
reducibleJoin11: while (true) {
reduciblePort69: while (true) {
exceptionLanding68: while (true) {
if (value4 != EmbeddedActivitiesStore) {
applicationId = EmbeddedActivitiesStore.applicationId;
reducibleJoin7: while (true) {
if (applicationId === require) {
value25 = environment.__proto__.__proto__;
binding = env2_1;
value26 = binding(env2_2[8]);
updateFrameLayoutMode = value26.updateFrameLayoutMode;
applicationId = EmbeddedActivitiesStore.applicationId;
FOCUSED = env2_7.FOCUSED;
Reflect.apply(updateFrameLayoutMode, value26, [{applicationId: applicationId,
layoutMode: FOCUSED}]);
break reducibleJoin75;
}
break reducibleJoin7;
}
}
if (r2) {
location = FramesStore.location;
value23 = environment.__proto__.__proto__;
binding = env2_1;
value24 = binding(env2_2[9]);
reducibleJoin73: while (true) {
if ('guild_id' in location) {
guild_id = location.guild_id;
break reducibleJoin73;
}
guild_id = value4;
break reducibleJoin73;
}
value24(guild_id, location);
break reducibleJoin75;
}
reducibleJoin10: while (true) {
if (value4 == dependencyMap) {
break reducibleJoin10;
}
dependencyMap();
break reducibleJoin10;
}
reducibleJoin11: while (true) {
reduciblePort69: while (true) {
exceptionLanding68: while (true) {
try {
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin11;
}
break reduciblePort69;
}
if (value4 == env1_3) {
break reducibleJoin75;
}
env1_3();
break reducibleJoin75;
}
if (FrameLayoutModes) {
value18 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding68;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding68;
}
try {
value19 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
launchFrame = value19.launchFrame;
} catch (error) {
break exceptionLanding68;
}
try {
object = {};
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin11;
}
break reduciblePort69;
}
if (value4 == env1_3) {
break reducibleJoin75;
}
env1_3();
break reducibleJoin75;
}
if (FrameLayoutModes) {
value18 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding68;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding68;
}
try {
value19 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
launchFrame = value19.launchFrame;
} catch (error) {
break exceptionLanding68;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
object2.applicationId = require;
} catch (error) {
break exceptionLanding68;
}
try {
value20 = Reflect.apply(launchFrame, value19, [object2]);
} catch (error) {
break exceptionLanding68;
}
yield value20;
try {
value21 = undefined;
value22 = false;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin69: while (true) {
if (value22) {
return value21;
}
break reducibleJoin69;
}
} else {
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
value7 = value4 == binding;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin21: while (true) {
if (value7) {
id = value;
break reducibleJoin21;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
bot = binding.bot;
} catch (error) {
break exceptionLanding68;
}
try {
value8 = value4 == bot;
} catch (error) {
break exceptionLanding68;
}
if (value8) {
id = value;
break reducibleJoin21;
}
try {
id = bot.id;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin21;
}
try {
value9 = value4 == id;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin69: while (true) {
if (value9) {
break reducibleJoin69;
}
value10 = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
break exceptionLanding68;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding2[10];
} catch (error) {
break exceptionLanding68;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
launchActivityInBotDM = value11.launchActivityInBotDM;
} catch (error) {
break exceptionLanding68;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
object2.appId = require;
} catch (error) {
break exceptionLanding68;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
value12 = value4 == binding;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin41: while (true) {
if (value12) {
id = value;
break reducibleJoin41;
try {
object.applicationId = require;
} catch (error) {
break exceptionLanding68;
}
try {
value20 = Reflect.apply(launchFrame, value19, [object]);
} catch (error) {
break exceptionLanding68;
}
yield value20;
try {
value21 = undefined;
value22 = false;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin69: while (true) {
if (value22) {
return value21;
}
break reducibleJoin69;
}
} else {
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
bot = binding.bot;
value7 = value4 == binding;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin21: while (true) {
if (value7) {
id = value;
break reducibleJoin21;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
bot = binding.bot;
} catch (error) {
break exceptionLanding68;
}
try {
value8 = value4 == bot;
} catch (error) {
break exceptionLanding68;
}
if (value8) {
id = value;
break reducibleJoin21;
}
try {
id = bot.id;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin21;
}
try {
value13 = value4 == bot;
value9 = value4 == id;
} catch (error) {
break exceptionLanding68;
}
if (value13) {
id = value;
break reducibleJoin41;
reducibleJoin69: while (true) {
if (value9) {
break reducibleJoin69;
}
value10 = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
break exceptionLanding68;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding2[10];
} catch (error) {
break exceptionLanding68;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
launchActivityInBotDM = value11.launchActivityInBotDM;
} catch (error) {
break exceptionLanding68;
}
try {
object = {};
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
object.appId = require;
} catch (error) {
break exceptionLanding68;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
value12 = value4 == binding;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin41: while (true) {
if (value12) {
id = value;
break reducibleJoin41;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding68;
}
try {
bot = binding.bot;
} catch (error) {
break exceptionLanding68;
}
try {
value13 = value4 == bot;
} catch (error) {
break exceptionLanding68;
}
if (value13) {
id = value;
break reducibleJoin41;
}
try {
id = bot.id;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin41;
}
try {
object.botId = id;
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
value14 = value4 != importDefault;
} catch (error) {
break exceptionLanding68;
}
if (value14) {
try {
} catch (error) {
break exceptionLanding68;
}
r7 = importDefault;
} else {
try {
items2 = [];
} catch (error) {
break exceptionLanding68;
}
r7 = items2;
}
try {
object.analyticsLocations = r7;
} catch (error) {
break exceptionLanding68;
}
try {
value15 = Reflect.apply(launchActivityInBotDM, value11, [object]);
} catch (error) {
break exceptionLanding68;
}
yield value15;
try {
value16 = undefined;
value17 = false;
} catch (error) {
break exceptionLanding68;
}
if (value17) {
return value16;
}
break reducibleJoin69;
}
try {
id = bot.id;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin41;
}
try {
object2.botId = id;
} catch (error) {
break exceptionLanding68;
if (value4 == env1_3) {
break reducibleJoin75;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
value14 = value4 != importDefault;
} catch (error) {
break exceptionLanding68;
}
if (value14) {
try {
} catch (error) {
break exceptionLanding68;
}
r7 = importDefault;
} else {
try {
items2 = [];
} catch (error) {
break exceptionLanding68;
}
r7 = items2;
}
try {
object2.analyticsLocations = r7;
} catch (error) {
break exceptionLanding68;
}
try {
value15 = Reflect.apply(launchActivityInBotDM, value11, [object2]);
} catch (error) {
break exceptionLanding68;
}
yield value15;
try {
value16 = undefined;
value17 = false;
} catch (error) {
break exceptionLanding68;
}
if (value17) {
return value16;
}
break reducibleJoin69;
env1_3();
break reducibleJoin75;
}
}
if (value4 == env1_3) {
break reducibleJoin75;
}
env1_3();
break reducibleJoin75;
return value;
}
}
return value;
}
global.__d(_fun74322, 9526, [5, 31, 8065, 1378, 8066, 6772, 566, 8045, 8087, 8111, 9527,
2]) /* metro module 9526, dependencies: [5, 31, 8065, 1378, 8066, 6772, 566, 8045, 8087, 8111, 9527, 2] */;
@@ -1,93 +1,109 @@
/* Metro module 15406; source: modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx; dependencies: [5, 31, 1379, 1934, 661, 3774, 8102, 10653, 8111, 1239, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
function _fun117857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:6, offset: 0x024c35a8, size: 191 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx');
exports.default = useTransitionToConnectedActivityInVoice;
}
function useTransitionToConnectedActivityInVoice({onTransition}) { // fn#117858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:276, offset: 0x024c3667, size: 52 bytes, params: 2, frame: 14
env0_4.useEffect(function() {
var closure = _fun117860;
var env0_0 = closure;
var env0_1 = _fun117861;
var ComponentDispatch = require(dependencyMap[9]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.OPEN_EMBEDDED_ACTIVITY, closure);
return _fun117865;
}, [onTransition]);
}
function _fun117859() { // fn#117859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:356, offset: 0x024c369b, size: 86 bytes, params: 1, frame: 15
const closure = function() {
return _handler.apply(this, arguments);
};
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const subscribe = ComponentDispatch.subscribe;
let OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
Reflect.apply(subscribe, ComponentDispatch, [OPEN_EMBEDDED_ACTIVITY, closure]);
return function() {
var ComponentDispatch = require(dependencyMap[9]).ComponentDispatch;
var OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
ComponentDispatch.unsubscribe(OPEN_EMBEDDED_ACTIVITY, handler_117860);
};
}
function _handler() { // fn#117861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:418, offset: 0x024c36f1, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun117863).apply(this, arguments);
}
async function _fun117863({location}) { // fn#117863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:457, offset: 0x024c373a, size: 240 bytes, params: 2, frame: 19
var guild_id;
var channel;
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env4_0;
const embeddedActivityLocationChannelId = binding(env4_2[5]).getEmbeddedActivityLocationChannelId(location);
if (embeddedActivityLocationChannelId != null) {
binding = env4_1;
if (binding(env4_2[6])(embeddedActivityLocationChannelId)) {
binding = env4_6;
if (binding.getVoiceChannelId() === embeddedActivityLocationChannelId) {
channel = env4_5.getChannel(embeddedActivityLocationChannelId);
guild_id = channel == null ? value : channel.guild_id;
global.setTimeout(_fun117864, 0);
return value;
function useTransitionToConnectedActivityInVoice({onTransition}) { // fn#117858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:276, offset: 0x024c3667, size: 52 bytes, params: 2, frame: 14
ReactModule.useEffect(function() {
var closure = _fun117860;
var env0_0 = closure;
var env0_1 = _fun117861;
var ComponentDispatch = require(dependencyMap[9]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.OPEN_EMBEDDED_ACTIVITY, closure);
return _fun117865;
}, [onTransition]);
function _fun117859() { // fn#117859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:356, offset: 0x024c369b, size: 86 bytes, params: 1, frame: 15
const closure = function() {
return _handler.apply(this, arguments);
};
let ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const subscribe = ComponentDispatch.subscribe;
let OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
Reflect.apply(subscribe, ComponentDispatch, [OPEN_EMBEDDED_ACTIVITY, closure]);
return function() {
var ComponentDispatch = require(dependencyMap[9]).ComponentDispatch;
var OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
ComponentDispatch.unsubscribe(OPEN_EMBEDDED_ACTIVITY, handler_117860);
};
function handler_117860() { // fn#117860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:361, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13
return _handler.apply(this, arguments);
}
binding = env4_1;
await binding(env4_2[7])({channelId: embeddedActivityLocationChannelId});
if (false) {
return undefined;
function _handler() { // fn#117861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:418, offset: 0x024c36f1, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun117863).apply(this, arguments);
async function _fun117863({location}) { // fn#117863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:457, offset: 0x024c373a, size: 240 bytes, params: 2, frame: 19
var guild_id;
var channel;
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env4_0;
const embeddedActivityLocationChannelId = binding(env4_2[5]).getEmbeddedActivityLocationChannelId(location);
if (embeddedActivityLocationChannelId != null) {
binding = env4_1;
if (binding(env4_2[6])(embeddedActivityLocationChannelId)) {
binding = env4_6;
if (binding.getVoiceChannelId() === embeddedActivityLocationChannelId) {
channel = env4_5.getChannel(embeddedActivityLocationChannelId);
guild_id = channel == null ? value : channel.guild_id;
global.setTimeout(_fun117864, 0);
return value;
}
binding = env4_1;
await binding(env4_2[7])({channelId: embeddedActivityLocationChannelId});
if (false) {
return undefined;
}
binding = env4_5;
channel = binding.getChannel(embeddedActivityLocationChannelId);
guild_id = channel == null ? value : channel.guild_id;
global.setTimeout(_fun117864, 0);
return value;
}
}
return value;
function _fun117864() { // fn#117864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:679, offset: 0x024c382a, size: 65 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
env5_1(env5_2[8])(guild_id, location);
value = environment.__proto__.__proto__.__proto__.__proto__;
if (require != null) {
require();
}
}
}
}
binding = env4_5;
channel = binding.getChannel(embeddedActivityLocationChannelId);
guild_id = channel == null ? value : channel.guild_id;
global.setTimeout(_fun117864, 0);
return value;
function _fun117865() { // fn#117865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:819, offset: 0x024c386b, size: 62 bytes, params: 1, frame: 14
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const unsubscribe = ComponentDispatch.unsubscribe;
const OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
Reflect.apply(unsubscribe, ComponentDispatch, [OPEN_EMBEDDED_ACTIVITY, handler_117860]);
}
}
}
return value;
}
function _fun117864() { // fn#117864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:679, offset: 0x024c382a, size: 65 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
env5_1(env5_2[8])(guild_id, location);
value = environment.__proto__.__proto__.__proto__.__proto__;
if (require != null) {
require();
}
}
global.__d(_fun117857, 15406, [5, 31, 1379, 1934, 661, 3774, 8102, 10653, 8111, 1239,
2]) /* metro module 15406, dependencies: [5, 31, 1379, 1934, 661, 3774, 8102, 10653, 8111, 1239, 2] */;