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,71 @@
/* Metro module 15777; source: modules/avatar/native/AddAvatarModalActionCreators.tsx; dependencies: [15778, 661, 683, 7620, 4647, 1244, 8400, 8402, 5080, 15779, 1962, 12021, 2] */
function _fun121249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15985:6, offset: 0x02542267, size: 183 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(15778) /* metro dependency 15778: AddAvatarModalConstants */).ADD_AVATAR_MODAL_KEY;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/AddAvatarModalActionCreators.tsx');
exports.handlePressNext = handlePressNext;
exports.showSkipAvatarModal = showSkipAvatarModal;
exports.openAddAvatarModal = function() {
importDefault(dependencyMap[8]).pushLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths), {},
ADD_AVATAR_MODAL_KEY);
};
}
function closeAddAvatarModal(a0) { // fn#121250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15985:152, offset: 0x0254231e, size: 79 bytes, params: 2, frame: 14
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(ADD_AVATAR_MODAL_KEY);
(require(12021) /* metro dependency 12021: NUFActionCreators */).nextOnboardingStep({skip: a0});
}
function handlePressNext(a0, a1, a2) { // fn#121251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15985:351, offset: 0x0254236d, size: 179 bytes, params: 4, frame: 21
var defaultImport;
if (a0 != null) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.USER_AVATAR_UPDATED, {default_avatar_selected: a1, is_guild_profile: false,
location: {page: 'Onboarding'}});
(require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).saveProfileAndAccountRequest({avatar: a0.imageUri,
avatar_description: a0.description});
}
if (a2 != null) {
a2();
} else {
closeAddAvatarModal(false);
}
}
function showSkipAvatarModal(a0) { // fn#121252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15985:658, offset: 0x02542420, size: 316 bytes, params: 2, frame: 20
const env0_0 = a0;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NUO_TRANSITION = AnalyticEvents.NUO_TRANSITION;
Reflect.apply(track, defaultImport, [NUO_TRANSITION, {'flow_type': 'Mobile NUX Post Reg',
'from_step': 'Skip avatar modal', 'skip_attempt': true}]);
const defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport2.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DnKHuV = t.DnKHuV;
object2.title = Reflect.apply(string, intl, [DnKHuV]);
object2.body = intl.string(t['1EPySE']);
object2.cancelText = intl.string(t['7eZ3ji']);
object2.confirmText = intl.string(t.nhJ8OC);
object2.onConfirm = onConfirm;
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport2, [object2]);
}
function showSkipAvatarModalOnConfirm() { // fn#121253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15985:1048, owner: showSkipAvatarModal.onConfirm, offset: 0x0254255c, size: 109 bytes, params: 1, frame: 17
(require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({avatar: null});
(require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).announcePendingAvatarChange('remove');
if (env0_0 != null) {
env0_0(true);
} else {
closeAddAvatarModal(true);
}
}
@@ -0,0 +1,240 @@
/* Metro module 15779; source: modules/avatar/native/components/AddAvatarModal.tsx; dependencies: [5, 57, 31, 27, 7624, 661, 33, 4501, 697, 5314, 6597, 1585, 566, 8403, 15780, 8421, 4660, 8400, 8402, 4573, 1244, 15789, 1305, 4578, 15777, 480, 5277, 5282, 5280, 2] */
function _fun121256(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:6, offset: 0x0254266b, size: 542 bytes, params: 8, frame: 27
var object3;
const env0_0 = require;
const closure = AddAvatarModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
const Fonts = value.Fonts;
const ModalAnimation = value.ModalAnimation;
const env0_8 = value.UPLOAD_MEDIUM_SIZE;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingTop': null,
'alignItems': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object5.paddingTop = NAV_BAR_HEIGHT + 32;
object3.container = object5;
object3.headerContainer = {'display': 'flex', 'alignItems': 'center'};
object3.buttonContainer = {'marginHorizontal': 16, 'marginBottom': 16};
object3.title = {'marginBottom': 8, 'textAlign': 'center'};
object3.subtitle = {textAlign: 'center'};
object3.errorContainer = {'alignSelf': 'center', 'paddingTop': 24};
const object6 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
copyDataProperties(object6, textStyles(DISPLAY_MEDIUM, RED_400, 12), undefined);
object3.errorText = object6;
const env0_11 = Reflect.apply(createStyles, value, [object3]);
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
closure.modalConfig = {animation: SLIDE_IN_OUT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/components/AddAvatarModal.tsx');
exports.default = closure;
}
function AddAvatarScreen() { // fn#121257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:724, offset: 0x02542889, size: 1068 bytes, params: 1, frame: 38
var r0;
var moduleValue2;
var createPendingImage;
const value2 = undefined;
const styles = useStyles();
const [property, env0_0] = env0_4(env0_5.useState(false), 2);
const [property2, property3] = env0_4(env0_5.useState(), 2);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserProfileSettingsStore];
const pendingAvatar = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserProfileSettingsStore.getPendingChanges().pendingAvatar;
}]);
if (property2 != null) {
moduleValue2 = require(8403) /* metro dependency 8403: RecentAvatarUtils */;
createPendingImage = moduleValue2.createPendingImage;
object = {};
object.imageUri = (require(15780) /* metro dependency 15780: PresetAvatarSelect */).DEFAULT_AVATARS[property2];
object.description = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).generateAvatarDescription();
r0 = Reflect.apply(createPendingImage, moduleValue2, [object]);
} else {
r0 = value2;
}
const r11 = r0 ?? pendingAvatar;
const videoBackgroundModule = require(8421) /* metro dependency 8421: VideoBackground */;
const value7 = videoBackgroundModule.memoizedImageSource(r11 == null ? value2 : r11.imageUri);
const items2 = [styles.container];
items2[1] = {paddingBottom: bottom > 0 ? bottom : 16};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const XQRWvR = (require(1244) /* metro dependency 1244: indexNative */).t.XQRWvR;
const items3 = [<View><Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl,
[XQRWvR])}</Text><Text style={styles.subtitle} variant="heading-deprecated-12/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fH9TLT)}</Text></View>];
items3[1] = ((Component) => <Component avatarSource={value7} showPendingAvatar={r11 != null} onSelectAvatar={function() {
return AddAvatarScreen_handleSelectAvatar.apply(this, arguments);
}} />)(importDefault(15789) /* metro dependency 15789: TouchableUploadAvatar */);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
items3[2] = <View style={styles.errorContainer}><LegacyText style={styles.errorText}>{property && intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyLlVm)}</LegacyText></View>;
const items4 = [<View style={styles.headerContainer}>{items3}</View>];
items4[1] = ((Component) => <Component onAvatarSelect={property3} selectedAvatar={property2} />)(importDefault(15780) /* metro dependency 15780: PresetAvatarSelect */);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items4[2] = <View style={styles.buttonContainer}><Button text={Reflect.apply(string, intl,
[PDTjLN])} grow onPress={onPress_121263} disabled={r11 == null} /></View>;
return (
<View style={items2}>
{items4}
</View>
);
}
function AddAvatarModal() { // fn#121264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2544, offset: 0x02542e79, size: 87 bytes, params: 1, frame: 14
const value2 = env0_5.useMemo(function() {
return _fun121266();
}, []);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator screens={value2} initialRouteName="ADD_AVATAR" />;
}
function AddAvatarScreen_handleSelectAvatar() { // fn#121258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:1142, owner: AddAvatarScreen._handleSelectAvatar, offset: 0x02542cb5, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun121260).apply(this, arguments);
}
function AddAvatarScreenOnPress() { // fn#121263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2486, owner: AddAvatarScreen.onPress, offset: 0x02542e47, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(15777) /* metro dependency 15777: AddAvatarModalActionCreators */;
return value.handlePressNext(env0_3, env0_1);
}
function _fun121265() { // fn#121265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2587, offset: 0x02542ed0, size: 17 bytes, params: 1, frame: 9
return getScreens_121266();
}
function* _fun121260() { // fn#121260, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:1203, offset: 0x02542cf5, size: 313 bytes, params: 1, frame: 22
var r4;
var match;
var binding2;
var value8;
var createPendingImage;
var binding3;
var value11;
var announcePendingAvatarChange;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = undefined;
require(false);
let binding = env3_0;
const value5 = binding(env3_2[16]);
const openImagePicker = value5.openImagePicker;
let object2 = {size: env3_8};
yield Reflect.apply(openImagePicker, value5, [object2]);
const value6 = undefined;
if (false) {
return value6;
}
const base64 = value6.base64;
if (base64 == null) {
if (base64 != null) {
binding = env3_0;
binding2 = env3_2;
value8 = binding(binding2[13]);
createPendingImage = value8.createPendingImage;
object2 = {imageUri: base64};
object2.description = binding(binding2[13]).generateAvatarDescription();
r4 = Reflect.apply(createPendingImage, value8, [object2]);
} else {
r4 = value3;
}
binding = env3_0;
binding3 = env3_2;
binding(binding3[17]).setPendingChanges({avatar: r4});
value11 = binding(binding3[18]);
announcePendingAvatarChange = value11.announcePendingAvatarChange;
r4 = r4 == null ? 'remove' : 'set';
Reflect.apply(announcePendingAvatarChange, value11, [r4]);
dependencyMap(value3);
} else {
match = base64.match;
binding = env3_0;
if (Reflect.apply(match, base64, [binding(env3_2[16]).base64GIFRegex]) != null) {
require(true);
} else {
if (base64 != null) {
binding = env3_0;
binding2 = env3_2;
value8 = binding(binding2[13]);
createPendingImage = value8.createPendingImage;
object2 = {imageUri: base64};
object2.description = binding(binding2[13]).generateAvatarDescription();
r4 = Reflect.apply(createPendingImage, value8, [object2]);
} else {
r4 = value3;
}
binding = env3_0;
binding3 = env3_2;
binding(binding3[17]).setPendingChanges({avatar: r4});
value11 = binding(binding3[18]);
announcePendingAvatarChange = value11.announcePendingAvatarChange;
r4 = r4 == null ? 'remove' : 'set';
Reflect.apply(announcePendingAvatarChange, value11, [r4]);
dependencyMap(value3);
}
}
return value3;
}
function getScreens_121266() { // fn#121266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2591, offset: 0x02542ee1, size: 130 bytes, params: 1, frame: 15
var environment;
const object = {};
const value = environment.__proto__.__proto__;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const AVATAR_UPLOAD = ImpressionNames.AVATAR_UPLOAD;
object.impressionName = AVATAR_UPLOAD;
object.headerRight = headerRight_121267;
object.headerLeft = function() {
return null;
};
object.headerTitle = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderNoTitle();
object.ignoreKeyboard = true;
object.fullscreen = true;
object.render = render_121270;
return {ADD_AVATAR: object};
}
function getScreens_121266HeaderRight() { // fn#121267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2698, owner: getScreens_121266.headerRight, offset: 0x02542f63, size: 109 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])}
onPress={onPress_121268}
/>
);
}
function getScreens_121266Render() { // fn#121270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2925, owner: getScreens_121266.render, offset: 0x02542ff5, size: 23 bytes, params: 1, frame: 13
return <AddAvatarScreen />;
}
function headerRightOnPress_121268() { // fn#121268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:2789, owner: getScreens_121266.headerRight.onPress, offset: 0x02542fd0, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (require(15777) /* metro dependency 15777: AddAvatarModalActionCreators */).showSkipAvatarModal();
}
@@ -0,0 +1,8 @@
/* Metro module 15778; source: modules/avatar/native/components/AddAvatarModalConstants.tsx; dependencies: [2] */
function _fun121255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15986:6, offset: 0x02542619, size: 82 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/components/AddAvatarModalConstants.tsx');
exports.ADD_AVATAR_MODAL_KEY = 'ADD_AVATAR_MODAL_KEY';
}
@@ -0,0 +1,122 @@
/* Metro module 15780; source: modules/avatar/native/components/PresetAvatarSelect.tsx; dependencies: [31, 27, 33, 15781, 15782, 15783, 15784, 15785, 15786, 15787, 15788, 1244, 4501, 697, 4573, 5278, 5475, 2] */
function _fun121271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15988:6, offset: 0x0254300c, size: 743 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
items2 = [importDefault(15781) /* metro dependency 15781: defaultAvatar1 */,
importDefault(15782) /* metro dependency 15782: defaultAvatar2 */,
importDefault(15783) /* metro dependency 15783: defaultAvatar3 */,
importDefault(15784) /* metro dependency 15784: defaultAvatar4 */,
importDefault(15785) /* metro dependency 15785: defaultAvatar5 */,
importDefault(15786) /* metro dependency 15786: defaultAvatar6 */,
importDefault(15787) /* metro dependency 15787: defaultAvatar7 */,
importDefault(15788) /* metro dependency 15788: defaultAvatar8 */];
const items3 = [{avatar: importDefault(15781) /* metro dependency 15781: defaultAvatar1 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t['u/VENK']);
}}];
items3[1] = {avatar: importDefault(15782) /* metro dependency 15782: defaultAvatar2 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t['pBx+d8']);
}};
items3[2] = {avatar: importDefault(15783) /* metro dependency 15783: defaultAvatar3 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.vbERmz);
}};
items3[3] = {avatar: importDefault(15784) /* metro dependency 15784: defaultAvatar4 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.Ecxz3Z);
}};
items3[4] = {avatar: importDefault(15785) /* metro dependency 15785: defaultAvatar5 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.Jb8PYM);
}};
items3[5] = {avatar: importDefault(15786) /* metro dependency 15786: defaultAvatar6 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t['3h0yoI']);
}};
items3[6] = {avatar: importDefault(15787) /* metro dependency 15787: defaultAvatar7 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.frIpZ5);
}};
items3[7] = {avatar: importDefault(15788) /* metro dependency 15788: defaultAvatar8 */, label: function() {
return require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.zpfUeg);
}};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {container: {'display': 'flex', 'alignItems': 'center', 'flex': 1},
buttonsContainer: {'display': 'flex', 'flexDirection': 'row', 'marginTop': 20,
'justifyContent': 'space-between'}};
const object3 = {'height': 48, 'width': 48};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.defaultAvatarButton = object3;
object2.defaultAvatarContainer = {'marginHorizontal': 8, 'width': 56, 'height': 56, 'padding': 2, 'borderWidth': 2,
'borderRadius': 28, 'borderColor': 'transparent', 'display': 'flex', 'alignItems': 'center',
'justifyContent': 'center'};
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.defaultAvatarSelected = {borderColor: INTERACTIVE_TEXT_ACTIVE};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/components/PresetAvatarSelect.tsx');
exports.default = PresetAvatarSelect;
exports.DEFAULT_AVATARS = items2;
exports.DEFAULT_AVATARS_WITH_LABELS = items3;
}
function DefaultAvatarButton({source, onSelect, selected, accessibilityLabel}) { // fn#121272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15988:1299, offset: 0x025432f3, size: 253 bytes, params: 2, frame: 22
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.defaultAvatarContainer];
items2[1] = selected ? styles.defaultAvatarSelected : undefined;
const object = {selected: selected};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PressableOpacity
style={items2}
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
accessibilityState={object}
accessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vw2RsD)}
onPress={onSelect}
>
{((Component) => <Component style={styles.defaultAvatarButton} source={{uri: source}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</PressableOpacity>
);
}
function PresetAvatarSelect({onAvatarSelect, selectedAvatar}) { // fn#121281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15988:1718, offset: 0x025435f0, size: 301 bytes, params: 2, frame: 24
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container} accessibilityRole="list">
<Text variant="text-sm/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yP28YL)}
</Text>
<View style={styles.buttonsContainer}>
{[0, 1, 2, 3].map(_fun121282)}
</View>
<View style={styles.buttonsContainer}>
{[4, 5, 6, 7].map(_fun121284)}
</View>
</View>
);
}
function _fun121282(a0) { // fn#121282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15988:2026, offset: 0x0254371d, size: 165 bytes, params: 2, frame: 21
const env0_0 = a0;
const {avatar, label} = env1_6[a0];
const defaultAvatarButtonBindingProps = {source: avatar, onSelect: onSelect_121283, selected: selectedAvatar === a0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultAvatarButtonBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1K8jaQ'],
{index: a0 + 1, description: label()});
return <DefaultAvatarButton {...defaultAvatarButtonBindingProps} key={a0} />;
}
function _fun121284(a0) { // fn#121284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15988:2300, offset: 0x025437c2, size: 165 bytes, params: 2, frame: 21
const env0_0 = a0;
const {avatar, label} = env1_6[a0];
const defaultAvatarButtonBindingProps = {source: avatar, onSelect: onSelect_121285, selected: selectedAvatar === a0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultAvatarButtonBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1K8jaQ'],
{index: a0 + 1, description: label()});
return <DefaultAvatarButton {...defaultAvatarButtonBindingProps} key={a0} />;
}
@@ -0,0 +1,202 @@
/* Metro module 15795; source: modules/avatar/native/components/RedesignAddAvatarModal.tsx; dependencies: [5, 57, 31, 27, 7624, 661, 33, 4501, 697, 1585, 566, 8403, 15780, 8421, 4660, 8400, 8402, 4573, 1244, 15789, 4578, 15777, 2] */
function _fun121353(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16003:6, offset: 0x025453a4, size: 494 bytes, params: 8, frame: 23
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.ScrollView;
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).UPLOAD_MEDIUM_SIZE;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = 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.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.contentContainer = {'flexGrow': 2, 'alignItems': 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.growContainer = {flexGrow: 2, minHeight: PX_24};
object2.headerContainer = {'display': 'flex', 'alignItems': 'center'};
object2.buttonContainer = {width: '100%'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.title = {marginBottom: PX_8, textAlign: 'center'};
object2.subtitle = {textAlign: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.errorContainer = {alignSelf: 'center', paddingTop: PX_24};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/components/RedesignAddAvatarModal.tsx');
exports.default = RedesignAddAvatarModal;
}
function RedesignAddAvatarModal(a0) { // fn#121354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16003:773, offset: 0x02545592, size: 1138 bytes, params: 2, frame: 37
var r0;
var moduleValue2;
var createPendingImage;
const env0_0 = a0.route.params.onComplete;
const value = undefined;
const env0_4 = value;
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, []), 2);
const property2 = value5[0];
const property3 = value5[1];
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserProfileSettingsStore];
const pendingAvatar = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserProfileSettingsStore.getPendingChanges().pendingAvatar;
}]);
if (property2 != null) {
moduleValue2 = require(8403) /* metro dependency 8403: RecentAvatarUtils */;
createPendingImage = moduleValue2.createPendingImage;
object = {};
object.imageUri = (require(15780) /* metro dependency 15780: PresetAvatarSelect */).DEFAULT_AVATARS[property2];
object.description = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).generateAvatarDescription();
r0 = Reflect.apply(createPendingImage, moduleValue2, [object]);
} else {
r0 = value;
}
const r10 = r0 ?? pendingAvatar;
const videoBackgroundModule = require(8421) /* metro dependency 8421: VideoBackground */;
const value6 = videoBackgroundModule.memoizedImageSource(r10 == null ? value : r10.imageUri);
const items2 = [styles.contentContainer];
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = bottom + PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
items2[1] = object3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const XQRWvR = (require(1244) /* metro dependency 1244: indexNative */).t.XQRWvR;
const items3 = [<View><Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl,
[XQRWvR])}</Text><Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fH9TLT)}</Text></View>];
items3[1] = ((Component) => <Component avatarSource={value6} showPendingAvatar={r10 != null} onSelectAvatar={function() {
return RedesignAddAvatarModal_handleSelectAvatar.apply(this, arguments);
}} />)(importDefault(15789) /* metro dependency 15789: TouchableUploadAvatar */);
items3[2] = <View style={styles.errorContainer}>{property && <Text variant="text-sm/medium" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyLlVm)}</Text>}</View>;
const items4 = [<View style={styles.headerContainer}>{items3}</View>];
items4[1] = ((Component) => <Component onAvatarSelect={property3} selectedAvatar={property2} />)(importDefault(15780) /* metro dependency 15780: PresetAvatarSelect */);
items4[2] = <View style={styles.growContainer} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items4[3] = <View style={styles.buttonContainer}><Button variant="primary" size="lg" text={Reflect.apply(string,
intl, [PDTjLN])} onPress={onPress_121360} disabled={r10 == null} /></View>;
return (
<ScrollView
style={styles.container}
alwaysBounceVertical={false}
contentContainerStyle={items2}
>
{items4}
</ScrollView>
);
}
function RedesignAddAvatarModal_handleSelectAvatar() { // fn#121355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16003:1228, owner: RedesignAddAvatarModal._handleSelectAvatar, offset: 0x02545a04, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun121357).apply(this, arguments);
}
function RedesignAddAvatarModalOnPress() { // fn#121360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16003:2755, owner: RedesignAddAvatarModal.onPress, offset: 0x02545b96, size: 76 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
value = require(15777) /* metro dependency 15777: AddAvatarModalActionCreators */;
return value.handlePressNext(env0_4, env0_2, onComplete ?? (function() {
}));
}
function* _fun121357() { // fn#121357, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16003:1289, offset: 0x02545a44, size: 313 bytes, params: 1, frame: 22
var r4;
var match;
var binding2;
var value8;
var createPendingImage;
var binding3;
var value11;
var announcePendingAvatarChange;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = undefined;
importDefault(false);
let binding = env3_0;
const value5 = binding(env3_2[14]);
const openImagePicker = value5.openImagePicker;
let object2 = {size: env3_9};
yield Reflect.apply(openImagePicker, value5, [object2]);
const value6 = undefined;
if (false) {
return value6;
}
const base64 = value6.base64;
if (base64 == null) {
if (base64 != null) {
binding = env3_0;
binding2 = env3_2;
value8 = binding(binding2[11]);
createPendingImage = value8.createPendingImage;
object2 = {imageUri: base64};
object2.description = binding(binding2[11]).generateAvatarDescription();
r4 = Reflect.apply(createPendingImage, value8, [object2]);
} else {
r4 = value3;
}
binding = env3_0;
binding3 = env3_2;
binding(binding3[15]).setPendingChanges({avatar: r4});
value11 = binding(binding3[16]);
announcePendingAvatarChange = value11.announcePendingAvatarChange;
r4 = r4 == null ? 'remove' : 'set';
Reflect.apply(announcePendingAvatarChange, value11, [r4]);
env2_3(value3);
} else {
match = base64.match;
binding = env3_0;
if (Reflect.apply(match, base64, [binding(env3_2[14]).base64GIFRegex]) != null) {
importDefault(true);
} else {
if (base64 != null) {
binding = env3_0;
binding2 = env3_2;
value8 = binding(binding2[11]);
createPendingImage = value8.createPendingImage;
object2 = {imageUri: base64};
object2.description = binding(binding2[11]).generateAvatarDescription();
r4 = Reflect.apply(createPendingImage, value8, [object2]);
} else {
r4 = value3;
}
binding = env3_0;
binding3 = env3_2;
binding(binding3[15]).setPendingChanges({avatar: r4});
value11 = binding(binding3[16]);
announcePendingAvatarChange = value11.announcePendingAvatarChange;
r4 = r4 == null ? 'remove' : 'set';
Reflect.apply(announcePendingAvatarChange, value11, [r4]);
env2_3(value3);
}
}
return value3;
}
@@ -0,0 +1,27 @@
/* Metro module 15794; source: modules/avatar/native/components/RedesignSkipAvatarUploadAlertModal.tsx; dependencies: [31, 33, 4500, 1244, 4500, 2] */
function _fun121351(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16002:6, offset: 0x025451a6, size: 140 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_2 = value.jsx;
const env0_3 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/components/RedesignSkipAvatarUploadAlertModal.tsx');
exports.default = RedesignSkipAvatarUploadAlertModal;
}
function RedesignSkipAvatarUploadAlertModal({onConfirm}) { // fn#121352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16002:246, offset: 0x02545232, size: 370 bytes, params: 2, frame: 26
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DnKHuV = (require(1244) /* metro dependency 1244: indexNative */).t.DnKHuV;
object2.title = Reflect.apply(string, intl, [DnKHuV]);
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1EPySE']);
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
object2.actions = <AlertActions><AlertActionButton onPress={onConfirm} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nhJ8OC)} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7eZ3ji'])} key="add-profile-picture" /></AlertActions>;
return <AlertModal {...object2} />;
}
@@ -0,0 +1,72 @@
/* Metro module 15789; source: modules/avatar/native/components/TouchableUploadAvatar.tsx; dependencies: [31, 27, 33, 4501, 697, 12636, 5278, 1244, 5475, 1305, 12066, 2] */
function _fun121294(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15997:6, offset: 0x02543b07, size: 483 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {avatarContainer: {'display': 'flex', 'paddingTop': 24}};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.defaultLogoStyle = {tintColor: INTERACTIVE_TEXT_DEFAULT, width: 96};
object2.uploadedAvatarStyle = {'width': 200, 'height': 200, 'borderRadius': 100, 'position': 'relative'};
const object5 = {'borderColor': null, 'borderStyle': 'dashed', 'borderWidth': 2, 'borderRadius': null, 'width': 200,
'height': 200, 'justifyContent': 'center', 'alignItems': 'center', 'position': 'relative',
'overflow': 'visible'};
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object5.borderColor = BORDER_MUTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.avatarWrapper = object5;
const object6 = {'backgroundColor': null, 'borderRadius': null, 'tintColor': null, 'position': 'absolute',
'right': 10, 'top': 10, 'width': 40, 'height': 40, 'flex': 1, 'justifyContent': 'center'};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object6.backgroundColor = BACKGROUND_BRAND;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.tintColor = BACKGROUND_BASE_LOW;
object2.uploadAvatarWrapper = object6;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.uploadAvatarIcon = {tintColor: WHITE, alignSelf: 'center'};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/avatar/native/components/TouchableUploadAvatar.tsx');
exports.default = TouchableUploadAvatar;
}
function TouchableUploadAvatar({avatarSource, showPendingAvatar, onSelectAvatar}) { // fn#121295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15997:914, offset: 0x02543cea, size: 409 bytes, params: 2, frame: 26
showPendingAvatar = !(showPendingAvatar === undefined) && showPendingAvatar;
const styles = useStyles();
const r10 = showPendingAvatar && avatarSource != null ? avatarSource : importDefault(12636) /* metro dependency 12636 */;
const r11 = showPendingAvatar && avatarSource != null ? styles.uploadedAvatarStyle : styles.defaultLogoStyle;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {onPress: onSelectAvatar, accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['70lEQe']);
let value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component resizeMode="contain" style={r11} source={r10} />)(value);
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
<View style={styles.avatarContainer}>
<PressableOpacity {...object}>
<View style={styles.avatarWrapper}>
{value}
<View style={styles.uploadAvatarWrapper}>
<Icon
size={MEDIUM}
source={importDefault(12066) /* metro dependency 12066 */}
style={styles.uploadAvatarIcon}
/>
</View>
</View>
</PressableOpacity>
</View>
);
}