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

+16067
View File
File diff suppressed because it is too large. Load diff
+149354
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+146
View File
@@ -0,0 +1,146 @@
/* Metro module 676; source: ConstantsIOS.tsx; dependencies: [2] */
function _fun8267(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:783:6, offset: 0x00d3c772, size: 2688 bytes, params: 8, frame: 38
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {SAFARI: 0};
object[0] = 'SAFARI';
object.IN_APP = 1;
object[1] = 'IN_APP';
object.CHROME = 2;
object[2] = 'CHROME';
const Set = global.Set;
const set = new Set(['token', 'fingerprint']);
Object = global.Object;
const value2 = Object.freeze({START: {'x': 0, 'y': 0}, END: {'x': 1, 'y': 0}});
Object = global.Object;
const value3 = Object.freeze({START: {'x': 0, 'y': 0}, END: {'x': 0, 'y': 1}});
const object2 = {HIGH: 0.6};
object2[0.6] = 'HIGH';
object2.LOW = 0.3;
object2[0.3] = 'LOW';
const object3 = {IMAGE: 0};
object3[0] = 'IMAGE';
object3.GIF = 1;
object3[1] = 'GIF';
object3.VIDEO = 2;
object3[2] = 'VIDEO';
const object4 = {ROW: 0};
object4[0] = 'ROW';
object4.HEADER = 1;
object4[1] = 'HEADER';
object4.FOOTER = 2;
object4[2] = 'FOOTER';
(require(2) /* metro dependency 2 */).fileFinishedImporting('ConstantsIOS.tsx');
exports.DrawerSourceTypes = {BACK_BUTTON: 'Back Button', SWIPE: 'Swipe', MUTUAL_GUILD_ITEM: 'Mutual Guild Item',
MEMBER_LIST_ICON: 'Member List Icon', CHANNEL_DRAWER_ICON: 'Channel Drawer Icon',
CHANNEL_TITLE: 'Channel Title',
PREMIUM_GUILD_SUBSCRIPTION_GUILD_LIST_UPSELL: 'Premium Guild Subscription Guild List Upsell'};
exports.AppStates = {INACTIVE: 'inactive', BACKGROUND: 'background', ACTIVE: 'active'};
exports.AuthStates = {WELCOME: 'WELCOME', LOGIN: 'LOGIN', REGISTER_IDENTITY: 'REGISTER_IDENTITY',
REGISTER_DISPLAY_NAME: 'REGISTER_DISPLAY_NAME', REGISTER_ACCOUNT_INFORMATION: 'REGISTER_ACCOUNT_INFORMATION',
VERIFY_PHONE: 'VERIFY_PHONE', MFA: 'MFA',
ACCOUNT_DISABLED_OR_DELETION_SCHEDULED: 'ACCOUNT_DISABLED_OR_DELETION_SCHEDULED',
AGE_GATE_UNDERAGE: 'AGE_GATE_UNDERAGE', AGE_GATE: 'AGE_GATE', COUNTRY_SELECT: 'COUNTRY_SELECT',
EXTERNAL_LINK: 'EXTERNAL_LINK', COMPANION_REMOTE_AUTH: 'COMPANION_REMOTE_AUTH'};
exports.KeyboardThemes = {DEFAULT: 'default', DARK: 'dark', LIGHT: 'light'};
exports.DiscoverabilityScenes = {LANDING: 'LANDING', NAME: 'NAME'};
exports.WebBrowserType = object;
exports.CaptchaEvent = {SOLVED: 'solved', EXPIRED: 'expired'};
exports.VerificationModalScenes = {OVERVIEW: 'OVERVIEW', RESEND_EMAIL: 'RESEND_EMAIL',
CONFIRM_EMAIL_CHANGE_START: 'CONFIRM_EMAIL_CHANGE_START',
CONFIRM_EMAIL_CHANGE_CODE: 'CONFIRM_EMAIL_CHANGE_CODE', ENTER_EMAIL: 'ENTER_EMAIL', ADD_PHONE: 'ADD_PHONE',
VERIFY_PHONE: 'VERIFY_PHONE', VERIFY_PASSWORD: 'VERIFY_PASSWORD',
PHONE_THEN_EMAIL_INTERSTITIAL: 'PHONE_THEN_EMAIL_INTERSTITIAL', CHANGE_EMAIL_COMPLETE: 'CHANGE_EMAIL_COMPLETE',
CHANGE_EMAIL_COLLECT_REASONS: 'CHANGE_EMAIL_COLLECT_REASONS', CHANGE_EMAIL_WARNING: 'CHANGE_EMAIL_WARNING'};
exports.InviteModalScenes = {ADVANCED: 'ADVANCED'};
exports.AuditLogFilterTypes = {USER: 'USER', ACTION: 'ACTION'};
exports.NotificationSettingsSections = {OVERVIEW: 'OVERVIEW', ADD_OVERRIDE: 'ADD_OVERRIDE',
CHANNEL_OVERRIDE: 'CHANNEL_OVERRIDE'};
exports.APP_STORE_REVIEW_LINK = 'itms-apps://itunes.apple.com/us/app/id985746746?mt=8&action=write-review';
exports.MANAGE_SUBSCRIPTION_LINK = 'itms-apps://apps.apple.com/account/subscriptions';
exports.Base64JPEGPrefix = 'data:image/jpeg;base64,';
exports.Base64PNGPrefix = 'data:image/png;base64,';
exports.Base64GIFPrefix = 'data:image/gif;base64,';
exports.Base64AVIFPrefix = 'data:image/avif;base64,';
exports.Base64WEBPPrefix = 'data:image/webp;base64,';
exports.LinkingTypes = {INVITE: 'invite', GUILD_TEMPLATE: 'guild-template', CHANNEL: 'channel',
GIFT_CODE: 'gift-code', MESSAGE: 'message', OAUTH2_AUTHORIZE: 'oauth2-authorize',
ONE_TIME_LOGIN: 'one-time-login', APP_DIRECTORY_PROFILE: 'app-directory-profile', PROMOTIONS: 'promotions',
FEATURE_PROMO_URL: 'promo-url', NONE: 'none', REMOTE_AUTH: 'remote-auth', USER_PROFILE: 'user-profile',
BUILD_OVERRIDE: 'build-override', CONTACT_SYNC: 'contact-sync', ADD_FRIENDS: 'add-friends',
COMPOSE_MESSAGE: 'compose-message', GUILD_EVENT_DETAILS: 'guild-event-details', FRIENDS: 'friends',
EDIT_PROFILE: 'edit-profile', MOBILE_WEB_HANDOFF: 'mobile-web-handoff',
USER_CONNECTIONS_CALLBACK: 'user-connections-callback', VOICE_CHANNEL: 'voice-channel',
GUILD_HOME: 'guild-home', USER_CONNECTIONS_LINK_CALLBACK: 'user-connections-link-callback',
SESSION_MANAGEMENT: 'session-management', CONNECTIONS: 'connections', GUILD_SETTINGS: 'guild-settings',
GUILD_SETTINGS_PICKER: 'guild-settings-picker', ACTIVATE_DEVICE: 'activate-device',
FAMILY_CENTER: 'family-center', SHARE: 'share', CREATE_VOICE_INVITE: 'create_voice_invite',
SEND_VOICE_HANGOUT_WAVE: 'send_voice_hangout_wave', ACCOUNT_STANDING: 'account-standing',
MOBILE_NATIVE_UPDATE: 'mobile-native-update', SHOP: 'shop',
MOBILE_WEB_REDIRECT_CHECKOUT: 'mobile-web-redirect-checkout', AUTHORIZED_APPS: 'authorized-apps',
DAVE_PROTOCOL_VERIFICATION: 'dave-protocol-verification', ICYMI: 'icymi', QUESTS: 'quests', GIFT: 'gift',
NITRO_HOME: 'store', ACTIVITY: 'activity', CONNECTED_GAMES: 'connected-games',
BOOST_MARKETING: 'boost-marketing', BOOST_SETTINGS: 'boost-settings', QUEST_PREVIEW_TOOL: 'quest-preview-tool',
QUEST_HOME_PREVIEW: 'quest-home-preview', SUBSCRIPTION_SETTINGS: 'subscription-settings',
ROLL_DICE: 'roll-dice'};
exports.ActivityPartyApplicationNames = {spotify: 'Spotify'};
exports.CACHE_STORE_LAZY_KEY = 'CacheStoreLazy';
exports.CACHE_STORE_CHANNELS_LAZY_KEY = 'CacheStoreChannelsLazy';
exports.CACHE_STORE_KEY = 'CacheStore';
exports.STORAGE_SECURE_KEYS = set;
exports.MAX_INVITE_AVATARS_TO_SHOW = 6;
exports.INVITE_EMBED_AVATAR_SIZE = 50;
exports.UPLOAD_BANNER_SIZE = {'width': 1080, 'height': 432};
exports.UPLOAD_STICKER_SIZE = 320;
exports.UPLOAD_MEDIUM_SIZE = 256;
exports.UPLOAD_SMALL_SIZE = 128;
exports.UPLOAD_EMOJI_SIZE = 128;
exports.EMOJI_CHAT_SIZE = 18;
exports.DM_WIDTH = 72;
exports.UpsellTypes = {UPLOAD: 'upload', GLOBAL_EMOJI: 'global-emoji', EMOJI_AUTOCOMPLETE: 'emoji-autocomplete',
BADGE: 'badge', ANIMATED_EMOJI: 'animated-emoji', ANIMATED_AVATAR: 'animated-avatar',
CUSTOM_PROFILES: 'custom-profiles', GLOBAL_STICKER: 'global-sticker',
PREMIUM_GUILD_PROFILE: 'premium-guild-profile', LONGER_MESSAGE: 'longer-message', GUILD_CAP: 'guild-cap',
ACTIVITIES: 'activities', APP_ICONS: 'app-icons', SOUNDBOARD: 'soundboard', CLIENT_THEMES: 'client-themes',
FOR_LATER: 'for-later', STREAM_HIGH_QUALITY: 'stream-high-quality'};
exports.StoreKitErrors = {UNKNOWN: 'ESKERRORDOMAIN0', CLIENT_INVALID: 'ESKERRORDOMAIN1',
PAYMENT_CANCELED: 'ESKERRORDOMAIN2', PAYMENT_INVALID: 'ESKERRORDOMAIN3', PAYMENT_NOT_ALLOWED: 'ESKERRORDOMAIN4',
STORE_PRODUCT_NOT_AVAILABLE: 'ESKERRORDOMAIN5', CLOUD_SERVICE_PERMISSION_DENIED: 'ESKERRORDOMAIN6',
CLOUD_SERVICE_NETWORK_CONNECTION_FAILED: 'ESKERRORDOMAIN7', CLOUD_SERVICE_REVOKED: 'ESKERRORDOMAIN8',
PRIVACY_ACKNOWLEDGEMENT_REQUIRED: 'ESKERRORDOMAIN9', UNAUTHORIZED_REQUEST_DATA: 'ESKERRORDOMAIN10',
INVALID_OFFER_IDENTIFIER: 'ESKERRORDOMAIN11', INVALID_SIGNATURE: 'ESKERRORDOMAIN12',
MISSING_OFFER_PARAMS: 'ESKERRORDOMAIN13', INVALID_OFFER_PRICE: 'ESKERRORDOMAIN14',
OVERLAY_CANCELLED: 'ESKERRORDOMAIN15', OVERLAY_INVALID_CONFIGURATION: 'ESKERRORDOMAIN16',
OVERLAY_TIMEOUT: 'ESKERRORDOMAIN17', INELIGIBLE_FOR_OFFER: 'ESKERRORDOMAIN18',
UNSUPPORTED_PLATFORM: 'ESKERRORDOMAIN19'};
exports.StorageKeys = {LOGOUT_TIMESTAMP_KEY: 'logout_timestamp_key',
ACKNOWLEDGED_TOOLTIPS_KEY: 'acknowledged_tooltips_key', KRISP_ONBOARD: 'krisp_onboard'};
exports.ModalAnimation = {NONE: 'none', SLIDE_UP: 'slide-up', SLIDE_IN: 'slide-in', SLIDE_OUT: 'slide-out',
SLIDE_IN_OUT: 'slide-in-out', SLIDE_IN_OUT_REVERSE: 'slide-in-out-reverse', FADE: 'fade'};
exports.GIF_RE_IOS = RegExp('\\.(gif)$', 'i');
exports.WEBP_RE_IOS = RegExp('\\.(webp)$', 'i');
exports.HorizontalGradient = value2;
exports.VerticalGradient = value3;
exports.CompressionQuality = object2;
exports.USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = 16;
exports.DISCORD_CONNECT_EXAMPLE_APP_DEEPLINK_URI = 'discordconnect://connect';
exports.DISCORD_CONNECT_EXAMPLE_APP_APPLICATION_ID = '628735568569696256';
exports.MediaType = object3;
exports.TooltipNames = {GUILD_TOOLTIP: 'guild_tooltip', GIF_PICKER_TOOLTIP: 'gif_picker_tooltip',
GIF_PICKER_TOOLTIP_SPARKLE: 'gif_picker_tooltip_sparkle',
STICKER_PICKER_SHOP_VIEW_ALL: 'sticker_picker_shop_view_all',
SCREENSHARE_ONBOARD_SPARKLES: 'screenshare_onboard_sparkles',
SCREENSHARE_SWIPE_UP_CONTROLS: 'screenshare_swipe_up_controls',
STAGE_DISCOVERY_TOOLTIP: 'stage_discovery_tooltip', HUB_DISCOVERY_TOOLTIP: 'hub_discovery_tooltip'};
exports.GIF_FETCH_LIMIT_IOS = 50;
exports.EMOJI_SEARCH_HEADER_HEIGHT = 56;
exports.NODE_SIZE = 32;
exports.NODE_MARGIN = 4;
exports.EXPRESSION_FOOTER_HEIGHT = 40;
exports.CATEGORY_ICON_RIPPLE_CONFIG = {radius: 16};
exports.CATEGORY_ICON_SIZE = 24;
exports.WHITESPACE_RE = RegExp('(\\t|\\s)', '');
exports.SectionListElementType = object4;
exports.BANNER_HEIGHT = 150;
}
+25
View File
@@ -0,0 +1,25 @@
/* Metro module 694; source: Dispatcher.tsx; dependencies: [695, 636, 587, 566, 818, 2] */
function _fun8465(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:821:6, offset: 0x00d4102f, size: 306 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const STORAGE_KEY_LOG_DISPATCHES = (require(695) /* metro dependency 695: Constants */).STORAGE_KEY_LOG_DISPATCHES;
object2 = {Early: 0};
object2[0] = 'Early';
object2.Database = 1;
object2[1] = 'Database';
object2.Default = 2;
object2[2] = 'Default';
const ActionLogger = (require(636) /* metro dependency 636: LoggingUtils */).ActionLogger;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value = Storage.get(STORAGE_KEY_LOG_DISPATCHES);
const actionLogger = new ActionLogger({persist: value != null && value});
const Dispatcher = (require(566) /* metro dependency 566: flux */).Dispatcher;
const Default = object2.Default;
const dispatcher = new Dispatcher(Default, actionLogger,
{addBreadcrumb: importDefault(818) /* metro dependency 818: addSentryBreadcrumbNative */});
(require(2) /* metro dependency 2 */).fileFinishedImporting('Dispatcher.tsx');
exports.default = dispatcher;
exports.DispatchBand = object2;
}
+415
View File
@@ -0,0 +1,415 @@
/* Metro module 4231; source: /stripe.js; dependencies: [] */
function _fun34918(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:6, offset: 0x01065e3b, size: 218 bytes, params: 8, frame: 16
const _typeof_34919 = function(a0) {
var r2;
r2 = typeof global.Symbol !== 'function' ? _fun34921 : typeof global.Symbol.iterator === 'symbol' ? _fun34920 : _fun34921;
env0_12 = r2;
return r2(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_1 = ''.concat('https://js.stripe.com', '/').concat('basil', '/stripe.js');
const env0_2 = RegExp('^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$', '');
const env0_3 = RegExp('^https:\\/\\/js\\.stripe\\.com\\/(v3|[a-z]+)\\/stripe\\.js(\\?.*)?$', '');
const closure = loadStripe;
closure.setLoadParameters = setLoadParameters;
exports.loadStripe = closure;
}
function _typeof_34919(a0) { // fn#34919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:44, offset: 0x01065f15, size: 74 bytes, params: 2, frame: 12
const Symbol = global.Symbol;
return (typeof Symbol !== 'function' ? function(a0) {
return a0 ? typeof global.Symbol !== 'function' || a0.constructor !== global.Symbol ? typeof a0 : a0 !== global.Symbol.prototype ? 'symbol' : typeof a0 : typeof a0;
} : typeof global.Symbol.iterator === 'symbol' ? _typeof_34919_typeof : _typeof_34919_typeof_34921)(a0);
}
function isStripeJSURL(a0) { // fn#34922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:702, offset: 0x01065f5f, size: 39 bytes, params: 2, frame: 12
return env0_2.test(a0) || env0_3.test(a0);
}
function injectScript(a0) { // fn#34923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:759, offset: 0x01065f86, size: 163 bytes, params: 2, frame: 14
let value = '';
const r4 = a0 ? a0.advancedFraudSignals ? value : '?advancedFraudSignals=false' : value;
const element = global.document.createElement('script');
value = value.concat(env0_1);
element.src = value.concat(r4);
const r2 = global.document.head || global.document.body;
if (r2) {
r2.appendChild(element);
return element;
}
const Error = global.Error;
throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
}
function loadScript(a0) { // fn#34924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:1100, offset: 0x01066029, size: 83 bytes, params: 2, frame: 13
var r0;
var Promise;
var value2;
var promise;
const env0_0 = a0;
if (env0_6 !== null) {
r0 = env0_6;
} else {
Promise = global.Promise;
value2 = Object.create(Promise.prototype, {constructor: {value: Promise}});
promise = new Promise(_fun34925);
r0 = (promise instanceof Object ? promise : value2).catch(function(a0) {
env1_6 = null;
var Promise = global.Promise;
return Promise.reject(a0);
});
}
return r0;
}
function validateLoadParams(a0) { // fn#34931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:2052, offset: 0x01066385, size: 180 bytes, params: 2, frame: 15
const concat = 'invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n '.concat;
const JSON = global.JSON;
let value = JSON.stringify(a0);
value = Reflect.apply(concat,
'invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ',
[value, '\n']);
if (a0 === null) {
throw new global.Error(value);
}
if (_typeof_34919(a0) !== 'object') {
throw new global.Error(value);
}
const Object = global.Object;
if (Object.keys(a0).length !== 1) {
throw new global.Error(value);
}
if (typeof a0.advancedFraudSignals === 'boolean') {
return a0;
}
const Error = global.Error;
const value4 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value4;
}
function loadStripe() { // fn#34932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:2396, offset: 0x01066439, size: 126 bytes, params: 1, frame: 16
var r1;
var value5;
const length = arguments.length;
const Array = global.Array;
const array = new Array(length);
const env0_0 = array;
const value4 = 0;
if (value4 < length) {
for (r1 = value4; true; r1 = value5) {
array[r1] = arguments[r1];
value5 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (!(value5 < length)) {
break;
}
}
}
const Date = global.Date;
const env0_1 = Date.now();
return loadScript(env0_0).then(_fun34933);
}
function setLoadParameters(a0) { // fn#34935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:3162, offset: 0x010665c1, size: 139 bytes, params: 2, frame: 16
var value2;
let env0_0 = a0;
if (env0_11) {
if (env0_0) {
validateLoadParams(a0);
value2 = global.Object.keys(a0);
if (value2.reduce(_fun34936, true)) {
return undefined;
}
if (env0_11) {
throw new global.Error('You cannot change load parameters after calling loadStripe');
}
validateLoadParams(a0);
env0_0 = a0;
return undefined;
}
if (env0_11) {
throw new global.Error('You cannot change load parameters after calling loadStripe');
}
validateLoadParams(a0);
env0_0 = a0;
} else {
if (env0_11) {
throw new global.Error('You cannot change load parameters after calling loadStripe');
}
validateLoadParams(a0);
env0_0 = a0;
}
}
function _fun34925(a0, a1) { // fn#34925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:1157, offset: 0x0106607c, size: 550 bytes, params: 3, frame: 24
var environment;
var r4;
var r11;
var r8;
var r82;
var r5;
var Stripe;
var value;
var binding;
var console;
var querySelectorAll;
var length;
var value2;
var value3;
var value4;
var value5;
var property;
var isStripeJSURLBinding;
var src;
var isStripeJSURL2;
var value6;
var value7;
var injectScriptBinding;
var removeEventListener;
var parentNode;
var closure;
var addEventListener;
var error;
let window = global.window;
if (typeof window !== 'undefined') {
var document = global.document;
if (typeof document !== 'undefined') {
window = global.window;
Stripe = window.Stripe;
if (Stripe) {
value = environment;
binding = env0_0;
r4 = binding;
} else {
r4 = Stripe;
}
if (r4) {
console = global.console;
console.warn('loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used');
}
window = global.window;
Stripe = window.Stripe;
if (Stripe) {
a0(global.window.Stripe);
return undefined;
}
try {
document = global.document;
querySelectorAll = document.querySelectorAll;
value = 'script[src^="'.concat('https://js.stripe.com', '"]');
value = Reflect.apply(querySelectorAll, document, [value]);
length = value.length;
value2 = 0;
value3 = value2 < length;
value4 = null;
value5 = environment.__proto__;
if (value3) {
r11 = value2;
while (true) {
property = value[r11];
isStripeJSURLBinding = isStripeJSURL;
src = property.src;
isStripeJSURL2 = isStripeJSURLBinding(src);
if (isStripeJSURL2) {
r8 = property;
break;
}
value6 = typeof r11 === 'bigint' ? r11 + 1n : +r11 + 1;
length = value.length;
value7 = value6 < length;
if (value7) {
r11 = value6;
continue;
}
r8 = value4;
break;
}
} else {
r8 = value4;
}
if (r8) {
value = environment;
binding = env0_0;
if (binding) {
console = global.console;
console.warn('loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used');
r5 = r8;
} else if (r8) {
if (r8) {
binding = env1_8;
value = value4 === binding;
if (value) {
r5 = r8;
} else {
binding = env1_7;
value = value4 === binding;
if (value) {
r5 = r8;
} else {
removeEventListener = r8.removeEventListener;
binding = env1_8;
Reflect.apply(removeEventListener, r8, ['load', binding]);
removeEventListener = r8.removeEventListener;
binding = env1_7;
Reflect.apply(removeEventListener, r8, ['error', binding]);
parentNode = r8.parentNode;
value = value4 === parentNode;
r82 = value || parentNode === undefined;
if (!r82) {
parentNode.removeChild(r8);
}
injectScriptBinding = injectScript;
value = environment;
binding = env0_0;
value = injectScriptBinding(binding);
r5 = value;
}
}
} else {
r5 = r8;
}
} else {
injectScriptBinding = injectScript;
value = environment;
value = injectScriptBinding(env0_0);
r5 = value;
}
} else if (r8) {
if (r8) {
binding = env1_8;
value = value4 === binding;
if (value) {
r5 = r8;
} else {
binding = env1_7;
value = value4 === binding;
if (value) {
r5 = r8;
} else {
removeEventListener = r8.removeEventListener;
binding = env1_8;
Reflect.apply(removeEventListener, r8, ['load', binding]);
removeEventListener = r8.removeEventListener;
binding = env1_7;
Reflect.apply(removeEventListener, r8, ['error', binding]);
parentNode = r8.parentNode;
value = value4 === parentNode;
r82 = value || parentNode === undefined;
if (!r82) {
parentNode.removeChild(r8);
}
injectScriptBinding = injectScript;
value = environment;
binding = env0_0;
value = injectScriptBinding(binding);
r5 = value;
}
}
} else {
r5 = r8;
}
} else {
injectScriptBinding = injectScript;
value = environment;
value = injectScriptBinding(env0_0);
r5 = value;
}
closure = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return _fun34927;
};
value = closure(a0, a1);
env1_8 = value;
closure = onError_34928;
value = closure(a1);
env1_7 = value;
addEventListener = r5.addEventListener;
binding = env1_8;
Reflect.apply(addEventListener, r5, ['load', binding]);
addEventListener = r5.addEventListener;
binding = env1_7;
Reflect.apply(addEventListener, r5, ['error', binding]);
} catch (error) {
a1(error);
return undefined;
}
return undefined;
}
}
a0(null);
}
function _fun34933(a0) { // fn#34933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:2530, offset: 0x010664b7, size: 32 bytes, params: 2, frame: 15
return initStripe(a0, env0_0, env0_1);
}
function _fun34936(a0, a1) { // fn#34936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:3220, offset: 0x0106664c, size: 51 bytes, params: 3, frame: 7
var r0;
var property;
var binding;
let value = a0;
if (value) {
property = env0_0[a1];
value = environment.__proto__;
binding = env1_0;
value = undefined;
value = property === (binding === null || value === binding ? value : binding[a1]);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function onLoad_34926(a0, a1) { // fn#34926, offset: 0x010662a2, size: 23 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun34927;
}
function onError_34928(a0) { // fn#34928, offset: 0x01066315, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun34929;
}
function initStripe(a0, a1, a2) { // fn#34934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:2549, offset: 0x010664d7, size: 234 bytes, params: 4, frame: 18
var console;
var warn;
if (a0 === null) {
return null;
}
let value = a1[0].match(RegExp('^pk_test', ''));
const version = a0.version;
const r8 = version === 3 ? 'v3' : version;
if (value && r8 !== 'basil') {
console = global.console;
warn = console.warn;
value = 'Stripe.js@'.concat(r8, ' was loaded on the page, but @stripe/stripe-js@');
value = value.concat('7.3.1', ' expected Stripe.js@');
Reflect.apply(warn, console, [value.concat('basil',
'. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning')]);
}
value = a0.apply(undefined, a1);
if (value && value._registerWrapper) {
value._registerWrapper({'name': 'stripe-js', 'version': '7.3.1', startTime: a2});
}
return value;
}
function _fun34927() { // fn#34927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:1707, offset: 0x010662b9, size: 92 bytes, params: 1, frame: 14
const Stripe = global.window.Stripe;
if (Stripe) {
env0_0(global.window.Stripe);
} else {
require(new global.Error('Stripe.js not available'));
}
}
function _fun34929(a0) { // fn#34929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4402:1825, offset: 0x01066325, size: 63 bytes, params: 2, frame: 14
const binding = env0_0;
const Error = global.Error;
binding(new Error('Failed to load Stripe.js', {cause: a0}));
}
@@ -0,0 +1,173 @@
/* Metro module 11328; source: actions/ActivitiesActionCreators.tsx; dependencies: [5, 1379, 661, 4503, 694, 507, 7076, 7067, 4863, 4603, 2] */
function _fun86486(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:6, offset: 0x01f95e96, size: 265 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.Endpoints;
const env0_6 = constantsModule.ActivityTypes;
const env0_7 = constantsModule.AnalyticEvents;
const env0_8 = constantsModule.LoggingInviteTypes;
const env0_9 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
object2 = {updateActivity: updateActivity, sendActivityInvite: sendActivityInvite,
sendActivityInviteUser: sendActivityInviteUser, getJoinSecret: getJoinSecret,
subscribeActivities: subscribeActivities};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ActivitiesActionCreators.tsx');
exports.default = object2;
}
function updateActivity({applicationId, distributor, shareActivity, token, duration, closed, exePath, voiceChannelId, sessionId, mediaSessionId}) { // fn#86487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:233, offset: 0x01f95f9f, size: 318 bytes, params: 2, frame: 25
token = token === undefined ? null : token;
duration = duration === undefined ? 0 : duration;
closed = !(closed === undefined) && closed;
exePath = exePath === undefined ? null : exePath;
voiceChannelId = voiceChannelId === undefined ? null : voiceChannelId;
sessionId = sessionId === undefined ? null : sessionId;
mediaSessionId = mediaSessionId === undefined ? null : mediaSessionId;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun86488);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const ACTIVITIES = Endpoints.ACTIVITIES;
let value = Reflect.apply(post, HTTP, [{'url': null, 'body': null, 'retries': 1, 'oldFormErrors': true,
'rejectWithError': true, url: ACTIVITIES, body: {application_id: applicationId, token: token,
duration: duration, share_activity: shareActivity, distributor: distributor, closed: closed, exePath: exePath,
voice_channel_id: voiceChannelId, session_id: sessionId, media_session_id: mediaSessionId}}]);
value = value.then(_fun86489);
value.catch(_fun86490);
}
function sendActivityInvite({channelId, type, activity, content, targetUserId, location}) { // fn#86491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:959, offset: 0x01f961c6, size: 250 bytes, params: 2, frame: 24
const channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return global.Promise.resolve(null);
}
const defaultImport = importDefault(7076) /* metro dependency 7076: MessageParser */;
const value4 = defaultImport.parse(channel, content ?? '');
const defaultImport2 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
const sendMessage = defaultImport2.sendMessage;
const id = channel.id;
const ACTIVITY_SHARE = MessageSendLocation.ACTIVITY_SHARE;
return Reflect.apply(sendMessage, defaultImport2, [id, value4, false, {activityAction: {type: type,
activity: activity, targetUserId: targetUserId}, location: ACTIVITY_SHARE}]).then(_fun86492, function(a0) {
var Promise = global.Promise;
return Promise.reject(a0);
});
}
function sendActivityInviteUser({userId, type, activity, content, location}) { // fn#86494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:1534, offset: 0x01f9638b, size: 109 bytes, params: 2, frame: 13
let value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value = value.ensurePrivateChannel(userId);
return value.then(_fun86495);
}
function getJoinSecret(a0, a1, a2, a3, a4) { // fn#86496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:1751, offset: 0x01f96436, size: 64 bytes, params: 6, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a4;
return env0_3(_fun86498)();
}
function subscribeActivities(a0) { // fn#86499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:2019, offset: 0x01f9654b, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun86501)();
}
function _fun86488() { // fn#86488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:425, offset: 0x01f960dd, size: 77 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_UPDATE_START',
applicationId: applicationId, duration: duration, distributor: distributor});
}
function _fun86489({body}) { // fn#86489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:755, offset: 0x01f9612a, size: 96 bytes, params: 2, frame: 15
const token = body.token;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_UPDATE_SUCCESS',
applicationId: applicationId, token: token, duration: duration, distributor: distributor});
}
function _fun86490() { // fn#86490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:886, offset: 0x01f9618a, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_UPDATE_FAIL',
applicationId: applicationId});
}
function _fun86492(a0) { // fn#86492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:1267, offset: 0x01f962c0, size: 203 bytes, params: 2, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const INVITE_SENT = AnalyticEvents.INVITE_SENT;
const object2 = {};
object2.location = location;
const type = activity.type;
const LISTENING = ActivityTypes.LISTENING;
object2.invite_type = type === LISTENING ? LoggingInviteTypes.SPOTIFY : LoggingInviteTypes.APPLICATION;
object2.application_id = activity.application_id;
const binding = env0_2;
object2.guild_id = binding.getGuildId();
object2.channel_id = binding.id;
value = null;
object2.message_id = value != a0 ? a0.body.id : value;
Reflect.apply(trackWithMetadata, defaultImport, [INVITE_SENT, object2]);
const Promise = global.Promise;
return Promise.resolve(env0_2);
}
function _fun86495(a0) { // fn#86495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:1653, offset: 0x01f963f8, size: 62 bytes, params: 2, frame: 13
return env0_0.sendActivityInvite({channelId: a0, type: type, activity: activity, content: content,
location: location});
}
function* _fun86498() { // fn#86498, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:1767, offset: 0x01f96481, size: 202 bytes, params: 1, frame: 20
if (false) {
return undefined;
}
const object3 = {};
value = environment.__proto__;
if (env1_3 != null) {
object3.channel_id = env1_3;
}
if (ChannelStore != null) {
object3.message_id = ChannelStore;
}
const HTTP = env2_0(env2_2[5]).HTTP;
const get = HTTP.get;
const object4 = {};
object4.url = env2_5.USER_ACTIVITY_JOIN(require, importDefault, dependencyMap);
object4.retries = 3;
object4.query = object3;
object4.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object4]);
value = undefined;
if (false) {
return value;
}
return {secret: value.body.secret, joinUrl: value.body.join_url};
}
function* _fun86501() { // fn#86501, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11514:2025, offset: 0x01f9657a, size: 142 bytes, params: 1, frame: 14
var environment;
if (false) {
return undefined;
}
value = environment.__proto__;
value = require.map(function({userId, applicationId, partyId, messageId, channelId}) {
return {user_id: userId, application_id: applicationId, party_id: partyId, message_id: messageId,
channel_id: channelId};
});
const HTTP = env2_0(env2_2[5]).HTTP;
const post = HTTP.post;
const USER_ACTIVITY_SUBSCRIBE = env2_5.USER_ACTIVITY_SUBSCRIBE;
yield Reflect.apply(post, HTTP, [{url: USER_ACTIVITY_SUBSCRIBE, body: {subscriptions: value}, retries: 1,
rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
+8
View File
@@ -0,0 +1,8 @@
/* Metro module 4647; source: actions/AlertActionCreators.tsx; dependencies: [2, 4496] */
function _fun40021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4825:6, offset: 0x010f2ae7, size: 95 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/AlertActionCreators.tsx');
exports.default = (require(4496) /* metro dependency 4496: AlertActionCreators */).default;
}
@@ -0,0 +1,12 @@
/* Metro module 13767; source: actions/AnalyticsTrackingActionCreators.tsx; dependencies: [694, 2] */
function _fun105036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13964:6, offset: 0x022ab98d, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/AnalyticsTrackingActionCreators.tsx');
exports.track = track_105037;
}
function track_105037(a0, a1) { // fn#105037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13964:177, offset: 0x022ab9f0, size: 62 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRACK', event: a0, properties: a1});
}
+775
View File
@@ -0,0 +1,775 @@
/* Metro module 8899; source: actions/AudioActionCreators.tsx; dependencies: [5, 4293, 1379, 4259, 4294, 1934, 1878, 661, 8900, 4291, 3, 683, 6949, 694, 8901, 8903, 8904, 8912, 2] */
function _fun69366(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6, offset: 0x01c71887, size: 1030 bytes, params: 8, frame: 20
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const certifiedDeviceStore = importDefault(4293) /* metro dependency 4293: CertifiedDeviceStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.InputModes;
const env0_11 = value.AnalyticEvents;
(require(8900) /* metro dependency 8900: Constants */).SoundOutputChannel;
const env0_12 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('AudioActionCreators');
value.enableNativeLogger(true);
const env0_14 = (importDefault(6949) /* metro dependency 6949 */)(function(a0, a1, a2) {
var defaultImport = importDefault(dependencyMap[11]);
var USER_VOLUME_SETTING_UPDATED = AnalyticEvents.USER_VOLUME_SETTING_UPDATED;
var object = {target_user_id: a0, context: a1, volume: a2};
object.media_session_id = RTCConnectionStore.getMediaSessionId();
object.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
defaultImport.track(USER_VOLUME_SETTING_UPDATED, object);
}, 300);
object3 = {isNotSupported: function() {
return false;
}, enable: function() {
var Promise = global.Promise;
return Promise.resolve(true);
}, trackToggleSelfMute: function() {
}, trackToggleSelfDeaf: function() {
}};
const env0_15 = object3.isNotSupported;
const env0_16 = object3.trackToggleSelfMute;
const env0_17 = object3.trackToggleSelfDeaf;
const object4 = {};
object4.enable = object3.enable;
object4.toggleSelfMute = toggleSelfMute;
object4.setSelfMute = setSelfMute;
object4.setTemporarySelfMute = setTemporarySelfMute;
object4.toggleSelfDeaf = toggleSelfDeaf;
object4.toggleLocalMute = toggleLocalMute;
object4.toggleLocalSoundboardMute = toggleLocalSoundboardMute;
object4.setDisableLocalVideo = setDisableLocalVideo;
object4.setLocalVolume = setLocalVolume;
object4.setAudioMixerSettings = setAudioMixerSettings;
object4.setLocalPan = setLocalPan;
object4.setMode = setMode;
object4.setBypassSystemInputProcessing = setBypassSystemInputProcessing;
object4.setInputVolume = setInputVolume;
object4.setOutputVolume = setOutputVolume;
object4.setInputDevice = setInputDevice_69388;
object4.setOutputDevice = setOutputDevice_69389;
object4.setVideoDevice = setVideoDevice;
object4.setActiveInputProfile = setActiveInputProfile;
object4.setEchoCancellation = setEchoCancellation;
object4.setSidechainCompression = setSidechainCompression;
object4.setSidechainCompressionStrength = setSidechainCompressionStrength;
object4.setLoopback = setLoopback_69395;
object4.setNoiseSuppression = setNoiseSuppression;
object4.setNoiseCancellation = setNoiseCancellation_69397;
object4.setAutomaticGainControl = setAutomaticGainControl_69398;
object4.setAttenuation = setAttenuation;
object4.setQoS = setQoS;
object4.reset = reset_69401;
object4.setSilenceWarning = setSilenceWarning;
object4.setDebugLogging = setDebugLogging;
object4.setVideoHook = setVideoHook;
object4.setExperimentalSoundshare = setExperimentalSoundshare;
object4.setUseSystemScreensharePicker = setUseSystemScreensharePicker;
object4.setAudioSubsystem = setAudioSubsystem_69409;
object4.setVideoEnabled = setVideoEnabled;
object4.setGoLiveSource = setGoLiveSource;
object4.setAecDump = setAecDump;
object4.interact = interact;
object4.setEnableHardwareMuteNotice = setEnableHardwareMuteNotice;
object4.setKrispSuppressionLevel = setKrispSuppressionLevel;
object4.setKrispModelOverride = function(a0) {
if (!isNotSupported()) {
importDefault(dependencyMap[13]).dispatch({type: 'AUDIO_SET_KRISP_MODEL_OVERRIDE', model: a0});
if (MediaEngineStore.getNoiseCancellation()) {
this.setNoiseCancellation(false);
this.setNoiseCancellation(true);
}
}
};
object4.setNoiseCancellationEnableStats = function(a0) {
isNotSupported();
};
object4.setOpenH264Enabled = setOpenH264Enabled_69420;
object4.resetMediaEngineSettings = resetMediaEngineSettings;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/AudioActionCreators.tsx');
exports.default = object4;
}
function getInputDeviceName() { // fn#69367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:312, offset: 0x01c71c8d, size: 55 bytes, params: 1, frame: 10
const inputDevices = MediaEngineStore.getInputDevices();
const getInputDeviceId = MediaEngineStore.getInputDeviceId;
const property = inputDevices[Reflect.apply(getInputDeviceId, MediaEngineStore, [])];
return property != null ? property.name : '';
}
function trackDeviceChanged(a0, a1, a2, a3) { // fn#69368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:415, offset: 0x01c71cc4, size: 330 bytes, params: 5, frame: 30
var r8;
var object2;
var voiceChannelId;
var value4;
var property;
var property2;
var audioSubsystem;
var audioLayer;
var defaultImport;
var track;
var MEDIA_DEVICE_CHANGED;
var value10;
const value = a4;
const value2 = undefined;
const r2 = value !== value2 ? value : {};
if (a1 !== a2) {
voiceChannelId = SelectedChannelStore.getVoiceChannelId();
value4 = null;
r8 = value4 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value4;
property = a0[a1];
property2 = a0[a2];
audioSubsystem = MediaEngineStore.getMediaEngine().getAudioSubsystem();
audioLayer = MediaEngineStore.getMediaEngine().getAudioLayer();
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
MEDIA_DEVICE_CHANGED = AnalyticEvents.MEDIA_DEVICE_CHANGED;
object2 = {};
value10 = '';
object2.device_from_name = CertifiedDeviceStore.getCertifiedDeviceName(a1,
value4 != property ? property.name : value10);
object2.device_to_name = CertifiedDeviceStore.getCertifiedDeviceName(a2,
value4 != property2 ? property2.name : value10);
object2.device_type = a3;
object2.device_is_certified = CertifiedDeviceStore.isCertified(a2);
object2.location = r2.location;
object2.location_stack = r2.analyticsLocations;
object2.voice_channel_type = value4 == r8 ? value2 : r8.type;
object2.audio_subsystem = audioSubsystem;
object2.audio_layer = audioLayer;
Reflect.apply(track, defaultImport, [MEDIA_DEVICE_CHANGED, object2]);
}
return value2;
}
function toggleSelfMute() { // fn#69374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:1381, offset: 0x01c71e79, size: 297 bytes, params: 1, frame: 18
var r4;
var currentUser;
let value = a0;
let r0 = value !== undefined ? value : {};
const context = r0.context;
const r6 = context !== undefined ? context : MediaEngineContextTypes.DEFAULT;
let syncRemote = r0.syncRemote;
syncRemote = syncRemote === undefined || syncRemote;
let usedKeybind = r0.usedKeybind;
usedKeybind = !(usedKeybind === undefined) && usedKeybind;
let playSoundEffect = r0.playSoundEffect;
playSoundEffect = playSoundEffect === undefined || playSoundEffect;
if (isNotSupported()) {
r0 = global.Promise.resolve();
} else {
trackToggleSelfMute({usedKeybind: usedKeybind, location: r0.location});
r4 = playSoundEffect && !MediaEngineStore.hasActiveCallKitCall();
currentUser = UserStore.getCurrentUser();
r0 = currentUser != null && currentUser.isStaff();
if (r0) {
env0_13.info('Toggling self mute');
}
if (MediaEngineStore.isEnabled()) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value = value.dispatch({type: 'AUDIO_TOGGLE_SELF_MUTE', context: r6, syncRemote: syncRemote,
playSoundEffect: r4});
r0 = value;
} else {
r0 = this.enable(true);
}
}
return r0;
}
function setSelfMute(a0, a1) { // fn#69375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:1780, offset: 0x01c71fa2, size: 169 bytes, params: 3, frame: 16
var currentUser;
let value = a2;
let r4 = !(value !== undefined) || value;
if (!isNotSupported()) {
r4 = r4 && !MediaEngineStore.hasActiveCallKitCall();
currentUser = UserStore.getCurrentUser();
if (currentUser != null && currentUser.isStaff()) {
env0_13.info('Setting self mute', a1);
}
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_SELF_MUTE', context: a0, mute: a1, playSoundEffect: r4});
}
}
function setTemporarySelfMute(a0) { // fn#69376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2003, offset: 0x01c7204b, size: 125 bytes, params: 2, frame: 15
var currentUser;
if (!isNotSupported()) {
currentUser = UserStore.getCurrentUser();
if (currentUser != null && currentUser.isStaff()) {
env0_13.info('Setting temporary self mute', a0);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_TEMPORARY_SELF_MUTE',
mute: a0});
}
}
function toggleSelfDeaf() { // fn#69377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2189, offset: 0x01c720c8, size: 147 bytes, params: 1, frame: 16
const value = a0;
const r1 = value !== undefined ? value : {};
const context = r1.context;
const r5 = context !== undefined ? context : MediaEngineContextTypes.DEFAULT;
let syncRemote = r1.syncRemote;
syncRemote = syncRemote === undefined || syncRemote;
let usedKeybind = r1.usedKeybind;
usedKeybind = !(usedKeybind === undefined) && usedKeybind;
if (!isNotSupported()) {
trackToggleSelfDeaf({usedKeybind: usedKeybind, location: r1.location});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_TOGGLE_SELF_DEAF',
context: r5,
syncRemote: syncRemote});
}
}
function toggleLocalMute(a0) { // fn#69378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2386, offset: 0x01c7215b, size: 89 bytes, params: 2, frame: 14
let value = a1;
if (!isNotSupported()) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_TOGGLE_LOCAL_MUTE',
context: value !== undefined ? value : MediaEngineContextTypes.DEFAULT, userId: a0});
}
}
function toggleLocalSoundboardMute(a0) { // fn#69379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2494, offset: 0x01c721b4, size: 78 bytes, params: 2, frame: 14
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_TOGGLE_LOCAL_SOUNDBOARD_MUTE', context: r4, userId: a0});
}
function setDisableLocalVideo(a0, a1) { // fn#69380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2618, offset: 0x01c72202, size: 125 bytes, params: 3, frame: 16
let value = a2;
const value2 = a3;
const value3 = a4;
if (!isNotSupported()) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_LOCAL_VIDEO_DISABLED',
context: value !== undefined ? value : MediaEngineContextTypes.DEFAULT, userId: a0, videoToggleState: a1,
persist: !(value2 !== undefined) || value2, isAutomatic: value3 !== undefined ? value3 : false});
}
}
function setLocalVolume(a0, a1) { // fn#69381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2793, offset: 0x01c7227f, size: 125 bytes, params: 3, frame: 19
const value = a2;
const r3 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
const value2 = (require(8901) /* metro dependency 8901: AudioSettingsUtils */).snapVolumeToDefault(a1, r3);
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'AUDIO_SET_LOCAL_VOLUME', context: r3, userId: a0, volume: value2});
env0_14(a0, r3, value2);
}
function setAudioMixerSettings(a0) { // fn#69382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2954, offset: 0x01c722fc, size: 79 bytes, params: 2, frame: 14
let value = a1;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_AUDIO_MIXER_SETTINGS', context: r4, settings: a0});
}
function setLocalPan(a0, a1, a2) { // fn#69383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:3072, offset: 0x01c7234b, size: 94 bytes, params: 4, frame: 14
let value = a3;
const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_LOCAL_PAN', context: r4, userId: a0, left: a1, right: a2});
}
function setMode(a0) { // fn#69384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:3186, offset: 0x01c723a9, size: 617 bytes, params: 2, frame: 25
var r14;
var r9;
var object3;
var mode;
var modeOptions;
var defaultImport;
var dispatch;
var object4;
var audioSubsystem;
var audioLayer;
var voiceChannelId;
var value12;
var inputDeviceName;
var defaultImport2;
var track;
var VOICE_ACTIVITY_THRESHOLD_CHANGED;
var threshold;
var autoThreshold;
var audioSubsystem2;
var audioLayer2;
var voiceChannelId2;
var value20;
var inputDeviceName2;
var defaultImport3;
const value = a1;
const value2 = a2;
const value3 = a3;
const value4 = undefined;
const r6 = value !== value4 ? value : {};
const r8 = value2 !== value4 ? value2 : MediaEngineContextTypes.DEFAULT;
const analyticsLocations = (value3 !== value4 ? value3 : {}).analyticsLocations;
if (!isNotSupported()) {
mode = MediaEngineStore.getMode();
modeOptions = MediaEngineStore.getModeOptions(r8);
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = defaultImport.dispatch;
object3 = {type: 'AUDIO_SET_MODE', context: r8, mode: a0};
object4 = {};
copyDataProperties(object4, modeOptions, undefined);
copyDataProperties(object4, r6, undefined);
object3.options = object4;
Reflect.apply(dispatch, defaultImport, [object3]);
if (a0 !== mode) {
audioSubsystem2 = MediaEngineStore.getMediaEngine().getAudioSubsystem();
audioLayer2 = MediaEngineStore.getMediaEngine().getAudioLayer();
voiceChannelId2 = SelectedChannelStore.getVoiceChannelId();
value20 = null;
r9 = value20 != voiceChannelId2 ? ChannelStore.getChannel(voiceChannelId2) : value20;
inputDeviceName2 = getInputDeviceName();
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport3.track(AnalyticEvents.VOICE_ACTIVATION_MODE_CHANGED, {mode: a0,
location_stack: analyticsLocations,
voice_channel_type: value20 == r9 ? value4 : r9.type, input_device_name: inputDeviceName2,
audio_subsystem: audioSubsystem2, audio_layer: audioLayer2});
} else if (a0 === InputModes.VOICE_ACTIVITY) {
if (modeOptions !== r6) {
audioSubsystem = MediaEngineStore.getMediaEngine().getAudioSubsystem();
audioLayer = MediaEngineStore.getMediaEngine().getAudioLayer();
voiceChannelId = SelectedChannelStore.getVoiceChannelId();
value12 = null;
r14 = value12 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value12;
inputDeviceName = getInputDeviceName();
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
VOICE_ACTIVITY_THRESHOLD_CHANGED = AnalyticEvents.VOICE_ACTIVITY_THRESHOLD_CHANGED;
object3 = {location_stack: analyticsLocations};
object3.voice_channel_type = value12 == r14 ? value4 : r14.type;
object3.input_device_name = inputDeviceName;
object3.audio_subsystem = audioSubsystem;
object3.audio_layer = audioLayer;
threshold = modeOptions.threshold;
object3.old_threshold = threshold;
threshold = r6.threshold;
object3.new_threshold = threshold;
autoThreshold = modeOptions.autoThreshold;
object3.old_auto_threshold = autoThreshold;
autoThreshold = r6.autoThreshold;
object3.new_auto_threshold = autoThreshold;
Reflect.apply(track, defaultImport2, [VOICE_ACTIVITY_THRESHOLD_CHANGED, object3]);
}
}
}
return value4;
}
function setBypassSystemInputProcessing(a0, a1) { // fn#69385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4191, offset: 0x01c72612, size: 75 bytes, params: 3, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_BYPASS_SYSTEM_INPUT_PROCESSING',
bypassEnabled: a0, location: a1});
}
}
function setInputVolume(a0) { // fn#69386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4329, offset: 0x01c7265d, size: 197 bytes, params: 2, frame: 18
var r6;
var voiceChannelId;
var value4;
var defaultImport2;
const value = a1;
const value2 = undefined;
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_INPUT_VOLUME',
volume: a0});
voiceChannelId = SelectedChannelStore.getVoiceChannelId();
value4 = null;
r6 = value4 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value4;
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.MEDIA_INPUT_VOLUME_CHANGED, {volume: a0,
location_stack: (value !== value2 ? value : {}).analyticsLocations,
voice_channel_type: value4 == r6 ? value2 : r6.type});
}
return value2;
}
function setOutputVolume(a0) { // fn#69387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4617, offset: 0x01c72722, size: 195 bytes, params: 2, frame: 18
var r6;
var voiceChannelId;
var value4;
var defaultImport2;
const value = a1;
const value2 = undefined;
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_OUTPUT_VOLUME',
volume: a0});
voiceChannelId = SelectedChannelStore.getVoiceChannelId();
value4 = null;
r6 = value4 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value4;
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.MEDIA_OUTPUT_VOLUME_CHANGED, {volume: a0,
location_stack: (value !== value2 ? value : {}).analyticsLocations,
voice_channel_type: value4 == r6 ? value2 : r6.type});
}
return value2;
}
function setInputDevice_69388(a0) { // fn#69388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4908, offset: 0x01c727e5, size: 167 bytes, params: 2, frame: 21
var inputDeviceId;
let value = a1;
const r1 = value !== undefined ? value : {};
const location = r1.location;
const analyticsLocations = r1.analyticsLocations;
if (!isNotSupported()) {
inputDeviceId = MediaEngineStore.getInputDeviceId();
if (location != null) {
trackDeviceChanged(MediaEngineStore.getInputDevices(), inputDeviceId, a0, 'Audio Input',
{location: location,
analyticsLocations: analyticsLocations});
} else if (analyticsLocations != null) {
trackDeviceChanged(MediaEngineStore.getInputDevices(), inputDeviceId, a0, 'Audio Input',
{location: location,
analyticsLocations: analyticsLocations});
}
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_INPUT_DEVICE', id: a0, oldId: inputDeviceId});
}
}
function setOutputDevice_69389(a0) { // fn#69389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5177, offset: 0x01c7288c, size: 167 bytes, params: 2, frame: 21
var outputDeviceId;
let value = a1;
const r1 = value !== undefined ? value : {};
const location = r1.location;
const analyticsLocations = r1.analyticsLocations;
if (!isNotSupported()) {
outputDeviceId = MediaEngineStore.getOutputDeviceId();
if (location != null) {
trackDeviceChanged(MediaEngineStore.getOutputDevices(), outputDeviceId, a0, 'Audio Output',
{location: location,
analyticsLocations: analyticsLocations});
} else if (analyticsLocations != null) {
trackDeviceChanged(MediaEngineStore.getOutputDevices(), outputDeviceId, a0, 'Audio Output',
{location: location,
analyticsLocations: analyticsLocations});
}
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_OUTPUT_DEVICE', id: a0, oldId: outputDeviceId});
}
}
function setVideoDevice(a0) { // fn#69390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5451, offset: 0x01c72933, size: 162 bytes, params: 2, frame: 21
var videoDeviceId;
let value = a1;
const r1 = value !== undefined ? value : {};
const location = r1.location;
const analyticsLocations = r1.analyticsLocations;
if (!isNotSupported()) {
videoDeviceId = MediaEngineStore.getVideoDeviceId();
if (location != null) {
trackDeviceChanged(MediaEngineStore.getVideoDevices(), videoDeviceId, a0, 'Video', {location: location,
analyticsLocations: analyticsLocations});
} else if (analyticsLocations != null) {
trackDeviceChanged(MediaEngineStore.getVideoDevices(), videoDeviceId, a0, 'Video', {location: location,
analyticsLocations: analyticsLocations});
}
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'MEDIA_ENGINE_SET_VIDEO_DEVICE', id: a0, oldId: videoDeviceId});
}
}
function setActiveInputProfile(a0) { // fn#69391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5721, offset: 0x01c729d5, size: 152 bytes, params: 2, frame: 19
const value = a1;
const value2 = undefined;
if (!isNotSupported()) {
(importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('active_input_profile', a0,
MediaEngineStore.getActiveInputProfile() ?? value2, (value !== value2 ? value : {}).analyticsLocations);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_ACTIVE_INPUT_PROFILE',
inputProfile: a0});
}
return value2;
}
function setEchoCancellation(a0, a1) { // fn#69392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5942, offset: 0x01c72a6d, size: 74 bytes, params: 3, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_ECHO_CANCELLATION',
enabled: a0, location: a1});
}
}
function setSidechainCompression(a0) { // fn#69393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6050, offset: 0x01c72ab7, size: 126 bytes, params: 2, frame: 19
var defaultImport;
let value = a1;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getSidechainCompression();
defaultImport('stream_attenuation_enabled', a0, value, (value !== undefined ? value : {}).analyticsLocations);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_SIDECHAIN_COMPRESSION', enabled: a0});
}
}
function setSidechainCompressionStrength(a0) { // fn#69394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6252, offset: 0x01c72b35, size: 129 bytes, params: 2, frame: 19
var defaultImport;
let value = a1;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getSidechainCompressionStrength();
defaultImport('stream_attenuation_strength', a0, value, (value !== undefined ? value : {}).analyticsLocations);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_SIDECHAIN_COMPRESSION_STRENGTH', strength: a0});
}
}
function setLoopback_69395(a0, a1) { // fn#69395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6481, offset: 0x01c72bb6, size: 75 bytes, params: 3, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_LOOPBACK',
loopbackReason: a0, enabled: a1});
}
}
function setNoiseSuppression(a0, a1) { // fn#69396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6578, offset: 0x01c72c01, size: 74 bytes, params: 3, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_NOISE_SUPPRESSION',
enabled: a0, location: a1});
}
}
function setNoiseCancellation_69397(a0, a1) { // fn#69397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6686, offset: 0x01c72c4b, size: 114 bytes, params: 3, frame: 18
var value;
if (!isNotSupported()) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_NOISE_CANCELLATION', enabled: a0, location: a1});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_NOISE_SUPPRESSION', enabled: !a0, location: a1});
}
}
function setAutomaticGainControl_69398(a0, a1) { // fn#69398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6876, offset: 0x01c72cbd, size: 74 bytes, params: 3, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_AUTOMATIC_GAIN_CONTROL',
enabled: a0, location: a1});
}
}
function setAttenuation(a0, a1, a2) { // fn#69399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6993, offset: 0x01c72d07, size: 250 bytes, params: 4, frame: 21
var attenuation;
var attenuateWhileSpeakingSelf;
var attenuateWhileSpeakingOthers;
if (!isNotSupported()) {
attenuation = MediaEngineStore.getAttenuation();
attenuateWhileSpeakingSelf = MediaEngineStore.getAttenuateWhileSpeakingSelf();
attenuateWhileSpeakingOthers = MediaEngineStore.getAttenuateWhileSpeakingOthers();
if (attenuation !== a0) {
(importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('global_attenuation_strength',
a0, attenuation);
} else if (attenuateWhileSpeakingSelf !== a1) {
(importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('global_attenuation_for_self_speak_enabled',
a1, attenuateWhileSpeakingSelf);
} else if (attenuateWhileSpeakingOthers !== a2) {
(importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('global_attenuation_for_other_speak_enabled',
a2, attenuateWhileSpeakingOthers);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_ATTENUATION',
attenuation: a0, attenuateWhileSpeakingSelf: a1, attenuateWhileSpeakingOthers: a2});
}
}
function setQoS(a0) { // fn#69400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7432, offset: 0x01c72e01, size: 106 bytes, params: 2, frame: 17
var defaultImport;
var value;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getQoS();
defaultImport('quality_of_service_packets_enabled', a0, value);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_QOS', enabled: a0});
}
}
function reset_69401() { // fn#69401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7562, offset: 0x01c72e6b, size: 60 bytes, params: 1, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_RESET'});
}
}
function setSilenceWarning(a0) { // fn#69402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7616, offset: 0x01c72ea7, size: 106 bytes, params: 2, frame: 17
var defaultImport;
var value;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getEnableSilenceWarning();
defaultImport('silence_warning_enabled', a0, value);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIO_SET_DISPLAY_SILENCE_WARNING', enabled: a0});
}
}
function setDebugLogging(a0) { // fn#69403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7799, offset: 0x01c72f11, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun69405)();
}
function setVideoHook(a0) { // fn#69406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7953, offset: 0x01c72fd7, size: 108 bytes, params: 2, frame: 17
var defaultImport;
var value;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getVideoHook();
defaultImport('video_hook_enabled', a0, value);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'MEDIA_ENGINE_SET_VIDEO_HOOK', enabled: a0});
}
}
function setExperimentalSoundshare(a0) { // fn#69407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8093, offset: 0x01c73043, size: 106 bytes, params: 2, frame: 17
var defaultImport;
var value;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getExperimentalSoundshare();
defaultImport('experimental_soundshare_enabled', a0, value);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'MEDIA_ENGINE_SET_EXPERIMENTAL_SOUNDSHARE', enabled: a0});
}
}
function setUseSystemScreensharePicker(a0) { // fn#69408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8285, offset: 0x01c730ad, size: 108 bytes, params: 2, frame: 17
var defaultImport;
var value;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getUseSystemScreensharePicker();
defaultImport('system_screenshare_picker_enabled', a0, value);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'MEDIA_ENGINE_SET_USE_SYSTEM_SCREENSHARE_PICKER', enabled: a0});
}
}
function setAudioSubsystem_69409(a0) { // fn#69409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8511, offset: 0x01c73119, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun69411)();
}
function setVideoEnabled(a0) { // fn#69412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8659, offset: 0x01c731de, size: 82 bytes, params: 2, frame: 13
(require(8904) /* metro dependency 8904: applyBackgroundOption */).applyInitialVideoBackgroundOption();
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SET_VIDEO_ENABLED',
enabled: a0});
}
function setGoLiveSource(a0) { // fn#69413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8793, offset: 0x01c73230, size: 181 bytes, params: 2, frame: 21
var moduleValue;
var trackStreamSettingsUpdate;
var preset;
var resolution;
var frameRate;
var desktopSettings;
const value = undefined;
let qualityOptions = a0 == null ? value : a0.qualityOptions;
if (qualityOptions != null) {
moduleValue = require(8912) /* metro dependency 8912: StreamQualityUtils */;
trackStreamSettingsUpdate = moduleValue.trackStreamSettingsUpdate;
qualityOptions = a0.qualityOptions;
preset = qualityOptions.preset;
qualityOptions = a0.qualityOptions;
resolution = qualityOptions.resolution;
qualityOptions = a0.qualityOptions;
frameRate = qualityOptions.frameRate;
desktopSettings = a0.desktopSettings;
Reflect.apply(trackStreamSettingsUpdate, moduleValue, [preset, resolution, frameRate,
desktopSettings == null ? value : desktopSettings.sound]);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SET_GO_LIVE_SOURCE',
settings: a0});
return value;
}
function setAecDump(a0) { // fn#69414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9089, offset: 0x01c732e5, size: 108 bytes, params: 2, frame: 17
var defaultImport;
var value;
if (!isNotSupported()) {
defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */;
value = MediaEngineStore.getAecDump();
defaultImport('diagnostic_audio_recording_enabled', a0, value);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'MEDIA_ENGINE_SET_AEC_DUMP', enabled: a0});
}
}
function interact() { // fn#69415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9239, offset: 0x01c73351, size: 62 bytes, params: 1, frame: 12
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'MEDIA_ENGINE_INTERACTION_REQUIRED',
'required': false});
}
}
function setEnableHardwareMuteNotice(a0) { // fn#69416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9330, offset: 0x01c7338f, size: 67 bytes, params: 2, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SET_ENABLE_HARDWARE_MUTE_NOTICE',
enabled: a0});
}
}
function setKrispSuppressionLevel(a0) { // fn#69417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9450, offset: 0x01c733d2, size: 68 bytes, params: 2, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_KRISP_SUPPRESSION_LEVEL',
level: a0});
}
}
function setOpenH264Enabled_69420(a0) { // fn#69420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9782, offset: 0x01c73488, size: 67 bytes, params: 2, frame: 13
if (!isNotSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SET_OPENH264_ENABLED',
enabled: a0});
}
}
function resetMediaEngineSettings(a0) { // fn#69421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9907, offset: 0x01c734cb, size: 55 bytes, params: 2, frame: 12
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_RESET_SETTINGS',
overrides: a0});
}
function* _fun69405() { // fn#69405, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7805, offset: 0x01c72f40, size: 151 bytes, params: 1, frame: 18
if (true) {
value = environment.__proto__.__proto__;
if (!env2_15()) {
var binding = env2_1;
var value3 = binding(env2_2[15]);
binding = env2_6;
yield value3('debug_logging_enabled', require, binding.getDebugLogging());
if (false) {
return undefined;
}
binding = env2_1;
binding(env2_2[13]).dispatch({type: 'AUDIO_SET_DEBUG_LOGGING', enabled: require});
}
}
}
function* _fun69411() { // fn#69411, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8517, offset: 0x01c73148, size: 150 bytes, params: 1, frame: 18
if (true) {
value = environment.__proto__.__proto__;
if (!env2_15()) {
var binding = env2_1;
var value3 = binding(env2_2[15]);
binding = env2_6;
yield value3('audio_subsystem', require, binding.getAudioSubsystem());
if (false) {
return undefined;
}
binding = env2_1;
binding(env2_2[13]).dispatch({type: 'AUDIO_SET_SUBSYSTEM', subsystem: require});
}
}
}
+152
View File
@@ -0,0 +1,152 @@
/* Metro module 15888; source: actions/AuditLogActionCreators.tsx; dependencies: [15878, 661, 507, 694, 2] */
function _fun122611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:6, offset: 0x0256db73, size: 230 bytes, params: 8, frame: 20
const env0_0 = require;
const isLoading = function() {
return GuildSettingsAuditLogStore.isLoading || GuildSettingsAuditLogStore.isLoadingNextPage;
};
const closure = fetchLogs;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildSettingsAuditLogStore = importDefault(15878) /* metro dependency 15878: GuildSettingsAuditLogStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.Endpoints;
const env0_5 = constantsModule.AUDIT_LOG_PAGE_LIMIT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/AuditLogActionCreators.tsx');
exports.fetchLogs = closure;
exports.fetchNextLogPage = fetchNextLogPage;
exports.filterByAction = function(a0, a1) {
if (isLoading()) {
return undefined;
}
if (a1 == null) {
return undefined;
}
importDefault(dependencyMap[3]).dispatch({type: 'AUDIT_LOG_FILTER_BY_ACTION', action: a0});
return fetchLogs(a1, null, null, a0);
};
exports.filterByUserId = function(a0, a1) {
if (isLoading()) {
return undefined;
}
if (a1 == null) {
return undefined;
}
importDefault(dependencyMap[3]).dispatch({type: 'AUDIT_LOG_FILTER_BY_USER', userId: a0});
return fetchLogs(a1, a0);
};
exports.filterByTargetId = function(a0, a1) {
if (isLoading()) {
return undefined;
}
if (a1 == null) {
return undefined;
}
importDefault(dependencyMap[3]).dispatch({type: 'AUDIT_LOG_FILTER_BY_TARGET', targetId: a0});
return fetchLogs(a1, null, a0);
};
}
function makeRequest_122613(a0, {before, userId, targetId, action}) { // fn#122613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:216, offset: 0x0256dc75, size: 212 bytes, params: 3, frame: 16
const r5 = userId ?? GuildSettingsAuditLogStore.userIdFilter;
const r2 = action ?? GuildSettingsAuditLogStore.actionFilter;
const r0 = targetId ?? GuildSettingsAuditLogStore.targetIdFilter;
const object3 = {};
object3.limit = AUDIT_LOG_PAGE_LIMIT;
if (before != null) {
object3.before = before;
}
if (r5 != null) {
object3.user_id = r5;
}
if (r2 != null) {
object3.action_type = r2;
}
if (r0 != null) {
object3.target_id = r0;
}
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object4 = {};
object4.url = Endpoints.GUILD_AUDIT_LOG(a0);
object4.query = object3;
object4.oldFormErrors = true;
object4.rejectWithError = true;
return Reflect.apply(get, HTTP, [object4]);
}
function fetchLogs(a0, a1, a2, a3) { // fn#122614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:618, offset: 0x0256dd49, size: 132 bytes, params: 5, frame: 17
if (isLoading()) {
return undefined;
}
if (a0 == null) {
return undefined;
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIT_LOG_FETCH_START'});
return makeRequest_122613(a0, {userId: a1, action: a3, targetId: a2}).then(_fun122615, _fun122616);
}
function fetchNextLogPage(a0) { // fn#122617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:1276, offset: 0x0256de8d, size: 196 bytes, params: 2, frame: 19
var id;
var value2;
var logs;
var property;
const value = a1;
if (GuildSettingsAuditLogStore.hasOlderLogs) {
if (isLoading()) {
return undefined;
}
value2 = null;
if (value2 == a0) {
return undefined;
}
logs = GuildSettingsAuditLogStore.logs;
property = logs[logs.length - 1];
id = value2 != property ? property.id : value2;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIT_LOG_FETCH_NEXT_PAGE_START',
before: id, isGroupedFetch: value !== undefined ? value : false});
return makeRequest_122613(a0, {before: id}).then(_fun122618, _fun122619);
}
}
function _fun122615({body}) { // fn#122615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:779, offset: 0x0256ddcd, size: 143 bytes, params: 2, frame: 21
const audit_log_entries = body.audit_log_entries;
const integrations = body.integrations;
const users = body.users;
const webhooks = body.webhooks;
const guild_scheduled_events = body.guild_scheduled_events;
const auto_moderation_rules = body.auto_moderation_rules;
const threads = body.threads;
const application_commands = body.application_commands;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIT_LOG_FETCH_SUCCESS', logs: audit_log_entries, integrations: integrations, users: users,
webhooks: webhooks, guildScheduledEvents: guild_scheduled_events, automodRules: auto_moderation_rules,
threads: threads, applicationCommands: application_commands});
}
function _fun122616() { // fn#122616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:1113, offset: 0x0256de5c, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIT_LOG_FETCH_FAIL'});
}
function _fun122618({body}) { // fn#122618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:1530, offset: 0x0256df51, size: 143 bytes, params: 2, frame: 21
const audit_log_entries = body.audit_log_entries;
const integrations = body.integrations;
const users = body.users;
const webhooks = body.webhooks;
const guild_scheduled_events = body.guild_scheduled_events;
const auto_moderation_rules = body.auto_moderation_rules;
const threads = body.threads;
const application_commands = body.application_commands;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS', logs: audit_log_entries, integrations: integrations,
users: users, webhooks: webhooks, guildScheduledEvents: guild_scheduled_events,
automodRules: auto_moderation_rules, threads: threads, applicationCommands: application_commands});
}
function _fun122619() { // fn#122619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16096:1874, offset: 0x0256dfe0, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIT_LOG_FETCH_NEXT_PAGE_FAIL'});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,282 @@
/* Metro module 6779; source: actions/AuthorizedAppsActionCreators.tsx; dependencies: [5, 5109, 661, 4041, 694, 507, 2] */
function _fun53407(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:6, offset: 0x01347e61, size: 284 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const _arrayLikeToArray_53410 = 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 tokensToAppTokensMap = function(a0, a1) {
var r0;
var r2;
var value2;
var value7;
var property = global.Object;
var fromEntries = property.fromEntries;
reducibleJoin2: while (true) {
if (a1 == null) {
r0 = undefined;
break reducibleJoin2;
}
value2 = a1.map(_fun53412);
r0 = value2;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0 != null) {
break reducibleJoin4;
}
r0 = [];
break reducibleJoin4;
}
var value3 = Reflect.apply(fromEntries, property, [r0]);
var value5 = _createForOfIteratorHelperLoose_53408(a0);
var value6 = value5();
if (!value6.done) {
r2 = value6;
reducibleLoop5: while (true) {
property = r2.value;
value3[property.application.id] = property;
value7 = value5();
if (value7.done) {
break reducibleLoop5;
}
r2 = value7;
continue reducibleLoop5;
}
}
return value3;
};
const closure = function() {
return _fetchAuthorizedApps.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const env0_5 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).FetchState;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const BatchInvocationManager = (require(4041) /* metro dependency 4041: Timers */).BatchInvocationManager;
const batchInvocationManager = new BatchInvocationManager(closure, function(a0) {
return AuthorizedAppsStore.getFetchStateForApplication(a0) !== FetchState.FETCHING;
});
object2 = {fetch: fetch_53420, delete: _fun53421};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/AuthorizedAppsActionCreators.tsx');
exports.default = object2;
}
function _createForOfIteratorHelperLoose_53408(a0, a1) { // fn#53408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:163, offset: 0x01347f7d, size: 370 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 _fun53409;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_53410(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_53410(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_53410(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun53409;
}
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 tokensToAppTokensMap(a0, a1) { // fn#53411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:1188, offset: 0x013480ef, size: 123 bytes, params: 3, frame: 16
var r0;
var r2;
var map;
var value2;
var value7;
var application;
var id;
var value8;
const Object = global.Object;
const fromEntries = Object.fromEntries;
reducibleJoin2: while (true) {
if (a1 == null) {
r0 = undefined;
break reducibleJoin2;
}
map = a1.map;
value2 = Reflect.apply(map, a1, [function(a0) {
return [a0, null];
}]);
r0 = value2;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0 != null) {
break reducibleJoin4;
}
r0 = [];
break reducibleJoin4;
}
const value3 = Reflect.apply(fromEntries, Object, [r0]);
const value5 = _createForOfIteratorHelperLoose_53408(a0);
const value6 = value5();
let done = value6.done;
if (!done) {
r2 = value6;
reducibleLoop5: while (true) {
value7 = r2.value;
application = value7.application;
id = application.id;
value3[id] = value7;
value8 = value5();
done = value8.done;
if (done) {
break reducibleLoop5;
}
r2 = value8;
continue reducibleLoop5;
}
}
return value3;
}
function _fetchAuthorizedApps() { // fn#53414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:1487, offset: 0x0134817d, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun53416).apply(this, arguments);
}
function fetch_53420(a0) { // fn#53420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:2082, offset: 0x01348374, size: 85 bytes, params: 2, frame: 12
const fetchState = AuthorizedAppsStore.getFetchState();
const FETCHING = FetchState.FETCHING;
if (fetchState !== FETCHING) {
if (a0 != null) {
env0_7.queue(a0);
} else {
env0_7.reset();
fetchAuthorizedApps();
}
}
}
function _fun53421(a0) { // fn#53421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:2179, offset: 0x013483c9, size: 101 bytes, params: 2, frame: 16
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.OAUTH2_TOKEN(a0);
Reflect.apply(del, HTTP, [object2]).then(_fun53422);
}
function* _fun53416(a0) { // fn#53416, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:1550, offset: 0x013481b6, size: 220 bytes, params: 2, frame: 20
var environment;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
env2_1(env2_2[4]).dispatch({type: 'USER_AUTHORIZED_APPS_REQUEST',
request: a0 == null ? {type: 'full'} : {type: 'partial', applicationIds: a0}});
var HTTP = env2_0(env2_2[5]).HTTP;
var get = HTTP.get;
var OAUTH2_TOKENS = env2_6.OAUTH2_TOKENS;
value = Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': true,
url: OAUTH2_TOKENS,
query: {application_ids: a0}}]);
yield value.then(_fun53417, _fun53418);
}
}
function _fun53422() { // fn#53422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:2274, offset: 0x0134842e, size: 21 bytes, params: 1, frame: 9
env0_0.fetch();
}
function _fun53417({body}) { // fn#53417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:1798, offset: 0x01348292, size: 88 bytes, params: 2, frame: 16
let binding = env3_1;
const value2 = binding(env3_2[4]);
const dispatch = value2.dispatch;
const object2 = {type: 'USER_AUTHORIZED_APPS_UPDATE'};
binding = env0_0;
object2.isFullFetch = binding == null;
object2.tokens = env3_10(body, binding);
return Reflect.apply(dispatch, value2, [object2]);
}
function _fun53418() { // fn#53418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6957:1916, offset: 0x013482ea, size: 101 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[4]).dispatch({type: 'USER_AUTHORIZED_APPS_REQUEST_FAILED',
request: env0_0 == null ? {type: 'full'} : {type: 'partial', applicationIds: env0_0}});
}
File diff suppressed because it is too large. Load diff
+129
View File
@@ -0,0 +1,129 @@
/* Metro module 8916; source: actions/CallActionCreators.tsx; dependencies: [1379, 3793, 1878, 661, 4796, 507, 683, 4647, 1244, 8783, 8917, 694, 2] */
function _fun69582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:6, offset: 0x01c77542, size: 232 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.Endpoints;
const env0_7 = constantsModule.AnalyticEvents;
const env0_8 = constantsModule.ChannelTypesSets;
const env0_9 = constantsModule.ChannelTypes;
object2 = {call: call_69583, ring: ring, stopRinging: function(a0, a1) {
var HTTP = require(dependencyMap[5]).HTTP;
var object = {};
object.url = Endpoints.CALL_STOP_RINGING(a0);
object.body = {recipients: a1};
object.oldFormErrors = true;
object.rejectWithError = true;
return HTTP.post(object);
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CallActionCreators.tsx');
exports.default = object2;
}
function call_69583(a0, a1, a2, a3, a4) { // fn#69583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:210, offset: 0x01c7762a, size: 214 bytes, params: 6, frame: 16
var HTTP;
var get;
var object2;
const env0_1 = a0;
const env0_2 = a1;
const env0_3 = a2;
const env0_4 = a3;
const env0_5 = a4;
if (a3 != null) {
if (RelationshipStore.isBlocked(a3)) {
return undefined;
}
var env0_7 = UserStore.getUser(a3);
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
get = HTTP.get;
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.CALL(a0);
Reflect.apply(get, HTTP, [object2]).then(function(a0) {
doCall(importDefault && a0.body.ringable);
}, _fun69586);
} else {
doCall(a2);
}
}
function ring(a0, a1, a2) { // fn#69588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:870, offset: 0x01c7792a, size: 324 bytes, params: 4, frame: 19
var object2;
var HTTP;
var post;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
var canRingUsersInChannel2 = (require(8917) /* metro dependency 8917: useCanRing */).canRingUsersInChannel(channel);
var CALLABLE = ChannelTypesSets.CALLABLE;
var value3 = CALLABLE.has(channel.type);
if (canRingUsersInChannel2) {
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
post = HTTP.post;
object2 = {};
object2.url = Endpoints.CALL_RING(a0);
object2.body = {recipients: a1, analytics_location: a2};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
if (channel.type === ChannelTypes.GUILD_VOICE && a1 != null) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_LOCAL_RING_START',
ringing: a1,
guildId: channel.guild_id});
}
return undefined;
}
if (value3) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CALL_ENQUEUE_RING',
channelId: a0,
recipients: a1});
}
}
}
function doCall(a0) { // fn#69584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:237, owner: call_69583.doCall, offset: 0x01c77700, size: 98 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
value.selectVoiceChannel(env0_1, require);
if (a0) {
env0_0.ring(env0_1);
}
if (env0_5 != null) {
env0_5(env0_1);
}
}
function _fun69586() { // fn#69586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:470, offset: 0x01c77789, size: 350 bytes, params: 1, frame: 22
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {'type': 'Not Friend', 'source': 'Call'}]);
const defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport2.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const My50nf = t.My50nf;
object2.title = Reflect.apply(string, intl, [My50nf]);
const format = intl.format;
const IdKo2z = t.IdKo2z;
const username = env0_7 != null ? env0_7.username : '';
object2.body = Reflect.apply(format, intl, [IdKo2z, {username: username}]);
object2.confirmText = intl.string(t['PMsq/b']);
string = intl.string;
const BddRzS = t.BddRzS;
object2.cancelText = Reflect.apply(string, intl, [BddRzS]);
object2.onConfirm = onConfirm_69587;
Reflect.apply(show, defaultImport2, [object2]);
}
function onConfirm_69587() { // fn#69587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:774, offset: 0x01c778e7, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).addRelationship({userId: importAll,
context: {location: 'Call'}});
}
@@ -0,0 +1,27 @@
/* Metro module 11359; source: actions/CategoryCollapseActionCreators.tsx; dependencies: [694, 2] */
function _fun87024(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11545:6, offset: 0x01fac150, size: 142 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CategoryCollapseActionCreators.tsx');
exports.categoryCollapse = categoryCollapse;
exports.categoryExpand = categoryExpand;
exports.categoryCollapseAll = categoryCollapseAll;
exports.categoryExpandAll = categoryExpandAll;
}
function categoryCollapse(a0) { // fn#87025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11545:187, offset: 0x01fac1de, size: 53 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CATEGORY_COLLAPSE', id: a0});
}
function categoryExpand(a0) { // fn#87026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11545:284, offset: 0x01fac213, size: 53 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CATEGORY_EXPAND', id: a0});
}
function categoryCollapseAll(a0) { // fn#87027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11545:382, offset: 0x01fac248, size: 53 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CATEGORY_COLLAPSE_ALL', guildId: a0});
}
function categoryExpandAll(a0) { // fn#87028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11545:494, offset: 0x01fac27d, size: 53 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CATEGORY_EXPAND_ALL', guildId: a0});
}
@@ -0,0 +1,13 @@
/* Metro module 13020; source: actions/CertifiedDeviceActionCreators.tsx; dependencies: [694, 2] */
function _fun99385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13210:6, offset: 0x021c66ad, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CertifiedDeviceActionCreators.tsx');
exports.setCertifiedDevices = setCertifiedDevices;
}
function setCertifiedDevices(a0, a1) { // fn#99386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13210:189, offset: 0x021c6710, size: 61 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CERTIFIED_DEVICES_SET',
applicationId: a0, devices: a1});
}
+650
View File
@@ -0,0 +1,650 @@
/* Metro module 8338; source: actions/ChangeLogActionCreators.tsx; dependencies: [5, 4604, 661, 1933, 694, 3829, 507, 2] */
function _fun66388(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:6, offset: 0x01bf9aae, size: 272 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const cacheBustParam = function() {
var value2 = new global.Date();
value2 = value2.getMinutes();
value2 = global.Math.floor(value2 / 5);
return 'x=' + value2;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const changelogStore = importDefault(4604) /* metro dependency 4604: ChangelogStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const env0_6 = (require(1933) /* metro dependency 1933: ChangelogConstants */).ChangelogPlatforms;
object2 = {lockChangeLog: lockChangeLog, unlockChangeLog: unlockChangeLog, markChangelogAsSeen: function(a0, a1) {
importDefault(dependencyMap[4]).dispatch({type: 'CHANGE_LOG_MARK_SEEN', changelogId: a0, changelogDate: a1});
var LastReceivedChangelogId = require(dependencyMap[5]).LastReceivedChangelogId;
LastReceivedChangelogId.updateSetting(a0);
}, setChangelogOverride: setChangelogOverride, sendChangelogMessage: function(a0) {
var HTTP = require(dependencyMap[6]).HTTP;
HTTP.post({url: Endpoints.CHANGELOG_MESSAGES, body: {changelog_id: a0}, rejectWithError: true});
}, fetchChangelogConfig: fetchChangelogConfig, fetchChangelog: fetchChangelog};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChangeLogActionCreators.tsx');
exports.default = object2;
}
function lockChangeLog(a0) { // fn#66390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:257, offset: 0x01bf9c14, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANGE_LOG_LOCK', key: a0});
}
function unlockChangeLog(a0) { // fn#66391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:324, offset: 0x01bf9c4c, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANGE_LOG_UNLOCK', key: a0});
}
function setChangelogOverride(a0) { // fn#66393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:548, offset: 0x01bf9ce6, size: 76 bytes, params: 2, frame: 15
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANGE_LOG_SET_OVERRIDE', id: a0});
if (a0 != null) {
this.sendChangelogMessage(a0);
}
}
function fetchChangelogConfig() { // fn#66395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:779, offset: 0x01bf9d81, size: 104 bytes, params: 1, frame: 18
const MOBILE = ChangelogPlatforms.MOBILE;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {};
object2.url = 'https://cdn.discordapp.com/changelogs/config_' + MOBILE + '.json?' + cacheBustParam();
object2.rejectWithError = true;
return Reflect.apply(get, HTTP, [object2]);
}
function fetchChangelog(a0, a1) { // fn#66396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:945, offset: 0x01bf9de9, size: 76 bytes, params: 3, frame: 13
const value = a2;
const value2 = a3;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = value !== undefined ? value : false;
return (value2 !== undefined ? value2 : false)(_fun66398)();
}
function* _fun66398() { // fn#66398, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8523:996, offset: 0x01bf9e40, size: 426 bytes, params: 1, frame: 30
var r3;
var concat;
var binding2;
var property;
var value9;
var HTTP;
var get;
var object2;
var value10;
var value11;
var value12;
var value13;
var binding3;
var value14;
var dispatch;
var body;
var error;
var fetchChangelog;
var value15;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_4;
const changelog = binding.getChangelog(require, importDefault);
const value5 = null;
if (value5 != changelog) {
return value5;
}
binding = env2_6;
const r4 = dependencyMap ? binding.DESKTOP : binding.MOBILE;
const r42 = env1_3 ? '' : '?' + env2_7();
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
property = binding2[6];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
HTTP = value9.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
value10 = Reflect.apply(concat, 'https://cdn.discordapp.com/changelogs/', [r4, '/', require, '/', importDefault,
'.json', r42]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2.url = value10;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
value11 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
yield value11;
try {
value12 = undefined;
value13 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
if (value13) {
return value12;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
property = binding3[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
value14 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
dispatch = value14.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2.type = 'CHANGE_LOG_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2.id = require;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
body = value12.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
object2.changelog = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
Reflect.apply(dispatch, value14, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
try {
body = value12.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'CHANGE_LOG_FETCH_FAILED', id: require, locale: importDefault});
if (importDefault === 'en-US') {
return value5;
}
fetchChangelog = ChangelogStore.fetchChangelog;
yield Reflect.apply(fetchChangelog, ChangelogStore, [require, 'en-US']);
value = undefined;
value15 = false;
if (value15) {
return value;
}
r3 = value;
return r3;
}
return body;
}
@@ -0,0 +1,52 @@
/* Metro module 7874; source: actions/ChangeNicknameActionCreators.tsx; dependencies: [661, 507, 7067, 1244, 2] */
function _fun63122(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8052:6, offset: 0x01b711f6, size: 129 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(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {changeNickname: changeNickname};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChangeNicknameActionCreators.tsx');
exports.default = object2;
}
function changeNickname(a0, a1, a2, a3) { // fn#63123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8052:134, offset: 0x01b71277, size: 132 bytes, params: 5, frame: 18
const env0_0 = a1;
const env0_1 = a3;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = Endpoints.GUILD_MEMBER_NICK(a0, a2);
object2.body = {nick: a3};
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object2]).then(_fun63124, _fun63125);
}
function _fun63124({body}) { // fn#63124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8052:252, offset: 0x01b712fb, size: 215 bytes, params: 2, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const nick = body.nick;
const defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
defaultImport.sendBotMessage(require,
importAll == null ? intl.string(t.Vhpd9A) : importAll !== '' ? intl.formatToMarkdownString(t['gz+HRq'],
{nick: importAll}) : intl.string(t.Vhpd9A));
}
function _fun63125({status}) { // fn#63125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8052:419, offset: 0x01b713d2, size: 218 bytes, params: 2, frame: 18
var value;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport2;
if (status === 403) {
value = environment.__proto__;
defaultImport2 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
defaultImport2.sendBotMessage(require, intl.formatToMarkdownString(t.Izf9jO, {}));
} else {
value = environment.__proto__;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
defaultImport.sendBotMessage(require, intl.string(t['5LO/Ss']));
}
}
@@ -0,0 +1,87 @@
/* Metro module 15981; source: actions/ChangeVanityURLActionCreators.tsx; dependencies: [661, 694, 507, 2] */
function _fun123621(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:6, offset: 0x025957c6, size: 183 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(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {openModal: openModal, closeModal: closeModal_123623, removeVanityURL: removeVanityURL,
changeVanityURL: changeVanityURL, setVanityURL: setVanityURL};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChangeVanityURLActionCreators.tsx');
exports.default = object2;
}
function openModal(a0, a1) { // fn#123622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:119, offset: 0x0259587d, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANGE_VANITY_URL_MODAL_OPEN',
guildId: a0, code: a1});
}
function closeModal_123623() { // fn#123623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:208, offset: 0x025958bc, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANGE_VANITY_URL_MODAL_CLOSE'});
}
function removeVanityURL(a0) { // fn#123624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:295, offset: 0x025958ed, size: 109 bytes, params: 2, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = Endpoints.GUILD_VANITY_URL(a0);
object2.body = {code: null};
object2.oldFormErrors = true;
object2.rejectWithError = true;
return Reflect.apply(patch, HTTP, [object2]).then(_fun123625);
}
function changeVanityURL(a0, a1) { // fn#123626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:487, offset: 0x0259598d, size: 163 bytes, params: 3, frame: 17
var object2;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANGE_VANITY_URL_MODAL_SUBMIT'});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
object2 = {};
object2.url = Endpoints.GUILD_VANITY_URL(a0);
object2.body = {code: a1};
object2.oldFormErrors = true;
object2.rejectWithError = true;
return Reflect.apply(patch, HTTP, [object2]).then(_fun123627, _fun123628);
}
function setVanityURL(a0, a1) { // fn#123629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:910, offset: 0x02595acf, size: 120 bytes, params: 3, frame: 16
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = Endpoints.GUILD_VANITY_URL(a0);
object2.body = {code: a1};
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object2]).then(_fun123630, _fun123631);
}
function _fun123625() { // fn#123625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:405, offset: 0x0259595a, size: 51 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'GUILD_SETTINGS_SET_VANITY_URL',
'code': null, 'uses': 0});
}
function _fun123627({body}) { // fn#123627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:677, offset: 0x02595a30, size: 94 bytes, params: 2, frame: 15
const code = body.code;
const uses = body.uses;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses});
env0_0.closeModal();
}
function _fun123628(a0) { // fn#123628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:796, offset: 0x02595a8e, size: 65 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'CHANGE_VANITY_URL_MODAL_SUBMIT_FAILURE',
'error': null, 'hasError': true, error: a0.body});
return a0;
}
function _fun123630({body}) { // fn#123630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:1021, offset: 0x02595b47, size: 77 bytes, params: 2, frame: 15
const code = body.code;
const uses = body.uses;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,22 @@
/* Metro module 12152; source: actions/ChannelCollapseActionCreators.tsx; dependencies: [4864, 694, 6612, 2] */
function _fun93218(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12338:6, offset: 0x020ab069, size: 133 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
object2 = {update: update_93219, toggleCollapseGuild: toggleCollapseGuild};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChannelCollapseActionCreators.tsx');
exports.default = object2;
}
function update_93219(a0) { // fn#93219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12338:109, offset: 0x020ab0ee, size: 54 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_COLLAPSE', channelId: a0});
}
function toggleCollapseGuild(a0) { // fn#93220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12338:176, offset: 0x020ab124, size: 103 bytes, params: 2, frame: 18
(importDefault(6612) /* metro dependency 6612: UserGuildSettingsManager */).saveUserGuildSettings(a0,
{hide_muted_channels: !UserGuildSettingsStore.isGuildCollapsed(a0)});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_TOGGLE_COLLAPSE_MUTED',
guildId: a0});
}
@@ -0,0 +1,236 @@
/* Metro module 11166; source: actions/ChannelFollowerActionCreators.tsx; dependencies: [5, 661, 507, 694, 2] */
function _fun85255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11352:6, offset: 0x01f69009, size: 187 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {createChannelFollower: function(a0, a1) {
var HTTP = require(dependencyMap[2]).HTTP;
var object = {};
object.url = Endpoints.CHANNEL_FOLLOWERS(a1);
object.body = {webhook_channel_id: a0};
object.oldFormErrors = true;
object.rejectWithError = false;
return HTTP.post(object);
}, fetchChannelFollowerStats: fetchChannelFollowerStats, dismissPublishBump: dismissPublishBump,
permanentlyHidePublishBump: permanentlyHidePublishBump};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChannelFollowerActionCreators.tsx');
exports.default = object2;
}
function fetchChannelFollowerStats(a0) { // fn#85257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11352:298, offset: 0x01f69122, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun85259)();
}
function dismissPublishBump(a0) { // fn#85260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11352:682, offset: 0x01f69260, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_FOLLOWING_PUBLISH_BUMP_DISMISSED',
messageId: a0});
}
function permanentlyHidePublishBump(a0) { // fn#85261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11352:785, offset: 0x01f69298, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_FOLLOWING_PUBLISH_BUMP_HIDE_PERMANENTLY',
channelId: a0});
}
function* _fun85259() { // fn#85259, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11352:304, offset: 0x01f69151, size: 271 bytes, params: 1, frame: 19
var object4;
var binding2;
var property;
var value4;
var HTTP;
var get;
var CHANNEL_FOLLOWER_STATS;
var value6;
var object3;
var value7;
var value8;
var value9;
var binding3;
var value10;
var body;
var error;
var value11;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[3]);
var dispatch = value3.dispatch;
Reflect.apply(dispatch, value3, [{type: 'CHANNEL_FOLLOWER_STATS_FETCH_START'}]);
reducibleJoin3: while (true) {
reduciblePort41: while (true) {
exceptionLanding40: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding40;
}
break reducibleJoin3;
}
binding = env2_1;
value = binding(env2_2[3]);
dispatch = value.dispatch;
value11 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'CHANNEL_FOLLOWER_STATS_FETCH_FAILURE', channelId: require}]);
break reduciblePort41;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding40;
}
try {
property = binding2[2];
} catch (error) {
break exceptionLanding40;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding40;
}
try {
HTTP = value4.HTTP;
} catch (error) {
break exceptionLanding40;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding40;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding40;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding40;
}
try {
CHANNEL_FOLLOWER_STATS = binding.CHANNEL_FOLLOWER_STATS;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
value6 = Reflect.apply(CHANNEL_FOLLOWER_STATS, binding, [require]);
} catch (error) {
break exceptionLanding40;
}
try {
object4.url = value6;
} catch (error) {
break exceptionLanding40;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding40;
}
try {
object3.channel_id = require;
} catch (error) {
break exceptionLanding40;
}
try {
object4.body = object3;
} catch (error) {
break exceptionLanding40;
}
try {
object4.oldFormErrors = true;
} catch (error) {
break exceptionLanding40;
}
try {
object4.rejectWithError = true;
} catch (error) {
break exceptionLanding40;
}
try {
value7 = Reflect.apply(get, HTTP, [object4]);
} catch (error) {
break exceptionLanding40;
}
yield value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding40;
}
if (value9) {
return value8;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding40;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding40;
}
try {
property = binding3[3];
} catch (error) {
break exceptionLanding40;
}
try {
value10 = binding(property);
} catch (error) {
break exceptionLanding40;
}
try {
dispatch = value10.dispatch;
} catch (error) {
break exceptionLanding40;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding40;
}
try {
object4.type = 'CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS';
} catch (error) {
break exceptionLanding40;
}
try {
body = value8.body;
} catch (error) {
break exceptionLanding40;
}
try {
object4.stats = body;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
object4.channelId = require;
} catch (error) {
break exceptionLanding40;
}
try {
Reflect.apply(dispatch, value10, [object4]);
} catch (error) {
break exceptionLanding40;
}
}
}
@@ -0,0 +1,286 @@
/* Metro module 11168; source: actions/ChannelPinActionCreators.tsx; dependencies: [5, 11169, 661, 7153, 507, 4131, 1244, 4647, 694, 2] */
function _fun85264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:6, offset: 0x01f6941e, size: 242 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const channelPinsStore = importDefault(11169) /* metro dependency 11169: ChannelPinsStore */;
const env0_5 = (require(11169) /* metro dependency 11169: ChannelPinsStore */).FetchState;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.AbortCodes;
const env0_7 = constantsModule.Endpoints;
const env0_8 = constantsModule.MAX_PINS_PER_CHANNEL;
object2 = {pinMessage: pinMessage, unpinMessage: unpinMessage, ackPins: ackPins, fetchPins: fetchPins};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChannelPinActionCreators.tsx');
exports.default = object2;
}
function pinMessage(a0, a1) { // fn#85265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:221, offset: 0x01f69510, size: 43 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun85267)();
}
function unpinMessage(a0, a1) { // fn#85269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:1572, offset: 0x01f69aad, size: 43 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun85271)();
}
function ackPins(a0) { // fn#85273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:1981, offset: 0x01f69cb4, size: 54 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_PINS_ACK', channelId: a0});
}
function fetchPins(a0, a1) { // fn#85274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:2049, offset: 0x01f69cea, size: 442 bytes, params: 3, frame: 23
var r2;
var pins;
var object3;
var HTTP;
var get;
var object4;
const env0_0 = a0;
const value = undefined;
const reset = a1 == null ? value : a1.reset;
const r11 = reset != null && reset;
const r7 = (a1 == null ? value : a1.limit) ?? 25;
const before = a1 == null ? value : a1.before;
if (r11) {
r2 = r11;
} else {
pins = ChannelPinsStore.getPins(a0);
r2 = pins == null || FetchState.FAILED === pins.state || !(FetchState.LOADING === pins.state || FetchState.LOADED_FINISHED === pins.state) && (FetchState.LOADED_HAS_MORE !== pins.state ? value : before == null ? pins.items.length === 0 : pins.items.at(-1).pinnedAt === before);
}
if (r2) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_PINNED_MESSAGES',
channelId: a0,
reset: r11});
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
get = HTTP.get;
object3 = {'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': true};
object3.url = Endpoints.PINS(a0);
object4 = {limit: r7};
object4.before = before == null ? value : before.toISOString();
object3.query = object4;
Reflect.apply(get, HTTP, [object3]).then(_fun85275, _fun85276);
}
return value;
}
function* _fun85267() { // fn#85267, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:231, offset: 0x01f69546, size: 183 bytes, params: 1, frame: 20
var environment;
if (true) {
var env0_0;
value = environment.__proto__;
var id = require.id;
env0_0 = require.name;
var value4 = env2_1(env2_2[3]);
yield value4.unarchiveThreadIfNecessary(require.id);
if (false) {
return undefined;
}
var HTTP = env2_0(env2_2[4]).HTTP;
var put = HTTP.put;
var object2 = {};
object2.url = env2_7.PIN(id, importDefault);
object2.rejectWithError = true;
Reflect.apply(put, HTTP, [object2]).catch(_fun85268);
}
}
function* _fun85271() { // fn#85271, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:1582, offset: 0x01f69ae3, size: 178 bytes, params: 1, frame: 19
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[3]);
yield value3.unarchiveThreadIfNecessary(require.id);
if (false) {
return undefined;
}
var HTTP = env2_0(env2_2[4]).HTTP;
var del = HTTP.del;
binding = env2_7;
var PIN = binding.PIN;
Reflect.apply(del, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': true, url: Reflect.apply(PIN,
binding, [require.id, importDefault])}]).catch(_fun85272);
}
}
function _fun85275(a0) { // fn#85275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:2634, offset: 0x01f69ea4, size: 93 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_PINNED_MESSAGES_SUCCESS',
pins: a0.body.items, channelId: env0_0, hasMore: a0.body.has_more});
}
function _fun85276() { // fn#85276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:2751, offset: 0x01f69f01, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_PINNED_MESSAGES_FAILURE',
channelId: env0_0});
}
function _fun85268(a0) { // fn#85268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:371, offset: 0x01f695fd, size: 1200 bytes, params: 2, frame: 21
var r1;
var r6;
var r7;
var binding3;
var value6;
var anyErrorMessage;
var binding4;
var binding5;
var value9;
var binding6;
var value11;
var binding7;
var value13;
var binding8;
var value15;
var binding9;
var value17;
var binding10;
var value19;
var value20;
var isPrivate2;
var binding11;
var formatToPlainString;
let binding = env3_0;
const binding2 = env3_2;
const APIError = binding(binding2[5]).APIError;
const aPIError = new APIError(a0);
const code = aPIError.code;
let intl = binding(binding2[6]).intl;
let string = intl.string;
let t = binding(binding2[6]).t;
const value4 = Reflect.apply(string, intl, [t.j2d6Km]);
intl = binding(binding2[6]).intl;
if (code == null) {
r6 = intl.string(binding(binding2[6]).t.fEptJP);
r7 = value4;
} else if (env3_6.TOO_MANY_PINS_IN_CHANNEL === code) {
binding = env3_0;
binding10 = env3_2;
intl = binding(binding10[6]).intl;
string = intl.string;
t = binding(binding10[6]).t;
value19 = Reflect.apply(string, intl, [t.HI88Q3]);
value20 = environment.__proto__.__proto__;
isPrivate2 = require.isPrivate();
binding = env3_0;
binding11 = env3_2;
intl = binding(binding11[6]).intl;
formatToPlainString = intl.formatToPlainString;
t = binding(binding11[6]).t;
r6 = isPrivate2 ? Reflect.apply(formatToPlainString, intl, [t.Q89oQU,
{maxPins: env3_8}]) : Reflect.apply(formatToPlainString, intl, [t.NnO1S5, {maxPins: env3_8,
channelName: name}]);
r7 = value19;
} else if (env3_6.INVALID_ACCESS === code) {
binding = env3_0;
binding9 = env3_2;
intl = binding(binding9[6]).intl;
string = intl.string;
t = binding(binding9[6]).t;
value17 = Reflect.apply(string, intl, [t['25gfQX']]);
intl = binding(binding9[6]).intl;
string = intl.string;
t = binding(binding9[6]).t;
r6 = Reflect.apply(string, intl, [t.QNnTwN]);
r7 = value17;
} else if (env3_6.INVALID_PIN_MESSAGE_CHANNEL === code) {
binding = env3_0;
binding8 = env3_2;
intl = binding(binding8[6]).intl;
string = intl.string;
t = binding(binding8[6]).t;
value15 = Reflect.apply(string, intl, [t['Q5G6+m']]);
intl = binding(binding8[6]).intl;
string = intl.string;
t = binding(binding8[6]).t;
r6 = Reflect.apply(string, intl, [t['5hgPfC']]);
r7 = value15;
} else if (env3_6.INVALID_THREAD_ARCHIVE_STATE === code) {
binding = env3_0;
binding7 = env3_2;
intl = binding(binding7[6]).intl;
string = intl.string;
t = binding(binding7[6]).t;
value13 = Reflect.apply(string, intl, [t.fu6Lbl]);
intl = binding(binding7[6]).intl;
string = intl.string;
t = binding(binding7[6]).t;
r6 = Reflect.apply(string, intl, [t.FmrcZM]);
r7 = value13;
} else if (env3_6.INVALID_ACTION_SYSTEM_MESSAGE === code) {
binding = env3_0;
binding6 = env3_2;
intl = binding(binding6[6]).intl;
string = intl.string;
t = binding(binding6[6]).t;
value11 = Reflect.apply(string, intl, [t['zV0/FC']]);
intl = binding(binding6[6]).intl;
string = intl.string;
t = binding(binding6[6]).t;
r6 = Reflect.apply(string, intl, [t.C4a7xI]);
r7 = value11;
} else if (env3_6.UNKNOWN_MESSAGE === code) {
binding = env3_0;
binding5 = env3_2;
intl = binding(binding5[6]).intl;
string = intl.string;
t = binding(binding5[6]).t;
value9 = Reflect.apply(string, intl, [t.fkqPro]);
intl = binding(binding5[6]).intl;
string = intl.string;
t = binding(binding5[6]).t;
r6 = Reflect.apply(string, intl, [t.H6fRIg]);
r7 = value9;
} else {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[6]).intl;
value6 = intl.string(binding(binding3[6]).t.HI88Q3);
anyErrorMessage = aPIError.getAnyErrorMessage();
if (anyErrorMessage != null) {
r1 = anyErrorMessage;
} else {
binding = env3_0;
binding4 = env3_2;
intl = binding(binding4[6]).intl;
r1 = intl.string(binding(binding4[6]).t.fEptJP);
}
r6 = r1;
r7 = value6;
}
binding = env3_1;
const binding12 = env3_2;
const value24 = binding(binding12[7]);
const show = value24.show;
const object2 = {title: r7, body: r6};
binding = env3_0;
intl = binding(binding12[6]).intl;
string = intl.string;
const BddRzS = binding(binding12[6]).t.BddRzS;
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
Reflect.apply(show, value24, [object2]);
}
function _fun85272() { // fn#85272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11354:1722, offset: 0x01f69b95, size: 287 bytes, params: 1, frame: 21
let binding = env3_1;
const binding2 = env3_2;
const value2 = binding(binding2[7]);
const show = value2.show;
const object2 = {};
binding = env3_0;
let intl = binding(binding2[6]).intl;
object2.title = intl.string(binding(binding2[6]).t.xFjByk);
intl = binding(binding2[6]).intl;
object2.body = intl.string(binding(binding2[6]).t['0R/Toc']);
intl = binding(binding2[6]).intl;
object2.confirmText = intl.string(binding(binding2[6]).t['7NqTJn']);
intl = binding(binding2[6]).intl;
object2.cancelText = intl.string(binding(binding2[6]).t['ETE/oC']);
const unpinMessage = env3_9.unpinMessage;
object2.onConfirm = unpinMessage.bind(env3_9, require, importDefault);
return Reflect.apply(show, value2, [object2]);
}
@@ -0,0 +1,98 @@
/* Metro module 7712; source: actions/ChannelRTCActionCreators.tsx; dependencies: [661, 694, 683, 4863, 1239, 2] */
function _fun61639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:6, offset: 0x01b46f42, size: 261 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.AppContext;
const env0_4 = constantsModule.AnalyticEvents;
const env0_5 = constantsModule.ComponentActions;
object2 = {rebuildRTCActiveChannels: rebuildRTCActiveChannels, selectParticipant: selectParticipant,
popoutParticipant: popoutParticipant, returnParticipant: returnParticipant, updateLayout: updateLayout,
toggleParticipants: toggleParticipants, toggleVoiceParticipantsHidden: toggleVoiceParticipantsHidden,
updateStageStreamSize: updateStageStreamSize,
updateStageVideoLimitBoostUpsellDismissed: updateStageVideoLimitBoostUpsellDismissed,
updateChatOpen: updateChatOpen, jumpToVoiceChannelMessage: jumpToVoiceChannelMessage};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChannelRTCActionCreators.tsx');
exports.default = object2;
}
function rebuildRTCActiveChannels() { // fn#61640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:164, offset: 0x01b47047, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_ACTIVE_CHANNELS'});
}
function selectParticipant(a0, a1) { // fn#61641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:247, offset: 0x01b47078, size: 61 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_SELECT_PARTICIPANT',
channelId: a0, id: a1});
}
function popoutParticipant(a0, a1) { // fn#61642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:346, offset: 0x01b470b5, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_POPOUT_PARTICIPANT',
channelId: a0, participantId: a1});
}
function returnParticipant(a0, a1) { // fn#61643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:456, offset: 0x01b470f5, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_RETURN_PARTICIPANT',
channelId: a0, participantId: a1});
}
function updateLayout(a0, a1) { // fn#61644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:566, offset: 0x01b47135, size: 163 bytes, params: 3, frame: 21
let value = a2;
const r4 = value !== undefined ? value : AppContext.APP;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const VIDEO_LAYOUT_TOGGLED = AnalyticEvents.VIDEO_LAYOUT_TOGGLED;
const object2 = {video_layout: a1};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, value.collectVoiceAnalyticsMetadata(a0), value);
Reflect.apply(track, defaultImport, [VIDEO_LAYOUT_TOGGLED, object2]);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CHANNEL_RTC_UPDATE_LAYOUT', channelId: a0, layout: a1, appContext: r4});
}
function toggleParticipants(a0, a1) { // fn#61645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:779, offset: 0x01b471d8, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_UPDATE_PARTICIPANTS_OPEN',
channelId: a0, participantsOpen: a1});
}
function toggleVoiceParticipantsHidden(a0, a1) { // fn#61646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:899, offset: 0x01b47218, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_UPDATE_VOICE_PARTICIPANTS_HIDDEN',
channelId: a0, voiceParticipantsHidden: a1});
}
function updateStageStreamSize(a0, a1) { // fn#61647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:1045, offset: 0x01b47258, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_UPDATE_STAGE_STREAM_SIZE',
channelId: a0, large: a1});
}
function updateStageVideoLimitBoostUpsellDismissed(a0, a1) { // fn#61648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:1157, offset: 0x01b47298, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_UPDATE_STAGE_VIDEO_LIMIT_BOOST_UPSELL_DISMISSED',
channelId: a0, dismissed: a1});
}
function updateChatOpen(a0, a1) { // fn#61649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:1316, offset: 0x01b472d8, size: 140 bytes, params: 3, frame: 18
var ComponentDispatch;
const env0_0 = a0;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_UPDATE_CHAT_OPEN',
channelId: a0, chatOpen: a1});
if (a1) {
global.setTimeout(_fun61650, 0);
} else {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.FOCUS_CHAT_BUTTON);
}
}
function jumpToVoiceChannelMessage(a0, a1, a2, a3) { // fn#61651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:1572, offset: 0x01b473a7, size: 78 bytes, params: 5, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_RTC_JUMP_TO_VOICE_CHANNEL_MESSAGE',
guildId: a0, channelId: a1, messageId: a2, jumpType: a3});
}
function _fun61650() { // fn#61650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7890:1429, offset: 0x01b47364, size: 67 bytes, params: 1, frame: 15
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const FOCUS_CHANNEL_TEXT_AREA = ComponentActions.FOCUS_CHANNEL_TEXT_AREA;
Reflect.apply(dispatch, ComponentDispatch, [FOCUS_CHANNEL_TEXT_AREA, {channelId: env0_0}]);
}
@@ -0,0 +1,199 @@
/* Metro module 8148; source: actions/ChannelSettingsActionCreators.tsx; dependencies: [5, 8149, 1379, 661, 694, 4008, 7153, 507, 6931, 2] */
function _fun65285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:6, offset: 0x01bcadbe, size: 369 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const closure = init_65286;
const closure2 = open_65287;
const closure3 = close_65288;
const closure4 = setSection_65289;
const closure5 = selectPermissionOverwrite;
const closure6 = updateChannel_65291;
const closure7 = function() {
return _saveChannel.apply(this, arguments);
};
const closure8 = function() {
return _deleteChannel.apply(this, arguments);
};
const closure9 = function(a0, a1) {
var HTTP = require(dependencyMap[7]).HTTP;
var object = {};
object.url = Endpoints.UPDATE_VOICE_CHANNEL_STATUS(a0);
object.body = {status: a1};
object.rejectWithError = false;
return HTTP.put(object);
};
const closure10 = function(a0) {
var HTTP = require(dependencyMap[7]).HTTP;
var object = {};
object.url = Endpoints.CHANNEL_LINKED_LOBBY(a0);
object.rejectWithError = true;
return HTTP.del(object);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const channelSettingsStore = importDefault(8149) /* metro dependency 8149: ChannelSettingsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.Endpoints;
constantsModule.Layers;
const env0_7 = constantsModule.ChannelSettingsSections;
object2 = {init: closure, open: closure2, close: closure3, setSection: closure4,
selectPermissionOverwrite: closure5, updateChannel: closure6, saveChannel: closure7, deleteChannel: closure8,
updateVoiceChannelStatus: closure9, removeLinkedLobby: closure10};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChannelSettingsActionCreators.tsx');
exports.default = object2;
exports.init = closure;
exports.open = closure2;
exports.close = closure3;
exports.setSection = closure4;
exports.selectPermissionOverwrite = closure5;
exports.updateChannel = closure6;
exports.saveChannel = closure7;
exports.deleteChannel = closure8;
exports.updateVoiceChannelStatus = closure9;
exports.removeLinkedLobby = closure10;
}
function init_65286(a0, a1, a2) { // fn#65286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:189, offset: 0x01bcaf2f, size: 69 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_INIT', channelId: a0,
location: a1, subsection: a2});
}
function open_65287(a0, a1, a2) { // fn#65287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:295, offset: 0x01bcaf74, size: 143 bytes, params: 4, frame: 18
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
init_65286(a0, a1, a2);
rootNavigationRef.navigate('sidebar', {channelId: a0,
initialRouteName: ChannelSettingsStore.getSection() ?? ChannelSettingsSections.OVERVIEW,
source: 'channel-settings-action-creators-open'});
}
}
}
function close_65288() { // fn#65288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:539, offset: 0x01bcb003, size: 47 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_CLOSE'});
}
function setSection_65289(a0) { // fn#65289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:606, offset: 0x01bcb032, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_SET_SECTION',
section: a0});
}
function selectPermissionOverwrite(a0) { // fn#65290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:695, offset: 0x01bcb069, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_OVERWRITE_SELECT',
overwriteId: a0});
}
function updateChannel_65291({name, type, topic, bitrate, userLimit, nsfw, flags, rateLimitPerUser, defaultThreadRateLimitPerUser, defaultAutoArchiveDuration, template, defaultReactionEmoji, rtcRegion, videoQualityMode, autoArchiveDuration, locked, invitable, availableTags, defaultSortOrder, defaultForumLayout, defaultTagSetting, iconEmoji, themeColor}) { // fn#65291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:808, offset: 0x01bcb0a2, size: 300 bytes, params: 2, frame: 36
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'CHANNEL_SETTINGS_UPDATE', name: name, channelType: type, topic: topic, bitrate: bitrate,
userLimit: userLimit, nsfw: nsfw, flags: flags, rateLimitPerUser: rateLimitPerUser,
defaultThreadRateLimitPerUser: defaultThreadRateLimitPerUser,
defaultAutoArchiveDuration: defaultAutoArchiveDuration, template: template,
defaultReactionEmoji: defaultReactionEmoji, rtcRegion: rtcRegion, videoQualityMode: videoQualityMode,
autoArchiveDuration: autoArchiveDuration, locked: locked, invitable: invitable, availableTags: availableTags,
defaultSortOrder: defaultSortOrder, defaultForumLayout: defaultForumLayout,
defaultTagSetting: defaultTagSetting, iconEmoji: iconEmoji, themeColor: themeColor});
}
function _saveChannel() { // fn#65293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:1653, offset: 0x01bcb1ce, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun65295).apply(this, arguments);
}
function _deleteChannel() { // fn#65300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:3350, offset: 0x01bcb5a7, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun65302).apply(this, arguments);
}
async function _fun65295(a0, {name, type, position, topic, bitrate, userLimit, nsfw, flags, permissionOverwrites, rateLimitPerUser, defaultThreadRateLimitPerUser, defaultAutoArchiveDuration, template, defaultReactionEmoji, rtcRegion, videoQualityMode, autoArchiveDuration, locked, invitable, availableTags, defaultSortOrder, defaultForumLayout, defaultTagSetting, iconEmoji, themeColor}) { // fn#65295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:1700, offset: 0x01bcb210, size: 638 bytes, params: 3, frame: 46
var object3;
if (false) {
return undefined;
}
const env0_0 = a0;
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_5;
const env0_1 = binding.getChannel(a0);
binding = env2_1;
const binding2 = env2_2;
binding(binding2[4]).dispatch({type: 'CHANNEL_SETTINGS_SUBMIT'});
const value7 = binding(binding2[6]);
await value7.unarchiveThreadIfNecessary(a0);
if (false) {
return undefined;
}
const HTTP = env2_0(env2_2[7]).HTTP;
const patch = HTTP.patch;
object3 = {};
object3.url = env2_6.CHANNEL(a0);
const object4 = {name: name, type: type, position: position, topic: topic, bitrate: bitrate, user_limit: userLimit,
nsfw: nsfw, flags: flags, permission_overwrites: permissionOverwrites, rate_limit_per_user: rateLimitPerUser,
default_thread_rate_limit_per_user: defaultThreadRateLimitPerUser,
default_auto_archive_duration: defaultAutoArchiveDuration, template: template, rtc_region: rtcRegion,
video_quality_mode: videoQualityMode, auto_archive_duration: autoArchiveDuration, locked: locked,
invitable: invitable};
object4.default_reaction_emoji = defaultReactionEmoji != null ? {emoji_id: defaultReactionEmoji == null ? value : defaultReactionEmoji.emojiId,
emoji_name: defaultReactionEmoji == null ? value : defaultReactionEmoji.emojiName} : defaultReactionEmoji !== null ? value : null;
object4.available_tags = availableTags == null ? value : availableTags.map(function(a0) {
return {id: a0.id, name: a0.name, emoji_id: a0.emojiId, emoji_name: a0.emojiName, moderated: a0.moderated};
});
object4.default_sort_order = defaultSortOrder;
object4.default_forum_layout = defaultForumLayout;
object4.default_tag_setting = defaultTagSetting;
object4.icon_emoji = iconEmoji != null ? {id: iconEmoji.id,
name: iconEmoji.name} : iconEmoji !== null ? value : null;
object4.theme_color = themeColor;
object3.body = object4;
object3.oldFormErrors = true;
object3.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object3]).then(_fun65297, _fun65298);
}
function* _fun65302(a0) { // fn#65302, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:3401, offset: 0x01bcb5e0, size: 208 bytes, params: 2, frame: 18
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_5;
const channel = binding.getChannel(a0);
binding = env2_0;
const value4 = undefined;
const HTTP = binding(env2_2[7]).HTTP;
const del = HTTP.del;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = env2_6.CHANNEL(a0);
yield Reflect.apply(del, HTTP, [object2]);
if (false) {
return undefined;
}
const r6 = channel == null ? value4 : channel.getGuildId();
if (!(r6 == null || channel != null && channel.isThread())) {
env2_1(env2_2[8]).checkGuildTemplateDirty(r6);
}
env2_9();
return value4;
}
function _fun65297(a0) { // fn#65297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:2983, offset: 0x01bcb4c8, size: 161 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
const value2 = undefined;
binding(env3_2[4]).dispatch({type: 'CHANNEL_SETTINGS_SUBMIT_SUCCESS', channelId: env0_0});
const r2 = env0_1 == null ? value2 : env0_1.getGuildId();
if (!(r2 == null || env0_1 != null && env0_1.isThread())) {
env3_1(env3_2[8]).checkGuildTemplateDirty(r2);
}
return a0;
}
function _fun65298(a0) { // fn#65298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8333:3173, offset: 0x01bcb569, size: 62 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[4]).dispatch({type: 'CHANNEL_SETTINGS_SUBMIT_FAILURE', errors: a0.body});
return a0;
}
@@ -0,0 +1,166 @@
/* Metro module 9089; source: actions/ChannelSettingsPermissionsActionCreators.tsx; dependencies: [5, 9090, 694, 4603, 2] */
function _fun71064(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:6, offset: 0x01d13ab2, size: 202 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = saveAndClearPermissionUpdates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ChannelSettingsPermissionsActionCreators.tsx');
exports.updatePermission = function() {
return _updatePermission.apply(this, arguments);
};
exports.selectPermission = selectPermission;
exports.setAdvancedMode = setAdvancedMode;
exports.init = init_71075;
exports.savePermissionUpdates = function(a0, a1, a2) {
return saveAndClearPermissionUpdates(a0, a1, [], a2);
};
exports.saveAndClearPermissionUpdates = closure;
}
function _updatePermission() { // fn#71065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:106, offset: 0x01d13b7c, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun71067).apply(this, arguments);
}
function saveAndClearPermissionUpdates(a0, a1, a2, a3) { // fn#71068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:435, offset: 0x01d13c61, size: 131 bytes, params: 5, frame: 13
let env0_0 = a0;
let env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_SUBMITTING'});
const Promise = global.Promise;
return new Promise(function(a0) {
var env0_0 = a0;
var closure = _fun71070;
var env0_1 = closure;
closure();
}).then(_fun71071);
}
function selectPermission(a0) { // fn#71073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:1145, offset: 0x01d13e40, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION',
id: a0});
}
function setAdvancedMode(a0) { // fn#71074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:1272, offset: 0x01d13e78, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_SET_ADVANCED_MODE',
advancedMode: a0});
}
function init_71075() { // fn#71075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:1397, offset: 0x01d13eb1, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_INIT'});
}
function* _fun71067(a0, a1, a2, a3) { // fn#71067, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:163, offset: 0x01d13bb9, size: 168 bytes, params: 5, frame: 20
if (false) {
return undefined;
}
value = a0.getGuildId();
if (value == null) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[2]);
value.dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION', id: a1, allow: a2, deny: a3});
return undefined;
}
if (a1 !== value) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[2]);
value.dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION', id: a1, allow: a2, deny: a3});
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_0(env2_2[1]);
yield value.checkChattableChannelThresholdMetAfterChannelPermissionDeny(a0, a3, a2);
if (false) {
return undefined;
}
if (value) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[2]);
value.dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION', id: a1, allow: a2, deny: a3});
return undefined;
}
return false;
}
function _fun71069(a0) { // fn#71069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:570, offset: 0x01d13ce4, size: 31 bytes, params: 2, frame: 9
const env0_0 = a0;
chain_71070();
}
function _fun71071() { // fn#71071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:859, offset: 0x01d13e03, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SETTINGS_PERMISSIONS_SAVE_SUCCESS',
silent: importAll});
}
function chain_71070() { // fn#71070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9274:575, offset: 0x01d13d03, size: 256 bytes, params: 1, frame: 14
var value2;
var value3;
var then;
var chain_71070Binding;
var value5;
var value6;
let value = environment.__proto__;
let length = require.length;
if (length !== 0) {
if (require.length > 0) {
value5 = require.pop();
if (value5 == null) {
return chain_71070();
}
value6 = environment.__proto__.__proto__;
value = (importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).updatePermissionOverwrite(env1_0,
value5);
then = value.then;
chain_71070Binding = chain_71070;
Reflect.apply(then, value, [chain_71070Binding, chain_71070Binding]);
return undefined;
}
value2 = importDefault.pop();
if (value2 == null) {
return chain_71070();
}
value3 = environment.__proto__.__proto__;
value = (importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).clearPermissionOverwrite(env1_0,
value2);
then = value.then;
chain_71070Binding = chain_71070;
Reflect.apply(then, value, [chain_71070Binding, chain_71070Binding]);
} else {
length = importDefault.length;
if (length === 0) {
return env0_0();
}
length = require.length;
if (length > 0) {
value5 = require.pop();
if (value5 == null) {
return chain_71070();
}
value6 = environment.__proto__.__proto__;
value = (importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).updatePermissionOverwrite(env1_0,
value5);
then = value.then;
chain_71070Binding = chain_71070;
Reflect.apply(then, value, [chain_71070Binding, chain_71070Binding]);
return undefined;
}
value2 = importDefault.pop();
if (value2 == null) {
return chain_71070();
}
value = (importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).clearPermissionOverwrite(env1_0,
value2);
then = value.then;
chain_71070Binding = chain_71070;
Reflect.apply(then, value, [chain_71070Binding, chain_71070Binding]);
}
}
@@ -0,0 +1,34 @@
/* Metro module 10304; source: actions/CommunicationDisabledActionCreators.tsx; dependencies: [5, 3738, 6593, 2] */
function _fun79978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10490:6, offset: 0x01e68589, size: 121 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
object2 = {setCommunicationDisabledDuration: setCommunicationDisabledDuration};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CommunicationDisabledActionCreators.tsx');
exports.default = object2;
}
function setCommunicationDisabledDuration(a0, a1, a2, a3, a4, a5) { // fn#79979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10490:142, offset: 0x01e68602, size: 71 bytes, params: 7, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a4;
const env0_5 = a5;
return env0_2(_fun79981)();
}
function* _fun79981() { // fn#79981, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10490:160, offset: 0x01e68654, size: 196 bytes, params: 1, frame: 17
var r6;
if (true) {
value = environment.__proto__;
var value3 = null;
r6 = value3 != env1_2 ? env2_0(env2_1[1])().add(env1_2, 's').toISOString() : value3;
var value9 = env2_0(env2_1[2]);
yield value9.setCommunicationDisabledUntil({guildId: importDefault, userId: dependencyMap,
communicationDisabledUntilTimestamp: r6, duration: env1_2, reason: env1_3, location: env1_4,
moderatorReportId: env1_5});
}
}
@@ -0,0 +1,787 @@
/* Metro module 5042; source: actions/ConnectedAccountsActionCreators.tsx; dependencies: [5, 5040, 661, 3, 507, 694, 683, 5043, 5046, 480, 2] */
function _fun43644(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:6, offset: 0x01157e24, size: 403 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = callback_43645;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_5 = value.AbortCodes;
const env0_6 = value.Endpoints;
const env0_7 = value.FRIEND_SYNC_PLATFORM_TYPES;
const env0_8 = value.AnalyticEvents;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ConnectedAccounts');
object2 = {fetch: fetch_43646, authorize: authorize, callback: closure, connect: connect, disconnect: function(a0,
a1) {
var HTTP = require(dependencyMap[4]).HTTP;
var object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object.url = Endpoints.CONNECTION(a0, a1);
return HTTP.del(object);
}, refresh: function(a0, a1) {
var HTTP = require(dependencyMap[4]).HTTP;
var object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object.url = Endpoints.CONNECTION_REFRESH(a0, a1);
return HTTP.post(object);
}, setVisibility: function(a0, a1, a2) {
return this.update(a0, a1, {visibility: a2 === 1});
}, setMetadataVisibility: function(a0, a1, a2) {
return this.update(a0, a1, {metadata_visibility: a2 === 1});
}, setFriendSync: function(a0, a1, a2) {
return this.update(a0, a1, {friend_sync: a2});
}, setShowActivity: function(a0, a1, a2) {
return this.update(a0, a1, {show_activity: a2});
}, update: update, joinServer: joinServer, refreshAccessToken: refreshAccessToken,
linkDispatchAuthCallback: function(a0, a1) {
var HTTP = require(dependencyMap[4]).HTTP;
var object = {};
object.url = Endpoints.CONNECTIONS_LINK_DISPATCH_AUTH_CALLBACK(a0);
var object2 = {};
copyDataProperties(object2, a1, Endpoints);
object.body = object2;
object.oldFormErrors = true;
object.rejectWithError = false;
return HTTP.post(object);
}, completeTwoWayLink: completeTwoWayLink, sessionHandoff: function(a0, a1, a2, a3, a4) {
var HTTP = require(dependencyMap[4]).HTTP;
var object = {};
object.url = Endpoints.CONNECTIONS_SESSION_HANDOFF(a0);
object.body = {state: a1, code: a2, openid_params: a3, iss: a4};
object.oldFormErrors = true;
object.rejectWithError = false;
return HTTP.post(object);
}, getHandoffStatus: getHandoffStatus};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ConnectedAccountsActionCreators.tsx');
exports.default = object2;
}
function callback_43645(a0, a1) { // fn#43645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:241, offset: 0x01157fb7, size: 137 bytes, params: 3, frame: 17
const value = a2;
const r7 = value !== undefined ? value : false;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const object3 = {};
object3.url = Endpoints.CONNECTIONS_CALLBACK(a0);
const object4 = {};
copyDataProperties(object4, a1, r7);
object4['insecure'] = r7;
object4['friend_sync'] = FRIEND_SYNC_PLATFORM_TYPES.has(a0);
object3.body = object4;
object3.oldFormErrors = true;
object3.rejectWithError = false;
return Reflect.apply(post, HTTP, [object3]);
}
function fetch_43646() { // fn#43646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:420, offset: 0x01158040, size: 91 bytes, params: 1, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const CONNECTIONS = Endpoints.CONNECTIONS;
return Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': true,
url: CONNECTIONS}]).then(_fun43647, _fun43648);
}
function authorize(a0) { // fn#43649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:673, offset: 0x01158117, size: 102 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const r2 = value !== undefined ? value : {};
const env0_1 = r2.location;
const env0_2 = r2.twoWayLinkType;
const env0_3 = r2.userCode;
const env0_4 = r2.twoWayLink;
const env0_5 = r2.successRedirect;
const env0_6 = r2.handle;
return env0_3(_fun43651)();
}
function connect(a0, a1, a2, a3, a4) { // fn#43652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:1376, offset: 0x01158366, size: 222 bytes, params: 6, frame: 21
const value2 = undefined;
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const put = defaultImport.put;
const object2 = {};
object2.url = Endpoints.CONNECTION(a0, a1);
object2.body = {name: a2, friend_sync: (a4 == null ? value2 : a4.friend_sync) ?? FRIEND_SYNC_PLATFORM_TYPES.has(a0)};
object2.context = {location: a3};
object2.oldFormErrors = true;
const object3 = {};
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_CONNECTIONS_UPDATE = NetworkActionNames.USER_CONNECTIONS_UPDATE;
object3.event = USER_CONNECTIONS_UPDATE;
const object6 = {name: a2};
object6.friend_sync = FRIEND_SYNC_PLATFORM_TYPES.has(a0);
object3.properties = object6;
object2.trackedActionData = object3;
object2.rejectWithError = false;
return Reflect.apply(put, defaultImport, [object2]);
}
function update(a0, a1, a2) { // fn#43659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:2177, offset: 0x0115857c, size: 143 bytes, params: 4, frame: 20
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const patch = defaultImport.patch;
const object4 = {};
object4.url = Endpoints.CONNECTION(a0, a1);
object4.body = a2;
object4.oldFormErrors = true;
const object5 = {};
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_CONNECTIONS_UPDATE = NetworkActionNames.USER_CONNECTIONS_UPDATE;
object5.event = USER_CONNECTIONS_UPDATE;
const object6 = {};
copyDataProperties(object6, a2, Endpoints);
object5.properties = object6;
object4.trackedActionData = object5;
object4.rejectWithError = false;
return Reflect.apply(patch, defaultImport, [object4]);
}
function joinServer(a0, a1) { // fn#43660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:2363, offset: 0x0115860b, size: 142 bytes, params: 3, frame: 18
var object2;
const env0_0 = a0;
const env0_1 = a1;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'USER_CONNECTIONS_INTEGRATION_JOINING',
'integrationId': null, 'joining': true, integrationId: a0});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object2.url = Endpoints.INTEGRATION_JOIN(a0);
Reflect.apply(post, HTTP, [object2, _fun43661]);
}
function refreshAccessToken(a0, a1) { // fn#43662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:2815, offset: 0x01158740, size: 41 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun43664)();
}
function completeTwoWayLink(a0, a1, a2, a3, a4) { // fn#43666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:3366, offset: 0x011588f6, size: 62 bytes, params: 6, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a4;
return env0_3(_fun43668)();
}
function getHandoffStatus(a0, a1) { // fn#43670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:3934, offset: 0x01158a87, size: 166 bytes, params: 3, frame: 17
const URLSearchParams = global.URLSearchParams;
let uRLSearchParams = new URLSearchParams();
uRLSearchParams.append('state', a1);
const value3 = Endpoints.CONNECTIONS_SESSION_HANDOFF(a0);
uRLSearchParams = uRLSearchParams.toString();
uRLSearchParams = '' + value3 + '?' + uRLSearchParams;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
return HTTP.get({url: uRLSearchParams, body: {state: a1}, rejectWithError: true});
}
function _fun43647({body}) { // fn#43647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:504, offset: 0x0115809b, size: 64 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'USER_CONNECTIONS_UPDATE',
'local': true, accounts: body});
}
function _fun43648() { // fn#43648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:585, offset: 0x011580db, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'USER_CONNECTIONS_UPDATE',
'local': true, accounts: []});
}
function* _fun43651() { // fn#43651, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:765, offset: 0x01158186, size: 480 bytes, params: 1, frame: 20
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_1(env2_2[6]);
const track = value3.track;
const CONNECTED_ACCOUNT_INITIATED = env2_8.CONNECTED_ACCOUNT_INITIATED;
Reflect.apply(track, value3, [CONNECTED_ACCOUNT_INITIATED, {platform_type: require, location: importDefault}]);
const value5 = env2_6.CONNECTIONS_AUTHORIZE(require);
const URLSearchParams = global.URLSearchParams;
const uRLSearchParams = new URLSearchParams();
if (env1_3 != null) {
uRLSearchParams.append('two_way_user_code', env1_3);
}
if (AbortCodes != null) {
uRLSearchParams.append('success_redirect', AbortCodes);
}
if (dependencyMap != null) {
uRLSearchParams.append('two_way_link_type', dependencyMap);
uRLSearchParams.append('two_way_link', 'true');
} else if (ConnectedAccountsStore != null) {
uRLSearchParams.append('two_way_link', global.String(ConnectedAccountsStore));
}
if (Endpoints != null) {
uRLSearchParams.append('handle', Endpoints);
}
const value10 = value5 + '?' + uRLSearchParams.toString();
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
yield Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false, url: value10}]);
const value11 = undefined;
if (true) {
var value13 = env2_0(env2_2[7]);
var getCallbackParamsFromURL = value13.getCallbackParamsFromURL;
var state = Reflect.apply(getCallbackParamsFromURL, value13, [value11.body.url ?? '']).state;
if (state != null) {
env2_4.addPendingAuthorizedState(state);
}
}
return value11;
}
function _fun43661(a0) { // fn#43661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:2553, offset: 0x01158699, size: 167 bytes, params: 2, frame: 17
const value = environment.__proto__;
const value2 = undefined;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'USER_CONNECTIONS_INTEGRATION_JOINING',
'integrationId': null, 'joining': false, integrationId: env0_0});
if (!a0.ok) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_CONNECTIONS_INTEGRATION_JOINING_ERROR',
integrationId: env0_0, error: a0.hasErr ? value2 : a0.body.message});
if (require != null) {
require();
}
}
return value2;
}
function* _fun43664() { // fn#43664, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:2825, offset: 0x01158772, size: 292 bytes, params: 1, frame: 21
var binding;
var binding2;
var property;
var value3;
var HTTP;
var get;
var object2;
var CONNECTION_ACCESS_TOKEN;
var value5;
var value6;
var value7;
var value8;
var body;
var access_token;
var binding3;
var value9;
var dispatch;
var error;
var code;
var CONNECTION_REVOKED;
var value10;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
binding2 = env2_2;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
property = binding2[4];
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
value3 = binding(property);
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
HTTP = value3.HTTP;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
get = HTTP.get;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
binding = env2_6;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
CONNECTION_ACCESS_TOKEN = binding.CONNECTION_ACCESS_TOKEN;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
value5 = Reflect.apply(CONNECTION_ACCESS_TOKEN, binding, [require, importDefault]);
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2.url = value5;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
value6 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
access_token = body.access_token;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
binding = env2_1;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
binding3 = env2_2;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
property = binding3[5];
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
value9 = binding(property);
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
dispatch = value9.dispatch;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2 = {};
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2.type = 'USER_CONNECTION_UPDATE';
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2.platformType = require;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2.id = importDefault;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
object2.accessToken = access_token;
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
try {
Reflect.apply(dispatch, value9, [object2]);
} catch (error) {
body = error.body;
code = body.code;
CONNECTION_REVOKED = env2_5.CONNECTION_REVOKED;
if (code === CONNECTION_REVOKED) {
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
value10 = environment.__proto__;
Reflect.apply(dispatch, value, [{type: 'USER_CONNECTION_UPDATE', platformType: require, id: importDefault,
revoked: true}]);
}
throw error;
}
return access_token;
}
function* _fun43668() { // fn#43668, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5220:3382, offset: 0x0115893d, size: 212 bytes, params: 1, frame: 19
var binding;
var error;
var value3;
var callbackParamsFromURL;
var code;
var errorDescription;
if (true) {
value = environment.__proto__;
if (importDefault != null) {
value3 = environment.__proto__.__proto__;
binding = env2_0;
callbackParamsFromURL = binding(env2_2[7]).getCallbackParamsFromURL(importDefault);
code = callbackParamsFromURL.code;
error = callbackParamsFromURL.error;
errorDescription = callbackParamsFromURL.errorDescription;
if (error == null) {
yield env2_10(require, {code: dependencyMap, state: env1_3, two_way_link_code: code,
token_redirect_uri: ConnectedAccountsStore});
return undefined;
}
binding = env2_9;
binding.error('Two-way link: missing authorize code', {error: error, errorDescription: errorDescription});
} else {
value = environment.__proto__.__proto__;
env2_9.error('Two-way link: missing authorize location');
}
}
}
+54
View File
@@ -0,0 +1,54 @@
/* Metro module 13378; source: actions/ConsentActionCreators.tsx; dependencies: [661, 694, 1244, 507, 2] */
function _fun101869(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13568:6, offset: 0x0222242a, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ConsentActionCreators.tsx');
exports.fetchConsents = function() {
var HTTP = require(dependencyMap[3]).HTTP;
return HTTP.get({'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: Endpoints.SETTINGS_CONSENT}).then(handleRequestSuccess, _fun101873);
};
exports.setConsents = function(a0, a1) {
var HTTP = require(dependencyMap[3]).HTTP;
return HTTP.post({url: Endpoints.SETTINGS_CONSENT, body: {grant: a0, revoke: a1}, oldFormErrors: true,
rejectWithError: false}).then(handleRequestSuccess, handleRequestFailure);
};
}
function handleRequestSuccess(a0) { // fn#101870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13568:116, offset: 0x022224c9, size: 97 bytes, params: 2, frame: 15
var dispatch;
var object;
let value = a0 != null;
if (value && a0.body != null) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = value.dispatch;
object = {};
copyDataProperties(object, a0.body, undefined);
Reflect.apply(dispatch, value, [{type: 'UPDATE_CONSENTS', consents: object}]);
}
return a0.body;
}
function handleRequestFailure(a0) { // fn#101871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13568:250, offset: 0x0222252a, size: 229 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r2 = a0.status >= 500 && a0.status <= 599 || (a0 == null || a0.body == null) ? intl.string(t.cvJdtg) : a0.body.message ?? intl.string(t.cvJdtg);
const Error = global.Error;
throw new Error();
}
function fetchConsents() { // fn#101872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13568:557, offset: 0x0222260f, size: 92 bytes, params: 1, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const SETTINGS_CONSENT = Endpoints.SETTINGS_CONSENT;
const value2 = Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: SETTINGS_CONSENT}]);
return value2.then(handleRequestSuccess, function(a0) {
var Promise = global.Promise;
var Error = global.Error;
return Promise.reject(new Error(a0.body.message));
});
}
@@ -0,0 +1,272 @@
/* Metro module 6722; source: actions/ContextMenuActionCreators.tsx; dependencies: [661, 694, 6723, 477, 6726, 2] */
function _fun52769(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6900:6, offset: 0x01336ff6, size: 161 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = openContextMenu;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).AppContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ContextMenuActionCreators.tsx');
exports.closeContextMenu = function() {
};
exports.openContextMenu = closure;
exports.openContextMenuLazy = function(a0, a1, a2) {
openContextMenu(a0, undefined, a2, a1);
};
}
function open_52770(a0) { // fn#52770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6900:117, offset: 0x01337097, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CONTEXT_MENU_OPEN', contextMenu: a0});
}
function openContextMenu(a0, a1, a2, a3) { // fn#52771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6900:193, offset: 0x013370d0, size: 701 bytes, params: 5, frame: 27
var pageY;
var pageX;
var r11;
var r0;
var r4;
var r10;
var r2;
var r3;
var r8;
var target;
var value2;
var value3;
var rangeAt;
var boundingClientRect;
var height;
var left;
var object3;
var top;
var width;
var value8;
var value9;
var DOMRect;
var value10;
var dOMRect;
var object4;
var moduleValue2;
const value = a0;
value.stopPropagation();
let currentTarget = value.currentTarget;
let contains = currentTarget.contains;
if (contains == null) {
value2 = 0;
if ('pageX' in value) {
pageX = value.pageX;
pageY = value.pageY;
} else {
pageY = value2;
pageX = value2;
}
if (value2 !== pageX) {
r3 = pageX;
r8 = pageY;
} else if (value2 !== pageY) {
r3 = pageX;
r8 = pageY;
} else {
target = value.target;
value3 = undefined;
r11 = target == null || target.ownerDocument.defaultView == null ? value3 : target.ownerDocument.defaultView.getSelection();
if (r11 == null) {
r0 = pageY;
r4 = pageX;
} else if (r11.rangeCount > value2) {
if (target == null) {
r0 = pageY;
r4 = pageX;
} else {
rangeAt = r11.getRangeAt(value2);
if (target.contains(rangeAt.commonAncestorContainer)) {
boundingClientRect = rangeAt.getBoundingClientRect();
if (value2 === boundingClientRect.height) {
r0 = pageY;
r4 = pageX;
} else {
left = boundingClientRect.left;
r0 = boundingClientRect.bottom;
r4 = left;
}
} else {
r0 = pageY;
r4 = pageX;
}
}
} else {
r0 = pageY;
r4 = pageX;
}
if (value2 !== r4) {
r3 = r4;
r8 = r0;
} else if (value2 !== r0) {
r3 = r4;
r8 = r0;
} else {
r10 = target == null ? value3 : target.getBoundingClientRect();
r10 = r10 ?? ({});
left = r10.left;
r2 = value3 === left ? value2 : left;
top = r10.top;
r4 = value3 === top ? value2 : top;
width = r10.width;
r0 = value3 === width ? value2 : width;
height = r10.height;
value8 = r2 + r0 / 2;
r0 = value3 === height ? value2 : height;
value9 = r4 + r0 / 2;
r3 = value8;
r8 = value9;
}
}
object3 = {render: a1, renderLazy: a3};
target = value.target;
r0 = target ?? value.currentTarget;
object3.target = r0;
DOMRect = global.DOMRect;
value10 = Object.create(DOMRect.prototype, {constructor: {value: DOMRect}});
dOMRect = new DOMRect();
object3.rect = dOMRect instanceof Object ? dOMRect : value10;
object4 = {};
r8 = (require(6723) /* metro dependency 6723: AppWindowContext */).getCurrentlyInteractingAppContext() ?? AppContext.APP;
object4.context = r8;
copyDataProperties(object4, a2, value2);
object3.config = object4;
r2 = 'nativeEvent' in value ? value.nativeEvent : value;
if (a2 == null) {
value.preventDefault();
open_52770(object3);
} else if (a2.enableSpellCheck) {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isDesktop()) {
if (r2.isTrusted) {
var env0_1 = (require(6726) /* metro dependency 6726: SpellcheckUtils */).addResultListener(_fun52772);
} else {
value.preventDefault();
open_52770(object3);
}
} else {
value.preventDefault();
open_52770(object3);
}
} else {
value.preventDefault();
open_52770(object3);
}
} else {
currentTarget = value.currentTarget;
contains = currentTarget.contains;
target = value.target;
if (Reflect.apply(contains, currentTarget, [target])) {
value2 = 0;
if ('pageX' in value) {
pageX = value.pageX;
pageY = value.pageY;
} else {
pageY = value2;
pageX = value2;
}
if (value2 !== pageX) {
r3 = pageX;
r8 = pageY;
} else if (value2 !== pageY) {
r3 = pageX;
r8 = pageY;
} else {
target = value.target;
value3 = undefined;
r11 = target == null || target.ownerDocument.defaultView == null ? value3 : target.ownerDocument.defaultView.getSelection();
if (r11 == null) {
r0 = pageY;
r4 = pageX;
} else if (r11.rangeCount > value2) {
if (target == null) {
r0 = pageY;
r4 = pageX;
} else {
rangeAt = r11.getRangeAt(value2);
if (target.contains(rangeAt.commonAncestorContainer)) {
boundingClientRect = rangeAt.getBoundingClientRect();
if (value2 === boundingClientRect.height) {
r0 = pageY;
r4 = pageX;
} else {
left = boundingClientRect.left;
r0 = boundingClientRect.bottom;
r4 = left;
}
} else {
r0 = pageY;
r4 = pageX;
}
}
} else {
r0 = pageY;
r4 = pageX;
}
if (value2 !== r4) {
r3 = r4;
r8 = r0;
} else if (value2 !== r0) {
r3 = r4;
r8 = r0;
} else {
r10 = target == null ? value3 : target.getBoundingClientRect();
r10 = r10 ?? ({});
left = r10.left;
r2 = value3 === left ? value2 : left;
top = r10.top;
r4 = value3 === top ? value2 : top;
width = r10.width;
r0 = value3 === width ? value2 : width;
height = r10.height;
value8 = r2 + r0 / 2;
r0 = value3 === height ? value2 : height;
value9 = r4 + r0 / 2;
r3 = value8;
r8 = value9;
}
}
object3 = {render: a1, renderLazy: a3};
target = value.target;
r0 = target ?? value.currentTarget;
object3.target = r0;
DOMRect = global.DOMRect;
value10 = Object.create(DOMRect.prototype, {constructor: {value: DOMRect}});
dOMRect = new DOMRect();
object3.rect = dOMRect instanceof Object ? dOMRect : value10;
object4 = {};
r8 = (require(6723) /* metro dependency 6723: AppWindowContext */).getCurrentlyInteractingAppContext() ?? AppContext.APP;
object4.context = r8;
copyDataProperties(object4, a2, value2);
object3.config = object4;
r2 = 'nativeEvent' in value ? value.nativeEvent : value;
if (a2 == null) {
value.preventDefault();
open_52770(object3);
} else if (a2.enableSpellCheck) {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isDesktop()) {
if (r2.isTrusted) {
var env0_1 = (require(6726) /* metro dependency 6726: SpellcheckUtils */).addResultListener(_fun52772);
} else {
value.preventDefault();
open_52770(object3);
}
} else {
value.preventDefault();
open_52770(object3);
}
} else {
value.preventDefault();
open_52770(object3);
}
}
}
}
function _fun52772() { // fn#52772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6900:1168, offset: 0x0133738d, size: 31 bytes, params: 1, frame: 11
env0_1();
open_52770(env0_0);
}
@@ -0,0 +1,122 @@
/* Metro module 9086; source: actions/CreateChannelActionCreators.tsx; dependencies: [4864, 661, 670, 694, 5046, 480, 1392, 6613, 6610, 6931, 2] */
function _fun71006(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:6, offset: 0x01d11e04, size: 201 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.BITRATE_DEFAULT;
const env0_5 = constantsModule.ChannelTypes;
const env0_6 = constantsModule.Endpoints;
const env0_7 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
object2 = {createChannel: createChannel,
createRoleSubscriptionTemplateChannel: createRoleSubscriptionTemplateChannel};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CreateChannelActionCreators.tsx');
exports.default = object2;
}
function createChannel({guildId, type, name, permissionOverwrites = [], bitrate, userLimit, parentId, skuId, branchId, flags, availableTags}) { // fn#71007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:213, offset: 0x01d11ecd, size: 482 bytes, params: 2, frame: 27
var object4;
var defaultImport2;
var post;
var object3;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_CHANNEL_MODAL_SUBMIT',
guildId: guildId, channelType: type});
object4 = {type: type, name: name, permission_overwrites: permissionOverwrites};
if (bitrate != null && bitrate !== BITRATE_DEFAULT) {
object4.bitrate = bitrate;
}
if (userLimit != null && userLimit > 0) {
object4.user_limit = userLimit;
}
if (parentId != null) {
object4.parent_id = parentId;
}
if (flags != null) {
object4.flags = flags;
}
if (availableTags != null && availableTags.length > 0) {
object4.available_tags = availableTags.map(function(a0) {
return {name: a0.name, emoji_id: a0.emojiId, emoji_name: a0.emojiName, moderated: a0.moderated};
});
}
const GUILD_STORE = ChannelTypes.GUILD_STORE;
if (type !== GUILD_STORE) {
defaultImport2 = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
post = defaultImport2.post;
object3 = {};
object3.url = Endpoints.GUILD_CHANNELS(guildId);
object3.body = object4;
object3.oldFormErrors = true;
object3.trackedActionData = {event: NetworkActionNames.CHANNEL_CREATE, properties: properties};
} else {
if (skuId == null) {
throw new global.Error('Unexpected missing SKU');
}
object4.sku_id = skuId;
object4.branch_id = branchId;
defaultImport2 = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
post = defaultImport2.post;
object3 = {};
object3.url = Endpoints.GUILD_CHANNELS(guildId);
object3.body = object4;
object3.oldFormErrors = true;
object3.trackedActionData = {event: NetworkActionNames.CHANNEL_CREATE, properties: properties};
}
object3.rejectWithError = false;
return Reflect.apply(post, defaultImport2, [object3]).then(_fun71010, _fun71011);
}
function createRoleSubscriptionTemplateChannel(a0, a1, a2, a3) { // fn#71012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:1463, offset: 0x01d1224c, size: 157 bytes, params: 5, frame: 17
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const post = defaultImport.post;
const object2 = {};
object2.url = Endpoints.GUILD_CHANNELS(a0);
object2.body = {name: a1, type: a2, topic: a3};
object2.oldFormErrors = true;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const CHANNEL_CREATE = NetworkActionNames.CHANNEL_CREATE;
object2.trackedActionData = {event: CHANNEL_CREATE, properties: properties};
object2.rejectWithError = false;
return Reflect.apply(post, defaultImport, [object2]);
}
function createChannelProperties(a0) { // fn#71009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:967, owner: createChannel.properties, offset: 0x01d120e0, size: 133 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
return (require(1392) /* metro dependency 1392: TypeUtils */).exact({is_private: env0_1.length > 0,
channel_id: a0 == null || a0.body == null ? value : a0.body.id,
channel_type: a0 == null || a0.body == null ? value : a0.body.type});
}
function _fun71010(a0) { // fn#71010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:1156, offset: 0x01d12165, size: 169 bytes, params: 2, frame: 23
var defaultImport;
let value = environment.__proto__;
if (UserGuildSettingsStore.isOptInEnabled(guildId)) {
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
defaultImport.updateChannelOverrideSettings(guildId, a0.body.id,
{flags: ChannelNotificationSettingsFlags.OPT_IN_ENABLED},
(require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels.OptedIn);
}
value = importDefault(6931) /* metro dependency 6931: GuildTemplateTooltipActionCreators */;
value.checkGuildTemplateDirty(guildId);
return a0;
}
function _fun71011(a0) { // fn#71011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:1332, offset: 0x01d1220e, size: 62 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_CHANNEL_MODAL_SUBMIT_FAILURE',
errors: a0.body});
throw a0;
}
function createRoleSubscriptionTemplateChannelProperties(a0) { // fn#71013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9271:1636, owner: createRoleSubscriptionTemplateChannel.properties, offset: 0x01d122e9, size: 117 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
return (require(1392) /* metro dependency 1392: TypeUtils */).exact({is_private: true,
channel_id: a0 == null || a0.body == null ? value : a0.body.id,
channel_type: a0 == null || a0.body == null ? value : a0.body.type});
}
@@ -0,0 +1,123 @@
/* Metro module 9158; source: actions/CreateInviteModalActionCreators.tsx; dependencies: [9152, 661, 694, 683, 8879, 1244, 2] */
function _fun71812(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:6, offset: 0x01d2da9c, size: 207 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object2 = {init: init_71813, openSettings: openSettings, updateSettings: updateSettings,
resetSettings: resetSettings, createInvite: createInvite_71817, close: close_71820};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CreateInviteModalActionCreators.tsx');
exports.default = object2;
}
function init_71813(a0, a1, {location, targetType, targetUserId, targetApplicationId, skipCreateInvite}) { // fn#71813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:136, offset: 0x01d2db6b, size: 138 bytes, params: 4, frame: 20
location = location === undefined ? '' : location;
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CREATE_INVITE_MODAL_INIT', guildId: a0, channelId: a1, targetType: targetType,
targetUserId: targetUserId, targetApplicationId: targetApplicationId});
if (!skipCreateInvite) {
this.createInvite(location, true);
}
}
function openSettings(a0, a1, a2, a3) { // fn#71814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:383, offset: 0x01d2dbf5, size: 156 bytes, params: 5, frame: 18
const inviteSettings = CreateInviteModalStore.getInviteSettings();
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = defaultImport.dispatch;
const object2 = {type: 'CREATE_INVITE_MODAL_OPEN'};
copyDataProperties(object2, inviteSettings, 'CREATE_INVITE_MODAL_OPEN');
object2['guildId'] = a0;
object2['channelId'] = a1;
object2['onClose'] = a3;
Reflect.apply(dispatch, defaultImport, [object2]);
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport2.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
Reflect.apply(track, defaultImport2, [OPEN_MODAL, {type: 'Instant Invite', source: a2}]);
}
function updateSettings(a0) { // fn#71815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:584, offset: 0x01d2dc91, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_INVITE_MODAL_UPDATE_SETTINGS',
settings: a0});
}
function resetSettings() { // fn#71816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:677, offset: 0x01d2dcca, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_INVITE_MODAL_RESET_SETTINGS'});
}
function createInvite_71817(a0, a1) { // fn#71817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:756, offset: 0x01d2dcfb, size: 304 bytes, params: 3, frame: 26
var code;
var object2;
var channelId;
var maxAge;
var maxUses;
var temporary;
var targetType;
var targetUserId;
var targetApplicationId;
var flags;
var roleIds;
var invite;
var createInvite;
var parseInt;
var value;
const pendingSettings = CreateInviteModalStore.getPendingSettings();
const value3 = null;
if (value3 != pendingSettings) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_INVITE_MODAL_GENERATE_INVITE'});
channelId = pendingSettings.channelId;
maxAge = pendingSettings.maxAge;
maxUses = pendingSettings.maxUses;
temporary = pendingSettings.temporary;
targetType = pendingSettings.targetType;
targetUserId = pendingSettings.targetUserId;
targetApplicationId = pendingSettings.targetApplicationId;
flags = pendingSettings.flags;
roleIds = pendingSettings.roleIds;
invite = CreateInviteModalStore.getInvite();
code = a1 && value3 != invite ? invite.code : value3;
value = importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */;
createInvite = value.createInvite;
object2 = {temporary: temporary, validate: code};
parseInt = global.parseInt;
object2.max_age = parseInt(maxAge, 10);
parseInt = global.parseInt;
object2.max_uses = parseInt(maxUses, 10);
object2.target_type = targetType;
object2.target_user_id = targetUserId;
object2.target_application_id = targetApplicationId;
object2.flags = flags;
object2.role_ids = roleIds;
value = Reflect.apply(createInvite, value, [channelId, object2, a0]);
value.then(_fun71818, _fun71819);
}
}
function close_71820() { // fn#71820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:1503, offset: 0x01d2def1, size: 67 bytes, params: 1, frame: 14
const onClose = CreateInviteModalStore.onClose;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_INVITE_MODAL_CLOSE'});
if (onClose != null) {
onClose();
}
}
function _fun71818() { // fn#71818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:1230, offset: 0x01d2de2b, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CREATE_INVITE_MODAL_GENERATE_INVITE_SUCCESS',
channelId: channelId});
}
function _fun71819(a0) { // fn#71819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9343:1321, offset: 0x01d2de67, size: 138 bytes, params: 2, frame: 16
let value = environment.__proto__;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WB1ip6 = (require(1244) /* metro dependency 1244: indexNative */).t.WB1ip6;
const r4 = (a0 == null ? value2 : a0.message) == null ? Reflect.apply(string, intl, [WB1ip6]) : a0.message;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'CREATE_INVITE_MODAL_GENERATE_INVITE_FAILURE', message: r4});
return value2;
}
@@ -0,0 +1,38 @@
/* Metro module 12079; source: actions/DefaultRouteActionCreators.tsx; dependencies: [3785, 661, 3974, 3987, 694, 2] */
function _fun92815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12265:6, offset: 0x0209a172, size: 164 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/DefaultRouteActionCreators.tsx');
exports.saveLastRoute = saveLastRoute;
exports.saveLastNonVoiceRoute = saveLastNonVoiceRoute;
}
function isLurkingGuildRoute(a0) { // fn#92816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12265:123, offset: 0x0209a216, size: 150 bytes, params: 2, frame: 19
const value2 = undefined;
const matchPathCompatModule = require(3974) /* metro dependency 3974: matchPathCompat */;
const matchPath = matchPathCompatModule.matchPath;
const CHANNEL = Routes.CHANNEL;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
let guildId = RouteParam.guildId;
const value3 = Reflect.apply(matchPath, matchPathCompatModule, [a0, {path: Reflect.apply(CHANNEL, Routes,
[Reflect.apply(guildId, RouteParam, [])])}]);
guildId = value3 == null || value3.params == null ? value2 : value3.params.guildId;
return !(guildId == null || !LurkingStore.isLurking(guildId));
}
function saveLastRoute(a0) { // fn#92817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12265:400, offset: 0x0209a2ac, size: 69 bytes, params: 2, frame: 14
if (!isLurkingGuildRoute(a0)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SAVE_LAST_ROUTE', path: a0});
}
}
function saveLastNonVoiceRoute(a0) { // fn#92818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12265:525, offset: 0x0209a2f1, size: 69 bytes, params: 2, frame: 14
if (!isLurkingGuildRoute(a0)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SAVE_LAST_NON_VOICE_ROUTE',
path: a0});
}
}
@@ -0,0 +1,19 @@
/* Metro module 693; source: actions/DeveloperOptionsActionCreators.tsx; dependencies: [694, 2] */
function _fun8462(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:820:6, offset: 0x00d40f57, size: 108 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/DeveloperOptionsActionCreators.tsx');
exports.setDeveloperOptionSettings = setDeveloperOptionSettings;
exports.setRoutingKeyTags = setRoutingKeyTags_8464;
}
function setDeveloperOptionSettings(a0) { // fn#8463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:820:197, offset: 0x00d40fc3, size: 54 bytes, params: 2, frame: 12
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEVELOPER_OPTIONS_UPDATE_SETTINGS',
settings: a0});
}
function setRoutingKeyTags_8464(a0) { // fn#8464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:820:336, offset: 0x00d40ff9, size: 54 bytes, params: 2, frame: 12
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEVELOPER_OPTIONS_SET_ROUTING_KEY',
tags: a0});
}
@@ -0,0 +1,45 @@
/* Metro module 9764; source: actions/DimensionActionCreators.tsx; dependencies: [694, 2] */
function _fun76639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9950:6, offset: 0x01dde9cc, size: 172 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {updateChannelDimensions: updateChannelDimensions, updateChannelListScroll: updateChannelListScroll,
channelListScrollTo: channelListScrollTo, clearChannelListScrollTo: clearChannelListScrollTo,
clearChannelDimensions: function(a0, a1) {
var Date = global.Date;
this.updateChannelDimensions(a0, Date.now(), null, null, null, a1);
}, updateGuildListScrollTo: updateGuildListScrollTo};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/DimensionActionCreators.tsx');
exports.default = object2;
}
function updateChannelDimensions(a0, a1, a2, a3, a4, a5) { // fn#76640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9950:99, offset: 0x01ddea78, size: 98 bytes, params: 7, frame: 14
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPDATE_CHANNEL_DIMENSIONS',
channelId: a0, timestamp: a1, scrollTop: a2, scrollHeight: a3, offsetHeight: a4});
if (a5 != null) {
a5();
}
}
function updateChannelListScroll(a0, a1) { // fn#76641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9950:269, offset: 0x01ddeada, size: 79 bytes, params: 3, frame: 14
let value = a2;
const r4 = value !== undefined ? value : [];
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'UPDATE_CHANNEL_LIST_DIMENSIONS', guildId: a0, scrollTop: a1, channelIds: r4});
}
function channelListScrollTo(a0, a1) { // fn#76642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9950:397, offset: 0x01ddeb29, size: 72 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPDATE_CHANNEL_LIST_DIMENSIONS',
guildId: a0, scrollTo: a1, channelIds: []});
}
function clearChannelListScrollTo(a0) { // fn#76643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9950:516, offset: 0x01ddeb71, size: 68 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'UPDATE_CHANNEL_LIST_DIMENSIONS',
'guildId': null, 'scrollTo': null, guildId: a0, channelIds: []});
}
function updateGuildListScrollTo(a0) { // fn#76645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9950:730, offset: 0x01ddebe6, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPDATE_GUILD_LIST_DIMENSIONS',
scrollTop: a0});
}
+31
View File
@@ -0,0 +1,31 @@
/* Metro module 7165; source: actions/DraftActionCreators.tsx; dependencies: [694, 2] */
function _fun57503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7343:6, offset: 0x013e73e9, size: 134 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {clearDraft: clearDraft, saveDraft: saveDraft, changeDraft: changeDraft,
changeThreadSettings: changeThreadSettings};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/DraftActionCreators.tsx');
exports.default = object2;
}
function clearDraft(a0, a1) { // fn#57504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7343:99, offset: 0x013e746f, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DRAFT_CLEAR', channelId: a0,
draftType: a1});
}
function saveDraft(a0, a1, a2) { // fn#57505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7343:179, offset: 0x013e74ae, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DRAFT_SAVE', channelId: a0, draft: a1,
draftType: a2});
}
function changeDraft(a0, a1, a2) { // fn#57506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7343:267, offset: 0x013e74f5, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DRAFT_CHANGE', channelId: a0,
draft: a1, draftType: a2});
}
function changeThreadSettings(a0, a1) { // fn#57507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7343:359, offset: 0x013e753c, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'THREAD_SETTINGS_DRAFT_CHANGE',
channelId: a0, draft: a1});
}
+491
View File
@@ -0,0 +1,491 @@
/* Metro module 8629; source: actions/EmojiActionCreators.tsx; dependencies: [5, 6540, 4257, 4646, 661, 670, 1362, 1345, 694, 507, 7618, 4002, 1244, 4132, 3797, 1360, 6546, 22, 4647, 2] */
function _fun68075(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:6, offset: 0x01c3ddb3, size: 333 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const userSettingsConstantsModule = require(670) /* metro dependency 670: UserSettingsConstants */;
const env0_8 = userSettingsConstantsModule.MAX_FAVORITES;
const env0_9 = userSettingsConstantsModule.UserSettingsDelay;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/EmojiActionCreators.tsx');
exports.setDiversityColor = function(a0) {
var env0_0 = a0;
var PreloadedUserSettingsActionCreators = require(dependencyMap[6]).PreloadedUserSettingsActionCreators;
var FREQUENT_USER_ACTION = UserSettingsDelay.FREQUENT_USER_ACTION;
PreloadedUserSettingsActionCreators.updateAsync('textAndImages', _fun68083, FREQUENT_USER_ACTION);
};
exports.fetchEmoji = fetchEmoji;
exports.uploadEmoji = uploadEmoji;
exports.deleteEmoji = deleteEmoji;
exports.updateEmoji = function() {
return _updateEmoji.apply(this, arguments);
};
exports.favoriteEmoji = function(a0) {
var value2 = getFavoriteEmojiNameOrId(a0);
var env0_0 = value2;
if (value2 != null) {
require(dependencyMap[6]).FrecencyUserSettingsActionCreators.updateAsync('favoriteEmojis', _fun68094,
UserSettingsDelay.INFREQUENT_USER_ACTION);
}
};
exports.unfavoriteEmoji = function(a0) {
var value2 = getFavoriteEmojiNameOrId(a0);
var env0_0 = value2;
if (value2 != null) {
require(dependencyMap[6]).FrecencyUserSettingsActionCreators.updateAsync('favoriteEmojis', _fun68096,
UserSettingsDelay.INFREQUENT_USER_ACTION);
}
};
}
function _updateEmoji() { // fn#68076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:208, offset: 0x01c3df00, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun68078).apply(this, arguments);
}
function dedupeFavoriteEmojis(a0) { // fn#68079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:482, offset: 0x01c3e017, size: 148 bytes, params: 2, frame: 19
var value2;
var items2;
var value;
if (!(GuildAvailabilityStore.totalUnavailableGuilds > 0)) {
if (GatewayConnectionStore.isConnected()) {
value2 = a0.map(_fun68080);
value = (importDefault(6546) /* metro dependency 6546: dedupeEmojisByNameOrId */)(value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish));
value = value.keys();
items2 = [];
arraySpread(items2, value, 0, require);
return items2;
}
}
return a0;
}
function getFavoriteEmojiNameOrId(a0) { // fn#68081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:734, offset: 0x01c3e0e9, size: 93 bytes, params: 2, frame: 16
var r1;
var r0;
var id;
var value3;
var defaultImport;
var value4;
const value = null;
if (value == a0) {
r0 = value;
} else {
id = a0.id;
if (value != id) {
r1 = id;
} else {
value3 = undefined;
defaultImport = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
value4 = defaultImport.convertSurrogateToBase(a0.surrogates);
r1 = value == value4 ? value3 : value4.name;
}
r1 = value == r1 ? a0.name : r1;
r0 = r1;
}
return r0;
}
function setDiversityColor(a0) { // fn#68082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:994, offset: 0x01c3e146, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const FREQUENT_USER_ACTION = UserSettingsDelay.FREQUENT_USER_ACTION;
Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['textAndImages', _fun68083, FREQUENT_USER_ACTION]);
}
function fetchEmoji(a0) { // fn#68084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1221, offset: 0x01c3e1d8, size: 149 bytes, params: 2, frame: 18
var object2;
const env0_0 = a0;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_FETCH', guildId: a0});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.GUILD_EMOJIS(a0);
Reflect.apply(get, HTTP, [object2]).then(_fun68085, _fun68086);
}
function uploadEmoji({guildId, image, name, roles, analyticsLocation, originalMd5}) { // fn#68087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1532, offset: 0x01c3e2f2, size: 261 bytes, params: 2, frame: 24
var object2;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_UPLOAD_START', guildId: guildId});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
object2 = {};
object2.url = Endpoints.GUILD_EMOJIS(guildId);
object2.body = {image: image, name: name, roles: roles};
object2.headers = (importDefault(7618) /* metro dependency 7618: InlineUploader */).buildHeadersForMd5(originalMd5);
object2.context = {client_event_source: analyticsLocation?.page};
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(post, HTTP, [object2]).then(_fun68088, _fun68089);
}
function deleteEmoji(a0, a1, a2) { // fn#68090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:2057, offset: 0x01c3e48d, size: 176 bytes, params: 4, frame: 19
var object2;
const value2 = undefined;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_DELETE', guildId: a0,
emojiId: a1});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
object2 = {};
object2.url = Endpoints.GUILD_EMOJI(a0, a1);
object2.body = a2 != null ? {replaced_by: a2} : value2;
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(del, HTTP, [object2]).then(function() {
var AccessibilityAnnouncer = require(dependencyMap[11]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t.L3UUha));
});
}
function favoriteEmoji(a0) { // fn#68093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:2462, offset: 0x01c3e59a, size: 91 bytes, params: 2, frame: 16
var FrecencyUserSettingsActionCreators;
if (getFavoriteEmojiNameOrId(a0) != null) {
FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.updateAsync('favoriteEmojis', _fun68094,
UserSettingsDelay.INFREQUENT_USER_ACTION);
}
}
function unfavoriteEmoji(a0) { // fn#68095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:2907, offset: 0x01c3e70d, size: 91 bytes, params: 2, frame: 16
var FrecencyUserSettingsActionCreators;
if (getFavoriteEmojiNameOrId(a0) != null) {
FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.updateAsync('favoriteEmojis', _fun68096,
UserSettingsDelay.INFREQUENT_USER_ACTION);
}
}
async function _fun68078({guildId, emojiId, name, roles}) { // fn#68078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:255, offset: 0x01c3df46, size: 209 bytes, params: 2, frame: 21
var binding;
var binding2;
var property;
var value4;
var HTTP;
var patch;
var object3;
var GUILD_EMOJI;
var value5;
var object4;
var value6;
var value7;
var value8;
var error;
var prototype;
var value9;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
property = binding2[9];
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
patch = HTTP.patch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
binding = env2_7;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
GUILD_EMOJI = binding.GUILD_EMOJI;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
value5 = Reflect.apply(GUILD_EMOJI, binding, [guildId, emojiId]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object3.url = value5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4.name = name;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4.roles = roles;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object3.body = object4;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object3.oldFormErrors = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object3.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
value6 = Reflect.apply(patch, HTTP, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
await value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[13]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
return value8 ? value7 : value7;
}
function _fun68080(a0) { // fn#68080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:596, offset: 0x01c3e0ab, size: 62 bytes, params: 2, frame: 13
var r0;
let value = environment.__proto__;
const customEmojiById = EmojiStore.getCustomEmojiById(a0);
if (customEmojiById != null) {
r0 = customEmojiById;
} else {
value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
value = value.getByName(a0);
r0 = value;
}
return r0;
}
function _fun68083(a0) { // fn#68083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1097, offset: 0x01c3e192, size: 70 bytes, params: 2, frame: 12
const StringValue = (require(1345) /* metro dependency 1345: wrappers */).StringValue;
a0.diversitySurrogate = StringValue.create();
a0.diversitySurrogate.value = env0_0;
}
function _fun68085({body}) { // fn#68085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1377, offset: 0x01c3e26d, size: 73 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_FETCH_SUCCESS',
guildId: env0_0, emojis: body});
}
function _fun68086() { // fn#68086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1453, offset: 0x01c3e2b6, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_FETCH_FAILURE',
guildId: env0_0});
}
function _fun68088(a0) { // fn#68088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1892, offset: 0x01c3e3f7, size: 68 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_UPLOAD_STOP', guildId: guildId});
return a0.body;
}
function _fun68089(a0) { // fn#68089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:1961, offset: 0x01c3e43b, size: 82 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMOJI_UPLOAD_STOP', guildId: guildId});
const Promise = global.Promise;
return Promise.reject(a0);
}
function _fun68094(a0) { // fn#68094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:2604, offset: 0x01c3e5f5, size: 280 bytes, params: 2, frame: 21
var r0;
var value4;
var defaultImport2;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = environment.__proto__;
const dedupeFavoriteEmojisBinding = dedupeFavoriteEmojis;
const emojis = a0.emojis;
const value2 = undefined;
a0.emojis = dedupeFavoriteEmojisBinding(emojis);
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (defaultImport.size(a0.emojis) >= MAX_FAVORITES) {
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
object2.title = intl.string(t['+XYXtZ']);
object2.body = intl.formatToPlainString(t.JaIyFi, {count: MAX_FAVORITES});
Reflect.apply(show, defaultImport2, [object2]);
r0 = false;
} else {
value4 = a0.emojis.includes(env0_0);
if (value4) {
r0 = !value4;
} else {
a0.emojis.push(env0_0);
r0 = value2;
}
}
return r0;
}
function _fun68096(a0) { // fn#68096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8814:3051, offset: 0x01c3e768, size: 92 bytes, params: 2, frame: 13
const dedupeFavoriteEmojisBinding = dedupeFavoriteEmojis;
let emojis = a0.emojis;
a0.emojis = dedupeFavoriteEmojisBinding(emojis);
if (Reflect.apply(a0.emojis.includes, emojis, [env0_0])) {
emojis = a0.emojis;
a0.emojis = emojis.filter(_fun68097);
return undefined;
}
return false;
}
@@ -0,0 +1,434 @@
/* Metro module 5182; source: actions/EntitlementActionCreators.tsx; dependencies: [5, 661, 694, 507, 4141, 2] */
function _fun45662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:6, offset: 0x011948bc, size: 178 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/EntitlementActionCreators.tsx');
exports.fetchUserEntitlementsForApplication = fetchUserEntitlementsForApplication;
exports.fetchUserEntitlements = function() {
return _fetchUserEntitlements.apply(this, arguments);
};
exports.fetchGiftableEntitlements = function() {
return _fetchGiftableEntitlements.apply(this, arguments);
};
}
function _fetchUserEntitlements() { // fn#45663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:128, offset: 0x0119496e, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun45665).apply(this, arguments);
}
function _fetchGiftableEntitlements() { // fn#45666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:689, offset: 0x01194afe, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun45668).apply(this, arguments);
}
function fetchUserEntitlementsForApplication(a0) { // fn#45669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1222, offset: 0x01194c12, size: 169 bytes, params: 2, frame: 17
let value = a1;
const env0_0 = a0;
const r6 = !(value !== undefined) || value;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun45670);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {};
object2.url = Endpoints.ENTITLEMENTS_FOR_APPLICATION(a0);
object2.oldFormErrors = true;
object2.query = {exclude_consumed: r6};
object2.rejectWithError = true;
value = Reflect.apply(get, HTTP, [object2]);
value = value.then(_fun45671);
return value.catch(_fun45672);
}
async function _fun45665({withSku, withApplication, excludeEnded, entitlementType}) { // fn#45665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:195, offset: 0x011949b0, size: 334 bytes, params: 2, frame: 21
var object4;
var binding2;
var property;
var value5;
var HTTP;
var get;
var ENTITLEMENTS_FOR_USER;
var object3;
var value6;
var value7;
var value8;
var binding3;
var value9;
var body;
var error;
let value = undefined;
if (false) {
return value;
}
reducibleJoin3: while (true) {
if (withSku !== undefined) {
break reducibleJoin3;
}
value = false;
withSku = value;
break reducibleJoin3;
}
reducibleJoin5: while (true) {
if (withApplication !== undefined) {
break reducibleJoin5;
}
value = false;
withApplication = value;
break reducibleJoin5;
}
reducibleJoin7: while (true) {
if (excludeEnded !== undefined) {
break reducibleJoin7;
}
value = true;
excludeEnded = value;
break reducibleJoin7;
}
await undefined;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value4 = binding(env2_2[2]);
var dispatch = value4.dispatch;
Reflect.apply(dispatch, value4, [{type: 'ENTITLEMENTS_FETCH_FOR_USER_START'}]);
reducibleJoin11: while (true) {
reduciblePort48: while (true) {
exceptionLanding47: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding47;
}
break reducibleJoin11;
}
binding = env2_1;
value = binding(env2_2[2]);
dispatch = value.dispatch;
Reflect.apply(dispatch, value, [{type: 'ENTITLEMENTS_FETCH_FOR_USER_FAIL'}]);
break reduciblePort48;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding47;
}
try {
property = binding2[3];
} catch (error) {
break exceptionLanding47;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding47;
}
try {
HTTP = value5.HTTP;
} catch (error) {
break exceptionLanding47;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding47;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding47;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding47;
}
try {
ENTITLEMENTS_FOR_USER = binding.ENTITLEMENTS_FOR_USER;
} catch (error) {
break exceptionLanding47;
}
try {
object4.url = ENTITLEMENTS_FOR_USER;
} catch (error) {
break exceptionLanding47;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding47;
}
try {
object3.with_sku = withSku;
} catch (error) {
break exceptionLanding47;
}
try {
object3.with_application = withApplication;
} catch (error) {
break exceptionLanding47;
}
try {
object3.entitlement_type = entitlementType;
} catch (error) {
break exceptionLanding47;
}
try {
object3.exclude_ended = excludeEnded;
} catch (error) {
break exceptionLanding47;
}
try {
object4.query = object3;
} catch (error) {
break exceptionLanding47;
}
try {
object4.rejectWithError = true;
} catch (error) {
break exceptionLanding47;
}
try {
value6 = Reflect.apply(get, HTTP, [object4]);
} catch (error) {
break exceptionLanding47;
}
await value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding47;
}
if (value8) {
return value7;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding47;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding47;
}
try {
property = binding3[2];
} catch (error) {
break exceptionLanding47;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding47;
}
try {
dispatch = value9.dispatch;
} catch (error) {
break exceptionLanding47;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding47;
}
try {
object4.type = 'ENTITLEMENTS_FETCH_FOR_USER_SUCCESS';
} catch (error) {
break exceptionLanding47;
}
try {
body = value7.body;
} catch (error) {
break exceptionLanding47;
}
try {
object4.entitlements = body;
} catch (error) {
break exceptionLanding47;
}
try {
object4.excludeEnded = excludeEnded;
} catch (error) {
break exceptionLanding47;
}
try {
Reflect.apply(dispatch, value9, [object4]);
} catch (error) {
break exceptionLanding47;
}
}
}
function* _fun45668() { // fn#45668, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:764, offset: 0x01194b37, size: 219 bytes, params: 1, frame: 17
var object2;
var binding2;
var property;
var value4;
var httpGetWithCountryCodeQuery;
var ENTITLEMENTS_GIFTABLE;
var value5;
var value6;
var value7;
var binding3;
var value8;
var body;
var error;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[2]);
var dispatch = value3.dispatch;
Reflect.apply(dispatch, value3, [{type: 'ENTITLEMENTS_GIFTABLE_FETCH'}]);
reducibleJoin3: while (true) {
reduciblePort31: while (true) {
exceptionLanding30: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding30;
}
break reducibleJoin3;
}
binding = env2_1;
value = binding(env2_2[2]);
dispatch = value.dispatch;
Reflect.apply(dispatch, value, [{type: 'ENTITLEMENTS_GIFTABLE_FETCH_FAIL'}]);
break reduciblePort31;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding30;
}
try {
property = binding2[4];
} catch (error) {
break exceptionLanding30;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding30;
}
try {
httpGetWithCountryCodeQuery = value4.httpGetWithCountryCodeQuery;
} catch (error) {
break exceptionLanding30;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding30;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding30;
}
try {
ENTITLEMENTS_GIFTABLE = binding.ENTITLEMENTS_GIFTABLE;
} catch (error) {
break exceptionLanding30;
}
try {
object2.url = ENTITLEMENTS_GIFTABLE;
} catch (error) {
break exceptionLanding30;
}
try {
object2.rejectWithError = true;
} catch (error) {
break exceptionLanding30;
}
try {
value5 = Reflect.apply(httpGetWithCountryCodeQuery, value4, [object2]);
} catch (error) {
break exceptionLanding30;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding30;
}
if (value7) {
return value6;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding30;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding30;
}
try {
property = binding3[2];
} catch (error) {
break exceptionLanding30;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding30;
}
try {
dispatch = value8.dispatch;
} catch (error) {
break exceptionLanding30;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding30;
}
try {
object2.type = 'ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS';
} catch (error) {
break exceptionLanding30;
}
try {
body = value6.body;
} catch (error) {
break exceptionLanding30;
}
try {
object2.entitlements = body;
} catch (error) {
break exceptionLanding30;
}
try {
Reflect.apply(dispatch, value8, [object2]);
} catch (error) {
break exceptionLanding30;
}
}
}
function _fun45670() { // fn#45670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1296, offset: 0x01194cbb, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENTITLEMENT_FETCH_APPLICATION_START',
applicationId: env0_0});
}
function _fun45671(a0) { // fn#45671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1510, offset: 0x01194cf7, size: 78 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENTITLEMENT_FETCH_APPLICATION_SUCCESS',
applicationId: env0_0, entitlements: a0.body});
return a0.body;
}
function _fun45672() { // fn#45672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1632, offset: 0x01194d45, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENTITLEMENT_FETCH_APPLICATION_FAIL',
applicationId: env0_0});
}
+41
View File
@@ -0,0 +1,41 @@
/* Metro module 15817; source: actions/FriendsActionCreators.tsx; dependencies: [661, 694, 1230, 15139, 2] */
function _fun121559(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16025:6, offset: 0x0254adce, size: 161 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const closure = setSection_121560;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Routes;
object2 = {transitionToSection: transitionToSection, setSection: closure, setInitialSection: setInitialSection};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/FriendsActionCreators.tsx');
exports.default = object2;
}
function setSection_121560(a0) { // fn#121560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16025:113, offset: 0x0254ae6f, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FRIENDS_SET_SECTION', section: a0});
}
function transitionToSection(a0) { // fn#121561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16025:200, offset: 0x0254aea8, size: 168 bytes, params: 2, frame: 15
var moduleValue2;
const value = a1;
let explicit = (value !== undefined ? value : {}).explicit;
explicit = !(explicit === undefined) && explicit;
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const getHistory = router_utilsModule.getHistory;
const pathname = Reflect.apply(getHistory, router_utilsModule, []).location.pathname;
const FRIENDS = Routes.FRIENDS;
if (pathname !== FRIENDS) {
moduleValue2 = router_utilsModule;
moduleValue2.transitionTo(Routes.FRIENDS);
}
setSection_121560(a0);
if (explicit) {
(importDefault(15139) /* metro dependency 15139: trackFriendListClicked */)({tab_opened: a0});
}
}
function setInitialSection(a0) { // fn#121562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16025:390, offset: 0x0254af50, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FRIENDS_SET_INITIAL_SECTION',
section: a0});
}
+478
View File
@@ -0,0 +1,478 @@
/* Metro module 9814; source: actions/GIFPickerActionCreators.tsx; dependencies: [1949, 9815, 661, 670, 4863, 9816, 9819, 507, 694, 22, 491, 1471, 9598, 1362, 1349, 4647, 1244, 683, 2] */
function _fun76851(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:6, offset: 0x01de77ac, size: 490 bytes, params: 8, frame: 24
let env0_0 = require;
const closure = trackSearchStart_76852;
const closure2 = trackSearchResultViewed_76853;
const closure3 = doSearchRequest;
const closure4 = resetSearch;
const closure5 = function(a0) {
var r1;
var r0;
var value = a0;
var value3 = importDefault(dependencyMap[11]).toURLSafe(value);
if (value3 == null) {
r0 = value;
} else {
if (require(dependencyMap[12]).isAttachmentUrl(value3)) {
value = require(dependencyMap[12]);
value = value.removeSignedUrlParameters(value3);
value = value.toString();
r1 = value;
} else {
r1 = value;
}
r0 = r1;
}
return r0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const gifPickerViewStore = importDefault(9815) /* metro dependency 9815: GIFPickerViewStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_5 = value.AnalyticEvents;
const env0_6 = value.Endpoints;
const env0_7 = value.SearchTypes;
const env0_8 = value.GIFPickerResultTypes;
value = require(670) /* metro dependency 670: UserSettingsConstants */;
const env0_9 = value.MAX_FAVORITE_GIFS_SIZE;
const env0_10 = value.UserSettingsDelay;
const env0_11 = RegExp('-', 'g');
const env0_12 = (importDefault(22) /* metro dependency 22 */).debounce(closure3, 250);
const env0_13 = RegExp('\\.(webp|avif|gif)(\\?|$)', 'i');
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/GIFPickerActionCreators.tsx');
exports.trackSearchStart = closure;
exports.trackSearchResultViewed = closure2;
exports.search = search_76861;
exports.fetchSuggestions = fetchSuggestions;
exports.resetSearch = closure4;
exports.trackSelectGIF = trackSelectGIF;
exports.initializeSearch = initializeSearch_76865;
exports.fetchTrending = fetchTrending;
exports.fetchTrendingGIFs = fetchTrendingGIFs;
exports.gifUrlKey = closure5;
exports.addFavoriteGIF = function(a0) {
var env0_0 = a0;
var FrecencyUserSettingsActionCreators = require(dependencyMap[13]).FrecencyUserSettingsActionCreators;
var INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
FrecencyUserSettingsActionCreators.updateAsync('favoriteGifs', _fun76873, INFREQUENT_USER_ACTION);
};
exports.removeFavoriteGIF = function(a0) {
var env0_0 = a0;
var FrecencyUserSettingsActionCreators = require(dependencyMap[13]).FrecencyUserSettingsActionCreators;
var INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
FrecencyUserSettingsActionCreators.updateAsync('favoriteGifs', _fun76876, INFREQUENT_USER_ACTION);
};
exports.fetchTrendingSearchTerms = fetchTrendingSearchTerms;
}
function trackSearchStart_76852(a0) { // fn#76852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:266, offset: 0x01de7996, size: 175 bytes, params: 2, frame: 19
const r6 = a0 != null ? {[a0]: 1} : {};
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const SEARCH_STARTED = AnalyticEvents.SEARCH_STARTED;
const object2 = {};
const GIF = SearchTypes.GIF;
object2.search_type = GIF;
object2.load_id = GIFPickerViewStore.getAnalyticsID();
const Object = global.Object;
object2.num_modifiers = Object.keys(r6).length;
object2.modifiers = r6;
object2.gif_provider = (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest();
Reflect.apply(trackWithMetadata, defaultImport, [SEARCH_STARTED, object2]);
}
function trackSearchResultViewed_76853(a0, a1) { // fn#76853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:507, offset: 0x01de7a45, size: 290 bytes, params: 3, frame: 21
let value = a2;
let r6 = value !== undefined ? value : {};
const startTime = r6.startTime;
value = Object.create(null);
value.startTime = 0;
const value2 = copyDataProperties({}, r6, value, undefined);
let object3 = {'offset': 0, 'limit': null};
object3.totalResults = a0.length;
const gifPickerUtilsModule = require(9819) /* metro dependency 9819: GIFPickerUtils */;
const calculateAnalyticsMetadata = gifPickerUtilsModule.calculateAnalyticsMetadata;
const analyticsID = GIFPickerViewStore.getAnalyticsID();
const object4 = {};
copyDataProperties(object4, object3, value);
copyDataProperties(object4, value2, value);
object4['results'] = a0.length;
const value5 = Reflect.apply(calculateAnalyticsMetadata, gifPickerUtilsModule, [analyticsID, a1, object4]);
r6 = startTime == null ? {} : {load_duration_ms: global.Date.now() - startTime};
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const SEARCH_RESULT_VIEWED = AnalyticEvents.SEARCH_RESULT_VIEWED;
object3 = {};
copyDataProperties(object3, value5, value);
copyDataProperties(object3, r6, value);
value = require(9816) /* metro dependency 9816: GifProviderConfig */;
value = value.getProviderForAPIRequest();
object3['gif_provider'] = value;
Reflect.apply(trackWithMetadata, defaultImport, [SEARCH_RESULT_VIEWED, object3]);
}
function doSearchRequest(a0, a1, a2) { // fn#76854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:860, offset: 0x01de7b67, size: 224 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const Date = global.Date;
const env0_3 = Date.now();
trackSearchStart_76852(a1);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object3 = {};
const GIFS_SEARCH = Endpoints.GIFS_SEARCH;
object3.url = GIFS_SEARCH;
const object4 = {q: a0};
object4.media_format = GIFPickerViewStore.getSelectedFormat();
object4.provider = (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest();
object4.locale = LocaleStore.locale;
object4.limit = a2;
object3.query = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(get, HTTP, [object3]).then(_fun76855, _fun76856);
}
function resetSearch() { // fn#76857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:1373, offset: 0x01de7cf0, size: 51 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'GIF_PICKER_QUERY', 'query': ''});
}
function isProxiedAttachment({src}) { // fn#76859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:1595, offset: 0x01de7d9f, size: 121 bytes, params: 2, frame: 15
var r1;
var r0;
var isExternalProxiedAttachmentUrl2;
var value;
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(src);
const value3 = value2 != null;
if (value3) {
isExternalProxiedAttachmentUrl2 = (require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */).isExternalProxiedAttachmentUrl(value2);
if (isExternalProxiedAttachmentUrl2) {
r1 = isExternalProxiedAttachmentUrl2;
} else {
value = require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */;
value = value.isAttachmentUrl(value2);
r1 = value;
}
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
function isImageExtensionUrl(a0) { // fn#76860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:1782, offset: 0x01de7e18, size: 22 bytes, params: 2, frame: 11
return env0_13.test(a0);
}
function search_76861(a0, a1) { // fn#76861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:1996, offset: 0x01de7e2e, size: 120 bytes, params: 3, frame: 20
const value = a2;
if (a0 === '') {
resetSearch();
} else {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GIF_PICKER_QUERY', query: a0});
if (value !== undefined ? value : false) {
doSearchRequest(a0, a1, a3);
} else {
env0_12(a0, a1, a3);
}
}
}
function fetchSuggestions(a0) { // fn#76862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:2153, offset: 0x01de7ea6, size: 178 bytes, params: 2, frame: 18
var HTTP;
var get;
var object3;
var object4;
const env0_0 = a0;
if (a0 !== '' && a0 != null) {
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
get = HTTP.get;
object3 = {};
object3.url = Endpoints.GIFS_SUGGEST;
object4 = {q: a0};
object4.provider = (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest();
object4.limit = 5;
object4.locale = LocaleStore.locale;
object3.query = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(get, HTTP, [object3]).then(_fun76863);
}
}
function trackSelectGIF({type, index, offset, limit, results, totalResults, query, gifId}) { // fn#76864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:2498, offset: 0x01de7fa2, size: 316 bytes, params: 2, frame: 25
var object2;
const gifPickerUtilsModule = require(9819) /* metro dependency 9819: GIFPickerUtils */;
const value3 = gifPickerUtilsModule.calculateAnalyticsMetadata(GIFPickerViewStore.getAnalyticsID(), type,
{offset: offset, limit: limit, results: results, totalResults: totalResults});
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const SEARCH_RESULT_SELECTED = AnalyticEvents.SEARCH_RESULT_SELECTED;
object2 = {};
copyDataProperties(object2, value3, undefined);
object2['index_num'] = index;
object2['source_object'] = 'GIF Picker';
object2['query'] = query;
Reflect.apply(trackWithMetadata, defaultImport, [SEARCH_RESULT_SELECTED, object2]);
if (gifId != null) {
(require(507) /* metro dependency 507: HTTPUtils */).HTTP.post({url: Endpoints.GIFS_SELECT, body: {id: gifId,
q: query,
provider: (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest()},
oldFormErrors: true, rejectWithError: true});
}
}
function initializeSearch_76865() { // fn#76865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:2987, offset: 0x01de80de, size: 152 bytes, params: 1, frame: 19
const value3 = (require(491) /* metro dependency 491 */).v4().replace(env0_11, '');
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const SEARCH_OPENED = AnalyticEvents.SEARCH_OPENED;
const GIF = SearchTypes.GIF;
Reflect.apply(trackWithMetadata, defaultImport, [SEARCH_OPENED, {search_type: GIF, load_id: value3}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun76866);
}
function fetchTrending() { // fn#76867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:3224, offset: 0x01de81b3, size: 156 bytes, params: 1, frame: 17
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object3 = {};
const GIFS_TRENDING = Endpoints.GIFS_TRENDING;
object3.url = GIFS_TRENDING;
const object4 = {};
object4.provider = (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest();
object4.locale = LocaleStore.locale;
object4.media_format = GIFPickerViewStore.getSelectedFormat();
object3.query = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(get, HTTP, [object3]).then(_fun76868);
}
function fetchTrendingGIFs(a0) { // fn#76869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:3605, offset: 0x01de82a4, size: 215 bytes, params: 2, frame: 21
const env0_0 = a0;
const Date = global.Date;
const env0_1 = Date.now();
const trackSearchStart_76852Binding = trackSearchStart_76852;
const TRENDING_GIFS = GIFPickerResultTypes.TRENDING_GIFS;
trackSearchStart_76852Binding(TRENDING_GIFS);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object3 = {};
const GIFS_TRENDING_GIFS = Endpoints.GIFS_TRENDING_GIFS;
object3.url = GIFS_TRENDING_GIFS;
const object4 = {};
object4.media_format = GIFPickerViewStore.getSelectedFormat();
object4.provider = (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest();
object4.locale = LocaleStore.locale;
object4.limit = a0;
object3.query = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(get, HTTP, [object3]).then(_fun76870, _fun76871);
}
function addFavoriteGIF(a0) { // fn#76872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:4125, offset: 0x01de8415, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
const updateAsync = FrecencyUserSettingsActionCreators.updateAsync;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteGifs', _fun76873, INFREQUENT_USER_ACTION]);
}
function removeFavoriteGIF(a0) { // fn#76875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:5341, offset: 0x01de87f8, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
const updateAsync = FrecencyUserSettingsActionCreators.updateAsync;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteGifs', _fun76876, INFREQUENT_USER_ACTION]);
}
function fetchTrendingSearchTerms() { // fn#76877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:5637, offset: 0x01de88d4, size: 141 bytes, params: 1, frame: 17
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object3 = {};
const GIFS_TRENDING_SEARCH = Endpoints.GIFS_TRENDING_SEARCH;
object3.url = GIFS_TRENDING_SEARCH;
const object4 = {};
object4.provider = (require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest();
object4.limit = 5;
object4.locale = LocaleStore.locale;
object3.query = object4;
object3.oldFormErrors = true;
object3.rejectWithError = true;
Reflect.apply(get, HTTP, [object3]).then(_fun76878);
}
function _fun76855({body}) { // fn#76855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:1124, offset: 0x01de7c47, size: 108 bytes, params: 2, frame: 17
let value = environment.__proto__;
trackSearchResultViewed_76853(body, require, {startTime: env0_3, limit: importDefault});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GIF_PICKER_QUERY_SUCCESS', query: env0_0, items: body});
}
function _fun76856() { // fn#76856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:1263, offset: 0x01de7cb3, size: 61 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GIF_PICKER_QUERY_FAILURE',
query: env0_0});
}
function _fun76863({body}) { // fn#76863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:2360, offset: 0x01de7f58, size: 74 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GIF_PICKER_SUGGESTIONS_SUCCESS',
query: env0_0, items: body});
}
function _fun76866() { // fn#76866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:3136, offset: 0x01de8176, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GIF_PICKER_INITIALIZE',
analyticsID: env0_0});
}
function _fun76868({body}) { // fn#76868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:3434, offset: 0x01de824f, size: 85 bytes, params: 2, frame: 15
const categories = body.categories;
const gifs = body.gifs;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GIF_PICKER_TRENDING_FETCH_SUCCESS', trendingCategories: categories,
trendingGIFPreview: gifs[0]});
}
function _fun76870({body}) { // fn#76870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:3884, offset: 0x01de837b, size: 105 bytes, params: 2, frame: 17
let value = environment.__proto__;
const trackSearchResultViewed_76853Binding = trackSearchResultViewed_76853;
const TRENDING_GIFS = GIFPickerResultTypes.TRENDING_GIFS;
trackSearchResultViewed_76853Binding(body, TRENDING_GIFS, {startTime: env0_1, limit: env0_0});
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GIF_PICKER_QUERY_SUCCESS', items: body});
}
function _fun76871() { // fn#76871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:4025, offset: 0x01de83e4, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GIF_PICKER_QUERY_FAILURE'});
}
function _fun76873(a0) { // fn#76873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:4224, offset: 0x01de8461, size: 908 bytes, params: 2, frame: 25
var r15;
var r6;
var r5;
var value6;
var value7;
var value8;
var value9;
var value10;
var defaultImport5;
var show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const max = defaultImport.max;
const Object = global.Object;
const values = Object.values;
let gifs = a0.gifs;
const value2 = Reflect.apply(values, Object, [gifs]);
const r8 = Reflect.apply(max, defaultImport, [value2.map(function(a0) {
return a0.order;
})]) ?? 0;
let binding = env0_0;
const regexp = RegExp('\\.(mp4|webm)(\\?|$)', 'i');
let r9 = regexp.test(binding.src) ? binding.gifSrc == null || binding.gifSrc === '' ? isProxiedAttachment(binding) && binding.gifSrc != null ? binding.gifSrc : binding.src : binding.gifSrc !== binding.src || isProxiedAttachment(binding) && binding.gifSrc != null ? binding.gifSrc : binding.src : isProxiedAttachment(binding) && binding.gifSrc != null ? binding.gifSrc : binding.src;
if (isProxiedAttachment(binding)) {
if (isImageExtensionUrl(r9)) {
value6 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(r9);
if (value6 == null) {
r6 = r9;
} else {
value7 = value6.pathname.toLowerCase();
value8 = value7.endsWith('.webp');
value9 = value7.endsWith('.avif');
value10 = value7.endsWith('.gif');
if (value8) {
if (value9 || value10) {
value6.searchParams.set('format', 'webp');
}
value6.searchParams.set('animated', 'true');
r9 = value6.toString();
} else if (value9) {
if (value9 || value10) {
value6.searchParams.set('format', 'webp');
}
value6.searchParams.set('animated', 'true');
r9 = value6.toString();
} else if (value10) {
if (value9 || value10) {
value6.searchParams.set('format', 'webp');
}
value6.searchParams.set('animated', 'true');
r9 = value6.toString();
}
r6 = r9;
r15 = value7;
}
r5 = r6;
} else {
r5 = r9;
}
} else {
r5 = r9;
}
r5 = r5.startsWith('//') ? 'https:' + r5 : r5;
r9 = isImageExtensionUrl(r5) ? (require(1349) /* metro dependency 1349: frecency_user_settings */).GIFType.IMAGE : env0_0.format;
gifs = a0.gifs;
const gifUrlKeyBinding = gifUrlKey;
binding = env0_0;
const value13 = gifUrlKeyBinding(binding.url);
let object2 = {};
copyDataProperties(object2, binding, r15);
object2['src'] = r5;
object2['format'] = r9;
object2['order'] = r8 + 1;
gifs[value13] = object2;
const FavoriteGIFs = (require(1349) /* metro dependency 1349: frecency_user_settings */).FavoriteGIFs;
if (FavoriteGIFs.toBinary(a0).length > MAX_FAVORITE_GIFS_SIZE) {
defaultImport5 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport5.show;
object2 = {};
object2.title = intl.string(t['+XYXtZ']);
object2.body = intl.string(t.YSDH9n);
Reflect.apply(show, defaultImport5, [object2]);
return false;
}
const defaultImport3 = defaultImport;
const value14 = defaultImport3.size(a0.gifs);
if (value14 > 2) {
a0.hideTooltip = true;
}
const defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport4.track;
const GIF_FAVORITED = AnalyticEvents.GIF_FAVORITED;
Reflect.apply(track, defaultImport4, [GIF_FAVORITED, {total_num_favorited: value14}]);
}
function _fun76876(a0) { // fn#76876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:5443, offset: 0x01de8844, size: 144 bytes, params: 2, frame: 18
var value3;
const binding = env0_0;
let gifs = a0.gifs;
const value2 = binding in gifs;
gifs = a0.gifs;
if (value2) {
delete gifs[env0_0];
} else {
value3 = environment.__proto__;
delete gifs[gifUrlKey(env0_0)];
}
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const GIF_UNFAVORITED = AnalyticEvents.GIF_UNFAVORITED;
value = importDefault(22) /* metro dependency 22 */;
Reflect.apply(track, defaultImport, [GIF_UNFAVORITED, {total_num_favorited: value.size(a0.gifs)}]);
}
function _fun76878({body}) { // fn#76878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10000:5838, offset: 0x01de8961, size: 62 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GIF_PICKER_TRENDING_SEARCH_TERMS_SUCCESS', items: body});
}
@@ -0,0 +1,181 @@
/* Metro module 10265; source: actions/GamesActionCreators.native.tsx; dependencies: [5, 661, 4237, 676, 6886, 3853, 694, 507, 8045, 8087, 8109, 2] */
function _fun79675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:6, offset: 0x01e5dd05, size: 349 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = function(a0, a1) {
var value = a0.replace(RegExp('\\/+$', ''), '');
var GAME_INVITE_FRAGMENT = DiscordConnectDeeplinks.GAME_INVITE_FRAGMENT;
value = '' + value + GAME_INVITE_FRAGMENT + a1;
importDefault(dependencyMap[5]).openURL(value, WebBrowserType.SAFARI);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.Endpoints;
const env0_5 = constantsModule.DiscordConnectDeeplinks;
const env0_6 = constantsModule.WebBrowserType;
const env0_7 = constantsModule.ActivityFlags;
const env0_8 = (require(4237) /* metro dependency 4237: Constants */).ActivityIntent;
object2 = {addGame: function() {
}, toggleOverlay: function() {
}, editName: function() {
}, identifyGame: function() {
var Promise = global.Promise;
var Error = global.Error;
return Promise.reject(new Error('not supported'));
}, getDetectableGames: function() {
}, reportUnverifiedGame: function() {
}, uploadIcon: function() {
}, deleteEntry: function() {
}, launch: function() {
var Promise = global.Promise;
return Promise.resolve();
}, join: join_79689, joinWithSecret: closure};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/GamesActionCreators.native.tsx');
exports.default = object2;
}
function fetchJoinSecret({userId, sessionId, application, channelId, messageId, remotePartyId}, a1) { // fn#79676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:220, offset: 0x01e5de62, size: 249 bytes, params: 3, frame: 23
var object2;
const env0_0 = a1;
const id = application.id;
const r4 = channelId != null && messageId != null ? {channel_id: channelId, message_id: messageId,
headless: true} : undefined;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_JOIN_LOADING',
applicationId: id, remotePartyId: remotePartyId});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
object2 = {'url': null, 'retries': 3, 'query': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.USER_ACTIVITY_JOIN(userId, sessionId, id);
object2.query = r4;
return Reflect.apply(get, HTTP, [object2]).then(function(a0) {
return require(a0);
}, _fun79678);
}
function join_79689(a0) { // fn#79689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:1038, offset: 0x01e5e00b, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun79691)();
}
function _fun79678() { // fn#79678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:622, offset: 0x01e5df5b, size: 62 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_JOIN_FAILED',
applicationId: id});
return false;
}
function* _fun79691() { // fn#79691, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:1044, offset: 0x01e5e03a, size: 323 bytes, params: 1, frame: 23
var environment;
var binding;
var canLaunchFrame2;
var binding2;
if (false) {
return undefined;
}
value = environment.__proto__;
const application = require.application;
const channelId = require.channelId;
const embedded = require.embedded;
const source = require.source;
const locationObject = require.locationObject;
const value3 = undefined;
const r9 = value3 !== locationObject ? locationObject : {};
const analyticsLocations = require.analyticsLocations;
const r8 = value3 !== analyticsLocations ? analyticsLocations : [];
const remotePartyId = require.remotePartyId;
if (embedded) {
value = environment.__proto__.__proto__;
binding = env2_0;
canLaunchFrame2 = binding(env2_2[8]).canLaunchFrame(application);
binding = env2_1;
binding2 = env2_2;
if (canLaunchFrame2) {
value = binding(binding2[9]);
yield value.launchFrame({applicationId: application.id});
value = undefined;
if (false) {
return value;
}
return true;
}
value = binding(binding2[10]);
yield value({applicationId: application.id, activityChannelId: channelId ?? value3, source: source,
locationObject: r9, analyticsLocations: r8});
value = undefined;
if (false) {
return value;
}
return value != null && value;
}
return remotePartyId != null ? env2_9(require, function() {
return true;
}) : joinViaDeeplink(require);
}
function joinViaDeeplink(a0) { // fn#79693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:1489, offset: 0x01e5e17d, size: 185 bytes, params: 2, frame: 18
var environment;
const env0_0 = a0;
const application = a0.application;
const id = application.id;
const value = environment.__proto__.__proto__.__proto__;
const DISCORD_CONNECT_EXAMPLE_APP_APPLICATION_ID = env3_0(env3_2[3]).DISCORD_CONNECT_EXAMPLE_APP_APPLICATION_ID;
return (id === DISCORD_CONNECT_EXAMPLE_APP_APPLICATION_ID ? env3_0(env3_2[3]).DISCORD_CONNECT_EXAMPLE_APP_DEEPLINK_URI : application.deeplink_uri) != null || env3_1(env3_2[4])(a0.applicationActivity,
env3_7.SUPPORTS_JOIN_URL) ? env3_9(a0, _fun79694) : global.Promise.resolve(false);
}
function _fun79694(a0) { // fn#79694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10451:1749, offset: 0x01e5e236, size: 402 bytes, params: 2, frame: 20
var r0;
var value;
var value2;
var binding;
var value3;
var dispatch;
var applicationBinding;
var embedded;
var value4;
var binding2;
var value6;
var value7;
const join_url = a0.body.join_url;
const secret = a0.body.secret;
if (join_url != null) {
value = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
binding2 = env4_2;
value6 = binding(binding2[5]);
value6.openURL(join_url, env4_6.SAFARI);
value7 = binding(binding2[6]);
dispatch = value7.dispatch;
applicationBinding = application;
embedded = env0_0.embedded;
value = embedded != null;
Reflect.apply(dispatch, value7, [{type: 'ACTIVITY_JOIN', applicationId: applicationBinding.id,
parentApplicationId: applicationBinding.parent_id, secret: secret, intent: env4_8.PLAY,
embedded: value && embedded}]);
value = true;
r0 = value;
} else if (env0_1 == null) {
value4 = environment.__proto__.__proto__.__proto__.__proto__;
env4_1(env4_2[6]).dispatch({type: 'ACTIVITY_JOIN_FAILED', applicationId: application.id});
r0 = false;
} else {
value2 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_10;
binding(env0_1, secret);
binding = env4_1;
value3 = binding(env4_2[6]);
dispatch = value3.dispatch;
applicationBinding = application;
embedded = env0_0.embedded;
value = embedded != null;
Reflect.apply(dispatch, value3, [{type: 'ACTIVITY_JOIN', applicationId: applicationBinding.id,
parentApplicationId: applicationBinding.parent_id, secret: secret, intent: env4_8.PLAY,
embedded: value && embedded}]);
value = true;
r0 = value;
}
return r0;
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,30 @@
/* Metro module 9576; source: actions/GuildAffinitiesActionCreators.tsx; dependencies: [661, 507, 694, 2] */
function _fun74931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9762:6, offset: 0x01d9dfd0, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/GuildAffinitiesActionCreators.tsx');
exports.fetchGuildAffinities = fetchGuildAffinities;
}
function fetchGuildAffinities() { // fn#74932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9762:214, offset: 0x01d9e04c, size: 95 bytes, params: 1, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const GUILD_AFFINITIES = Endpoints.GUILD_AFFINITIES;
return Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: GUILD_AFFINITIES}]).then(_fun74933, _fun74934);
}
function _fun74933({body}) { // fn#74933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9762:338, offset: 0x01d9e0ab, size: 70 bytes, params: 2, frame: 14
const guild_affinities = body.guild_affinities;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'LOAD_GUILD_AFFINITIES_SUCCESS', guildAffinities: guild_affinities});
}
function _fun74934() { // fn#74934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9762:448, offset: 0x01d9e0f1, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_GUILD_AFFINITIES_FAILURE'});
}
@@ -0,0 +1,106 @@
/* Metro module 6903; source: actions/GuildSubscriptionsActionCreators.tsx; dependencies: [694, 6890, 2] */
function _fun54925(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:6, offset: 0x0137113b, size: 171 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = subscribeChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/GuildSubscriptionsActionCreators.tsx');
exports.subscribeMembers = subscribeMembers;
exports.unsubscribeMembers = unsubscribeMembers;
exports.subscribeToMemberUpdates = subscribeToMemberUpdates;
exports.unsubscribeFromMemberUpdates = unsubscribeFromMemberUpdates;
exports.subscribeGuild = subscribeGuild;
exports.subscribeChannel = closure;
exports.subscribeChannelDimensions = subscribeChannelDimensions;
}
function subscribeChannel(a0, a1, a2) { // fn#54926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:43, offset: 0x013711e6, size: 70 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SUBSCRIPTIONS_CHANNEL',
guildId: a0, channelId: a1, ranges: a2});
}
function subscribeMembers(a0, a1) { // fn#54927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:308, offset: 0x0137122c, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SUBSCRIPTIONS_MEMBERS_ADD',
guildId: a0, userIds: a1});
}
function unsubscribeMembers(a0, a1) { // fn#54928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:440, offset: 0x0137126b, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SUBSCRIPTIONS_MEMBERS_REMOVE',
guildId: a0, userIds: a1});
}
function subscribeToMemberUpdates(a0) { // fn#54929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:583, offset: 0x013712aa, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SUBSCRIPTIONS_ADD_MEMBER_UPDATES',
guildId: a0});
}
function unsubscribeFromMemberUpdates(a0) { // fn#54930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:728, offset: 0x013712e1, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SUBSCRIPTIONS_REMOVE_MEMBER_UPDATES',
guildId: a0});
}
function subscribeGuild(a0) { // fn#54931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:866, offset: 0x01371318, size: 53 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SUBSCRIPTIONS', guildId: a0});
}
function subscribeChannelDimensions({guildId, channelId, y, height, rowHeight}) { // fn#54932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:1016, offset: 0x0137134d, size: 223 bytes, params: 2, frame: 24
var r13;
var r5;
var Math;
var max;
var value3;
var value7;
const closure = toIndex;
const closure2 = pushRange;
let value = closure(0.5 * height);
const value2 = closure(y, -value);
value = closure(y + height, value);
reducibleJoin2: while (true) {
if (value2 > 0) {
Math = global.Math;
max = Math.max;
value3 = Reflect.apply(max, Math, [closure2(0), value2]);
r13 = value3;
break reducibleJoin2;
}
r13 = value2;
break reducibleJoin2;
}
Math = global.Math;
const floor = Math.floor;
const MINIMUM_RANGE = (require(6890) /* metro dependency 6890: GuildChannelSubscriptions */).MINIMUM_RANGE;
const value6 = Reflect.apply(floor, Math, [r13 / MINIMUM_RANGE]) * MINIMUM_RANGE;
if (value6 <= value) {
r5 = value6;
reducibleLoop3: while (true) {
value7 = closure2(r5);
if (value7 <= value) {
r5 = value7;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
subscribeChannel(guildId, channelId, []);
}
function toIndex(a0) { // fn#54933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:1102, owner: subscribeChannelDimensions.toIndex, offset: 0x0137142c, size: 86 bytes, params: 2, frame: 18
const value = a1;
const r1 = value !== undefined ? value : 0;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const ceil = Math2.ceil;
const Math3 = global.Math;
return Reflect.apply(max, Math, [0, Reflect.apply(ceil, Math2, [Math3.ceil(a0 / rowHeight)]) + r1]);
}
function pushRange(a0) { // fn#54934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:1182, owner: subscribeChannelDimensions.pushRange, offset: 0x01371482, size: 77 bytes, params: 2, frame: 14
let value = environment.__proto__;
const MINIMUM_RANGE = (require(6890) /* metro dependency 6890: GuildChannelSubscriptions */).MINIMUM_RANGE;
value = a0 + (MINIMUM_RANGE - 1);
const binding = env0_1;
binding.push([a0, value]);
return value + 1;
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,36 @@
/* Metro module 9164; source: actions/InviteSuggestionsActionCreators.tsx; dependencies: [9163, 7693, 694, 2] */
function _fun71872(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9349:6, offset: 0x01d30090, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
require(9163) /* metro dependency 9163: InviteSuggestionsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/InviteSuggestionsActionCreators.tsx');
exports.loadInviteSuggestions = loadInviteSuggestions;
exports.searchInviteSuggestions = searchInviteSuggestions;
}
function loadInviteSuggestions({omitUserIds, guild, channel, applicationId, inviteTargetType}) { // fn#71873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9349:201, offset: 0x01d3010f, size: 106 bytes, params: 2, frame: 12
let value = require(7693) /* metro dependency 7693: UserAffinitiesActionCreators */;
value = value.fetchUserAffinitiesV2();
return value.then(_fun71874);
}
function searchInviteSuggestions(a0) { // fn#71875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9349:516, offset: 0x01d301ff, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'INVITE_SUGGESTIONS_SEARCH', query: a0});
}
function _fun71874() { // fn#71874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9349:347, offset: 0x01d30179, size: 134 bytes, params: 1, frame: 15
var r5;
var set;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
if (omitUserIds != null) {
r5 = omitUserIds;
} else {
set = new global.Set();
}
Reflect.apply(dispatch, value, [{type: 'LOAD_INVITE_SUGGESTIONS', omitUserIds: r5, guild: guild, channel: channel,
applicationId: applicationId, inviteTargetType: inviteTargetType}]);
}
+22
View File
@@ -0,0 +1,22 @@
/* Metro module 5177; source: actions/LayerActionCreators.tsx; dependencies: [694, 2] */
function _fun45591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5355:6, offset: 0x01192afd, size: 123 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/LayerActionCreators.tsx');
exports.pushLayer = pushLayer;
exports.popLayer = popLayer;
exports.popAllLayers = popAllLayers;
}
function pushLayer(a0) { // fn#45592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5355:169, offset: 0x01192b78, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LAYER_PUSH', component: a0});
}
function popLayer() { // fn#45593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5355:253, offset: 0x01192bb0, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LAYER_POP'});
}
function popAllLayers() { // fn#45594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5355:326, offset: 0x01192be0, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LAYER_POP_ALL'});
}
+113
View File
@@ -0,0 +1,113 @@
/* Metro module 13267; source: actions/MFAActionCreators.tsx; dependencies: [12593, 661, 507, 694, 2] */
function _fun101156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:6, offset: 0x0220a128, size: 219 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const mfaStore = importDefault(12593) /* metro dependency 12593: MFAStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {enable: enable_101157, disable: disable_101159, enableSMS: enableSMS, disableSMS: disableSMS,
sendMFABackupCodesVerificationKeyEmail: sendMFABackupCodesVerificationKeyEmail,
confirmViewBackupCodes: confirmViewBackupCodes, clearBackupCodes: clearBackupCodes};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/MFAActionCreators.tsx');
exports.default = object2;
}
function enable_101157({code, secret}) { // fn#101157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:136, offset: 0x0220a203, size: 120 bytes, params: 2, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_TOTP_ENABLE = Endpoints.MFA_TOTP_ENABLE;
return Reflect.apply(post, HTTP, [{url: MFA_TOTP_ENABLE, body: {code: code, secret: secret}, oldFormErrors: true,
rejectWithError: false}]).then(_fun101158);
}
function disable_101159() { // fn#101159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:361, offset: 0x0220a2cf, size: 88 bytes, params: 1, frame: 13
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_TOTP_DISABLE = Endpoints.MFA_TOTP_DISABLE;
Reflect.apply(post, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: MFA_TOTP_DISABLE}]).then(_fun101160);
}
function enableSMS() { // fn#101161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:545, offset: 0x0220a36b, size: 134 bytes, params: 1, frame: 17
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE'});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_SMS_ENABLE = Endpoints.MFA_SMS_ENABLE;
return Reflect.apply(post, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: MFA_SMS_ENABLE}]).then(_fun101162, _fun101163);
}
function disableSMS(a0) { // fn#101164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:814, offset: 0x0220a459, size: 151 bytes, params: 2, frame: 17
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE'});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_SMS_DISABLE = Endpoints.MFA_SMS_DISABLE;
return Reflect.apply(post, HTTP, [{url: MFA_SMS_DISABLE, body: {password: a0}, oldFormErrors: true,
rejectWithError: false}]).then(_fun101165, _fun101166);
}
function sendMFABackupCodesVerificationKeyEmail(a0) { // fn#101167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1129, offset: 0x0220a4f0, size: 113 bytes, params: 2, frame: 15
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_SEND_VERIFICATION_KEY = Endpoints.MFA_SEND_VERIFICATION_KEY;
return Reflect.apply(post, HTTP, [{url: MFA_SEND_VERIFICATION_KEY, body: {password: a0}, oldFormErrors: true,
rejectWithError: false}]).then(_fun101168, function(a0) {
throw a0;
});
}
function confirmViewBackupCodes(a0, a1) { // fn#101170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1390, offset: 0x0220a5bc, size: 165 bytes, params: 3, frame: 17
const env0_0 = a0;
const nonces = MFAStore.getNonces();
const r6 = a1 ? nonces.regenerateNonce : nonces.viewNonce;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const MFA_CODES_VERIFICATION = Endpoints.MFA_CODES_VERIFICATION;
return Reflect.apply(post, HTTP, [{url: MFA_CODES_VERIFICATION, body: {key: a0, nonce: r6, regenerate: a1},
oldFormErrors: true, rejectWithError: false}]).then(_fun101171, function(a0) {
throw a0;
});
}
function clearBackupCodes() { // fn#101173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1715, offset: 0x0220a6b0, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_CLEAR_BACKUP_CODES'});
}
function _fun101158(a0) { // fn#101158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:265, offset: 0x0220a27b, size: 84 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_ENABLE_SUCCESS',
token: a0.body.token, codes: a0.body.backup_codes});
}
function _fun101160({body}) { // fn#101160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:457, offset: 0x0220a327, size: 68 bytes, params: 2, frame: 13
const token = body.token;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
return value.dispatch({type: 'MFA_DISABLE_SUCCESS', token: token});
}
function _fun101162(a0) { // fn#101162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:676, offset: 0x0220a3f1, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE_COMPLETE'});
return a0;
}
function _fun101163(a0) { // fn#101163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:736, offset: 0x0220a425, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SMS_TOGGLE_COMPLETE'});
throw a0;
}
function _fun101168(a0) { // fn#101168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1245, offset: 0x0220a561, size: 91 bytes, params: 2, frame: 14
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_SEND_VERIFICATION_KEY',
nonces: {viewNonce: a0.body.nonce, regenerateNonce: a0.body.regenerate_nonce}});
}
function _fun101171({body}) { // fn#101171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13457:1613, offset: 0x0220a661, size: 79 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MFA_VIEW_BACKUP_CODES',
codes: body.backup_codes, key: env0_0});
}
@@ -0,0 +1,19 @@
/* Metro module 10202; source: actions/MaskedLinkActionCreators.tsx; dependencies: [694, 2] */
function _fun79329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10388:6, offset: 0x01e4e0ec, size: 112 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/MaskedLinkActionCreators.tsx');
exports.trustDomain = trustDomain;
exports.trustProtocol = trustProtocol;
}
function trustDomain(a0) { // fn#79330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10388:176, offset: 0x01e4e15c, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MASKED_LINK_ADD_TRUSTED_DOMAIN',
url: a0});
}
function trustProtocol(a0) { // fn#79331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10388:281, offset: 0x01e4e193, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MASKED_LINK_ADD_TRUSTED_PROTOCOL',
url: a0});
}
+70
View File
@@ -0,0 +1,70 @@
/* Metro module 14769; source: actions/MentionActionCreators.tsx; dependencies: [661, 694, 507, 2] */
function _fun111490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:6, offset: 0x023a4704, size: 211 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.Endpoints;
const env0_4 = constantsModule.MAX_MENTIONS_PER_FETCH;
object2 = {setGuildFilter: setGuildFilter, clearMentions: clearMentions, truncateMentions: truncateMentions,
fetchRecentMentions: fetchRecentMentions, deleteRecentMention: deleteRecentMention,
setRecentMentionsStale: setRecentMentionsStale};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/MentionActionCreators.tsx');
exports.default = object2;
}
function setGuildFilter({guildFilter, roleFilter, everyoneFilter}) { // fn#111491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:150, offset: 0x023a47d7, size: 83 bytes, params: 2, frame: 16
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'SET_RECENT_MENTIONS_FILTER', guildFilter: guildFilter, roleFilter: roleFilter,
everyoneFilter: everyoneFilter});
}
function clearMentions() { // fn#111492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:311, offset: 0x023a482a, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_MENTIONS'});
}
function truncateMentions(a0) { // fn#111493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:370, offset: 0x023a485b, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRUNCATE_MENTIONS', size: a0});
}
function fetchRecentMentions({before, limit, guildId, roles, everyone, feature}) { // fn#111494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:463, offset: 0x023a4893, size: 247 bytes, params: 2, frame: 23
const r9 = limit !== undefined ? limit : MAX_MENTIONS_PER_FETCH;
guildId = guildId === undefined ? null : guildId;
roles = roles === undefined || roles;
everyone = everyone === undefined || everyone;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_RECENT_MENTIONS',
guildId: guildId});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const MENTIONS = Endpoints.MENTIONS;
return Reflect.apply(get, HTTP, [{'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true,
'rejectWithError': true, url: MENTIONS, query: {before: before, limit: r9, guild_id: guildId, roles: roles,
everyone: everyone, feature: feature}}]).then(function({body}) {
var defaultImport = importDefault(dependencyMap[1]);
var object = {type: 'LOAD_RECENT_MENTIONS_SUCCESS', messages: body};
object.isAfter = before != null;
body = body.length;
object.hasMoreAfter = body >= MAX_MENTIONS_PER_FETCH;
defaultImport.dispatch(object);
}, _fun111496);
}
function deleteRecentMention(a0) { // fn#111497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:937, offset: 0x023a4a1b, size: 119 bytes, params: 2, frame: 17
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {'url': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.MENTIONS_MESSAGE_ID(a0);
Reflect.apply(del, HTTP, [object2]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RECENT_MENTION_DELETE', id: a0});
}
function setRecentMentionsStale() { // fn#111498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:1110, offset: 0x023a4a92, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SET_RECENT_MENTIONS_STALE'});
}
function _fun111496() { // fn#111496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:872, offset: 0x023a49ea, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_RECENT_MENTIONS_FAILURE'});
}
File diff suppressed because it is too large. Load diff
+108
View File
@@ -0,0 +1,108 @@
/* Metro module 5080; source: actions/ModalActionCreators.tsx; dependencies: [661, 5081, 4007, 5082, 694, 4008, 5083, 2] */
function _fun44100(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:6, offset: 0x011683ba, size: 188 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(661) /* metro dependency 661: Constants */).AppContext;
object2 = {push: push_44101, pushLazy: pushLazy, updateAnimation: updateAnimation, pop: pop_44108,
popWithKey: popWithKey, popAboveKey: popAboveKey, popAll: popAll};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ModalActionCreators.tsx');
exports.default = object2;
}
function push_44101(a0, a1) { // fn#44101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:125, offset: 0x01168476, size: 209 bytes, params: 3, frame: 23
var r0;
let value = a2;
const value2 = a4;
if (value !== undefined) {
r0 = value;
} else {
value = importDefault(5081) /* metro dependency 5081 */;
value = value('modal');
r0 = value;
}
const r4 = value2 !== undefined ? value2 : AppContext.APP;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const pushModal = navigationRouteUtilsNativeModule.pushModal;
const object2 = {key: r0};
object2.modal = (importDefault(5082) /* metro dependency 5082: getDeprecatedModalData */)(a0, {}, a1, r0);
copyDataProperties(object2, a3, a1);
Reflect.apply(pushModal, navigationRouteUtilsNativeModule, [object2]);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'MODAL_PUSH', modal: a0, props: a1, key: r0, appContext: r4});
return r0;
}
function pushLazy(a0, a1) { // fn#44102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:294, offset: 0x01168547, size: 215 bytes, params: 3, frame: 15
var r0;
let value = a2;
const env0_1 = a0;
const env0_2 = a1;
if (value !== undefined) {
r0 = value;
} else {
value = importDefault(5081) /* metro dependency 5081 */;
value = value('modal');
r0 = value;
}
const env0_4 = a3;
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
return value == null ? new global.Promise(_fun44105) : value.isReady() ? (a0 instanceof global.Promise ? a0.then(function(a0) {
return a0.default;
}) : a0()).then(_fun44104) : new global.Promise(_fun44105);
}
function updateAnimation(a0, a1) { // fn#44107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:546, offset: 0x011686aa, size: 77 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MODAL_UPDATE', key: a0, props: {},
partial: true, animation: a1});
}
function pop_44108() { // fn#44108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:646, offset: 0x011686f7, size: 75 bytes, params: 1, frame: 13
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal();
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MODAL_POP'});
}
function popWithKey(a0, a1) { // fn#44109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:709, offset: 0x01168742, size: 92 bytes, params: 3, frame: 16
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal(a0, a1);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MODAL_POP', key: a0, onExited: a1});
}
function popAboveKey(a0) { // fn#44110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:814, offset: 0x0116879e, size: 41 bytes, params: 2, frame: 11
return (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModalsAboveKey(a0);
}
function popAll() { // fn#44111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:846, offset: 0x011687c7, size: 344 bytes, params: 1, frame: 16
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popAllModals();
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MODAL_POP_ALL'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMAIL_VERIFICATION_MODAL_CLOSE'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_CLOSE'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'HIDE_ACTION_SHEET'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DISPLAYED_INVITE_CLEAR'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_SETTINGS_MODAL_CLOSE'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'QUICKSWITCHER_HIDE'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_CLOSE'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CONNECTIONS_GRID_MODAL_HIDE'});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_MODAL_CLOSE'});
}
function _fun44104(a0) { // fn#44104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:454, offset: 0x0116861e, size: 36 bytes, params: 2, frame: 17
const binding = env0_0;
return binding.push(a0, require, env0_3, importAll);
}
function _fun44105(a0) { // fn#44105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:491, offset: 0x01168642, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (importDefault(5083) /* metro dependency 5083: ModalDispatchQueue */).enqueue(_fun44106);
}
function _fun44106() { // fn#44106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5258:511, offset: 0x01168676, size: 52 bytes, params: 1, frame: 18
const binding = env0_0;
const value = environment.__proto__;
const binding2 = env1_0;
return binding(binding2.pushLazy(env1_1, require, env1_3, importAll));
}
+18
View File
@@ -0,0 +1,18 @@
/* Metro module 10337; source: actions/NoteActionCreators.tsx; dependencies: [661, 507, 2] */
function _fun80118(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10523:6, offset: 0x01e6d1fe, size: 124 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 */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/NoteActionCreators.tsx');
exports.default = {updateNote: function(a0, a1) {
var HTTP = require(dependencyMap[1]).HTTP;
var object = {};
object.url = Endpoints.NOTE(a0);
object.body = {note: a1};
object.oldFormErrors = true;
object.rejectWithError = true;
return HTTP.put(object);
}};
}
+23
View File
@@ -0,0 +1,23 @@
/* Metro module 14920; source: actions/NoticeActionCreators.tsx; dependencies: [694, 2] */
function _fun112880(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15117:6, offset: 0x023dffd3, size: 118 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {show: show_112881, dismiss: dismiss};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/NoticeActionCreators.tsx');
exports.default = object2;
}
function show_112881(a0, a1, a2, a3, a4) { // fn#112881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15117:99, offset: 0x023e0049, size: 92 bytes, params: 6, frame: 14
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTICE_SHOW', notice: {id: a4,
type: a0, message: a1, buttonText: a2, callback: a3}});
}
function dismiss(a0) { // fn#112882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15117:210, offset: 0x023e00a5, size: 58 bytes, params: 2, frame: 14
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {type: 'NOTICE_DISMISS'};
copyDataProperties(object2, a0, 'NOTICE_DISMISS');
Reflect.apply(dispatch, value, [object2]);
}
@@ -0,0 +1,125 @@
/* Metro module 13914; source: actions/NotificationActionCreators.tsx; dependencies: [661, 683, 694, 2] */
function _fun105630(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:6, offset: 0x022be66a, size: 285 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.DesktopNotificationTypes;
const env0_3 = constantsModule.NotificationPermissionTypes;
const env0_4 = constantsModule.AnalyticEvents;
object2 = {setDesktopType: setDesktopType, setTTSType: setTTSType, setDisabledSounds: setDisabledSounds,
toggleDisableAllSounds: toggleDisableAllSounds, setDisableUnreadBadge: setDisableUnreadBadge,
setTaskbarFlash: setTaskbarFlash, setNotifyMessagesInSelectedChannel: setNotifyMessagesInSelectedChannel,
setScreenDowntimeReminder: setScreenDowntimeReminder, setPermissionsState: setPermissionsState,
showNotification: showNotification_105640, clickedNotification: clickedNotification};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/NotificationActionCreators.tsx');
exports.default = object2;
}
function setDesktopType(a0) { // fn#105631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:189, offset: 0x022be787, size: 113 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
const ALL = DesktopNotificationTypes.ALL;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {notifications_enabled: a0 === ALL}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_DESKTOP_TYPE',
desktopType: a0});
}
function setTTSType(a0) { // fn#105632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:354, offset: 0x022be7f8, size: 108 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
const object2 = {};
object2.tts_type = a0.toString();
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, object2]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_TTS_TYPE',
ttsType: a0});
}
function setDisabledSounds(a0) { // fn#105633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:497, offset: 0x022be864, size: 97 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {disabled_sounds: a0}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_DISABLED_SOUNDS',
sounds: a0});
}
function toggleDisableAllSounds(a0) { // fn#105634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:649, offset: 0x022be8c5, size: 97 bytes, params: 2, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {all_sounds_enabled: !a0}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_TOGGLE_ALL_DISABLED'});
}
function setDisableUnreadBadge(a0) { // fn#105635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:801, offset: 0x022be926, size: 102 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {unread_badge_enabled: !a0}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE',
disableUnreadBadge: a0});
}
function setTaskbarFlash(a0) { // fn#105636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:980, offset: 0x022be98c, size: 99 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {show_taskbar_flash: a0}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_TASKBAR_FLASH',
taskbarFlash: a0});
}
function setNotifyMessagesInSelectedChannel(a0) { // fn#105637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:1137, offset: 0x022be9ef, size: 99 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {notify_messages_in_selected_channel: a0}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_NOTIFY_MESSAGES_IN_SELECTED_CHANNEL',
notify: a0});
}
function setScreenDowntimeReminder(a0) { // fn#105638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:1346, offset: 0x022bea52, size: 97 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOCAL_SETTINGS_UPDATED = AnalyticEvents.LOCAL_SETTINGS_UPDATED;
Reflect.apply(track, defaultImport, [LOCAL_SETTINGS_UPDATED, {screen_downtime_reminder: a0}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER',
screenDowntimeReminder: a0});
}
function setPermissionsState(a0, a1) { // fn#105639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:1540, offset: 0x022beab3, size: 120 bytes, params: 3, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ENABLE_NOTIFICATIONS = AnalyticEvents.ENABLE_NOTIFICATIONS;
const ENABLED = NotificationPermissionTypes.ENABLED;
Reflect.apply(track, defaultImport, [ENABLE_NOTIFICATIONS, {enabled: a0 === ENABLED, source: a1}]);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATIONS_SET_PERMISSION_STATE',
enabled: a0, source: a1});
}
function showNotification_105640(a0, a1, a2, a3, a4) { // fn#105640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:1718, offset: 0x022beb2b, size: 119 bytes, params: 6, frame: 16
const env0_0 = a4;
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object = {};
copyDataProperties(object, a4, a4);
object['onClick'] = showNotification_105640OnClick;
Reflect.apply(dispatch, value, [{type: 'NOTIFICATION_CREATE', icon: a0, title: a1, body: a2, trackingProps: a3,
options: object}]);
}
function clickedNotification() { // fn#105642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:1935, offset: 0x022bebf6, size: 47 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CLICK'});
}
function showNotification_105640OnClick(a0) { // fn#105641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14111:1843, owner: showNotification_105640.onClick, offset: 0x022beba2, size: 84 bytes, params: 2, frame: 13
if (env0_0.onClick != null) {
env0_0.onClick(a0);
}
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CLICK'});
}
@@ -0,0 +1,173 @@
/* Metro module 6613; source: actions/NotificationSettingsModalActionCreators.tsx; dependencies: [5, 4864, 661, 3796, 670, 694, 6610, 6612, 21, 4002, 1244, 1391, 507, 2] */
function _fun52243(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:6, offset: 0x01323731, size: 287 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const env0_6 = (require(3796) /* metro dependency 3796: NotificationConstants */).NotificationSettingsUpdateType;
const env0_7 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
object2 = {open: open_52244, close: close_52245, updateGuildNotificationSettings: updateGuildNotificationSettings,
updateGuildAndChannelNotificationSettings: updateGuildAndChannelNotificationSettings,
updateChannelOverrideSettings: updateChannelOverrideSettings,
updateChannelOverrideSettingsBulk: updateChannelOverrideSettingsBulk,
updateAppDMOverrideSettings: updateAppDMOverrideSettings, setForumThreadsCreated: setForumThreadsCreated,
setAccountFlag: setAccountFlag};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/NotificationSettingsModalActionCreators.tsx');
exports.default = object2;
}
function open_52244(a0) { // fn#52244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:223, offset: 0x01323850, size: 54 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_SETTINGS_MODAL_OPEN',
guildId: a0});
}
function close_52245() { // fn#52245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:302, offset: 0x01323886, size: 47 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_SETTINGS_MODAL_CLOSE'});
}
function updateGuildNotificationSettings(a0, a1, a2, a3) { // fn#52246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:372, offset: 0x013238b5, size: 147 bytes, params: 5, frame: 23
const currentGuildSettings = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).getCurrentGuildSettings(a0);
(importDefault(6612) /* metro dependency 6612: UserGuildSettingsManager */).saveUserGuildSettings(a0, a1);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_GUILD_SETTINGS_GUILD_UPDATE',
guildId: a0, settings: a1});
(require(6610) /* metro dependency 6610: NotificationSettingsUtils */).trackGuildNotificationSettingsUpdate(a0, a1,
currentGuildSettings, a2, a3);
}
function updateGuildAndChannelNotificationSettings(a0, a1, a2, a3) { // fn#52247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:627, offset: 0x01323948, size: 264 bytes, params: 5, frame: 28
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value2 = defaultImport.keys(a1.channel_overrides);
let value = require(6610) /* metro dependency 6610: NotificationSettingsUtils */;
value = value.getCurrentGuildSettings(a0);
const env0_4 = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).getManyCurrentChannelSettings(a0,
value2);
(importDefault(6612) /* metro dependency 6612: UserGuildSettingsManager */).saveUserGuildSettings(a0, a1);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_GUILD_SETTINGS_GUILD_AND_CHANNELS_UPDATE',
guildId: a0, settings: a1});
(require(6610) /* metro dependency 6610: NotificationSettingsUtils */).trackGuildNotificationSettingsUpdate(a0, a1,
value, a2, a3);
value = Reflect.apply(defaultImport.keys, value, [a1.channel_overrides]);
value.forEach(_fun52248);
}
function updateChannelOverrideSettings(a0, a1, a2, a3, a4) { // fn#52249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:1183, offset: 0x01323ac0, size: 265 bytes, params: 6, frame: 23
const currentChannelSettings = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).getCurrentChannelSettings(a0,
a1);
(importDefault(6612) /* metro dependency 6612: UserGuildSettingsManager */).saveUserGuildSettings(a0,
{channel_overrides: {[a1]: a2}});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_GUILD_SETTINGS_CHANNEL_UPDATE',
guildId: a0, channelId: a1, settings: a2});
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MlIsJ8 = (require(1244) /* metro dependency 1244: indexNative */).t.MlIsJ8;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [MlIsJ8])]);
const value = require(6610) /* metro dependency 6610: NotificationSettingsUtils */;
value.trackChannelNotificationSettingsUpdate({guildId: a0, channelId: a1, change: a2,
previous: currentChannelSettings, label: a3, location: a4});
}
function updateChannelOverrideSettingsBulk(a0, a1, a2, a3) { // fn#52250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:1618, offset: 0x01323bc9, size: 205 bytes, params: 5, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).getManyCurrentChannelSettings(a0,
(importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(a1));
(importDefault(6612) /* metro dependency 6612: UserGuildSettingsManager */).saveUserGuildSettings(a0,
{channel_overrides: a1});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK',
guildId: a0, overrides: a1});
let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.keys(a1);
value.forEach(_fun52251);
}
function updateAppDMOverrideSettings(a0, a1, a2, a3, a4) { // fn#52252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:2024, offset: 0x01323d00, size: 280 bytes, params: 6, frame: 24
const currentChannelSettings = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).getCurrentChannelSettings(a0,
a1);
(importDefault(6612) /* metro dependency 6612: UserGuildSettingsManager */).saveUserGuildSettings(a0,
{channel_overrides: {[a1]: a3}});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_GUILD_SETTINGS_CHANNEL_UPDATE',
guildId: a0, channelId: a1, settings: a3});
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MlIsJ8 = (require(1244) /* metro dependency 1244: indexNative */).t.MlIsJ8;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [MlIsJ8])]);
const notificationSettingsUtilsModule = require(6610) /* metro dependency 6610: NotificationSettingsUtils */;
const trackChannelNotificationSettingsUpdate = notificationSettingsUtilsModule.trackChannelNotificationSettingsUpdate;
const AUTHORIZED_APP_DM = NotificationSettingsUpdateType.AUTHORIZED_APP_DM;
Reflect.apply(trackChannelNotificationSettingsUpdate, notificationSettingsUtilsModule,
[{updateType: AUTHORIZED_APP_DM, guildId: a0, channelId: a1, applicationId: a2, change: a3,
previous: currentChannelSettings, label: a4}]);
}
function setForumThreadsCreated(a0, a1) { // fn#52253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:2493, offset: 0x01323e18, size: 158 bytes, params: 3, frame: 21
const r7 = a1 ? ChannelNotificationSettingsFlags.NEW_FORUM_THREADS_ON : ChannelNotificationSettingsFlags.NEW_FORUM_THREADS_OFF;
const r1 = a1 ? ChannelNotificationSettingsFlags.NEW_FORUM_THREADS_OFF : ChannelNotificationSettingsFlags.NEW_FORUM_THREADS_ON;
const channelFlags = UserGuildSettingsStore.getChannelFlags(a0);
const updateChannelOverrideSettings = this.updateChannelOverrideSettings;
const guild_id = a0.guild_id;
const id = a0.id;
const object2 = {flags: channelFlags & ~r1 | r7};
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, this, [guild_id, id, object2,
NotificationLabel.forumThreadsCreated(a1)]);
}
function setAccountFlag(a0, a1) { // fn#52254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:2782, offset: 0x01323eb6, size: 41 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun52256)();
}
function _fun52248(a0) { // fn#52248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:1028, offset: 0x01323a50, size: 112 bytes, params: 2, frame: 16
(require(6610) /* metro dependency 6610: NotificationSettingsUtils */).trackChannelNotificationSettingsUpdate({guildId: env0_0,
channelId: a0, change: require.channel_overrides[a0], previous: env0_4.get(a0), label: importDefault,
location: importAll});
}
function _fun52251(a0) { // fn#52251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:1897, offset: 0x01323c96, size: 106 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(6610) /* metro dependency 6610: NotificationSettingsUtils */;
const trackChannelNotificationSettingsUpdate = value.trackChannelNotificationSettingsUpdate;
const object2 = {};
object2.guildId = env0_0;
object2.channelId = a0;
object2.change = require[a0];
object2.previous = env0_4.get(a0);
object2.label = importDefault;
object2.location = importAll;
return Reflect.apply(trackChannelNotificationSettingsUpdate, value, [object2]);
}
function* _fun52256() { // fn#52256, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6791:2792, offset: 0x01323ee8, size: 219 bytes, params: 1, frame: 20
if (true) {
value = environment.__proto__.__proto__;
var flags = env2_4.accountNotificationSettings.flags;
var binding = env2_0;
var binding2 = env2_2;
var value5 = binding(binding2[11]).setFlag(flags, require, importDefault);
var HTTP = binding(binding2[12]).HTTP;
var patch = HTTP.patch;
var ACCOUNT_NOTIFICATION_SETTINGS = env2_5.ACCOUNT_NOTIFICATION_SETTINGS;
yield Reflect.apply(patch, HTTP, [{url: ACCOUNT_NOTIFICATION_SETTINGS, body: {flags: value5},
rejectWithError: false}]);
if (false) {
return undefined;
}
value = env2_1(env2_2[5]);
yield value.dispatch({type: 'NOTIFICATION_SETTINGS_UPDATE', settings: {flags: value5}});
}
}
@@ -0,0 +1,41 @@
/* Metro module 15271; source: actions/PermissionActionCreators.tsx; dependencies: [694, 2] */
function _fun116770(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:6, offset: 0x024963b6, size: 174 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {clearVADWarning: clearVADWarning, clearSuppressWarning: clearSuppressWarning,
clearPTTAdminWarning: clearPTTAdminWarning, requestElevatedProcess: requestElevatedProcess,
clearElevatedProcess: clearElevatedProcess, continueNonelevatedProcess: continueNonelevatedProcess};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/PermissionActionCreators.tsx');
exports.default = object2;
}
function clearVADWarning() { // fn#116771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:99, offset: 0x02496464, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PERMISSION_CLEAR_VAD_WARNING'});
}
function clearSuppressWarning() { // fn#116772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:174, offset: 0x02496494, size: 62 bytes, params: 1, frame: 14
let value = a0;
const r4 = value !== undefined ? value : false;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'PERMISSION_CLEAR_SUPPRESS_WARNING', forever: r4});
}
function clearPTTAdminWarning() { // fn#116773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:273, offset: 0x024964d2, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PERMISSION_CLEAR_PTT_ADMIN_WARNING'});
}
function requestElevatedProcess(a0) { // fn#116774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:359, offset: 0x02496502, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PERMISSION_REQUEST_ELEVATED_PROCESS',
pid: a0});
}
function clearElevatedProcess() { // fn#116775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:455, offset: 0x0249653a, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PERMISSION_CLEAR_ELEVATED_PROCESS'});
}
function continueNonelevatedProcess(a0) { // fn#116776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15468:540, offset: 0x0249656a, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PERMISSION_CONTINUE_NONELEVATED_PROCESS',
pid: a0});
}
@@ -0,0 +1,69 @@
/* Metro module 15002; source: actions/PruneGuildModalActionCreators.tsx; dependencies: [5, 661, 507, 2] */
function _fun113403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15199:6, offset: 0x023f74d2, size: 169 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {updateEstimate: updateEstimate_113404, updateEstimateV2: updateEstimateV2, prune: function(a0, a1, a2) {
var HTTP = require(dependencyMap[2]).HTTP;
var object = {};
object.url = Endpoints.GUILD_PRUNE(a0);
object.body = {days: a1, compute_prune_count: false, include_roles: a2};
object.oldFormErrors = true;
object.rejectWithError = false;
return HTTP.post(object);
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/PruneGuildModalActionCreators.tsx');
exports.default = object2;
}
function updateEstimate_113404(a0) { // fn#113404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15199:144, offset: 0x023f757b, size: 57 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : 7;
return a2(_fun113406)();
}
function updateEstimateV2(a0) { // fn#113407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15199:326, offset: 0x023f7653, size: 57 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : 7;
return a2(_fun113409)();
}
function* _fun113406() { // fn#113406, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15199:158, offset: 0x023f75bf, size: 148 bytes, params: 1, frame: 16
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const HTTP = binding(env2_1[2]).HTTP;
const get = HTTP.get;
binding = env2_3;
const GUILD_PRUNE = binding.GUILD_PRUNE;
value = environment.__proto__;
yield Reflect.apply(get, HTTP, [{url: Reflect.apply(GUILD_PRUNE, binding, [require]), query: {days: dependencyMap,
include_roles: env1_2}, oldFormErrors: true, rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.body.pruned;
}
function* _fun113409() { // fn#113409, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15199:340, offset: 0x023f7697, size: 135 bytes, params: 1, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_1[2]).HTTP;
var get = HTTP.get;
binding = env2_3;
var GUILD_PRUNE_V2 = binding.GUILD_PRUNE_V2;
value = environment.__proto__;
yield Reflect.apply(get, HTTP, [{url: Reflect.apply(GUILD_PRUNE_V2, binding, [require]),
query: {days: dependencyMap, include_roles: env1_2}, oldFormErrors: true, rejectWithError: false}]);
}
}
@@ -0,0 +1,57 @@
/* Metro module 10866; source: actions/RTCDebugActionCreators.tsx; dependencies: [10865, 694, 8903, 3767, 2] */
function _fun83272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:6, offset: 0x01f13061, size: 194 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const rtcDebugStore = importDefault(10865) /* metro dependency 10865: RTCDebugStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/RTCDebugActionCreators.tsx');
exports.open = open_83273;
exports.close = close_83274;
exports.openReplay = openReplay;
exports.setSection = setSection_83276;
exports.setShouldRecordNextConnection = setShouldRecordNextConnection;
exports.setSimulcastDebugOverride = setSimulcastDebugOverride;
exports.chooseReplayPath = chooseReplayPath;
}
function open_83273(a0) { // fn#83273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:181, offset: 0x01f13123, size: 88 bytes, params: 2, frame: 16
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_MODAL_OPEN', section: a0});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_POPOUT_WINDOW_OPEN'});
}
function close_83274() { // fn#83274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:321, offset: 0x01f1317b, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_MODAL_CLOSE'});
}
function openReplay() { // fn#83275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:401, offset: 0x01f131ac, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_MODAL_OPEN_REPLAY'});
}
function setSection_83276(a0) { // fn#83276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:492, offset: 0x01f131dd, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_MODAL_SET_SECTION',
section: a0});
}
function setShouldRecordNextConnection(a0) { // fn#83277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:613, offset: 0x01f13216, size: 95 bytes, params: 2, frame: 17
(importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('connection_replay_log_enabled',
a0, RTCDebugStore.shouldRecordNextConnection());
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_SET_RECORDING_FLAG',
value: a0});
}
function setSimulcastDebugOverride(a0, a1, a2) { // fn#83278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:822, offset: 0x01f13275, size: 69 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_DEBUG_SET_SIMULCAST_OVERRIDE',
userId: a0, context: a1, quality: a2});
}
function chooseReplayPath() { // fn#83279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:973, offset: 0x01f132ba, size: 105 bytes, params: 1, frame: 14
const fileManager = (importDefault(3767) /* metro dependency 3767: DiscordNative */).fileManager;
fileManager.showOpenDialog({filters: [{name: 'All Files', extensions: ['*']}]}).then(_fun83280);
}
function _fun83280(a0) { // fn#83280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11052:1091, offset: 0x01f13323, size: 76 bytes, params: 2, frame: 14
const r4 = a0.length === 0 ? '' : a0[0];
value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'RTC_DEBUG_MODAL_OPEN_REPLAY_AT_PATH', path: r4});
}
@@ -0,0 +1,19 @@
/* Metro module 15819; source: actions/RTCLatencyTestActionCreators.tsx; dependencies: [507, 694, 2] */
function _fun121579(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16027:6, offset: 0x0254b526, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/RTCLatencyTestActionCreators.tsx');
exports.fetchRTCLatencyTestRegions = function(a0) {
var HTTP = require(dependencyMap[0]).HTTP;
var RTC_LATENCY_ENDPOINT = global.window.GLOBAL_ENV.RTC_LATENCY_ENDPOINT;
return HTTP.get({url: '' + 'https:' + RTC_LATENCY_ENDPOINT + '?v=' + a0, rejectWithError: false});
};
exports.completeRTCLatencyTest = completeRTCLatencyTest;
}
function completeRTCLatencyTest(a0, a1) { // fn#121581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16027:405, offset: 0x0254b603, size: 65 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RTC_LATENCY_TEST_COMPLETE',
latencyRankedRegions: a0, geoRankedRegions: a1});
}
+298
View File
@@ -0,0 +1,298 @@
/* Metro module 5097; source: actions/ReadStateActionCreators.tsx; dependencies: [5071, 1383, 1379, 5098, 1878, 661, 694, 21, 2] */
function _fun44475(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:6, offset: 0x01171b97, size: 337 bytes, params: 8, frame: 21
const _arrayLikeToArray_44478 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = ack;
const closure2 = ackCategory;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const activeJoinedThreadsStore = importDefault(5071) /* metro dependency 5071: ActiveJoinedThreadsStore */;
const env0_3 = (require(1383) /* metro dependency 1383: ChannelRecord */).isReadableType;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildCategoryStore = importDefault(5098) /* metro dependency 5098: GuildCategoryStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).CURRENT_APP_CONTEXT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/ReadStateActionCreators.tsx');
exports.ack = closure;
exports.ackCategory = closure2;
exports.ackChannel = ackChannel;
exports.bulkAck = function(a0, a1) {
importDefault(dependencyMap[6]).dispatch({type: 'BULK_ACK', channels: a0, context: CURRENT_APP_CONTEXT,
onFinished: a1});
};
exports.localAck = localAck;
exports.enableAutomaticAck = enableAutomaticAck;
exports.disableAutomaticAck = disableAutomaticAck;
exports.ackGuildFeature = ackGuildFeature;
exports.ackUserFeature = ackUserFeature;
exports.clearOldestUnreadMessageId = clearOldestUnreadMessageId_44491;
}
function _createForOfIteratorHelperLoose_44476(a0, a1) { // fn#44476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:197, offset: 0x01171ce8, size: 370 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 _fun44477;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44478(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_44478(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_44478(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun44477;
}
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 ack(a0, a1) { // fn#44479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:1107, offset: 0x01171e5a, size: 104 bytes, params: 3, frame: 16
const value = a2;
const value2 = a3;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_ACK', channelId: a0,
messageId: a4, immediate: value !== undefined ? value : false, force: value2 !== undefined ? value2 : false,
context: CURRENT_APP_CONTEXT, location: a1});
}
function ackCategory(a0, a1) { // fn#44480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:1241, offset: 0x01171ec2, size: 221 bytes, params: 3, frame: 22
var r6;
var r5;
var r2;
var guild_id;
var getCategories;
var value4;
var property;
var filter;
var value5;
var map;
var value6;
var forEach;
var value7;
var value8;
var done;
var ackBinding;
var value9;
var value10;
let value = a2;
const value2 = a3;
reducibleJoin2: while (true) {
if (value !== undefined) {
r6 = value;
break reducibleJoin2;
}
value = false;
r6 = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (value2 !== undefined) {
r5 = value2;
break reducibleJoin4;
}
value = false;
r5 = value;
break reducibleJoin4;
}
var env0_1;
const channel = ChannelStore.getChannel(a0);
reducibleJoin9: while (true) {
if (channel == null) {
break reducibleJoin9;
}
guild_id = channel.guild_id;
if (guild_id == null) {
break reducibleJoin9;
}
getCategories = GuildCategoryStore.getCategories;
guild_id = channel.guild_id;
value4 = Reflect.apply(getCategories, GuildCategoryStore, [guild_id]);
if (value4[a0] == null) {
break reducibleJoin9;
}
property = value4[a0];
filter = property.filter;
value5 = Reflect.apply(filter, property, [function({channel}) {
return isReadableType(channel.type);
}]);
map = value5.map;
value6 = Reflect.apply(map, value5, [_fun44482]);
env0_1 = value6;
forEach = value5.forEach;
Reflect.apply(forEach, value5, [_fun44483]);
value7 = _createForOfIteratorHelperLoose_44476(value6);
value8 = value7();
done = value8.done;
if (done) {
break reducibleJoin9;
}
r2 = value8;
reducibleLoop8: while (true) {
ackBinding = ack;
value9 = r2.value;
ackBinding(value9, a1, r6, r5);
value10 = value7();
done = value10.done;
if (done) {
break reducibleJoin9;
}
r2 = value10;
continue reducibleLoop8;
}
}
}
function ackChannel(a0, a1) { // fn#44484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:1803, offset: 0x01172021, size: 156 bytes, params: 3, frame: 22
var ackBinding;
var id;
var fromTimestamp;
var Date;
let value = a0.isCategory();
if (value) {
ackCategory(a0.id, a1, true, true);
} else {
value = a0.isForumLikeChannel();
ackBinding = ack;
id = a0.id;
if (value) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
fromTimestamp = value.fromTimestamp;
Date = global.Date;
value = Reflect.apply(fromTimestamp, value, [Date.now()]);
ackBinding(id, a1, true, true, value);
} else {
ackBinding(id, a1, true, true);
}
}
}
function localAck(a0) { // fn#44486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:2079, offset: 0x01172104, size: 54 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_LOCAL_ACK', channelId: a0});
}
function enableAutomaticAck(a0, a1) { // fn#44487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:2180, offset: 0x0117213a, size: 62 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENABLE_AUTOMATIC_ACK', channelId: a0,
windowId: a1});
}
function disableAutomaticAck(a0, a1) { // fn#44488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:2308, offset: 0x01172178, size: 62 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DISABLE_AUTOMATIC_ACK', channelId: a0,
windowId: a1});
}
function ackGuildFeature(a0, a1, a2) { // fn#44489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:2434, offset: 0x011721b6, size: 77 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_FEATURE_ACK', id: a0,
ackType: a1, ackedId: a2, local: false});
}
function ackUserFeature(a0, a1) { // fn#44490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:2564, offset: 0x01172203, size: 103 bytes, params: 3, frame: 14
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
if ((currentUser == null ? value3 : currentUser.id) != null) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_NON_CHANNEL_ACK', ackType: a0,
ackedId: a1, local: false});
}
return value3;
}
function clearOldestUnreadMessageId_44491(a0) { // fn#44491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:2757, offset: 0x0117226a, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_OLDEST_UNREAD_MESSAGE',
channelId: a0});
}
function _fun44483({channel}) { // fn#44483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5275:1466, offset: 0x01171fbc, size: 101 bytes, params: 2, frame: 18
var propertyName;
var binding;
let guild_id = channel.guild_id;
guild_id = guild_id ?? env0_0.guild_id;
const value = environment.__proto__;
const getActiveJoinedThreadsForParent = ActiveJoinedThreadsStore.getActiveJoinedThreadsForParent;
for (propertyName in Reflect.apply(getActiveJoinedThreadsForParent, ActiveJoinedThreadsStore, [guild_id,
channel.id])) {
binding = env0_1;
binding.push(propertyName);
}
}
+41
View File
@@ -0,0 +1,41 @@
/* Metro module 15176; source: actions/RegionActionCreators.tsx; dependencies: [661, 507, 694, 2] */
function _fun115947(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15373:6, offset: 0x024758ca, size: 145 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(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {fetchRegions: fetchRegions, changeCallRegion: function(a0, a1) {
var HTTP = require(dependencyMap[1]).HTTP;
var object = {};
object.url = Endpoints.CALL(a0);
object.body = {region: a1};
object.oldFormErrors = true;
object.rejectWithError = true;
HTTP.patch(object);
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/RegionActionCreators.tsx');
exports.default = object2;
}
function fetchRegions(a0) { // fn#115948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15373:119, offset: 0x0247595b, size: 111 bytes, params: 2, frame: 17
const env0_0 = a0;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'retries': 1, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.REGIONS(a0);
Reflect.apply(get, HTTP, [object2]).then(_fun115949, _fun115950);
}
function _fun115949({body}) { // fn#115949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15373:224, offset: 0x024759ca, size: 73 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_REGIONS', regions: body,
guildId: env0_0});
}
function _fun115950() { // fn#115950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15373:294, offset: 0x02475a13, size: 69 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_REGIONS', regions: [],
guildId: env0_0});
}
@@ -0,0 +1,379 @@
/* Metro module 8783; source: actions/RelationshipActionCreators.tsx; dependencies: [57, 1878, 661, 8784, 6722, 4647, 6595, 1244, 8785, 8786, 8787, 507, 3995, 4002, 694, 8789, 6264, 2] */
function _fun68665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:6, offset: 0x01c586a1, size: 452 bytes, params: 8, frame: 19
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.Endpoints;
const env0_7 = constantsModule.AbortCodes;
const env0_8 = constantsModule.RelationshipTypes;
const env0_9 = (require(8784) /* metro dependency 8784: RelationshipConstants */).ClearFriendRequestFilters;
object3 = {SHOW_ALWAYS: 0};
object3[0] = 'SHOW_ALWAYS';
object3.SHOW_ONLY_IF_ACTION_NEEDED = 1;
object3[1] = 'SHOW_ONLY_IF_ACTION_NEEDED';
const object4 = {sendRequest: sendRequest_68669, addRelationship: addRelationship,
acceptFriendRequest: acceptFriendRequest, cancelFriendRequest: cancelFriendRequest, removeFriend: removeFriend,
blockUser: blockUser, unblockUser: unblockUser, removeRelationship: removeRelationship_68684,
updateRelationship: function(a0, a1) {
var HTTP = require(dependencyMap[11]).HTTP;
var object = {};
object.url = Endpoints.USER_RELATIONSHIP(a0);
object.body = {nickname: a1};
object.rejectWithError = false;
return HTTP.patch(object);
}, fetchRelationships: fetchRelationships, confirmClearPendingRelationships: confirmClearPendingRelationships,
clearPendingRelationships: clearPendingRelationships, clearPendingSpamAndIgnored: clearPendingSpamAndIgnored,
ignoreUser: ignoreUser, unignoreUser: unignoreUser};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/RelationshipActionCreators.tsx');
exports.default = object4;
exports.RelationshipErrorUXConfig = object3;
}
function showAlert(a0) { // fn#68666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:213, offset: 0x01c58865, size: 67 bytes, params: 2, frame: 13
(require(6722) /* metro dependency 6722: ContextMenuActionCreators */).closeContextMenu();
(importDefault(4647) /* metro dependency 4647: AlertActionCreators */).show(a0);
}
function handleRelationshipAddError(a0, a1, a2) { // fn#68667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:406, offset: 0x01c588a8, size: 843 bytes, params: 4, frame: 23
var r8;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue2;
var humanizeAbortCode;
var showAlertBinding;
var object2;
const status = a0.status;
const body = a0.body;
let r4 = body && body.code;
if (status === 429) {
if (a1 === env0_10.SHOW_ALWAYS) {
showAlertBinding = showAlert;
object2 = {};
object2.title = intl.string(t['3D5eox']);
object2.body = intl.string(t.TuJriJ);
object2.confirmText = intl.string(t.DppXIx);
showAlertBinding(object2);
}
} else if (status !== 403) {
if (r4 === AbortCodes.USER_QUARANTINED) {
(require(6722) /* metro dependency 6722: ContextMenuActionCreators */).closeContextMenu();
(importDefault(6595) /* metro dependency 6595: openQuarantineModeInfoModalNative */)();
} else {
moduleValue = require(8786) /* metro dependency 8786: UserLimitedAccessUtils */;
if (!moduleValue.isLimitedAccessErrorCode(status, r4)) {
if (r4 !== AbortCodes.RELATIONSHIP_INVALID_NO_CONFIRMATION) {
if (a1 === env0_10.SHOW_ALWAYS) {
if (a2 != null) {
moduleValue2 = require(8787) /* metro dependency 8787: FriendsUtils */;
humanizeAbortCode = moduleValue2.humanizeAbortCode;
r4 = !r4 ? 0 : r4;
r8 = Reflect.apply(humanizeAbortCode, moduleValue2, [r4, a2]);
} else {
r8 = intl.string(t.paDJBM);
}
showAlertBinding = showAlert;
object2 = {};
object2.title = intl.string(t['6moJ8s']);
object2.body = r8;
object2.confirmText = intl.string(t.BddRzS);
showAlertBinding(object2);
}
}
}
}
} else if (r4 === AbortCodes.EMAIL_VERIFICATION_REQUIRED) {
showAlertBinding = showAlert;
object2 = {};
object2.title = intl.string(t.Gqf33E);
object2.body = intl.string(t.GHOBdx);
object2.confirmText = intl.string(t.HbTSE6);
object2.onConfirm = onConfirm;
showAlertBinding(object2);
} else if (r4 === AbortCodes.USER_QUARANTINED) {
(require(6722) /* metro dependency 6722: ContextMenuActionCreators */).closeContextMenu();
(importDefault(6595) /* metro dependency 6595: openQuarantineModeInfoModalNative */)();
} else {
moduleValue = require(8786) /* metro dependency 8786: UserLimitedAccessUtils */;
if (!moduleValue.isLimitedAccessErrorCode(status, r4)) {
if (r4 !== AbortCodes.RELATIONSHIP_INVALID_NO_CONFIRMATION) {
if (a1 === env0_10.SHOW_ALWAYS) {
if (a2 != null) {
moduleValue2 = require(8787) /* metro dependency 8787: FriendsUtils */;
humanizeAbortCode = moduleValue2.humanizeAbortCode;
r4 = !r4 ? 0 : r4;
r8 = Reflect.apply(humanizeAbortCode, moduleValue2, [r4, a2]);
} else {
r8 = intl.string(t.paDJBM);
}
showAlertBinding = showAlert;
object2 = {};
object2.title = intl.string(t['6moJ8s']);
object2.body = r8;
object2.confirmText = intl.string(t.BddRzS);
showAlertBinding(object2);
}
}
}
}
throw a0;
}
function sendRequest_68669({discordTag, context, captchaPayload, note, errorUxConfig = env0_10.SHOW_ALWAYS}) { // fn#68669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:1386, offset: 0x01c58c18, size: 241 bytes, params: 2, frame: 21
let value = discordTag.split('#');
value = env0_4(value, 2);
const property = value[0];
const property2 = value[1];
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const object3 = {};
object3.url = Endpoints.USER_RELATIONSHIPS();
const object4 = {username: property};
object4.discriminator = global.parseInt(property2);
object4.note = note;
copyDataProperties(object4, captchaPayload, Endpoints);
object3.body = object4;
object3.context = context;
object3.oldFormErrors = true;
object3.rejectWithError = false;
return Reflect.apply(post, HTTP, [object3]).catch(_fun68670);
}
function addRelationship({userId, context, type, fromFriendSuggestion, confirmStrangerRequest, captchaPayload}, a1) { // fn#68671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:1727, offset: 0x01c58d29, size: 242 bytes, params: 3, frame: 21
let value = a2;
const env0_0 = a1;
const env0_1 = value !== undefined ? value : env0_10.SHOW_ALWAYS;
const env0_2 = UserStore.getUser(userId);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const put = HTTP.put;
const object3 = {};
object3.url = Endpoints.USER_RELATIONSHIP(userId);
const object4 = {type: type, from_friend_suggestion: fromFriendSuggestion,
confirm_stranger_request: confirmStrangerRequest};
copyDataProperties(object4, captchaPayload, userId);
object3.body = object4;
object3.context = context;
object3.oldFormErrors = true;
object3.rejectWithError = false;
value = Reflect.apply(put, HTTP, [object3]);
value = value.then(function() {
if (require != null) {
require();
}
});
return value.catch(_fun68673);
}
function acceptFriendRequest(a0) { // fn#68674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2181, offset: 0x01c58e6d, size: 33 bytes, params: 2, frame: 13
return env0_11.addRelationship(a0, function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['3goNa5']));
});
}
function cancelFriendRequest(a0, a1) { // fn#68676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2322, offset: 0x01c58eeb, size: 37 bytes, params: 3, frame: 15
return env0_11.removeRelationship(a0, a1, function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.pLUaxR));
});
}
function removeFriend(a0, a1) { // fn#68678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2449, offset: 0x01c58f6d, size: 39 bytes, params: 3, frame: 15
env0_11.removeRelationship(a0, a1, function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.vGSLa2));
});
}
function blockUser(a0, a1) { // fn#68680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2598, offset: 0x01c58ff1, size: 60 bytes, params: 3, frame: 14
const binding = env0_11;
const addRelationship = binding.addRelationship;
const BLOCKED = RelationshipTypes.BLOCKED;
return Reflect.apply(addRelationship, binding, [{userId: a0, context: a1, type: BLOCKED}, function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.mU0Vrp));
}]);
}
function unblockUser(a0, a1) { // fn#68682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2766, offset: 0x01c5908a, size: 37 bytes, params: 3, frame: 15
return env0_11.removeRelationship(a0, a1, function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['9t1au7']));
});
}
function removeRelationship_68684(a0, a1, a2) { // fn#68684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2915, offset: 0x01c5910c, size: 131 bytes, params: 4, frame: 15
const env0_0 = a2;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {};
object2.url = Endpoints.USER_RELATIONSHIP(a0);
object2.context = a1;
object2.oldFormErrors = true;
object2.rejectWithError = false;
let value = Reflect.apply(del, HTTP, [object2]);
value = value.then(function() {
if (importDefault != null) {
importDefault();
}
});
return value.catch(function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.n6Jo3E));
});
}
function fetchRelationships() { // fn#68688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3253, offset: 0x01c59241, size: 99 bytes, params: 1, frame: 16
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.USER_RELATIONSHIPS();
Reflect.apply(get, HTTP, [object2]).then(_fun68689, _fun68690);
}
function confirmClearPendingRelationships(a0) { // fn#68691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3507, offset: 0x01c59313, size: 35 bytes, params: 2, frame: 11
(importDefault(8789) /* metro dependency 8789: ClearAllIncomingRequestsConfirmationModal */)(a0);
}
function clearPendingRelationships() { // fn#68692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3582, offset: 0x01c59336, size: 128 bytes, params: 1, frame: 15
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {};
object2.url = Endpoints.USER_RELATIONSHIPS();
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
object2.query = {relationship_type: PENDING_INCOMING};
object2.rejectWithError = false;
let value = Reflect.apply(del, HTTP, [object2]);
value = value.then(_fun68693);
return value.catch(function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.n6Jo3E));
});
}
function clearPendingSpamAndIgnored() { // fn#68695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3900, offset: 0x01c593e7, size: 167 bytes, params: 1, frame: 16
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {};
object2.url = Endpoints.USER_RELATIONSHIPS();
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
object2.query = {relationship_type: PENDING_INCOMING};
const SPAM = ClearFriendRequestFilters.SPAM;
const IGNORED = ClearFriendRequestFilters.IGNORED;
object2.body = {filters: [SPAM, IGNORED]};
object2.rejectWithError = false;
let value = Reflect.apply(del, HTTP, [object2]);
value = value.then(_fun68696);
return value.catch(function() {
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.n6Jo3E));
});
}
function ignoreUser(a0, a1, a2) { // fn#68698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:4236, offset: 0x01c5948e, size: 134 bytes, params: 4, frame: 15
const env0_0 = a0;
const env0_1 = a2;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const put = HTTP.put;
const object2 = {};
object2.url = Endpoints.IGNORE_USER(a0);
object2.context = {location: a1};
object2.rejectWithError = false;
let value = Reflect.apply(put, HTTP, [object2]);
value = value.then(_fun68699);
return value.catch(function() {
importDefault(dependencyMap[16]).showFailedToast();
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.n6Jo3E));
});
}
function unignoreUser(a0, a1, a2) { // fn#68701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:4684, offset: 0x01c59649, size: 134 bytes, params: 4, frame: 15
const env0_0 = a0;
const env0_1 = a2;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {};
object2.url = Endpoints.IGNORE_USER(a0);
object2.context = {location: a1};
object2.rejectWithError = false;
let value = Reflect.apply(del, HTTP, [object2]);
value = value.then(_fun68702);
return value.catch(function() {
importDefault(dependencyMap[16]).showFailedToast();
var AccessibilityAnnouncer = require(dependencyMap[13]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.n6Jo3E));
});
}
function handleRelationshipAddErrorOnConfirm() { // fn#68668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:887, owner: handleRelationshipAddError.onConfirm, offset: 0x01c58bf3, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importAll(8785) /* metro dependency 8785: ClaimAccountModalActionCreatorsNative */).openClaimAccountModal();
}
function _fun68670(a0) { // fn#68670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:1685, offset: 0x01c58d09, size: 32 bytes, params: 2, frame: 15
handleRelationshipAddError(a0, env0_1, discordTag);
}
function _fun68673(a0) { // fn#68673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:2080, offset: 0x01c58e1b, size: 82 bytes, params: 2, frame: 17
let value = environment.__proto__;
const handleRelationshipAddErrorBinding = handleRelationshipAddError;
const binding = env0_1;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = value.getUserTag;
handleRelationshipAddErrorBinding(a0, binding, Reflect.apply(getUserTag, value, [env0_2]));
const Promise = global.Promise;
return Promise.reject(a0);
}
function _fun68689({body}) { // fn#68689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3364, offset: 0x01c592a4, size: 62 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_RELATIONSHIPS_SUCCESS',
relationships: body});
}
function _fun68690() { // fn#68690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3445, offset: 0x01c592e2, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_RELATIONSHIPS_FAILURE'});
}
function _fun68693() { // fn#68693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:3704, offset: 0x01c593b6, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RELATIONSHIP_PENDING_INCOMING_REMOVED'});
}
function _fun68699() { // fn#68699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:4333, offset: 0x01c59514, size: 192 bytes, params: 1, frame: 19
let value = environment.__proto__;
const defaultImport = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
const showIgnoreSuccessToast = defaultImport.showIgnoreSuccessToast;
const binding = env0_0;
Reflect.apply(showIgnoreSuccessToast, defaultImport, [binding, importDefault]);
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Us93Ca = (require(1244) /* metro dependency 1244: indexNative */).t.Us93Ca;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [Us93Ca])]);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {type: 'RELATIONSHIP_IGNORE_USER_SUCCESS', userId: binding};
const Date = global.Date;
object2.timestamp = Date.now();
Reflect.apply(dispatch, value, [object2]);
}
function _fun68702() { // fn#68702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8968:4781, offset: 0x01c596cf, size: 132 bytes, params: 1, frame: 17
const defaultImport = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
defaultImport.showUnignoreSuccessToast(env0_0, importDefault);
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const QlH5w6 = (require(1244) /* metro dependency 1244: indexNative */).t.QlH5w6;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [QlH5w6])]);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,54 @@
/* Metro module 4796; source: actions/SelectedChannelActionCreators.tsx; dependencies: [4295, 1379, 4259, 661, 694, 1230, 4797, 9422, 2] */
function _fun41542(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:6, offset: 0x01120ac8, size: 230 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.ME;
constantsModule.PopoutWindowKeys;
const env0_8 = constantsModule.Routes;
object2 = {selectChannel: selectChannel, selectPrivateChannel: function(a0) {
require(dependencyMap[5]).transitionTo(Routes.CHANNEL(ME, a0));
}, selectVoiceChannel: selectVoiceChannel, disconnect: disconnect};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/SelectedChannelActionCreators.tsx');
exports.default = object2;
}
function selectChannel({guildId, channelId, messageId, jumpType, source, skipMessageFetch}) { // fn#41543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:178, offset: 0x01120bae, size: 121 bytes, params: 2, frame: 20
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SELECT',
guildId: guildId === ME ? null : guildId, channelId: channelId, messageId: messageId, jumpType: jumpType,
source: source, skipMessageFetch: skipMessageFetch});
}
function selectVoiceChannel(a0) { // fn#41545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:457, offset: 0x01120c64, size: 165 bytes, params: 2, frame: 22
const value = a1;
const value2 = a2;
const value3 = a3;
const value4 = undefined;
const r6 = value !== value4 ? value : false;
const r5 = value2 !== value4 ? value2 : false;
const r4 = value3 !== value4 ? value3 : {};
const channel = ChannelStore.getChannel(a0);
if (MediaEngineStore.isSupported()) {
if (a0 != null) {
MediaEngineStore.getMediaEngine().interact();
}
(require(4797) /* metro dependency 4797: SelectedChannelActionCreatorsAdditionalNative */).selectVoiceChannelAdditional(a0,
channel == null ? value4 : channel.getGuildId(), r6, r5, r4);
}
return value4;
}
function disconnect() { // fn#41546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:655, offset: 0x01120d09, size: 74 bytes, params: 1, frame: 14
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
if (remoteSessionId != null) {
(importAll(9422) /* metro dependency 9422: GameConsoleActionCreators */).remoteDisconnect(remoteSessionId);
}
this.selectVoiceChannel(null);
}
@@ -0,0 +1,243 @@
/* Metro module 4797; source: actions/SelectedChannelActionCreatorsAdditional.native.tsx; dependencies: [1379, 1867, 4798, 3784, 1934, 1878, 4297, 4799, 4800, 4807, 3856, 4808, 4809, 4080, 6272, 1962, 12366, 491, 694, 2] */
function _fun41547(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4975:6, offset: 0x01120d53, size: 234 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_10 = (require(4799) /* metro dependency 4799: StageChannelsConstants */).STAGE_BOOSTING_SHEET_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/SelectedChannelActionCreatorsAdditional.native.tsx');
exports.selectVoiceChannelAdditional = selectVoiceChannelAdditional;
}
function selectVoiceChannelAdditional(a0, a1) { // fn#41548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4975:325, offset: 0x01120e3d, size: 512 bytes, params: 3, frame: 23
var isChannelFull2;
var value6;
var moduleValue2;
var value7;
var moduleValue3;
var defaultImport2;
const value = a2;
const value2 = a3;
const value3 = a4;
const env0_0 = a0;
const env0_1 = a1;
const r4 = value !== undefined ? value : false;
const r3 = value2 !== undefined ? value2 : false;
const r0 = value3 !== undefined ? value3 : {};
if (r0.lockVoiceStateForResume !== undefined) {
}
if (r0.bypassIdleUpdate !== undefined) {
}
const channel = ChannelStore.getChannel(a0);
const currentUser = UserStore.getCurrentUser();
if (currentUser == null) {
return undefined;
}
if (channel == null) {
if (channel == null) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
isChannelFull2 = require(dependencyMap[8]).isChannelFull(channel, VoiceStateStore, GuildStore);
value6 = GuildVerificationStore.getCheck(channel.guild_id);
} else {
if (channel.nsfw) {
if (currentUser.nsfwAllowed) {
if (channel == null) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
isChannelFull2 = require(dependencyMap[8]).isChannelFull(channel, VoiceStateStore, GuildStore);
value6 = GuildVerificationStore.getCheck(channel.guild_id);
if (value6.canChat) {
value7 = importDefault(dependencyMap[11])(channel, PermissionStore);
if (isChannelFull2) {
if (channel.isGuildStageVoice()) {
moduleValue3 = require(dependencyMap[12]);
if (moduleValue3.getStageHasMedia(channel.id)) {
defaultImport2 = importDefault(dependencyMap[13]);
defaultImport2.openLazy(require(dependencyMap[15])(dependencyMap[14],
dependencyMap.paths),
STAGE_BOOSTING_SHEET_KEY, {channel: channel});
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
moduleValue2 = require(dependencyMap[9]);
if (moduleValue2.canLurkerListen(channel)) {
value7 = importDefault(dependencyMap[11])(channel, PermissionStore);
if (isChannelFull2) {
if (channel.isGuildStageVoice()) {
moduleValue3 = require(dependencyMap[12]);
if (moduleValue3.getStageHasMedia(channel.id)) {
defaultImport2 = importDefault(dependencyMap[13]);
defaultImport2.openLazy(require(dependencyMap[15])(dependencyMap[14],
dependencyMap.paths),
STAGE_BOOSTING_SHEET_KEY, {channel: channel});
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
return require(dependencyMap[10]).unverifiedVoiceGate(value6);
}
return undefined;
}
if (channel == null) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
isChannelFull2 = require(dependencyMap[8]).isChannelFull(channel, VoiceStateStore, GuildStore);
value6 = GuildVerificationStore.getCheck(channel.guild_id);
}
if (value6.canChat) {
value7 = importDefault(dependencyMap[11])(channel, PermissionStore);
if (isChannelFull2) {
if (channel.isGuildStageVoice()) {
moduleValue3 = require(dependencyMap[12]);
if (moduleValue3.getStageHasMedia(channel.id)) {
defaultImport2 = importDefault(dependencyMap[13]);
defaultImport2.openLazy(require(dependencyMap[15])(dependencyMap[14], dependencyMap.paths),
STAGE_BOOSTING_SHEET_KEY, {channel: channel});
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
moduleValue2 = require(dependencyMap[9]);
if (moduleValue2.canLurkerListen(channel)) {
value7 = importDefault(dependencyMap[11])(channel, PermissionStore);
if (isChannelFull2) {
if (channel.isGuildStageVoice()) {
moduleValue3 = require(dependencyMap[12]);
if (moduleValue3.getStageHasMedia(channel.id)) {
defaultImport2 = importDefault(dependencyMap[13]);
defaultImport2.openLazy(require(dependencyMap[15])(dependencyMap[14], dependencyMap.paths),
STAGE_BOOSTING_SHEET_KEY, {channel: channel});
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
if (isChannelFull2) {
return undefined;
}
if (value7) {
importDefault(dependencyMap[16])(_fun41549, a0, r3, r4);
return undefined;
}
return undefined;
}
return require(dependencyMap[10]).unverifiedVoiceGate(value6);
}
function _fun41549() { // fn#41549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4975:854, offset: 0x0112103d, size: 152 bytes, params: 1, frame: 16
const value2 = (require(491) /* metro dependency 491 */).v4();
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = defaultImport.dispatch;
const object2 = {type: 'VOICE_CHANNEL_SELECT'};
object2.guildId = require;
object2.channelId = env0_0;
object2.currentVoiceChannelId = SelectedChannelStore.getVoiceChannelId();
object2.video = env0_2;
object2.stream = env0_3;
object2.lockVoiceStateForResume = lockVoiceStateForResume;
object2.joinVoiceId = value2;
object2.bypassIdleUpdate = bypassIdleUpdate;
Reflect.apply(dispatch, defaultImport, [object2]);
}
@@ -0,0 +1,115 @@
/* Metro module 13045; source: actions/StoreListingActionCreators.tsx; dependencies: [4234, 4279, 13046, 661, 4141, 694, 7502, 2] */
function _fun99608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:6, offset: 0x021cf027, size: 202 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const storeListingStore = importDefault(13046) /* metro dependency 13046: StoreListingStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/StoreListingActionCreators.tsx');
exports.fetchStoreListingsForApplications = fetchStoreListingsForApplications;
exports.fetchAllStoreListingsForApplication = fetchAllStoreListingsForApplication;
exports.fetchStoreListingForSku = fetchStoreListingForSku;
}
function fetchStoreListingsForApplications(a0) { // fn#99609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:254, offset: 0x021cf0f1, size: 148 bytes, params: 2, frame: 14
var r0;
let value = a0.filter(_fun99610);
if (value.length === 0) {
r0 = global.Promise.resolve();
} else {
value = (require(4141) /* metro dependency 4141: StoreUtils */).httpGetWithCountryCodeQuery({url: Endpoints.STORE_PUBLISHED_LISTINGS_APPLICATIONS,
query: {application_ids: value}, oldFormErrors: true, rejectWithError: false});
value = value.then(_fun99611);
r0 = value;
}
return r0;
}
function fetchAllStoreListingsForApplication(a0) { // fn#99612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:743, offset: 0x021cf204, size: 101 bytes, params: 2, frame: 13
const storeUtilsModule = require(4141) /* metro dependency 4141: StoreUtils */;
const httpGetWithCountryCodeQuery = storeUtilsModule.httpGetWithCountryCodeQuery;
const STORE_PUBLISHED_LISTINGS_SKUS = Endpoints.STORE_PUBLISHED_LISTINGS_SKUS;
return Reflect.apply(httpGetWithCountryCodeQuery, storeUtilsModule, [{url: STORE_PUBLISHED_LISTINGS_SKUS,
query: {application_id: a0}, oldFormErrors: true, rejectWithError: false}]).then(_fun99613);
}
function fetchStoreListingForSku(a0) { // fn#99615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:1090, offset: 0x021cf2d6, size: 230 bytes, params: 2, frame: 18
var r4;
var moduleValue;
const env0_0 = a0;
const value2 = SKUStore.get(a0);
const value3 = value2 != null;
if (value3) {
moduleValue = require(7502) /* metro dependency 7502: TestModeUtils */;
r4 = moduleValue.isTestModeForApplication(value2.applicationId);
} else {
r4 = value3;
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'STORE_LISTINGS_FETCH_START',
skuId: a0});
const storeUtilsModule = require(4141) /* metro dependency 4141: StoreUtils */;
const httpGetWithCountryCodeQuery = storeUtilsModule.httpGetWithCountryCodeQuery;
r4 = r4 ? Endpoints.STORE_LISTINGS_SKU(a0) : Endpoints.STORE_PUBLISHED_LISTINGS_SKU(a0);
let value = Reflect.apply(httpGetWithCountryCodeQuery, storeUtilsModule, [{url: r4, rejectWithError: false}]);
value = value.then(_fun99616);
return value.catch(_fun99617);
}
function _fun99610(a0) { // fn#99610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:316, offset: 0x021cf185, size: 67 bytes, params: 2, frame: 13
const value = environment.__proto__;
const application = ApplicationStore.getApplication(a0);
if (application == null) {
return true;
}
const destinationSkuId = application.destinationSkuId;
return destinationSkuId == null || StoreListingStore.getForSKU(destinationSkuId) == null;
}
function _fun99611({body}) { // fn#99611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:620, offset: 0x021cf1c8, size: 60 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'STORE_LISTINGS_FETCH_SUCCESS',
storeListings: body});
}
function _fun99613(a0) { // fn#99613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:940, offset: 0x021cf269, size: 84 bytes, params: 2, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {type: 'STORE_LISTINGS_FETCH_SUCCESS'};
object2.storeListings = a0.body.map(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['published'] = true;
return object;
});
Reflect.apply(dispatch, value, [object2]);
return a0.body;
}
function _fun99616(a0) { // fn#99616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:1399, offset: 0x021cf3bc, size: 95 bytes, params: 2, frame: 14
const binding = env0_1;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {};
if (binding) {
object2.type = 'STORE_LISTINGS_FETCH_SUCCESS';
object2.storeListings = a0.body;
Reflect.apply(dispatch, value, [object2]);
} else {
object2.type = 'STORE_LISTING_FETCH_SUCCESS';
object2.storeListing = a0.body;
Reflect.apply(dispatch, value, [object2]);
}
}
function _fun99617() { // fn#99617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13235:1567, offset: 0x021cf41b, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SKU_FETCH_FAIL', skuId: env0_0});
}
+647
View File
@@ -0,0 +1,647 @@
/* Metro module 8913; source: actions/StreamActionCreators.tsx; dependencies: [5, 4295, 8043, 8914, 4492, 1226, 1379, 1867, 1934, 4297, 661, 4286, 694, 4285, 44, 4800, 7712, 8915, 507, 672, 5046, 480, 8912, 4796, 4603, 8916, 2] */
function _fun69539(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:6, offset: 0x01c76232, size: 566 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = watchStream;
const closure2 = watchStreamAndTransitionToStream;
const closure3 = stopStream;
const closure4 = closeStream;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const popoutWindowStoreNative = importDefault(8043) /* metro dependency 8043: PopoutWindowStoreNative */;
const applicationStreamPreviewStore = importDefault(8914) /* metro dependency 8914: ApplicationStreamPreviewStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.Endpoints;
const env0_14 = constantsModule.AppContext;
const env0_15 = constantsModule.PopoutWindowKeys;
const env0_16 = (require(4286) /* metro dependency 4286: Constants */).StreamTypes;
const Number = global.Number;
const env0_17 = Number.MAX_VALUE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/StreamActionCreators.tsx');
exports.startStream = function(a0, a1, a2) {
var r7;
var r6;
var defaultImport = importDefault(dependencyMap[12]);
var dispatch = defaultImport.dispatch;
var object = {type: 'STREAM_START'};
if (a0 != null) {
r6 = StreamTypes.GUILD;
r7 = StreamTypes;
} else {
r6 = StreamTypes.CALL;
}
object.streamType = r6;
object.guildId = a0;
object.channelId = a1;
object.appContext = AppContext.APP;
copyDataProperties(object, a2, r7);
Reflect.apply(dispatch, defaultImport, [object]);
};
exports.setStreamPaused = setStreamPaused;
exports.watchStream = closure;
exports.toggleSelfStreamHidden = toggleSelfStreamHidden;
exports.watchStreamAndTransitionToStream = closure2;
exports.stopStream = closure3;
exports.closeStream = closure4;
exports.fetchStreamPreview = function() {
return _fetchStreamPreview.apply(this, arguments);
};
exports.setLayout = setLayout;
exports.notifyStreamStart = function() {
return _notifyStreamStart.apply(this, arguments);
};
exports.updateStreamSettings = updateStreamSettings;
exports.changeStreamRegion = function(a0, a1) {
var HTTP = require(dependencyMap[18]).HTTP;
var object = {};
object.url = Endpoints.STREAM(a0);
object.body = {region: a1};
object.oldFormErrors = true;
object.rejectWithError = true;
HTTP.patch(object);
};
exports.stopOwnStream = stopOwnStream;
exports.joinPrivateChannelAndWatchStream = joinPrivateChannelAndWatchStream;
}
function isVoiceChannelFull(a0, a1) { // fn#69540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:299, offset: 0x01c76468, size: 124 bytes, params: 3, frame: 17
const channel = ChannelStore.getChannel(a1);
(importDefault(44) /* metro dependency 44 */)(channel != null, 'Cannot join a null voice channel');
return !VoiceStateStore.isInChannel(a1) && (require(4800) /* metro dependency 4800: ChannelUtils */).isChannelFull(channel,
VoiceStateStore, GuildStore);
}
function watchStream(a0, a1) { // fn#69541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:463, offset: 0x01c764e4, size: 304 bytes, params: 3, frame: 20
var forceMultiple;
var r5;
var guildId;
var channelId;
var value3;
var value4;
var allActiveStreamsForChannel;
var defaultImport;
var value;
if (GameConsoleStore.getRemoteSessionId() == null) {
guildId = a0.guildId;
channelId = a0.channelId;
if (guildId == null) {
value3 = undefined;
value4 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey(a0);
forceMultiple = a1 == null ? value3 : a1.forceMultiple;
if (forceMultiple) {
r5 = forceMultiple;
} else {
allActiveStreamsForChannel = ApplicationStreamingStore.getAllActiveStreamsForChannel(channelId);
r5 = allActiveStreamsForChannel.filter(function({ownerId}) {
return ownerId !== AuthenticationStore.getId();
}).length >= MAX_VALUE;
}
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'STREAM_WATCH', streamKey: value4, allowMultiple: r5});
if (!((a1 == null ? value3 : a1.forceFocus) !== true && (!r5 ? a1 != null && a1.noFocus : r5))) {
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(a0.channelId, value4);
}
} else if (!isVoiceChannelFull(undefined, channelId)) {
value3 = undefined;
value4 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey(a0);
forceMultiple = a1 == null ? value3 : a1.forceMultiple;
if (forceMultiple) {
r5 = forceMultiple;
} else {
allActiveStreamsForChannel = ApplicationStreamingStore.getAllActiveStreamsForChannel(channelId);
r5 = allActiveStreamsForChannel.filter(_fun69542).length >= MAX_VALUE;
}
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'STREAM_WATCH', streamKey: value4, allowMultiple: r5});
if (!((a1 == null ? value3 : a1.forceFocus) !== true && (!r5 ? a1 != null && a1.noFocus : r5))) {
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(a0.channelId, value4);
}
}
}
}
function watchStreamAndTransitionToStream(a0, a1) { // fn#69543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:921, offset: 0x01c76634, size: 133 bytes, params: 3, frame: 16
const guildId = a0.guildId;
const channelId = a0.channelId;
if (guildId == null) {
watchStream(a0, a1);
if (!(PopoutWindowStoreNative.getWindowOpen(PopoutWindowKeys.CHANNEL_CALL_POPOUT) && SelectedChannelStore.getVoiceChannelId() === channelId)) {
(importDefault(8915) /* metro dependency 8915: transitionToStreamNative */)(a0);
}
} else if (!isVoiceChannelFull(undefined, channelId)) {
watchStream(a0, a1);
if (!(PopoutWindowStoreNative.getWindowOpen(PopoutWindowKeys.CHANNEL_CALL_POPOUT) && SelectedChannelStore.getVoiceChannelId() === channelId)) {
(importDefault(8915) /* metro dependency 8915: transitionToStreamNative */)(a0);
}
}
}
function stopStream(a0) { // fn#69544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:1145, offset: 0x01c766b9, size: 104 bytes, params: 2, frame: 16
const value = a1;
const value2 = a2;
if (!(value2 !== undefined) || value2) {
closeStream(a0, !(value !== undefined) || value);
}
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = defaultImport.dispatch;
const APP = AppContext.APP;
Reflect.apply(dispatch, defaultImport, [{type: 'STREAM_STOP', streamKey: a0, appContext: APP}]);
}
function closeStream(a0) { // fn#69545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:1267, offset: 0x01c76721, size: 69 bytes, params: 2, frame: 14
let value = a1;
const r4 = !(value !== undefined) || value;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'STREAM_CLOSE', streamKey: a0, canShowFeedback: r4});
}
function _fetchStreamPreview() { // fn#69546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:1367, offset: 0x01c76766, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69548).apply(this, arguments);
}
function _notifyStreamStart() { // fn#69549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:2043, offset: 0x01c7698f, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69551).apply(this, arguments);
}
function setStreamPaused(a0, a1) { // fn#69553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:2553, offset: 0x01c76ad5, size: 90 bytes, params: 3, frame: 14
const value2 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey(a0);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'STREAM_SET_PAUSED', streamKey: value2, paused: a1});
}
function toggleSelfStreamHidden(a0, a1) { // fn#69554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:2736, offset: 0x01c76b2f, size: 62 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'STREAM_UPDATE_SELF_HIDDEN',
channelId: a0, selfStreamHidden: a1});
}
function setLayout(a0) { // fn#69556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:3090, offset: 0x01c76b6d, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'STREAM_LAYOUT_UPDATE', layout: a0});
}
function updateStreamSettings(a0) { // fn#69558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:3292, offset: 0x01c76ba6, size: 136 bytes, params: 2, frame: 18
var r8;
var value;
var trackStreamSettingsUpdate;
var preset;
var resolution;
var frameRate;
if (a0.noTrack !== true) {
value = require(8912) /* metro dependency 8912: StreamQualityUtils */;
trackStreamSettingsUpdate = value.trackStreamSettingsUpdate;
preset = a0.preset;
resolution = a0.resolution;
frameRate = a0.frameRate;
Reflect.apply(trackStreamSettingsUpdate, value, [preset, resolution, frameRate, a0.soundshareEnabled]);
r8 = frameRate;
}
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {type: 'STREAM_UPDATE_SETTINGS'};
copyDataProperties(object2, a0, r8);
Reflect.apply(dispatch, value, [object2]);
}
function stopOwnStream() { // fn#69560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:3650, offset: 0x01c76c8a, size: 77 bytes, params: 1, frame: 16
var stopStreamBinding;
let value = a0;
const r3 = !(value !== undefined) || value;
const currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream();
if (currentUserActiveStream != null) {
stopStreamBinding = stopStream;
value = require(4285) /* metro dependency 4285: StreamKeyUtils */;
stopStreamBinding(value.encodeStreamKey(currentUserActiveStream), r3);
}
}
function joinPrivateChannelAndWatchStream(a0, a1) { // fn#69561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:3803, offset: 0x01c76cd7, size: 176 bytes, params: 3, frame: 19
const env0_0 = a0;
const id = AuthenticationStore.getId();
const env0_1 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).decodeStreamKey(a1);
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
if (voiceChannelId != null && voiceChannelId !== a0) {
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect();
}
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).addRecipient(a0, id, undefined, _fun69562);
}
function _fun69542({ownerId}) { // fn#69542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:706, offset: 0x01c76614, size: 32 bytes, params: 2, frame: 10
const getId = AuthenticationStore.getId;
return ownerId !== Reflect.apply(getId, AuthenticationStore, []);
}
function* _fun69548(a0, a1, a2) { // fn#69548, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:1428, offset: 0x01c767a3, size: 492 bytes, params: 4, frame: 24
var r12;
var r5;
var value3;
var binding;
var shouldFetchPreview;
var value4;
var encodeStreamKey;
var object3;
var CALL;
var GUILD;
var value5;
var value6;
var dispatch;
var binding2;
var property;
var value7;
var HTTP;
var get;
var STREAM_PREVIEW;
var value8;
var object4;
var Date;
var now;
var value9;
var value10;
var value11;
var value12;
var binding3;
var value13;
var body;
var url;
var error;
var status;
var retry_after;
var Millis;
var SECOND;
var value14;
var value15;
let value = undefined;
if (true) {
reduciblePort52: while (true) {
exceptionLanding49: while (true) {
value = undefined;
value3 = environment.__proto__.__proto__;
binding = env2_6;
shouldFetchPreview = binding.shouldFetchPreview;
if (Reflect.apply(shouldFetchPreview, binding, [a0, a1, a2])) {
binding = env2_0;
value4 = binding(env2_2[13]);
encodeStreamKey = value4.encodeStreamKey;
if (a0 != null) {
GUILD = env2_16.GUILD;
r12 = GUILD;
} else {
CALL = env2_16.CALL;
r12 = CALL;
}
value5 = Reflect.apply(encodeStreamKey, value4, [{streamType: r12, guildId: a0, channelId: a1,
ownerId: a2}]);
binding = env2_1;
value6 = binding(env2_2[12]);
dispatch = value6.dispatch;
Reflect.apply(dispatch, value6, [{type: 'STREAM_PREVIEW_FETCH_START', streamKey: value5}]);
try {
binding = env2_0;
} catch (error) {
break exceptionLanding49;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding49;
}
try {
property = binding2[18];
} catch (error) {
break exceptionLanding49;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding49;
}
try {
HTTP = value7.HTTP;
} catch (error) {
break exceptionLanding49;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding49;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding49;
}
try {
binding = env2_13;
} catch (error) {
break exceptionLanding49;
}
try {
STREAM_PREVIEW = binding.STREAM_PREVIEW;
} catch (error) {
break exceptionLanding49;
}
try {
value8 = Reflect.apply(STREAM_PREVIEW, binding, [value5]);
} catch (error) {
break exceptionLanding49;
}
try {
object3.url = value8;
} catch (error) {
break exceptionLanding49;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding49;
}
try {
Date = global.Date;
} catch (error) {
break exceptionLanding49;
}
try {
now = Date.now;
} catch (error) {
break exceptionLanding49;
}
try {
value9 = Reflect.apply(now, Date, []);
} catch (error) {
break exceptionLanding49;
}
try {
object4.version = value9;
} catch (error) {
break exceptionLanding49;
}
try {
object3.query = object4;
} catch (error) {
break exceptionLanding49;
}
try {
object3.oldFormErrors = true;
} catch (error) {
break exceptionLanding49;
}
try {
object3.rejectWithError = false;
} catch (error) {
break exceptionLanding49;
}
try {
value10 = Reflect.apply(get, HTTP, [object3]);
} catch (error) {
break exceptionLanding49;
}
yield value10;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding49;
}
if (value12) {
return value11;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding49;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding49;
}
try {
property = binding3[12];
} catch (error) {
break exceptionLanding49;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding49;
}
try {
dispatch = value13.dispatch;
} catch (error) {
break exceptionLanding49;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding49;
}
try {
object3.type = 'STREAM_PREVIEW_FETCH_SUCCESS';
} catch (error) {
break exceptionLanding49;
}
try {
object3.streamKey = value5;
} catch (error) {
break exceptionLanding49;
}
try {
body = value11.body;
} catch (error) {
break exceptionLanding49;
}
try {
url = body.url;
} catch (error) {
break exceptionLanding49;
}
try {
object3.previewURL = url;
} catch (error) {
break exceptionLanding49;
}
try {
Reflect.apply(dispatch, value13, [object3]);
} catch (error) {
break exceptionLanding49;
}
break reduciblePort52;
}
break reduciblePort52;
}
status = error.status;
reducibleJoin51: while (true) {
if (status !== 429) {
r5 = value;
break reducibleJoin51;
}
body = error.body;
retry_after = body.retry_after;
binding = env2_1;
Millis = binding(env2_2[19]).Millis;
SECOND = Millis.SECOND;
value14 = retry_after * SECOND;
r5 = value14;
break reducibleJoin51;
}
binding = env2_1;
value15 = binding(env2_2[12]);
dispatch = value15.dispatch;
Reflect.apply(dispatch, value15, [{type: 'STREAM_PREVIEW_FETCH_FAIL', streamKey: value5, retryAfter: r5}]);
break reduciblePort52;
}
}
return value;
}
function* _fun69551(a0) { // fn#69551, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:2102, offset: 0x01c769cc, size: 146 bytes, params: 2, frame: 18
var binding;
var binding2;
var property;
var value3;
var post;
var object3;
var STREAM_NOTIFY;
var value4;
var object4;
var NetworkActionNames;
var value5;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
return undefined;
}
try {
property = binding2[20];
} catch (error) {
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
return undefined;
}
try {
post = value3.post;
} catch (error) {
return undefined;
}
try {
object3 = {};
} catch (error) {
return undefined;
}
try {
binding = env2_13;
} catch (error) {
return undefined;
}
try {
STREAM_NOTIFY = binding.STREAM_NOTIFY;
} catch (error) {
return undefined;
}
try {
value4 = Reflect.apply(STREAM_NOTIFY, binding, [a0]);
} catch (error) {
return undefined;
}
try {
object3.url = value4;
} catch (error) {
return undefined;
}
try {
object3.oldFormErrors = true;
} catch (error) {
return undefined;
}
try {
object4 = {};
} catch (error) {
return undefined;
}
try {
binding = env2_0;
} catch (error) {
return undefined;
}
try {
property = binding2[21];
} catch (error) {
return undefined;
}
try {
value = binding(property);
} catch (error) {
return undefined;
}
try {
NetworkActionNames = value.NetworkActionNames;
} catch (error) {
return undefined;
}
try {
STREAM_NOTIFY = NetworkActionNames.STREAM_NOTIFY;
} catch (error) {
return undefined;
}
try {
object4.event = STREAM_NOTIFY;
} catch (error) {
return undefined;
}
try {
object3.trackedActionData = object4;
} catch (error) {
return undefined;
}
try {
object3.rejectWithError = true;
} catch (error) {
return undefined;
}
try {
value = Reflect.apply(post, value3, [object3]);
} catch (error) {
return undefined;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
return undefined;
}
if (value5) {
return value;
}
}
}
function _fun69562() { // fn#69562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:3992, offset: 0x01c76d87, size: 61 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
value.call(env0_0, false, false, null, _fun69563);
}
function _fun69563() { // fn#69563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9098:4025, offset: 0x01c76dc4, size: 23 bytes, params: 1, frame: 11
watchStreamAndTransitionToStream(env1_1);
}
File diff suppressed because it is too large. Load diff
+112
View File
@@ -0,0 +1,112 @@
/* Metro module 9537; source: actions/SurveyActionCreators.tsx; dependencies: [9536, 661, 694, 683, 5046, 480, 1392, 2] */
function _fun74410(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:6, offset: 0x01d8ce03, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const surveyStore = importDefault(9536) /* metro dependency 9536: SurveyStore */;
const env0_4 = (require(9536) /* metro dependency 9536: SurveyStore */).SURVEY_REFETCH_INTERVAL;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.AnalyticEvents;
const env0_6 = constantsModule.NoticeTypes;
const env0_7 = constantsModule.Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/SurveyActionCreators.tsx');
exports.overrideSurvey = overrideSurvey;
exports.surveyHide = surveyHide;
exports.surveyFetch = surveyFetch;
exports.surveySeen = surveySeen;
}
function overrideSurvey(a0) { // fn#74411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:282, offset: 0x01d8cedd, size: 54 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SURVEY_OVERRIDE', id: a0});
}
function surveyHide(a0, a1) { // fn#74412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:371, offset: 0x01d8cf13, size: 163 bytes, params: 3, frame: 19
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SURVEY_HIDE', key: a0});
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport2.track;
if (a1) {
Reflect.apply(track, defaultImport2, [AnalyticEvents.APP_NOTICE_CLOSED, {notice_type: NoticeTypes.SURVEY,
survey_id: a0, dismissed: a1}]);
} else {
Reflect.apply(track, defaultImport2, [AnalyticEvents.APP_NOTICE_PRIMARY_CTA_OPENED,
{notice_type: NoticeTypes.SURVEY}]);
}
}
function surveyFetch(a0, a1) { // fn#74413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:610, offset: 0x01d8cfb6, size: 177 bytes, params: 3, frame: 18
const object3 = {};
if (a0 != null) {
object3.survey_override = a0;
}
if (a1 != null) {
object3.disable_auto_seen = a1;
}
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const get = defaultImport.get;
const object4 = {};
const USER_SURVEY = Endpoints.USER_SURVEY;
object4.url = USER_SURVEY;
object4.query = object3;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_SURVEY_FETCH = NetworkActionNames.USER_SURVEY_FETCH;
object4.trackedActionData = {event: USER_SURVEY_FETCH, properties: function(a0) {
var r4;
var value = undefined;
r4 = a0 == null || a0.body == null ? value : a0.body.survey;
var moduleValue = require(dependencyMap[6]);
return moduleValue.exact({key: r4 == null ? value : r4.key});
}};
object4.rejectWithError = false;
return Reflect.apply(get, defaultImport, [object4]).then(_fun74415, _fun74416);
}
function surveySeen(a0) { // fn#74417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:1199, offset: 0x01d8d16b, size: 223 bytes, params: 2, frame: 18
var object2;
var defaultImport2;
var post;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const env0_0 = a0;
const lastSeenTimestamp = SurveyStore.getLastSeenTimestamp();
if (lastSeenTimestamp === null) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SURVEY_SEEN', key: a0});
defaultImport2 = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
post = defaultImport2.post;
object2 = {};
object2.url = Endpoints.USER_SURVEY_SEEN(a0);
object2.trackedActionData = {event: NetworkActionNames.USER_SURVEY_SEEN, properties: properties};
object2.rejectWithError = false;
return Reflect.apply(post, defaultImport2, [object2]);
}
if (lastSeenTimestamp != null) {
var Date = global.Date;
if (Date.now() - lastSeenTimestamp >= SURVEY_REFETCH_INTERVAL) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SURVEY_SEEN', key: a0});
defaultImport2 = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
post = defaultImport2.post;
object2 = {};
object2.url = Endpoints.USER_SURVEY_SEEN(a0);
object2.trackedActionData = {event: NetworkActionNames.USER_SURVEY_SEEN, properties: properties};
object2.rejectWithError = false;
return Reflect.apply(post, defaultImport2, [object2]);
}
}
}
function _fun74415(a0) { // fn#74415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:968, offset: 0x01d8d0c3, size: 117 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SURVEY_FETCHED',
survey: a0 == null || a0.body == null ? value : a0.body.survey});
return a0 == null || a0.body == null ? value : a0.body.survey;
}
function _fun74416() { // fn#74416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:1123, offset: 0x01d8d138, size: 51 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'SURVEY_FETCHED', 'survey': null});
}
function surveySeenProperties() { // fn#74418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9723:1463, owner: surveySeen.properties, offset: 0x01d8d24a, size: 51 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(1392) /* metro dependency 1392: TypeUtils */).exact({key: env0_0});
}
+18
View File
@@ -0,0 +1,18 @@
/* Metro module 11540; source: actions/TypingActionCreators.tsx; dependencies: [694, 2] */
function _fun88433(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11726:6, offset: 0x01fe2ec8, size: 118 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {startTyping: startTyping, stopTyping: stopTyping};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/TypingActionCreators.tsx');
exports.default = object2;
}
function startTyping(a0) { // fn#88434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11726:99, offset: 0x01fe2f3e, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TYPING_START_LOCAL', channelId: a0});
}
function stopTyping(a0) { // fn#88435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11726:173, offset: 0x01fe2f75, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TYPING_STOP_LOCAL', channelId: a0});
}
@@ -0,0 +1,65 @@
/* Metro module 7879; source: actions/UploadAttachmentActionCreators.tsx; dependencies: [694, 2] */
function _fun63170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:6, offset: 0x01b73431, size: 186 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {popFirstFile: popFirstFile, addFiles: addFiles, addFile: addFile, remove: remove_63174,
removeFiles: removeFiles, clearAll: clearAll, update: update_63177, setUploads: setUploads_63178,
setFile: setFile};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/UploadAttachmentActionCreators.tsx');
exports.default = object2;
}
function popFirstFile(a0) { // fn#63171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:99, offset: 0x01b734eb, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_ATTACHMENT_POP_FILE',
channelId: a0});
}
function addFiles({files, channelId, draftType}) { // fn#63172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:182, offset: 0x01b73522, size: 82 bytes, params: 2, frame: 16
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'UPLOAD_ATTACHMENT_ADD_FILES', channelId: channelId, files: files, draftType: draftType});
}
function addFile({file, channelId, draftType, allowOptimization}) { // fn#63173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:314, offset: 0x01b73574, size: 101 bytes, params: 2, frame: 17
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_ATTACHMENT_ADD_FILES',
channelId: channelId, files: [file], draftType: draftType, allowOptimization: allowOptimization});
}
function remove_63174(a0, a1, a2) { // fn#63174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:486, offset: 0x01b735d9, size: 70 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_ATTACHMENT_REMOVE_FILE',
channelId: a0, id: a1, draftType: a2});
}
function removeFiles(a0, a1, a2) { // fn#63175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:587, offset: 0x01b7361f, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_ATTACHMENT_REMOVE_FILES',
channelId: a0, attachmentIds: a1, draftType: a2});
}
function clearAll(a0, a1) { // fn#63176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:705, offset: 0x01b73666, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_ATTACHMENT_CLEAR_ALL_FILES',
channelId: a0, draftType: a1});
}
function update_63177(a0, a1, a2, {description, filename, spoiler, thumbnail}) { // fn#63177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:805, offset: 0x01b736a5, size: 115 bytes, params: 5, frame: 17
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'UPLOAD_ATTACHMENT_UPDATE_FILE', channelId: a0, id: a1, filename: filename,
description: description, thumbnail: thumbnail, spoiler: spoiler, draftType: a2});
}
function setUploads_63178({uploads, channelId, draftType, resetState}) { // fn#63178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:1002, offset: 0x01b73718, size: 111 bytes, params: 2, frame: 17
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = dispatcher.dispatch;
const object2 = {type: 'UPLOAD_ATTACHMENT_SET_UPLOADS', channelId: channelId};
object2.uploads = resetState ? uploads.map(function(a0) {
return a0.resetState();
}) : uploads;
object2.draftType = draftType;
Reflect.apply(dispatch, dispatcher, [object2]);
}
function setFile({file, channelId, id, draftType, allowOptimization}) { // fn#63180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8057:1184, offset: 0x01b73796, size: 102 bytes, params: 2, frame: 18
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'UPLOAD_ATTACHMENT_SET_FILE', channelId: channelId, id: id, file: file,
draftType: draftType, allowOptimization: allowOptimization});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,116 @@
/* Metro module 10218; source: actions/UserActivityActionCreators.tsx; dependencies: [5, 4396, 661, 694, 10217, 507, 2] */
function _fun79496(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:6, offset: 0x01e557d6, size: 193 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/UserActivityActionCreators.tsx');
exports.sync = sync_79500;
exports.play = play_79501;
exports.getMetadata = function() {
return _getMetadata.apply(this, arguments);
};
}
function _getMetadata() { // fn#79497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:136, offset: 0x01e55897, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun79499).apply(this, arguments);
}
function sync_79500(a0, a1) { // fn#79500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:701, offset: 0x01e559ff, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_SYNC', activity: a0,
userId: a1});
}
function play_79501(a0, a1) { // fn#79501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:789, offset: 0x01e55a3f, size: 90 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
let value = require(10217) /* metro dependency 10217: SpotifyUtils */;
value = value.getSpotifyMetadataFromActivity(a0, a1);
value = value.then(_fun79502);
value.catch(_fun79503);
}
function* _fun79499(a0, a1) { // fn#79499, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:183, offset: 0x01e558d4, size: 299 bytes, params: 3, frame: 23
var binding;
var activityMetadata;
var session_id;
var HTTP;
var get;
var USER_ACTIVITY_METADATA;
var value4;
var body;
let value = undefined;
if (false) {
return value;
}
const metadata = a0.metadata;
if (metadata == null) {
value = environment.__proto__.__proto__;
binding = env2_4;
activityMetadata = binding.getActivityMetadata(a1);
if (activityMetadata != null) {
return activityMetadata;
}
session_id = a0.session_id;
if (session_id == null) {
throw new global.Error('null/undefined session_id');
}
binding = env2_0;
HTTP = binding(env2_2[5]).HTTP;
get = HTTP.get;
binding = env2_5;
USER_ACTIVITY_METADATA = binding.USER_ACTIVITY_METADATA;
session_id = a0.session_id;
yield Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: Reflect.apply(USER_ACTIVITY_METADATA, binding, [a1, session_id, a0.application_id])}]);
value4 = undefined;
if (false) {
return value4;
}
body = value4.body;
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'ACTIVITY_METADATA_UPDATE', metadata: body, userId: a1});
} else {
var Object = global.Object;
if (Object.keys(metadata).length > 0) {
return metadata;
}
value = environment.__proto__.__proto__;
activityMetadata = env2_4.getActivityMetadata(a1);
if (activityMetadata != null) {
return activityMetadata;
}
if (a0.session_id == null) {
throw new global.Error('null/undefined session_id');
}
HTTP = env2_0(env2_2[5]).HTTP;
get = HTTP.get;
binding = env2_5;
yield Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: binding.USER_ACTIVITY_METADATA(a1, a0.session_id, a0.application_id)}]);
value4 = undefined;
if (false) {
return value4;
}
body = value4.body;
value = env2_1(env2_2[3]);
value.dispatch({type: 'ACTIVITY_METADATA_UPDATE', metadata: body, userId: a1});
}
return body;
}
function _fun79502(a0) { // fn#79502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:858, offset: 0x01e55a99, size: 77 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_PLAY',
activity: env0_0, userId: require, metadata: a0});
}
function _fun79503() { // fn#79503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:942, offset: 0x01e55ae6, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACTIVITY_PLAY',
activity: env0_0, userId: require});
}
@@ -0,0 +1,263 @@
/* Metro module 7620; source: actions/UserSettingsAccountActionCreators.tsx; dependencies: [5, 661, 5079, 694, 507, 5076, 1230, 587, 7618, 7615, 7621, 7508, 2] */
function _fun61030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:6, offset: 0x0171883b, size: 393 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function() {
return _saveProfileAndAccountRequest.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_4 = value.Endpoints;
const env0_5 = value.Routes;
const env0_6 = value.DEVICE_TOKEN;
const env0_7 = value.DEVICE_VOIP_TOKEN;
value = require(5079) /* metro dependency 5079: PushNotificationConstants */;
const env0_8 = value.DEVICE_PUSH_VOIP_PROVIDER;
const env0_9 = value.getDevicePushProvider;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/UserSettingsAccountActionCreators.tsx');
exports.accountDetailsInit = accountDetailsInit;
exports.accountDetailsClose = accountDetailsClose;
exports.disableAccount = disableAccount;
exports.saveProfileAndAccountRequest = closure;
exports.saveProfileAndAccountChanges = saveProfileAndAccountChanges;
exports.getHarvestStatus = function() {
var HTTP = require(dependencyMap[4]).HTTP;
return HTTP.get({'url': null, 'oldFormErrors': true, 'rejectWithError': false, url: Endpoints.USER_HARVEST});
};
exports.requestHarvest = function(a0) {
var HTTP = require(dependencyMap[4]).HTTP;
return HTTP.post({url: Endpoints.USER_HARVEST, body: {backends: a0}, oldFormErrors: true,
rejectWithError: false});
};
exports.clearErrors = clearErrors;
exports.resetPendingAccountChanges = resetPendingAccountChanges;
exports.resetAllPending = resetAllPending;
exports.resetAllTryItOut = resetAllTryItOut;
exports.resetAndCloseUserProfileForm = resetAndCloseUserProfileForm;
exports.resetPendingLegacyUsernameDisabled = resetPendingLegacyUsernameDisabled;
exports.resetPendingPrimaryGuildChanges = resetPendingPrimaryGuildChanges;
exports.updateAccount = updateAccount;
exports.resetAccount = resetAccount;
exports.saveAccountChanges = saveAccountChanges;
}
function _saveProfileAndAccountRequest() { // fn#61032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:345, offset: 0x017189c4, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun61034).apply(this, arguments);
}
function accountDetailsInit() { // fn#61035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:978, offset: 0x01718b73, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_INIT'});
}
function accountDetailsClose() { // fn#61036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:1085, offset: 0x01718ba4, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_CLOSE'});
}
function disableAccount(a0, a1) { // fn#61037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:1189, offset: 0x01718bd5, size: 117 bytes, params: 3, frame: 13
const r3 = a1 ? Endpoints.DELETE_ACCOUNT : Endpoints.DISABLE_ACCOUNT;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
return HTTP.post({url: r3, body: {password: a0}, oldFormErrors: true, rejectWithError: false}).then(function() {
importDefault(dependencyMap[5]).logoutInternal();
require(dependencyMap[6]).transitionTo(Routes.DEFAULT_LOGGED_OUT);
});
}
function saveProfileAndAccountChanges({username, discriminator, email, emailToken, password, avatar, avatarDescription, avatarId, avatarDecoration, newPassword, globalName, legacyUsername, nameplate, primaryGuildId, displayNameStyles, avatarOriginalMd5}) { // fn#61039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:1523, offset: 0x01718c94, size: 619 bytes, params: 2, frame: 32
var object2;
var skuId;
var value3;
var value4;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_SUBMIT'});
object2 = {username: username, email: email, email_token: emailToken, password: password, avatar: avatar,
avatar_description: avatarDescription, avatar_id: avatarId, discriminator: discriminator,
global_name: globalName, legacy_username: legacyUsername, new_password: newPassword};
if (avatarDecoration !== undefined) {
value3 = null;
skuId = value3 == avatarDecoration ? undefined : avatarDecoration.skuId;
object2.avatar_decoration_sku_id = value3 != skuId ? skuId : value3;
}
if (nameplate !== undefined) {
value4 = null;
skuId = value4 == nameplate ? undefined : nameplate.skuId;
object2.nameplate_sku_id = value4 != skuId ? skuId : value4;
}
if (primaryGuildId !== undefined) {
object2.primary_guild_id = primaryGuildId;
}
if (displayNameStyles != null) {
object2.display_name_font_id = displayNameStyles.fontId;
object2.display_name_effect_id = displayNameStyles.effectId;
object2.display_name_colors = displayNameStyles.colors;
} else if (displayNameStyles === null) {
object2.display_name_font_id = null;
object2.display_name_effect_id = null;
object2.display_name_colors = null;
}
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value5 = Storage.get(DEVICE_TOKEN);
const devicePushProvider = getDevicePushProvider();
if (devicePushProvider != null && value5 != null) {
object2.push_provider = devicePushProvider;
object2.push_token = value5;
}
const value9 = Storage.get(DEVICE_VOIP_TOKEN);
if (DEVICE_PUSH_VOIP_PROVIDER != null && value9 != null) {
object2.push_voip_provider = DEVICE_PUSH_VOIP_PROVIDER;
object2.push_voip_token = value9;
}
const saveProfileAndAccountRequestBinding = saveProfileAndAccountRequest;
const defaultImport2 = importDefault(7618) /* metro dependency 7618: InlineUploader */;
const buildHeadersForMd5 = defaultImport2.buildHeadersForMd5;
const SafetyScannedUploadSurface = (require(7615) /* metro dependency 7615: safetyScannedUploadSurfaces */).SafetyScannedUploadSurface;
const USER_DEFAULT_PROFILE_AVATAR = SafetyScannedUploadSurface.USER_DEFAULT_PROFILE_AVATAR;
return saveProfileAndAccountRequestBinding(object2, {headers: Reflect.apply(buildHeadersForMd5, defaultImport2,
[{[USER_DEFAULT_PROFILE_AVATAR]: avatarOriginalMd5}])}).then(_fun61040, _fun61041);
}
function clearErrors() { // fn#61044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:3257, offset: 0x0171904f, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_CLEAR_ERRORS'});
}
function resetPendingAccountChanges() { // fn#61045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:3372, offset: 0x01719080, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_RESET_PENDING_ACCOUNT_CHANGES'});
}
function resetAllPending() { // fn#61046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:3508, offset: 0x017190b1, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_RESET_PENDING_CHANGES'});
}
function resetAllTryItOut() { // fn#61047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:3626, offset: 0x017190e2, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_RESET_TRY_IT_OUT_CHANGES'});
}
function resetAndCloseUserProfileForm() { // fn#61048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:3760, offset: 0x01719113, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_RESET_AND_CLOSE_FORM'});
}
function resetPendingLegacyUsernameDisabled() { // fn#61049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:3908, offset: 0x01719144, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_RESET_PENDING_LEGACY_USERNAME_DISABLED'});
}
function resetPendingPrimaryGuildChanges() { // fn#61050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:4077, offset: 0x01719175, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_RESET_PENDING_PRIMARY_GUILD_CHANGES'});
}
function updateAccount(a0) { // fn#61051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:4222, offset: 0x017191a6, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_UPDATE_ACCOUNT',
settings: a0});
}
function resetAccount() { // fn#61052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:4337, offset: 0x017191df, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_RESET'});
}
function saveAccountChanges({username, email, emailToken, password, avatar, newPassword, discriminator}, {close}) { // fn#61053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:4436, offset: 0x01719210, size: 417 bytes, params: 3, frame: 20
var object2;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_SUBMIT'});
object2 = {username: username, email: email, email_token: emailToken, password: password, avatar: avatar,
new_password: newPassword};
object2.discriminator = discriminator != null ? discriminator === '' ? undefined : discriminator : undefined;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value3 = Storage.get(DEVICE_TOKEN);
const devicePushProvider = getDevicePushProvider();
if (devicePushProvider != null && value3 != null) {
object2.push_provider = devicePushProvider;
object2.push_token = value3;
}
const value7 = Storage.get(DEVICE_VOIP_TOKEN);
if (DEVICE_PUSH_VOIP_PROVIDER != null && value7 != null) {
object2.push_voip_provider = DEVICE_PUSH_VOIP_PROVIDER;
object2.push_voip_token = value7;
}
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const ME = Endpoints.ME;
return Reflect.apply(patch, HTTP, [{url: ME, oldFormErrors: true, body: object2,
rejectWithError: false}]).then(_fun61054, _fun61055);
}
async function _fun61034(a0) { // fn#61034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:426, offset: 0x01718a06, size: 365 bytes, params: 2, frame: 21
let value = a1;
if (false) {
return undefined;
}
const value4 = undefined;
const r7 = value !== value4 ? value : {};
await value4;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const patch = HTTP.patch;
const ME = env2_4.ME;
await Reflect.apply(patch, HTTP, [{url: ME, oldFormErrors: true, body: a0, headers: r7.headers,
rejectWithError: false}]);
const value6 = undefined;
if (true) {
var body = value6.body;
var token = body.token;
if (token) {
token = body.token;
delete body.token;
env2_1(env2_2[3]).dispatch({type: 'UPDATE_TOKEN', token: token, userId: body.id});
if ((a0 == null ? value4 : a0.password) != null && (a0 == null ? value4 : a0.new_password) != null) {
env2_1(env2_2[3]).dispatch({type: 'PASSWORD_UPDATED', userId: body.id});
}
}
value = env2_1(env2_2[3]);
value.dispatch({type: 'CURRENT_USER_UPDATE', user: body});
}
return value6;
}
function _fun61040(a0) { // fn#61040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:2739, offset: 0x01718eff, size: 118 bytes, params: 2, frame: 15
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_SUBMIT_SUCCESS'});
if (!(avatar == null && avatarId == null)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RECENT_AVATARS_UPDATE'});
}
return a0;
}
function _fun61041(a0) { // fn#61041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:2879, offset: 0x01718f75, size: 62 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_PROFILE_SETTINGS_SUBMIT_FAILURE',
errors: a0.body});
return a0;
}
function _fun61054(a0) { // fn#61054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:5007, offset: 0x017193b1, size: 370 bytes, params: 2, frame: 20
const body = a0.body;
const token = body.token;
delete body.token;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPDATE_TOKEN', token: token,
userId: body.id});
const defaultImport2 = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport2.dispatch({type: 'CURRENT_USER_UPDATE', user: body});
if (avatar !== undefined) {
(require(7621) /* metro dependency 7621: trackUserAvatarUpdated */).trackUserAvatarUpdated({avatarHash: body.avatar});
}
if (newPassword != null) {
defaultImport2.dispatch({type: 'USER_PASSWORD_UPDATE', user: body, newPassword: newPassword});
}
if (password != null && newPassword != null) {
defaultImport2.dispatch({type: 'PASSWORD_UPDATED', userId: body.id});
}
if (close) {
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
} else {
defaultImport2.dispatch({type: 'USER_SETTINGS_MODAL_SUBMIT_COMPLETE'});
}
return a0;
}
function _fun61055(a0) { // fn#61055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7798:5476, offset: 0x01719523, size: 62 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_SUBMIT_FAILURE',
errors: a0.body});
return a0;
}
@@ -0,0 +1,371 @@
/* Metro module 7896; source: actions/UserSettingsActionCreators.tsx; dependencies: [5, 3964, 1311, 1310, 661, 1313, 1362, 1314, 1345, 694, 3829, 2] */
function _fun63228(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:6, offset: 0x01b76eaa, size: 333 bytes, params: 8, frame: 19
var object2;
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const clientThemesBackgroundStore = importDefault(3964) /* metro dependency 3964: ClientThemesBackgroundStore */;
const selectivelySyncedUserSettingsStore = importDefault(1311) /* metro dependency 1311: SelectivelySyncedUserSettingsStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const themeConstantsModule = require(1313) /* metro dependency 1313: ThemeConstants */;
themeConstantsModule.SystemTheme;
const env0_8 = themeConstantsModule.SystemThemeState;
object2 = {overrideLocale: overrideLocale, updatedUnsyncedSettings: updatedUnsyncedSettings,
setShouldSyncTextSettings: setShouldSyncTextSettings,
setShouldSyncAppearanceSettings: setShouldSyncAppearanceSettings, applySettingsOverride: applySettingsOverride,
clearSettingsOverride: function(a0) {
var r5;
importDefault(dependencyMap[9]).dispatch({type: 'USER_SETTINGS_OVERRIDE_CLEAR', settings: copyRestArgs(0, r5)});
}, updateLocale: function(a0) {
var env0_0 = a0;
var PreloadedUserSettingsActionCreators = require(dependencyMap[6]).PreloadedUserSettingsActionCreators;
var INFREQUENT_USER_ACTION = require(dependencyMap[6]).UserSettingsDelay.INFREQUENT_USER_ACTION;
return PreloadedUserSettingsActionCreators.updateAsync('localization', _fun63241, INFREQUENT_USER_ACTION);
}, updateTheme: updateTheme};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/UserSettingsActionCreators.tsx');
exports.default = object2;
exports.saveGuildFolders = function(a0) {
var env0_0 = a0;
var PreloadedUserSettingsActionCreators = require(dependencyMap[6]).PreloadedUserSettingsActionCreators;
var FREQUENT_USER_ACTION = require(dependencyMap[6]).UserSettingsDelay.FREQUENT_USER_ACTION;
return PreloadedUserSettingsActionCreators.updateAsync('guildFolders', _fun63245, FREQUENT_USER_ACTION);
};
exports.saveClientTheme = saveClientTheme;
}
function convertThemeToProto(a0) { // fn#63229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:204, offset: 0x01b76ff7, size: 243 bytes, params: 2, frame: 12
const Theme = (require(1314) /* metro dependency 1314: preloaded_user_settings */).Theme;
const DARK = ThemeTypes.DARK;
if (DARK !== a0) {
var LIGHT = ThemeTypes.LIGHT;
if (LIGHT === a0) {
return Theme.LIGHT;
}
var DARKER = ThemeTypes.DARKER;
if (DARKER === a0) {
return Theme.DARKER;
}
var MIDNIGHT = ThemeTypes.MIDNIGHT;
if (MIDNIGHT === a0) {
return Theme.MIDNIGHT;
}
}
return Theme.DARK;
}
function convertClientThemeSettingsToProto(a0) { // fn#63230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:447, offset: 0x01b770ea, size: 173 bytes, params: 2, frame: 17
var r1;
var object2;
const object4 = {};
const backgroundGradientPresetId = a0.backgroundGradientPresetId;
const value = undefined;
object4.backgroundGradientPresetId = backgroundGradientPresetId != null ? (require(1345) /* metro dependency 1345: wrappers */).UInt32Value.create({value: a0.backgroundGradientPresetId}) : value;
let customUserThemeSettings = a0.customUserThemeSettings;
if (customUserThemeSettings != null) {
object2 = {};
customUserThemeSettings = a0.customUserThemeSettings;
object2.colors = customUserThemeSettings.colors;
customUserThemeSettings = a0.customUserThemeSettings;
object2.gradientColorStops = customUserThemeSettings.gradientColorStops;
customUserThemeSettings = a0.customUserThemeSettings;
object2.gradientAngle = customUserThemeSettings.gradientAngle;
customUserThemeSettings = a0.customUserThemeSettings;
object2.baseMix = customUserThemeSettings.baseMix;
r1 = object2;
} else {
r1 = value;
}
object4.customUserThemeSettings = r1;
return object4;
}
function overrideLocale(a0) { // fn#63231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:907, offset: 0x01b77197, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_LOCALE_OVERRIDE',
locale: a0});
}
function updatedUnsyncedSettings(a0) { // fn#63232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:992, offset: 0x01b771d0, size: 55 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UNSYNCED_USER_SETTINGS_UPDATE',
settings: a0});
}
function setShouldSyncTextSettings(a0) { // fn#63233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:1088, offset: 0x01b77207, size: 306 bytes, params: 2, frame: 20
var r6;
var object;
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = defaultImport.dispatch;
if (a0) {
r6 = {};
} else {
object = {};
object.inlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia.getSetting();
object.inlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia.getSetting();
object.renderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds.getSetting();
object.renderReactions = (require(3829) /* metro dependency 3829: UserSettings */).RenderReactions.getSetting();
object.animateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji.getSetting();
object.animateStickers = (require(3829) /* metro dependency 3829: UserSettings */).AnimateStickers.getSetting();
object.gifAutoPlay = (require(3829) /* metro dependency 3829: UserSettings */).GifAutoPlay.getSetting();
r6 = object;
}
Reflect.apply(dispatch, defaultImport, [{type: 'SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE',
changes: {text: {shouldSync: a0, settings: r6}}}]);
}
function setShouldSyncAppearanceSettings(a0) { // fn#63234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:1635, offset: 0x01b77339, size: 34 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun63236)();
}
function applySettingsOverride(a0) { // fn#63238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:2371, offset: 0x01b7751c, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_OVERRIDE_APPLY',
settings: a0});
}
function updateLocale(a0) { // fn#63240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:2573, offset: 0x01b77591, size: 85 bytes, params: 2, frame: 17
const env0_0 = a0;
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
return Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['localization', _fun63241,
INFREQUENT_USER_ACTION]);
}
function updateTheme(a0) { // fn#63242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:2751, offset: 0x01b77627, size: 169 bytes, params: 2, frame: 20
var PreloadedUserSettingsActionCreators;
const env0_0 = a0;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE',
changes: {appearance: {settings: {theme: a0}}}});
if (SelectivelySyncedUserSettingsStore.shouldSync('appearance')) {
PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
PreloadedUserSettingsActionCreators.updateAsync('appearance', _fun63243,
(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay.INFREQUENT_USER_ACTION);
}
}
function saveGuildFolders(a0) { // fn#63244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:3166, offset: 0x01b776f0, size: 85 bytes, params: 2, frame: 17
const env0_0 = a0;
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay;
const FREQUENT_USER_ACTION = UserSettingsDelay.FREQUENT_USER_ACTION;
return Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['guildFolders', _fun63245,
FREQUENT_USER_ACTION]);
}
function saveClientTheme({backgroundGradientPresetId, customUserThemeSettings, theme, useSystemTheme}) { // fn#63247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:3709, offset: 0x01b778a2, size: 328 bytes, params: 2, frame: 26
let value = a1;
const r4 = value !== undefined ? value : (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay.INFREQUENT_USER_ACTION;
value = theme === 'system';
let r15 = value ? SystemThemeState.ON : SystemThemeState.OFF;
r15 = useSystemTheme ?? r15;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UNSYNCED_USER_SETTINGS_UPDATE',
settings: {useSystemTheme: r15}});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE',
changes: {appearance: {settings: {clientThemeSettings: {backgroundGradientPresetId: backgroundGradientPresetId,
customUserThemeSettings: customUserThemeSettings}, theme: value ? undefined : theme}}}});
if (SelectivelySyncedUserSettingsStore.shouldSync('appearance')) {
return (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators.updateAsync('appearance',
function(a0) {
a0.theme = convertThemeToProto(theme);
a0.clientThemeSettings = convertClientThemeSettingsToProto({backgroundGradientPresetId: backgroundGradientPresetId,
customUserThemeSettings: customUserThemeSettings});
}, r4);
}
}
function* _fun63236() { // fn#63236, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:1641, offset: 0x01b77364, size: 301 bytes, params: 1, frame: 24
var environment;
var r8;
var value3;
var binding;
var binding2;
var property;
var value4;
var PreloadedUserSettingsActionCreators;
var updateAsync;
var value5;
var UserSettingsDelay;
var INFREQUENT_USER_ACTION;
var closure;
var value6;
var value7;
var value8;
var value9;
var object2;
var gradientPreset;
var error;
if (false) {
return undefined;
}
value = environment.__proto__;
if (require) {
value3 = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
return undefined;
}
try {
property = binding2[6];
} catch (error) {
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
return undefined;
}
try {
PreloadedUserSettingsActionCreators = value4.PreloadedUserSettingsActionCreators;
} catch (error) {
return undefined;
}
try {
updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
} catch (error) {
return undefined;
}
try {
property = binding2[6];
} catch (error) {
return undefined;
}
try {
value5 = binding(property);
} catch (error) {
return undefined;
}
try {
UserSettingsDelay = value5.UserSettingsDelay;
} catch (error) {
return undefined;
}
try {
INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
} catch (error) {
return undefined;
}
try {
} catch (error) {
return undefined;
}
try {
closure = _fun63237;
} catch (error) {
return undefined;
}
try {
value6 = Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['appearance', closure,
INFREQUENT_USER_ACTION]);
} catch (error) {
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
return undefined;
}
if (value8) {
return value7;
}
value9 = environment.__proto__.__proto__;
}
binding = env2_1;
const value10 = undefined;
const value11 = binding(env2_2[9]);
const dispatch = value11.dispatch;
const object = {};
object.shouldSync = require;
if (require) {
r8 = {};
} else {
object2 = {};
object2.theme = env2_6.theme;
gradientPreset = env2_4.gradientPreset;
object2.clientThemeSettings = {backgroundGradientPresetId: gradientPreset == null ? value10 : gradientPreset.id};
object2.developerMode = env2_0(env2_2[10]).DeveloperMode.getSetting();
r8 = object2;
}
object.settings = r8;
Reflect.apply(dispatch, value11, [{type: 'SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE', changes: {appearance: object}}]);
return value10;
}
function _fun63241(a0) { // fn#63241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:2648, offset: 0x01b775e6, size: 65 bytes, params: 2, frame: 13
const value = environment.__proto__;
const StringValue = (require(1345) /* metro dependency 1345: wrappers */).StringValue;
a0.locale = StringValue.create({value: env0_0});
}
function _fun63243(a0) { // fn#63243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:2973, offset: 0x01b776d0, size: 32 bytes, params: 2, frame: 11
const value = environment.__proto__;
a0.theme = convertThemeToProto(env0_0);
}
function _fun63245(a0) { // fn#63245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:3274, offset: 0x01b77745, size: 37 bytes, params: 2, frame: 11
a0.folders = env0_0.map(_fun63246);
}
function _fun63237(a0) { // fn#63237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:1744, offset: 0x01b77491, size: 139 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__.__proto__;
let binding = env3_9;
const theme = env3_6.theme;
const value2 = undefined;
a0.theme = binding(theme);
binding = env3_10;
const object2 = {};
const gradientPreset = env3_4.gradientPreset;
object2.backgroundGradientPresetId = gradientPreset == null ? value2 : gradientPreset.id;
const ClientThemeSettings = env3_0(env3_2[10]).ClientThemeSettings;
value = ClientThemeSettings.getSetting();
object2.customUserThemeSettings = value == null ? value2 : value.customUserThemeSettings;
a0.clientThemeSettings = binding(object2);
return value2;
}
function _fun63246(a0) { // fn#63246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8074:3295, offset: 0x01b7776a, size: 312 bytes, params: 2, frame: 18
var Int64Value;
var UInt64Value;
var StringValue;
const GuildFolder = (require(1314) /* metro dependency 1314: preloaded_user_settings */).GuildFolder;
let create = GuildFolder.create;
let object2 = {};
object2.guildIds = a0.guildIds;
const value2 = Reflect.apply(create, GuildFolder, [object2]);
if (a0.folderId != null) {
Int64Value = (require(1345) /* metro dependency 1345: wrappers */).Int64Value;
create = Int64Value.create;
object2 = {};
object2.value = global.String(a0.folderId);
value2.id = Reflect.apply(create, Int64Value, [object2]);
}
if (a0.folderColor != null) {
UInt64Value = (require(1345) /* metro dependency 1345: wrappers */).UInt64Value;
create = UInt64Value.create;
object2 = {};
object2.value = global.String(a0.folderColor);
value2.color = Reflect.apply(create, UInt64Value, [object2]);
}
if (a0.folderName != null && a0.folderName !== '') {
StringValue = (require(1345) /* metro dependency 1345: wrappers */).StringValue;
create = StringValue.create;
object2 = {};
object2.value = global.String(a0.folderName);
value2.name = Reflect.apply(create, StringValue, [object2]);
}
return value2;
}
@@ -0,0 +1,19 @@
/* Metro module 7508; source: actions/UserSettingsModalActionCreators.tsx; dependencies: [694, 2] */
function _fun60561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7686:6, offset: 0x01705f31, size: 114 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {close: close_60562, setSection: setSection};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/UserSettingsModalActionCreators.tsx');
exports.default = object2;
}
function close_60562() { // fn#60562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7686:99, offset: 0x01705fa3, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_CLOSE'});
}
function setSection(a0) { // fn#60563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7686:161, offset: 0x01705fd3, size: 54 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SETTINGS_MODAL_SET_SECTION',
section: a0});
}
+124
View File
@@ -0,0 +1,124 @@
/* Metro module 15205; source: actions/WebhooksActionCreators.tsx; dependencies: [661, 694, 507, 22, 2] */
function _fun116293(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:6, offset: 0x02484034, size: 191 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(661) /* metro dependency 661: Constants */).Endpoints;
const env0_4 = ['Spidey Bot', 'Captain Hook'];
object2 = {fetchForGuild: fetchForGuild, fetchForChannel: fetchForChannel, create: create_116300,
delete: _fun116302, update: update_116304};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/WebhooksActionCreators.tsx');
exports.default = object2;
}
function fetchForGuild(a0) { // fn#116294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:151, offset: 0x024840f3, size: 159 bytes, params: 2, frame: 17
var object2;
const env0_0 = a0;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOKS_FETCHING', guildId: a0});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object2.url = Endpoints.GUILD_WEBHOOKS(a0);
let value = Reflect.apply(get, HTTP, [object2]);
value = value.then(_fun116295);
value.catch(_fun116296);
}
function fetchForChannel(a0, a1) { // fn#116297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:480, offset: 0x02484228, size: 170 bytes, params: 3, frame: 18
var object2;
const env0_0 = a0;
const env0_1 = a1;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOKS_FETCHING', guildId: a0,
channelId: a1});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.CHANNEL_WEBHOOKS(a1);
let value = Reflect.apply(get, HTTP, [object2]);
value = value.then(_fun116298);
value.catch(_fun116299);
}
function create_116300(a0, a1, a2) { // fn#116300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:846, offset: 0x02484323, size: 184 bytes, params: 4, frame: 17
var r5;
var binding;
let value = a2;
const env0_0 = a0;
if (value != null) {
r5 = value;
} else {
binding = env0_4;
value = importDefault(22) /* metro dependency 22 */;
r5 = binding[value.random(0, binding.length - 1)];
}
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const object2 = {};
object2.url = Endpoints.CHANNEL_WEBHOOKS(a1);
object2.body = {name: r5};
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(post, HTTP, [object2]).then(_fun116301);
}
function _fun116302(a0, a1) { // fn#116302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:1092, offset: 0x02484422, size: 107 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const del = HTTP.del;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object2.url = Endpoints.WEBHOOK(a1);
return Reflect.apply(del, HTTP, [object2]).then(_fun116303);
}
function update_116304(a0, a1, a2) { // fn#116304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:1257, offset: 0x024844d0, size: 113 bytes, params: 4, frame: 15
const env0_0 = a0;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = Endpoints.WEBHOOK(a1);
object2.body = a2;
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object2]).then(_fun116305);
}
function _fun116295({body}) { // fn#116295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:309, offset: 0x02484192, size: 73 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOKS_UPDATE',
guildId: env0_0, webhooks: body});
}
function _fun116296({body}) { // fn#116296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:394, offset: 0x024841db, size: 77 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOKS_UPDATE', guildId: env0_0,
error: body.message});
}
function _fun116298({body}) { // fn#116298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:656, offset: 0x024842d2, size: 81 bytes, params: 2, frame: 14
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOKS_UPDATE',
guildId: env0_0, channelId: require, webhooks: body});
}
function _fun116301({body}) { // fn#116301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:1004, offset: 0x024843db, size: 71 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOK_CREATE', guildId: env0_0,
webhook: body});
return body;
}
function _fun116303() { // fn#116303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:1178, offset: 0x0248448d, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOK_DELETE', guildId: env0_0,
webhookId: require});
}
function _fun116305({body}) { // fn#116305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15402:1354, offset: 0x02484541, size: 71 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBHOOK_UPDATE', guildId: env0_0,
webhook: body});
return body;
}
@@ -0,0 +1,218 @@
/* Metro module 4496; source: actions/native/AlertActionCreators.tsx; dependencies: [31, 33, 4080, 694, 4497, 1244, 1357, 4500, 4596, 4596, 1962, 2] */
function _fun38356(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:6, offset: 0x010bdb3a, size: 202 bytes, params: 8, frame: 18
var object2;
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.Fragment;
const env0_5 = value.jsxs;
object2 = {openLazy: function(a0) {
var importer = a0.importer;
var hideActionSheet = a0.hideActionSheet;
var env0_0 = !(hideActionSheet !== undefined) || hideActionSheet;
var isDismissable = a0.isDismissable;
var env0_1 = isDismissable !== undefined ? isDismissable : false;
return importer().then(_fun38358);
}, close: close_38359, show: show_38360, confirm: function(a0) {
var env0_0 = this;
var env0_1 = a0;
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun38368);
return value2 instanceof Object ? value2 : value;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/AlertActionCreators.tsx');
exports.default = object2;
}
function openLazy_38357({importer, hideActionSheet, isDismissable}) { // fn#38357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:171, offset: 0x010bdc04, size: 66 bytes, params: 2, frame: 14
if (hideActionSheet !== undefined) {
}
if (isDismissable !== undefined) {
}
return importer().then(_fun38358);
}
function close_38359() { // fn#38359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:335, offset: 0x010bdcb5, size: 100 bytes, params: 1, frame: 13
if (env0_6 != null) {
(require(4497) /* metro dependency 4497: useAlertStoreNative */).dismissAlert(env0_6);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ALERT_CLOSE'});
}
function show_38360(a0) { // fn#38360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:425, offset: 0x010bdd19, size: 1086 bytes, params: 2, frame: 36
var r18;
var r10;
var r8;
var value;
var intl;
var object3;
var body;
var title;
var binding;
var value25;
var value26;
var children;
var confirmColor;
var cancelText;
var moduleValue3;
var openAlert;
var AlertModal;
var jsxRuntimeEnv0_4Binding;
var items2;
let hideActionSheet = a0.hideActionSheet;
hideActionSheet = hideActionSheet === undefined || hideActionSheet;
const isDismissable = a0.isDismissable;
let confirmText = a0.confirmText;
if (confirmText !== undefined) {
r18 = confirmText;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS);
r18 = value;
}
let object4 = {'hideActionSheet': 0, 'isDismissable': 0, 'confirmText': 0};
silentSetPrototypeOf(object4, null, undefined);
const value2 = copyDataProperties({}, a0, object4, undefined);
var env0_3;
var env0_4;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
if (mobileVisualRefreshExperimentModule.isMobileVisualRefreshEnabled('AlertActionCreators')) {
object3 = {};
copyDataProperties(object3, value2, object4);
object3['confirmText'] = r18;
object3['isDismissable'] = isDismissable;
body = object3.body;
confirmText = object3.confirmText;
r10 = value != body && typeof body !== 'string';
r10 = r10 && !global.Array.isArray(body);
title = object3.title;
r8 = value == title || object3.title === '';
r8 = !r8 ? value != confirmText && typeof confirmText !== 'string' : r8;
r8 = !r8 ? r10 : r8;
r8 = !r8 ? value != object3.footer : r8;
r8 = !r8 ? value != object3.helpText : r8;
r8 = !r8 ? value != object3.renderConfirmButton : r8;
r8 = !r8 ? value != object3.renderConfirmIcon : r8;
r8 = !r8 ? value != object3.renderConfirmRightIcon : r8;
r8 = !r8 ? object3.noDefaultButtons === true : r8;
r8 = !r8 ? value != object3.secondaryConfirmText : r8;
r8 = !r8 ? value != object3.onConfirmSecondary : r8;
r8 = !r8 ? object3.isConfirmButtonDisabled === true : r8;
r8 = !r8 ? value != object3.confirming : r8;
r8 = !r8 ? value != object3.style : r8;
r8 = !r8 ? object3.fillCancelText === true : r8;
r8 = !r8 ? object3.autoCloseOnConfirm === false : r8;
r8 = !r8 ? value != object3.onClose : r8;
if (r8) {
if (value != env0_6) {
(require(4497) /* metro dependency 4497: useAlertStoreNative */).dismissAlert(env0_6);
}
this.openLazy({importer: importer_38364, hideActionSheet: hideActionSheet, isDismissable: isDismissable});
} else {
if (hideActionSheet) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
if (value != env0_6) {
(require(4497) /* metro dependency 4497: useAlertStoreNative */).dismissAlert(env0_6);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ALERT_CLOSE'});
binding = env0_7;
value25 = typeof binding === 'bigint' ? binding : +binding;
env0_7 = typeof value25 === 'bigint' ? value25 + 1n : +value25 + 1;
value26 = 'legacy-alert-' + value25;
title = value2.title;
body = value2.body;
children = value2.children;
confirmColor = value2.confirmColor;
cancelText = value2.cancelText;
env0_3 = value2.onConfirm;
env0_4 = value2.onCancel;
moduleValue3 = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue3.openAlert;
AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
object4 = {title: title, content: body, extraContent: children};
jsxRuntimeEnv0_4Binding = jsxRuntimeEnv0_4;
items2 = [((AlertActionButton) => <AlertActionButton variant={(require(4596) /* metro dependency 4596: Alert */).getAlertButtonVariant(confirmColor)} text={r18} onPress={function() {
env0_5 = true;
if (onConfirm != null) {
onConfirm();
}
}} />)((require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton)];
items2[1] = value != cancelText ? ((AlertActionButton) => <AlertActionButton variant="secondary" text={cancelText} onPress={onPress_38362} />)((require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton) : value;
object4.actions = <>{items2}</>;
value = <AlertModal {...object4} />;
Reflect.apply(openAlert, moduleValue3, [value26, value, _fun38363, {dismissable: isDismissable === true}]);
}
} else {
if (value != env0_6) {
(require(4497) /* metro dependency 4497: useAlertStoreNative */).dismissAlert(env0_6);
}
this.openLazy({importer: importer_38364, hideActionSheet: hideActionSheet, isDismissable: isDismissable});
}
}
function confirm(a0) { // fn#38367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1966, offset: 0x010be265, size: 51 bytes, params: 2, frame: 11
const env0_1 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun38368);
return promise instanceof Object ? promise : value;
}
function _fun38358(a0) { // fn#38358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:237, offset: 0x010bdc46, size: 111 bytes, params: 2, frame: 14
var value2;
if (hideActionSheet) {
value2 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ALERT_OPEN', alert: a0,
isDismissable: isDismissable});
}
function show_38360OnPress_38362() { // fn#38362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1670, owner: show_38360.onPress, offset: 0x010be178, size: 33 bytes, params: 1, frame: 10
if (onCancel != null) {
onCancel();
}
}
function _fun38363() { // fn#38363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1713, offset: 0x010be199, size: 58 bytes, params: 1, frame: 11
if (!(env0_5 || onCancel == null)) {
onCancel();
}
if (env1_6 !== env0_2) {
}
}
function show_38360Importer() { // fn#38364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1845, owner: show_38360.importer, offset: 0x010be1d3, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun38366;
});
}
function _fun38368(a0) { // fn#38368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1997, offset: 0x010be298, size: 127 bytes, params: 2, frame: 20
const binding = a0;
const show = binding.show;
const object2 = {onConfirm: onConfirm};
const intl = require(dependencyMap[5]).intl;
object2.cancelText = intl.string(require(dependencyMap[5]).t['ETE/oC']);
object2.onCancel = onCancel;
copyDataProperties(object2, env0_1, dependencyMap);
Reflect.apply(show, binding, [object2]);
}
function _fun38365({default: env0_0}) { // fn#38365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1878, offset: 0x010be211, size: 21 bytes, params: 2, frame: 2
return _fun38366;
}
function _fun38366(a0) { // fn#38366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4674:1893, offset: 0x010be226, size: 63 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} {...env2_1} {...{['confirmText']: env2_0}} />)(env0_0);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,32 @@
/* Metro module 6522; source: actions/native/BoostingActionCreators.tsx; dependencies: [5080, 6523, 1962, 2] */
function _fun51267(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6700:6, offset: 0x0122d5cf, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/BoostingActionCreators.tsx');
exports.openApplyBoostModal = openApplyBoostModal;
exports.openTransferModal = openTransferModal;
exports.closeApplyBoostModal = closeApplyBoostModal;
}
function openApplyBoostModal(a0) { // fn#51268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6700:231, offset: 0x0122d64a, size: 88 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {guildId: a0}, 'PREMIUM_GUILD_SUBSCRIBE_MODAL_KEY']);
}
function openTransferModal({guildBoostSlots, guildId, intent, onResult}) { // fn#51269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6700:338, offset: 0x0122d6a2, size: 126 bytes, params: 2, frame: 20
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {guildId: guildId, guildBoostSlots: guildBoostSlots, intent: intent,
onResult: onResult}, 'PREMIUM_GUILD_SUBSCRIBE_MODAL_KEY']);
}
function closeApplyBoostModal() { // fn#51270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6700:532, offset: 0x0122d720, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('PREMIUM_GUILD_SUBSCRIBE_MODAL_KEY');
}
@@ -0,0 +1,40 @@
/* Metro module 16227; source: actions/native/BundleUpdaterActionCreators.tsx; dependencies: [27, 4647, 1244, 2] */
function _fun125476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16435:6, offset: 0x025d9f5d, size: 149 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(27) /* metro dependency 27 */).NativeModules;
object2 = {prepareUpdate: prepareUpdate, deferUpdate: deferUpdate};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/BundleUpdaterActionCreators.tsx');
exports.default = object2;
}
function prepareUpdate(a0) { // fn#125477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16435:128, offset: 0x025d9ff2, size: 280 bytes, params: 2, frame: 19
var defaultImport;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (a0) {
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.GQZdmI);
object2.body = intl.string(t.Fizu9y);
object2.confirmText = intl.string(t.UefCDS);
object2.cancelText = intl.string(t['1SzcG6']);
object2.onConfirm = function() {
var BundleUpdaterManager = NativeModules.BundleUpdaterManager;
return BundleUpdaterManager.reload();
};
Reflect.apply(show, defaultImport, [object2]);
}
}
function deferUpdate() { // fn#125479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16435:407, offset: 0x025da123, size: 40 bytes, params: 1, frame: 9
if (env0_4) {
NativeModules.BundleUpdaterManager.reload();
}
}
@@ -0,0 +1,39 @@
/* Metro module 9087; source: actions/native/CreateChannelModalActionCreators.tsx; dependencies: [1383, 1379, 4601, 5080, 9083, 1962, 2] */
function _fun71014(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9272:6, offset: 0x01d1235e, size: 168 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1383) /* metro dependency 1383: ChannelRecord */).CREATEABLE_NON_VOCAL_CHANNEL_NAME_TYPES;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
object2 = {CREATE_CHANNEL_MODAL_KEY: 'CREATE_CHANNEL_MODAL_KEY', open: open_71015, close: close_71017};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/CreateChannelModalActionCreators.tsx');
exports.default = object2;
}
function open_71015(a0, a1, a2, a3) { // fn#71015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9272:215, offset: 0x01d12406, size: 179 bytes, params: 5, frame: 23
var value5;
var defaultImport;
if (a1 != null) {
value5 = undefined;
defaultImport = importDefault(dependencyMap[3]);
defaultImport.pushLazy(require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths),
{channelType: a0 ?? value5,
guildId: a1, categoryId: a2 ?? value5, cloneChannelId: a3 ?? value5, onChannelCreated: onChannelCreated},
'CREATE_CHANNEL_MODAL_KEY');
}
}
function close_71017() { // fn#71017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9272:511, offset: 0x01d1252c, size: 42 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('CREATE_CHANNEL_MODAL_KEY');
}
function onChannelCreated(a0, a1) { // fn#71016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9272:397, owner: open_71015.onChannelCreated, offset: 0x01d124b9, size: 115 bytes, params: 3, frame: 14
env0_0.close();
const value = environment.__proto__;
const channel = ChannelStore.getChannel(a0);
if (a1 != null && channel != null && CREATEABLE_NON_VOCAL_CHANNEL_NAME_TYPES.has(channel.type)) {
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToChannel(a0);
}
}
@@ -0,0 +1,42 @@
/* Metro module 12041; source: actions/native/CreateGuildActionCreators.tsx; dependencies: [1935, 661, 9151, 2] */
function _fun92529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12227:6, offset: 0x0208e240, size: 136 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).InstantInviteSources;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/CreateGuildActionCreators.tsx');
exports.showInstantInviteModal = function(a0) {
var env0_0 = a0;
GuildChannelStore.addConditionalChangeListener(_fun92531);
};
}
function showInstantInviteModal(a0) { // fn#92530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12227:240, offset: 0x0208e2c8, size: 38 bytes, params: 2, frame: 11
const env0_0 = a0;
GuildChannelStore.addConditionalChangeListener(_fun92531);
}
function _fun92531() { // fn#92531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12227:307, offset: 0x0208e2ee, size: 66 bytes, params: 1, frame: 12
var environment;
var r0;
let value = environment.__proto__;
value = GuildChannelStore.getDefaultChannel(env0_0);
value = value == null;
if (value) {
r0 = value;
} else {
global.setImmediate(_fun92532);
r0 = false;
}
return r0;
}
function _fun92532() { // fn#92532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12227:372, offset: 0x0208e330, size: 62 bytes, params: 1, frame: 15
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const showInstantInviteActionSheet = instantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const GUILD_CREATE = InstantInviteSources.GUILD_CREATE;
Reflect.apply(showInstantInviteActionSheet, instantInviteUtilsModule, [binding, {source: GUILD_CREATE}]);
}
@@ -0,0 +1,23 @@
/* Metro module 10010; source: actions/native/DisplayedInviteActionCreators.tsx; dependencies: [9156, 694, 8879, 2] */
function _fun78187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10196:6, offset: 0x01e1f761, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/DisplayedInviteActionCreators.tsx');
exports.showInvite = showInvite;
exports.clearDisplayedInvite = clearDisplayedInvite;
}
function showInvite(a0, a1, a2) { // fn#78188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10196:187, offset: 0x01e1f7d5, size: 139 bytes, params: 4, frame: 20
const {deeplinkAttemptId, fromDeeplink, location} = a2 ?? ({});
require(9156) /* metro dependency 9156: DisplayedInviteStore */;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'DISPLAYED_INVITE_SHOW', code: a0, username: a1, deeplinkAttemptId: deeplinkAttemptId,
fromDeeplink: fromDeeplink});
(importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */).resolveInvite(a0, location);
}
function clearDisplayedInvite() { // fn#78189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10196:446, offset: 0x01e1f860, size: 47 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DISPLAYED_INVITE_CLEAR'});
}
@@ -0,0 +1,36 @@
/* Metro module 8953; source: actions/native/EmailVerificationModalActionCreators.tsx; dependencies: [661, 683, 5080, 8954, 1962, 694, 2] */
function _fun69812(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9138:6, offset: 0x01ce42fb, size: 143 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(661) /* metro dependency 661: Constants */).AnalyticEvents;
object2 = {open: open_69813, close: close_69814};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/EmailVerificationModalActionCreators.tsx');
exports.default = object2;
}
function open_69813() { // fn#69813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9138:157, offset: 0x01ce438a, size: 142 bytes, params: 1, frame: 17
var defaultImport;
let value = a0;
const r1 = value !== undefined ? value : false;
if (r1) {
defaultImport = importDefault(dependencyMap[1]);
defaultImport.track(AnalyticEvents.USER_ACCOUNT_EMAIL_CHANGE_ATTEMPTED);
}
const defaultImport2 = importDefault(dependencyMap[2]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {isChangeEmail: r1}, 'EMAIL_VERIFICATION_MODAL_KEY']);
}
function close_69814() { // fn#69814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9138:285, offset: 0x01ce4418, size: 47 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun69815);
}
function _fun69815() { // fn#69815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9138:307, offset: 0x01ce4447, size: 44 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('EMAIL_VERIFICATION_MODAL_KEY');
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,57 @@
/* Metro module 15953; source: actions/native/GuildActionCreators.tsx; dependencies: [661, 694, 507, 2] */
function _fun123307(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16161:6, offset: 0x02587d3b, size: 155 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = batchChannelUpdate_123308;
const closure2 = batchRoleUpdate_123310;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {batchChannelUpdate: closure, batchRoleUpdate: closure2};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/GuildActionCreators.tsx');
exports.default = object2;
exports.batchChannelUpdate = closure;
exports.batchRoleUpdate = closure2;
}
function batchChannelUpdate_123308(a0, a1) { // fn#123308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16161:116, offset: 0x02587dd6, size: 157 bytes, params: 3, frame: 18
var object2;
var HTTP;
var patch;
const closure = batchChannelUpdate_123308OnEnd;
if (!(a1.length <= 0)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_SUBMIT'});
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
patch = HTTP.patch;
object2 = {};
object2.url = Endpoints.GUILD_CHANNELS(a0);
object2.body = a1;
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(patch, HTTP, [object2]).then(closure, closure);
}
}
function batchRoleUpdate_123310(a0, a1) { // fn#123310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16161:401, offset: 0x02587ea2, size: 157 bytes, params: 3, frame: 18
var object2;
var HTTP;
var patch;
const closure = batchRoleUpdate_123310OnEnd;
if (!(a1.length <= 0)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_SUBMIT'});
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
patch = HTTP.patch;
object2 = {};
object2.url = Endpoints.GUILD_ROLES(a0);
object2.body = a1;
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(patch, HTTP, [object2]).then(closure, closure);
}
}
function batchChannelUpdate_123308OnEnd() { // fn#123309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16161:149, owner: batchChannelUpdate_123308.onEnd, offset: 0x02587e73, size: 47 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_SUBMIT_SUCCESS'});
}
@@ -0,0 +1,24 @@
/* Metro module 10920; source: actions/native/InAppNotificationActionCreators.tsx; dependencies: [694, 2] */
function _fun83683(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11106:6, offset: 0x01f24aa6, size: 118 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {enqueueNotification: enqueueNotification, clearNotification: clearNotification};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/InAppNotificationActionCreators.tsx');
exports.default = object2;
}
function enqueueNotification(a0) { // fn#83684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11106:99, offset: 0x01f24b1c, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENQUEUE_IN_APP_NOTIFICATION',
notification: a0});
}
function clearNotification() { // fn#83685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11106:193, offset: 0x01f24b54, size: 46 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun83686);
}
function _fun83686() { // fn#83686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11106:227, offset: 0x01f24b82, size: 48 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_IN_APP_NOTIFICATION'});
}
@@ -0,0 +1,35 @@
/* Metro module 15038; source: actions/native/MessagePreviewActionCreators.tsx; dependencies: [661, 507, 694, 2] */
function _fun113816(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15235:6, offset: 0x02406f91, size: 153 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.Endpoints;
const env0_4 = constantsModule.MAX_MESSAGES_PER_CHANNEL;
object2 = {fetchMessages: fetchMessages_113817, clearMessages: clearMessages};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/MessagePreviewActionCreators.tsx');
exports.default = object2;
}
function fetchMessages_113817(a0, a1) { // fn#113817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15235:152, offset: 0x0240702a, size: 131 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.MESSAGES(a0);
object2.query = {limit: MAX_MESSAGES_PER_CHANNEL, around: a1};
Reflect.apply(get, HTTP, [object2]).then(_fun113818);
}
function clearMessages() { // fn#113819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15235:387, offset: 0x024070fd, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_MESSAGES_AROUND_SUCCESS'});
}
function _fun113818({body}) { // fn#113818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15235:286, offset: 0x024070ad, size: 80 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_MESSAGES_AROUND_SUCCESS',
channelId: env0_0, messages: body, around: require});
}
@@ -0,0 +1,18 @@
/* Metro module 9022; source: actions/native/PhoneVerificationActionCreators.tsx; dependencies: [694, 2] */
function _fun70191(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9207:6, offset: 0x01cf216a, size: 120 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {openCountrySelector: openCountrySelector, setCountrySelectorClosed: setCountrySelectorClosed};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/PhoneVerificationActionCreators.tsx');
exports.default = object2;
}
function openCountrySelector() { // fn#70192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9207:99, offset: 0x01cf21e2, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VERIFICATION_OPEN_COUNTRY_SELECTOR'});
}
function setCountrySelectorClosed() { // fn#70193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9207:184, offset: 0x01cf2212, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VERIFICATION_CLOSE_COUNTRY_SELECTOR'});
}
@@ -0,0 +1,359 @@
/* Metro module 11875; source: actions/native/PushNotificationActionCreators.tsx; dependencies: [5, 11876, 1226, 661, 5079, 3, 692, 507, 1216, 11880, 587, 5046, 477, 480, 1360, 694, 2] */
function _fun91078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:6, offset: 0x020523dc, size: 400 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const getOrRefreshPushSyncToken = function() {
return _getOrRefreshPushSyncToken.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const multiAccountStore = importDefault(11876) /* metro dependency 11876: MultiAccountStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.DEVICE_TOKEN;
const env0_8 = value.DEVICE_VOIP_TOKEN;
const env0_9 = value.Endpoints;
value = require(5079) /* metro dependency 5079: PushNotificationConstants */;
const env0_10 = value.BUNDLE_ID;
const env0_11 = value.DEVICE_PUSH_VOIP_PROVIDER;
const env0_12 = value.getDevicePushProvider;
const env0_13 = value.IS_QUEST_RELEASE;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('PushNotificationActionCreators');
object2 = {registerDevice: registerDevice, syncDevice: syncDevice, unregisterDevice: unregisterDevice};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/PushNotificationActionCreators.tsx');
exports.default = object2;
exports.setPushPermissionState = setPushPermissionState;
exports.setPushPermissionReactivationSeen = setPushPermissionReactivationSeen;
exports.setPushNotificationPermissionEligibleForPrompt = setPushNotificationPermissionEligibleForPrompt;
exports.updateNotificationAuthorizationStatus = updateNotificationAuthorizationStatus;
}
function _getOrRefreshPushSyncToken() { // fn#91080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:433, offset: 0x0205256c, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun91082).apply(this, arguments);
}
function registerDevice(a0) { // fn#91083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:868, offset: 0x020526ba, size: 355 bytes, params: 2, frame: 24
var r8;
var r0;
var defaultImport;
var post;
var object4;
var object5;
var object6;
const value = a1;
const r1 = value !== undefined ? value : false;
const canUseMultiAccountNotifications = MultiAccountStore.canUseMultiAccountNotifications;
env0_14.log('Registering push notification token: ' + a0 + ', is voip:' + r1 + ', multi-account:' + canUseMultiAccountNotifications);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(r1 ? DEVICE_VOIP_TOKEN : DEVICE_TOKEN, a0);
if (canUseMultiAccountNotifications) {
r0 = this.syncDevice(a0, r1);
} else {
defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
post = defaultImport.post;
object4 = {};
object4.url = Endpoints.DEVICES;
object5 = {};
r8 = r1 ? DEVICE_PUSH_VOIP_PROVIDER : getDevicePushProvider();
object5.provider = r8;
object5.token = a0;
r8 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && !IS_QUEST_RELEASE;
object5.bypass_server_throttling_supported = r8;
object5.bundle_id = BUNDLE_ID;
object4.body = object5;
object4.oldFormErrors = true;
object6 = {};
object6.event = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames.USER_REGISTER_DEVICE_TOKEN;
object4.trackedActionData = object6;
object4.rejectWithError = false;
r0 = Reflect.apply(post, defaultImport, [object4]);
}
return r0;
}
function syncDevice(a0) { // fn#91084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:1340, offset: 0x0205281d, size: 49 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
return env0_4(_fun91086)();
}
function unregisterDevice(a0) { // fn#91088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:1891, offset: 0x02052a34, size: 165 bytes, params: 2, frame: 17
env0_14.log('Unregistering push notification token: ' + a0);
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const object3 = {};
const DEVICES = Endpoints.DEVICES;
object3.url = DEVICES;
const object4 = {};
object4.provider = getDevicePushProvider();
object4.token = a0;
object3.body = object4;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_UNREGISTER_DEVICE_TOKEN = NetworkActionNames.USER_UNREGISTER_DEVICE_TOKEN;
object3.trackedActionData = {event: USER_UNREGISTER_DEVICE_TOKEN};
object3.rejectWithError = false;
return defaultImport.delete(object3);
}
function setPushPermissionState(a0) { // fn#91089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:2234, offset: 0x02052ad9, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun91090);
}
function setPushPermissionReactivationSeen(a0) { // fn#91091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:2414, offset: 0x02052b4c, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PUSH_NOTIFICATION_PERMISSION_REACTIVATION_SEEN',
promptType: a0});
}
function setPushNotificationPermissionEligibleForPrompt(a0) { // fn#91092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:2598, offset: 0x02052b85, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PUSH_NOTIFICATION_PERMISSION_SET_ELIGIBLE',
promptType: a0});
}
function updateNotificationAuthorizationStatus(a0) { // fn#91093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:2781, offset: 0x02052bbe, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PUSH_NOTIFICATION_AUTHORIZATION_STATUS_UPDATE',
authorizationStatus: a0});
}
function* _fun91082(a0) { // fn#91082, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:508, offset: 0x020525a9, size: 273 bytes, params: 2, frame: 20
var binding2;
var property;
var value5;
var HTTP;
var get;
var object3;
var DEVICES_SYNC_TOKEN;
var object4;
var value6;
var value7;
var value8;
var body;
var token;
var error;
if (false) {
return undefined;
}
if (a0.pushSyncToken != null) {
return a0.pushSyncToken;
}
value = environment.__proto__.__proto__;
let binding = env2_2;
const token2 = binding(env2_3[6]).getToken(a0.id);
if (token2 == null) {
return null;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
binding2 = env2_3;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
value5 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
HTTP = value5.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
binding = env2_9;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
DEVICES_SYNC_TOKEN = binding.DEVICES_SYNC_TOKEN;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
object3.url = DEVICES_SYNC_TOKEN;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
object4.authorization = token2;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
object3.headers = object4;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
object3.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
value6 = Reflect.apply(get, HTTP, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
try {
token = body.token;
} catch (error) {
binding = env2_1;
value = binding(env2_3[8]);
value.captureException(error);
return null;
}
value = env2_2(env2_3[9]);
value.updatePushSyncToken(a0.id, token);
return token;
}
function* _fun91086() { // fn#91086, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:1353, offset: 0x02052859, size: 424 bytes, params: 1, frame: 21
var environment;
if (true) {
var env0_0;
value = environment.__proto__.__proto__;
var binding = env2_6;
env0_0 = binding.getId();
var Promise = global.Promise;
var all = Promise.all;
var value4 = env2_5.getValidUsers().sort(_fun91087);
yield Reflect.apply(all, Promise, [value4.map(env2_15)]);
var value5 = undefined;
if (false) {
return value5;
}
if (!(value5.length < 1)) {
if (value5[0] == null) {
return undefined;
}
binding = env2_0;
var HTTP = binding(env2_3[7]).HTTP;
var put = HTTP.put;
var object3 = {};
var DEVICES_SYNC = env2_9.DEVICES_SYNC;
object3.url = DEVICES_SYNC;
var object4 = {};
object4.provider = importDefault ? env2_11 : env2_12();
object4.token = require;
var filter = value5.filter;
binding = env2_0;
var binding2 = env2_3;
object4.push_sync_tokens = Reflect.apply(filter, value5, [binding(binding2[14]).isNotNullish]);
object4.bypass_server_throttling_supported = binding(binding2[12]).isAndroid() && !env2_13;
object4.bundle_id = env2_10;
object3.body = object4;
object3.rejectWithError = false;
yield Reflect.apply(put, HTTP, [object3]);
var value11 = undefined;
if (false) {
return value11;
}
if (value11.body.invalid_push_sync_tokens.length > 0) {
value = env2_2(env2_3[9]);
value.invalidatePushSyncTokens(value11.body.invalid_push_sync_tokens);
}
}
}
}
function _fun91090() { // fn#91090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:2284, offset: 0x02052b0f, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PUSH_NOTIFICATION_PERMISSION_SET_STATE',
permissionState: env0_0});
}
function _fun91087({id}, a1) { // fn#91087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12061:1425, offset: 0x02052a01, size: 51 bytes, params: 3, frame: 4
return id === env0_0 ? -1 : a1.id !== env0_0 ? 0 : 1;
}
@@ -0,0 +1,36 @@
/* Metro module 11420; source: actions/native/UploadActionCreators.tsx; dependencies: [4645, 7223, 694, 2] */
function _fun87439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11606:6, offset: 0x01fbe801, size: 180 bytes, params: 8, frame: 19
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const draftStore = importDefault(4645) /* metro dependency 4645: DraftStore */;
const env0_3 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadStore = importDefault(7223) /* metro dependency 7223: UploadStore */;
object2 = {restoreFailedUpload: restoreFailedUpload, cancel: cancel_87441, cancelUploadItem: cancelUploadItem};
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/native/UploadActionCreators.tsx');
exports.default = object2;
}
function restoreFailedUpload(a0, a1) { // fn#87440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11606:139, offset: 0x01fbe8b5, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_RESTORE_FAILED_UPLOAD',
messageId: a0, file: a1});
}
function cancel_87441(a0, a1) { // fn#87441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11606:240, offset: 0x01fbe8f5, size: 200 bytes, params: 3, frame: 17
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_CANCEL_REQUEST', channelId: a0,
file: a1});
const messageForFile = UploadStore.getMessageForFile(a1.id);
if (messageForFile != null) {
if (DraftStore.getDraft(messageForFile.channel_id, DraftType.ChannelMessage) === '') {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DRAFT_SAVE',
channelId: messageForFile.channel_id, draft: messageForFile.content,
draftType: DraftType.ChannelMessage});
}
}
}
function cancelUploadItem(a0, a1) { // fn#87442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11606:516, offset: 0x01fbe9bd, size: 65 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPLOAD_ITEM_CANCEL_REQUEST', file: a0,
itemId: a1});
}
+15
View File
@@ -0,0 +1,15 @@
/* Metro module 2; source: unknown; dependencies: [] */
function _fun103(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7:6, offset: 0x00c38984, size: 104 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const set = new Set();
exports.clear = clear_104;
exports.size = size;
exports.fileFinishedImporting = fileFinishedImporting;
}
function size() { // fn#105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7:149, offset: 0x00c38a01, size: 14 bytes, params: 1, frame: 1
return env0_0.size;
}
+56
View File
@@ -0,0 +1,56 @@
/* Metro module 5; source: unknown; dependencies: [] */
function _fun132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10:6, offset: 0x00c39550, size: 58 bytes, params: 8, frame: 3
const asyncGeneratorStep = function(a0, a1, a2, a3, a4, a5, a6) {
var property;
var value;
var error;
try {
value = a0[a5](a6);
property = value.value;
} catch (error) {
a2(error);
return undefined;
}
if (value.done) {
a1(property);
} else {
global.Promise.resolve(property).then(a3, a4);
}
};
module.exports = function(a0) {
var env0_0 = a0;
return _fun135;
};
module.exports.__esModule = true;
module.exports.default = module.exports;
}
function exports(a0) { // fn#134, offset: 0x00c395f2, size: 16 bytes, params: 2, frame: 2
let env0_0 = a0;
return function() {
var env0_0 = this;
var env0_1 = arguments;
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun136);
return value2 instanceof Object ? value2 : value;
};
}
function _fun135() { // fn#135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10:219, offset: 0x00c39602, size: 51 bytes, params: 1, frame: 11
const env0_1 = arguments;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun136);
return promise instanceof Object ? promise : value;
}
function _fun136(a0, a1) { // fn#136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10:273, offset: 0x00c39635, size: 76 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const closure = _next;
const binding = env1_0;
const env0_2 = binding.apply(env0_0, env0_1);
closure(undefined);
}
+13
View File
@@ -0,0 +1,13 @@
/* Metro module 6; source: unknown; dependencies: [] */
function _fun139(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11:6, offset: 0x00c396df, size: 49 bytes, params: 8, frame: 3
module.exports = function(a0, a1) {
if (a0 instanceof a1) {
return undefined;
}
var TypeError = global.TypeError;
throw new TypeError('Cannot call a class as a function');
};
module.exports.__esModule = true;
module.exports.default = module.exports;
}
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff. Show more