Initial commit

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

No files matched your search

@@ -0,0 +1,21 @@
/* Metro module 13299; source: modules/user_settings/account/native/AccountEditPassword.tsx; dependencies: [31, 27, 33, 4501, 697, 13300, 2] */
function _fun101367(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13489:6, offset: 0x02211d0c, size: 245 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_2 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
value = value.memo(_fun101368);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/AccountEditPassword.tsx');
exports.default = value;
}
@@ -0,0 +1,60 @@
/* Metro module 9023; source: modules/user_settings/account/native/SMSBackupWarningAlert.tsx; dependencies: [31, 33, 4501, 4596, 1244, 4496, 4573, 2] */
function _fun70194(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:6, offset: 0x01cf2242, size: 203 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {textAlign: 'center'},
body: {'marginTop': 8, 'textAlign': 'center', 'lineHeight': 18}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SMSBackupWarningAlert.tsx');
exports.default = SMSBackupWarningAlert;
}
function SMSBackupWarningAlert({onConfirm}) { // fn#70195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:342, offset: 0x01cf230d, size: 404 bytes, params: 2, frame: 24
const styles = useStyles();
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.cancelText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']]);
string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object2.confirmText = Reflect.apply(string, intl, [N86XcP]);
object2.onConfirm = onConfirm;
object2.onCancel = onCancel;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const Ed4XQB = (require(1244) /* metro dependency 1244: indexNative */).t.Ed4XQB;
const text = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [Ed4XQB])}</Text>;
string = intl.string;
const EDU2Eg = (require(1244) /* metro dependency 1244: indexNative */).t.EDU2Eg;
return (
<Alert {...object2}>
{text}
<Text
style={styles.body}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [EDU2Eg])}
</Text>
</Alert>
);
}
function SMSBackupWarningAlertOnConfirm() { // fn#70196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:528, owner: SMSBackupWarningAlert.onConfirm, offset: 0x01cf24a1, size: 48 bytes, params: 1, frame: 12
onConfirm();
const value = environment.__proto__;
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
}
function SMSBackupWarningAlertOnCancel() { // fn#70197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:569, owner: SMSBackupWarningAlert.onCancel, offset: 0x01cf24d1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
}
@@ -0,0 +1,8 @@
/* Metro module 11471; source: modules/user_settings/account/native/SettingsAccountConstants.tsx; dependencies: [2] */
function _fun87822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11657:6, offset: 0x01fcc6de, size: 100 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountConstants.tsx');
exports.AccountSettingsTabs = {SECURITY: 'SECURITY', STANDING: 'STANDING'};
}
@@ -0,0 +1,121 @@
/* Metro module 13269; source: modules/user_settings/account/native/SettingsAccountHeader.tsx; dependencies: [31, 27, 3793, 1878, 661, 6263, 33, 4501, 697, 13270, 1244, 7007, 566, 9011, 8953, 6238, 4578, 2] */
function _fun101181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:6, offset: 0x0220a89d, size: 355 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
const env0_8 = (require(6263) /* metro dependency 6263: Constants */).SafetySettingsNoticeType;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.paddingTop = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.gap = PX_24;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [{header: object}]);
value = value.memo(_fun101184);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountHeader.tsx');
exports.default = value;
}
function RestrictedAccountRedirect() { // fn#101182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:321, offset: 0x0220aa00, size: 101 bytes, params: 1, frame: 17
const SafetySettingsNotice = importDefault(13270) /* metro dependency 13270: SafetySettingsNotice */;
const zqv4nV = (require(1244) /* metro dependency 1244: indexNative */).t.zqv4nV;
const RESTRICTED_ACCOUNTS_SETTING_NOTICE = SafetySettingsNoticeType.RESTRICTED_ACCOUNTS_SETTING_NOTICE;
return (
<SafetySettingsNotice
label={zqv4nV}
labelHook={function() {
require(dependencyMap[11]).openUserSettings({screen: AnalyticsSections.SETTINGS_CONTENT_AND_SOCIAL});
}}
noticeType={RESTRICTED_ACCOUNTS_SETTING_NOTICE}
/>
);
}
function _fun101184() { // fn#101184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:546, offset: 0x0220aa9c, size: 379 bytes, params: 1, frame: 25
var r6;
var r0;
var items2;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object;
var title;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object4;
var button;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const bannerText = (require(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */).getBannerText(currentUser);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.getBlockedOrIgnoredIDs().length > 0;
});
const value4 = env0_3.useCallback(_fun101187, []);
const value5 = null;
if (value5 != bannerText) {
var viewBindingProps = {style: styles.header};
items2 = [value3 ? <RestrictedAccountRedirect /> : value5];
if (value5 != bannerText) {
object = {onPress: value4, variant: 'danger'};
title = bannerText.title;
object.label = title;
title = bannerText.title;
object.accessibilityLabel = title;
object4 = {};
button = bannerText.button;
object4.text = button;
button = bannerText.button;
object4.accessibilityLabel = button;
object4.onPress = value4;
object.trailing = <Button {...object4} />;
object.start = true;
object.end = true;
r6 = <TableRow {...object} />;
} else {
r6 = value5;
}
items2[1] = r6;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else if (value3) {
var viewBindingProps = {style: styles.header};
items2 = [value3 ? <RestrictedAccountRedirect /> : value5];
if (value5 != bannerText) {
object = {onPress: value4, variant: 'danger'};
title = bannerText.title;
object.label = title;
title = bannerText.title;
object.accessibilityLabel = title;
object4 = {};
button = bannerText.button;
object4.text = button;
button = bannerText.button;
object4.accessibilityLabel = button;
object4.onPress = value4;
object.trailing = <Button {...object4} />;
object.start = true;
object.end = true;
r6 = <TableRow {...object} />;
} else {
r6 = value5;
}
items2[1] = r6;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
r0 = value5;
}
return r0;
}
function _fun101187() { // fn#101187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:749, offset: 0x0220ac35, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(8953) /* metro dependency 8953: EmailVerificationModalActionCreators */).open();
}
@@ -0,0 +1,226 @@
/* Metro module 13242; source: modules/user_settings/account/native/SettingsAccountScreen.tsx; dependencies: [57, 31, 27, 13243, 8224, 11471, 661, 13244, 33, 4501, 697, 1484, 6239, 5475, 13245, 4573, 1244, 4578, 5080, 13246, 1962, 566, 13268, 8980, 5084, 6231, 9692, 13269, 13170, 13272, 7032, 8853, 683, 9221, 8861, 2] */
function _fun100990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:6, offset: 0x02204049, size: 572 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const webAuthnStore = importDefault(13243) /* metro dependency 13243: WebAuthnStore */;
const env0_7 = (require(8224) /* metro dependency 8224: SettingsConstants */).MobileSetting;
const env0_8 = (require(11471) /* metro dependency 11471: SettingsAccountConstants */).AccountSettingsTabs;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const value2 = require(33) /* metro dependency 33 */;
const env0_11 = value2.jsx;
const env0_12 = value2.jsxs;
const env0_13 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'marginBottom': 16, 'borderColor': null, 'borderWidth': 1};
const REDESIGN_INPUT_CONTROL_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_INPUT_CONTROL_SELECTED;
object5.borderColor = REDESIGN_INPUT_CONTROL_SELECTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.upsellPasswordless = object5;
object4.upsellImagePasswordless = {'height': '100%', 'width': '100%'};
const object6 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingTop = PX_16;
object4.controlContainer = object6;
object4.pageContainer = {flex: 1};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.standingPage = {paddingTop: PX_24};
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object4]);
value = value.memo(_fun101000);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountScreen.tsx');
exports.default = value;
}
function PasswordlessUpsell() { // fn#100991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:667, offset: 0x02204285, size: 707 bytes, params: 1, frame: 40
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const view = <View style={{'width': 70,
'height': 70}}>{((Component) => <Component source={require(13245) /* metro dependency 13245 */} resizeMode="contain" style={styles.upsellImagePasswordless} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<Heading variant="heading-lg/medium" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['+Svv46']])}</Heading>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const S0g2K9 = (require(1244) /* metro dependency 1244: indexNative */).t.S0g2K9;
items2[1] = <Text variant="text-md/normal" color="text-muted">{Reflect.apply(string, intl, [S0g2K9])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={{flexDirection: 'row'}}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.piGf5c)} onPress={onPress_100992} size="sm" /><View /></View>;
return (
<View style={styles.upsellPasswordless}>
<Card border="none" shadow="none">
<View style={{'flexDirection': 'row', 'gap': 8}}>
{view}
<View style={{flex: 1}}>
<View style={{'flexShrink': 1, 'width': '90%', 'gap': 8}}>
{items2}
</View>
</View>
</View>
</Card>
</View>
);
}
function AccountTwoFALabel() { // fn#100993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1603, offset: 0x022045b5, size: 333 bytes, params: 1, frame: 22
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const value3 = env0_3(Reflect.apply(useStateFromStoresObject, fluxModule, [[WebAuthnStore], function() {
var items = [WebAuthnStore.hasCredentials];
items[1] = WebAuthnStore.hasFetchedCredentials();
return items;
}]), 2);
const property = value3[0];
const property2 = value3[1];
const value5 = env0_4.useMemo(_fun100995, [property2, property,
(require(13268) /* metro dependency 13268: SettingsAccountUtils */).useIsUserVerified()]);
env0_4.useEffect(_fun100996, [property2]);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const r6 = value5 && <PasswordlessUpsell />;
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<>
{r6}
<TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fuTmEJ)} />
</>
);
}
function AccountSecurityPage() { // fn#100997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2036, offset: 0x0220479e, size: 72 bytes, params: 1, frame: 14
return ((Component) => <Component node={env0_4.useMemo(_fun100998,
[])} />)(importDefault(13170) /* metro dependency 13170: SettingLayout */);
}
function AccountStandingPage() { // fn#100999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2706, offset: 0x022049b8, size: 51 bytes, params: 1, frame: 14
return ((Component) => <Component visible />)((require(13272) /* metro dependency 13272: SafetyHubPage */).default);
}
function _fun101000() { // fn#101000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2799, offset: 0x022049eb, size: 601 bytes, params: 1, frame: 30
const value2 = undefined;
const styles = useStyles();
const binding = env0_4;
const value3 = 0;
const value5 = env0_3(binding.useState(value3), 2);
const property = value5[value3];
const value6 = 1;
const env0_0 = value5[value6];
const value7 = env0_4.useCallback(_fun101001, []);
const useSettingNavigationRouteModule = require(7032) /* metro dependency 7032: useSettingNavigationRoute */;
const useSettingNavigationRoute = useSettingNavigationRouteModule.useSettingNavigationRoute;
const params = Reflect.apply(useSettingNavigationRoute, useSettingNavigationRouteModule, []).params;
const initialTab = params == null ? value2 : params.initialTab;
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Am9YHi = (require(1244) /* metro dependency 1244: indexNative */).t.Am9YHi;
object.label = Reflect.apply(string, intl, [Am9YHi]);
const SECURITY = AccountSettingsTabs.SECURITY;
object.id = SECURITY;
object.page = <AccountSecurityPage />;
const items2 = [object];
const object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['00Sfl/']);
let STANDING = AccountSettingsTabs.STANDING;
object4.id = STANDING;
object4.page = <View style={styles.standingPage}><AccountStandingPage /></View>;
items2[1] = object4;
STANDING = AccountSettingsTabs.STANDING;
const value8 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [{items: items2,
pageWidth: property, defaultIndex: initialTab !== STANDING ? value3 : value6, onSetActiveIndex: function(a0) {
var defaultImport = importDefault(dependencyMap[32]);
var track = defaultImport.track;
var MY_ACCOUNT_PAGE_TAB_NAVIGATE = AnalyticEvents.MY_ACCOUNT_PAGE_TAB_NAVIGATE;
Reflect.apply(track, defaultImport, [MY_ACCOUNT_PAGE_TAB_NAVIGATE,
{target_tab_name: a0 === 0 ? AccountSettingsTabs.SECURITY : AccountSettingsTabs.STANDING}]);
}}]);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
const view = <View style={styles.controlContainer} onLayout={value7}><SegmentedControl state={value8} /></View>;
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
return (
<>
{view}
<View style={styles.pageContainer}>
<SegmentedControlPages state={value8} />
</View>
</>
);
}
function PasswordlessUpsellOnPress() { // fn#100992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1459, owner: PasswordlessUpsell.onPress, offset: 0x02204548, size: 109 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[18]);
const pushLazy = defaultImport.pushLazy;
const value2 = require(dependencyMap[20])(dependencyMap[19], dependencyMap.paths);
const REGISTER = WebAuthnScreens.REGISTER;
Reflect.apply(pushLazy, defaultImport, [value2, {navigation: env0_0, initialRouteName: REGISTER, showNav: true}]);
}
function _fun100995() { // fn#100995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1795, offset: 0x0220472b, size: 66 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(8980) /* metro dependency 8980: MFAUtils */).hasWebAuthn && env0_2 && env0_1 && !env0_0;
}
function _fun100996() { // fn#100996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1860, offset: 0x0220476d, size: 49 bytes, params: 1, frame: 11
var value;
if (!env0_1) {
value = environment.__proto__;
value = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
value.fetchWebAuthnCredentials();
}
}
function _fun100998() { // fn#100998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2084, offset: 0x022047e6, size: 466 bytes, params: 1, frame: 22
const settingBuildersModule = require(9692) /* metro dependency 9692: SettingBuilders */;
const createList = settingBuildersModule.createList;
const object5 = {};
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e262Nn);
const ACCOUNT_USERNAME = MobileSetting.ACCOUNT_USERNAME;
const ACCOUNT_DISPLAY_NAME = MobileSetting.ACCOUNT_DISPLAY_NAME;
const ACCOUNT_EMAIL = MobileSetting.ACCOUNT_EMAIL;
const ACCOUNT_PHONE = MobileSetting.ACCOUNT_PHONE;
const ACCOUNT_AGE_GROUP_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_ADULT;
const ACCOUNT_AGE_GROUP_NON_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_NON_ADULT;
const ACCOUNT_AGE_GROUP_ASSIGNED_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_ASSIGNED_ADULT;
object6.settings = [ACCOUNT_USERNAME, ACCOUNT_DISPLAY_NAME, ACCOUNT_EMAIL, ACCOUNT_PHONE, ACCOUNT_AGE_GROUP_ADULT,
ACCOUNT_AGE_GROUP_NON_ADULT, ACCOUNT_AGE_GROUP_ASSIGNED_ADULT];
const items2 = [object6];
const object7 = {};
object7.label = <AccountTwoFALabel />;
const ACCOUNT_CHANGE_PASSWORD = MobileSetting.ACCOUNT_CHANGE_PASSWORD;
const ACCOUNT_WEB_AUTHN_VIEW = MobileSetting.ACCOUNT_WEB_AUTHN_VIEW;
const ACCOUNT_ENABLE_2FA = MobileSetting.ACCOUNT_ENABLE_2FA;
const ACCOUNT_VIEW_BACKUP_CODES = MobileSetting.ACCOUNT_VIEW_BACKUP_CODES;
const ACCOUNT_REMOVE_2FA = MobileSetting.ACCOUNT_REMOVE_2FA;
const ACCOUNT_SMS_BACKUP = MobileSetting.ACCOUNT_SMS_BACKUP;
object7.settings = [ACCOUNT_CHANGE_PASSWORD, ACCOUNT_WEB_AUTHN_VIEW, ACCOUNT_ENABLE_2FA, ACCOUNT_VIEW_BACKUP_CODES,
ACCOUNT_REMOVE_2FA, ACCOUNT_SMS_BACKUP];
items2[1] = object7;
const object8 = {};
object8.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5V0AkP']);
const ACCOUNT_DISABLE = MobileSetting.ACCOUNT_DISABLE;
const ACCOUNT_DELETE = MobileSetting.ACCOUNT_DELETE;
object8.settings = [ACCOUNT_DISABLE, ACCOUNT_DELETE];
items2[2] = object8;
const filter = items2.filter;
const Boolean = global.Boolean;
object5.sections = Reflect.apply(filter, items2, [Boolean]);
object5.ListHeaderComponent = importDefault(13269) /* metro dependency 13269: SettingsAccountHeader */;
return Reflect.apply(createList, settingBuildersModule, [object5]);
}
@@ -0,0 +1,46 @@
/* Metro module 13268; source: modules/user_settings/account/native/SettingsAccountUtils.tsx; dependencies: [1226, 1878, 632, 2] */
function _fun101174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:6, offset: 0x0220a6e1, size: 156 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountUtils.tsx');
exports.useIs2FAEnabled = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun101176);
};
exports.useIsTOTPEnabled = function() {
return require(dependencyMap[2]).useStateFromStores([AuthenticationStore], _fun101178);
};
exports.useIsUserVerified = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun101180);
};
}
function useIs2FAEnabled() { // fn#101175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:229, offset: 0x0220a77d, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun101176);
}
function useIsTOTPEnabled() { // fn#101177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:400, offset: 0x0220a7e5, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.hasTOTPEnabled();
});
}
function useIsUserVerified() { // fn#101179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:513, offset: 0x0220a835, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun101180);
}
function _fun101176() { // fn#101176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:295, offset: 0x0220a7b8, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const mfaEnabled = UserStore.getCurrentUser()?.mfaEnabled;
return mfaEnabled != null && mfaEnabled;
}
function _fun101180() { // fn#101180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:581, offset: 0x0220a870, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const verified = UserStore.getCurrentUser()?.verified;
return verified != null && verified;
}
@@ -0,0 +1,126 @@
/* Metro module 13266; source: modules/user_settings/account/native/UserSettingsAccountBackupCodes.tsx; dependencies: [31, 27, 12593, 33, 4501, 697, 6797, 3856, 6238, 6742, 1244, 3860, 566, 13267, 4572, 4573, 6231, 2] */
function _fun101143(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:6, offset: 0x022099fc, size: 262 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const mfaStore = importDefault(12593) /* metro dependency 12593: MFAStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
const env0_8 = Reflect.apply(createStyles, value, [{generateCode: {color: TEXT_BRAND}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountBackupCodes.tsx');
exports.default = UserSettingsAccountBackupCodes;
}
function CodeRow({code, showCheckMark}) { // fn#101144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:237, offset: 0x02209b02, size: 190 bytes, params: 2, frame: 20
const value2 = env0_3.useCallback(_fun101145, [code]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
onPress={showCheckMark ? undefined : value2}
label={code}
trailing={showCheckMark ? ((CheckmarkSmallIcon) => <CheckmarkSmallIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND} />)((require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon) : null}
/>
);
}
function UserSettingsAccountBackupCodes({onGenerate, headerLabel}) { // fn#101146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:644, offset: 0x02209c20, size: 902 bytes, params: 2, frame: 33
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const r10 = headerLabel !== undefined ? headerLabel : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OhmvYt,
{});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const {usedCodes, unusedCodes} = env0_3.useMemo(function() {
backupCodes.forEach(_fun101149);
return {usedCodes: [], unusedCodes: []};
}, [(require(566) /* metro dependency 566: flux */).useStateFromStores([MFAStore], function() {
return MFAStore.getBackupCodes();
})]);
env0_3.useEffect(function() {
return _fun101151;
}, []);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const object = {paddingHorizontal: value2};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
const items2 = [r10.map(_fun101152)];
items2[1] = unusedCodes.length > 0 && <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zdzyFo)} hasIcons={false}>{unusedCodes.map(_fun101153)}</TableRowGroup>;
items2[2] = usedCodes.length > 0 && <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FkFLDN)} hasIcons={false}>{usedCodes.map(_fun101154)}</TableRowGroup>;
items2[3] = onGenerate !== null && <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={((Text) => <Text variant="text-md/semibold" style={styles.generateCode}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RIThUu)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} onPress={onPress_101155} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>;
return (
<ScrollView>
<Stack spacing={PX_24} style={object}>
{items2}
</Stack>
</ScrollView>
);
}
function _fun101145() { // fn#101145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:301, offset: 0x02209bc0, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = value.copy;
const codeBinding = code;
Reflect.apply(copy, value, [codeBinding.replace(RegExp('[^a-zA-Z0-9]', 'g'), '')]);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
function _fun101148() { // fn#101148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:902, offset: 0x02209fbb, size: 56 bytes, params: 1, frame: 13
backupCodes.forEach(_fun101149);
return {usedCodes: [], unusedCodes: []};
}
function _fun101150() { // fn#101150, offset: 0x0220a022, size: 11 bytes, params: 1, frame: 1
return _fun101151;
}
function _fun101152(a0, a1) { // fn#101152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1239, offset: 0x0220a052, size: 65 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return <Text {...{variant: 'text-sm/medium', children: a0}} key={a1} />;
}
function _fun101153(a0, a1) { // fn#101153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1417, offset: 0x0220a093, size: 46 bytes, params: 3, frame: 15
return (
<CodeRow
code={a0.code}
showCheckMark={false}
key={a1}
/>
);
}
function _fun101154(a0, a1) { // fn#101154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1584, offset: 0x0220a0c1, size: 46 bytes, params: 3, frame: 15
return (
<CodeRow
code={a0.code}
showCheckMark
key={a1}
/>
);
}
function UserSettingsAccountBackupCodesOnPress() { // fn#101155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1846, owner: UserSettingsAccountBackupCodes.onPress, offset: 0x0220a0ef, size: 57 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(13267) /* metro dependency 13267: MFAActionCreators */).confirmViewBackupCodes(MFAStore.getVerificationKey(),
true);
}
function _fun101149(a0) { // fn#101149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:939, offset: 0x02209ff3, size: 47 bytes, params: 2, frame: 12
return a0.consumed ? env0_0.push(a0) : env0_1.push(a0);
}
function _fun101151() { // fn#101151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1064, offset: 0x0220a02d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(13267) /* metro dependency 13267: MFAActionCreators */).clearBackupCodes();
}
@@ -0,0 +1,318 @@
/* Metro module 13300; source: modules/user_settings/account/native/UserSettingsAccountEditPassword.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1372, 7008, 1878, 661, 33, 4501, 697, 7620, 9009, 22, 683, 7508, 9011, 13301, 4573, 1244, 4572, 7981, 4578, 3868, 7032, 566, 44, 1484, 2] */
function _fun101369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:6, offset: 0x02211e49, size: 606 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.Image;
const env0_10 = value2.View;
const env0_11 = value2.ScrollView;
const loginRequiredActionStore = importDefault(1372) /* metro dependency 1372: LoginRequiredActionStore */;
const userSettingsAccountStore = importDefault(7008) /* metro dependency 7008: UserSettingsAccountStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_15 = constantsModule.AnalyticEvents;
const env0_16 = constantsModule.LoginRequiredActions;
const value4 = require(33) /* metro dependency 33 */;
const env0_17 = value4.jsx;
const env0_18 = value4.jsxs;
object = {newPassword: undefined, password: ''};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object3 = {'overflow': 'hidden', 'borderRadius': null, 'marginVertical': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{onePass: {'width': 20,
'height': 20}, unverifiedWrapper: object3, container: {padding: 16}, header: {marginBottom: 20},
requiredActionsSubtitle: {'textAlign': 'center', 'marginTop': 8}, requiredActionsTitle: {'flex': 1,
'textAlign': 'center'}, image: {'marginTop': 12, 'marginBottom': 16, 'alignSelf': 'center'}}]);
const Component = value.Component;
value = _fun101373(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountEditPassword.tsx');
exports.default = EditPasswordWrapper;
}
function _isNativeReflectConstruct_101370() { // fn#101370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:315, offset: 0x022120a7, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_101370_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101373(a0) { // fn#101373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:922, offset: 0x02212109, size: 122 bytes, params: 2, frame: 16
const closure = EditPassword;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentWillUnmount', value: value_101383}, {key: 'getError', value: function(a0) {
var property = this.props.errors;
return property != null && property[a0] != null ? property[a0][0] : undefined;
}}, {key: 'render', value: value_101385}]);
}
function EditPasswordWrapper() { // fn#101386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:4365, offset: 0x02212a56, size: 193 bytes, params: 1, frame: 18
const value2 = undefined;
const useSettingNavigationRouteModule = require(7032) /* metro dependency 7032: useSettingNavigationRoute */;
const useSettingNavigationRoute = useSettingNavigationRouteModule.useSettingNavigationRoute;
const params = Reflect.apply(useSettingNavigationRoute, useSettingNavigationRouteModule, []).params;
const isLoginRequiredAction = params == null ? value2 : params.isLoginRequiredAction;
const env0_0 = isLoginRequiredAction != null && isLoginRequiredAction;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
return ((Component) => <Component navigation={(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()} {...Reflect.apply(useStateFromStoresObject,
fluxModule, [[UserStore, UserSettingsAccountStore, LoginRequiredActionStore], _fun101387])} />)(env0_21);
}
function EditPassword(a0) { // fn#101374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:934, offset: 0x02212183, size: 249 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, EditPassword);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(EditPassword);
binding = env1_6;
if (_isNativeReflectConstruct_101370()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = env1_19;
value.newPasswordRef = null;
value.passwordManagerRef = null;
value.handlePasswordChange = handlePasswordChange;
value.handleSetNewPasswordRef = handleSetNewPasswordRef;
value.handleFocusNewPassword = handleFocusNewPassword;
value.handleNewPasswordChange = handleNewPasswordChange;
value.handleSubmit = handleSubmit_101379;
value.handleSetPasswordManagerRef = handleSetPasswordManagerRef;
value.canSubmit = canSubmit;
return value;
}
function value_101383() { // fn#101383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2233, offset: 0x0221252b, size: 43 bytes, params: 1, frame: 11
var value;
var property;
var error;
try {
value = environment.__proto__;
property = dependencyMap[14];
value = importAll(property);
value.resetAccount();
} catch (error) {
}
}
function value_101385() { // fn#101385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2407, offset: 0x0221258b, size: 1227 bytes, params: 1, frame: 41
var r9;
var r8;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
const value = environment.__proto__;
const binding = env1_20;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {password, newPassword} = this.state;
const {passwordLabel, newPasswordLabel, showForcedPasswordUpdate, submitting, hasBannerText} = this.props;
const container = value3.container;
const items5 = [hasBannerText && <View style={value3.unverifiedWrapper}>{((Component) => <Component />)(importDefault(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */)}</View>];
if (showForcedPasswordUpdate) {
var viewBinding3Props = {style: value3.header};
items2 = [<Image source={importDefault(13301) /* metro dependency 13301 */} style={value3.image} />];
string = intl.string;
items2[1] = <Text style={value3.requiredActionsTitle} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.geta79])}</Text>;
string = intl.string;
items2[2] = <Text style={value3.requiredActionsSubtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl, [t['37iHbZ']])}</Text>;
r9 = <View {...viewBinding3Props}>{items2}</View>;
} else {
r9 = showForcedPasswordUpdate;
}
items5[1] = r9;
if (showForcedPasswordUpdate) {
r8 = !showForcedPasswordUpdate;
} else {
var viewBinding4Props = {style: value3.header};
string = intl.string;
items3 = [<Text style={value3.requiredActionsTitle} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.geta79])}</Text>];
string = intl.string;
items3[1] = <Text style={value3.requiredActionsSubtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl, [t.x5tG4V])}</Text>;
r8 = <View {...viewBinding4Props}>{items3}</View>;
}
items5[2] = r8;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const items4 = [<TextInput label={passwordLabel} secureTextEntry errorMessage={this.getError('password')} onChange={this.handlePasswordChange} value={password} onSubmitEditing={this.canSubmit() ? this.handleSubmit : this.handleFocusNewPassword} returnKeyType="next" autoComplete="current-password" required />];
items4[1] = <TextInput label={newPasswordLabel} ref={this.handleSetNewPasswordRef} secureTextEntry errorMessage={this.getError('new_password')} onChange={this.handleNewPasswordChange} value={newPassword} returnKeyType="done" autoComplete="new-password" onSubmitEditing={this.canSubmit() ? this.handleSubmit : value2} required />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const handleSubmit = this.handleSubmit;
let r15 = submitting || password == null;
r15 = !r15 ? newPassword == null : r15;
items4[2] = <Button text={Reflect.apply(string, intl,
[t['FRep5/']])} onPress={handleSubmit} loading={submitting} disabled={r15} />;
items5[3] = <Stack spacing={24}>{items4}</Stack>;
return (
<ScrollView>
<View style={container}>
{items5}
</View>
</ScrollView>
);
}
function _fun101387() { // fn#101387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:4549, offset: 0x02212b17, size: 375 bytes, params: 1, frame: 24
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value5 = (require(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */).getBannerText(currentUser) != null;
const errors = UserSettingsAccountStore.getErrors();
const submitting = UserSettingsAccountStore.getSubmitting();
const settings = UserSettingsAccountStore.getSettings();
if (!env0_0) {
(importDefault(44) /* metro dependency 44 */)(currentUser != null,
'EditPasswordWrapper: user cannot be undefined');
}
const id = currentUser == null ? value3 : currentUser.id;
let r2 = id != null && LoginRequiredActionStore.requiredActionsIncludes(id, [LoginRequiredActions.UPDATE_PASSWORD]);
const object2 = {errors: errors, submitting: submitting, settings: settings, user: currentUser};
const verified = currentUser == null ? value3 : currentUser.verified;
object2.verified = verified != null && verified;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const WBqMRQ = t.WBqMRQ;
object2.passwordLabel = Reflect.apply(string, intl, [WBqMRQ]);
object2.newPasswordLabel = intl.string(t['8dM4FO']);
r2 = r2 && env0_0;
object2.showForcedPasswordUpdate = r2;
object2.hasBannerText = value5;
return object2;
}
function handlePasswordChange(a0) { // fn#101375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1237, owner: EditPassword.handlePasswordChange, offset: 0x0221227c, size: 73 bytes, params: 2, frame: 13
env0_0.setState({password: a0});
const value = environment.__proto__.__proto__;
(importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).updateAccount({password: a0});
}
function handleSetNewPasswordRef(a0) { // fn#101376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1330, owner: EditPassword.handleSetNewPasswordRef, offset: 0x022122c5, size: 20 bytes, params: 2, frame: 2
env0_0.newPasswordRef = a0;
}
function handleFocusNewPassword() { // fn#101377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1379, owner: EditPassword.handleFocusNewPassword, offset: 0x022122d9, size: 33 bytes, params: 1, frame: 9
const newPasswordRef = env0_0.newPasswordRef;
if (newPasswordRef != null) {
newPasswordRef.focus();
}
}
function handleNewPasswordChange(a0) { // fn#101378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1455, owner: EditPassword.handleNewPasswordChange, offset: 0x022122fa, size: 83 bytes, params: 2, frame: 13
let value = a0;
const r4 = value !== '' ? value : undefined;
const binding = env0_0;
binding.setState({newPassword: r4});
value = environment.__proto__.__proto__;
value = importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */;
value.updateAccount({newPassword: r4});
}
function EditPasswordHandleSubmit() { // fn#101379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1562, owner: EditPassword.handleSubmit, offset: 0x0221234d, size: 118 bytes, params: 1, frame: 16
var environment;
const binding = env0_0;
const {password, newPassword} = binding.state;
var env0_0 = binding.props.showForcedPasswordUpdate;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).saveAccountChanges,
value, [{password: password, newPassword: newPassword}, {close: false}]);
value.then(_fun101380);
}
function handleSetPasswordManagerRef(a0) { // fn#101381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2001, owner: EditPassword.handleSetPasswordManagerRef, offset: 0x022124bd, size: 20 bytes, params: 2, frame: 2
env0_0.passwordManagerRef = a0;
}
function canSubmit() { // fn#101382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2041, owner: EditPassword.canSubmit, offset: 0x022124d1, size: 90 bytes, params: 1, frame: 5
const {password, newPassword} = env0_0.state;
let r0 = password != null && password !== '' && newPassword != null;
r0 = r0 && newPassword !== '' && (password.length > 0 && newPassword.length > 0);
return r0;
}
function _fun101380(a0) { // fn#101380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1718, offset: 0x022123c3, size: 250 bytes, params: 2, frame: 14
var r0;
var body;
var value;
var defaultImport;
const ok = a0.ok;
if (ok) {
r0 = ok;
} else {
body = a0.body;
value = undefined;
value = (body == null ? value : body.username) == null;
r0 = value;
}
if (!r0) {
value = environment.__proto__.__proto__.__proto__;
value = require(9009) /* metro dependency 9009: showInvalidUsernameToastNative */;
value.showInvalidUsernameToast();
}
value = environment.__proto__.__proto__.__proto__;
const errors = UserSettingsAccountStore.getErrors();
if (errors == null || (importDefault(22) /* metro dependency 22 */)(errors).isEmpty()) {
if (showForcedPasswordUpdate) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FORCED_UPDATE_PASSWORD_SUCCEEDED);
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
} else {
value = environment.__proto__;
env1_0.props.navigation.pop();
}
}
}
@@ -0,0 +1,91 @@
/* Metro module 9011; source: modules/user_settings/account/native/UserSettingsAccountUnverifiedHeader.tsx; dependencies: [31, 1878, 33, 4501, 697, 8953, 1244, 566, 5278, 4573, 2] */
function _fun70105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:6, offset: 0x01ceedb6, size: 357 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const closure = getBannerText;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.accountWarning = {'backgroundColor': null, 'height': 36, 'alignItems': 'center', 'alignSelf': 'stretch',
'flexDirection': 'row', 'paddingHorizontal': 16, backgroundColor: RED_400};
object2.accountWarningText = {'flex': 1, 'lineHeight': 16};
const object4 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'paddingHorizontal': 8,
'paddingVertical': 4};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object4.borderColor = WHITE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.accountWarningButton = object4;
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountUnverifiedHeader.tsx');
exports.default = UserSettingsAccountUnverifiedHeader;
exports.getBannerText = closure;
}
function handleOpenEmailVerification() { // fn#70106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:504, offset: 0x01ceef1b, size: 37 bytes, params: 1, frame: 11
(importDefault(8953) /* metro dependency 8953: EmailVerificationModalActionCreators */).open();
}
function getBannerText(a0) { // fn#70107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:558, offset: 0x01ceef40, size: 290 bytes, params: 2, frame: 18
var r1;
var r0;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = null;
if (value == a0) {
r0 = value;
} else {
if (value == a0.email) {
object2 = {};
object2.title = intl.string(t['/yqgqs']);
object2.button = intl.string(t.ydw5nX);
r1 = object2;
} else if (a0.verified) {
r1 = value;
} else {
object2 = {};
object2.title = intl.string(t['3sWbf3']);
object2.button = intl.string(t['13ofGu']);
r1 = object2;
}
r0 = r1;
}
return r0;
}
function UserSettingsAccountUnverifiedHeader() { // fn#70108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:946, offset: 0x01cef062, size: 286 bytes, params: 1, frame: 23
var r0;
var PressableOpacity;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var value;
const styles = useStyles();
const getBannerTextBinding = getBannerText;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const bannerTextBinding = getBannerTextBinding(currentUser);
const value3 = null;
if (value3 == bannerTextBinding) {
r0 = value3;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {accessibilityRole: 'button', style: styles.accountWarning,
onPress: handleOpenEmailVerification};
value = <Text style={styles.accountWarningText} variant="text-xs/bold" color="always-white">{bannerTextBinding.title}</Text>;
items2 = [value];
items2[1] = <Text style={styles.accountWarningButton} variant="text-xs/medium" color="always-white">{bannerTextBinding.button}</Text>;
value = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,328 @@
/* Metro module 13281; source: modules/user_settings/account/native/UserSettingsChangeUsername.tsx; dependencies: [5, 57, 31, 27, 1878, 661, 33, 4501, 697, 4242, 13282, 4573, 1244, 1484, 566, 3802, 13283, 7508, 7620, 507, 1485, 9603, 7981, 9011, 8968, 2] */
function _fun101254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:6, offset: 0x0220e55a, size: 471 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_7 = value.View;
const env0_8 = value.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.background = {backgroundColor: BACKGROUND_BASE_LOW};
object2.container = {padding: 16};
object2.inputs = {'flex': 1, 'flexDirection': 'row', 'marginTop': 8};
object2.username = {flex: 2};
object2.discriminator = {flex: 1};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.divider = {'width': 1, 'backgroundColor': null, 'marginBottom': 8, backgroundColor: BACKGROUND_BASE_LOWEST};
const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED;
object2.dividerInner = {'flex': 1, 'marginVertical': 12, backgroundColor: INTERACTIVE_BACKGROUND_SELECTED};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsChangeUsername.tsx');
exports.default = _default_101259;
}
function UsernameStatusMessage({usernameStatus, showHint}) { // fn#101255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:642, offset: 0x0220e731, size: 230 bytes, params: 2, frame: 20
let value = require(4242) /* metro dependency 4242 */;
value = value.match(usernameStatus);
let object2 = {};
const NameValidationState = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState;
const ERROR = NameValidationState.ERROR;
object2.type = ERROR;
const P = (require(4242) /* metro dependency 4242 */).P;
object2.message = P.select();
value = value.with(object2, _fun101256);
object2 = {};
const AVAILABLE = NameValidationState.AVAILABLE;
object2.type = AVAILABLE;
object2.message = P.select();
value = value.with(object2, _fun101257);
return value.otherwise(_fun101258);
}
function _default_101259() { // fn#101259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1179, offset: 0x0220e90c, size: 1465 bytes, params: 1, frame: 38
var r12;
const value2 = undefined;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const r18 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canEditDiscriminator(currentUser) && !(currentUser != null && currentUser.hasUniqueUsername());
let binding = env0_6;
let useState = binding.useState;
let username = currentUser == null ? value2 : currentUser.username;
const value6 = '';
let r1 = username ?? value6;
const value8 = env0_5(Reflect.apply(useState, binding, [r1]), 2);
const property = value8[0];
const env0_4 = value8[1];
const value9 = env0_6.useState((currentUser == null ? value2 : currentUser.discriminator) ?? value6);
binding = env0_5;
const value10 = binding(value9, 2);
const property2 = value10[0];
const property3 = value10[1];
const binding2 = env0_6;
useState = binding2.useState;
const value11 = binding(Reflect.apply(useState, binding2, [null]), 2);
const property4 = value11[0];
var env0_6 = value11[1];
const useUsernameStatusModule = require(13283) /* metro dependency 13283: useUsernameStatus */;
const useUsernameStatus = useUsernameStatusModule.useUsernameStatus;
r1 = currentUser == null || !currentUser.hasUniqueUsername();
username = currentUser == null ? value2 : currentUser.username;
const value14 = Reflect.apply(useUsernameStatus, useUsernameStatusModule, [property, !r1, false, username]);
const value15 = env0_6.useRef(null);
username = currentUser == null ? value2 : currentUser.username;
const r15 = (property !== username || property2 !== (currentUser == null ? value2 : currentUser.discriminator)) && (r18 ? RegExp('^\\d+$',
'').test(property2) && global.parseInt(property2) > 0 : !r18);
binding = env0_6;
const value21 = binding.useCallback(_fun101261, [r15, r18, property2, value3, currentUser, property]);
const value22 = binding.useCallback(_fun101266, [r18, value21]);
binding.useLayoutEffect(_fun101267, [r15, value21, value3]);
if (currentUser == null) {
return null;
}
let r2 = property4 == null ? value2 : property4.getFieldMessage('username');
r2 = r2 ?? (property4 == null ? value2 : property4.getFieldMessage('discriminator'));
if (r2 == null) {
r12 = value14;
} else {
object = {};
object.type = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.ERROR;
object.message = r2;
r12 = object;
}
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInput = <TextInput {...r18 ? {ref: value15, containerStyle: styles.discriminator, keyboardType: 'numeric',
value: property2, onChange: property3, onSubmitEditing: value21, placeholder: '1337', returnKeyType: 'done',
autoCapitalize: 'none', isClearable: true, leadingText: '#', maxLength: 4} : {ref: value15,
containerStyle: styles.discriminator, value: '#' + property2, isClearable: false, isDisabled: true}} />;
const value26 = ((Component) => <Component />)(importDefault(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */);
const FreeFormLabel = importDefault(8968) /* metro dependency 8968: FreeFormLabel */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
const items2 = [<FreeFormLabel>{Reflect.apply(string, intl, [IEpCBQ])}</FreeFormLabel>];
const object2 = {};
username = styles.username;
object2.containerStyle = username;
object2.textContentType = 'username';
object2.value = property;
object2.enableAndroidSanitizedInputWorkaround = currentUser.hasUniqueUsername();
object2.onChange = onChange_101269;
object2.onSubmitEditing = value22;
string = intl.string;
IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
object2.placeholder = Reflect.apply(string, intl, [IEpCBQ]);
object2.returnKeyType = r18 ? 'next' : 'done';
object2.autoCapitalize = 'none';
object2.autoFocus = true;
const items3 = [<TextInput {...object2} />];
items3[1] = !currentUser.hasUniqueUsername() && <View style={styles.divider}><View style={styles.dividerInner} /></View>;
items3[2] = !currentUser.hasUniqueUsername() && textInput;
items2[1] = <View style={styles.inputs}>{items3}</View>;
items2[2] = <UsernameStatusMessage usernameStatus={r12} showHint={currentUser.hasUniqueUsername()} />;
return (
<ScrollView
style={styles.background}
keyboardShouldPersistTaps="handled"
alwaysBounceVertical={false}
>
{value26}
<View style={styles.container}>
{items2}
</View>
</ScrollView>
);
}
function _fun101256(a0) { // fn#101256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:767, offset: 0x0220e817, size: 63 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-feedback-critical">
{a0}
</Text>
);
}
function _fun101257(a0) { // fn#101257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:937, offset: 0x0220e856, size: 63 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-feedback-positive">
{a0}
</Text>
);
}
function _fun101258() { // fn#101258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1039, offset: 0x0220e895, size: 119 bytes, params: 1, frame: 19
var r0;
var Text;
var intl;
const showHintBinding = showHint;
let value = null;
if (showHintBinding) {
value = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z7c4bP)}</Text>;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun101261() { // fn#101261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1845, offset: 0x0220eec5, size: 129 bytes, params: 1, frame: 17
var environment;
var value2;
var defaultImport;
var setSection;
var ACCOUNT_CONFIRM_PASSWORD;
var binding;
var push;
if (env0_8) {
value2 = environment.__proto__;
defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
setSection = defaultImport.setSection;
ACCOUNT_CONFIRM_PASSWORD = UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD;
Reflect.apply(setSection, defaultImport, [ACCOUNT_CONFIRM_PASSWORD]);
binding = env0_0;
push = binding.push;
ACCOUNT_CONFIRM_PASSWORD = UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD;
var env0_0 = env1_4(_fun101263);
Reflect.apply(push, binding, [ACCOUNT_CONFIRM_PASSWORD, {onSubmit: onSubmit_101264,
onSuccess: onSuccess_101265}]);
}
}
function _fun101266() { // fn#101266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2507, offset: 0x0220f0df, size: 51 bytes, params: 1, frame: 10
var current;
if (env0_2) {
current = env0_7.current;
if (current != null) {
current.focus();
}
} else {
env0_9();
}
}
function _fun101267() { // fn#101267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2586, offset: 0x0220f112, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_101268});
}
function _default_101259OnChange(a0) { // fn#101269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:3641, owner: _default_101259.onChange, offset: 0x0220f1c3, size: 71 bytes, params: 2, frame: 14
var r4;
let value = a0;
let currentUserBinding = currentUser;
if (currentUserBinding == null) {
r4 = value;
} else {
currentUserBinding = currentUser;
if (currentUserBinding.hasUniqueUsername()) {
value = value.toLowerCase();
r4 = value;
} else {
r4 = value;
}
}
env0_4(r4);
env0_6(null);
}
function* _fun101263(a0) { // fn#101263, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1958, offset: 0x0220ef51, size: 321 bytes, params: 2, frame: 21
var binding;
var dispatch;
var CommonActions;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (importDefault != null) {
var value3 = undefined;
env2_6(null);
var object2 = {};
object2.username = dependencyMap;
object2.password = a0;
object2.discriminator = importAll ? env2_5 : value3;
binding = env3_2;
var value5 = binding(env3_3[18]);
yield value5.saveAccountChanges(object2, {close: false});
var value6 = undefined;
if (false) {
return value6;
}
if (value6.ok) {
return value6;
}
binding = env3_0;
var V6OrEarlierAPIError = binding(env3_3[19]).V6OrEarlierAPIError;
var v6OrEarlierAPIError = new V6OrEarlierAPIError(value6);
var getFieldMessage = v6OrEarlierAPIError.getFieldMessage;
if (Reflect.apply(getFieldMessage, v6OrEarlierAPIError, ['username']) != null) {
dispatch = require.dispatch;
CommonActions = env3_0(env3_3[20]).CommonActions;
Reflect.apply(dispatch, require, [CommonActions.navigate({name: env3_10.ACCOUNT_CHANGE_USERNAME})]);
env2_6(v6OrEarlierAPIError);
return null;
}
getFieldMessage = v6OrEarlierAPIError.getFieldMessage;
if (Reflect.apply(getFieldMessage, v6OrEarlierAPIError, ['discriminator']) == null) {
return value6;
}
dispatch = require.dispatch;
binding = env3_0;
CommonActions = binding(env3_3[20]).CommonActions;
Reflect.apply(dispatch, require, [CommonActions.navigate({name: env3_10.ACCOUNT_CHANGE_USERNAME})]);
env2_6(v6OrEarlierAPIError);
}
return null;
}
function onSuccess_101265() { // fn#101265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2402, offset: 0x0220f092, size: 77 bytes, params: 1, frame: 15
const binding = env1_0;
const dispatch = binding.dispatch;
const CommonActions = (require(1485) /* metro dependency 1485 */).CommonActions;
const navigate = CommonActions.navigate;
const ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(dispatch, binding, [Reflect.apply(navigate, CommonActions, [{name: ACCOUNT}])]);
}
function headerRight_101268(a0) { // fn#101268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2617, offset: 0x0220f138, size: 139 bytes, params: 2, frame: 19
var r0;
var value3;
var HeaderTextButton;
var intl;
let value = environment.__proto__;
if (env1_8) {
value3 = environment.__proto__.__proto__;
HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
var headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_9;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
headerTextButtonProps['label'] = value;
value = <HeaderTextButton {...headerTextButtonProps} />;
r0 = value;
} else {
r0 = null;
}
return r0;
}
@@ -0,0 +1,659 @@
/* Metro module 9010; source: modules/user_settings/account/native/UserSettingsConfirmPassword.tsx; dependencies: [5, 57, 31, 27, 1878, 661, 33, 4501, 697, 7032, 566, 7004, 4131, 1216, 1244, 9011, 4573, 8967, 8970, 4578, 2] */
function _fun70095(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9195:6, offset: 0x01cee504, size: 483 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.View;
const env0_7 = value2.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.background = {backgroundColor: BACKGROUND_BASE_LOW};
object2.container = {'paddingVertical': 12, 'paddingHorizontal': 16};
object2.title = {textAlign: 'center'};
object2.prompt = {'marginTop': 8, 'lineHeight': 18, 'textAlign': 'center'};
object2.input = {marginTop: 24};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.redesignInput = object3;
object2.button = {marginTop: 16};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.hint = {color: RED_400};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.forwardRef(_fun70096);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsConfirmPassword.tsx');
exports.default = value;
exports.UserSettingsConfirmPasswordWrapped = UserSettingsConfirmPasswordWrapped;
}
function _fun70096({onSubmit, onSuccess, onError, parentLoading, style, hideUnverifiedBanner}, a1) { // fn#70096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9195:606, offset: 0x01cee6e7, size: 1085 bytes, params: 3, frame: 37
var r0;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var FreeFormInputGroup;
var Button;
let value = undefined;
parentLoading = !(parentLoading === value) && parentLoading;
hideUnverifiedBanner = !(hideUnverifiedBanner === value) && hideUnverifiedBanner;
const env0_4 = value;
let env0_5 = value;
const closure = function() {
return _handleSubmit.apply(this, arguments);
};
const styles = useStyles();
const binding = env0_5;
binding.useImperativeHandle(a1, function() {
return {};
});
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_3 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value7[0];
const property3 = value7[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value9[0];
env0_5 = value9[1];
binding.useEffect(function() {
require(dependencyMap[11]).trackUserSettingsPaneViewed({destinationPane: UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD});
}, []);
if (currentUser == null) {
r0 = null;
} else {
var scrollViewBindingProps = {'style': null, 'keyboardShouldPersistTaps': 'handled',
'alwaysBounceVertical': false,
style: [styles.background, style]};
items2 = [hideUnverifiedBanner ? null : ((Component) => <Component />)(importDefault(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */)];
var viewBindingProps = {style: styles.container};
string = intl.string;
items3 = [<Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t['x+d9t3']])}</Text>];
string = intl.string;
items3[1] = <Text style={styles.prompt} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl,
[t.vaZmAx])}</Text>;
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items3[2] = <FreeFormInputGroup style={styles.input} textStyle={styles.redesignInput} label={intl.string(t['CIGa+7'])} textContentType="password" keyboardType="default" secureTextEntry value={property2} onChangeText={property3} onSubmitEditing={closure} error={property4 == null ? value : property4.getFieldMessage('password')} returnKeyType="done" autoCapitalize="none" autoFocus />;
items3[3] = property4 != null && property4.getFieldMessage('password') == null ? ((Component) => <Component style={styles.hint}>{property4.message}</Component>)(importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */) : null;
var viewBinding2Props = {style: styles.button};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items3[4] = <View {...viewBinding2Props}><Button variant="primary" size="lg" text={Reflect.apply(string, intl,
[t.i4jeWR])} onPress={closure} loading={property || parentLoading} /></View>;
items2[1] = <View {...viewBindingProps}>{items3}</View>;
value = <ScrollView {...scrollViewBindingProps}>{items2}</ScrollView>;
r0 = value;
}
return r0;
}
function UserSettingsConfirmPasswordWrapped() { // fn#70104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9195:2756, offset: 0x01ceed74, size: 66 bytes, params: 1, frame: 14
return ((Component) => <Component {...(require(7032) /* metro dependency 7032: useSettingNavigationRoute */).useSettingNavigationRoute().params} />)(env0_13);
}
function _handleSubmit() { // fn#70098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9195:1005, offset: 0x01ceeb24, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun70100).apply(this, arguments);
}
function* _fun70100() { // fn#70100, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9195:1054, offset: 0x01ceeb64, size: 473 bytes, params: 1, frame: 19
var value;
var value2;
var binding;
var moduleValue;
var value3;
var value4;
var value5;
var status;
var value6;
var value7;
var value8;
var binding2;
var binding3;
var property;
var value9;
var V6OrEarlierAPIError;
var prototype;
var v6OrEarlierAPIError;
var value11;
var value12;
var value13;
var error;
var value14;
var binding4;
var value15;
var captureException;
var message;
var value16;
var intl;
var string;
var value17;
var t;
var N2yb9a;
var value18;
var value19;
var binding5;
var binding6;
var value20;
var value22;
var value23;
exceptionLanding91: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__.__proto__;
env2_3(true);
reducibleJoin3: while (true) {
reduciblePort90: while (true) {
exceptionLanding49: while (true) {
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
break reducibleJoin3;
}
value14 = environment.__proto__.__proto__.__proto__;
try {
binding = env3_1;
} catch (error) {
break exceptionLanding91;
}
try {
binding4 = env3_2;
} catch (error) {
break exceptionLanding91;
}
try {
property = binding4[13];
} catch (error) {
break exceptionLanding91;
}
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding91;
}
try {
captureException = value15.captureException;
} catch (error) {
break exceptionLanding91;
}
try {
Reflect.apply(captureException, value15, [error]);
} catch (error) {
break exceptionLanding91;
}
try {
message = error.message;
} catch (error) {
break exceptionLanding91;
}
try {
binding = env3_0;
} catch (error) {
break exceptionLanding91;
}
try {
property = binding4[14];
} catch (error) {
break exceptionLanding91;
}
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding91;
}
try {
intl = value16.intl;
} catch (error) {
break exceptionLanding91;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding91;
}
try {
property = binding4[14];
} catch (error) {
break exceptionLanding91;
}
try {
value17 = binding(property);
} catch (error) {
break exceptionLanding91;
}
try {
t = value17.t;
} catch (error) {
break exceptionLanding91;
}
try {
N2yb9a = t.N2yb9a;
} catch (error) {
break exceptionLanding91;
}
try {
value18 = Reflect.apply(string, intl, [N2yb9a]);
} catch (error) {
break exceptionLanding91;
}
try {
value19 = message === value18;
} catch (error) {
break exceptionLanding91;
}
reducibleJoin85: while (true) {
if (value19) {
break reducibleJoin85;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding91;
}
try {
binding5 = env3_0;
} catch (error) {
break exceptionLanding91;
}
try {
binding6 = env3_2;
} catch (error) {
break exceptionLanding91;
}
try {
property = binding6[12];
} catch (error) {
break exceptionLanding91;
}
try {
value20 = binding5(property);
} catch (error) {
break exceptionLanding91;
}
try {
V6OrEarlierAPIError = value20.V6OrEarlierAPIError;
} catch (error) {
break exceptionLanding91;
}
try {
prototype = V6OrEarlierAPIError.prototype;
} catch (error) {
break exceptionLanding91;
}
try {
} catch (error) {
break exceptionLanding91;
}
try {
v6OrEarlierAPIError = new V6OrEarlierAPIError();
} catch (error) {
break exceptionLanding91;
}
try {
value22 = v6OrEarlierAPIError instanceof Object ? v6OrEarlierAPIError : undefined;
} catch (error) {
break exceptionLanding91;
}
try {
binding(value22);
} catch (error) {
break exceptionLanding91;
}
break reducibleJoin85;
}
try {
} catch (error) {
break exceptionLanding91;
}
try {
value23 = dependencyMap == null;
} catch (error) {
break exceptionLanding91;
}
reducibleJoin90: while (true) {
if (value23) {
break reducibleJoin90;
}
try {
} catch (error) {
break exceptionLanding91;
}
try {
dependencyMap();
} catch (error) {
break exceptionLanding91;
}
break reducibleJoin90;
}
break reduciblePort90;
}
env2_3(false);
return undefined;
}
try {
try {
binding = env2_4;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
moduleValue = require(binding);
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
yield moduleValue;
try {
try {
value3 = undefined;
value4 = false;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
if (value4) {
env2_3(false);
return value3;
}
try {
try {
value5 = value3 == null;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
if (value5) {
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
value13 = dependencyMap == null;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
reducibleJoin47: while (true) {
if (value13) {
break reducibleJoin47;
}
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
dependencyMap();
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
break reducibleJoin47;
}
env2_3(false);
return undefined;
}
try {
try {
status = value3.status;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
value6 = status >= 400;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
if (value6) {
try {
try {
status = value3.status;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
value7 = status <= 599;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
reducibleJoin18: while (true) {
if (value7) {
try {
try {
binding = env2_5;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
value8 = environment.__proto__.__proto__.__proto__;
try {
try {
binding2 = env3_0;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
binding3 = env3_2;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
property = binding3[12];
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
value9 = binding2(property);
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
V6OrEarlierAPIError = value9.V6OrEarlierAPIError;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
prototype = V6OrEarlierAPIError.prototype;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
v6OrEarlierAPIError = new V6OrEarlierAPIError();
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
value11 = v6OrEarlierAPIError instanceof Object ? v6OrEarlierAPIError : undefined;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
binding(value11);
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
value12 = dependencyMap == null;
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
reducibleJoin41: while (true) {
if (value12) {
break reducibleJoin41;
}
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
dependencyMap();
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
break reducibleJoin41;
}
env2_3(false);
return undefined;
}
break reducibleJoin18;
}
}
try {
try {
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
try {
try {
importDefault();
} catch (error) {
break exceptionLanding49;
}
} catch (error) {
break exceptionLanding91;
}
env2_3(false);
return undefined;
}
env2_3(false);
throw error;
}
@@ -0,0 +1,186 @@
/* Metro module 13320; source: modules/user_settings/account/native/UserSettingsInputAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 507, 4572, 4573, 7981, 4596, 5467, 2] */
function _fun101479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:6, offset: 0x022162cd, size: 288 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
object = {input: '', error: undefined};
const PureComponent = value.PureComponent;
value = _fun101483(PureComponent);
value.defaultProps = {'isLoading': false, 'useKeyboardAwareWrapper': false, 'secureTextEntry': true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsInputAlert.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_101480() { // fn#101480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:185, offset: 0x022163ed, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_101480_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101483(a0) { // fn#101483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:410, offset: 0x0221644f, size: 97 bytes, params: 2, frame: 16
const closure = UserSettingsInputAlert;
env0_7(closure, a0);
return env0_4(closure, [{key: 'renderContent', value: value_101489}, {key: 'render', value: value_101491}]);
}
function UserSettingsInputAlert(a0) { // fn#101484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:422, offset: 0x022164b0, size: 168 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UserSettingsInputAlert);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(UserSettingsInputAlert);
binding = env1_5;
if (_isNativeReflectConstruct_101480()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = env1_10;
value.close = close_101485;
value.handleSubmit = handleSubmit_101486;
return value;
}
function value_101489() { // fn#101489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1156, offset: 0x022166c0, size: 336 bytes, params: 1, frame: 27
var environment;
const {placeholder, secureTextEntry, helpText, inputLabel} = this.props;
let error = this.props.error;
if (error == null) {
error = this.state.error;
} else {
error = this.props.error;
error = error !== '' ? this.props.error : this.state.error;
}
const value = environment.__proto__;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const r6 = helpText != null && ((Text) => <Text variant="text-md/normal">{helpText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
return (
<Stack spacing={16}>
{r6}
<TextInput
label={inputLabel}
placeholder={placeholder}
secureTextEntry={secureTextEntry}
returnKeyType="done"
autoFocus
status={error != null ? 'error' : 'default'}
errorMessage={error}
onSubmitEditing={this.handleSubmit}
onChange={onChange_101490}
/>
</Stack>
);
}
function value_101491() { // fn#101491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1680, offset: 0x0221682e, size: 173 bytes, params: 1, frame: 20
var r0;
const {title, actionText, cancelText, confirmColor, useKeyboardAwareWrapper} = this.props;
let value = environment.__proto__;
const value2 = ((Component) => <Component title={title} confirmText={actionText} confirmColor={confirmColor} onConfirm={this.handleSubmit} cancelText={cancelText} onCancel={this.close}>{this.renderContent()}</Component>)(importDefault(4596) /* metro dependency 4596: Alert */);
if (useKeyboardAwareWrapper) {
value = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
value = ((Component) => <Component>{value2}</Component>)(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function UserSettingsInputAlertClose() { // fn#101485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:692, owner: UserSettingsInputAlert.close, offset: 0x02216558, size: 34 bytes, params: 1, frame: 9
const onClose = env0_0.props.onClose;
if (onClose != null) {
onClose();
}
}
function UserSettingsInputAlertHandleSubmit() { // fn#101486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:748, owner: UserSettingsInputAlert.handleSubmit, offset: 0x0221657a, size: 137 bytes, params: 1, frame: 14
var value;
const binding = env0_0;
const props = binding.props;
const isLoading = props.isLoading;
const onSubmit = props.onSubmit;
var env0_0 = props.onSuccess;
const env0_1 = props.closeOnSuccess;
const env0_2 = props.onError;
const env0_3 = props.skipErrorMsgAbortCode;
if (!(isLoading || onSubmit == null)) {
value = onSubmit(binding.state.input);
value = value.then(_fun101487);
value.catch(_fun101488);
}
}
function value_101489OnChange(a0) { // fn#101490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1625, owner: value_101489.onChange, offset: 0x02216810, size: 30 bytes, params: 2, frame: 12
return env0_0.setState({input: a0});
}
function _fun101487() { // fn#101487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:904, offset: 0x02216603, size: 51 bytes, params: 1, frame: 10
if (onSuccess != null) {
onSuccess();
}
if (closeOnSuccess) {
value = environment.__proto__;
env1_0.close();
}
}
function _fun101488(a0) { // fn#101488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:945, offset: 0x02216636, size: 138 bytes, params: 2, frame: 13
var value2;
var v6OrEarlierAPIError;
if (onError != null) {
onError(a0);
}
if (a0) {
if (a0.body) {
value2 = environment.__proto__.__proto__.__proto__;
v6OrEarlierAPIError = new (require(507) /* metro dependency 507: HTTPUtils */).V6OrEarlierAPIError(a0);
if (v6OrEarlierAPIError.code !== skipErrorMsgAbortCode) {
value = environment.__proto__;
env1_0.setState({error: v6OrEarlierAPIError.message});
}
}
}
}
@@ -0,0 +1,88 @@
/* Metro module 13334; source: modules/user_settings/account/native/handleDisableAccount.tsx; dependencies: [1867, 1878, 1244, 7620, 13319, 4647, 2] */
function _fun101558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:6, offset: 0x02218625, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/handleDisableAccount.tsx');
exports.default = handleDisableAccount;
}
function handleDisableAccount() { // fn#101559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:221, offset: 0x022186ab, size: 232 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value2;
var value3;
let value = a0;
let r2 = value !== undefined ? value : false;
if (hasOwnedGuilds()) {
value2 = intl.string(t.vJiTOL);
value3 = intl.string(t.UyVVan);
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
value.show({title: value2, body: value3});
} else {
r2 = r2 ? getDeleteAlertProps() : getDisableAlertProps();
(importDefault(13319) /* metro dependency 13319: showUserSettingsInputAlert */)(r2);
}
}
function hasOwnedGuilds() { // fn#101560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:260, owner: handleDisableAccount.hasOwnedGuilds, offset: 0x02218793, size: 65 bytes, params: 1, frame: 12
var environment;
var r0;
let value = environment.__proto__;
const value3 = UserStore.getCurrentUser() != null;
if (value3) {
value = GuildStore.getGuildsArray();
value = value.some(_fun101561);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function getDeleteAlertProps() { // fn#101562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:506, owner: handleDisableAccount.getDeleteAlertProps, offset: 0x022187ef, size: 158 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
value = Reflect.apply(string, intl, [t['CIGa+7']]);
value = value.toUpperCase();
const object2 = {onSubmit: onSubmit_101563};
object2.title = intl.string(t['8lQ2rR']).toUpperCase();
object2.placeholder = value;
object2.closeOnSuccess = true;
return object2;
}
function getDisableAlertProps() { // fn#101564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:743, owner: handleDisableAccount.getDisableAlertProps, offset: 0x022188b9, size: 158 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
value = Reflect.apply(string, intl, [t['CIGa+7']]);
value = value.toUpperCase();
const object2 = {onSubmit: onSubmit_101565};
object2.title = intl.string(t.jf5GGb).toUpperCase();
object2.placeholder = value;
object2.closeOnSuccess = true;
return object2;
}
function _fun101561({ownerId}) { // fn#101561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:352, offset: 0x022187d4, size: 27 bytes, params: 2, frame: 2
return ownerId === env0_0.id;
}
function getDeleteAlertPropsOnSubmit(a0) { // fn#101563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:614, owner: handleDisableAccount.getDeleteAlertProps.onSubmit, offset: 0x0221888d, size: 44 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).disableAccount(a0, true);
}
function getDisableAlertPropsOnSubmit(a0) { // fn#101565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:852, owner: handleDisableAccount.getDisableAlertProps.onSubmit, offset: 0x02218957, size: 44 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).disableAccount(a0, false);
}
@@ -0,0 +1,20 @@
/* Metro module 13306; source: modules/user_settings/account/native/mfa_modal_flow/TwoFAConstants.tsx; dependencies: [661, 2] */
function _fun101414(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13496:6, offset: 0x02213813, size: 185 bytes, params: 8, frame: 19
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AnalyticsSections = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
Object = global.Object;
const freeze = Object.freeze;
const IOS_TWO_FA_LANDING = AnalyticsSections.IOS_TWO_FA_LANDING;
const IOS_TWO_FA_SCAN = AnalyticsSections.IOS_TWO_FA_SCAN;
const IOS_TWO_FA_ENTER_CODE = AnalyticsSections.IOS_TWO_FA_ENTER_CODE;
const IOS_TWO_FA_SUCCESS = AnalyticsSections.IOS_TWO_FA_SUCCESS;
const IOS_TWO_FA_ADD_SMS = AnalyticsSections.IOS_TWO_FA_ADD_SMS;
const IOS_TWO_FA_VERIFY_SMS = AnalyticsSections.IOS_TWO_FA_VERIFY_SMS;
const value = Reflect.apply(freeze, Object, [{LANDING: IOS_TWO_FA_LANDING, SCAN: IOS_TWO_FA_SCAN,
ENTER_CODE: IOS_TWO_FA_ENTER_CODE, SUCCESS: IOS_TWO_FA_SUCCESS, ADD_SMS: IOS_TWO_FA_ADD_SMS,
VERIFY_SMS: IOS_TWO_FA_VERIFY_SMS}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFAConstants.tsx');
exports.TwoFAModalSetupSections = value;
}
@@ -0,0 +1,90 @@
/* Metro module 13312; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupEnterCode.tsx; dependencies: [57, 31, 7030, 13306, 33, 4501, 13309, 1484, 566, 8980, 13267, 1244, 13305, 6618, 1305, 13313, 6619, 2] */
function _fun101425(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:6, offset: 0x022142e3, size: 251 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_6 = (require(13306) /* metro dependency 13306: TwoFAConstants */).TwoFAModalSetupSections;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupEnterCode.tsx');
exports.default = TwoFASetupEnterCode;
}
function TwoFASetupEnterCode(a0) { // fn#101426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:396, offset: 0x022143de, size: 535 bytes, params: 2, frame: 29
const env0_0 = a0;
const styles = useStyles();
const value2 = (require(13309) /* metro dependency 13309: TwoFASetupStyles */).useTwoFASetupStyles();
const binding = env0_4;
const env0_1 = binding.useRef(a0);
binding.useEffect(_fun101427);
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value6 = binding.useRef(null);
const value7 = binding.useRef(null);
const value8 = binding.useCallback(_fun101429, [value3]);
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items2 = [value2.modalHeader];
items2[1] = value2.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HZPBOd = (require(1244) /* metro dependency 1244: indexNative */).t.HZPBOd;
return (
<TwoFASetupModalScreen>
<SafeAreaPaddingView bottom style={styles.container}>
<LegacyText style={items2}>
{Reflect.apply(string, intl, [HZPBOd])}
</LegacyText>
{((Component) => <Component style={{maxHeight: 520}} ref={value7} showActivityIndicator={property} handleSubmit={value8} error={(importDefault(6619) /* metro dependency 6619: useRefValue */)(value6)} appState={state} />)(importDefault(13313) /* metro dependency 13313: MFACodeInput */)}
</SafeAreaPaddingView>
</TwoFASetupModalScreen>
);
}
function _fun101429(a0) { // fn#101429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:691, offset: 0x022145f5, size: 145 bytes, params: 2, frame: 16
var value;
const value3 = (require(8980) /* metro dependency 8980: MFAUtils */).encodeTotpSecret(env0_1.current.totpSecret);
env0_3(true);
value = Reflect.apply((importDefault(13267) /* metro dependency 13267: MFAActionCreators */).enable, value,
[{code: a0, secret: value3}]);
value = value.then(_fun101430);
value.catch(_fun101431);
}
function _fun101430() { // fn#101430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:799, offset: 0x02214686, size: 34 bytes, params: 1, frame: 11
const binding = env1_2;
const push = binding.push;
const SUCCESS = TwoFAModalSetupSections.SUCCESS;
Reflect.apply(push, binding, [SUCCESS]);
}
function _fun101431(a0) { // fn#101431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:832, offset: 0x022146a8, size: 139 bytes, params: 2, frame: 18
var r2;
var value2;
var intl;
const binding = env1_4;
if (a0.body != null) {
r2 = a0.body.message;
} else {
value2 = environment.__proto__.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1u5B+G']);
}
binding.current = r2;
const current = env1_5.current;
if (current != null) {
current.clear();
}
env1_3(false);
}
@@ -0,0 +1,51 @@
/* Metro module 13308; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupLanding.tsx; dependencies: [31, 27, 33, 4501, 13309, 13305, 6618, 13310, 4573, 1244, 2] */
function _fun101418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13498:6, offset: 0x02213b45, size: 243 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'alignItems': 'center', 'justifyContent': 'center'}, authIcon: {'width': 120, 'height': 120,
'marginBottom': 32}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupLanding.tsx');
exports.default = TwoFASetupLanding;
}
function TwoFASetupLanding() { // fn#101419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13498:415, offset: 0x02213c38, size: 426 bytes, params: 1, frame: 29
const styles = useStyles();
const value2 = (require(13309) /* metro dependency 13309: TwoFASetupStyles */).useTwoFASetupStyles();
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const object = {};
let container = styles.container;
object.style = container;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
container = styles.container;
const items3 = [<Image source={importDefault(13310) /* metro dependency 13310 */} style={styles.authIcon} />];
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Heading variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9E74Dx'])}</Heading>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [value2.modalBody];
items2[1] = value2.text;
const format = intl.format;
const A7Aehw = (require(1244) /* metro dependency 1244: indexNative */).t.A7Aehw;
items3[2] = <Text variant="text-md/normal" style={items2}>{Reflect.apply(format, intl, [A7Aehw,
{'googleAuthURL': 'https://support.google.com/accounts/answer/1066447?hl=en',
'authyURL': 'https://www.authy.com/'}])}</Text>;
return (
<TwoFASetupModalScreen>
<View {...object}>
<SafeAreaPaddingView bottom style={container}>
{items3}
</SafeAreaPaddingView>
</View>
</TwoFASetupModalScreen>
);
}
@@ -0,0 +1,159 @@
/* Metro module 13305; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModal.tsx; dependencies: [31, 27, 13306, 33, 4501, 697, 1484, 13304, 6618, 4578, 1244, 13307, 5282, 13308, 13311, 13312, 13314, 6518, 8980, 5280, 2] */
function _fun101399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:6, offset: 0x0221310c, size: 341 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const TwoFAModalSetupSections = (require(13306) /* metro dependency 13306: TwoFAConstants */).TwoFAModalSetupSections;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_8 = Reflect.apply(createStyles, value, [{container: {flex: 1, backgroundColor: BACKGROUND_BASE_LOW},
floatingButton: {'position': 'absolute', 'bottom': 12, 'left': 12, 'right': 12}}]);
object2 = {};
const LANDING = TwoFAModalSetupSections.LANDING;
object2[LANDING] = 1;
const SCAN = TwoFAModalSetupSections.SCAN;
object2[SCAN] = 2;
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
object2[ENTER_CODE] = 3;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModal.tsx');
exports.default = TwoFASetupModal;
exports.TwoFASetupModalScreen = TwoFASetupModalScreen;
}
function getPageMarker(a0) { // fn#101400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:388, offset: 0x02213261, size: 100 bytes, params: 2, frame: 16
const Object = global.Object;
const length = Object.keys(env0_9).length;
const PageMarker = (require(13307) /* metro dependency 13307: TwoFASetupModalHeader */).PageMarker;
return <PageMarker currentPage={env0_9[a0]} numMarkers={length - 1} />;
}
function TwoFASetupModal({initialRouteName = TwoFAModalSetupSections.LANDING}) { // fn#101401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:622, offset: 0x022132c5, size: 172 bytes, params: 2, frame: 18
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun101402);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
initialRouteName={initialRouteName}
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
headerTitleAlign="center"
/>
);
}
function TwoFASetupModalScreen({children}) { // fn#101412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1374, offset: 0x022135b2, size: 432 bytes, params: 2, frame: 27
var r5;
var SafeAreaPaddingView;
var Button;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let getState = value2.getState;
const routes = Reflect.apply(getState, value2, []).routes;
getState = value2.getState;
const name = routes[Reflect.apply(getState, value2, []).routes.length - 1].name;
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
const value3 = name !== ENTER_CODE;
if (value3) {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {bottom: true, style: styles.floatingButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <SafeAreaPaddingView {...safeAreaPaddingViewProps}><Button onPress={env0_3.useCallback(_fun101413, [value2,
name])} text={name === TwoFAModalSetupSections.SUCCESS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XiOHRX)} /></SafeAreaPaddingView>;
} else {
r5 = value3;
}
return (
<View style={styles.container}>
{children}
{r5}
</View>
);
}
function _fun101402() { // fn#101402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:695, offset: 0x02213371, size: 51 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = require(8980) /* metro dependency 8980: MFAUtils */;
value = value.generateTotpSecret();
return getScreens_101403(value);
}
function _fun101413() { // fn#101413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1548, offset: 0x02213762, size: 177 bytes, params: 1, frame: 13
var binding;
const nameBinding = name;
const LANDING = TwoFAModalSetupSections.LANDING;
if (nameBinding === LANDING) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.SCAN);
} else if (name === TwoFAModalSetupSections.SCAN) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.ENTER_CODE);
} else if (name === TwoFAModalSetupSections.ENTER_CODE) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.SUCCESS);
} else {
(importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close();
}
}
function getScreens_101403(a0) { // fn#101403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:699, offset: 0x022133a4, size: 268 bytes, params: 2, frame: 22
var environment;
const env0_0 = a0;
const object3 = {};
const value = environment.__proto__.__proto__;
const LANDING = TwoFAModalSetupSections.LANDING;
const object4 = {};
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close);
object4.headerTitle = function() {
return getPageMarker(TwoFAModalSetupSections.LANDING);
};
object4.render = render_101405;
object3[LANDING] = object4;
const SCAN = TwoFAModalSetupSections.SCAN;
object3[SCAN] = {headerTitle: function() {
return getPageMarker(TwoFAModalSetupSections.SCAN);
}, render: render_101407};
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
object3[ENTER_CODE] = {headerTitle: function() {
return getPageMarker(TwoFAModalSetupSections.ENTER_CODE);
}, render: render_101409};
const SUCCESS = TwoFAModalSetupSections.SUCCESS;
const object6 = {};
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close);
object6.headerTitle = function() {
return null;
};
object6.render = render_101411;
object3[SUCCESS] = object6;
return object3;
}
function getScreens_101403Render() { // fn#101405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:846, owner: getScreens_101403.render, offset: 0x022134ca, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(importDefault(13308) /* metro dependency 13308: TwoFASetupLanding */);
}
function getScreens_101403Render_101407() { // fn#101407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:921, owner: getScreens_101403.render, offset: 0x0221350b, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component totpSecret={env0_0} />)(importDefault(13311) /* metro dependency 13311: TwoFASetupScan */);
}
function getScreens_101403Render_101409() { // fn#101409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1020, owner: getScreens_101403.render, offset: 0x02213558, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component totpSecret={env0_0} />)(importDefault(13312) /* metro dependency 13312: TwoFASetupEnterCode */);
}
function getScreens_101403Render_101411() { // fn#101411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1149, owner: getScreens_101403.render, offset: 0x0221358b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(importDefault(13314) /* metro dependency 13314: TwoFASetupSuccess */);
}
@@ -0,0 +1,23 @@
/* Metro module 13304; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalActionCreators.tsx; dependencies: [5080, 13305, 1962, 2] */
function _fun101396(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:6, offset: 0x0221300e, size: 122 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {open: open_101397, close: close_101398};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalActionCreators.tsx');
exports.default = object2;
}
function open_101397(a0) { // fn#101397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:126, offset: 0x02213088, size: 89 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, {initialRouteName: a0}, 'TWO_FA_SETUP_MODAL_KEY']);
}
function close_101398() { // fn#101398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:198, offset: 0x022130e1, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('TWO_FA_SETUP_MODAL_KEY');
}
@@ -0,0 +1,52 @@
/* Metro module 13307; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
function _fun101415(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:6, offset: 0x022138cc, size: 383 bytes, params: 8, frame: 23
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_1 = value2.jsx;
const env0_2 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {pageMarkerContainer: {'flex': 1, 'alignItems': 'center', 'justifyContent': 'space-between',
'flexDirection': 'row'}};
const object5 = {'width': 14, 'height': 14, 'borderRadius': 7, 'borderWidth': 1};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object5.backgroundColor = BACKGROUND_MOD_STRONG;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object3.circleIcon = object5;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.horizontalLine = {'position': 'absolute', 'left': 0, 'right': 0, 'top': '50%', 'bottom': '50%', 'height': 1,
backgroundColor: BORDER_STRONG};
const object6 = {};
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object6.backgroundColor = TEXT_BRAND;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderColor = BORDER_SUBTLE;
object3.filledCircle = object6;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [object3]);
value = value.memo(_fun101416);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalHeader.tsx');
exports.PageMarker = value;
}
function _fun101416({numMarkers, currentPage}) { // fn#101416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:666, offset: 0x02213a4b, size: 170 bytes, params: 2, frame: 20
const styles = useStyles();
const Array = global.Array;
return (
<View style={[styles.pageMarkerContainer, {width: 20 * numMarkers}]}>
<View style={styles.horizontalLine} />
{Array(numMarkers).fill(undefined).map(_fun101417)}
</View>
);
}
function _fun101417(a0, a1) { // fn#101417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:744, offset: 0x02213af5, size: 80 bytes, params: 3, frame: 18
const currentPageBinding = currentPage;
const value2 = typeof a1 === 'bigint' ? a1 + 1n : +a1 + 1;
return <View style={[styles.circleIcon, currentPageBinding === value2 && styles.filledCircle]} key={value2} />;
}
@@ -0,0 +1,59 @@
/* Metro module 13311; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupScan.tsx; dependencies: [57, 31, 33, 4501, 697, 6797, 13309, 13305, 6618, 1305, 1244, 4573, 5278, 2] */
function _fun101422(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:6, offset: 0x02213f1a, size: 243 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
const env0_6 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'alignItems': 'center',
'justifyContent': 'center'}, copy: {color: TEXT_BRAND}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupScan.tsx');
exports.default = TwoFASetupScan;
}
function TwoFASetupScan({totpSecret}) { // fn#101423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:386, offset: 0x0221400d, size: 641 bytes, params: 2, frame: 31
const styles = useStyles();
const binding = env0_3;
const [property, env0_1] = env0_2(binding.useState(false), 2);
const value4 = binding.useCallback(_fun101424, [totpSecret]);
const value5 = (require(13309) /* metro dependency 13309: TwoFASetupStyles */).useTwoFASetupStyles();
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items3 = [value5.modalHeader];
items3[1] = value5.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [<LegacyText style={items3}>{Reflect.apply(string, intl, [t['hg/+aT']])}</LegacyText>];
items2[1] = <LegacyText style={[value5.modalBody,
value5.text]}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UQR+Qy'])}</LegacyText>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <Text variant="text-md/bold" style={{textAlign: 'center'}}>{totpSecret}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
items2[3] = <PressableOpacity accessibilityRole="button" onPress={value4}><LegacyText style={styles.copy}>{property ? Reflect.apply(string,
intl, [t.mGZ66D]) : Reflect.apply(string, intl, [t.OpuAlK])}</LegacyText></PressableOpacity>;
return (
<TwoFASetupModalScreen>
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
</TwoFASetupModalScreen>
);
}
function _fun101424() { // fn#101424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:493, offset: 0x0221428e, size: 85 bytes, params: 1, frame: 16
env0_1(true);
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const totpSecretBinding = totpSecret;
Reflect.apply(copy, clipboardUtilsNativeModule, [totpSecretBinding.replace(RegExp('[^a-zA-Z0-9]', 'g'), '')]);
}
@@ -0,0 +1,22 @@
/* Metro module 13309; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupStyles.tsx; dependencies: [661, 4501, 6597, 697, 2] */
function _fun101420(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13499:6, offset: 0x02213de2, size: 244 bytes, params: 8, frame: 24
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {text: {'textAlign': 'center', 'marginLeft': 20, 'marginRight': 20}};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object4, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24), undefined);
object3.modalHeader = object4;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object3.modalBody = {color: TEXT_SUBTLE, marginTop: 8};
value = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupStyles.tsx');
exports.useTwoFASetupStyles = value;
}
@@ -0,0 +1,331 @@
/* Metro module 13314; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupSuccess.tsx; dependencies: [5, 57, 31, 27, 661, 33, 4501, 6597, 697, 5084, 1244, 13304, 8978, 13305, 13315, 1305, 4578, 2] */
function _fun101443(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:6, offset: 0x02214df5, size: 575 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const env0_7 = value.Image;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'alignSelf': 'stretch', 'flex': 1, 'alignItems': 'center', 'justifyContent': 'flex-start',
'flexDirection': 'column'}};
object2.flex = {flex: 1};
object2.image = {'width': 190, 'height': 70};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object4, textStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 20), undefined);
object4['marginTop'] = 33;
object2.success = object4;
let TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.successBody = {'fontSize': 14, 'textAlign': 'center', 'marginHorizontal': 20, 'marginTop': 4,
color: TEXT_STRONG};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object2.divider = {'height': 2, 'width': 48, 'margin': 32, backgroundColor: BORDER_STRONG};
object2.buttonWrapper = {'alignSelf': 'stretch', 'margin': 16, 'marginTop': 0};
TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.ctaDescription = {'fontSize': 14, 'textAlign': 'center', 'marginTop': 4, 'marginHorizontal': 16,
color: TEXT_STRONG};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.errorText = {'fontSize': 14, 'textAlign': 'center', 'marginHorizontal': 16, 'marginTop': 8,
color: TEXT_FEEDBACK_CRITICAL};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupSuccess.tsx');
exports.default = TwoFASetupSuccess;
}
function TwoFASetupSuccess() { // fn#101444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1077, offset: 0x02215034, size: 784 bytes, params: 1, frame: 32
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_0 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value4[0];
const env0_1 = value4[1];
const value5 = binding.useCallback(_fun101445, []);
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const items2 = [<View style={styles.flex} />];
items2[1] = <Image source={require(13315) /* metro dependency 13315 */} style={styles.image} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Awk3Gw = t.Awk3Gw;
items2[2] = <LegacyText style={styles.success}>{Reflect.apply(string, intl, [Awk3Gw])}</LegacyText>;
items2[3] = <LegacyText style={styles.successBody}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0d1bXM'])}</LegacyText>;
items2[4] = <View style={styles.divider} />;
items2[5] = <LegacyText style={styles.ctaDescription}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.okgGTu)}</LegacyText>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[6] = <View style={styles.buttonWrapper}><Button text={property ? Reflect.apply(string, intl,
[t.wePEBF]) : Reflect.apply(string, intl,
[t.NIFmCJ])} onPress={value5} disabled={property} loading={property} grow />{property2 !== '' && <LegacyText style={styles.errorText}>{property2}</LegacyText>}</View>;
items2[7] = <View style={styles.flex} />;
return (
<TwoFASetupModalScreen>
<View style={styles.container}>
{items2}
</View>
</TwoFASetupModalScreen>
);
}
function _fun101445() { // fn#101445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1213, offset: 0x02215344, size: 88 bytes, params: 1, frame: 15
const binding = env0_1;
binding('');
const value2 = _fun101446();
const defaultImport = importDefault(8978) /* metro dependency 8978: NativeCeremonies */;
defaultImport.registerPasskey({setRegistering: env0_0, setError: binding, onRegisterSuccess: value2});
}
function _fun101446() { // fn#101446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1230, offset: 0x0221539c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun101448);
return _fun101449;
}
async function _fun101448({ticket, credential}) { // fn#101448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1250, offset: 0x022153d4, size: 201 bytes, params: 2, frame: 23
var binding;
var binding2;
var property;
var value4;
var finishRegisterWebAuthnCredential;
var value5;
var intl;
var string;
var value6;
var t;
var value7;
var value8;
var value9;
var value10;
var binding3;
var close;
var error;
var body;
var message;
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[9];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
finishRegisterWebAuthnCredential = value4.finishRegisterWebAuthnCredential;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value5 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
intl = value5.intl;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
string = intl.string;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value6 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
t = value6.t;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = t['8H5RmH'];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value7 = Reflect.apply(string, intl, [property]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value8 = Reflect.apply(finishRegisterWebAuthnCredential, value4, [value7, ticket, credential]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
await value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
if (value10) {
return value9;
}
try {
binding = env4_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
binding3 = env4_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding3[11];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
close = value.close;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
Reflect.apply(close, value, []);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
}
}
}
@@ -0,0 +1,15 @@
/* Metro module 9009; source: modules/user_settings/account/native/showInvalidUsernameToastNative.tsx; dependencies: [3857, 1244, 8160, 2] */
function _fun70093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9194:6, offset: 0x01cee425, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/showInvalidUsernameToastNative.tsx');
exports.showInvalidUsernameToast = function() {
var defaultImport = importDefault(dependencyMap[0]);
var object = {key: 'USER_SETTINGS_UPDATE_FAILURE'};
object.content = require(dependencyMap[1]).intl.string(require(dependencyMap[1]).t['TGg/2k']);
object.icon = importDefault(dependencyMap[2]);
defaultImport.open(object);
};
}
@@ -0,0 +1,57 @@
/* Metro module 13319; source: modules/user_settings/account/native/showUserSettingsInputAlert.tsx; dependencies: [31, 33, 4496, 13320, 1962, 1244, 4596, 2] */
function _fun101474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:6, offset: 0x02216060, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/showUserSettingsInputAlert.tsx');
exports.default = showUserSettingsInputAlert;
}
function showUserSettingsInputAlert(a0) { // fn#101475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:229, offset: 0x022160ea, size: 122 bytes, params: 2, frame: 15
var environment;
const value = Object.create(environment);
const env0_0 = a0.onSubmit;
const env0_1 = a0.onSuccess;
const env0_2 = a0.onError;
const object2 = {'onSubmit': 0, 'onSuccess': 0, 'onError': 0};
silentSetPrototypeOf(object2, null, undefined);
const env0_3 = copyDataProperties({}, a0, object2, value);
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
defaultImport.openLazy({importer: importer_101476});
}
function showUserSettingsInputAlertImporter() { // fn#101476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:333, owner: showUserSettingsInputAlert.importer, offset: 0x02216164, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun101478;
});
}
function _fun101477({default: env0_0}) { // fn#101477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:365, offset: 0x022161a4, size: 23 bytes, params: 2, frame: 2
return _fun101478;
}
function _fun101478(a0) { // fn#101478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:380, offset: 0x022161bb, size: 274 bytes, params: 2, frame: 22
const binding = env0_0;
const bindingProps = {...a0};
const binding2 = env2_3;
copyDataProperties(bindingProps, binding2, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
bindingProps['cancelText'] = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']]);
string = intl.string;
const BddRzS = (require(1244) /* metro dependency 1244: indexNative */).t.BddRzS;
bindingProps['confirmText'] = Reflect.apply(string, intl, [BddRzS]);
bindingProps['confirmColor'] = binding2.confirmColor != null ? env2_3.confirmColor : (importDefault(4596) /* metro dependency 4596: Alert */).Colors.RED;
bindingProps['onSubmit'] = onSubmit;
bindingProps['onSuccess'] = onSuccess;
bindingProps['onError'] = onError;
return ((Component) => <Component {...bindingProps} />)(binding);
}