Initial commit

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

No files matched your search

@@ -0,0 +1,82 @@
/* Metro module 12081; source: modules/routing/KeybindRouterStore.tsx; dependencies: [661, 3974, 3987, 685, 690, 2] */
function _fun92839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:6, offset: 0x0209ad62, size: 161 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(661) /* metro dependency 661: Constants */;
const env0_2 = value.Routes;
const env0_3 = value.ME;
value = require(685) /* metro dependency 685 */;
value = value.createWithEqualityFn(function(a0) {
var env0_0 = a0;
return {'path': null, 'basePath': '/', 'guildId': null, 'channelId': null, updatePath: _fun92842,
resetPath: _fun92844};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/KeybindRouterStore.tsx');
exports.default = value;
}
function getMatchData(a0) { // fn#92840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:124, offset: 0x0209ae03, size: 357 bytes, params: 2, frame: 28
var params;
let value = a0;
const matchPathCompatModule = require(3974) /* metro dependency 3974: matchPathCompat */;
let matchPath = matchPathCompatModule.matchPath;
const value3 = null;
const value4 = '';
const r4 = value3 != value ? value : value4;
const object2 = {};
const CHANNEL = Routes.CHANNEL;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
let guildId = RouteParam.guildId;
object2.path = Reflect.apply(CHANNEL, Routes, [Reflect.apply(guildId, RouteParam, []),
RouteParam.channelId({optional: true}), ':messageId?']);
const value7 = Reflect.apply(matchPath, matchPathCompatModule, [r4, object2]);
if (value3 != value7) {
params = value7.params;
guildId = params.guildId;
channelId = params.channelId;
return {guildId: guildId === ME ? value3 : guildId, channelId: value3 != channelId ? channelId : value3};
}
const moduleValue2 = matchPathCompatModule;
matchPath = moduleValue2.matchPath;
const r6 = value3 != value ? value : value4;
const GUILD_BOOSTING_MARKETING = Routes.GUILD_BOOSTING_MARKETING;
value = Reflect.apply(matchPath, moduleValue2, [r6, {path: Reflect.apply(GUILD_BOOSTING_MARKETING, Routes,
[RouteParam.guildId()])}]);
return value3 != value ? {guildId: value.params.guildId, channelId: value3} : {'guildId': null, 'channelId': null};
}
function _fun92841(a0) { // fn#92841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:624, offset: 0x0209af68, size: 51 bytes, params: 2, frame: 3
const env0_0 = a0;
return {'path': null, 'basePath': '/', 'guildId': null, 'channelId': null, updatePath: updatePath,
resetPath: resetPath};
}
function updatePath(a0) { // fn#92842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:680, offset: 0x0209af9b, size: 81 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const matchData = getMatchData(a0);
const env0_1 = matchData.guildId;
const env0_2 = matchData.channelId;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92843);
}
function resetPath(a0) { // fn#92844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:805, offset: 0x0209b01a, size: 81 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const matchData = getMatchData(a0);
const env0_1 = matchData.guildId;
const env0_2 = matchData.channelId;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92845);
}
function _fun92843() { // fn#92843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:764, offset: 0x0209afec, size: 46 bytes, params: 1, frame: 12
return env1_0({path: env0_0, guildId: guildId, channelId: channelId});
}
function _fun92845() { // fn#92845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:888, offset: 0x0209b06b, size: 53 bytes, params: 1, frame: 12
return env1_0({path: null, guildId: guildId, channelId: channelId, basePath: env0_0});
}
+279
View File
@@ -0,0 +1,279 @@
/* Metro module 662; source: modules/routing/RouteConstants.tsx; dependencies: [663, 668, 669, 484, 2] */
function _fun7941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#7941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:6, offset: 0x00d302c8, size: 1752 bytes, params: 8, frame: 29
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectibleShopTab;
const CONFERENCE_MODE_ENABLED = (require(668) /* metro dependency 668: ConferenceModeConstants */).CONFERENCE_MODE_ENABLED;
let value = require(669) /* metro dependency 669: GlobalDiscoveryAppsConstants */;
const env0_1 = value.ApplicationDirectoryProfileSections;
const env0_2 = value.GlobalDiscoveryAppsSections;
Object = global.Object;
value = '/login';
const value2 = '/register';
value = Object.freeze({'INDEX': '/', 'APP': '/app', 'APP_WITH_INVITE_AND_GUILD_ONBOARDING': null,
'APP_WITH_GIFT_CODE': null, 'ACTIVITY': '/activity', 'ACTIVITIES': '/activities',
'ACTIVITIES_HAPPENING_NOW': '/activities/happening-now', 'ACTIVITY_DETAILS': null,
'APPLICATION_LIBRARY': '/library', 'APPLICATION_LIBRARY_INVENTORY': '/library/inventory',
APP_WITH_INVITE_AND_GUILD_ONBOARDING: function(a0) {
return '/app/invite-with-guild-onboarding/' + a0;
}, APP_WITH_GIFT_CODE: function(a0) {
return '/app/gifts/' + a0;
}, ACTIVITY_DETAILS: function(a0) {
return '/activities/' + a0;
}, APPLICATION_LIBRARY_ACTION: function(a0, a1) {
return '/library/' + a0 + '/' + a1;
}, APPLICATION_LIBRARY_SETTINGS: '/library/settings', APPLICATION_STORE: '/store',
APPLICATION_STORE_LISTING_SKU: function(a0, a1) {
return '/store/skus/' + a0 + (a1 != null ? '/' + a1 : '');
}, APPLICATION_STORE_LISTING_APPLICATION: function(a0, a1) {
return '/store/applications/' + a0 + (a1 != null ? '/' + a1 : '');
}, BILLING_PREFIX: '/billing', BILLING_LOGIN_HANDOFF: '/billing/login/handoff',
BILLING_PREMIUM_SUBSCRIBE: '/billing/premium/subscribe',
BILLING_PAYMENT_SOURCES_CREATE: '/billing/payment-sources/create',
BILLING_PREMIUM_SWITCH_PLAN: '/billing/premium/switch-plan',
BILLING_GUILD_SUBSCRIPTIONS_PURCHASE: '/billing/guild-subscriptions/purchase',
BILLING_PAYMENTS: '/billing/payments', BILLING_PROMOTION_REDEMPTION: function(a0) {
return '/billing/promotions/' + a0;
}, BILLING_PROMOTION_REDEMPTION_GENERIC: '/billing/promotions',
BILLING_PROMOTION_DIRECT_FULFILLMENT_REDEMPTION: function(a0, a1) {
return '/billing/partner-promotions/' + a0 + '/' + a1;
}, GIFT_CARD_REDEEM: '/redeem', FRIENDS: '/channels/@me', ME: '/channels/@me',
MESSAGE_REQUESTS: '/message-requests', CHANNEL: CHANNEL_7950, CHANNEL_THREAD_VIEW: function(a0, a1, a2, a3) {
var value = '/channels/' + a0 + '/' + a1 + '/threads/' + a2;
return a3 == null ? value : '' + value + '/' + a3;
}, VOICE_CHAT_CHANNEL_PARTIAL: function(a0, a1, a2) {
var value = '/voice/' + a0 + '/' + a1;
return a2 == null ? value : '' + value + '/' + a2;
}, LOGIN: value, LOGIN_HANDOFF: '/login/handoff', LOGIN_ONE_TIME: '/login/one-time', REGISTER: value2,
DEFAULT_LOGGED_OUT: CONFERENCE_MODE_ENABLED ? value2 : value, INVITE: function(a0) {
return '/invite/' + a0;
}, INVITE_LOGIN: function(a0) {
return '/invite/' + a0 + '/login';
}, INVITE_REGISTER: function(a0) {
return '/invite/' + a0 + '/register';
}, INVITE_PROXY: function(a0) {
return '/invite-proxy/' + a0;
}, GUILD_TEMPLATE: function(a0) {
return '/template/' + a0;
}, GUILD_TEMPLATE_LOGIN: function(a0) {
return '/template/' + a0 + '/login';
}, GIFT_CODE: function(a0) {
return '/gifts/' + a0;
}, GIFT_CODE_LOGIN: function(a0) {
return '/gifts/' + a0 + '/login';
}, WELCOME: function(a0, a1) {
var value = a0;
return a1 != null ? '/welcome/' + (value ?? '@me') + '/' + a1 : '/welcome/' + (value ?? '@me');
}, VERIFY: '/verify', VERIFY_REQUEST: '/verify-request', RESET: '/reset', APPS: '/apps', ACTIVATE: '/activate',
ACTIVATE_HANDOFF: '/activate/handoff', CONNECTION_LINK: function(a0) {
return '/connections/' + a0 + '/link';
}, CONNECTION_LINK_AUTHORIZE: function(a0) {
return '/connections/' + a0 + '/link-authorize';
}, CONNECTIONS_SUCCESS: function(a0) {
return '/connections/' + a0 + '/success';
}, CONNECTIONS_ERROR: function(a0) {
return '/connections/' + a0 + '/error';
}, CONNECTIONS: function(a0) {
return '/connections/' + a0;
}, CONNECTIONS_AUTHORIZE_CONTINUE: function(a0) {
return '/connections/' + a0 + '/authorize-continue';
}, CONNECT_AUTHORIZE: '/connect/authorize', OAUTH2_AUTHORIZE: '/oauth2/authorize',
OAUTH2_AUTHORIZED: '/oauth2/authorized', OAUTH2_ERROR: '/oauth2/error', SETTINGS: function(a0, a1) {
return '/settings/' + a0 + (a1 != null ? '/' + a1 : '');
}, DEVELOPER_ACTIVATE_APPLICATION_TEST_MODE: '/settings/advanced/activate-application-test-mode',
SNOWSGIVING: '/snowsgiving', PLAYGROUND: function(a0, a1) {
var r1;
var r0;
var value = '/playground';
if (a0 != null) {
value += '/' + a0;
if (a1 == null) {
r1 = value;
} else {
value += '/' + a1;
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}, CHANGELOGS: function(a0) {
return '/settings/changelogs' + (a0 != null ? '/' + a0 : '');
}, USERS: function(a0) {
return '/users/' + a0;
}, GUILD_CREATE: '/guilds/create', DISABLE_EMAIL_NOTIFICATIONS: '/disable-email-notifications',
DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS: '/disable-server-highlight-notifications',
USER_GUILD_NOTIFICATION_SETTINGS: function(a0) {
return '/guilds/' + a0 + '/notification-settings';
}, AUTHORIZE_IP: '/authorize-ip', REJECT_IP: '/reject-ip', REJECT_MFA: '/reject-mfa',
AUTHORIZE_PAYMENT: '/authorize-payment', HANDOFF: '/handoff', DOMAIN_MIGRATION: '/domain-migration',
XBOX_EDU: '/connections/xbox/intro', XBOX_PIN: '/connections/xbox/pin',
DOWNLOAD_QR_CODE_REDIRECT: '/download-qr-code', BILLING_POPUP_BRIDGE_CALLBACK: '/billing/popup-bridge/callback',
OAUTH2_WHITELIST_ACCEPT: '/oauth2/allowlist/accept', GUILD_DISCOVERY: '/guild-discovery',
GLOBAL_DISCOVERY: '/discovery', QUEST_HOME_DEPRECATED: '/discovery/quests', QUEST_HOME: '/quest-home',
GLOBAL_DISCOVERY_SERVERS: '/discovery/servers', GLOBAL_DISCOVERY_APPS: '/discovery/applications',
GLOBAL_DISCOVERY_APPS_CATEGORY: function(a0) {
return '/discovery/applications/categories/' + a0;
}, GLOBAL_DISCOVERY_APPS_PROFILE: function(a0) {
return '/discovery/applications/' + a0;
}, GLOBAL_DISCOVERY_APPS_PROFILE_SECTION: function(a0, a1) {
return '/discovery/applications/' + a0 + '/' + a1;
}, GLOBAL_DISCOVERY_APPS_PROFILE_STORE_SKU: function(a0, a1) {
var STORE = GlobalDiscoveryAppsSections.STORE;
return '/discovery/applications/' + a0 + '/' + STORE + '/' + a1;
}, GLOBAL_DISCOVERY_APPS_SEARCH: '/discovery/applications/search', GUILD_MEMBER_VERIFICATION: function(a0) {
return '/member-verification/' + a0;
}, GUILD_MEMBER_VERIFICATION_FOR_HUB: function(a0, a1) {
return '/member-verification-for-hub/' + a0 + (a1 != null ? '/' + a1 : '');
}, POPOUT_WINDOW: '/popout', UPCOMING_STAGES: function(a0, a1) {
return '/guild-stages/' + a0 + (a1 != null ? '/' + a1 : '');
}, VERIFY_HUB_EMAIL: '/verify-hub-email', OPEN_APP_FROM_EMAIL: '/open-app-from-email',
BILLING_MANAGE_SUBSCRIPTION: '/billing/premium/manage', BILLING_MANAGE_SUBSCRIPTION_WITH_DEEP_LINK: function(a0,
a1) {
return '/billing/premium/manage?deep_link_type=' + a0 + (a1 != null ? '&load_id=' + a1 : '');
}, BILLING_MANAGE_SUBSCRIPTION_WITH_FLOW_TYPE: function(a0, a1) {
return '/billing/premium/manage?flow_type=' + a0 + (a1 != null ? '&load_id=' + a1 : '');
}, BILLING_STANDALONE_CHECKOUT_PAGE: BILLING_STANDALONE_CHECKOUT_PAGE,
BILLING_STANDALONE_GUILD_BOOST_CHECKOUT_PAGE: BILLING_STANDALONE_GUILD_BOOST_CHECKOUT_PAGE,
GUILD_BOOSTING_MARKETING: function(a0) {
return '/guilds/' + a0 + '/premium-guild-subscriptions';
}, GUILD_SETTINGS: function(a0, a1, a2) {
var value = '';
var value3 = '/guilds/' + a0 + '/settings' + (a1 != null ? '/' + a1 : value);
return a2 == null ? value3 : value + value3 + '/' + a2;
}, PICK_GUILD_SETTINGS: PICK_GUILD_SETTINGS, GUILD_EVENT_DETAILS: function(a0, a1, a2) {
return '/events/' + a0 + '/' + a1 + (a2 != null ? '/' + a2 : '');
}, FEATURE: function(a0) {
return '/feature/' + a0;
}, GUILD_FEATURE: function(a0, a1) {
return '/feature/' + a0 + '/' + a1;
}, GUILD_JOIN_REQUEST: function(a0, a1) {
return '/guilds/' + a0 + '/requests/' + a1;
}, MOBILE_WEB_HANDOFF: '/mweb-handoff', APPLICATION_DIRECTORY: '/application-directory',
APPLICATION_DIRECTORY_PROFILE: function(a0) {
return '/application-directory/' + a0;
}, APPLICATION_DIRECTORY_PROFILE_SECTION: function(a0, a1) {
return '/application-directory/' + a0 + '/' + a1;
}, APPLICATION_DIRECTORY_PROFILE_STORE_SKU: function(a0, a1) {
var STORE = ApplicationDirectoryProfileSections.STORE;
return '/application-directory/' + a0 + '/' + STORE + '/' + a1;
}, APPLICATION_DIRECTORY_SEARCH: '/application-directory/search', FAMILY_CENTER: '/family-center',
FAMILY_CENTER_MY_FAMILY: function(a0, a1) {
return '/feature/family-center/my-family/' + a0 + '/' + a1;
}, SERVER_SHOP: function(a0) {
return '/channels/' + a0 + '/shop';
}, CHANNELS_GAME_SHOP: CHANNELS_GAME_SHOP, GAME_SHOP: function(a0, a1, a2) {
var r1;
var r0;
var value = '/game-shop/' + a0;
if (a1 == null) {
r0 = value;
} else {
value += '/' + a1;
if (a2 == null) {
r1 = value;
} else {
value += '/' + a2;
r1 = value;
}
r0 = r1;
}
return r0;
}, GUILD_PRODUCT: function(a0, a1) {
return '/channels/' + a0 + '/shop/' + a1;
}, REPORT: '/report', REPORT_SECOND_LOOK: '/report-review', COLLECTIBLES_SHOP: '/shop',
COLLECTIBLES_SHOP_GAME_SHOP: COLLECTIBLES_SHOP_GAME_SHOP, COLLECTIBLES_SHOP_WITH_TAB: function(a0) {
return '/shop?tab=' + a0;
}, COLLECTIBLES_SHOP_COLLECTION_DETAIL: function(a0) {
return '/shop/collection/' + a0;
}, COLLECTIBLES_SHOP_PRODUCT_DETAIL: function(a0) {
return '/shop/product/' + a0;
}, COLLECTIBLES_SHOP_LAYOUT: function(a0) {
return '/shop/layout/' + a0;
}, NITRO_HOME: '/store', ACCOUNT_STANDING: '/account-standing', CHANNEL_SUMMARIES: function(a0) {
return '/channels/' + a0 + '/summaries';
}, CHANNEL_SUMMARY: function(a0, a1) {
return '/channels/' + a0 + '/summaries/' + a1;
}, USER_SUMMARIES: '/users/@me/summaries', QUESTS: function(a0) {
return '/quests/' + a0;
}, GAME_PROFILE: function(a0) {
return '/games/' + a0;
}, ACCOUNT_REVERT: function(a0) {
return '/wasntme/' + a0;
}, POWERUP_STORE: function(a0) {
return '/channels/' + a0 + '/boosts';
}, CONFERENCE_MODE: '/conference-mode', CONFERENCE_MODE_VOICE: function(a0, a1) {
return '/conference-mode/voice/' + a0 + '/' + a1;
}, QUEST_PREVIEW: function(a0) {
return '/quest-preview/' + a0;
}, QUEST_PREVIEW_TOOL_2: function(a0) {
return '/quest-home?tab=preview_tool&quest_id=' + a0;
}, ICYMI: '/icymi'});
value = (require(484) /* metro dependency 484: PathUtils */).wrapPaths(value, [':', '?', '@']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteConstants.tsx');
exports.ME = '@me';
exports.FAVORITES = '@favorites';
exports.NOTIFICATIONS_INBOX = '@inbox';
exports.EMPTY_NUX_SERVER = '@guilds-empty-nux';
exports.MOBILE_GUILD_UPSELL_LIST = '@guild-upsell-list';
exports.PSEUDO_GUILD_IDS = ['@me', '@favorites', '@guilds-empty-nux', '@inbox', '@guild-upsell-list'];
exports.Routes = value;
}
function CHANNEL_7950(a0, a1, a2) { // fn#7950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:1708, offset: 0x00d30ae8, size: 129 bytes, params: 4, frame: 18
const value = a0;
const r4 = a1 == null ? '/channels/' + (value || '@me') : '/channels/' + (value || '@me') + '/' + a1;
return a2 == null ? r4 : '' + r4 + '/' + a2;
}
function BILLING_STANDALONE_CHECKOUT_PAGE(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#7982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:5358, offset: 0x00d310f0, size: 209 bytes, params: 8, frame: 27
const value = '';
return '/billing/premium/subscribe?plan_id=' + global + '&gift=' + require + '&load_id=' + importDefault + (importAll != null ? '&payment_method_type=' + importAll : value) + (module != null ? '&deep_link_type=' + module : value) + (exports != null ? '&use_preset_offer=' + exports : value) + (dependencyMap != null ? '&flow_type=' + dependencyMap : value);
}
function BILLING_STANDALONE_GUILD_BOOST_CHECKOUT_PAGE(a0, a1, a2, a3) { // fn#7983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:5631, offset: 0x00d311c1, size: 151 bytes, params: 5, frame: 19
const value = '';
return '/billing/guild-subscriptions/purchase?guild_id=' + a0 + (a1 != null ? '&deep_link_type=' + a1 : value) + (a2 != null ? '&load_id=' + a2 : value) + (a3 != null ? '&flow_type=' + a3 : value);
}
function PICK_GUILD_SETTINGS(a0, a1, a2) { // fn#7986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:5989, offset: 0x00d312ea, size: 143 bytes, params: 4, frame: 18
const value = '';
const value3 = '/guilds/settings' + (a0 != null ? '/' + a0 : value);
return value + (a1 == null ? value3 : value + value3 + '/' + a1) + (a2 != null ? '?feature=' + a2 : value);
}
function CHANNELS_GAME_SHOP(a0, a1, a2, a3) { // fn#7996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:6844, offset: 0x00d314c9, size: 140 bytes, params: 5, frame: 17
var r1;
var r0;
let value = a1;
value = '/channels/' + a0 + '/game-shop' + ('/' + (value ?? 0));
if (a2 == null) {
r0 = value;
} else {
value += '/' + a2;
if (a3 == null) {
r1 = value;
} else {
value += '/' + a3;
r1 = value;
}
r0 = r1;
}
return r0;
}
function COLLECTIBLES_SHOP_GAME_SHOP(a0, a1, a2, a3) { // fn#7999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:7217, offset: 0x00d315df, size: 160 bytes, params: 5, frame: 19
var r5;
const GAME_SHOPS = CollectibleShopTab.GAME_SHOPS;
let value = '/shop?tab=' + GAME_SHOPS + '&applicationId=' + a0;
if (a1 == null) {
r5 = value;
} else {
value += '&pageIndex=' + a1;
r5 = value;
}
const r2 = a2 == null ? r5 : r5 + ('&skuId=' + a2);
return a3 == null ? r2 : r2 + ('&slug=' + a3);
}
+431
View File
@@ -0,0 +1,431 @@
/* Metro module 12080; source: modules/routing/RouteManager.tsx; dependencies: [6, 7, 4257, 12081, 661, 1230, 12082, 7364, 2] */
function _fun92819(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:6, offset: 0x0209a336, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_92822 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const keybindRouterStore = importDefault(12081) /* metro dependency 12081: KeybindRouterStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Routes;
let value = _fun92823();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteManager.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_92820(a0, a1) { // fn#92820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:158, offset: 0x0209a41c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun92821;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_92822(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_92822(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_92822(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun92821;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun92823() { // fn#92823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1078, offset: 0x0209a590, size: 236 bytes, params: 1, frame: 15
return env0_3(RouteManager, [{key: 'initialize', value: value_92829}, {key: 'executeRouteRewrites',
value: value_92830}, {key: 'cleanup', value: function() {
var property = this.unlistenHistory;
if (property != null) {
property.call(this);
}
this.unlistenHistory = undefined;
property = this.unlistenKeyboardChange;
if (property != null) {
property.call(this);
}
this.unlistenKeyboardChange = undefined;
GatewayConnectionStore.removeChangeListener(this.handleConnectionChange);
}}, {key: 'addRouteChangeListener', value: value_92832}, {key: 'addRouteRewriter', value: value_92834},
{key: 'removeRouteChangeListener', value: function(a0) {
this.listeners.delete(a0);
}}, {key: 'removeRouteRewriter', value: function(a0) {
this.rewrites.delete(a0);
}}, {key: 'getHistory', value: value_92838}]);
}
function RouteManager() { // fn#92824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1099, offset: 0x0209a67c, size: 179 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
env1_2(this, RouteManager);
let Set = global.Set;
this.rewrites = new Set();
Set = global.Set;
this.listeners = new Set();
this.routeChangeCount = 0;
this.timer = -1;
this.connected = false;
this.handleConnectionChange = handleConnectionChange;
this.handleRouteChange = handleRouteChange;
this.handleKeybindRouteChange = handleKeybindRouteChange;
this.flushRoute = flushRoute;
}
function value_92829() { // fn#92829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:2084, offset: 0x0209a99d, size: 172 bytes, params: 1, frame: 17
this.cleanup();
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
let getHistory = router_utilsModule.getHistory;
const value2 = Reflect.apply(getHistory, router_utilsModule, []);
this.unlistenHistory = value2.listen(this.handleRouteChange);
const moduleValue2 = router_utilsModule;
getHistory = moduleValue2.getHistory;
KeybindRouterStore.getState().resetPath(Reflect.apply(getHistory, moduleValue2, []).location.pathname);
this.unlistenKeyboardChange = KeybindRouterStore.subscribe(this.handleKeybindRouteChange);
GatewayConnectionStore.addChangeListener(this.handleConnectionChange);
}
function value_92830(a0, a1) { // fn#92830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:2412, offset: 0x0209aa49, size: 299 bytes, params: 3, frame: 21
var r5;
var value;
var value2;
var value3;
var done;
var value4;
var moduleValue;
var getHistory;
var location;
var pathname;
var value5;
var value6;
var addBreadcrumb;
var path;
var replaceWith;
this.routeChangeCount = this.routeChangeCount + 1;
if (this.routeChangeCount < 10) {
value = environment.__proto__;
value2 = _createForOfIteratorHelperLoose_92820(this.rewrites);
value3 = value2();
done = value3.done;
if (done) {
return false;
}
r5 = value3;
loopExit3: while (true) {
value4 = r5.value;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue.getHistory;
location = Reflect.apply(getHistory, moduleValue, []).location;
pathname = location.pathname;
value5 = value4(a0, a1);
if (value5 != null) {
break loopExit3;
}
value6 = value2();
done = value6.done;
if (done) {
return false;
}
r5 = value6;
continue;
}
value = require(7364) /* metro dependency 7364 */;
addBreadcrumb = value.addBreadcrumb;
path = value5.path;
Reflect.apply(addBreadcrumb, value,
[{message: 'RouteManager.handleRouteChange: A route rewrite is replacing the current route',
data: {replacePath: path, previousPath: pathname}}]);
value = require(1230) /* metro dependency 1230: router_utils */;
replaceWith = value.replaceWith;
path = value5.path;
Reflect.apply(replaceWith, value, [path, value5.state]);
return true;
}
const Error = global.Error;
throw new Error('RouteManager: Something has gone horribly wrong with rewrites');
}
function value_92832(a0) { // fn#92832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3218, offset: 0x0209abc9, size: 105 bytes, params: 2, frame: 15
var environment;
var value;
const env0_1 = a0;
if (this.unlistenHistory != null) {
value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
a0(value.getHistory().location, 'REPLACE');
}
this.listeners.add(a0);
return _fun92833;
}
function value_92834(a0) { // fn#92834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3401, offset: 0x0209ac4a, size: 167 bytes, params: 2, frame: 20
var environment;
var value;
var moduleValue;
var getHistory;
var location;
var moduleValue2;
var value2;
const env0_1 = a0;
if (this.unlistenHistory != null) {
value = environment.__proto__;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue.getHistory;
location = Reflect.apply(getHistory, moduleValue, []).location;
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue2.getHistory;
value2 = a0(location, Reflect.apply(getHistory, moduleValue2, []).action);
if (value2 != null) {
value = require(1230) /* metro dependency 1230: router_utils */;
value.replaceWith(value2.path, value2.state);
}
}
this.rewrites.add(a0);
return _fun92835;
}
function value_92838() { // fn#92838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3794, offset: 0x0209ad3d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(1230) /* metro dependency 1230: router_utils */).getHistory();
}
function handleConnectionChange() { // fn#92825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1273, owner: RouteManager.handleConnectionChange, offset: 0x0209a72f, size: 126 bytes, params: 1, frame: 14
var binding;
var executeRouteRewrites;
let value = environment.__proto__.__proto__;
const isConnected2 = GatewayConnectionStore.isConnected();
const r2 = isConnected2 && !env0_0.connected;
env0_0.connected = isConnected2;
if (r2) {
binding = env0_0;
binding.routeChangeCount = 0;
executeRouteRewrites = binding.executeRouteRewrites;
value = require(1230) /* metro dependency 1230: router_utils */;
Reflect.apply(executeRouteRewrites, binding, [value.getHistory().location, 'REPLACE']);
}
}
function handleRouteChange(a0, a1) { // fn#92826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1459, owner: RouteManager.handleRouteChange, offset: 0x0209a7ad, size: 298 bytes, params: 3, frame: 19
var r5;
var value;
var binding;
var executeRouteRewrites;
var moduleValue;
var convertRouteToNavigation;
var moduleValue2;
var getState;
var value2;
var basePath;
var pathname;
var resetPath;
var _createForOfIteratorHelperLoose_92820Binding;
var listeners;
var value3;
var value4;
var done;
var value5;
var error;
var value6;
reducibleJoin8: while (true) {
reducibleJoin6: while (true) {
if (a1 === 'POP') {
value = environment.__proto__.__proto__;
value2 = KeybindRouterStore.getState();
basePath = value2.basePath;
pathname = a0.pathname;
if (basePath === pathname) {
break reducibleJoin6;
}
resetPath = value2.resetPath;
pathname = a0.pathname;
Reflect.apply(resetPath, value2, [pathname]);
break reducibleJoin6;
}
value = environment;
binding = env0_0;
executeRouteRewrites = binding.executeRouteRewrites;
if (Reflect.apply(executeRouteRewrites, binding, [a0, a1])) {
return undefined;
}
value = environment.__proto__.__proto__;
moduleValue = require(12082) /* metro dependency 12082: convertRouteToNavigationNative */;
convertRouteToNavigation = moduleValue.convertRouteToNavigation;
if (!Reflect.apply(convertRouteToNavigation, moduleValue, [a0])) {
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue2.replaceWith(Routes.ME);
return undefined;
}
value = environment.__proto__.__proto__;
getState = KeybindRouterStore.getState;
value2 = Reflect.apply(getState, KeybindRouterStore, []);
basePath = value2.basePath;
pathname = a0.pathname;
if (basePath === pathname) {
break reducibleJoin6;
}
resetPath = value2.resetPath;
pathname = a0.pathname;
Reflect.apply(resetPath, value2, [pathname]);
break reducibleJoin6;
}
_createForOfIteratorHelperLoose_92820Binding = _createForOfIteratorHelperLoose_92820;
value = environment;
listeners = env0_0.listeners;
value3 = _createForOfIteratorHelperLoose_92820Binding(listeners);
value4 = value3();
done = value4.done;
if (done) {
env0_0.routeChangeCount = 0;
return undefined;
}
r5 = value4;
value5 = r5.value;
break reducibleJoin8;
}
exceptionMain8: while (true) {
reducibleLoop8: while (true) {
try {
value5(a0, a1);
} catch (error) {
while (true) {
value6 = value3();
done = value6.done;
if (done) {
continue;
}
r5 = value6;
value5 = r5.value;
break;
env0_0.routeChangeCount = 0;
return undefined;
continue exceptionMain8;
}
}
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop8;
}
r5 = value6;
value5 = r5.value;
continue reducibleLoop8;
}
env0_0.routeChangeCount = 0;
return undefined;
}
}
function handleKeybindRouteChange({path}) { // fn#92827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1837, owner: RouteManager.handleKeybindRouteChange, offset: 0x0209a8d7, size: 102 bytes, params: 2, frame: 14
var binding;
if (env0_0.timer !== -1) {
global.clearTimeout(env0_0.timer);
}
if (path != null) {
binding = env0_0;
binding.timer = global.setTimeout(binding.flushRoute, 200);
}
}
function flushRoute() { // fn#92828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1963, owner: RouteManager.flushRoute, offset: 0x0209a93d, size: 96 bytes, params: 1, frame: 13
const clearTimeout = global.clearTimeout;
clearTimeout(env0_0.timer);
let value = environment.__proto__.__proto__;
const state = KeybindRouterStore.getState();
if (state.path != null) {
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionTo(state.path);
}
}
function _fun92833() { // fn#92833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3331, offset: 0x0209ac32, size: 24 bytes, params: 1, frame: 11
return env0_0.removeRouteChangeListener(env0_1);
}
function _fun92835() { // fn#92835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3587, offset: 0x0209acf1, size: 24 bytes, params: 1, frame: 11
return env0_0.removeRouteRewriter(env0_1);
}
+56
View File
@@ -0,0 +1,56 @@
/* Metro module 3988; source: modules/routing/RouteParam.tsx; dependencies: [662, 1386, 484, 3989, 2] */
function _fun32785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:6, offset: 0x0101e2d9, size: 168 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(662) /* metro dependency 662: RouteConstants */).PSEUDO_GUILD_IDS;
const env0_4 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoutes;
object2 = {guildId: guildId, channelId: channelId};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteParam.tsx');
exports.RouteParam = object2;
}
function paramPattern(a0, a1) { // fn#32786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:153, offset: 0x0101e381, size: 151 bytes, params: 3, frame: 20
let value = a2;
let optional = (value !== undefined ? value : {}).optional;
optional = !(optional === undefined) && optional;
const UnescapedPathParam = (require(484) /* metro dependency 484: PathUtils */).UnescapedPathParam;
value = importDefault(3989) /* metro dependency 3989 */;
value = value(a0);
value = ':' + value + '(' + a1 + ')' + (optional ? '?' : '');
const value4 = Object.create(UnescapedPathParam.prototype, {constructor: {value: UnescapedPathParam}});
const unescapedPathParam = new UnescapedPathParam(value);
return unescapedPathParam instanceof Object ? unescapedPathParam : value4;
}
function guildId() { // fn#32787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:288, offset: 0x0101e418, size: 136 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'guildId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
value = PSEUDO_GUILD_IDS.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
function channelId() { // fn#32788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:401, offset: 0x0101e4a0, size: 149 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'channelId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
const items = [];
arraySpread(items, StaticChannelRoutes, 0, undefined);
value = items.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
+44
View File
@@ -0,0 +1,44 @@
/* Metro module 3987; source: modules/routing/RouteUtils.tsx; dependencies: [662, 1386, 2, 3988] */
function _fun32781(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:6, offset: 0x0101e19c, size: 197 bytes, params: 8, frame: 19
const closure = function(a0) {
return PSEUDO_GUILD_IDS.includes(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(662) /* metro dependency 662: RouteConstants */).PSEUDO_GUILD_IDS;
const env0_1 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
const env0_2 = RegExp('^\\d+$', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteUtils.tsx');
const RouteParam = (require(3988) /* metro dependency 3988: RouteParam */).RouteParam;
exports.RouteParam = RouteParam;
exports.isPseudoGuildId = closure;
exports.isValidGuildId = isValidGuildId;
exports.isValidChannelId = isValidChannelId;
}
function isValidGuildId(a0) { // fn#32783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:360, offset: 0x0101e261, size: 60 bytes, params: 2, frame: 13
var r0;
var isPseudoGuildId2;
const value = a0 != null;
if (value) {
isPseudoGuildId2 = isPseudoGuildId(a0);
r0 = isPseudoGuildId2 ? !!isPseudoGuildId2 : !!env0_2.test(a0);
} else {
r0 = value;
}
return r0;
}
function isValidChannelId(a0) { // fn#32784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:459, offset: 0x0101e29d, size: 60 bytes, params: 2, frame: 13
var r0;
var value2;
const value = a0 == null;
if (value) {
r0 = value;
} else {
value2 = env0_2.test(a0);
r0 = value2 ? !!value2 : !!isStaticChannelRoute(a0);
}
return r0;
}
@@ -0,0 +1,15 @@
/* Metro module 1242; source: modules/routing/RoutingSources.tsx; dependencies: [1243, 2] */
function _fun13933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1369:6, offset: 0x00df84c7, size: 209 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const OpenThreadAnalyticsLocations = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
const Set = global.Set;
const EMBED = OpenThreadAnalyticsLocations.EMBED;
const FORUM = OpenThreadAnalyticsLocations.FORUM;
const set = new Set([EMBED, FORUM]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RoutingSources.tsx');
exports.default = {INVITE_ACCEPT: 'invite_accept', CHANNEL_LIST_SUGGESTED_SECTION: 'channel_list_suggested_section',
USER_NAVIGATED_BACK: 'user_navigated_back', USER_NAVIGATED_FORWARD: 'user_navigated_forward'};
exports.ChannelBackNavigationSources = set;
}
@@ -0,0 +1,219 @@
/* Metro module 12082; source: modules/routing/convertRouteToNavigation.native.tsx; dependencies: [661, 4010, 4007, 4008, 3974, 3987, 2] */
function _fun92846(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12268:6, offset: 0x0209b0a0, 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 */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/convertRouteToNavigation.native.tsx');
exports.convertRouteToNavigation = convertRouteToNavigation;
}
function convertRouteToNavigation(a0) { // fn#92847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12268:225, offset: 0x0209b115, size: 1386 bytes, params: 2, frame: 32
var r5;
var startsWith;
var moduleValue2;
var matchPath;
var object2;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
var guildId;
var moduleValue3;
var value11;
var moduleValue4;
var GUILD_MEMBER_VERIFICATION;
var value13;
var navigateToMemberVerification;
var params;
var channelId2;
var messageId;
var navigationReplace;
var openChannel;
var moduleValue5;
var moduleValue6;
var moduleValue7;
var coerceGuildsRoute;
var rootNavigationRef;
var value18;
const pathname = a0.pathname;
var value;
const value2 = undefined;
const rootNavigationRef2 = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef2 != null) {
if (rootNavigationRef2.isReady()) {
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/channels/'])) {
moduleValue2 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue2.matchPath;
object2 = {};
object2.path = '' + Routes.CHANNEL(RouteParam.guildId(),
RouteParam.channelId({optional: true})) + Routes.VOICE_CHAT_CHANNEL_PARTIAL(RouteParam.guildId({name: 'voiceGuildId'}),
RouteParam.channelId({name: 'voiceChannelId'}), ':voiceMessageId?');
if (Reflect.apply(matchPath, moduleValue2, [pathname, object2]) != null) {
return true;
}
moduleValue3 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue3.matchPath;
object2 = {};
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}),
':messageId?');
value11 = Reflect.apply(matchPath, moduleValue3, [pathname, object2]);
if (value11 != null) {
params = value11.params;
channelId2 = params.channelId;
guildId = params.guildId;
messageId = params.messageId;
navigationReplace = a0.navigationReplace;
openChannel = a0.openChannel;
moduleValue5 = require(4010) /* metro dependency 4010: useChatLayout */;
if (moduleValue5.getChatLayout().isChatLockedOpen) {
if (channelId2 == null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else if (navigationReplace !== false) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else {
moduleValue7 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue7.coerceGuildsRoute;
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
value18 = Reflect.apply(coerceGuildsRoute, moduleValue7,
[rootNavigationRef == null ? value2 : rootNavigationRef.getCurrentRoute()]);
if ((value18 == null || value18.params == null ? value2 : value18.params.channelId) === channelId2) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: navigationReplace});
}
}
} else if (channelId2 != null) {
if (navigationReplace !== true) {
if (navigationReplace !== false) {
moduleValue6 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
moduleValue6.navigateToRootTab({screen: 'guilds', guildId: guildId,
channelId: channelId2,
resetRoot: navigationReplace});
}
if (channelId2 != null && navigationReplace !== true) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: value2});
}
} else if (openChannel) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: navigationReplace, openChannel: true});
} else {
if (navigationReplace !== false) {
moduleValue6 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
moduleValue6.navigateToRootTab({screen: 'guilds', guildId: guildId,
channelId: channelId2,
resetRoot: navigationReplace});
}
if (channelId2 != null && navigationReplace !== true) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: value2});
}
}
} else {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
}
return true;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/member-verification/'])) {
moduleValue4 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue4.matchPath;
GUILD_MEMBER_VERIFICATION = Routes.GUILD_MEMBER_VERIFICATION;
guildId = RouteParam.guildId;
value13 = Reflect.apply(matchPath, moduleValue4, [pathname,
{path: Reflect.apply(GUILD_MEMBER_VERIFICATION,
Routes,
[Reflect.apply(guildId, RouteParam, [])])}]);
if (value13 != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
navigateToMemberVerification = value.navigateToMemberVerification;
params = value13.params;
guildId = params.guildId;
params = value13.params;
Reflect.apply(navigateToMemberVerification, value, [guildId, params.inviteCode]);
}
return true;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, [Routes.LOGIN])) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else if (pathname.startsWith(Routes.REGISTER)) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else {
value = pathname.startsWith(Routes.ACCOUNT_STANDING);
if (value) {
rootNavigationRef2.navigate({name: 'account-standing', params: value2});
r5 = true;
} else {
r5 = !!value;
}
}
return r5;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/member-verification/'])) {
moduleValue4 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue4.matchPath;
GUILD_MEMBER_VERIFICATION = Routes.GUILD_MEMBER_VERIFICATION;
guildId = RouteParam.guildId;
value13 = Reflect.apply(matchPath, moduleValue4, [pathname,
{path: Reflect.apply(GUILD_MEMBER_VERIFICATION,
Routes,
[Reflect.apply(guildId, RouteParam, [])])}]);
if (value13 != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
navigateToMemberVerification = value.navigateToMemberVerification;
params = value13.params;
guildId = params.guildId;
params = value13.params;
Reflect.apply(navigateToMemberVerification, value, [guildId, params.inviteCode]);
}
return true;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, [Routes.LOGIN])) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else if (pathname.startsWith(Routes.REGISTER)) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else {
value = pathname.startsWith(Routes.ACCOUNT_STANDING);
if (value) {
rootNavigationRef2.navigate({name: 'account-standing', params: value2});
r5 = true;
} else {
r5 = !!value;
}
}
return r5;
}
}
return true;
}
@@ -0,0 +1,96 @@
/* Metro module 6828; source: modules/routing/getChannelIdForGuildTransition.tsx; dependencies: [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829, 2] */
function _fun53666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:6, offset: 0x01352bb6, size: 220 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildOnboardingStore = importDefault(6599) /* metro dependency 6599: GuildOnboardingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const privateChannelSortStore = importDefault(5219) /* metro dependency 5219: PrivateChannelSortStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_8 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/getChannelIdForGuildTransition.tsx');
exports.getChannelIdForGuildTransition = getChannelIdForGuildTransition;
}
function getChannelIdForGuildTransition(a0) { // fn#53667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:305, offset: 0x01352c92, size: 281 bytes, params: 2, frame: 19
var r4;
var r2;
var privateChannelIds;
var moduleValue;
var moduleValue2;
var channel;
const channelId = SelectedChannelStore.getChannelId(a0);
const defaultChannel = GuildChannelStore.getDefaultChannel(a0);
const value4 = undefined;
const id = defaultChannel == null ? value4 : defaultChannel.id;
if (id != null) {
r2 = id;
} else {
if (a0 !== ME) {
r4 = value4;
} else {
privateChannelIds = PrivateChannelSortStore.getPrivateChannelIds();
r4 = privateChannelIds.length > 0 ? privateChannelIds[0] : value4;
}
r2 = r4;
}
const GUILD_ONBOARDING = StaticChannelRoute.GUILD_ONBOARDING;
if (channelId !== GUILD_ONBOARDING) {
if (channelId !== StaticChannelRoute.GUILD_HOME) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
if (moduleValue.canSeeOnboardingHome(a0)) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
} else if (GuildOnboardingStore.shouldShowOnboarding(a0)) {
if (channelId !== StaticChannelRoute.GUILD_HOME) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
if (moduleValue.canSeeOnboardingHome(a0)) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
return r2;
}
return r2;
}
@@ -0,0 +1,8 @@
/* Metro module 3974; source: modules/routing/matchPathCompat.tsx; dependencies: [2, 3975] */
function _fun32602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4123:6, offset: 0x0101a136, size: 96 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/matchPathCompat.tsx');
exports.matchPath = (require(3975) /* metro dependency 3975 */).matchPath;
}
@@ -0,0 +1,92 @@
/* Metro module 12995; source: modules/routing/native/BackPressManager.tsx; dependencies: [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561, 2] */
function _fun99115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:6, offset: 0x021bb844, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(27) /* metro dependency 27 */).BackHandler;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun99120(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/native/BackPressManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_99116() { // fn#99116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:170, offset: 0x021bb947, 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_99116_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleBackPress() { // fn#99119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:363, offset: 0x021bb9a9, size: 156 bytes, params: 1, frame: 16
var r0;
var value;
(require(8812) /* metro dependency 8812: ContextMenuStateNative */).hideContextMenu();
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
const value3 = keyboardType !== SYSTEM;
if (value3) {
value = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
value.setKeyboardType({type: KeyboardTypes.SYSTEM});
value = true;
r0 = value;
} else {
r0 = value3;
}
return !!r0;
}
function _fun99120(a0) { // fn#99120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:605, offset: 0x021bba45, size: 124 bytes, params: 2, frame: 16
const closure = BackPressManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_99122}, {key: '_initializeGlobalBackPressListener',
value: value_99123}, {key: '_terminate', value: function() {
var _backPressEventSubscription = this._backPressEventSubscription;
if (_backPressEventSubscription != null) {
_backPressEventSubscription.remove();
}
}}]);
}
function value_99122() { // fn#99122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:916, offset: 0x021bbac1, size: 55 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
this._initializeGlobalBackPressListener();
}
}
function value_99123() { // fn#99123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:1041, offset: 0x021bbaf8, size: 42 bytes, params: 1, frame: 13
const value = environment.__proto__;
this._backPressEventSubscription = BackHandler.addEventListener('hardwareBackPress', handleBackPress);
}
@@ -0,0 +1,551 @@
/* Metro module 12073; source: modules/routing/native/RouteManagerUtils.tsx; dependencies: [29, 7715, 1383, 1379, 3973, 1935, 1934, 661, 7716, 3, 3987, 12074, 4796, 1230, 12079, 5080, 7709, 6593, 7713, 4007, 694, 7712, 4044, 12080, 2] */
function _fun92759(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:6, offset: 0x0209825c, size: 750 bytes, params: 8, frame: 30
const env0_0 = require;
const closure = extractParamsFromVoiceModalRoute;
const closure2 = voiceRouteRewriter;
const closure3 = saveLastRouteListener;
const closure4 = saveLastNonVoiceRouteListener;
const closure5 = updateSelectedChannelListener;
const closure6 = extractParams;
const env0_3 = ['channelId', 'guildId'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = (require(7715) /* metro dependency 7715: ChannelCallStore */).setVoiceChatDrawerState;
const env0_6 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const defaultRouteStore = importDefault(3973) /* metro dependency 3973: DefaultRouteStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.ME;
const Routes = value.Routes;
const env0_13 = value.ChannelTypes;
const env0_14 = (require(7716) /* metro dependency 7716: ChannelCallConstants */).VoiceChatDrawerState;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('RouteUtils');
const CHANNEL = Routes.CHANNEL;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
value = RouteParam.guildId();
value = Reflect.apply(CHANNEL, Routes, [value, RouteParam.channelId({optional: true}), ':messageId?']);
const VOICE_CHAT_CHANNEL_PARTIAL = Routes.VOICE_CHAT_CHANNEL_PARTIAL;
object = ['' + value + Reflect.apply(VOICE_CHAT_CHANNEL_PARTIAL, Routes,
[RouteParam.guildId({name: 'voiceGuildId'}), RouteParam.channelId({name: 'voiceChannelId'}),
':voiceMessageId?']), value];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/native/RouteManagerUtils.tsx');
exports.MAIN_DRAWER_ROUTES = value;
exports.extractParamsFromVoiceModalRoute = closure;
exports.popVoiceRoute = popVoiceRoute;
exports.transitionToVoiceRoute = transitionToVoiceRoute;
exports.voiceRouteRewriter = closure2;
exports.saveLastRouteListener = closure3;
exports.saveLastNonVoiceRouteListener = closure4;
exports.updateSelectedChannelListener = closure5;
exports.extractParams = closure6;
exports.initializeRouteManagerIfNeeded = initializeRouteManagerIfNeeded;
exports.cleanupRouteManager = cleanupRouteManager;
}
function matchPathToRoutes(a0, a1) { // fn#92760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:631, offset: 0x0209854a, size: 61 bytes, params: 3, frame: 13
return (require(12074) /* metro dependency 12074 */).matchPath(a0, {'path': null, 'strict': false, 'exact': false,
path: a1});
}
function extractParamsFromVoiceModalRoute(a0) { // fn#92761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:720, offset: 0x02098587, size: 127 bytes, params: 2, frame: 18
const matchPathToRoutesBinding = matchPathToRoutes;
const pathname = a0.pathname;
const value2 = undefined;
const value3 = matchPathToRoutesBinding(pathname, env0_17);
const {voiceChannelId, voiceGuildId, voiceMessageId} = (value3 == null ? value2 : value3.params) ?? ({});
const object2 = {};
copyDataProperties(object2, extractParams({match: value3, location: a0}), value3);
object2['voiceChannelId'] = voiceChannelId;
object2['voiceGuildId'] = voiceGuildId;
object2['voiceMessageId'] = voiceMessageId;
return object2;
}
function selectLastVisitedTextChannel(a0) { // fn#92762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:997, offset: 0x02098606, size: 144 bytes, params: 2, frame: 16
var r0;
var mostRecentSelectedTextChannelId;
var defaultChannel;
const getChannel = ChannelStore.getChannel;
const getLastSelectedChannelId = SelectedChannelStore.getLastSelectedChannelId;
const value2 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getLastSelectedChannelId,
SelectedChannelStore, [])]);
const value3 = undefined;
if ((value2 == null ? value3 : value2.type) == null) {
mostRecentSelectedTextChannelId = SelectedChannelStore.getMostRecentSelectedTextChannelId(a0);
if (mostRecentSelectedTextChannelId != null) {
r0 = mostRecentSelectedTextChannelId;
} else {
defaultChannel = GuildChannelStore.getDefaultChannel(a0);
r0 = defaultChannel == null ? value3 : defaultChannel.id;
}
} else if (isGuildSelectableChannelType(value2 == null ? value3 : value2.type)) {
r0 = value2.id;
} else {
mostRecentSelectedTextChannelId = SelectedChannelStore.getMostRecentSelectedTextChannelId(a0);
if (mostRecentSelectedTextChannelId != null) {
r0 = mostRecentSelectedTextChannelId;
} else {
defaultChannel = GuildChannelStore.getDefaultChannel(a0);
r0 = defaultChannel == null ? value3 : defaultChannel.id;
}
}
return r0;
}
function voiceRouteRewriter(a0) { // fn#92763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:1256, offset: 0x02098696, size: 424 bytes, params: 2, frame: 22
var r0;
var value9;
const state = a0.state;
const extractParamsBinding = extractParams;
let object2 = {};
const matchPathToRoutesBinding = matchPathToRoutes;
const pathname = a0.pathname;
const value2 = undefined;
object2.match = matchPathToRoutesBinding(pathname, env0_17);
object2.location = a0;
const value3 = extractParamsBinding(object2);
const channelId = value3.channelId;
const guildId = value3.guildId;
let binding = env0_4;
const value4 = binding(value3, env0_3);
const channel = ChannelStore.getChannel(channelId);
const value6 = null;
if (value6 == channelId) {
r0 = value6;
} else if (value6 == guildId) {
r0 = value6;
} else if ((value6 == channel ? value2 : channel.type) === ChannelTypes.GUILD_VOICE) {
object2 = {};
copyDataProperties(object2, value4, undefined);
object2['channelId'] = channelId;
object2['guildId'] = guildId;
r0 = object2;
} else if ((value6 == channel ? value2 : channel.type) !== ChannelTypes.GUILD_STAGE_VOICE) {
r0 = value6;
} else {
object2 = {};
copyDataProperties(object2, value4, undefined);
object2['channelId'] = channelId;
object2['guildId'] = guildId;
r0 = object2;
}
if (value6 != r0) {
if (value6 != env0_15) {
binding = env0_15;
binding.log('voiceRouteRewriter: has voiceChannelParams = ' + global.JSON.stringify(r0));
}
value9 = '' + DefaultRouteStore.lastNonVoiceRoute + Routes.VOICE_CHAT_CHANNEL_PARTIAL(r0.guildId, r0.channelId,
r0.messageId);
if (value9 === a0.pathname) {
r0 = value6;
} else {
if (value6 != env0_15) {
binding = env0_15;
binding.log('voiceRouteRewriter: rewriting route: ' + a0.pathname + ' -> ' + value9);
}
r0 = {path: value9, state: state};
}
return r0;
}
return value6;
}
function saveLastRouteListener({pathname}) { // fn#92764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:1952, offset: 0x0209883e, size: 47 bytes, params: 2, frame: 12
(require(12079) /* metro dependency 12079: DefaultRouteActionCreators */).saveLastRoute(pathname);
}
function saveLastNonVoiceRouteListener(a0) { // fn#92765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:2021, offset: 0x0209886d, size: 207 bytes, params: 2, frame: 18
var moduleValue;
const matchPathToRoutesBinding = matchPathToRoutes;
const pathname = a0.pathname;
const value2 = undefined;
const value3 = matchPathToRoutesBinding(pathname, env0_17);
const value4 = null;
const channel = ChannelStore.getChannel(value4 == value3 ? value2 : value3.params.channelId);
const type = value4 == channel ? value2 : channel.type;
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
const r1 = type === GUILD_VOICE || (value4 == channel ? value2 : channel.type) === ChannelTypes.GUILD_STAGE_VOICE ? value4 : extractParams({match: value3,
location: a0});
if (value4 != r1) {
moduleValue = require(12079) /* metro dependency 12079: DefaultRouteActionCreators */;
moduleValue.saveLastNonVoiceRoute(Routes.CHANNEL(r1.guildId, r1.channelId));
}
return value2;
}
function updateSelectedChannelListener(a0) { // fn#92766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:2405, offset: 0x0209893c, size: 1194 bytes, params: 2, frame: 39
var id;
var r8;
var channel;
var binding;
var log;
var JSON;
var verbose;
var value6;
var moduleValue;
var defaultImport2;
var moduleValue2;
var isModalOpen;
var moduleValue3;
var defaultImport3;
var popAboveKey;
var moduleValue4;
var value12;
var channel2;
var defaultImport5;
var popWithKey;
var moduleValue5;
var value;
const extractParamsFromVoiceModalRouteBinding = extractParamsFromVoiceModalRoute;
const value2 = undefined;
let r1 = extractParamsFromVoiceModalRouteBinding(a0) ?? ({});
const guildId = r1.guildId;
const channelId = r1.channelId;
const messageId = r1.messageId;
const jumpType = r1.jumpType;
const voiceChannelId = r1.voiceChannelId;
const voiceGuildId = r1.voiceGuildId;
const voiceMessageId = r1.voiceMessageId;
if (voiceChannelId != null) {
channel = ChannelStore.getChannel(voiceChannelId);
if ((channel == null ? value2 : channel.type) === ChannelTypes.GUILD_VOICE) {
if (env0_15 != null) {
binding = env0_15;
verbose = binding.verbose;
JSON = global.JSON;
value6 = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(verbose, binding,
['UpdateSelectedChannelListener -> voice route present! ' + value6 + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
moduleValue = require(7713) /* metro dependency 7713: VoicePanelUtilsNative */;
if (!moduleValue.isVoicePanelEnabled(channel)) {
(importDefault(6593) /* metro dependency 6593: GuildActionCreators */).selectGuild(voiceGuildId);
defaultImport2 = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport2.selectChannel({guildId: voiceGuildId, channelId: voiceChannelId,
messageId: voiceMessageId,
jumpType: jumpType});
}
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue2.isModalOpen;
moduleValue3 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
if (!Reflect.apply(isModalOpen, moduleValue2, [moduleValue3.getVoiceChannelKey(channel.id)])) {
defaultImport3 = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
popAboveKey = defaultImport3.popAboveKey;
moduleValue4 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(popAboveKey, defaultImport3, [moduleValue4.getVoiceChannelKey(channel.id)]);
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92767);
}
r8 = channel.isGuildVoice() && voiceMessageId != null;
r8 = !r8 ? channel.isGuildStageVoice() : r8;
if (r8) {
setVoiceChatDrawerState(channel.id, VoiceChatDrawerState.OPEN);
r1 = voiceGuildId != null && voiceChannelId != null;
r1 = r1 && voiceMessageId != null;
if (r1) {
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).jumpToVoiceChannelMessage(voiceGuildId,
voiceChannelId, voiceMessageId, jumpType);
}
}
} else if ((channel == null ? value2 : channel.type) === ChannelTypes.GUILD_STAGE_VOICE) {
if (env0_15 != null) {
binding = env0_15;
verbose = binding.verbose;
JSON = global.JSON;
value6 = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(verbose, binding,
['UpdateSelectedChannelListener -> voice route present! ' + value6 + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
moduleValue = require(7713) /* metro dependency 7713: VoicePanelUtilsNative */;
if (!moduleValue.isVoicePanelEnabled(channel)) {
(importDefault(6593) /* metro dependency 6593: GuildActionCreators */).selectGuild(voiceGuildId);
defaultImport2 = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport2.selectChannel({guildId: voiceGuildId, channelId: voiceChannelId,
messageId: voiceMessageId,
jumpType: jumpType});
}
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue2.isModalOpen;
moduleValue3 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
if (!Reflect.apply(isModalOpen, moduleValue2, [moduleValue3.getVoiceChannelKey(channel.id)])) {
defaultImport3 = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
popAboveKey = defaultImport3.popAboveKey;
moduleValue4 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(popAboveKey, defaultImport3, [moduleValue4.getVoiceChannelKey(channel.id)]);
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92767);
}
r8 = channel.isGuildVoice() && voiceMessageId != null;
r8 = !r8 ? channel.isGuildStageVoice() : r8;
if (r8) {
setVoiceChatDrawerState(channel.id, VoiceChatDrawerState.OPEN);
r1 = voiceGuildId != null && voiceChannelId != null;
r1 = r1 && voiceMessageId != null;
if (r1) {
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).jumpToVoiceChannelMessage(voiceGuildId,
voiceChannelId, voiceMessageId, jumpType);
}
}
} else if (env0_15 != null) {
binding = env0_15;
log = binding.log;
id = channel == null ? value2 : channel.id;
JSON = global.JSON;
value = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(log, binding,
['UpdateSelectedChannelListener -> !!!VERY BAD!!! channel.id ' + id + ' (voiceChannelId ' + voiceChannelId + ') is not a voice channel! and yet RouteUtils thinks it is! ' + value + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
} else {
if (voiceGuildId == null) {
if (env0_15 != null) {
binding = env0_15;
verbose = binding.verbose;
JSON = global.JSON;
value12 = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(verbose, binding,
['UpdateSelectedChannelListener -> no voice route present in ' + value12 + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
channel2 = ChannelStore.getChannel(SelectedChannelStore.getLastSelectedChannelId());
r8 = channel2 != null && channel2.isGuildVoice();
r8 = !r8 ? channel2 != null && channel2.isGuildStageVoice() : r8;
if (r8) {
defaultImport5 = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
popWithKey = defaultImport5.popWithKey;
moduleValue5 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(popWithKey, defaultImport5, [moduleValue5.getVoiceChannelKey(channel2.id)]);
}
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.selectGuild(guildId);
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
value.selectChannel({guildId: guildId, channelId: channelId, messageId: messageId, jumpType: jumpType,
skipMessageFetch: r1.skipMessageFetch});
return value2;
}
channel = ChannelStore.getChannel(voiceChannelId);
if ((channel == null ? value2 : channel.type) === ChannelTypes.GUILD_VOICE) {
if (env0_15 != null) {
binding = env0_15;
verbose = binding.verbose;
JSON = global.JSON;
value6 = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(verbose, binding,
['UpdateSelectedChannelListener -> voice route present! ' + value6 + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
moduleValue = require(7713) /* metro dependency 7713: VoicePanelUtilsNative */;
if (!moduleValue.isVoicePanelEnabled(channel)) {
(importDefault(6593) /* metro dependency 6593: GuildActionCreators */).selectGuild(voiceGuildId);
defaultImport2 = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport2.selectChannel({guildId: voiceGuildId, channelId: voiceChannelId,
messageId: voiceMessageId,
jumpType: jumpType});
}
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue2.isModalOpen;
moduleValue3 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
if (!Reflect.apply(isModalOpen, moduleValue2, [moduleValue3.getVoiceChannelKey(channel.id)])) {
defaultImport3 = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
popAboveKey = defaultImport3.popAboveKey;
moduleValue4 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(popAboveKey, defaultImport3, [moduleValue4.getVoiceChannelKey(channel.id)]);
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92767);
}
r8 = channel.isGuildVoice() && voiceMessageId != null;
r8 = !r8 ? channel.isGuildStageVoice() : r8;
if (r8) {
setVoiceChatDrawerState(channel.id, VoiceChatDrawerState.OPEN);
r1 = voiceGuildId != null && voiceChannelId != null;
r1 = r1 && voiceMessageId != null;
if (r1) {
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).jumpToVoiceChannelMessage(voiceGuildId,
voiceChannelId, voiceMessageId, jumpType);
}
}
} else if ((channel == null ? value2 : channel.type) === ChannelTypes.GUILD_STAGE_VOICE) {
if (env0_15 != null) {
binding = env0_15;
verbose = binding.verbose;
JSON = global.JSON;
value6 = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(verbose, binding,
['UpdateSelectedChannelListener -> voice route present! ' + value6 + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
moduleValue = require(7713) /* metro dependency 7713: VoicePanelUtilsNative */;
if (!moduleValue.isVoicePanelEnabled(channel)) {
(importDefault(6593) /* metro dependency 6593: GuildActionCreators */).selectGuild(voiceGuildId);
defaultImport2 = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport2.selectChannel({guildId: voiceGuildId, channelId: voiceChannelId,
messageId: voiceMessageId,
jumpType: jumpType});
}
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue2.isModalOpen;
moduleValue3 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
if (!Reflect.apply(isModalOpen, moduleValue2, [moduleValue3.getVoiceChannelKey(channel.id)])) {
defaultImport3 = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
popAboveKey = defaultImport3.popAboveKey;
moduleValue4 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(popAboveKey, defaultImport3, [moduleValue4.getVoiceChannelKey(channel.id)]);
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92767);
}
r8 = channel.isGuildVoice() && voiceMessageId != null;
r8 = !r8 ? channel.isGuildStageVoice() : r8;
if (r8) {
setVoiceChatDrawerState(channel.id, VoiceChatDrawerState.OPEN);
r1 = voiceGuildId != null && voiceChannelId != null;
r1 = r1 && voiceMessageId != null;
if (r1) {
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).jumpToVoiceChannelMessage(voiceGuildId,
voiceChannelId, voiceMessageId, jumpType);
}
}
} else if (env0_15 != null) {
binding = env0_15;
log = binding.log;
id = channel == null ? value2 : channel.id;
JSON = global.JSON;
value = JSON.stringify(a0);
JSON = global.JSON;
Reflect.apply(log, binding,
['UpdateSelectedChannelListener -> !!!VERY BAD!!! channel.id ' + id + ' (voiceChannelId ' + voiceChannelId + ') is not a voice channel! and yet RouteUtils thinks it is! ' + value + ' ' + JSON.stringify({guildId: guildId,
channelId: channelId, messageId: messageId, jumpType: jumpType, voiceChannelId: voiceChannelId,
voiceGuildId: voiceGuildId, voiceMessageId: voiceMessageId}) + ' ']);
}
}
return value2;
}
function extractParams({match, location}) { // fn#92768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:4248, offset: 0x02098e13, size: 332 bytes, params: 2, frame: 20
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
let value = null;
if (value == match) {
value = environment;
return {'guildId': null, 'channelId': null, 'messageId': null, 'jumpType': null, 'skipMessageFetch': false,
guildId: ME, jumpType: JumpTypes.ANIMATED};
}
const {guildId, channelId, messageId} = match.params;
const jumpType = location.jumpType;
const INSTANT = JumpTypes.INSTANT;
const r2 = jumpType === INSTANT ? JumpTypes.INSTANT : JumpTypes.ANIMATED;
const object2 = {};
const routeUtilsModule = require(3987) /* metro dependency 3987: RouteUtils */;
object2.guildId = routeUtilsModule.isValidGuildId(guildId) ? guildId : ME;
const moduleValue2 = routeUtilsModule;
object2.channelId = moduleValue2.isValidChannelId(channelId) ? channelId : value;
object2.messageId = messageId;
object2.jumpType = r2;
object2.skipMessageFetch = !!location.skipMessageFetch;
return object2;
}
function logRouteChange({pathname}) { // fn#92769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:4715, offset: 0x02098f5f, size: 55 bytes, params: 2, frame: 13
env0_15.log('Navigated to: ' + pathname);
}
function popVoiceRoute(a0) { // fn#92770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:4965, offset: 0x02098f96, size: 136 bytes, params: 2, frame: 17
const lastNonVoiceRoute = DefaultRouteStore.lastNonVoiceRoute;
env0_15.log('popVoiceRoute: last non-voice route is ' + lastNonVoiceRoute);
const defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
const selectChannel = defaultImport.selectChannel;
const object2 = {guildId: a0};
object2.channelId = selectLastVisitedTextChannel(a0);
Reflect.apply(selectChannel, defaultImport, [object2]);
(require(1230) /* metro dependency 1230: router_utils */).transitionTo(lastNonVoiceRoute);
}
function transitionToVoiceRoute(a0, a1) { // fn#92771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:5199, offset: 0x0209901e, size: 226 bytes, params: 3, frame: 28
const defaultRoute = DefaultRouteStore.defaultRoute;
const matchPathToRoutesBinding = matchPathToRoutes;
const value2 = undefined;
const value3 = matchPathToRoutesBinding(defaultRoute, env0_17);
const voiceChannelId = ((value3 == null ? value2 : value3.params) ?? ({})).voiceChannelId;
env0_15.log('transitionToVoiceRoute(<' + a0 + '>, <' + a1 + '>), current route ' + defaultRoute + ' has voiceChannelId ' + voiceChannelId);
if (voiceChannelId !== a1) {
(require(1230) /* metro dependency 1230: router_utils */).transitionToGuild(a0, a1);
} else {
env0_15.log('transitionToVoiceRoute -> ' + voiceChannelId + ' === ' + a1 + '. staying where we are');
}
return value2;
}
function initializeRouteManagerIfNeeded() { // fn#92772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:5819, offset: 0x02099100, size: 177 bytes, params: 1, frame: 16
var defaultImport;
if (!env0_16) {
defaultImport = importDefault(12080) /* metro dependency 12080: RouteManager */;
defaultImport.addRouteRewriter(voiceRouteRewriter);
(importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(saveLastRouteListener);
(importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(saveLastNonVoiceRouteListener);
(importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(updateSelectedChannelListener);
(importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(logRouteChange);
(importDefault(12080) /* metro dependency 12080: RouteManager */).initialize();
}
}
function cleanupRouteManager() { // fn#92773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:6191, offset: 0x020991b1, size: 175 bytes, params: 1, frame: 16
var defaultImport;
if (env0_16) {
defaultImport = importDefault(12080) /* metro dependency 12080: RouteManager */;
defaultImport.removeRouteRewriter(voiceRouteRewriter);
(importDefault(12080) /* metro dependency 12080: RouteManager */).removeRouteChangeListener(saveLastRouteListener);
(importDefault(12080) /* metro dependency 12080: RouteManager */).removeRouteChangeListener(saveLastNonVoiceRouteListener);
(importDefault(12080) /* metro dependency 12080: RouteManager */).removeRouteChangeListener(updateSelectedChannelListener);
(importDefault(12080) /* metro dependency 12080: RouteManager */).removeRouteChangeListener(logRouteChange);
(importDefault(12080) /* metro dependency 12080: RouteManager */).cleanup();
}
}
function _fun92767() { // fn#92767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12259:3750, offset: 0x02098de6, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openGuildVoiceModal(env0_0);
}
@@ -0,0 +1,39 @@
/* Metro module 4571; source: modules/routing/native/useBackPressHandler.tsx; dependencies: [31, 27, 477, 2] */
function _fun38813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:6, offset: 0x010cb2b8, size: 162 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.BackHandler;
const env0_4 = value.NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/native/useBackPressHandler.tsx');
exports.default = useBackPressHandler;
exports.BackPressHandler = {minimize: function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
}};
}
function useBackPressHandler(a0) { // fn#38815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:294, offset: 0x010cb375, size: 91 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
const r5 = !(value !== undefined) || value;
let env0_2 = undefined;
const binding = env0_2;
env0_2 = binding.useRef(a0);
binding.useLayoutEffect(_fun38816);
binding.useEffect(_fun38817, [r5]);
}
function _fun38817() { // fn#38817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:401, offset: 0x010cb3e5, size: 90 bytes, params: 1, frame: 15
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isIOS()) {
if (env0_1) {
var env0_0 = BackHandler.addEventListener('hardwareBackPress', _fun38818);
return _fun38819;
}
}
}
+159
View File
@@ -0,0 +1,159 @@
/* Metro module 1230; source: modules/routing/router_utils.tsx; dependencies: [661, 3, 1231, 1239, 1242, 2] */
function _fun13788(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:6, offset: 0x00df4e9a, size: 403 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
var ComponentDispatch = require(dependencyMap[3]).ComponentDispatch;
return !ComponentDispatch.hasSubscribers(ComponentActions.MODAL_CLOSE);
};
const closure2 = transitionTo;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(661) /* metro dependency 661: Constants */;
const env0_5 = value.Routes;
const env0_6 = value.PageAnalyticsLocations;
const env0_7 = value.ComponentActions;
const RelativeMarketingURLs = value.RelativeMarketingURLs;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('Routing/Utils');
const DEVELOPER_PORTAL = RelativeMarketingURLs.DEVELOPER_PORTAL;
object = [DEVELOPER_PORTAL];
value = require(1231) /* metro dependency 1231 */;
value = value.createMemoryHistory();
const env0_10 = value.listen(_fun13793);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/router_utils.tsx');
exports.shouldNavigate = closure;
exports.transitionTo = closure2;
exports.transitionToGuild = transitionToGuild;
exports.currentRouteHasBackNavigation = currentRouteHasBackNavigation;
exports.replaceWith = replaceWith;
exports.getHistory = getHistory;
exports.getLastRouteChangeSource = getLastRouteChangeSource;
exports.getLastRouteChangeSourceLocationStack = getLastRouteChangeSourceLocationStack;
exports.isValidFingerprintRoute = isValidFingerprintRoute;
exports.getFingerprintLocation = getFingerprintLocation;
exports.hasNavigated = function() {
return false;
};
exports.back = back_13803;
exports.forward = forward;
}
function maybeExternallyNavigate(a0, a1) { // fn#13790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:419, offset: 0x00df5066, size: 179 bytes, params: 3, frame: 19
var r0;
var window;
var dispatchEvent;
var event;
const env0_0 = a0;
const r2 = typeof a0 !== 'string' || !env0_9.some(_fun13791);
if (r2) {
r0 = !r2;
} else {
env0_8.log('' + a1 + ' - route to external path ' + a0);
window = global.window;
dispatchEvent = window.dispatchEvent;
event = new global.Event('beforeunload');
Reflect.apply(dispatchEvent, window, [event]);
window = global.window;
window.location[a1](a0);
event = true;
r0 = event;
}
return r0;
}
function transitionTo(a0, a1) { // fn#13792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:636, offset: 0x00df5130, size: 258 bytes, params: 3, frame: 20
var source;
var sourceLocationStack;
var binding;
var URL;
var value3;
var uRL;
var push;
var object2;
var search;
const maybeExternallyNavigateBinding = maybeExternallyNavigate;
const value2 = undefined;
if (!maybeExternallyNavigateBinding(a0, 'assign')) {
binding = env0_8;
binding.log('transitionTo - Transitioning to ' + a0);
source = a1 == null ? value2 : a1.source;
sourceLocationStack = a1 == null ? value2 : a1.sourceLocationStack;
if (a1 == null) {
env0_2.push(a0);
} else {
URL = global.URL;
value3 = 'https:' + global.window.GLOBAL_ENV.WEBAPP_ENDPOINT;
uRL = new URL(a0);
binding = env0_2;
push = binding.push;
object2 = {};
object2.pathname = uRL.pathname;
search = uRL.search;
object2.search = search;
object2.hash = uRL.hash;
copyDataProperties(object2, a1, search);
Reflect.apply(push, binding, [object2]);
}
}
return value2;
}
function _fun13793(a0, a1) { // fn#13793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:300, offset: 0x00df5232, size: 30 bytes, params: 3, frame: 9
if (a1 !== 'REPLACE') {
env0_10();
}
}
function transitionToGuild(a0, a1, a2, a3) { // fn#13794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1125, offset: 0x00df5250, size: 116 bytes, params: 5, frame: 21
const binding = env0_8;
const log = binding.log;
const JSON = global.JSON;
Reflect.apply(log, binding, ['transitionToGuild - Transitioning to ' + JSON.stringify({guildId: a0, channelId: a1,
messageId: a2})]);
transitionTo(Routes.CHANNEL(a0, a1, a2), a3);
}
function currentRouteHasBackNavigation() { // fn#13795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1328, offset: 0x00df52c4, size: 60 bytes, params: 1, frame: 13
return env0_3 != null && (require(1242) /* metro dependency 1242: RoutingSources */).ChannelBackNavigationSources.has(env0_3);
}
function replaceWith(a0, a1, a2) { // fn#13796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1444, offset: 0x00df5300, size: 118 bytes, params: 4, frame: 16
if (!maybeExternallyNavigate(a0, 'replace')) {
env0_8.log('Replacing route with ' + a0);
if (typeof a0 === 'string') {
env0_2.replace(a0, a1);
} else {
env0_2.replace(a0);
}
env0_3 = a2;
}
}
function isValidFingerprintRoute(a0) { // fn#13800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1842, offset: 0x00df5376, size: 35 bytes, params: 2, frame: 2
if (a0 == null) {
env0_2.location.pathname != null;
}
return true;
}
function getFingerprintLocation(a0) { // fn#13801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1968, offset: 0x00df5399, size: 595 bytes, params: 2, frame: 14
var r0;
const startsWith = (a0 ?? (env0_2.location.pathname ?? '')).startsWith;
const LOGIN = Routes.LOGIN;
r0 = Reflect.apply(startsWith, r0,
[LOGIN]) ? PageAnalyticsLocations.LOGIN : r0.startsWith(Routes.REGISTER) ? PageAnalyticsLocations.REGISTER : r0.startsWith(Routes.INVITE('')) ? PageAnalyticsLocations.INVITE : r0.startsWith(Routes.VERIFY) ? PageAnalyticsLocations.VERIFY : r0.startsWith(Routes.DISABLE_EMAIL_NOTIFICATIONS) ? PageAnalyticsLocations.DISABLE_EMAIL_NOTIFICATIONS : r0.startsWith(Routes.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS) ? PageAnalyticsLocations.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS : r0.startsWith(Routes.REJECT_IP) ? PageAnalyticsLocations.REJECT_IP : r0.startsWith(Routes.REJECT_MFA) ? PageAnalyticsLocations.REJECT_MFA : r0.startsWith(Routes.AUTHORIZE_IP) ? PageAnalyticsLocations.AUTHORIZE_IP : r0.startsWith(Routes.AUTHORIZE_PAYMENT) ? PageAnalyticsLocations.AUTHORIZE_PAYMENT : r0.startsWith(Routes.RESET) ? PageAnalyticsLocations.RESET : r0.startsWith(Routes.REPORT) ? PageAnalyticsLocations.REPORT : r0.startsWith(Routes.REPORT_SECOND_LOOK) ? PageAnalyticsLocations.REPORT_SECOND_LOOK : r0.startsWith(Routes.ACCOUNT_REVERT('')) ? PageAnalyticsLocations.ACCOUNT_REVERT : r0;
return r0;
}
function back_13803() { // fn#13803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:2773, offset: 0x00df55ec, size: 38 bytes, params: 1, frame: 10
if (shouldNavigate()) {
env0_2.goBack();
}
}
function forward() { // fn#13804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:2838, offset: 0x00df5612, size: 38 bytes, params: 1, frame: 10
if (shouldNavigate()) {
env0_2.goForward();
}
}
@@ -0,0 +1,112 @@
/* Metro module 4601; source: modules/routing/transitionToChannel.tsx; dependencies: [1379, 661, 4602, 4603, 1230, 7712, 44, 2] */
function _fun39050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:6, offset: 0x010d6b04, size: 201 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = transitionToChannel;
const closure2 = transitionToThreadMessage;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/transitionToChannel.tsx');
exports.transitionToChannel = closure;
exports.transitionToThread = transitionToThread;
exports.transitionToThreadMessage = closure2;
exports.tryTransitionToThreadMessage = function(a0, a1, a2, a3) {
var value2 = ChannelStore.getChannel(a1);
if (value2 != null) {
transitionToThreadMessage(value2, a2, a3);
} else {
transitionToChannel(a0, a3);
}
};
exports.transitionToMessage = transitionToMessage;
exports.transitionToStaticChannelRoute = transitionToStaticChannelRoute;
}
function transitionToChannel(a0, a1) { // fn#39051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:123, offset: 0x010d6bcd, size: 237 bytes, params: 3, frame: 21
var r2;
var guildIdForGenericRedirect;
var defaultImport;
var preload;
var guild_id;
var id;
var moduleValue2;
var transitionTo;
var CHANNEL;
var value4;
var object2;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(channel);
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
preload = defaultImport.preload;
guild_id = channel.guild_id;
id = channel.id;
Reflect.apply(preload, defaultImport, [guild_id, id]);
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue2.transitionTo;
CHANNEL = Routes.CHANNEL;
id = channel.id;
value4 = Reflect.apply(CHANNEL, Routes, [guildIdForGenericRedirect, id]);
object2 = {openChannel: true};
copyDataProperties(object2, a1, defaultImport);
Reflect.apply(transitionTo, moduleValue2, [value4, object2]);
r2 = a1 != null && a1.openTextInVoiceIfVoiceChannel;
r2 = r2 && channel.isGuildVocal();
if (r2) {
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, true);
}
}
}
function transitionToThreadMessage(a0, a1, a2) { // fn#39052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:425, offset: 0x010d6cba, size: 149 bytes, params: 4, frame: 18
(importDefault(44) /* metro dependency 44 */)(a0.parent_id != null, 'Thread must have a parent ID.');
const guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(a0);
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(guildIdForGenericRedirect, a0.id, a1);
const object2 = {openChannel: true};
copyDataProperties(object2, a2, undefined);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
function transitionToThread(a0, a1) { // fn#39053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:772, offset: 0x010d6d4f, size: 145 bytes, params: 3, frame: 16
(importDefault(44) /* metro dependency 44 */)(a0.parent_id != null, 'Thread must have a parent ID.');
const guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(a0);
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(guildIdForGenericRedirect, a0.id);
const object2 = {openChannel: true};
copyDataProperties(object2, a1, guildIdForGenericRedirect);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
function transitionToMessage(a0, a1, a2) { // fn#39055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:1216, offset: 0x010d6e22, size: 131 bytes, params: 4, frame: 17
var guildIdForGenericRedirect;
var moduleValue2;
var transitionTo;
var object2;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(channel);
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue2.transitionTo;
value = Routes.CHANNEL(guildIdForGenericRedirect, channel.id, a1);
object2 = {openChannel: true};
copyDataProperties(object2, a2, undefined);
Reflect.apply(transitionTo, moduleValue2, [value, object2]);
}
}
function transitionToStaticChannelRoute(a0, a1, a2) { // fn#39056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:1431, offset: 0x010d6ea5, size: 80 bytes, params: 4, frame: 16
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(a0, a1);
const object2 = {openChannel: true};
copyDataProperties(object2, a2, Routes);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
@@ -0,0 +1,23 @@
/* Metro module 6947; source: modules/routing/transitionToGuild.native.tsx; dependencies: [661, 6828, 5465, 1230, 2] */
function _fun55260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7125:6, offset: 0x0137a0f6, 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 */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/transitionToGuild.native.tsx');
exports.transitionToGuild = transitionToGuild_55261;
}
function transitionToGuild_55261(a0, a1) { // fn#55261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7125:211, offset: 0x0137a169, size: 144 bytes, params: 3, frame: 19
var object2;
const channelIdForGuildTransition = (require(6828) /* metro dependency 6828: getChannelIdForGuildTransition */).getChannelIdForGuildTransition(a0);
(require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation({duration: 0,
create: undefined, update: undefined, delete: undefined});
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(a0, channelIdForGuildTransition);
object2 = {navigationReplace: true};
copyDataProperties(object2, a1, 0);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}