Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,289 @@
|
||||
/* Metro module 12745; source: design/void/Avatar/native/Avatar.tsx; dependencies: [31, 27, 661, 1306, 33, 4501, 697, 10252, 12734, 12735, 7599, 8396, 12746, 7598, 12736, 4580, 10695, 10696, 2] */
|
||||
function _fun97486(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12935:6, offset: 0x0218357c, size: 321 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = getStatusSize_97487;
|
||||
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 env0_5 = (require(661) /* metro dependency 661: Constants */).StatusTypes;
|
||||
const statusConstantsModule = require(1306) /* metro dependency 1306: StatusConstants */;
|
||||
const env0_6 = statusConstantsModule.STATUS_PADDING;
|
||||
const env0_7 = statusConstantsModule.StatusSizes;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value3.jsx;
|
||||
const env0_9 = value3.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun97489);
|
||||
value = value.memo(_fun97490);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/void/Avatar/native/Avatar.tsx');
|
||||
exports.default = value;
|
||||
const AvatarSizes = (require(10252) /* metro dependency 10252: CutoutableAvatarImage */).AvatarSizes;
|
||||
exports.AvatarSizes = AvatarSizes;
|
||||
exports.getStatusSize = closure;
|
||||
}
|
||||
|
||||
function getStatusSize_97487(a0) { // fn#97487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12935:795, offset: 0x021836bd, size: 555 bytes, params: 2, frame: 14
|
||||
const AvatarSizes = (require(10252) /* metro dependency 10252: CutoutableAvatarImage */).AvatarSizes;
|
||||
const XXSMALL = AvatarSizes.XXSMALL;
|
||||
if (XXSMALL === a0) {
|
||||
return StatusSizes.SMALL;
|
||||
}
|
||||
const XSMALL = AvatarSizes.XSMALL;
|
||||
if (XSMALL === a0) {
|
||||
return StatusSizes.SMALL;
|
||||
}
|
||||
const XSMALL_20 = AvatarSizes.XSMALL_20;
|
||||
if (XSMALL_20 === a0) {
|
||||
return StatusSizes.SMALL;
|
||||
}
|
||||
const SMALL = AvatarSizes.SMALL;
|
||||
if (SMALL === a0) {
|
||||
return StatusSizes.SMALL;
|
||||
}
|
||||
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
||||
if (REFRESH_MEDIUM_32 === a0) {
|
||||
return StatusSizes.REFRESH_MEDIUM_10;
|
||||
}
|
||||
const NORMAL = AvatarSizes.NORMAL;
|
||||
if (NORMAL === a0) {
|
||||
return StatusSizes.MEDIUM;
|
||||
}
|
||||
const TABS_22 = AvatarSizes.TABS_22;
|
||||
if (TABS_22 === a0) {
|
||||
return StatusSizes.MEDIUM;
|
||||
}
|
||||
const LARGE = AvatarSizes.LARGE;
|
||||
if (LARGE === a0) {
|
||||
return StatusSizes.MEDIUM;
|
||||
}
|
||||
const LARGE_48 = AvatarSizes.LARGE_48;
|
||||
if (LARGE_48 === a0) {
|
||||
return StatusSizes.MEDIUM;
|
||||
}
|
||||
const XLARGE = AvatarSizes.XLARGE;
|
||||
if (XLARGE === a0) {
|
||||
return StatusSizes.LARGE;
|
||||
}
|
||||
const XLARGE_72 = AvatarSizes.XLARGE_72;
|
||||
if (XLARGE_72 === a0) {
|
||||
return StatusSizes.LARGE;
|
||||
}
|
||||
const XXLARGE = AvatarSizes.XXLARGE;
|
||||
if (XXLARGE === a0) {
|
||||
return StatusSizes.LARGE;
|
||||
}
|
||||
const PROFILE = AvatarSizes.PROFILE;
|
||||
if (PROFILE === a0) {
|
||||
return StatusSizes.LARGE;
|
||||
}
|
||||
const YOUBAR_60 = AvatarSizes.YOUBAR_60;
|
||||
if (YOUBAR_60 === a0) {
|
||||
return StatusSizes.LARGE;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getAvatarDecorationMargin(a0) { // fn#97488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12935:1397, offset: 0x021838e8, size: 79 bytes, params: 2, frame: 14
|
||||
let value = require(8396) /* metro dependency 8396: AvatarDecorationUtils */;
|
||||
value = value.getDecorationSizeForAvatarSize(a0);
|
||||
const styles = (require(10252) /* metro dependency 10252: CutoutableAvatarImage */).styles;
|
||||
return (value - styles[a0].width) / 2;
|
||||
}
|
||||
|
||||
function _fun97489(a0) { // fn#97489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12935:239, offset: 0x02183937, size: 232 bytes, params: 2, frame: 18
|
||||
const object2 = {status: {'position': 'absolute', 'right': -3, 'bottom': -3}};
|
||||
const STATUS_SPEAKING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_SPEAKING;
|
||||
object2.speaking = {'position': 'absolute', 'right': -2, 'bottom': -2, 'backgroundColor': 'transparent',
|
||||
'borderWidth': 4, borderColor: STATUS_SPEAKING};
|
||||
object2.stageSpeaking = {'position': 'absolute', 'right': -2, 'bottom': -2};
|
||||
const object5 = {'width': 24, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'backgroundColor': null, 'borderRadius': null, 'right': 0, 'bottom': 0};
|
||||
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
object5.backgroundColor = RED_400;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object2.voiceStatus = object5;
|
||||
const object6 = {position: 'absolute'};
|
||||
const getAvatarDecorationMarginBinding = getAvatarDecorationMargin;
|
||||
object6.top = -getAvatarDecorationMarginBinding(a0);
|
||||
object6.left = -getAvatarDecorationMarginBinding(a0);
|
||||
object2.decoration = object6;
|
||||
object2.container = {position: 'relative'};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun97490({channel, streaming, isMobileOnline, isVROnline, status, size = require(dependencyMap[7]).AvatarSizes.NORMAL, animate, speaking, avatarDecoration, mute, deaf, statusStyle, avatarStyle, style, cutout, autoStatusCutout, isStageCall, source, user, guildId, disablePlaceholder, needsOffscreenAlphaCompositing, accessible, accessibilityLabel, typing, statusSizeOverride}) { // fn#97490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12935:1526, offset: 0x02183a1f, size: 1543 bytes, params: 2, frame: 47
|
||||
var r23;
|
||||
var r7;
|
||||
var r16;
|
||||
var value14;
|
||||
var object;
|
||||
streaming = !(streaming === undefined) && streaming;
|
||||
isMobileOnline = !(isMobileOnline === undefined) && isMobileOnline;
|
||||
isVROnline = !(isVROnline === undefined) && isVROnline;
|
||||
const env0_3 = size;
|
||||
animate = !(animate === undefined) && animate;
|
||||
speaking = !(speaking === undefined) && speaking;
|
||||
isStageCall = !(isStageCall === undefined) && isStageCall;
|
||||
needsOffscreenAlphaCompositing = !(needsOffscreenAlphaCompositing === undefined) && needsOffscreenAlphaCompositing;
|
||||
typing = !(typing === undefined) && typing;
|
||||
const styles = useStyles(size);
|
||||
const {cutout, decorationCutout} = env0_3.useMemo(_fun97491, [cutoutBinding, autoStatusCutout, isMobileOnline,
|
||||
isVROnline, size, status, typing, statusSizeOverride, styles]);
|
||||
const items2 = [(require(10252) /* metro dependency 10252: CutoutableAvatarImage */).styles[size]];
|
||||
items2[1] = styles.container;
|
||||
items2[2] = style;
|
||||
if (speaking) {
|
||||
value14 = (require(10252) /* metro dependency 10252: CutoutableAvatarImage */).AVATAR_SIZE_MAP[size] + 4;
|
||||
r23 = isStageCall ? ((Component) => <Component style={[styles.stageSpeaking, {width: value14, height: value14,
|
||||
borderRadius: value14 / 2}]} />)(importDefault(12746) /* metro dependency 12746: SpeakerPulse */) : <View style={[styles.speaking,
|
||||
|
||||
{width: value14, height: value14, borderRadius: value14 / 2}]} />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
const items4 = [r23];
|
||||
items4[1] = source != null || user != null ? source != null ? ((Component) => <Component source={source} size={size} animate={animate} disablePlaceholder={disablePlaceholder} style={avatarStyle} cutout={cutoutBinding} />)(importDefault(10252) /* metro dependency 10252: CutoutableAvatarImage */) : user != null ? ((Component) => <Component user={user} guildId={guildId} size={size} animate={animate} disablePlaceholder={disablePlaceholder} style={avatarStyle} cutout={cutoutBinding} />)(importDefault(10252) /* metro dependency 10252: CutoutableAvatarImage */) : channel != null ? ((Component) => <Component channel={channel} size={size} animate={animate} disablePlaceholder={disablePlaceholder} style={avatarStyle} cutout={cutoutBinding} />)(importDefault(10252) /* metro dependency 10252: CutoutableAvatarImage */) : undefined : channel == null ? null : source != null ? ((Component) => <Component source={source} size={size} animate={animate} disablePlaceholder={disablePlaceholder} style={avatarStyle} cutout={cutoutBinding} />)(importDefault(10252) /* metro dependency 10252: CutoutableAvatarImage */) : user != null ? ((Component) => <Component user={user} guildId={guildId} size={size} animate={animate} disablePlaceholder={disablePlaceholder} style={avatarStyle} cutout={cutoutBinding} />)(importDefault(10252) /* metro dependency 10252: CutoutableAvatarImage */) : channel != null ? ((Component) => <Component channel={channel} size={size} animate={animate} disablePlaceholder={disablePlaceholder} style={avatarStyle} cutout={cutoutBinding} />)(importDefault(10252) /* metro dependency 10252: CutoutableAvatarImage */) : undefined;
|
||||
items4[2] = avatarDecoration == null ? null : ((Component) => <Component size={(require(8396) /* metro dependency 8396: AvatarDecorationUtils */).getDecorationSizeForAvatarSize(size)} avatarDecoration={avatarDecoration} decorationStyle={styles.decoration} animate={animate} cutout={decorationCutout} key={avatarDecoration.asset} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */);
|
||||
if (status == null) {
|
||||
r7 = null;
|
||||
} else if (status === StatusTypes.UNKNOWN) {
|
||||
r7 = null;
|
||||
} else {
|
||||
size = statusSizeOverride ?? getStatusSize_97487(size);
|
||||
if (size != null) {
|
||||
object = {size: size, isMobileOnline: isMobileOnline, isVROnline: isVROnline, status: status,
|
||||
streaming: streaming};
|
||||
status = styles.status;
|
||||
object.style = [status, statusStyle];
|
||||
r16 = object;
|
||||
} else {
|
||||
r16 = null;
|
||||
}
|
||||
if (r16 == null) {
|
||||
r7 = null;
|
||||
} else if (typing && user != null) {
|
||||
const StatusWithTyping = (require(12736) /* metro dependency 12736: Status */).StatusWithTyping;
|
||||
r7 = <StatusWithTyping {...r16} {...{['typing']: typing}} {...{['userId']: user.id}} />;
|
||||
} else {
|
||||
r7 = ((Component) => <Component {...r16} />)(importDefault(12736) /* metro dependency 12736: Status */);
|
||||
}
|
||||
}
|
||||
items4[3] = r7;
|
||||
items4[4] = deaf ? <View style={[styles.status,
|
||||
styles.voiceStatus]}>{((Component) => <Component size={(importDefault(4580) /* metro dependency 4580: Icon */).Sizes.REFRESH_SMALL_16} source={importDefault(10695) /* metro dependency 10695 */} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} />)(importDefault(4580) /* metro dependency 4580: Icon */)}</View> : mute ? <View style={[styles.status,
|
||||
styles.voiceStatus]}>{((Component) => <Component size={(importDefault(4580) /* metro dependency 4580: Icon */).Sizes.REFRESH_SMALL_16} source={importDefault(10696) /* metro dependency 10696 */} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} />)(importDefault(4580) /* metro dependency 4580: Icon */)}</View> : undefined;
|
||||
return (
|
||||
<View
|
||||
style={items2}
|
||||
needsOffscreenAlphaCompositing={needsOffscreenAlphaCompositing}
|
||||
accessible={accessible}
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
>
|
||||
{items4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun97491() { // fn#97491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12935:1959, offset: 0x02184026, size: 947 bytes, params: 1, frame: 29
|
||||
var r6;
|
||||
var r0;
|
||||
var r4;
|
||||
var object2;
|
||||
var padding;
|
||||
var avatarSize;
|
||||
var userStatus;
|
||||
var isMobileOnline2;
|
||||
var isVROnline2;
|
||||
var typing2;
|
||||
var statusSizeOverride2;
|
||||
var value3;
|
||||
var value4;
|
||||
var property;
|
||||
var value7;
|
||||
var value8;
|
||||
var value10;
|
||||
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
|
||||
var mobileStatusContainerRect;
|
||||
var width;
|
||||
var height;
|
||||
var vRStatusContainerRect;
|
||||
var statusTypingDimensions;
|
||||
var value16;
|
||||
var value17;
|
||||
var object3;
|
||||
var value18;
|
||||
var moduleValue4;
|
||||
if (autoStatusCutout != null) {
|
||||
object2 = {avatarSize: env0_3};
|
||||
object2.userStatus = status;
|
||||
object2.isMobileOnline = isMobileOnline;
|
||||
object2.isVROnline = isVROnline;
|
||||
object2.padding = autoStatusCutout === true ? STATUS_PADDING : autoStatusCutout.padding;
|
||||
object2.typing = typing;
|
||||
object2.statusSizeOverride = statusSizeOverride;
|
||||
avatarSize = object2.avatarSize;
|
||||
userStatus = object2.userStatus;
|
||||
isMobileOnline2 = object2.isMobileOnline;
|
||||
isVROnline2 = object2.isVROnline;
|
||||
padding = object2.padding;
|
||||
typing2 = object2.typing;
|
||||
statusSizeOverride2 = object2.statusSizeOverride;
|
||||
value3 = undefined;
|
||||
if (userStatus != null) {
|
||||
value4 = environment.__proto__;
|
||||
if (userStatus === StatusTypes.UNKNOWN) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
property = (require(10252) /* metro dependency 10252: CutoutableAvatarImage */).AVATAR_SIZE_MAP[avatarSize];
|
||||
r6 = statusSizeOverride2 ?? getStatusSize_97487(avatarSize) ?? 0;
|
||||
value7 = r6 / 4;
|
||||
if (typing2) {
|
||||
statusTypingDimensions = (require(12734) /* metro dependency 12734: StatusUtils */).getStatusTypingDimensions(r6);
|
||||
width = statusTypingDimensions.width;
|
||||
height = statusTypingDimensions.height;
|
||||
value16 = (importDefault(12735) /* metro dependency 12735: getStatusContainerStyle */)(r6,
|
||||
isMobileOnline2 != null && isMobileOnline2, isVROnline2 != null && isVROnline2);
|
||||
value17 = height + 2 * STATUS_PADDING;
|
||||
object3 = {};
|
||||
object3.shape = CutoutShape.RoundedRect;
|
||||
value18 = property - width - STATUS_PADDING;
|
||||
moduleValue4 = require(12734) /* metro dependency 12734: StatusUtils */;
|
||||
object3.x = value18 + moduleValue4.getAnimatedTypingTranslateX(value16.width);
|
||||
object3.y = property - height - STATUS_PADDING;
|
||||
object3.width = width + 2 * STATUS_PADDING;
|
||||
object3.height = value17;
|
||||
object3.cornerRadius = value17 / 2;
|
||||
r0 = {nativeCutouts: [object3]};
|
||||
} else if (isVROnline2) {
|
||||
vRStatusContainerRect = (require(12734) /* metro dependency 12734: StatusUtils */).getVRStatusContainerRect(r6);
|
||||
width = vRStatusContainerRect.width;
|
||||
height = vRStatusContainerRect.height;
|
||||
r0 = {nativeCutouts: [{shape: CutoutShape.RoundedRect, x: property - width + value7,
|
||||
y: property - height + value7,
|
||||
width: width, height: height, cornerRadius: vRStatusContainerRect.cornerRadius}]};
|
||||
} else if (isMobileOnline2) {
|
||||
mobileStatusContainerRect = (require(12734) /* metro dependency 12734: StatusUtils */).getMobileStatusContainerRect(r6);
|
||||
width = mobileStatusContainerRect.width;
|
||||
height = mobileStatusContainerRect.height;
|
||||
r0 = {nativeCutouts: [{shape: CutoutShape.RoundedRect, x: property - width + value7,
|
||||
y: property - height + value7,
|
||||
width: width, height: height, cornerRadius: mobileStatusContainerRect.cornerRadius}]};
|
||||
} else {
|
||||
value8 = r6 / 2 + padding;
|
||||
value10 = property - value8 - 2 * value7;
|
||||
r0 = {nativeCutouts: [{shape: CutoutShape.Circle, x: value10, y: value10, size: 2 * value8}]};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
r4 = r0;
|
||||
} else {
|
||||
r4 = cutout;
|
||||
}
|
||||
object2 = {cutout: r4};
|
||||
object2.decorationCutout = (require(8396) /* metro dependency 8396: AvatarDecorationUtils */).getDecorationCutoutForAvatarCutout(r4,
|
||||
-styles.decoration.top);
|
||||
return object2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user