Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,66 @@
|
||||
/* Metro module 9304; source: modules/guild_profile/native/GuildProfileUtils.tsx; dependencies: [57, 4502, 1423, 8372, 5132, 2] */
|
||||
function _fun72726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9490:6, offset: 0x01d505cb, size: 147 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/GuildProfileUtils.tsx');
|
||||
exports.useProfilePrimaryColor = useProfilePrimaryColor;
|
||||
exports.getProfilePrimaryColor = getProfilePrimaryColor;
|
||||
}
|
||||
|
||||
function useProfilePrimaryColor(a0, a1) { // fn#72727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9490:228, offset: 0x01d5065e, size: 151 bytes, params: 3, frame: 16
|
||||
const value = null;
|
||||
return value == (value == a0 ? undefined : a0.brandColorPrimary) ? (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(value != a0 && value == a0.brandColorPrimary ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: a0.id,
|
||||
icon: a0.icon, size: 64}) : value, a1) : a0.brandColorPrimary;
|
||||
}
|
||||
|
||||
function getProfilePrimaryColor(a0) { // fn#72728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9490:479, offset: 0x01d506f5, size: 361 bytes, params: 2, frame: 20
|
||||
var r6;
|
||||
var saturation;
|
||||
var value4;
|
||||
var value5;
|
||||
var value7;
|
||||
var h;
|
||||
var s;
|
||||
var l;
|
||||
if (a0 != null) {
|
||||
if (a0.brandColorPrimary != null) {
|
||||
return a0.brandColorPrimary;
|
||||
}
|
||||
var value;
|
||||
var value2 = undefined;
|
||||
var guildIconURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: a0.id,
|
||||
icon: a0.icon, size: 64});
|
||||
if (guildIconURL == null) {
|
||||
return null;
|
||||
}
|
||||
(require(8372) /* metro dependency 8372: useAvatarColor */).maybeFetchColors(guildIconURL);
|
||||
var useColorStore = (require(8372) /* metro dependency 8372: useAvatarColor */).useColorStore;
|
||||
var getState = useColorStore.getState;
|
||||
var property = Reflect.apply(getState, useColorStore, []).palette[guildIconURL];
|
||||
if (property == null) {
|
||||
r6 = value2;
|
||||
} else {
|
||||
property = property[0];
|
||||
r6 = property;
|
||||
}
|
||||
if (r6 != null) {
|
||||
value4 = env0_3(r6, 3);
|
||||
property = value4[0];
|
||||
value5 = 1;
|
||||
value7 = (importDefault(5132) /* metro dependency 5132 */)({r: property, g: value4[value5],
|
||||
b: value4[2]}).toHsl();
|
||||
h = value7.h;
|
||||
s = value7.s;
|
||||
l = value7.l;
|
||||
saturation = AccessibilityStore.desaturateUserColors ? AccessibilityStore.saturation : value5;
|
||||
value = importDefault(5132) /* metro dependency 5132 */;
|
||||
value = value({h: h, s: s * saturation, l: l});
|
||||
return value.toHexString();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 9309; source: modules/guild_profile/native/components/GameIcon.tsx; dependencies: [31, 27, 33, 4501, 697, 1423, 9310, 5278, 9311, 2] */
|
||||
function _fun72747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9495:6, offset: 0x01d51df8, size: 394 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.Image;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
object4 = {gameIcon: {'width': 32, 'height': 32}};
|
||||
const object5 = {'width': 32, 'height': 32, 'borderRadius': null, 'borderWidth': 1, 'borderStyle': 'solid'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object5.borderColor = BORDER_STRONG;
|
||||
object4.gameIconImage = object5;
|
||||
const object6 = {'position': 'absolute', 'top': -4, 'right': -4, 'display': 'flex', 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'padding': 2, 'width': 18, 'height': 18};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object6.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.gameIconMask = object6;
|
||||
object4.fireIcon = {'marginTop': -1, 'width': 14, 'height': 14};
|
||||
value = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GameIcon.tsx');
|
||||
exports.default = GameIcon_72748;
|
||||
exports.useStyles = value;
|
||||
}
|
||||
|
||||
function GameIcon_72748({style, game, activityLevel, onPress}) { // fn#72748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9495:719, offset: 0x01d51f82, size: 651 bytes, params: 2, frame: 30
|
||||
var r1;
|
||||
var r0;
|
||||
var object;
|
||||
var items2;
|
||||
var PressableHighlight;
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
const r10 = game.iconHash != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGameAssetSource({id: game.id,
|
||||
hash: game.iconHash, size: 24}) : null;
|
||||
const value5 = env0_3.useCallback(function() {
|
||||
if (onPress != null) {
|
||||
onPress(game);
|
||||
}
|
||||
}, [game, onPress]);
|
||||
const level = activityLevel?.level;
|
||||
const ClanGameplayActivity = (require(9310) /* metro dependency 9310: ClanGameplayActivity */).ClanGameplayActivity;
|
||||
const HIGH = ClanGameplayActivity.HIGH;
|
||||
const value6 = level === HIGH;
|
||||
if (r10 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
if (onPress != null) {
|
||||
PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
var pressableHighlightProps = {style: [style, styles.gameIcon], onPress: value5};
|
||||
items4 = [<Image style={styles.gameIconImage} source={r10} />];
|
||||
items4[1] = value6 && <View style={styles.gameIconMask}>{((FireIcon) => <FireIcon style={styles.fireIcon} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.ORANGE_260} />)((require(9311) /* metro dependency 9311: FireIcon */).FireIcon)}</View>;
|
||||
r1 = <PressableHighlight {...pressableHighlightProps}>{items4}</PressableHighlight>;
|
||||
} else {
|
||||
var viewProps = {style: [style, styles.gameIcon]};
|
||||
items2 = [<Image style={styles.gameIconImage} source={r10} />];
|
||||
items2[1] = value6 && <View style={styles.gameIconMask}>{((FireIcon) => <FireIcon style={styles.fireIcon} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.ORANGE_330} />)((require(9311) /* metro dependency 9311: FireIcon */).FireIcon)}</View>;
|
||||
r1 = <View {...viewProps}>{items2}</View>;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
/* Metro module 9300; source: modules/guild_profile/native/components/GuildProfileActionSheet.tsx; dependencies: [57, 31, 27, 3785, 9092, 6588, 661, 33, 4501, 697, 1478, 4048, 9093, 566, 3860, 7326, 6771, 6789, 6912, 9094, 9301, 4578, 1244, 9316, 9302, 9317, 674, 6275, 4589, 6277, 6515, 2] */
|
||||
function _fun72700(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:6, offset: 0x01d4efbc, size: 389 bytes, params: 8, frame: 21
|
||||
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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.ActivityIndicator;
|
||||
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
|
||||
const guildProfileStore = importDefault(9092) /* metro dependency 9092: GuildProfileStore */;
|
||||
const env0_9 = (require(9092) /* metro dependency 9092: GuildProfileStore */).GuildProfileFetchStatus;
|
||||
const env0_10 = (require(6588) /* metro dependency 6588: GuildProfileConstants */).INVALID_ACCESS_ERROR_CODE;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = 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_14 = Reflect.apply(createStyles, value, [{loadingContainer: {paddingTop: 40},
|
||||
footerContainer: {'paddingHorizontal': 16, 'paddingVertical': 40},
|
||||
scrollView: {backgroundColor: BACKGROUND_BASE_LOW}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileActionSheet.tsx');
|
||||
exports.default = GuildProfileActionSheet;
|
||||
}
|
||||
|
||||
function GuildProfileActionSheet({guildId, context, inviteKey}) { // fn#72701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:488, offset: 0x01d4f141, size: 1359 bytes, params: 2, frame: 34
|
||||
var r12;
|
||||
var r14;
|
||||
var value12;
|
||||
var value14;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value16;
|
||||
var view;
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const {guildProfile, fetchGuildProfile,
|
||||
fetchStatus} = (require(9093) /* metro dependency 9093: useGuildProfile */).useGuildProfile(guildId);
|
||||
const errorCode = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildProfileStore],
|
||||
function() {
|
||||
return GuildProfileStore.getErrorCode(guildId);
|
||||
});
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const INTERACTIVE_TEXT_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_HOVER;
|
||||
const value5 = Reflect.apply(useToken, useTokenModule, [INTERACTIVE_TEXT_HOVER, value3]);
|
||||
const {bottomSheetRef,
|
||||
bottomSheetClose} = (require(7326) /* metro dependency 7326: useBottomSheetRef */).useBottomSheetRef();
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const GUILD_PROFILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GUILD_PROFILE;
|
||||
const analyticsLocations = defaultImport(GUILD_PROFILE).analyticsLocations;
|
||||
const moduleValue5 = useTokenModule;
|
||||
useToken = moduleValue5.useToken;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const value7 = Reflect.apply(useToken, moduleValue5, [BACKGROUND_BASE_LOW]);
|
||||
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LurkingStore], _fun72703,
|
||||
[guildId]);
|
||||
const mobileLurkerServerPreviewExperimentModule = require(6912) /* metro dependency 6912: MobileLurkerServerPreviewExperiment */;
|
||||
const useMobileLurkerServerPreview = mobileLurkerServerPreviewExperimentModule.useMobileLurkerServerPreview;
|
||||
const r11 = value8 && Reflect.apply(useMobileLurkerServerPreview, mobileLurkerServerPreviewExperimentModule,
|
||||
['GuildProfileActionSheet']).enabled;
|
||||
const {startHeight, handleContentLayout, handleFooterLayout} = useFitSheetToContent({enabled: r11,
|
||||
isContentReady: guildProfile != null, bottomSheetRef: bottomSheetRef});
|
||||
const binding = env0_4;
|
||||
binding.useEffect(_fun72710, [guildId, analyticsLocations]);
|
||||
const value11 = binding.useCallback(function() {
|
||||
fetchGuildProfile(true);
|
||||
}, [fetchGuildProfile]);
|
||||
binding.useEffect(function() {
|
||||
fetchGuildProfile();
|
||||
}, [fetchGuildProfile]);
|
||||
const NOT_FETCHED = GuildProfileFetchStatus.NOT_FETCHED;
|
||||
if (fetchStatus === NOT_FETCHED) {
|
||||
view = <View style={styles.loadingContainer}><ActivityIndicator animating size="large" /></View>;
|
||||
r12 = null;
|
||||
r14 = view;
|
||||
} else if (fetchStatus === GuildProfileFetchStatus.FETCHING) {
|
||||
view = <View style={styles.loadingContainer}><ActivityIndicator animating size="large" /></View>;
|
||||
r12 = null;
|
||||
r14 = view;
|
||||
} else if (guildProfile != null) {
|
||||
if (guildProfile == null) {
|
||||
value14 = ((Component) => <Component onRetry={value11} />)(importDefault(9316) /* metro dependency 9316: GuildProfileLoadingError */);
|
||||
r12 = <Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={bottomSheetClose} />;
|
||||
r14 = value14;
|
||||
} else {
|
||||
value12 = ((Component) => <Component guildProfile={guildProfile} isLurkerServerPreview={r11} />)(importDefault(9302) /* metro dependency 9302: GuildProfileView */);
|
||||
r12 = ((Component) => <Component profile={guildProfile} context={context} inviteKey={inviteKey} isLurkerServerPreview={r11} />)(importDefault(9317) /* metro dependency 9317: GuildProfileCTA */);
|
||||
r14 = value12;
|
||||
}
|
||||
} else if (errorCode === INVALID_ACCESS_ERROR_CODE) {
|
||||
value16 = ((Component) => <Component />)(importDefault(9301) /* metro dependency 9301: RestrictedGuildProfileView */);
|
||||
r12 = <Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={bottomSheetClose} />;
|
||||
r14 = value16;
|
||||
} else if (guildProfile == null) {
|
||||
value14 = ((Component) => <Component onRetry={value11} />)(importDefault(9316) /* metro dependency 9316: GuildProfileLoadingError */);
|
||||
r12 = <Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={bottomSheetClose} />;
|
||||
r14 = value14;
|
||||
} else {
|
||||
value12 = ((Component) => <Component guildProfile={guildProfile} isLurkerServerPreview={r11} />)(importDefault(9302) /* metro dependency 9302: GuildProfileView */);
|
||||
r12 = ((Component) => <Component profile={guildProfile} context={context} inviteKey={inviteKey} isLurkerServerPreview={r11} />)(importDefault(9317) /* metro dependency 9317: GuildProfileCTA */);
|
||||
r14 = value12;
|
||||
}
|
||||
const value19 = env0_4.useMemo(_fun72713, [value7]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {'ref': null, 'scrollable': true, 'handleDisabled': true, ref: bottomSheetRef,
|
||||
startHeight: startHeight};
|
||||
const defaultImport6 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const START = VerticalGradient.START;
|
||||
bottomSheetProps.footer = ((Component) => <Component start={START} end={{'x': 0,
|
||||
'y': 0.5}} style={styles.footerContainer} colors={value19} onLayout={r11 ? handleFooterLayout : undefined}>{r12}</Component>)(defaultImport6);
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const bottomSheetScrollView = <BottomSheetScrollView style={styles.scrollView}>{r11 ? <View onLayout={handleContentLayout}>{r14}</View> : r14}</BottomSheetScrollView>;
|
||||
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
{bottomSheetScrollView}
|
||||
<ActionSheetHeaderBar
|
||||
variant="floating"
|
||||
tabStyle={{backgroundColor: value5}}
|
||||
onPress={bottomSheetClose}
|
||||
/>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun72703() { // fn#72703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1000, offset: 0x01d4f6ad, size: 40 bytes, params: 1, frame: 12
|
||||
return guildId != null && LurkingStore.isLurking(guildId);
|
||||
}
|
||||
|
||||
function useFitSheetToContent({enabled, isContentReady, bottomSheetRef}) { // fn#72704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1122, owner: GuildProfileActionSheet.useFitSheetToContent, offset: 0x01d4f6d5, size: 321 bytes, params: 2, frame: 23
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
|
||||
const binding = env1_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [null]);
|
||||
const binding2 = env1_3;
|
||||
value = binding2(value2, 2);
|
||||
const property = value[0];
|
||||
const env0_5 = value[1];
|
||||
useState = binding.useState;
|
||||
value = binding2(Reflect.apply(useState, binding, [null]), 2);
|
||||
const property2 = value[0];
|
||||
const env0_7 = value[1];
|
||||
const env0_8 = binding.useRef(false);
|
||||
value = binding.useMemo(_fun72705, [enabled, property, property2, height]);
|
||||
const value3 = binding.useCallback(_fun72706, [enabled, isContentReady]);
|
||||
const value4 = binding.useCallback(_fun72707, [enabled]);
|
||||
binding.useEffect(_fun72708, [enabled, property, property2, bottomSheetRef]);
|
||||
return {startHeight: value, handleContentLayout: value3, handleFooterLayout: value4};
|
||||
}
|
||||
|
||||
function _fun72710() { // fn#72710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1928, offset: 0x01d4f99a, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(9094) /* metro dependency 9094: GuildProfileActionCreators */;
|
||||
value.trackGuildProfileViewed(guildId, analyticsLocations);
|
||||
}
|
||||
|
||||
function _fun72713() { // fn#72713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:2568, offset: 0x01d4f9de, size: 74 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(674) /* metro dependency 674 */;
|
||||
const binding = env0_3;
|
||||
value = value(binding);
|
||||
value = value.alpha(0);
|
||||
value = value.hex();
|
||||
return [value, binding];
|
||||
}
|
||||
|
||||
function _fun72705() { // fn#72705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1335, offset: 0x01d4f816, size: 168 bytes, params: 1, frame: 20
|
||||
if (enabled) {
|
||||
return env0_4 == null || env0_6 == null ? global.Math.round(0.65 * height) : global.Math.round(global.Math.min(0.95 * height,
|
||||
|
||||
global.Math.max(0.65 * height, env0_4 + env0_6)));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72706(a0) { // fn#72706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1465, offset: 0x01d4f8be, size: 52 bytes, params: 2, frame: 11
|
||||
if (enabled && isContentReady) {
|
||||
env0_5(a0.nativeEvent.layout.height);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72707(a0) { // fn#72707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1532, offset: 0x01d4f8f2, size: 45 bytes, params: 2, frame: 11
|
||||
if (enabled) {
|
||||
env0_7(a0.nativeEvent.layout.height);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72708() { // fn#72708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9486:1597, offset: 0x01d4f91f, size: 88 bytes, params: 1, frame: 12
|
||||
if (enabled && env0_4 != null && env0_6 != null) {
|
||||
if (!env0_8.current) {
|
||||
env0_8.current = true;
|
||||
global.requestAnimationFrame(function() {
|
||||
var current = bottomSheetRef.current;
|
||||
if (current != null) {
|
||||
current.snapToIndex(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/* Metro module 9317; source: modules/guild_profile/native/components/GuildProfileCTA.tsx; dependencies: [31, 661, 670, 33, 9318, 7622, 4080, 6947, 8879, 9320, 3972, 8926, 6720, 8919, 6946, 9321, 4578, 1244, 2] */
|
||||
function _fun72785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:6, offset: 0x01d533c8, size: 196 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AnalyticsObjects;
|
||||
const env0_5 = constantsModule.JoinGuildSources;
|
||||
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).ProfileCustomizationScrollPositions;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileCTA.tsx');
|
||||
exports.default = GuildProfileCTA;
|
||||
}
|
||||
|
||||
function GuildProfileCTA({profile, context, inviteKey, isLurkerServerPreview}) { // fn#72786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:322, offset: 0x01d5348c, size: 1498 bytes, params: 2, frame: 28
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
isLurkerServerPreview = !(isLurkerServerPreview === undefined) && isLurkerServerPreview;
|
||||
const {guildId, validInviteKey,
|
||||
ctaType} = (importDefault(9318) /* metro dependency 9318: useGuildProfileCTA */)(profile, context, inviteKey);
|
||||
const defaultImport = importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */;
|
||||
const GUILD_TAG = ProfileCustomizationScrollPositions.GUILD_TAG;
|
||||
const env0_3 = defaultImport({scrollPosition: GUILD_TAG});
|
||||
let binding = env0_3;
|
||||
const value5 = binding.useCallback(_fun72787, [guildId]);
|
||||
const value6 = binding.useCallback(_fun72788, [guildId, validInviteKey]);
|
||||
const value8 = binding.useCallback(_fun72789, [guildId,
|
||||
(importDefault(9320) /* metro dependency 9320: useGetJoinRequestGuild */)(guildId)?.applicationStatus]);
|
||||
binding = env0_3;
|
||||
const value9 = binding.useCallback(_fun72790, [guildId, value6, profile.visibility, validInviteKey]);
|
||||
const value10 = binding.useCallback(function() {
|
||||
importDefault(dependencyMap[6]).hideActionSheet('GuildProfileActionSheet:' + guildId);
|
||||
require(dependencyMap[14]).startLurking(guildId, {object: AnalyticsObjects.GUILD_PROFILE});
|
||||
}, [guildId]);
|
||||
const value11 = binding.useMemo(function() {
|
||||
return {'grow': true, 'size': 'lg', 'variant': 'active'};
|
||||
}, []);
|
||||
if (isLurkerServerPreview) {
|
||||
return ((Component) => <Component guildId={guildId} joinSource={JoinGuildSources.GUILD_PROFILE_LURKER} />)(importDefault(9321) /* metro dependency 9321: LurkerServerPreviewJoinButton */);
|
||||
}
|
||||
const CTATypes = (require(9318) /* metro dependency 9318: useGuildProfileCTA */).CTATypes;
|
||||
const IS_MEMBER = CTATypes.IS_MEMBER;
|
||||
if (IS_MEMBER === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = value5;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KLOhbO);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
const ADOPT_TAG = CTATypes.ADOPT_TAG;
|
||||
if (ADOPT_TAG === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = GuildProfileCTAOnPress;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cQDYRu);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
const HAS_APPLICATION = CTATypes.HAS_APPLICATION;
|
||||
if (HAS_APPLICATION === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = value8;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4yfIDk']);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
const APPLY_TO_JOIN = CTATypes.APPLY_TO_JOIN;
|
||||
if (APPLY_TO_JOIN === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = value9;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7XdMW2']);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
const LURK_DISCOVERABLE = CTATypes.LURK_DISCOVERABLE;
|
||||
if (LURK_DISCOVERABLE === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = value10;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XpeFYr);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
const JOIN_VIA_INVITE = CTATypes.JOIN_VIA_INVITE;
|
||||
if (JOIN_VIA_INVITE === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = value6;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XpeFYr);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
const ACCEPT_ROLES = CTATypes.ACCEPT_ROLES;
|
||||
if (ACCEPT_ROLES === ctaType) {
|
||||
var buttonProps = {...value11};
|
||||
buttonProps['onPress'] = value6;
|
||||
buttonProps['text'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MMlhsr);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun72787() { // fn#72787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:530, offset: 0x01d53a66, size: 100 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
defaultImport.hideActionSheet('GuildProfileActionSheet:' + guildId);
|
||||
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
|
||||
value.transitionToGuild(guildId);
|
||||
}
|
||||
|
||||
function _fun72788() { // fn#72788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:644, offset: 0x01d53aca, size: 131 bytes, params: 1, frame: 17
|
||||
var value2;
|
||||
var defaultImport;
|
||||
if (validInviteKey != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
defaultImport.hideActionSheet('GuildProfileActionSheet:' + guildId);
|
||||
(importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */).acceptInviteAndTransitionToInviteChannel({inviteKey: validInviteKey,
|
||||
|
||||
context: {location: 'guild_profile'}});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72789() { // fn#72789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:854, offset: 0x01d53b4d, size: 265 bytes, params: 1, frame: 15
|
||||
var moduleValue;
|
||||
var moduleValue3;
|
||||
const value2 = undefined;
|
||||
const applicationStatus = env0_5 == null ? value2 : env0_5.applicationStatus;
|
||||
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
|
||||
const SUBMITTED = GuildJoinRequestApplicationStatuses.SUBMITTED;
|
||||
if (SUBMITTED === applicationStatus) {
|
||||
moduleValue3 = require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */;
|
||||
moduleValue3.openMemberVerificationPendingAlert(guildId);
|
||||
} else if (GuildJoinRequestApplicationStatuses.REJECTED === applicationStatus) {
|
||||
(require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */).openMemberVerificationRejectedAlert({guildId: guildId,
|
||||
|
||||
canWithdraw: true});
|
||||
} else if (GuildJoinRequestApplicationStatuses.STARTED === applicationStatus) {
|
||||
moduleValue = require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */;
|
||||
moduleValue.openMemberVerificationIncompleteAlert(guildId);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun72790() { // fn#72790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:1321, offset: 0x01d53c56, size: 166 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
defaultImport.hideActionSheet('GuildProfileActionSheet:' + guildId);
|
||||
const visibility = profile.visibility;
|
||||
const GuildProfileVisibility = (require(6720) /* metro dependency 6720: GuildProfileTypes */).GuildProfileVisibility;
|
||||
const PUBLIC_WITH_RECRUITMENT = GuildProfileVisibility.PUBLIC_WITH_RECRUITMENT;
|
||||
if (visibility === PUBLIC_WITH_RECRUITMENT) {
|
||||
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
|
||||
value.openMemberVerificationModal(guildId);
|
||||
} else if (validInviteKey != null) {
|
||||
env0_4();
|
||||
} else {
|
||||
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
|
||||
value.openMemberVerificationModal(guildId);
|
||||
}
|
||||
}
|
||||
|
||||
function GuildProfileCTAOnPress() { // fn#72793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9503:1997, owner: GuildProfileCTA.onPress, offset: 0x01d53d82, size: 77 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet('GuildProfileActionSheet:' + guildId);
|
||||
env0_3();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/* Metro module 9308; source: modules/guild_profile/native/components/GuildProfileGames.tsx; dependencies: [31, 27, 33, 4501, 697, 9309, 4573, 9313, 3857, 4080, 9314, 1962, 5278, 2] */
|
||||
function _fun72739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:6, offset: 0x01d51710, size: 373 bytes, params: 8, frame: 23
|
||||
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;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
const object = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
|
||||
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
|
||||
object.backgroundColor = BACKGROUND_SCRIM;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
value = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row', 'gap': 8},
|
||||
favoriteGame: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 8},
|
||||
lastItem: {'position': 'relative', 'width': 32, 'height': 32}, lastItemOverlay: object,
|
||||
lastItemImage: {position: 'absolute'}, lastItemText: {'display': 'flex', 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'width': 32, 'height': 32}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileGames.tsx');
|
||||
exports.default = GuildProfileGames;
|
||||
exports.useStyles = value;
|
||||
}
|
||||
|
||||
function FavoriteGame({game, activityLevel}) { // fn#72740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:628, offset: 0x01d51885, size: 168 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const value2 = ((Component) => <Component game={game} activityLevel={activityLevel} />)(importDefault(9309) /* metro dependency 9309: GameIcon */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.favoriteGame}>
|
||||
{value2}
|
||||
<Text variant="text-sm/medium" color="text-subtle">
|
||||
{game.name}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildProfileGames({profile}) { // fn#72741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:953, offset: 0x01d5192d, size: 498 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const gameActivity = profile.gameActivity;
|
||||
const value3 = (importDefault(9313) /* metro dependency 9313: useGuildProfileGames */)(profile);
|
||||
const gamesToDisplay = value3.gamesToDisplay;
|
||||
const lastGameToDisplay = value3.lastGameToDisplay;
|
||||
const env0_3 = lastGameToDisplay;
|
||||
const remainingGames = value3.remainingGames;
|
||||
const value5 = lastGameToDisplay?.iconHash != null;
|
||||
const binding = env0_3;
|
||||
const value6 = binding.useMemo(_fun72742, [lastGameToDisplay, value5, remainingGames, gameActivity, styles]);
|
||||
let useCallback = binding.useCallback;
|
||||
const env0_6 = Reflect.apply(useCallback, binding, [_fun72743, []]);
|
||||
const value7 = remainingGames.length > 0;
|
||||
useCallback = binding.useCallback;
|
||||
if (gamesToDisplay == null || gamesToDisplay.length === 0) {
|
||||
return null;
|
||||
} else if (gamesToDisplay.length === 1) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<FavoriteGame game={gamesToDisplay[0]} activityLevel={gameActivity[gamesToDisplay[0].id]} />
|
||||
</View>
|
||||
);
|
||||
} else if (value7) {
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
return (
|
||||
<PressableHighlight style={styles.container} onPress={Reflect.apply(useCallback, binding, [_fun72744,
|
||||
[profile]])}>
|
||||
{gamesToDisplay.map(_fun72745)}
|
||||
{value6}
|
||||
</PressableHighlight>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{gamesToDisplay.map(_fun72746)}
|
||||
{value6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72742() { // fn#72742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:1142, offset: 0x01d51b1f, size: 387 bytes, params: 1, frame: 26
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var object2;
|
||||
var stylesBinding;
|
||||
var GameIcon;
|
||||
var lastItemImage;
|
||||
var items2;
|
||||
var value5;
|
||||
var GameIcon2;
|
||||
let lastGameToDisplayBinding = lastGameToDisplay;
|
||||
const value2 = null;
|
||||
if (value2 == lastGameToDisplayBinding) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
if (env0_5) {
|
||||
if (remainingGames.length === 0) {
|
||||
value5 = environment.__proto__;
|
||||
GameIcon2 = importDefault(9309) /* metro dependency 9309: GameIcon */;
|
||||
lastGameToDisplayBinding = lastGameToDisplay;
|
||||
r2 = <GameIcon2 game={lastGameToDisplayBinding} activityLevel={gameActivity[lastGameToDisplayBinding.id]} />;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
object2 = {};
|
||||
stylesBinding = styles;
|
||||
object2.style = stylesBinding.lastItem;
|
||||
GameIcon = importDefault(9309) /* metro dependency 9309: GameIcon */;
|
||||
lastItemImage = stylesBinding.lastItemImage;
|
||||
lastGameToDisplayBinding = lastGameToDisplay;
|
||||
items2 = [<GameIcon style={lastItemImage} game={lastGameToDisplayBinding} activityLevel={gameActivity[lastGameToDisplayBinding.id]} />];
|
||||
items2[1] = <View style={stylesBinding.lastItemOverlay} />;
|
||||
items2[2] = <View style={stylesBinding.lastItemText}>{((Text) => <Text variant="text-xs/medium" color="always-white">{'+' + remainingGames.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
r2 = <View {...object2}>{items2}</View>;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun72743({id, name}) { // fn#72743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:1507, offset: 0x01d51ca2, size: 85 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'profile-game-' + id,
|
||||
content: name});
|
||||
}
|
||||
|
||||
function _fun72744() { // fn#72744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:1605, offset: 0x01d51cf7, size: 101 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[9]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[11]);
|
||||
value = value(dependencyMap[10], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'GuildProfileGamesActionSheet{profile.id}', {profile: profile},
|
||||
'stack']);
|
||||
}
|
||||
|
||||
function _fun72745(a0) { // fn#72745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:1934, offset: 0x01d51d5c, size: 74 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component game={a0} activityLevel={gameActivity[a0.id]} key={a0.id} />)(importDefault(9309) /* metro dependency 9309: GameIcon */);
|
||||
}
|
||||
|
||||
function _fun72746(a0) { // fn#72746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9494:2031, offset: 0x01d51da6, size: 82 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component game={a0} activityLevel={gameActivity[a0.id]} onPress={env0_6} key={a0.id} />)(importDefault(9309) /* metro dependency 9309: GameIcon */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/* Metro module 9314; source: modules/guild_profile/native/components/GuildProfileGamesActionSheet.tsx; dependencies: [31, 27, 33, 4501, 9313, 7326, 1244, 4080, 9300, 1962, 6275, 6277, 6231, 6238, 9309, 2] */
|
||||
function _fun72771(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9500:6, offset: 0x01d52940, size: 209 bytes, params: 8, frame: 19
|
||||
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 env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'padding': 16,
|
||||
'paddingBottom': 48}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileGamesActionSheet.tsx');
|
||||
exports.default = GuildProfileGamesActionSheet;
|
||||
}
|
||||
|
||||
function GuildProfileGamesActionSheet({profile}) { // fn#72772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9500:318, offset: 0x01d52a11, size: 377 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const id = profile.id;
|
||||
const env0_1 = profile.gameActivity;
|
||||
const value2 = (require(9313) /* metro dependency 9313: useGuildProfileGames */).useAllGuildProfileGames(profile);
|
||||
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
|
||||
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
|
||||
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
|
||||
const name = profile.name;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value4 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.vuAVo7,
|
||||
{serverName: name}).toString();
|
||||
const value5 = env0_3.useCallback(_fun72773, [id]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<BottomSheet
|
||||
ref={bottomSheetRef}
|
||||
scrollable
|
||||
onDismiss={value5}
|
||||
startHeight={300}
|
||||
>
|
||||
<BottomSheetScrollView>
|
||||
<View style={styles.container}>
|
||||
<TableRowGroup title={value4} hasIcons>
|
||||
{value2.map(_fun72774)}
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
</BottomSheetScrollView>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun72773() { // fn#72773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9500:577, offset: 0x01d52b8a, size: 111 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[7]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[9]);
|
||||
value = value(dependencyMap[8], dependencyMap.paths);
|
||||
const idBinding = id;
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'GuildProfileActionSheet:' + idBinding, {guildId: idBinding}]);
|
||||
}
|
||||
|
||||
function _fun72774(a0) { // fn#72774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9500:897, offset: 0x01d52bf9, size: 117 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
return (
|
||||
<TableRow
|
||||
icon={((Component) => <Component game={a0} activityLevel={gameActivity[a0.id]} />)(importDefault(9309) /* metro dependency 9309: GameIcon */)}
|
||||
label={a0.name}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/* Metro module 9306; source: modules/guild_profile/native/components/GuildProfileHeader.tsx; dependencies: [31, 27, 1949, 1226, 1945, 9307, 33, 4501, 697, 566, 4119, 21, 1418, 6918, 6917, 3857, 4080, 6947, 6819, 4573, 5278, 6915, 1244, 2] */
|
||||
function _fun72731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9492:6, offset: 0x01d50a25, size: 532 bytes, params: 8, frame: 24
|
||||
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 localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const env0_8 = (require(9307) /* metro dependency 9307: GuildBadgeConstants */).getBadgeTooltip;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
object2 = {header: {'paddingHorizontal': 16, 'marginTop': -32, 'display': 'flex', 'flexDirection': 'column',
|
||||
'gap': 0}};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.avatarBackground = {'width': 86, 'height': 86, 'borderRadius': 28.666666666666668, 'backgroundColor': null,
|
||||
'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.members = {'display': 'flex', 'flexDirection': 'row', 'gap': 8};
|
||||
object2.memberCount = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
|
||||
const TEXT_STATUS_OFFLINE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_OFFLINE;
|
||||
object2.dot = {'width': 8, 'height': 8, 'borderRadius': 4, backgroundColor: TEXT_STATUS_OFFLINE};
|
||||
const TEXT_STATUS_ONLINE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_ONLINE;
|
||||
object2.dotOnline = {'width': 8, 'height': 8, 'borderRadius': 4, backgroundColor: TEXT_STATUS_ONLINE};
|
||||
object2.established = {display: 'flex'};
|
||||
object2.nameRow = {'marginTop': 4, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object2.guildName = {flexShrink: 1};
|
||||
object2.guildIcon = {'marginLeft': 8, 'height': 24, 'width': 24};
|
||||
value = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileHeader.tsx');
|
||||
exports.default = GuildProfileHeader;
|
||||
exports.useStyles = value;
|
||||
}
|
||||
|
||||
function GuildProfileHeader({profile, guildIconSource}) { // fn#72732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9492:1107, offset: 0x01d50c39, size: 1083 bytes, params: 2, frame: 35
|
||||
const styles = useStyles();
|
||||
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const guildProfileUtilsModule = require(4119) /* metro dependency 4119: GuildProfileUtils */;
|
||||
const getEstablishedDate = guildProfileUtilsModule.getEstablishedDate;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const extractTimestamp = defaultImport.extractTimestamp;
|
||||
let id = profile.id;
|
||||
const value3 = Reflect.apply(getEstablishedDate, guildProfileUtilsModule, [Reflect.apply(extractTimestamp,
|
||||
defaultImport, [id]), locale]);
|
||||
const value4 = (require(1418) /* metro dependency 1418: GuildRecordUtils */).fromGuildProfile(profile);
|
||||
const binding = env0_3;
|
||||
const value5 = binding.useCallback(_fun72734, [profile]);
|
||||
id = profile.id;
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore,
|
||||
AuthenticationStore], _fun72735, [id]);
|
||||
const value7 = binding.useCallback(_fun72736, [id, value6]);
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XXLARGE = GuildIconSizes.XXLARGE;
|
||||
const items2 = [<View style={styles.avatarBackground}><GuildIcon icon={guildIconSource} size={XXLARGE} animate value={profile.name} selected={false} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text onPress={value6 ? value7 : undefined} style={styles.guildName} accessibilityRole="header" variant="heading-xl/semibold" color="mobile-text-heading-primary" lineClamp={1}>{profile.name}</Text>;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
items2[1] = <View style={styles.nameRow}>{text}<PressableHighlight onPress={value5}>{((Component) => <Component guild={value4} style={styles.guildIcon} />)(importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */)}</PressableHighlight></View>;
|
||||
let view = <View style={styles.dotOnline} />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
view = <View style={styles.memberCount}>{view}<Text variant="text-md/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
|
||||
{membersOnline: profile.onlineCount})}</Text></View>;
|
||||
const items5 = [view];
|
||||
items5[1] = <View style={styles.memberCount}><View style={styles.dot} /><Text variant="text-md/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zRl6XR,
|
||||
{count: profile.memberCount})}</Text></View>;
|
||||
items2[2] = <View style={styles.members}>{items5}</View>;
|
||||
items2[3] = <View style={styles.established}><Text variant="text-md/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zb2Q56,
|
||||
{createdAtDate: value3})}</Text></View>;
|
||||
return (
|
||||
<View style={styles.header}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun72734() { // fn#72734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9492:1338, offset: 0x01d51074, size: 189 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const guildRecordUtilsModule = require(1418) /* metro dependency 1418: GuildRecordUtils */;
|
||||
const guildTraits = (require(6918) /* metro dependency 6918: GuildTraits */).getGuildTraits(guildRecordUtilsModule.fromGuildProfile(profile));
|
||||
const {tooltipTitle,
|
||||
tooltipSubtitle} = getBadgeTooltip((require(6917) /* metro dependency 6917: BadgeCategory */).getBadgeCategory(guildTraits),
|
||||
guildTraits.visibility);
|
||||
if (!(tooltipTitle == null && tooltipSubtitle == null)) {
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'guild-badge-tooltip',
|
||||
content: tooltipSubtitle ?? tooltipTitle});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72735() { // fn#72735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9492:1626, offset: 0x01d51131, size: 63 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const getMember = GuildMemberStore.getMember;
|
||||
const idBinding = id;
|
||||
const getId = AuthenticationStore.getId;
|
||||
return Reflect.apply(getMember, GuildMemberStore, [idBinding, Reflect.apply(getId, AuthenticationStore,
|
||||
[])])?.joinedAt != null;
|
||||
}
|
||||
|
||||
function _fun72736() { // fn#72736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9492:1729, offset: 0x01d51170, size: 105 bytes, params: 1, frame: 16
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var hideActionSheet;
|
||||
var idBinding;
|
||||
if (env0_2) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
hideActionSheet = defaultImport.hideActionSheet;
|
||||
idBinding = id;
|
||||
Reflect.apply(hideActionSheet, defaultImport, ['GuildProfileActionSheet:' + idBinding]);
|
||||
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(idBinding);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 9316; source: modules/guild_profile/native/components/GuildProfileLoadingError.tsx; dependencies: [31, 27, 33, 9302, 4048, 3860, 697, 4589, 8129, 4573, 1244, 5278, 2] */
|
||||
function _fun72783(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9502:6, offset: 0x01d53024, size: 168 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(27) /* metro dependency 27 */).View;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileLoadingError.tsx');
|
||||
exports.default = GuildProfileLoadingError;
|
||||
}
|
||||
|
||||
function GuildProfileLoadingError({onRetry}) { // fn#72784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9502:152, offset: 0x01d530cc, size: 764 bytes, params: 2, frame: 30
|
||||
const styles = (require(9302) /* metro dependency 9302: GuildProfileView */).useStyles();
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWEST]);
|
||||
let value = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(9302) /* metro dependency 9302: GuildProfileView */).DiagonalGradient;
|
||||
value = ((Component) => <Component style={styles.colorBanner} start={START} end={END} colors={(require(9302) /* metro dependency 9302: GuildProfileView */).getBackgroundForProfile(value2,
|
||||
value3)} />)(value);
|
||||
const items3 = [value];
|
||||
const object = {};
|
||||
let avatarBackground = styles.avatarBackground;
|
||||
object.style = avatarBackground;
|
||||
avatarBackground = styles.avatarBackground;
|
||||
const WarningIcon = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
|
||||
let TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING;
|
||||
items3[1] = <View style={styles.header}><View {...object}><View style={avatarBackground}><WarningIcon size="lg" color={TEXT_FEEDBACK_WARNING} /></View></View></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const DmIUGK = (require(1244) /* metro dependency 1244: indexNative */).t.DmIUGK;
|
||||
const items2 = [<Text variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
|
||||
[DmIUGK])}</Text>];
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps2 = {style: styles.error, onPress: onRetry, accessibilityRole: 'button',
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.s1fAEw)};
|
||||
TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING;
|
||||
items2[1] = <PressableOpacity {...pressableOpacityProps2}><WarningIcon size="sm" color={TEXT_FEEDBACK_WARNING} /><Text variant="text-sm/normal" color="text-feedback-warning">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tmGHjc)}</Text></PressableOpacity>;
|
||||
items3[2] = <View style={styles.body}>{items2}</View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Metro module 9315; source: modules/guild_profile/native/components/GuildProfileTraits.tsx; dependencies: [31, 27, 33, 4501, 697, 1423, 3801, 6739, 4573, 2] */
|
||||
function _fun72775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9501:6, offset: 0x01d52c6e, size: 332 bytes, params: 8, frame: 22
|
||||
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;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'display': 'flex', 'flexDirection': 'row', 'gap': 4, 'alignItems': 'center', 'paddingHorizontal': 8,
|
||||
'paddingVertical': 4, 'borderRadius': null, 'borderWidth': 1, 'borderStyle': 'solid'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object.borderColor = BORDER_SUBTLE;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row',
|
||||
'flexWrap': 'wrap', 'gap': 8}, trait: object, emojiImage: {'width': 16, 'height': 16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileTraits.tsx');
|
||||
exports.default = GuildProfileTraits;
|
||||
}
|
||||
|
||||
function TraitEmoji({emoji}) { // fn#72776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9501:487, offset: 0x01d52dba, size: 207 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
if (emoji == null) {
|
||||
return null;
|
||||
}
|
||||
const r7 = emoji.id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: emoji.id,
|
||||
animated: emoji.animated, size: 16}) : undefined;
|
||||
const defaultImport2 = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
|
||||
return ((Component) => <Component src={r7} name={defaultImport2.isCustomEmoji(emoji) ? emoji.name : emoji.surrogates} fastImageStyle={styles.emojiImage} />)(importDefault(6739) /* metro dependency 6739: Emoji */);
|
||||
}
|
||||
|
||||
function GuildProfileTraitView({trait}) { // fn#72777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9501:742, offset: 0x01d52e89, size: 151 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const traitEmoji = <TraitEmoji emoji={trait.emoji} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.trait}>
|
||||
{traitEmoji}
|
||||
<Text variant="text-sm/medium" color="text-default">
|
||||
{trait.label}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildProfileTraits({profile}) { // fn#72778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9501:1050, offset: 0x01d52f20, size: 106 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{env0_3.useMemo(_fun72779, [profile]).map(_fun72782)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun72779() { // fn#72779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9501:1114, offset: 0x01d52f8a, size: 51 bytes, params: 1, frame: 12
|
||||
return profile.traits.map(function(a0, a1) {
|
||||
var object = {};
|
||||
var concat = global.HermesInternal.concat;
|
||||
object.key = 'trait-' + a1;
|
||||
copyDataProperties(object, a0, concat);
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.label.length > 0;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun72782(a0) { // fn#72782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9501:1249, offset: 0x01d52fff, size: 37 bytes, params: 2, frame: 15
|
||||
return <GuildProfileTraitView trait={a0} key={a0.key} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/* Metro module 9302; source: modules/guild_profile/native/components/GuildProfileView.tsx; dependencies: [31, 27, 1867, 661, 33, 3866, 3868, 4501, 697, 566, 1418, 1478, 1423, 9303, 4048, 3860, 9304, 4589, 6239, 4573, 1244, 9305, 9306, 9308, 9315, 2] */
|
||||
function _fun72716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:6, offset: 0x01d4fd11, size: 587 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = getBackgroundForProfile;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.Image;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = value.Fragment;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.colorBanner = {'height': 140, 'width': '100%'};
|
||||
object2.imageBanner = {'height': 140, 'width': '100%', 'objectFit': 'cover'};
|
||||
object2.body = {'marginTop': 12, 'paddingHorizontal': 16, 'gap': 16};
|
||||
object2.error = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
|
||||
object2.buttonContainer = {marginTop: 160};
|
||||
object2.header = {'paddingHorizontal': 16, 'marginTop': -32, 'display': 'flex', 'flexDirection': 'column', 'gap': 0};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.avatarBackground = {'width': 86, 'height': 86, 'borderRadius': 28.666666666666668, 'backgroundColor': null,
|
||||
'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.restrictedAcronym = {fontSize: 24};
|
||||
object2.joinForFullAccessCard = {gap: 4};
|
||||
value = Reflect.apply(createStyles, value, [object2]);
|
||||
Object = global.Object;
|
||||
const value2 = Object.freeze({START: {'x': 0, 'y': 1}, END: {'x': 1.5, 'y': 0}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/GuildProfileView.tsx');
|
||||
exports.default = GuildProfileView;
|
||||
exports.getBackgroundForProfile = closure;
|
||||
exports.useStyles = value;
|
||||
exports.DiagonalGradient = value2;
|
||||
}
|
||||
|
||||
function getBackgroundForProfile(a0, a1) { // fn#72717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:209, offset: 0x01d4ff5c, size: 125 bytes, params: 3, frame: 16
|
||||
var r1;
|
||||
const isThemeDark2 = (require(3866) /* metro dependency 3866: themes */).isThemeDark(a0);
|
||||
let value = require(3868) /* metro dependency 3868: native */;
|
||||
if (isThemeDark2) {
|
||||
value = value.brightenColor(a1, 0.8);
|
||||
r1 = value;
|
||||
} else {
|
||||
value = value.darkenColor(a1, 0.8);
|
||||
r1 = value;
|
||||
}
|
||||
return [a1, r1];
|
||||
}
|
||||
|
||||
function GuildProfileBackground({guildProfile}) { // fn#72718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:1069, offset: 0x01d4ffd9, size: 250 bytes, params: 2, frame: 20
|
||||
var defaultImport;
|
||||
var getGuildDiscoverySplashSource;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [GuildStore];
|
||||
const value2 = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return (GuildStore.getGuild(guildProfile.id) ?? require(dependencyMap[10]).fromGuildProfile(guildProfile)).features.has(GuildFeatures.DISCOVERABLE);
|
||||
}]);
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const styles = useStyles();
|
||||
if (value2) {
|
||||
if (guildProfile.customBanner != null) {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getGuildDiscoverySplashSource = defaultImport.getGuildDiscoverySplashSource;
|
||||
object = {};
|
||||
object.id = guildProfile.id;
|
||||
object.splash = guildProfile.customBanner;
|
||||
object.size = (importDefault(9303) /* metro dependency 9303: getDevicePixelRatioWeb */)() * width;
|
||||
return (
|
||||
<Image style={styles.imageBanner} source={Reflect.apply(getGuildDiscoverySplashSource, defaultImport,
|
||||
[object])} />
|
||||
);
|
||||
}
|
||||
}
|
||||
return <GuildProfileGradient guildProfile={guildProfile} />;
|
||||
}
|
||||
|
||||
function GuildProfileGradient({guildProfile}) { // fn#72720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:1506, offset: 0x01d50138, size: 198 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value4 = (require(9304) /* metro dependency 9304: GuildProfileUtils */).useProfilePrimaryColor(guildProfile,
|
||||
Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWEST]));
|
||||
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
const START = env0_12.START;
|
||||
const END = env0_12.END;
|
||||
return ((Component) => <Component style={styles.colorBanner} start={START} end={END} colors={getBackgroundForProfile(value2,
|
||||
value4)} />)(defaultImport);
|
||||
}
|
||||
|
||||
function JoinForFullAccessCard() { // fn#72721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:1776, offset: 0x01d501fe, size: 273 bytes, params: 1, frame: 24
|
||||
const styles = useStyles();
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Card
|
||||
variant="secondary"
|
||||
border="none"
|
||||
style={styles.joinForFullAccessCard}
|
||||
>
|
||||
<Text variant="text-md/semibold" color="text-default">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.us0bE8)}
|
||||
</Text>
|
||||
<Text variant="text-sm/normal" color="text-muted">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fTtTTp)}
|
||||
</Text>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildProfileView({guildProfile, isLurkerServerPreview}) { // fn#72722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:2154, offset: 0x01d5030f, size: 473 bytes, params: 2, frame: 29
|
||||
var r9;
|
||||
var jsxRuntimeEnv0_10Binding;
|
||||
var items3;
|
||||
isLurkerServerPreview = !(isLurkerServerPreview === undefined) && isLurkerServerPreview;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_3.useMemo(_fun72723, [guildProfile]);
|
||||
const items2 = [<GuildProfileBackground guildProfile={guildProfile} />];
|
||||
items2[1] = isLurkerServerPreview && ((Component) => <Component />)(importDefault(9305) /* metro dependency 9305: ServerPreviewPill */);
|
||||
items2[2] = ((Component) => <Component profile={guildProfile} guildIconSource={value2} />)(importDefault(9306) /* metro dependency 9306: GuildProfileHeader */);
|
||||
const r11 = guildProfile.description != null && guildProfile.description.length > 0 && ((Text) => <Text variant="text-md/medium" color="text-subtle">{guildProfile.description}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
if (isLurkerServerPreview) {
|
||||
r9 = <JoinForFullAccessCard />;
|
||||
} else {
|
||||
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
items3 = [((Component) => <Component profile={guildProfile} />)(importDefault(9308) /* metro dependency 9308: GuildProfileGames */)];
|
||||
value = importDefault(9315) /* metro dependency 9315: GuildProfileTraits */;
|
||||
items3[1] = ((Component) => <Component profile={guildProfile} />)(value);
|
||||
value = <>{items3}</>;
|
||||
r9 = value;
|
||||
}
|
||||
items2[3] = <View style={styles.body}>{r11}{r9}</View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun72723() { // fn#72723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9488:2248, offset: 0x01d504e8, size: 109 bytes, params: 1, frame: 14
|
||||
let guildProfileBinding = guildProfile;
|
||||
const value2 = null;
|
||||
if (value2 == guildProfileBinding) {
|
||||
return value2;
|
||||
}
|
||||
const defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
const getGuildIconSource = defaultImport.getGuildIconSource;
|
||||
guildProfileBinding = guildProfile;
|
||||
const value = Reflect.apply(getGuildIconSource, defaultImport, [{id: guildProfileBinding.id,
|
||||
icon: guildProfileBinding.icon, size: 96, canAnimate: true}]);
|
||||
return typeof value === 'number' ? value2 : value.uri;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Metro module 9301; source: modules/guild_profile/native/components/RestrictedGuildProfileView.tsx; dependencies: [31, 27, 33, 9302, 4048, 3860, 697, 4589, 6819, 4573, 1244, 2] */
|
||||
function _fun72714(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9487:6, offset: 0x01d4fa28, size: 168 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(27) /* metro dependency 27 */).View;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/native/components/RestrictedGuildProfileView.tsx');
|
||||
exports.default = RestrictedGuildProfileView;
|
||||
}
|
||||
|
||||
function RestrictedGuildProfileView() { // fn#72715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9487:152, offset: 0x01d4fad0, size: 577 bytes, params: 1, frame: 25
|
||||
const styles = (require(9302) /* metro dependency 9302: GuildProfileView */).useStyles();
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWEST]);
|
||||
let value = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(9302) /* metro dependency 9302: GuildProfileView */).DiagonalGradient;
|
||||
value = ((Component) => <Component style={styles.colorBanner} start={START} end={END} colors={(require(9302) /* metro dependency 9302: GuildProfileView */).getBackgroundForProfile(value2,
|
||||
value3)} />)(value);
|
||||
const items2 = [value];
|
||||
value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XXLARGE = GuildIconSizes.XXLARGE;
|
||||
items2[1] = <View style={styles.header}><View style={styles.avatarBackground}>{((Component) => <Component size={XXLARGE} value="?" selected={false} textStyle={styles.restrictedAcronym} />)(value)}</View></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[2] = <View style={styles.body}><Text variant="heading-lg/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wZmueu)}</Text><Text variant="text-md/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8mfCqY'])}</Text></View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user