Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,201 @@
|
||||
/* Metro module 8489; source: modules/user_profile/native/UserProfilePreview.tsx; dependencies: [57, 31, 27, 7624, 6816, 33, 4501, 697, 566, 8490, 8494, 8496, 6882, 8497, 8402, 8498, 8403, 8501, 8502, 3868, 8503, 8505, 8507, 8476, 8510, 8511, 8513, 8695, 8762, 8474, 2] */
|
||||
function _fun67343(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:6, offset: 0x01c1ee98, size: 280 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 env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
|
||||
let value = require(6816) /* metro dependency 6816: Constants */;
|
||||
const env0_7 = value.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
||||
const env0_8 = value.UserProfileThemeTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const filterLayer = function(a0) {
|
||||
return a0.responsive !== true;
|
||||
};
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67345);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfilePreview.tsx');
|
||||
exports.default = UserProfilePreview;
|
||||
}
|
||||
|
||||
function _fun67345(a0, a1, a2) { // fn#67345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:312, offset: 0x01c1efc1, size: 242 bytes, params: 4, frame: 17
|
||||
let value = a2;
|
||||
const object2 = {};
|
||||
object2.profileContainer = {'position': 'relative', 'width': '100%', maxWidth: value ?? 263};
|
||||
const object4 = {overflow: 'hidden'};
|
||||
object4.minHeight = a0 ? undefined : 350;
|
||||
value = 1;
|
||||
object4.borderWidth = a1 ? undefined : value;
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object4.borderColor = a1 ? colors.BORDER_MUTED : colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.profileContentContainer = object4;
|
||||
object2.profileInnerContent = {flexGrow: value};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.aboutMeCard = {marginTop: PX_12};
|
||||
object2.profileEffect = {zIndex: value};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function UserProfilePreview({user, accessibilityLabel, displayName, guildId, profileEffectOverride, profileEffectRestartKey, profileFrameOverride, displayNameStylesOverride, style, compact, hideFrame, maxWidth, additionalBadges = []}) { // fn#67346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:800, offset: 0x01c1f0b3, size: 2185 bytes, params: 2, frame: 62
|
||||
var profileFrame;
|
||||
var r1;
|
||||
var moduleValue5;
|
||||
compact = !(compact === undefined) && compact;
|
||||
hideFrame = !(hideFrame === undefined) && hideFrame;
|
||||
const env0_3 = undefined;
|
||||
var env0_4 = undefined;
|
||||
const {pendingAvatar, pendingBanner, pendingAccentColor, pendingThemeColors, pendingAvatarDecoration,
|
||||
pendingProfileEffect, pendingProfileFrame, pendingDisplayNameStyles, pendingGlobalName, pendingPronouns,
|
||||
pendingLegacyUsernameDisabled} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
|
||||
function() {
|
||||
return UserProfileSettingsStore.getPendingChanges(guildId);
|
||||
});
|
||||
const value6 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, guildId);
|
||||
const {theme, primaryColor,
|
||||
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
||||
displayProfile: value6, pendingThemeColors: pendingThemeColors});
|
||||
const value8 = primaryColor != null;
|
||||
const styles = useStyles(compact, value8, maxWidth);
|
||||
const value9 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
||||
const value10 = (require(6882) /* metro dependency 6882: userSettingToActivity */).useCustomStatusActivity();
|
||||
let r29 = value10 != null && !compact;
|
||||
const {gradientFallbackBackground, avatarBackground,
|
||||
containerBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
||||
const r16 = profileEffectOverride === undefined ? pendingProfileEffect : profileEffectOverride;
|
||||
const r11 = profileFrameOverride === undefined ? pendingProfileFrame : profileFrameOverride;
|
||||
const r38 = displayNameStylesOverride === undefined ? pendingDisplayNameStyles : displayNameStylesOverride;
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
let getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
let object = {pendingValue: r16};
|
||||
object.userValue = value6?.profileEffect;
|
||||
object.guildValue = value6 == null || value6._guildMemberProfile == null ? undefined : value6._guildMemberProfile.profileEffect;
|
||||
object.guildId = guildId;
|
||||
const value14 = Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule, [object]);
|
||||
if (hideFrame) {
|
||||
r1 = undefined;
|
||||
} else {
|
||||
moduleValue5 = profileCustomizationUtilsModule;
|
||||
getProfilePreviewValue = moduleValue5.getProfilePreviewValue;
|
||||
object = {pendingValue: r11};
|
||||
profileFrame = value6?.profileFrame;
|
||||
object.userValue = profileFrame;
|
||||
profileFrame = value6 == null || value6._guildMemberProfile == null ? undefined : value6._guildMemberProfile.profileFrame;
|
||||
object.guildValue = profileFrame;
|
||||
object.guildId = guildId;
|
||||
r1 = Reflect.apply(getProfilePreviewValue, moduleValue5, [object]);
|
||||
}
|
||||
const value16 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(r1?.skuId,
|
||||
'UserProfilePreview');
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
const value18 = (importDefault(8501) /* metro dependency 8501: useBadges */)(value6, pendingLegacyUsernameDisabled);
|
||||
const Set = global.Set;
|
||||
const set = new Set(value18.map(function(a0) {
|
||||
return a0.id;
|
||||
}));
|
||||
object = [];
|
||||
arraySpread(object, additionalBadges.filter(_fun67349), arraySpread(object, value18, 0, undefined), undefined);
|
||||
const binding = env0_4;
|
||||
var [property, env0_4] = env0_3(binding.useState({'width': 0, 'height': 0}), 2);
|
||||
const value25 = binding.useCallback(_fun67350, []);
|
||||
const value26 = binding.useMemo(_fun67351, [value16, property.width]);
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const items2 = [styles.profileContainer, value26, style];
|
||||
const items3 = [value16 != null && ((Component) => <Component frame={value16} filterLayer={filterLayer} profileThemeType={UserProfileThemeTypes.PREVIEW} frameOrder={(require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder.BACK} containerWidth={property.width} containerHeight={property.height} />)(importDefault(8503) /* metro dependency 8503: ProfileFrame */)];
|
||||
const UserProfileBanner = importDefault(8507) /* metro dependency 8507: UserProfileBanner */;
|
||||
const PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT = (require(8476) /* metro dependency 8476: constants */).PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT;
|
||||
const items4 = [<UserProfileBanner user={user} displayProfile={value6} bannerHeight={PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT} pendingBanner={pendingBanner} pendingAvatarSrc={pendingAvatarSrc} pendingAccentColor={pendingAccentColor ?? undefined} pendingThemeColors={pendingThemeColors ?? undefined} disableInteraction />];
|
||||
const value30 = ((Component) => <Component user={user} guildId={guildId} pendingAvatarSrc={pendingAvatarSrc} pendingAvatarDecoration={pendingAvatarDecoration} backgroundColor={avatarBackground} disableStatus />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
||||
const UserProfileGradientContainer = importDefault(8511) /* metro dependency 8511: UserProfileGradientContainer */;
|
||||
const items6 = [value9.profileContentWrapper];
|
||||
items6[1] = value9.profileContent;
|
||||
items6[2] = !r29 && ({paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING});
|
||||
r29 = r29 && ((Component) => <Component customStatusActivity={value10} themeType={UserProfileThemeTypes.PREVIEW} hasCustomProfileTheme={value8} style={value9.customStatusBubble} emojiOnlyStyle={value9.emojiOnlyCustomStatusBubble} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */);
|
||||
const items7 = [r29];
|
||||
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
||||
const PREVIEW = UserProfileThemeTypes.PREVIEW;
|
||||
items7[1] = <UserProfilePrimaryInfo user={user} themeType={PREVIEW} displayName={displayName ?? pendingGlobalName} pronouns={pendingPronouns ?? value6?.pronouns} badges={object} badgeContainerBackground={containerBackground} showBadgeToastOnPress={false} pendingDisplayNameStyles={r38} guildId={guildId} />;
|
||||
items7[2] = !compact && ((Component) => <Component userId={user.id} displayProfile={value6} themeType={UserProfileThemeTypes.PREVIEW} style={[value9.card,
|
||||
styles.aboutMeCard,
|
||||
{backgroundColor: containerBackground}]} bioLineClamp={1} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
||||
items4[1] = <View style={styles.profileInnerContent}>{value30}<UserProfileGradientContainer fallbackBackground={gradientFallbackBackground} primaryColor={primaryColor} secondaryColor={secondaryColor} containerStyle={items6}>{items7}</UserProfileGradientContainer></View>;
|
||||
items4[2] = value14 != null && ((Component) => <Component skuId={value14.skuId} style={styles.profileEffect} key={profileEffectRestartKey != null ? '' + value14.skuId + '-' + profileEffectRestartKey : value14.skuId} />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */);
|
||||
items3[1] = <View onLayout={value25} style={styles.profileContentContainer}>{items4}</View>;
|
||||
items3[2] = value16 != null && ((Component) => <Component frame={value16} filterLayer={filterLayer} profileThemeType={UserProfileThemeTypes.PREVIEW} frameOrder={(require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder.FRONT} containerWidth={property.width} containerHeight={property.height} />)(importDefault(8503) /* metro dependency 8503: ProfileFrame */);
|
||||
return (
|
||||
<ThemeContextProvider
|
||||
theme={theme}
|
||||
primaryColor={primaryColor}
|
||||
secondaryColor={secondaryColor}
|
||||
>
|
||||
<View
|
||||
style={items2}
|
||||
pointerEvents="none"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityRole="image"
|
||||
accessible
|
||||
>
|
||||
<View
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
accessibilityElementsHidden
|
||||
style={{flexShrink: 1}}
|
||||
>
|
||||
{items3}
|
||||
</View>
|
||||
</View>
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun67349({id}) { // fn#67349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2361, offset: 0x01c1f957, size: 30 bytes, params: 2, frame: 11
|
||||
const binding = env0_2;
|
||||
return !binding.has(id);
|
||||
}
|
||||
|
||||
function _fun67350(a0) { // fn#67350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2462, offset: 0x01c1f975, size: 99 bytes, params: 2, frame: 15
|
||||
const binding = env0_4;
|
||||
const object2 = {};
|
||||
let Math = global.Math;
|
||||
object2.width = Math.floor(a0.nativeEvent.layout.width);
|
||||
Math = global.Math;
|
||||
object2.height = Math.floor(a0.nativeEvent.layout.height);
|
||||
binding(object2);
|
||||
}
|
||||
|
||||
function _fun67351() { // fn#67351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2584, offset: 0x01c1f9d8, size: 170 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var value2;
|
||||
var value3;
|
||||
var overflowTop;
|
||||
var overflowBottom;
|
||||
var overflowHorizontal;
|
||||
var layers;
|
||||
var value4;
|
||||
var value5;
|
||||
if (env0_1 != null) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = (importDefault(8502) /* metro dependency 8502: scaleProfileFrame */)(env0_1, env0_3.width);
|
||||
overflowTop = value3.overflowTop;
|
||||
overflowBottom = value3.overflowBottom;
|
||||
overflowHorizontal = value3.overflowHorizontal;
|
||||
layers = env0_1.layers;
|
||||
value4 = layers.some(function(a0) {
|
||||
return a0.type === 'staple' && a0.anchor === 'top';
|
||||
});
|
||||
value5 = 0;
|
||||
layers = env0_1.layers;
|
||||
return {marginTop: value4 ? overflowTop : value5,
|
||||
marginBottom: layers.some(_fun67353) ? overflowBottom : value5,
|
||||
marginHorizontal: overflowHorizontal};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun67353(a0) { // fn#67353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8674:2795, offset: 0x01c1faa7, size: 37 bytes, params: 2, frame: 3
|
||||
return a0.type === 'staple' && a0.anchor === 'bottom';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user