Initial commit

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

No files matched your search

@@ -0,0 +1,43 @@
/* Metro module 14382; source: modules/guilds_bar/native/GuildsBar.tsx; dependencies: [31, 33, 4501, 14383, 14393, 14456, 11340, 5321, 6821, 8140, 14457, 2] */
function _fun108839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14579:6, offset: 0x0233006f, size: 208 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'position': 'relative',
'overflow': 'visible', 'flex': 1}});
value = value.memo(GuildsBar);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBar.tsx');
exports.default = value;
}
function GuildsBar({enableHome}) { // fn#108840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14579:229, offset: 0x0233013f, size: 520 bytes, params: 2, frame: 30
enableHome = !(enableHome === undefined) && enableHome;
const styles = useStyles();
const {scrollPosition, gesture, scrollerRef, fastListRef, persistantKeys,
onFastListScroll} = (importDefault(14383) /* metro dependency 14383: useGuildsBarGesture */)();
const {listProps,
listDataProps} = (importDefault(14393) /* metro dependency 14393: useGuildsBarProps */)(fastListRef);
env0_3.useEffect(_fun108841, [fastListRef]);
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
const Guilds = Profiles.Guilds;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<StartupProfiler profile={Guilds}>
<GestureDetector gesture={gesture}>
{((Component) => <Component style={styles.wrapper} collapsable={false} nativeID="guilds-bar-view">{((Component) => <Component {...listProps} {...listDataProps} {...{['ref']: fastListRef}} {...{['manualRef']: scrollerRef}} {...{['disableContentWrappers']: true}} {...{['onScroll']: onFastListScroll}} {...{['scrollPosValue']: scrollPosition}} {...{['stickySectionsVariant']: 'sticky-mount'}} {...{['optimizeListItemRender']: true}} {...{['persistantKeys']: persistantKeys}} {...{['disableRecyclingOnFullCompute']: true}} {...{['style']: enableHome ? {overflow: 'visible'} : undefined}} {...{['nativeID']: 'guilds-bar-fast-list'}} />)(importDefault(8140) /* metro dependency 8140: FastList */)}{((Component) => <Component />)(importDefault(14457) /* metro dependency 14457: GuildsBarDragPreview */)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}
</GestureDetector>
</StartupProfiler>
);
}
function _fun108841() { // fn#108841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14579:457, offset: 0x02330347, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(14456) /* metro dependency 14456: registerSidebarVisibilityMethods */;
value.registerGuildVisibilityMethod(fastListRef);
}
@@ -0,0 +1,106 @@
/* Metro module 14421; source: modules/guilds_bar/native/GuildsBarActivityIndicator.tsx; dependencies: [31, 33, 4501, 697, 6821, 1305, 9133, 9132, 6707, 8145, 10160, 14422, 9759, 14423, 6711, 14424, 8840, 8379, 14418, 2] */
function _fun109157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14618:6, offset: 0x0233fb8d, size: 452 bytes, params: 8, frame: 25
var object4;
const env0_0 = require;
const closure = getMediaIcon;
const closure2 = useActivityIndicatorState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object6 = {'position': 'absolute', 'top': -3, 'right': -3, 'justifyContent': 'center', 'width': 22,
'height': 22, 'padding': 3};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.activityWrapper = object6;
const object7 = {'justifyContent': 'center', 'width': 16, 'height': 16, 'padding': 2};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const ICON_OVERLAY_DARK = (importDefault(697) /* metro dependency 697: native */).colors.ICON_OVERLAY_DARK;
object7.backgroundColor = ICON_OVERLAY_DARK;
object4.activityIconWrapper = object7;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object4.activityIconWrapperActive = {backgroundColor: GREEN_360};
const object8 = {'width': 12, 'height': 12};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object4.activityIcon = object8;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object4]);
const value3 = value.memo(_fun109161);
value = value.memo(GuildsBarGuildActivityIndicator);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarActivityIndicator.tsx');
exports.default = value;
exports.GuildsBarActivityIndicatorBase = value3;
exports.getMediaIcon = closure;
exports.useActivityIndicatorState = closure2;
}
function getMediaIcon({audio, video, screenshare, liveStage, activeEvent, activity}) { // fn#109158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14618:1032, offset: 0x0233fd51, size: 443 bytes, params: 2, frame: 15
var r0;
var object2;
if (activeEvent) {
object2 = {};
object2.icon = (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
object2.source = importDefault(9132) /* metro dependency 9132 */;
r0 = object2;
} else if (liveStage) {
object2 = {};
object2.icon = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
object2.source = importDefault(8145) /* metro dependency 8145 */;
r0 = object2;
} else if (screenshare) {
object2 = {};
object2.icon = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
object2.source = importDefault(14422) /* metro dependency 14422 */;
r0 = object2;
} else if (video) {
object2 = {};
object2.icon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
object2.source = importDefault(14423) /* metro dependency 14423 */;
r0 = object2;
} else if (audio) {
object2 = {};
object2.icon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
object2.source = importDefault(14424) /* metro dependency 14424 */;
r0 = object2;
} else if (activity) {
object2 = {};
object2.icon = (require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon;
object2.source = importDefault(8379) /* metro dependency 8379 */;
r0 = object2;
} else {
r0 = null;
}
return r0;
}
function useActivityIndicatorState(a0) { // fn#109159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14618:1405, offset: 0x0233ff0c, size: 128 bytes, params: 2, frame: 18
const value2 = undefined;
const value3 = (importDefault(14418) /* metro dependency 14418: useGuildMediaState */)(a0);
const mediaIcon = getMediaIcon(value3);
return env0_3.useMemo(_fun109160, [mediaIcon == null ? value2 : mediaIcon.icon,
mediaIcon == null ? value2 : mediaIcon.source, value3.isCurrentUserConnected]);
}
function _fun109161({IconComponent, style, source, isCurrentUserConnected}) { // fn#109161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14618:646, offset: 0x0233ffe4, size: 306 bytes, params: 2, frame: 24
const styles = useStyles();
return ((Component) => <Component style={[styles.activityWrapper,
style]}>{((Component) => <Component style={[styles.activityIconWrapper,
isCurrentUserConnected ? styles.activityIconWrapperActive : null]}>{IconComponent != null ? <IconComponent color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} size="xxs" style={styles.activityIcon} /> : ((Icon) => <Icon source={source} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} style={styles.activityIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
}
function GuildsBarGuildActivityIndicator({guildId, style}) { // fn#109162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14618:1738, offset: 0x02340116, size: 87 bytes, params: 2, frame: 18
const {IconComponent, source, isCurrentUserConnected} = useActivityIndicatorState(guildId);
return source != null ? ((Component) => <Component IconComponent={IconComponent} style={style} source={source} isCurrentUserConnected={isCurrentUserConnected} />)(env0_6) : null;
}
function _fun109160() { // fn#109160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14618:1497, offset: 0x0233ff8c, size: 88 bytes, params: 1, frame: 6
const value2 = null;
const value3 = undefined;
const source = value2 == env0_1 ? value3 : env0_1.source;
return {IconComponent: value2 == env0_1 ? value3 : env0_1.icon, source: value2 != source ? source : value2,
isCurrentUserConnected: env0_0.isCurrentUserConnected};
}
@@ -0,0 +1,364 @@
/* Metro module 14395; source: modules/guilds_bar/native/GuildsBarAnimatedItemWrapper.tsx; dependencies: [31, 4586, 14385, 33, 4501, 697, 3860, 4508, 4577, 4017, 8141, 14396, 14374, 4013, 1244, 3869, 6821, 7599, 2] */
function _fun109011(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:6, offset: 0x023394a0, size: 391 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = UnreadIndicator;
const closure2 = renderUnreadIndicator;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(4586) /* metro dependency 4586: styleConstants */).IOS_POINTER_STYLE;
let value = require(14385) /* metro dependency 14385: GuildsBarConstants */;
const env0_5 = value.GUILD_ITEM_HIT_SLOP;
const env0_6 = value.useGuildWrapperSize;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = {'mass': 0.8, 'damping': 100, 'stiffness': 150};
const env0_10 = {'mass': 0.25, 'damping': 100, 'stiffness': 200};
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun109018);
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun109019);
object = {code: "function GuildsBarAnimatedItemWrapperTsx1(values){const{disableEntering,sharedId,id,withSpring,BAR_SPRING_PHYSICS,guildItemSize}=this.__closure;if(disableEntering||sharedId!=null&&sharedId.get()!==id){return{animations:{},initialValues:{}};}return{animations:{originY:withSpring(values.targetOriginY,BAR_SPRING_PHYSICS,'animate-always'),originX:withSpring(values.targetOriginX,BAR_SPRING_PHYSICS,'animate-always'),height:withSpring(values.targetHeight,BAR_SPRING_PHYSICS,'animate-always')},initialValues:{height:8,originY:guildItemSize/2,originX:-12}};}"};
object = {code: "function GuildsBarAnimatedItemWrapperTsx2(values){const{withSpring,BAR_SPRING_PHYSICS,transitionState,TransitionStates,cleanUp,runOnJS}=this.__closure;return{animations:{originY:withSpring(values.targetOriginY,BAR_SPRING_PHYSICS,'animate-always'),originX:withSpring(values.targetOriginX,BAR_SPRING_PHYSICS,'animate-always'),height:withSpring(values.targetHeight,BAR_SPRING_PHYSICS,'animate-always')},initialValues:{height:values.currentHeight,originY:values.currentOriginY,originX:values.currentOriginX},callback:function(finished){if(transitionState===TransitionStates.YEETED&&finished&&cleanUp!=null){runOnJS(cleanUp)();}}};}"};
object = {code: "function GuildsBarAnimatedItemWrapperTsx3(){const{withSpring,circle,guildItemSelectedBorderRadius,guildItemSize,CORNER_SPRING_PHYSICS}=this.__closure;return{borderRadius:withSpring(!circle?guildItemSelectedBorderRadius:guildItemSize/2,CORNER_SPRING_PHYSICS,'animate-always')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarAnimatedItemWrapper.tsx');
exports.default = GuildsBarAnimatedItemWrapper;
exports.useGuildsBarAnimatedWrapperStyles = useGuildsBarAnimatedWrapperStyles;
exports.UnreadIndicator = closure;
exports.renderUnreadIndicator = closure2;
}
function UnreadIndicator({selected, sharedId, id, transitionState = require(dependencyMap[7]).TransitionStates.MOUNTED, cleanUp}) { // fn#109012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:2553, offset: 0x02339627, size: 666 bytes, params: 2, frame: 28
var object2;
const env0_3 = cleanUp;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value2 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const styles = useStyles(useGuildWrapperSize());
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value4 = transitionState === MOUNTED;
const r7 = selected ? transitionState === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED ? 8 : 40 : 8;
let binding = env0_3;
const value7 = binding.useMemo(_fun109013, [r7, transitionState, styles.unreadIndicator]);
binding = env0_3;
let useCallback = binding.useCallback;
let closure = UnreadIndicatorP;
object2 = {disableEntering: value4, sharedId: sharedId, id: id};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.BAR_SPRING_PHYSICS = env0_10;
object2.guildItemSize = value2;
closure.__closure = object2;
closure.__workletHash = 404454683979;
closure.__initData = env0_13;
const value8 = Reflect.apply(useCallback, binding, [closure, [value4, sharedId, id, value2]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = UnreadIndicator_;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, BAR_SPRING_PHYSICS: env0_10,
transitionState: transitionState};
object2.TransitionStates = TransitionStates;
object2.cleanUp = cleanUp;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
closure.__closure = object2;
closure.__workletHash = 10632665703864;
closure.__initData = env0_14;
return ((Component) => <Component collapsable={false} entering={value8} layout={Reflect.apply(useCallback, binding,
[closure, [transitionState,
cleanUp]])} style={value7} pointerEvents="none" />)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function renderUnreadIndicator(a0, {selected, sharedId, id}, a2, a3) { // fn#109017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:4212, offset: 0x02339b65, size: 77 bytes, params: 5, frame: 16
return (
<UnreadIndicator
sharedId={sharedId}
id={id}
selected={selected}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function _fun109018() { // fn#109018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:320, offset: 0x02339bb2, size: 194 bytes, params: 1, frame: 16
const value = a0;
const r2 = value !== undefined ? value : 56;
const object = {'position': 'absolute', 'top': null, 'left': -4, 'height': 8, 'width': 8};
object.top = r2 / 2;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object.backgroundColor = INTERACTIVE_TEXT_ACTIVE;
return {draggedElement: {opacity: 0}, selectedBackgroundOverlay: {'position': 'absolute', 'top': 0, 'left': 0,
'right': 0, 'bottom': 0}, container: {'position': 'relative', 'overflow': 'visible'}, unreadIndicator: object,
expandedChildrenWrapper: {'position': 'absolute', 'left': null, 'top': 0, 'right': 8, 'height': null,
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', left: r2 + 16, height: r2}};
}
function _fun109019(a0, a1, a2, a3) { // fn#109019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:804, offset: 0x02339c74, size: 300 bytes, params: 5, frame: 18
const object3 = {};
const object4 = {position: 'relative'};
let GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
object4.paddingTop = GUILD_BAR_ITEM_MARGIN;
GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
object4.paddingBottom = GUILD_BAR_ITEM_MARGIN;
object4.paddingLeft = 12;
object4.height = a3;
object4.width = a2 + GUILD_ITEM_HIT_SLOP.left + GUILD_ITEM_HIT_SLOP.right;
object3.pressableWrapper = object4;
const value3 = 'transparent';
object3.itemShape = {'position': 'relative', 'width': null, 'height': null, 'overflow': 'hidden',
'justifyContent': 'center', 'alignItems': 'center', width: a2, height: a2,
backgroundColor: a1 ? value3 : (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_GUILDBAR_ICON_BACKGROUND_DEFAULT};
object3.itemShapeSelected = {backgroundColor: a0 ? a1 ? value3 : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND};
return object3;
}
function GuildsBarAnimatedItemWrapper({id, selected, unread, circle, children, externalChildren, expandedChildren, config, label, hint, draggable, cutouts, isDragTarget, dragState, isDragPreview, draggedItemSize, overState, styles, accessibilityActions, onAccessibilityAction, preventClipping, expanded, entering, exiting, layout, zIndex, sharedId}) { // fn#109020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:4760, offset: 0x02339da0, size: 1626 bytes, params: 2, frame: 50
const env0_3 = hint;
draggable = !(draggable === undefined) && draggable;
isDragTarget = !(isDragTarget === undefined) && isDragTarget;
isDragPreview = !(isDragPreview === undefined) && isDragPreview;
draggedItemSize = draggedItemSize === undefined ? 0 : draggedItemSize;
const env0_9 = styles;
preventClipping = !(preventClipping === undefined) && preventClipping;
zIndex = zIndex === undefined ? 0 : zIndex;
const value9 = useGuildWrapperSize();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value10 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const styles2 = useStyles(value9);
const env0_15 = styles2;
const value11 = (importDefault(14396) /* metro dependency 14396: usePressability */)(config);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const GUILD_ITEM_SELECTED_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_ITEM_SELECTED_BORDER_RADIUS;
const value12 = Reflect.apply(useToken, moduleValue2, [GUILD_ITEM_SELECTED_BORDER_RADIUS]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = GuildsBarAnimatedItemWrapperW;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.circle = circle;
object2.guildItemSelectedBorderRadius = value12;
object2.guildItemSize = value10;
object2.CORNER_SPRING_PHYSICS = env0_9;
closure.__closure = object2;
closure.__workletHash = 15930523896348;
closure.__initData = env0_15;
const value13 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const binding = env0_3;
const useContext = binding.useContext;
const HomeDrawerStateContext = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HomeDrawerStateContext;
const {guildsBarLabelDrawerStyle, guildsBarIconDrawerStyle, guildsBarUnreadDrawerStyle} = Reflect.apply(useContext,
binding, [HomeDrawerStateContext]);
const value15 = env0_3.useMemo(_fun109022, [isDragTarget, dragState, draggedItemSize, overState, zIndex, value9]);
const value16 = env0_3.useMemo(function() {
return [styles.pressableWrapper, isDragTarget ? styles.draggedElement : undefined, IOS_POINTER_STYLE];
}, [styles.pressableWrapper, isDragTarget, styles2.draggedElement]);
let r18 = !unread && !selected;
r18 = !r18 ? isDragTarget : r18;
r18 = !r18 ? isDragPreview : r18;
const value19 = env0_3.useMemo(_fun109024, [r18, selected, sharedId, id]);
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guilds_bar'}]).enableHome;
const env0_18 = env0_3.useRef(undefined);
env0_3.useEffect(_fun109025, [expanded]);
const value23 = env0_3.useMemo(_fun109026, [hint, draggable,
accessibilityActions != null && accessibilityActions.length > 0]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items4 = [enableHome ? styles2.container : null, value15];
const defaultImport2 = ReanimatedNativeView;
const r12 = enableHome ? guildsBarIconDrawerStyle : null;
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const defaultImport3Props = {...value11};
defaultImport3Props['style'] = value16;
defaultImport3Props['accessibilityLabel'] = label;
defaultImport3Props['accessible'] = true;
defaultImport3Props['accessibilityRole'] = 'button';
defaultImport3Props['accessibilityState'] = {selected: selected, expanded: expanded};
defaultImport3Props['hitSlop'] = GUILD_ITEM_HIT_SLOP;
defaultImport3Props['accessibilityHint'] = value23.length > 0 ? value23 : undefined;
defaultImport3Props['collapsable'] = false;
defaultImport3Props['accessibilityActions'] = accessibilityActions;
defaultImport3Props['onAccessibilityAction'] = onAccessibilityAction;
const items2 = [externalChildren];
const defaultImport4 = ReanimatedNativeView;
const items3 = [{position: 'absolute'}];
items3[1] = enableHome ? guildsBarUnreadDrawerStyle : null;
const TransitionItem = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionItem;
items2[1] = ((Component) => <Component style={items3}><TransitionItem item={value19} renderItem={renderUnreadIndicator} /></Component>)(defaultImport4);
const ClipViewAnimated = (require(7599) /* metro dependency 7599: ClipView */).ClipViewAnimated;
items2[2] = <ClipViewAnimated style={[styles.itemShape,
value13]} cutouts={cutouts}><NativeView pointerEvents="none" style={[styles2.selectedBackgroundOverlay,
selected ? styles.itemShapeSelected : null]} />{!isDragTarget && children}</ClipViewAnimated>;
return (
<ReanimatedNativeView
style={items4}
layout={layout}
entering={entering}
exiting={exiting}
preventClipping={preventClipping}
collapsable={false}
>
{((Component) => <Component style={r12}><NativeView {...defaultImport3Props}>{items2}</NativeView></Component>)(defaultImport2)}
{enableHome ? <ReanimatedNativeView {...value11} {...{['style']: [styles2.expandedChildrenWrapper,
guildsBarLabelDrawerStyle]}}>{expandedChildren}</ReanimatedNativeView> : null}
</ReanimatedNativeView>
);
}
function useGuildsBarAnimatedWrapperStyles() { // fn#109027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:7576, offset: 0x0233a70c, size: 129 bytes, params: 1, frame: 20
const value = a0;
const r0 = value !== undefined ? value : {};
let disableSelectedColor = r0.disableSelectedColor;
disableSelectedColor = !(disableSelectedColor === undefined) && disableSelectedColor;
let disableBGColor = r0.disableBGColor;
disableBGColor = !(disableBGColor === undefined) && disableBGColor;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
return useStyles(disableSelectedColor, disableBGColor, Reflect.apply(useToken, useTokenModule,
[GUILD_BAR_ITEM_SIZE]), useGuildWrapperSize());
}
function _fun109013() { // fn#109013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:2851, offset: 0x023398c1, size: 120 bytes, params: 1, frame: 14
const items2 = [styles.unreadIndicator];
const object2 = {height: env0_7, marginTop: env0_7 / 2 * -1};
const binding = env0_2;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
object2.marginLeft = binding !== YEETED ? 0 : -4;
items2[1] = object2;
return items2;
}
function UnreadIndicatorP(a0) { // fn#109014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:3001, owner: UnreadIndicator.p, offset: 0x02339939, size: 247 bytes, params: 2, frame: 24
var object;
var object3;
var value3;
if (env0_6) {
object = {animations: {}, initialValues: {}};
} else if (sharedId == null) {
object3 = {};
value3 = environment.__proto__;
object3.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(a0.targetOriginY, env1_10,
'animate-always');
object3.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(a0.targetOriginX, env1_10,
'animate-always');
object3.height = (require(4577) /* metro dependency 4577: spring */).withSpring(a0.targetHeight, env1_10,
'animate-always');
object = {animations: object3, initialValues: {'height': 8, 'originY': null, 'originX': -12,
originY: env0_4 / 2}};
} else if (sharedId.get() !== id) {
object = {animations: {}, initialValues: {}};
} else {
object3 = {};
value3 = environment.__proto__;
object3.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(a0.targetOriginY, env1_10,
'animate-always');
object3.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(a0.targetOriginX, env1_10,
'animate-always');
object3.height = (require(4577) /* metro dependency 4577: spring */).withSpring(a0.targetHeight, env1_10,
'animate-always');
object = {animations: object3, initialValues: {'height': 8, 'originY': null, 'originX': -12,
originY: env0_4 / 2}};
}
return object;
}
function UnreadIndicator_({targetOriginY, targetOriginX, targetHeight, currentHeight, currentOriginY, currentOriginX}) { // fn#109015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:3521, owner: UnreadIndicator._, offset: 0x02339a30, size: 196 bytes, params: 2, frame: 23
const object = {};
object.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY, env1_10,
'animate-always');
object.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX, env1_10,
'animate-always');
object.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight, env1_10,
'animate-always');
return {animations: object, initialValues: {height: currentHeight, originY: currentOriginY,
originX: currentOriginX}, callback: callback_109016};
}
function GuildsBarAnimatedItemWrapperW() { // fn#109021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:5358, owner: GuildsBarAnimatedItemWrapper.W, offset: 0x0233a3fa, size: 82 bytes, params: 1, frame: 17
const springModule = require(4577) /* metro dependency 4577: spring */;
return {borderRadius: springModule.withSpring(circle ? env0_14 / 2 : env0_16, env1_9, 'animate-always')};
}
function _fun109022() { // fn#109022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:5751, offset: 0x0233a44c, size: 182 bytes, params: 1, frame: 7
const r4 = isDragTarget ? dragState !== 'dragging' ? overState == null || overState === 'self' ? 'none' : dragState === 'dragging' ? 'drag-target' : 'none' : overState !== 'self' ? 'hide' : overState == null || overState === 'self' ? 'none' : dragState === 'dragging' ? 'drag-target' : 'none' : overState == null || overState === 'self' ? 'none' : dragState === 'dragging' ? 'drag-target' : 'none';
const value7 = 0;
return {height: r4 === 'drag-target' ? env0_13 + draggedItemSize : r4 === 'hide' ? 0 : env0_13,
top: r4 !== 'drag-target' ? value7 : overState === 'before' ? draggedItemSize : overState !== 'convert-before' ? value7 : draggedItemSize,
zIndex: zIndex};
}
function _fun109024() { // fn#109024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:6135, offset: 0x0233a53b, size: 44 bytes, params: 1, frame: 3
if (env0_17) {
return undefined;
}
return {selected: selected, sharedId: sharedId, id: id};
}
function _fun109025() { // fn#109025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:6314, offset: 0x0233a567, size: 195 bytes, params: 1, frame: 17
var expandedBinding;
var value2;
var intl;
var string;
var t;
let current = env0_18.current;
if (current !== undefined) {
current = env0_18.current;
expandedBinding = expanded;
if (current !== expandedBinding) {
value2 = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl.string;
expandedBinding = expanded;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(Reflect.apply(string,
intl, [expandedBinding ? t.CUnsOR : t.jsudFd]));
env0_18.current = expanded;
}
} else {
env0_18.current = expanded;
}
}
function _fun109026() { // fn#109026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:6552, offset: 0x0233a62a, size: 226 bytes, params: 1, frame: 17
var push;
var value4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [];
if (hint != null && hint.length > 0) {
items2.push(hint);
}
if (draggable) {
push = items2.push;
value4 = environment.__proto__;
Reflect.apply(push, items2, [intl.string(t.BGMUFB)]);
}
if (env0_19) {
push = items2.push;
value = environment.__proto__;
Reflect.apply(push, items2, [intl.string(t.X2x0MF)]);
}
return items2.join('. ');
}
function _Callback(a0) { // fn#109016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14592:3829, owner: UnreadIndicator._.callback, offset: 0x02339af4, size: 113 bytes, params: 2, frame: 15
let value = a0;
const binding = env1_2;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (binding === YEETED && value && cleanUp != null) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(cleanUp)();
}
}
@@ -0,0 +1,45 @@
/* Metro module 14385; source: modules/guilds_bar/native/GuildsBarConstants.tsx; dependencies: [3860, 697, 2] */
function _fun108897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14582:6, offset: 0x02333f0c, size: 344 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {MESSAGES: 0};
object2[0] = 'MESSAGES';
object2.FAVORITES = 1;
object2[1] = 'FAVORITES';
object2.PENDING_JOIN_REQUESTS = 2;
object2[2] = 'PENDING_JOIN_REQUESTS';
object2.LURKING_GUILDS = 3;
object2[3] = 'LURKING_GUILDS';
object2.GUEST_GUILDS = 4;
object2[4] = 'GUEST_GUILDS';
object2.UNREAD_PRIVATE_CHANNELS = 5;
object2[5] = 'UNREAD_PRIVATE_CHANNELS';
object2.SEPARATOR = 6;
object2[6] = 'SEPARATOR';
object2.GUILDS = 7;
object2[7] = 'GUILDS';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarConstants.tsx');
exports.GUILD_ITEM_SIZE = 48;
exports.GUILD_LIST_WIDTH = 72;
exports.GUILD_ITEM_EMPTY_SRC = {uri: 'invalid'};
exports.GUILD_ITEM_HIT_SLOP = {'top': 4, 'left': 12, 'bottom': 4, 'right': 12};
exports.GUILD_ITEM_BADGE_SIZE = 16;
exports.useGuildWrapperSize = useGuildWrapperSize;
exports.FastListRenderSections = object2;
exports.FOLDER_SPRING_PHYSICS = {'mass': 0.5, 'damping': 30, 'stiffness': 300};
exports.TRANSITION_PHYSICS = {'mass': 0.5, 'damping': 15, 'stiffness': 120};
}
function useGuildWrapperSize() { // fn#108898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14582:685, offset: 0x02334064, size: 129 bytes, params: 1, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
return value + 2 * Reflect.apply(useToken, moduleValue2, [GUILD_BAR_ITEM_MARGIN]);
}
@@ -0,0 +1,283 @@
/* Metro module 14445; source: modules/guilds_bar/native/GuildsBarCreateJoinButton.tsx; dependencies: [57, 5, 31, 27, 14162, 1226, 3969, 661, 1376, 1880, 33, 14395, 4508, 4501, 14446, 10748, 1962, 12025, 6823, 7882, 6789, 12558, 6947, 1478, 1357, 3860, 697, 566, 1423, 1457, 1365, 7013, 14447, 14448, 1244, 478, 2] */
function _fun109300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:6, offset: 0x023452ba, size: 442 bytes, params: 8, frame: 20
const env0_0 = require;
const renderUnreadIndicatorNoEntering = function(a0, a1, a2, a3) {
var value = a2;
var moduleValue = require(dependencyMap[11]);
return moduleValue.renderUnreadIndicator(a0, a1,
value !== require(dependencyMap[12]).TransitionStates.ENTERED ? value : require(dependencyMap[12]).TransitionStates.MOUNTED,
a3);
};
const closure = function() {
return _handleCreateJoinGuildPress.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const mobileGameCommunitiesStore = importDefault(14162) /* metro dependency 14162: MobileGameCommunitiesStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.AnalyticsPages;
const env0_11 = constantsModule.DM_WIDTH;
const env0_12 = constantsModule.TooltipNames;
const env0_13 = constantsModule.UpsellTypes;
const env0_14 = constantsModule.MOBILE_GUILD_UPSELL_LIST;
const env0_15 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const env0_16 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_17 = value3.jsx;
const env0_18 = value3.jsxs;
const env0_19 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
var object = {};
var value = 0;
object.marginOverrides = {marginTop: value};
var object3 = {'position': 'absolute', 'left': null, 'top': 0};
object3.left = -(DM_WIDTH - require(dependencyMap[14]).BG_CONTAINER_SIZE) / 2 - (a0 ? value : 1);
object.guildIndicator = object3;
return object;
});
value = value.memo(GuildsBarCreateJoinButton);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarCreateJoinButton.tsx');
exports.default = value;
exports.handleCreateJoinGuildPress = closure;
}
function _handleCreateJoinGuildPress() { // fn#109303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:789, offset: 0x023454e4, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun109305).apply(this, arguments);
}
function GuildsBarCreateJoinButton() { // fn#109307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:1468, offset: 0x02345746, size: 1013 bytes, params: 1, frame: 29
const height = importDefault(dependencyMap[23])().height;
const value2 = importDefault(dependencyMap[24])('GuildsBarCreateJoinButton');
const moduleValue = require(dependencyMap[25]);
const useToken = moduleValue.useToken;
const GUILD_BAR_ITEM_SIZE = importDefault(dependencyMap[26]).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value3 = Reflect.apply(useToken, moduleValue, [GUILD_BAR_ITEM_SIZE]);
const GameCommunityUpsellMultiExperiment = require(dependencyMap[21]).GameCommunityUpsellMultiExperiment;
const useConfig = GameCommunityUpsellMultiExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GameCommunityUpsellMultiExperiment,
[{location: 'GuildsBarCreateJoinButton'}]).enabled;
const value4 = require(dependencyMap[27]).useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId() === MOBILE_GUILD_UPSELL_LIST;
});
const env0_3 = value4;
const styles = useStyles(value4);
const value5 = require(dependencyMap[27]).useStateFromStoresArray([MobileGameCommunitiesStore], _fun109309);
const value6 = require(dependencyMap[27]).useStateFromStores([AuthenticationStore], _fun109310);
const env0_5 = value6;
let binding = env0_5;
let useMemo = binding.useMemo;
const value7 = Reflect.apply(useMemo, binding, [_fun109311, [enabled, value5, value3]]);
let r17 = value7 != null && value7.length >= 2;
binding = env0_5;
useMemo = binding.useMemo;
const value12 = env0_3(require(dependencyMap[31]).useSelectedDismissibleContent(Reflect.apply(useMemo, binding,
[_fun109313, [value6, r17]])), 2);
const property = value12[0];
const property2 = value12[1];
r17 = r17 && property != null;
binding = env0_5;
const [property3, env0_10] = env0_3(binding.useState(false), 2);
const value16 = binding.useRef(null);
const env0_12 = binding.useRef(null);
const env0_13 = binding.useRef(null);
const env0_14 = binding.useRef(false);
const value17 = binding.useCallback(_fun109314, []);
binding.useEffect(_fun109315, [r17, height]);
const value18 = binding.useCallback(_fun109320, [enabled, property, property2]);
const value19 = binding.useMemo(_fun109321, [value4, enabled]);
const defaultImport2 = importDefault(dependencyMap[14]);
const defaultImport2Props = {iconSource: importDefault(value2 ? dependencyMap[32] : dependencyMap[33]),
backgroundIcons: value7, isExpanded: property3, onPress: value18};
const intl = require(dependencyMap[34]).intl;
defaultImport2Props.accessibilityLabel = intl.string(require(dependencyMap[34]).t.l5WIbf);
defaultImport2Props.selected = value4;
defaultImport2Props.style = styles.marginOverrides;
const defaultImport22 = ((Component) => <Component {...defaultImport2Props} />)(defaultImport2);
const TransitionItem = require(dependencyMap[12]).TransitionItem;
const moduleValue6 = require(dependencyMap[35]);
return (
<View ref={value16} onLayout={value17}>
{defaultImport22}
<View style={styles.guildIndicator}>
<TransitionItem
item={value19}
renderItem={moduleValue6.isAndroid() ? renderUnreadIndicatorNoEntering : require(dependencyMap[11]).renderUnreadIndicator}
/>
</View>
</View>
);
}
function* _fun109305() { // fn#109305, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:866, offset: 0x02345521, size: 443 bytes, params: 1, frame: 21
var GameCommunityUpsellMultiExperiment;
var object2;
var binding4;
var value11;
var handleShowUpsellAlert;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var value3 = binding(binding2[16]);
var property = binding2[15];
yield value3(property, binding2.paths);
var value4 = undefined;
if (false) {
return value4;
}
property = value4.default;
binding = env2_0;
var binding3 = env2_2;
yield binding(binding3[16])(binding3[17], binding3.paths);
var value7 = undefined;
if (false) {
return value7;
}
var property3 = value7.default;
var acknowledgeTooltip = property.acknowledgeTooltip;
var GUILD_TOOLTIP = env2_12.GUILD_TOOLTIP;
Reflect.apply(acknowledgeTooltip, property, [GUILD_TOOLTIP]);
var value9 = env2_0(env2_2[18]);
if (value9.isAtGuildCapAndNonPremium()) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[19]);
handleShowUpsellAlert = value11.handleShowUpsellAlert;
object2 = {};
object2.initialUpsellKey = env2_13.GUILD_CAP;
object2.analyticsLocation = {page: env2_10.CREATE_JOIN_GUILD_MODAL};
object2.analyticsLocations = [binding(binding4[20]).NEW_GUILD_BUTTON];
object2.analyticsProperties = {type: env2_16.GUILD_CAP_MODAL_UPSELL};
Reflect.apply(handleShowUpsellAlert, value11, [object2]);
} else {
binding = env2_0;
GameCommunityUpsellMultiExperiment = binding(env2_2[21]).GameCommunityUpsellMultiExperiment;
if (GameCommunityUpsellMultiExperiment.getConfig({location: 'GuildsBarCreateJoinButton'}).enabled) {
binding = env2_7;
if (binding.hasGuilds()) {
env2_0(env2_2[22]).transitionToGuild(env2_14);
} else {
property3.openCreateGuildModal();
}
} else {
property3.openCreateGuildModal();
}
}
}
}
function _fun109309() { // fn#109309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:1845, offset: 0x02345b56, size: 35 bytes, params: 1, frame: 13
const value = environment.__proto__;
return MobileGameCommunitiesStore.getPresentableUpsellGuilds().slice(0, 2);
}
function _fun109311() { // fn#109311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:1970, offset: 0x02345b92, size: 61 bytes, params: 1, frame: 11
if (enabled) {
return env0_4.length < 2 ? [] : env0_4.map(_fun109312);
}
}
function _fun109313() { // fn#109313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2199, offset: 0x02345c48, size: 73 bytes, params: 1, frame: 12
return env0_5 && env0_6 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION] : [];
}
function _fun109315() { // fn#109315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2532, offset: 0x02345c91, size: 64 bytes, params: 1, frame: 15
if (env0_9) {
env0_13.current = global.setInterval(_fun109316, 500);
return _fun109319;
}
}
function _fun109320() { // fn#109320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2827, offset: 0x02345db6, size: 112 bytes, params: 1, frame: 13
var clearInterval;
var current;
var clearTimeout;
var binding;
if (enabled) {
clearInterval = global.clearInterval;
current = env0_13.current;
clearInterval(current);
clearTimeout = global.clearTimeout;
current = env0_12.current;
clearTimeout(current);
env0_10(false);
if (env0_7 != null) {
binding = env0_8;
value = environment.__proto__;
binding(ContentDismissActionType.TAKE_ACTION);
}
}
handleCreateJoinGuildPress();
}
function _fun109321() { // fn#109321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2971, offset: 0x02345e26, size: 42 bytes, params: 1, frame: 2
if (env0_3) {
if (enabled) {
return {selected: env0_3, id: 'unread'};
}
}
}
function _fun109312({icon, id}) { // fn#109312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2008, offset: 0x02345bcf, size: 121 bytes, params: 2, frame: 16
let value = null;
const r4 = value != icon ? icon : value;
value = environment.__proto__.__proto__;
const defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getGuildIconSource = defaultImport.getGuildIconSource;
const object2 = {};
object2.id = id;
object2.icon = r4;
object2.canAnimate = false;
const binding = env1_1;
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
const getDevicePixelRatio = value.getDevicePixelRatio;
object2.size = binding * Reflect.apply(getDevicePixelRatio, value, []);
return Reflect.apply(getGuildIconSource, defaultImport, [object2]);
}
function _fun109316() { // fn#109316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2572, offset: 0x02345cd1, size: 54 bytes, params: 1, frame: 11
let current = env1_14.current;
if (current) {
current = env1_11.current;
if (current != null) {
current.measureInWindow(_fun109317);
}
}
}
function _fun109319() { // fn#109319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2742, offset: 0x02345d85, size: 49 bytes, params: 1, frame: 13
global.clearInterval(env1_13.current);
global.clearTimeout(env1_12.current);
}
function _fun109317(a0, a1, a2, a3) { // fn#109317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2635, offset: 0x02345d07, size: 108 bytes, params: 5, frame: 14
var environment;
var r0;
var clearInterval;
let value = a3 > 0;
if (value) {
value = environment.__proto__.__proto__;
value = a1 < height;
r0 = value;
} else {
r0 = value;
}
r0 = r0 && a1 + a3 > 0;
if (r0) {
clearInterval = global.clearInterval;
value = environment.__proto__.__proto__;
clearInterval(env2_13.current);
env2_12.current = global.setTimeout(_fun109318, 1000);
}
}
function _fun109318() { // fn#109318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14642:2712, offset: 0x02345d73, size: 18 bytes, params: 1, frame: 11
env3_10(true);
}
@@ -0,0 +1,147 @@
/* Metro module 14434; source: modules/guilds_bar/native/GuildsBarDirectMessage.tsx; dependencies: [31, 1226, 4258, 1379, 5214, 3793, 1878, 661, 33, 4501, 697, 14395, 566, 9122, 1244, 14397, 4601, 12129, 14435, 9719, 1305, 5475, 2] */
function _fun109238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:6, offset: 0x02342934, size: 370 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object.width = GUILD_BAR_ITEM_SIZE;
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object.height = GUILD_BAR_ITEM_SIZE;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{dm: object}]);
value = value.memo(GuildsBarDirectMessage);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarDirectMessage.tsx');
exports.default = value;
}
function GuildsBarDirectMessage({channelId}) { // fn#109239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:349, offset: 0x02342aa6, size: 635 bytes, params: 2, frame: 27
var r4;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
var value;
const styles = useStyles();
const value2 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles({'disableSelectedColor': true,
'disableBGColor': true});
const count = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore], function() {
return GuildReadStateStore.getMentionCountForPrivateChannel(channelId).count;
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, UserStore,
RelationshipStore, CallStore, AuthenticationStore], _fun109241);
const channel = value3.channel;
const dmRecipient = value3.dmRecipient;
const env0_3 = dmRecipient;
const label = value3.label;
const {badge,
cutouts} = (importDefault(14397) /* metro dependency 14397: useGuildsBarBottomRightBadge */)({mentionCount: count});
const binding = env0_3;
const value5 = binding.useMemo(_fun109242, [channel, dmRecipient]);
const value6 = binding.useMemo(function() {
return {onPress: _fun109244, onLongPress: _fun109245};
}, [channel]);
const GuildsBarAnimatedItemWrapper = importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */;
const r15 = channel != null && channel.isMultiUserDM();
const r5 = channel != null ? ((Component) => <Component channel={channel} />)(importDefault(14435) /* metro dependency 14435: HomeDrawerDM */) : null;
if (channel == null) {
if (value5 != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.dm} source={value5} />)(value);
r4 = value;
} else {
r4 = null;
}
} else if (channel.isMultiUserDM()) {
r4 = ((Component) => <Component channel={channel} size={AvatarSizes.LARGE_48} pileSizeOverride={AvatarSizes.REFRESH_MEDIUM_32} animate />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */);
} else if (value5 != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.dm} source={value5} />)(value);
r4 = value;
} else {
r4 = null;
}
return (
<GuildsBarAnimatedItemWrapper
selected={false}
circle={!r15}
unread
styles={value2}
label={label}
overState={undefined}
config={value6}
cutouts={cutouts}
externalChildren={badge}
expandedChildren={r5}
>
{r4}
</GuildsBarAnimatedItemWrapper>
);
}
function _fun109241() { // fn#109241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:630, offset: 0x02342d43, size: 310 bytes, params: 1, frame: 20
var r1;
var intl;
var countBinding;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(channelId);
const value4 = undefined;
const type = channel == null ? value4 : channel.type;
const DM = ChannelTypes.DM;
const r3 = type !== DM ? value4 : UserStore.getUser(channel.getRecipientId());
const call = CallStore.getCall(channelId);
const id = AuthenticationStore.getId();
const r6 = call != null && id != null && call.ringing.includes(id);
const r5 = CallStore.isCallActive(channelId) && !r6;
const object2 = {channel: channel, dmRecipient: r3};
if (channel != null) {
value = importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */;
countBinding = count;
value = value({channel: channel, unread: countBinding > 0, mentionCount: countBinding, isIncomingCall: r6,
isOngoingCall: r5});
r1 = value;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r1 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zLZPmk);
}
object2.label = r1;
return object2;
}
function _fun109242() { // fn#109242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:1092, offset: 0x02342e79, size: 72 bytes, params: 1, frame: 14
const channelBinding = channel;
const value2 = undefined;
return channelBinding != null && channel.isDM() ? dmRecipient == null ? value2 : dmRecipient.getAvatarSource(value2) : value2;
}
function _fun109243() { // fn#109243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:1183, offset: 0x02342ec1, size: 29 bytes, params: 1, frame: 3
return {onPress: onPress_109244, onLongPress: onLongPress_109245};
}
function onPress_109244() { // fn#109244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:1189, offset: 0x02342ede, size: 62 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (channel != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue.transitionToChannel(channel.id);
}
}
function onLongPress_109245() { // fn#109245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14631:1244, offset: 0x02342f1c, size: 62 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (channel != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
moduleValue.openChannelLongPressActionSheet(channel.id);
}
}
@@ -0,0 +1,208 @@
/* Metro module 14384; source: modules/guilds_bar/native/GuildsBarDnDStore.tsx; dependencies: [4896, 685, 4017, 690, 1216, 3769, 2] */
function _fun108884(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:6, offset: 0x0233372e, size: 213 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4896) /* metro dependency 4896: SortedGuildStore */).GuildsNodeType;
let value = require(685) /* metro dependency 685 */;
value = value.createWithEqualityFn(_fun108885);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarDnDStore.tsx');
exports.default = value;
exports.INITIAL_GESTURE_STATE = {'mode': null, 'initialX': 0, 'initialY': 0, 'absoluteX': 0, 'absoluteY': 0};
exports.useItemDragState = useItemDragState;
exports.useFolderBGHeightOffset = useFolderBGHeightOffset;
}
function _fun108885(a0, a1) { // fn#108885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:218, offset: 0x02333803, size: 245 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const object2 = {dragSpecs: undefined, overSpecs: undefined, dropSpecs: undefined};
object2.dragRegion = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable({'min': 0,
'max': 0});
object2.gestureState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(env0_4);
object2.dragDropInProgress = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(false);
object2.listInsets = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable({'start': 0,
'end': 0});
object2.scrollPosition = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(0);
object2.windowSize = 0;
object2.setStateShallow = setStateShallow;
object2.dropStart = dropStart;
object2.dropComplete = dropComplete;
return object2;
}
function useItemDragState(a0, a1) { // fn#108893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:1635, offset: 0x02333c06, size: 66 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
return env0_6(_fun108894, (require(3769) /* metro dependency 3769 */).shallow);
}
function useFolderBGHeightOffset(a0) { // fn#108895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:2357, offset: 0x02333dd7, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_6(_fun108896);
}
function setStateShallow(a0) { // fn#108886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:502, offset: 0x023338f8, size: 108 bytes, params: 2, frame: 19
var environment;
var propertyName;
var propertyName2;
var property;
const env0_0 = a0;
let value = require();
const properties = Object.keys(a0);
const properties2 = 0;
const properties3 = properties.length;
if (properties !== undefined) {
var r6 = properties2;
loopExit1: while (true) {
propertyName = properties[r6];
propertyName2 = r6 + 1;
if (propertyName === undefined) {
return undefined;
}
property = value[propertyName];
if (property === a0[propertyName]) {
r6 = propertyName2;
continue;
}
break loopExit1;
}
value = environment.__proto__;
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun108887);
}
}
function dropStart(a0) { // fn#108888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:617, offset: 0x0233398f, size: 242 bytes, params: 2, frame: 19
var environment;
const env0_0 = a0;
let value = require();
const dropSpecs = value.dropSpecs;
const gestureState = value.gestureState;
value = environment.__proto__;
const defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const addBreadcrumb = defaultImport.addBreadcrumb;
let object = {newDropSpec: a0, dropSpecs: dropSpecs};
object.gestureState = gestureState.get();
Reflect.apply(addBreadcrumb, defaultImport, [{'category': 'GuildsBarGesture', 'message': 'dropStart started',
data: object}]);
if (dropSpecs != null) {
throw new global.Error('GuildsBarDnDStore.dropStart: you cannot start a drop while an existing drop is in progress');
}
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108889);
global.clearTimeout(env1_5);
env1_5 = global.setTimeout(function() {
var r4;
var object;
var value2 = gestureState.get();
if (value2.mode === 'drag') {
gestureStateBinding = gestureState;
object = {};
copyDataProperties(object, value2, r4);
object['mode'] = null;
gestureStateBinding.set(object);
}
}, 0);
}
function dropComplete() { // fn#108891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:1102, offset: 0x02333af1, size: 254 bytes, params: 1, frame: 20
var environment;
var set;
let value = require();
const gestureState = value.gestureState;
const dragDropInProgress = value.dragDropInProgress;
const dropSpecs = value.dropSpecs;
const dragSpecs = value.dragSpecs;
value = environment.__proto__;
const defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const addBreadcrumb = defaultImport.addBreadcrumb;
let object2 = {'category': 'GuildsBarGesture', 'message': 'dropComplete started'};
const value2 = gestureState.get();
object2.data = {gestureState: value2, dropSpecs: dropSpecs, dragSpecs: dragSpecs};
Reflect.apply(addBreadcrumb, defaultImport, [object2]);
if (dropSpecs != null) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108892);
global.clearTimeout(env1_5);
if (dragSpecs == null) {
dragDropInProgress.set(false);
}
value = gestureState.get();
if (value.mode === 'drag') {
set = gestureState.set;
object2 = {};
copyDataProperties(object2, value, value2);
object2['mode'] = null;
Reflect.apply(set, gestureState, [object2]);
}
}
}
function _fun108894({dragSpecs, overSpecs, dropSpecs, dragDropInProgress}) { // fn#108894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:1676, offset: 0x02333c48, size: 399 bytes, params: 2, frame: 12
var r0;
var r2;
var r3;
var value;
var value3;
var object2;
if (dragSpecs != null) {
if (require) {
r2 = !require;
} else {
value3 = undefined;
r0 = (dragSpecs == null ? value3 : dragSpecs.node.id) === env0_0 && (overSpecs == null ? value3 : overSpecs.node) != null;
r0 = !r0 ? (dropSpecs == null ? value3 : dropSpecs.dragNode.id) === env0_0 : r0;
r2 = r0;
}
r3 = !require && ((overSpecs == null ? undefined : overSpecs.node.id) === env0_0 || (dropSpecs == null ? undefined : dropSpecs.overNode.id) === env0_0);
object2 = {isDragTarget: r2};
r2 = r2 || r3 ? dropSpecs == null ? 'dragging' : 'dropping' : undefined;
object2.dragState = r2;
value = undefined;
r2 = r3 ? (dropSpecs == null ? value : dropSpecs.overState) ?? (overSpecs == null ? value : overSpecs.state) : value;
object2.overState = r2;
r2 = r3 && ((dropSpecs == null ? value : dropSpecs.itemSize) ?? (dragSpecs == null ? value : dragSpecs.itemSize)) != null ? (dropSpecs == null ? value : dropSpecs.itemSize) ?? (dragSpecs == null ? value : dragSpecs.itemSize) : 0;
object2.itemSize = r2;
} else {
if (dropSpecs == null) {
return {isDragTarget: false, dragState: undefined, overState: undefined, itemSize: 0,
dragDropInProgress: dragDropInProgress};
}
if (require) {
r2 = !require;
} else {
value3 = undefined;
r0 = (dragSpecs == null ? value3 : dragSpecs.node.id) === env0_0 && (overSpecs == null ? value3 : overSpecs.node) != null;
r0 = !r0 ? (dropSpecs == null ? value3 : dropSpecs.dragNode.id) === env0_0 : r0;
r2 = r0;
}
r3 = !require && ((overSpecs == null ? undefined : overSpecs.node.id) === env0_0 || (dropSpecs == null ? undefined : dropSpecs.overNode.id) === env0_0);
object2 = {isDragTarget: r2};
r2 = r2 || r3 ? dropSpecs == null ? 'dragging' : 'dropping' : undefined;
object2.dragState = r2;
value = undefined;
object2.overState = r3 ? (dropSpecs == null ? value : dropSpecs.overState) ?? (overSpecs == null ? value : overSpecs.state) : value;
object2.itemSize = r3 && ((dropSpecs == null ? value : dropSpecs.itemSize) ?? (dragSpecs == null ? value : dragSpecs.itemSize)) != null ? (dropSpecs == null ? value : dropSpecs.itemSize) ?? (dragSpecs == null ? value : dragSpecs.itemSize) : 0;
}
object2.dragDropInProgress = dragDropInProgress;
return object2;
}
function _fun108896({dragSpecs, overSpecs, dropSpecs}) { // fn#108896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:2403, offset: 0x02333df7, size: 277 bytes, params: 2, frame: 9
return dropSpecs != null || overSpecs == null || (dragSpecs == null || overSpecs.state === 'self') || dragSpecs.node.type !== GuildsNodeType.GUILD ? 0 : dragSpecs.node.parentId === env0_0 ? overSpecs.node.parentId === env0_0 ? 0 : overSpecs.node.id !== env0_0 ? -1 * dragSpecs.itemSize : overSpecs.state === 'after' ? 0 : -1 * dragSpecs.itemSize : overSpecs.node.parentId === env0_0 ? dragSpecs.itemSize : overSpecs.node.id !== env0_0 || overSpecs.state !== 'after' ? 0 : dragSpecs.itemSize;
}
function _fun108887() { // fn#108887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:595, offset: 0x02333964, size: 43 bytes, params: 1, frame: 13
const binding = env1_0;
const object2 = {};
copyDataProperties(object2, env0_0, copyDataProperties(object2, env0_1, undefined));
return binding(object2);
}
function _fun108889() { // fn#108889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:949, offset: 0x02333a81, size: 40 bytes, params: 1, frame: 12
return env1_0({dropSpecs: env0_0, dragSpecs: undefined, overSpecs: undefined});
}
function _fun108892() { // fn#108892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14581:1365, offset: 0x02333bef, size: 23 bytes, params: 1, frame: 12
return env1_0({dropSpecs: undefined});
}
@@ -0,0 +1,386 @@
/* Metro module 14457; source: modules/guilds_bar/native/GuildsBarDragPreview.tsx; dependencies: [31, 4896, 14384, 33, 4501, 4017, 4577, 8141, 4508, 14394, 14415, 3769, 2] */
function _fun109403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:6, offset: 0x023499c1, size: 406 bytes, params: 8, frame: 21
const env0_0 = require;
const getItemPreviewKey = function({id}) {
return '' + id;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(4896) /* metro dependency 4896: SortedGuildStore */).GuildsNodeType;
const guildsBarDnDStore = importDefault(14384) /* metro dependency 14384: GuildsBarDnDStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({dragPreview: {'position': 'absolute',
'left': 0}, animatedPreviewStyle: {position: 'absolute'}});
const env0_8 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
object = {code: 'function GuildsBarDragPreviewTsx1(){const{scrollPosition,dragRegion,listInsets}=this.__closure;return Math.max(scrollPosition.get()<dragRegion.get().min?dragRegion.get().min-scrollPosition.get():0,listInsets.get().start);}'};
object = {code: 'function GuildsBarDragPreviewTsx2(){const{scrollPosition,windowSize,listInsets,dragRegion,draggedHeight}=this.__closure;return Math.min(scrollPosition.get()+(windowSize-listInsets.get().end)>dragRegion.get().max?dragRegion.get().max-draggedHeight-scrollPosition.get():windowSize-listInsets.get().end-draggedHeight,windowSize-listInsets.get().end-draggedHeight);}'};
object = {code: "function GuildsBarDragPreviewTsx3(){const{dropPosition,scrollPosition,gestureState,draggedHeight,minY,maxY,windowSize,withSpring,DRAG_SPRING_PHYSICS,runOnJS,dropComplete}=this.__closure;let translateY=function(){if(dropPosition!=null){return dropPosition-scrollPosition.get();}return gestureState.get().absoluteY-draggedHeight/2;}();if(gestureState.get().mode!=null&&dropPosition==null){translateY=Math.min(Math.max(translateY,minY.get()),maxY.get());}else{translateY=Math.max(-draggedHeight,Math.min(translateY,windowSize));}return{top:withSpring(translateY,DRAG_SPRING_PHYSICS,'animate-always',function(finished){if(finished&&dropPosition!=null){runOnJS(dropComplete)();}})};}"};
object = {code: 'function GuildsBarDragPreviewTsx4(finished){const{dropPosition,runOnJS,dropComplete}=this.__closure;if(finished&&dropPosition!=null){runOnJS(dropComplete)();}}'};
object = {code: "function GuildsBarDragPreviewTsx5(){const{isFolder,visible,withSpring,DRAG_SPRING_PHYSICS,transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;const targetScale=function(){if(isFolder){return visible.get()===1?1:0.3;}return visible.get()===1?1:0.33;}();const{translateX:translateX,translateY:translateY}=function(){if(isFolder){return{translateX:0,translateY:0};}if(visible.get()===1){return{translateX:0,translateY:0};}return{translateX:10,translateY:-10};}();return{zIndex:isFolder?0:1,transform:[{translateY:withSpring(translateY,DRAG_SPRING_PHYSICS,'animate-always')},{translateX:withSpring(translateX,DRAG_SPRING_PHYSICS,'animate-always')},{scale:withSpring(targetScale,DRAG_SPRING_PHYSICS,'animate-always',function(finished){if(finished&&transitionState===TransitionStates.YEETED&&isFolder){runOnJS(cleanUp)();}})}],opacity:withSpring(isFolder?visible.get():1,DRAG_SPRING_PHYSICS,'animate-always')};}"};
object = {code: 'function GuildsBarDragPreviewTsx6(finished){const{transitionState,TransitionStates,isFolder,runOnJS,cleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED&&isFolder){runOnJS(cleanUp)();}}'};
value = value.memo(GuildsBarDragPreview);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarDragPreview.tsx');
exports.default = value;
}
function PreviewItem({dragRegion, draggedHeight, draggedNode, dropComplete, gestureState, listInsets, overNode, overState, scrollPosition, windowSize, dropPosition}) { // fn#109404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:1771, offset: 0x02349b57, size: 627 bytes, params: 2, frame: 33
var object2;
const env0_3 = gestureState;
const env0_8 = windowSize;
const env0_9 = dropPosition;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
var Math = global.Math;
return Math.max(scrollPosition.get() < dragRegion.get().min ? dragRegion.get().min - scrollPosition.get() : 0,
listInsets.get().start);
};
closure.__closure = {scrollPosition: scrollPosition, dragRegion: dragRegion, listInsets: listInsets};
closure.__workletHash = 17436881889698;
closure.__initData = env0_9;
const value2 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const env0_10 = value2;
const moduleValue2 = reanimatedRexportModule;
useDerivedValue = moduleValue2.useDerivedValue;
closure = PreviewItemY;
closure.__closure = {scrollPosition: scrollPosition, windowSize: windowSize, listInsets: listInsets,
dragRegion: dragRegion, draggedHeight: draggedHeight};
closure.__workletHash = 4371355784;
closure.__initData = env0_10;
const value3 = Reflect.apply(useDerivedValue, moduleValue2, [closure]);
const env0_11 = value3;
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = PreviewItemH;
object2 = {dropPosition: dropPosition, scrollPosition: scrollPosition, gestureState: gestureState,
draggedHeight: draggedHeight, minY: value2, maxY: value3, windowSize: windowSize};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.DRAG_SPRING_PHYSICS = env0_8;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.dropComplete = dropComplete;
closure.__closure = object2;
closure.__workletHash = 5676492640532;
closure.__initData = env0_11;
const value4 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const value5 = env0_3.useMemo(_fun109409, [overState, overNode]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.dragPreview, value4];
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<ReanimatedNativeView style={items2} nativeID="guilds-bar-drag-preview">
<TransitionGroup
renderItem={renderAnimatedItemPreview}
items={[value5 ?? draggedNode]}
getItemKey={getItemPreviewKey}
/>
</ReanimatedNativeView>
);
}
function renderAnimatedItemPreview(a0, a1, a2, a3) { // fn#109411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:3509, offset: 0x0234a145, size: 51 bytes, params: 5, frame: 15
return (
<AnimatedItemPreview
node={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function AnimatedItemPreview({node, transitionState, cleanUp}) { // fn#109412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:4779, offset: 0x0234a178, size: 533 bytes, params: 2, frame: 26
var r4;
var value;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const ENTERED = TransitionStates.ENTERED;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [transitionState !== ENTERED ? 1 : 0]);
let type = node.type;
let FOLDER = GuildsNodeType.FOLDER;
const value5 = type === FOLDER;
const env0_3 = value5;
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
const closure = AnimatedItemPreviewP;
const object2 = {isFolder: value5, visible: value4};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.DRAG_SPRING_PHYSICS = env0_8;
object2.transitionState = transitionState;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 13465198693221;
closure.__initData = env0_13;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
env0_3.useEffect(_fun109415);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.animatedPreviewStyle, value6];
type = node.type;
FOLDER = GuildsNodeType.FOLDER;
if (type === FOLDER) {
value = importDefault(14394) /* metro dependency 14394: GuildsBarGuildFolder */;
value = ((Component) => <Component id={node.id} expanded={node.expanded} color={node.color} name={node.name} childNodes={node.children} isDragPreview />)(value);
r4 = value;
} else {
value = importDefault(14415) /* metro dependency 14415: GuildsBarGuild */;
value = ((Component) => <Component guildId={node.id} isDragPreview />)(value);
r4 = value;
}
return (
<ReanimatedNativeView style={items2}>
{r4}
</ReanimatedNativeView>
);
}
function GuildsBarDragPreview() { // fn#109416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:6176, offset: 0x0234a615, size: 87 bytes, params: 1, frame: 15
const value2 = GuildsBarDnDStore(_fun109417, (require(3769) /* metro dependency 3769 */).shallow);
const value3 = null;
return value3 != value2 ? <PreviewItem {...value2} /> : value3;
}
function PreviewItemY() { // fn#109406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:2200, owner: PreviewItem.y, offset: 0x02349e3f, size: 202 bytes, params: 1, frame: 16
var r1;
var value6;
const Math = global.Math;
const min = Math.min;
let scrollPositionBinding = scrollPosition;
let get = scrollPositionBinding.get;
const value2 = Reflect.apply(get, scrollPositionBinding, []);
let windowSizeBinding = windowSize;
let listInsetsBinding = listInsets;
get = listInsetsBinding.get;
const value3 = value2 + (windowSizeBinding - Reflect.apply(get, listInsetsBinding, []).end);
get = dragRegion.get;
if (value3 > Reflect.apply(get, dragRegionBinding, []).max) {
dragRegionBinding = dragRegion;
get = dragRegionBinding.get;
value6 = Reflect.apply(get, dragRegionBinding, []).max - draggedHeight;
scrollPositionBinding = scrollPosition;
get = scrollPositionBinding.get;
r1 = value6 - Reflect.apply(get, scrollPositionBinding, []);
} else {
windowSizeBinding = windowSize;
listInsetsBinding = listInsets;
r1 = windowSizeBinding - listInsetsBinding.get().end - draggedHeight;
}
windowSizeBinding = windowSize;
listInsetsBinding = listInsets;
get = listInsetsBinding.get;
return Reflect.apply(min, Math, [r1, windowSizeBinding - Reflect.apply(get, listInsetsBinding,
[]).end - draggedHeight]);
}
function PreviewItemH() { // fn#109407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:2466, owner: PreviewItem.H, offset: 0x02349f09, size: 354 bytes, params: 1, frame: 24
var r6;
var Math;
var max;
var value4;
var Math2;
var min;
var Math3;
var binding;
var value6;
const r5 = dropPosition != null ? dropPosition - scrollPosition.get() : gestureState.get().absoluteY - draggedHeight / 2;
const gestureStateBinding = gestureState;
let get = gestureStateBinding.get;
if (Reflect.apply(get, gestureStateBinding, []).mode == null) {
Math = global.Math;
max = Math.max;
value4 = -draggedHeight;
Math2 = global.Math;
r6 = Reflect.apply(max, Math, [value4, Math2.min(r5, windowSize)]);
} else if (dropPosition == null) {
Math = global.Math;
min = Math.min;
Math3 = global.Math;
max = Math3.max;
binding = env0_10;
get = binding.get;
value6 = Reflect.apply(max, Math3, [r5, Reflect.apply(get, binding, [])]);
binding = env0_11;
get = binding.get;
r6 = Reflect.apply(min, Math, [value6, Reflect.apply(get, binding, [])]);
} else {
Math = global.Math;
max = Math.max;
value4 = -draggedHeight;
Math2 = global.Math;
r6 = Reflect.apply(max, Math, [value4, Math2.min(r5, windowSize)]);
}
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
binding = env1_8;
const closure = HT_109408;
const object = {};
object.dropPosition = dropPosition;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.dropComplete = dropComplete;
closure.__closure = object;
closure.__workletHash = 12640145939434;
closure.__initData = env1_12;
return {top: Reflect.apply(withSpring, springModule, [r6, binding, 'animate-always', closure])};
}
function _fun109409() { // fn#109409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:3096, offset: 0x0234a0b3, size: 114 bytes, params: 1, frame: 4
var value2;
if (overState !== 'convert-after') {
if (overState !== 'convert-before') {
return undefined;
}
}
if (overNode != null) {
value2 = environment.__proto__;
return {type: GuildsNodeType.FOLDER, id: -1, parentId: undefined, name: undefined, color: undefined,
expanded: false, children: [overNode]};
}
}
function AnimatedItemPreviewP() { // fn#109413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:4976, owner: AnimatedItemPreview.p, offset: 0x0234a38d, size: 462 bytes, params: 1, frame: 29
let binding = env0_3;
const value2 = env0_2.get();
const value3 = 1;
const r15 = binding ? value3 !== value2 ? 0.3 : value3 : value3 !== value2 ? 0.33 : value3;
const {translateX, translateY} = env0_3 || value3 === env0_2.get() ? {'translateX': 0,
'translateY': 0} : {'translateX': 10, 'translateY': -10};
const object2 = {};
object2.zIndex = env0_3 ? 0 : value3;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const items2 = [{translateY: Reflect.apply(withSpring, springModule, [translateY, env1_8, 'animate-always'])}];
const object4 = {};
object4.translateX = springModule.withSpring(translateX, env1_8, 'animate-always');
items2[1] = object4;
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
binding = env1_8;
const closure = pT;
const object6 = {};
object6.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object6.TransitionStates = TransitionStates;
object6.isFolder = env0_3;
object6.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object6.cleanUp = cleanUp;
closure.__closure = object6;
closure.__workletHash = 9409925192880;
closure.__initData = env1_14;
items2[2] = {scale: Reflect.apply(withSpring, moduleValue3, [r15, binding, 'animate-always', closure])};
object2.transform = items2;
const moduleValue4 = springModule;
object2.opacity = moduleValue4.withSpring(env0_3 ? env0_2.get() : value3, env1_8, 'animate-always');
return object2;
}
function _fun109415() { // fn#109415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:5884, offset: 0x0234a5d0, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const transitionStateBinding = transitionState;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [transitionStateBinding !== YEETED ? 1 : 0]);
}
function _fun109417({dragSpecs, overSpecs, gestureState, scrollPosition, dragRegion, windowSize, dropComplete, listInsets, dropSpecs}) { // fn#109417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:6217, offset: 0x0234a66c, size: 286 bytes, params: 2, frame: 20
var node;
var state;
var object2;
var value;
var value2;
var overState;
if (dropSpecs != null) {
overState = dropSpecs.overState;
object2 = {};
object2.draggedNode = dropSpecs.dragNode;
object2.draggedHeight = dropSpecs.itemSize;
object2.overState = overState;
object2.overNode = overState.startsWith('convert') ? dropSpecs.overNode : undefined;
object2.dropPosition = dropSpecs.dropPosition;
object2.gestureState = gestureState;
object2.scrollPosition = scrollPosition;
object2.dragRegion = dragRegion;
object2.windowSize = windowSize;
object2.dropComplete = dropComplete;
object2.listInsets = listInsets;
return object2;
}
if (dragSpecs != null) {
if (overSpecs != null) {
state = overSpecs.state;
object2 = {};
node = dragSpecs.node;
object2.draggedNode = node;
object2.draggedHeight = dragSpecs.itemSize;
object2.overState = state;
value = state.startsWith('convert');
value2 = undefined;
node = value ? overSpecs.node : value2;
object2.overNode = node;
object2.dropPosition = value2;
object2.gestureState = gestureState;
object2.scrollPosition = scrollPosition;
object2.dragRegion = dragRegion;
object2.windowSize = windowSize;
object2.dropComplete = dropComplete;
object2.listInsets = listInsets;
return object2;
}
}
return null;
}
function HT_109408(a0) { // fn#109408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:2675, owner: PreviewItem.H.t, offset: 0x0234a06b, size: 72 bytes, params: 2, frame: 12
var r0;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
value = dropPosition != null;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [dropComplete])();
}
}
function pT(a0) { // fn#109414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14654:5327, owner: AnimatedItemPreview.p.t, offset: 0x0234a55b, size: 117 bytes, params: 2, frame: 13
var r0;
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
r0 = env1_3;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
@@ -0,0 +1,47 @@
/* Metro module 14412; source: modules/guilds_bar/native/GuildsBarFavorites.tsx; dependencies: [31, 1382, 661, 33, 14410, 1357, 14395, 11248, 566, 14413, 14397, 1244, 14414, 8633, 697, 2] */
function _fun109089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14609:6, offset: 0x0233cd17, size: 203 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const favoriteStore = importDefault(1382) /* metro dependency 1382: FavoriteStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).FAVORITES;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
object = {onPress: function() {
importDefault(dependencyMap[4])(FAVORITES);
}};
value = value.memo(GuildsBarFavorites);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarFavorites.tsx');
exports.default = value;
}
function GuildsBarFavorites() { // fn#109091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14609:193, offset: 0x0233cde2, size: 439 bytes, params: 1, frame: 21
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarFavorites');
const value3 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles();
const value4 = (require(11248) /* metro dependency 11248: FavoritesHooks */).useIsFavoritesGuildSelected();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
var {badge,
unread} = (importDefault(14413) /* metro dependency 14413: useFavoriteGuildUnreads */)(Reflect.apply(useStateFromStores,
fluxModule, [[FavoriteStore], function() {
return FavoriteStore.getFavoriteChannels();
}]));
var {badge,
cutouts} = (importDefault(14397) /* metro dependency 14397: useGuildsBarBottomRightBadge */)({mentionCount: badgeBinding});
const GuildsBarAnimatedItemWrapper = importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */;
const defaultImport3Props = {selected: value4, circle: !value2 && !value4, unread: unread, styles: value3,
cutouts: cutouts, overState: undefined, config: env0_6};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImport3Props.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wMWyci);
defaultImport3Props.externalChildren = badgeBinding;
const HomeDrawerFavoritesRowExpandedChildren = (require(14414) /* metro dependency 14414: HomeDrawerFavoritesRow */).HomeDrawerFavoritesRowExpandedChildren;
defaultImport3Props.expandedChildren = <HomeDrawerFavoritesRowExpandedChildren />;
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
return (
<GuildsBarAnimatedItemWrapper {...defaultImport3Props}>
<StarIcon color={value4 ? colors.WHITE : colors.MOBILE_GUILDBAR_ICON_DEFAULT} />
</GuildsBarAnimatedItemWrapper>
);
}
@@ -0,0 +1,77 @@
/* Metro module 14387; source: modules/guilds_bar/native/GuildsBarFolderMenuItems.tsx; dependencies: [5, 4896, 661, 9027, 1244, 12686, 1962, 7002, 14388, 2] */
function _fun108909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14584:6, offset: 0x02334654, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarFolderMenuItems.tsx');
exports.getGuildFolderMenuItems = getGuildFolderMenuItems;
}
function getGuildFolderMenuItems(a0) { // fn#108910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14584:258, offset: 0x023346ec, size: 205 bytes, params: 2, frame: 17
const env0_0 = a0;
const object2 = {};
const EnvelopeIcon = (require(9027) /* metro dependency 9027: EnvelopeIcon */).EnvelopeIcon;
object2.IconComponent = EnvelopeIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.e6RscS]);
object2.action = action_108911;
const items2 = [object2];
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
const Dx7im5 = t.Dx7im5;
items2[1] = {IconComponent: SettingsIcon, label: Reflect.apply(string, intl, [Dx7im5]), action: action_108914};
return items2;
}
function getGuildFolderMenuItemsAction() { // fn#108911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14584:388, owner: getGuildFolderMenuItems.action, offset: 0x023347b9, size: 29 bytes, params: 1, frame: 11
return env1_2(_fun108913)();
}
function getGuildFolderMenuItemsAction_108914() { // fn#108914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14584:606, owner: getGuildFolderMenuItems.action, offset: 0x0233485f, size: 29 bytes, params: 1, frame: 11
return env1_2(_fun108916)();
}
function* _fun108913() { // fn#108913, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14584:395, offset: 0x023347e1, size: 126 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_3;
var guildFolderById = binding.getGuildFolderById(require);
if (guildFolderById != null) {
binding = env3_0;
var binding2 = env3_1;
var value5 = binding(binding2[6]);
var property = binding2[5];
yield value5(property, binding2.paths);
var value6 = undefined;
if (false) {
return value6;
}
property = value6.default;
var guildIds = guildFolderById.guildIds;
var GUILD_LIST = env3_4.GUILD_LIST;
property(guildIds, GUILD_LIST);
}
}
}
function* _fun108916() { // fn#108916, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14584:613, offset: 0x02334887, size: 87 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_0;
var binding2 = env3_1;
yield binding(binding2[6])(binding2[8], binding2.paths);
value = undefined;
if (false) {
return value;
}
var showGuildsBarFolderModal = value.showGuildsBarFolderModal;
value = environment.__proto__.__proto__;
showGuildsBarFolderModal(require);
}
}
@@ -0,0 +1,158 @@
/* Metro module 14389; source: modules/guilds_bar/native/GuildsBarFolderSettingsModal.tsx; dependencies: [57, 31, 4896, 14390, 33, 7896, 7972, 1244, 1305, 14391, 5282, 566, 14388, 5280, 2] */
function _fun108920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:6, offset: 0x023349d6, size: 216 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_6 = (require(14390) /* metro dependency 14390: GuildsBarConstants */).DEFAULT_FOLDER_COLOR;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarFolderSettingsModal.tsx');
exports.default = GuildFolderSettingsModal;
}
function GuildFolderSettingsScene({name, onNameChange, color, onColorChange}) { // fn#108921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:184, offset: 0x02334aae, size: 420 bytes, params: 2, frame: 31
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.tGRbjA]);
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
string = intl.string;
const xV9hVh = (require(1244) /* metro dependency 1244: indexNative */).t.xV9hVh;
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
return (
<Form>
<FormSection {...object}>
<FormInput
placeholder={Reflect.apply(string, intl, [xV9hVh])}
value={name}
onChange={onNameChange}
showTopContainer={false}
maxLength={32}
autoFocus
clearButtonVisibility={WITH_CONTENT}
/>
</FormSection>
<FormSection title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xpurRF)}>
{((Component) => <Component color={color} onChange={onColorChange} />)(importDefault(14391) /* metro dependency 14391: FormRoleColorPicker */)}
</FormSection>
</Form>
);
}
function GuildFolderSettingsModal({folderId}) { // fn#108922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:821, offset: 0x02334c52, size: 365 bytes, params: 2, frame: 23
const {initialFolderName,
initialFolderColor} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SortedGuildStore],
function() {
var r5;
var value3 = SortedGuildStore.getGuildFolderById(folderId);
var value4 = undefined;
r5 = value3 == null ? value4 : value3.folderName;
r5 = r5 != null ? value3.folderName : '';
return {initialFolderName: r5,
initialFolderColor: (value3 == null ? value4 : value3.folderColor) != null ? value3.folderColor : DEFAULT_FOLDER_COLOR};
}, [folderId]);
let binding = env0_4;
let useState = binding.useState;
let value3 = Reflect.apply(useState, binding, [initialFolderName]);
const binding2 = env0_3;
let value4 = binding2(value3, 2);
const property = value4[0];
const env0_2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [initialFolderColor]), 2);
const property2 = value5[0];
var env0_4 = value5[1];
const r8 = property !== initialFolderName || property2 !== initialFolderColor;
binding = env0_4;
const value10 = binding.useMemo(_fun108928, [property2, property, r8, binding.useCallback(_fun108924, [folderId,
property, property2]), binding.useCallback(_fun108927, [])]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator screens={value10} initialRouteName="Folder Settings" />;
}
function _fun108924() { // fn#108924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1261, offset: 0x02334e27, size: 68 bytes, params: 1, frame: 15
var environment;
updateFolder(folderId, env0_1, env0_3);
const value = environment.__proto__;
(require(14388) /* metro dependency 14388: GuildsBarFolderSettingsModalActionCreators */).hideGuildsBarFolderModal();
}
function _fun108927() { // fn#108927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1475, offset: 0x02334f09, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(14388) /* metro dependency 14388: GuildsBarFolderSettingsModalActionCreators */).hideGuildsBarFolderModal();
}
function _fun108928() { // fn#108928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1535, offset: 0x02334f2e, size: 77 bytes, params: 1, frame: 17
return getScreens_108929({name: env0_1, onNameChange: onNameChange, color: env0_3, onColorChange: onColorChange},
env0_5, env0_6, env0_7);
}
function updateFolder(a0, a1, a2) { // fn#108925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1267, offset: 0x02334e6b, size: 92 bytes, params: 4, frame: 14
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let value = environment.__proto__.__proto__;
const userSettingsActionCreatorsModule = require(7896) /* metro dependency 7896: UserSettingsActionCreators */;
const saveGuildFolders = userSettingsActionCreatorsModule.saveGuildFolders;
value = SortedGuildStore.getGuildFolders();
Reflect.apply(saveGuildFolders, userSettingsActionCreatorsModule, [value.map(_fun108926)]);
}
function getScreens_108929(a0, a1, a2, a3) { // fn#108929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1539, offset: 0x02334f7b, size: 229 bytes, params: 5, frame: 20
var environment;
var r1;
const env0_0 = a0;
const object = {render: render_108930};
let value = environment.__proto__.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Dx7im5 = t.Dx7im5;
object.title = Reflect.apply(string, intl, [Dx7im5]);
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a3);
if (a1) {
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
value = value.getHeaderTextButton(intl.string(t['R3BPH+']), a2);
r1 = value;
} else {
r1 = function() {
return null;
};
}
object.headerRight = r1;
return {['Folder Settings']: object};
}
function onNameChange(a0) { // fn#108932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1834, offset: 0x02335085, size: 19 bytes, params: 2, frame: 11
return env1_2(a0);
}
function _fun108926(a0) { // fn#108926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1346, offset: 0x02334ec7, size: 66 bytes, params: 2, frame: 14
var r0;
var object2;
const value = a0;
const folderId = value.folderId;
if (folderId !== env0_0) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, folderId);
object2['folderName'] = require;
object2['folderColor'] = importDefault;
r0 = object2;
}
return r0;
}
function getScreens_108929Render() { // fn#108930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1587, owner: getScreens_108929.render, offset: 0x02335060, size: 37 bytes, params: 1, frame: 13
return <GuildFolderSettingsScene {...env0_0} />;
}
@@ -0,0 +1,22 @@
/* Metro module 14388; source: modules/guilds_bar/native/GuildsBarFolderSettingsModalActionCreators.tsx; dependencies: [5080, 14389, 1962, 2] */
function _fun108917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14585:6, offset: 0x023348de, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarFolderSettingsModalActionCreators.tsx');
exports.showGuildsBarFolderModal = showGuildsBarFolderModal;
exports.hideGuildsBarFolderModal = hideGuildsBarFolderModal;
}
function showGuildsBarFolderModal(a0) { // fn#108918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14585:265, offset: 0x02334952, size: 89 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {folderId: a0}, 'GUILD_FOLDER_SETTINGS_MODAL_KEY']);
}
function hideGuildsBarFolderModal() { // fn#108919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14585:385, offset: 0x023349ab, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('GUILD_FOLDER_SETTINGS_MODAL_KEY');
}
@@ -0,0 +1,30 @@
/* Metro module 14441; source: modules/guilds_bar/native/GuildsBarFooterWrapper.tsx; dependencies: [14385, 33, 4501, 697, 3860, 6821, 2] */
function _fun109284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14638:6, offset: 0x0234481e, size: 178 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(14385) /* metro dependency 14385: GuildsBarConstants */).GUILD_ITEM_HIT_SLOP;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun109285);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarFooterWrapper.tsx');
exports.default = GuildsBarFooterWrapper;
}
function _fun109285(a0) { // fn#109285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14638:164, offset: 0x023448d0, size: 133 bytes, params: 2, frame: 15
const object = {'width': null, 'display': 'flex', 'alignItems': 'center'};
object.width = a0 + GUILD_ITEM_HIT_SLOP.left + GUILD_ITEM_HIT_SLOP.right;
const GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
object.paddingTop = GUILD_BAR_ITEM_MARGIN;
const GUILD_BAR_ITEM_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_PADDING;
object.gap = GUILD_BAR_ITEM_PADDING;
return {footerWrapper: object};
}
function GuildsBarFooterWrapper({children}) { // fn#109286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14638:449, offset: 0x02344955, size: 127 bytes, params: 2, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const styles = useStyles(Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]));
return ((Component) => <Component style={styles.footerWrapper}>{children}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
}
@@ -0,0 +1,40 @@
/* Metro module 14440; source: modules/guilds_bar/native/GuildsBarGeoRestrictedBadge.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 5475, 11785, 2] */
function _fun109282(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14637:6, offset: 0x02344651, size: 333 bytes, params: 8, frame: 23
var object4;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'position': 'absolute', 'bottom': -3, 'right': -3, 'height': 22, 'width': 22, 'borderColor': null,
'backgroundColor': null, 'borderWidth': 3, 'borderRadius': 11, 'justifyContent': 'center',
'alignItems': 'center', 'overflow': 'hidden'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object5.borderColor = BACKGROUND_BASE_LOWEST;
const STATUS_WARNING_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING_BACKGROUND;
object5.backgroundColor = STATUS_WARNING_BACKGROUND;
object4.badgeImageContainer = object5;
const object6 = {'height': 16, 'width': 16};
const DARK_1_LIGHT_08 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_1_LIGHT_08;
object6.opacity = DARK_1_LIGHT_08;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object6.tintColor = BLACK;
object4.badgeImage = object6;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object4]);
value = value.memo(GuildsBarGeoRestrictedBadge);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarGeoRestrictedBadge.tsx');
exports.default = value;
}
function GuildsBarGeoRestrictedBadge({style}) { // fn#109283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14637:549, offset: 0x0234479e, size: 128 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={[styles.badgeImageContainer, style]} pointerEvents="none">
{((Component) => <Component source={importDefault(11785) /* metro dependency 11785 */} style={styles.badgeImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
}
@@ -0,0 +1,91 @@
/* Metro module 14439; source: modules/guilds_bar/native/GuildsBarGeoRestrictedGuild.tsx; dependencies: [31, 14385, 33, 4501, 697, 14399, 1357, 14395, 1423, 6819, 4647, 1244, 9112, 14440, 14428, 5475, 2] */
function _fun109276(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14636:6, offset: 0x02344160, size: 340 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const GUILD_ITEM_BADGE_SIZE = (require(14385) /* metro dependency 14385: GuildsBarConstants */).GUILD_ITEM_BADGE_SIZE;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object3.width = GUILD_BAR_ITEM_SIZE;
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object3.height = GUILD_BAR_ITEM_SIZE;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{guildIcon: object3,
geoRestrictedBadge: {'borderColor': 'transparent', 'width': null, 'height': null, 'bottom': 4, 'right': 12,
width: GUILD_ITEM_BADGE_SIZE, height: GUILD_ITEM_BADGE_SIZE}}]);
object = [(importDefault(14399) /* metro dependency 14399: computeGuildsBarCutout */)({position: 'bottom-right'})];
value = value.memo(GuildsBarGeoRestrictedGuild);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarGeoRestrictedGuild.tsx');
exports.default = value;
}
function GuildsBarGeoRestrictedGuild({restrictedGuild}) { // fn#109277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14636:424, offset: 0x023442b4, size: 504 bytes, params: 2, frame: 24
var r4;
var value;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarGeoRestrictedGuild');
const styles = useStyles();
const value3 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles({'disableSelectedColor': true,
'disableBGColor': true});
const r9 = restrictedGuild.icon != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getAnimatableSourceWithFallback(false,
function(a0) {
var defaultImport = importDefault(dependencyMap[8]);
var object = {};
var restrictedGuildBinding = restrictedGuild;
object.id = restrictedGuildBinding.id;
var ImageSizes = require(dependencyMap[9]).ImageSizes;
object.size = ImageSizes[require(dependencyMap[9]).GuildIconSizes.LARGE];
object.icon = restrictedGuildBinding.icon;
object.canAnimate = a0;
return defaultImport.getGuildIconSource(object);
}) : null;
const value6 = env0_3.useMemo(function() {
return {onPress: _fun109280};
}, [restrictedGuild.id, restrictedGuild.name]);
const GuildsBarAnimatedItemWrapper = importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */;
const defaultImport3Props2 = {'selected': false, 'unread': false, circle: !value2, styles: value3,
label: restrictedGuild.name, isDragTarget: false, config: value6, cutouts: env0_6, overState: undefined,
externalChildren: ((Component) => <Component style={styles.geoRestrictedBadge} />)(importDefault(14440) /* metro dependency 14440: GuildsBarGeoRestrictedBadge */),
expandedChildren: ((Component) => <Component guildId={restrictedGuild.id} />)(importDefault(14428) /* metro dependency 14428: HomeDrawerGuildRow */)};
if (r9 != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={r9} style={styles.guildIcon} fadeDuration={0} />)(value);
r4 = value;
} else {
r4 = ((Component) => <Component value={restrictedGuild.name} selected={false} animate={false} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
return (
<GuildsBarAnimatedItemWrapper {...defaultImport3Props2}>
{r4}
</GuildsBarAnimatedItemWrapper>
);
}
function _fun109279() { // fn#109279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14636:821, offset: 0x02344528, size: 17 bytes, params: 1, frame: 2
return {onPress: onPress_109280};
}
function onPress_109280() { // fn#109280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14636:827, offset: 0x02344539, size: 230 bytes, params: 1, frame: 21
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = Reflect.apply(string, intl, [t.aCAiGl]);
object2.body = intl.format(t['4cJV9S'], {serverName: restrictedGuild.name});
string = intl.string;
const J2TBi3 = t.J2TBi3;
object2.cancelText = Reflect.apply(string, intl, [J2TBi3]);
object2.onCancel = onCancel_109281;
Reflect.apply(show, defaultImport, [object2]);
}
function onPress_109280OnCancel() { // fn#109281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14636:1026, owner: onPress_109280.onCancel, offset: 0x0234461f, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.leaveGuild(restrictedGuild.id);
}
@@ -0,0 +1,336 @@
/* Metro module 14415; source: modules/guilds_bar/native/GuildsBarGuild.tsx; dependencies: [31, 3785, 1422, 4646, 5214, 1867, 3969, 4896, 14384, 14385, 661, 33, 4017, 4501, 697, 1357, 3860, 14395, 4013, 566, 6819, 14416, 14417, 4647, 1244, 683, 6914, 14410, 4559, 14386, 8812, 14425, 14426, 4577, 14428, 5475, 14433, 2] */
function _fun109099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:6, offset: 0x0233d3d3, size: 575 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const guildRecordModule = require(1422) /* metro dependency 1422: GuildRecord */;
const env0_5 = guildRecordModule.getGuildIconSource;
const env0_6 = guildRecordModule.getGuildIconURL;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_12 = (require(14384) /* metro dependency 14384: GuildsBarDnDStore */).useItemDragState;
const env0_13 = (require(14385) /* metro dependency 14385: GuildsBarConstants */).TRANSITION_PHYSICS;
const env0_14 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_15 = value3.Fragment;
const env0_16 = value3.jsxs;
const env0_17 = value3.jsx;
object3 = {};
object3.pan = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(-1);
object3.itemMeasurements = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable([]);
object3.activeIndex = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(-1);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object4 = {};
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object4.width = GUILD_BAR_ITEM_SIZE;
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object4.height = GUILD_BAR_ITEM_SIZE;
const env0_19 = Reflect.apply(createStyles, createStylesModule, [{guildIcon: object4}]);
object3 = {code: "function GuildsBarGuildTsx1(values){const{dragDropInProgress,sharedId,guildId,isDragTarget,withSpring,TRANSITION_PHYSICS}=this.__closure;var _guildId;const shouldAnimate=dragDropInProgress.get()&&sharedId.get()===guildId&&!isDragTarget;sharedId.set((_guildId=guildId)!==null&&_guildId!==void 0?_guildId:null);return{animations:{originY:shouldAnimate?withSpring(values.targetOriginY,TRANSITION_PHYSICS,'animate-always'):values.targetOriginY,height:shouldAnimate?withSpring(values.targetHeight,TRANSITION_PHYSICS,'animate-always'):values.targetHeight},initialValues:{originY:values.currentOriginY,height:values.currentHeight}};}"};
value = value.memo(GuildsBarGuild);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarGuild.tsx');
exports.default = value;
}
function GuildsBarGuild({guildId, isDragPreview}) { // fn#109100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:1246, offset: 0x0233d612, size: 1324 bytes, params: 2, frame: 45
var object2;
isDragPreview = !(isDragPreview === undefined) && isDragPreview;
const value4 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarGuild');
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value5 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const value6 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles({'disableSelectedColor': true,
'disableBGColor': true});
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guilds'}]).enableHome;
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SelectedGuildStore,
GuildAvailabilityStore, GuildReadStateStore, LurkingStore], _fun109101, [guildId]);
const selected = value7.selected;
const isUnavailable = value7.isUnavailable;
const env0_3 = isUnavailable;
const mentionCount = value7.mentionCount;
const unread = value7.unread;
const isMentionLowImportance = value7.isMentionLowImportance;
const isLurking = value7.isLurking;
const {asset, icon, guildName} = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore],
_fun109102, [guildId, value5, selected],
importDefault(14416) /* metro dependency 14416: isGuildsBarGuildDataEqual */);
const {badgeTopRight, badgeBottomRight, cutouts,
mediaState} = (importDefault(14417) /* metro dependency 14417: useGuildsBarBadges */)(guildId, mentionCount,
isMentionLowImportance);
const binding = env0_3;
const value10 = binding.useMemo(_fun109103, [guildId, value5, isLurking, isUnavailable]);
const value11 = binding.useMemo(_fun109109, [guildName, mentionCount, unread, mediaState]);
const value12 = (importDefault(14425) /* metro dependency 14425: usePreloadedGuildAsset */)(guildId, icon, asset);
const {isDragTarget, dragState, overState, itemSize, dragDropInProgress} = useItemDragState(guildId, isDragPreview);
const {accessibilityActions, onAccessibilityAction} = binding.useMemo(_fun109111, [guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getGuildsTree().version;
})]);
const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(guildId);
const useCallback = binding.useCallback;
const closure = GuildsBarGuildF;
object2 = {dragDropInProgress: dragDropInProgress, sharedId: value15, guildId: guildId, isDragTarget: isDragTarget};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.TRANSITION_PHYSICS = TRANSITION_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 14096669603718;
closure.__initData = env0_20;
return ((Component) => <Component id={guildId} draggedItemSize={itemSize} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} cutouts={isDragTarget ? undefined : cutouts} selected={selected} isDragTarget={isDragTarget} dragState={dragState} sharedId={value15} circle={!value4 && (!selected && !enableHome)} overState={overState} unread={unread} label={value11} config={value10} styles={value6} isDragPreview={isDragTarget} layout={Reflect.apply(useCallback,
binding, [closure, [guildId, value15, isDragTarget,
dragDropInProgress]])} externalChildren={<>{badgeTopRight}{badgeBottomRight}</>} expandedChildren={((Component) => <Component guildId={guildId} />)(importDefault(14428) /* metro dependency 14428: HomeDrawerGuildRow */)}>{isUnavailable ? ((Component) => <Component source={importDefault(14433) /* metro dependency 14433 */} style={styles.guildIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : value12 != null ? ((Component) => <Component source={value12} style={styles.guildIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : ((Component) => <Component value={guildName} selected={selected} animate={selected} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</Component>)(importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */);
}
function _fun109101() { // fn#109101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:1625, offset: 0x0233db3e, size: 129 bytes, params: 1, frame: 13
const object2 = {};
const guildId2 = SelectedGuildStore.getGuildId();
const guildIdBinding = guildId;
object2.selected = guildId2 === guildIdBinding;
object2.isUnavailable = GuildAvailabilityStore.isUnavailable(guildIdBinding);
object2.unread = GuildReadStateStore.hasUnread(guildIdBinding);
object2.mentionCount = GuildReadStateStore.getMentionCount(guildIdBinding);
object2.isMentionLowImportance = GuildReadStateStore.getIsMentionLowImportance(guildIdBinding);
object2.isLurking = LurkingStore.isLurking(guildIdBinding);
return object2;
}
function _fun109102() { // fn#109102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:1970, offset: 0x0233dbbf, size: 173 bytes, params: 1, frame: 20
const value = environment.__proto__;
const guild = GuildStore.getGuild(guildId);
const value4 = undefined;
let r1 = guild != null ? getGuildIconURL(guild, env0_1, selected) : value4;
const object2 = {};
object2.guildName = guild == null ? value4 : guild.name;
object2.icon = r1;
r1 = r1 != null && guild != null ? getGuildIconSource(guild,
(require(6819) /* metro dependency 6819: GuildIcon */).ImageSizes[(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE],
selected) : value4;
object2.asset = r1;
return object2;
}
function _fun109103() { // fn#109103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:2306, offset: 0x0233dc6c, size: 41 bytes, params: 1, frame: 4
return {onPress: onPress_109104, onLongPress: isLurking ? _fun109106 : undefined};
}
function _fun109109() { // fn#109109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:3193, offset: 0x0233dffc, size: 850 bytes, params: 1, frame: 20
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var push;
var value8;
var value9;
var value10;
var value11;
var value12;
var value;
const r5 = mentionCount == null ? unread === true ? intl.formatToPlainString(t.lzqe42,
{guildName: guildName}) : intl.formatToPlainString(t['/uzRss'], {guildName: guildName,
mentions: mentionCount}) : mentionCount > 0 ? intl.formatToPlainString(t['/uzRss'], {guildName: guildName,
mentions: mentionCount}) : unread === true ? intl.formatToPlainString(t.lzqe42,
{guildName: guildName}) : intl.formatToPlainString(t['/uzRss'], {guildName: guildName, mentions: mentionCount});
const items = [];
if (mediaState.activeEvent) {
push = items.push;
value8 = environment.__proto__;
Reflect.apply(push, items, [intl.string(t.dHvJ2p)]);
}
if (mediaState.liveStage) {
push = items.push;
value9 = environment.__proto__;
Reflect.apply(push, items, [intl.string(t.OO7ndG)]);
}
if (mediaState.screenshare) {
push = items.push;
value10 = environment.__proto__;
Reflect.apply(push, items, [intl.string(t.wsHMZ7)]);
}
if (mediaState.video) {
push = items.push;
value11 = environment.__proto__;
Reflect.apply(push, items, [intl.string(t.BrLCS0)]);
}
if (mediaState.audio) {
push = items.push;
value12 = environment.__proto__;
Reflect.apply(push, items, [intl.string(t.jPBhKy)]);
}
if (mediaState.activity) {
push = items.push;
value = environment.__proto__;
Reflect.apply(push, items, [intl.string(t.Y3Gii5)]);
}
if (items.length > 0) {
value = items.join(' ');
value = '' + r5 + ', ' + value;
r0 = value;
} else {
r0 = r5;
}
return r0;
}
function _fun109111() { // fn#109111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:4075, offset: 0x0233e367, size: 162 bytes, params: 1, frame: 18
var environment;
let value = environment.__proto__;
value = importDefault(dependencyMap[29]);
const guildIdBinding = guildId;
value = value(guildIdBinding, version);
const value3 = importDefault(dependencyMap[32])(guildIdBinding, version);
value = value.map(function(a0) {
return {name: a0.label, label: a0.label, action: a0.action};
});
const items2 = [];
value = arraySpread(items2, value, 0, dependencyMap);
arraySpread(items2, value3.map(function(a0) {
return {name: a0.name, label: a0.label, action: a0.action};
}), value, dependencyMap);
const object2 = {};
object2.accessibilityActions = items2.map(function({name, label}) {
return {name: name, label: label};
});
object2.onAccessibilityAction = onAccessibilityAction_109115;
return object2;
}
function GuildsBarGuildF(a0) { // fn#109117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:4555, owner: GuildsBarGuild.f, offset: 0x0233e4cb, size: 260 bytes, params: 2, frame: 20
var r4;
var moduleValue;
var moduleValue2;
var value;
let r3 = dragDropInProgress.get() && env0_12.get() === guildId && !isDragTarget;
const binding = env0_12;
const set = binding.set;
const guildIdBinding = guildId;
const value6 = null;
Reflect.apply(set, binding, [value6 != guildIdBinding ? guildId : value6]);
const object = {};
if (r3) {
value = environment.__proto__;
moduleValue = require(4577) /* metro dependency 4577: spring */;
value = moduleValue.withSpring(a0.targetOriginY, TRANSITION_PHYSICS, 'animate-always');
r4 = value;
} else {
r4 = a0.targetOriginY;
}
object.originY = r4;
if (r3) {
value = environment.__proto__;
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
value = moduleValue2.withSpring(a0.targetHeight, TRANSITION_PHYSICS, 'animate-always');
r3 = value;
} else {
r3 = a0.targetHeight;
}
object.height = r3;
return {animations: object, initialValues: {originY: a0.currentOriginY, height: a0.currentHeight}};
}
function onPress_109104() { // fn#109104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:2320, offset: 0x0233dc95, size: 364 bytes, params: 1, frame: 19
var environment;
var defaultImport;
var object2;
var moduleValue;
var defaultImport2;
var show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = environment.__proto__.__proto__;
const getGuild = GuildStore.getGuild;
if (Reflect.apply(getGuild, GuildStore, [guildId]) == null) {
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
object2.title = intl.string(t.R0RpRX);
object2.body = intl.string(t.m9gRVN);
return Reflect.apply(show, defaultImport2, [object2]);
}
if (isUnavailable) {
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
object2.title = intl.string(t.R0RpRX);
object2.body = intl.string(t.m9gRVN);
return Reflect.apply(show, defaultImport2, [object2]);
}
const index = SortedGuildStore.getGuildFolders().findIndex(function({guildIds}) {
return guildIds.includes(guildId);
});
if (index > -1) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.GUILD_CLICKED, {guild_id: guildId, index: index});
}
if (isLurking) {
moduleValue = require(6914) /* metro dependency 6914: LurkerPreviewAnalytics */;
moduleValue.trackGuildIconClicked(guildId);
}
(importDefault(14410) /* metro dependency 14410: transitionGuildsBarToGuildOrOpenSelectedChannel */)(guildId);
}
function _fun109106(a0) { // fn#109106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:2654, offset: 0x0233de1d, size: 362 bytes, params: 2, frame: 20
var environment;
var moduleValue;
var value4;
var pageY;
var binding;
const value = environment.__proto__.__proto__;
const guild = GuildStore.getGuild(guildId);
if (guild != null) {
moduleValue = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
if (!moduleValue.getIsScreenReaderEnabled()) {
value4 = (importDefault(14386) /* metro dependency 14386: getGuildsBarGuildMenuItems */)(guildId,
SortedGuildStore.getGuildsTree().version);
if (value4.length !== 0) {
pageY = a0.nativeEvent.pageY;
binding = env2_18;
binding.activeIndex.set(-1);
(require(8812) /* metro dependency 8812: ContextMenuStateNative */).showContextMenu({key: guildId,
title: guild.name, items: value4, x: 12 + env1_1 + 12,
y: pageY - env1_1 / 2, positionX: 'left', positionY: 'below', width: env1_1, height: env1_1, state: binding, dividerIndexes: [], keyboardShouldPersistTaps: 'never', requestClose: requestClose_109107, onClose: function() {
}});
}
}
}
}
function onAccessibilityAction_109115(a0) { // fn#109115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:4321, offset: 0x0233e466, size: 68 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = env0_0.find(_fun109116);
if (!(value == null || value.action == null)) {
value.action();
}
}
function requestClose_109107(a0) { // fn#109107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:3020, offset: 0x0233df87, size: 117 bytes, params: 2, frame: 12
var value;
var binding;
var activeIndex;
var property;
if (!a0) {
binding = env0_0;
value = environment.__proto__.__proto__.__proto__;
activeIndex = env3_18.activeIndex;
property = binding[activeIndex.get()];
if (property != null) {
property.action();
}
}
value = environment.__proto__.__proto__.__proto__;
env3_18.activeIndex.set(-1);
(require(8812) /* metro dependency 8812: ContextMenuStateNative */).hideContextMenu();
}
function _fun109116({name}) { // fn#109116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14612:4369, offset: 0x0233e4aa, size: 33 bytes, params: 2, frame: 2
return name === env0_0.nativeEvent.actionName;
}
@@ -0,0 +1,807 @@
/* Metro module 14394; source: modules/guilds_bar/native/GuildsBarGuildFolder.tsx; dependencies: [31, 5214, 1867, 3969, 4896, 14384, 14390, 14385, 33, 4501, 697, 3860, 566, 6819, 1357, 4577, 4000, 673, 8141, 4017, 4508, 6650, 8366, 5475, 14395, 14397, 8866, 14405, 4081, 6593, 6821, 14387, 14406, 2] */
function _fun108978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:6, offset: 0x02337985, size: 531 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_108981 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const getItemKey_108988 = function(a0) {
return a0.type;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_8 = (require(4896) /* metro dependency 4896: SortedGuildStore */).GuildsNodeType;
const guildsBarDnDStoreModule = require(14384) /* metro dependency 14384: GuildsBarDnDStore */;
const env0_9 = guildsBarDnDStoreModule.useItemDragState;
const env0_10 = guildsBarDnDStoreModule.useFolderBGHeightOffset;
const env0_11 = (require(14390) /* metro dependency 14390: GuildsBarConstants */).DEFAULT_FOLDER_COLOR;
const guildsBarConstantsModule = require(14385) /* metro dependency 14385: GuildsBarConstants */;
const env0_12 = guildsBarConstantsModule.TRANSITION_PHYSICS;
const env0_13 = guildsBarConstantsModule.FOLDER_SPRING_PHYSICS;
let value4 = require(33) /* metro dependency 33 */;
const env0_14 = value4.jsx;
const env0_15 = value4.jsxs;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun108992);
object = {code: "function GuildsBarGuildFolderTsx1(values){const{withSpring,TRANSITION_PHYSICS}=this.__closure;return{animations:{height:withSpring(values.targetHeight,TRANSITION_PHYSICS,'animate-always')},initialValues:{height:values.currentHeight}};}"};
const value6 = value.memo(FolderBGInner);
object = {code: 'function GuildsBarGuildFolderTsx2(){const{withSpring,visible,FOLDER_SPRING_PHYSICS,state,TransitionStates,runOnJS,cleanUp,fromTop,guildItemSize}=this.__closure;return{opacity:withSpring(visible.get(),FOLDER_SPRING_PHYSICS,undefined,function(finished){if(finished&&state===TransitionStates.YEETED)runOnJS(cleanUp)();}),transform:[{translateY:withSpring(visible.get()===1?0:fromTop?-guildItemSize:guildItemSize,FOLDER_SPRING_PHYSICS)},{scale:withSpring(visible.get()===1?1:fromTop?0.3:1.3,FOLDER_SPRING_PHYSICS)}]};}'};
object = {code: 'function GuildsBarGuildFolderTsx3(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED)runOnJS(cleanUp)();}'};
object = {code: 'function GuildsBarGuildFolderTsx4(values){const{dragDropInProgress,sharedId,id,isDragTarget,withSpring,TRANSITION_PHYSICS}=this.__closure;var _id;const shouldAnimate=dragDropInProgress.get()&&sharedId.get()===""+id&&!isDragTarget;sharedId.set(""+((_id=id)!==null&&_id!==void 0?_id:null));return{animations:{originY:shouldAnimate?withSpring(values.targetOriginY,TRANSITION_PHYSICS,\'animate-always\'):values.targetOriginY,height:shouldAnimate?withSpring(values.targetHeight,TRANSITION_PHYSICS,\'animate-always\'):values.targetHeight},initialValues:{originY:values.currentOriginY,height:values.currentHeight}};}'};
value = value.memo(GuildsBarGuildFolder);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarGuildFolder.tsx');
exports.default = value;
exports.GuildsBarGuildFolderBG = value6;
}
function _createForOfIteratorHelperLoose_108979(a0, a1) { // fn#108979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:357, offset: 0x02337b98, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun108980;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_108981(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_108981(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_108981(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun108980;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function MiniGuildIcon({guildId, position, selected}) { // fn#108982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:2364, offset: 0x02337d0c, size: 336 bytes, params: 2, frame: 23
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const styles = useStyles(false, Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]));
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const r9 = position === 0 ? styles.guildPreview0 : position === 1 ? styles.guildPreview1 : position === 2 ? styles.guildPreview2 : position !== 3 ? undefined : styles.guildPreview3;
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const items2 = [styles.guildPreviewIcon];
items2[1] = selected ? undefined : styles.guildPreviewIconUnselected;
items2[2] = r9;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const XXSMALL = GuildIconSizes.XXSMALL;
return (
<GuildIcon
style={items2}
guild={guild}
size={XXSMALL}
selected={selected}
key={'' + selected}
/>
);
}
function TransitionWrapper({children, fromTop, cleanUp, state}) { // fn#108984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:4767, offset: 0x02337e5c, size: 471 bytes, params: 2, frame: 28
fromTop = !(fromTop === undefined) && fromTop;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarGuildFolder');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value3 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const env0_3 = value3;
const styles = useStyles(value2, value3);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value6 = Reflect.apply(useSharedValue, reanimatedRexportModule, [state !== MOUNTED ? 0 : 1]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
const closure = TransitionWrapperA;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.visible = value6;
object2.FOLDER_SPRING_PHYSICS = FOLDER_SPRING_PHYSICS;
object2.state = state;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
object2.fromTop = fromTop;
object2.guildItemSize = value3;
closure.__closure = object2;
closure.__workletHash = 14426547532118;
closure.__initData = env0_19;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
env0_3.useEffect(_fun108987, [state, value6]);
return ((Component) => <Component style={[value7,
styles.folderScaleContainer]}>{children}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function GuildFolderIcon({item}) { // fn#108989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:5900, offset: 0x02338245, size: 135 bytes, params: 2, frame: 17
var value;
let r0 = importDefault(dependencyMap[14])('GuildFolderIcon') ? dependencyMap[21] : dependencyMap[22];
if (item.type !== 'icon') {
r0 = null;
} else {
value = importDefault(dependencyMap[23]);
value = ((Component) => <Component source={importDefault(r0)} style={item.tintStyle} />)(value);
r0 = value;
}
return r0;
}
function renderGuildFolderContent(a0, a1, a2, a3) { // fn#108990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:6056, offset: 0x023382cc, size: 167 bytes, params: 5, frame: 20
const env0_0 = a1;
const type = a1.type;
if (type === 'icon') {
return (
<TransitionWrapper
fromTop
cleanUp={a3}
state={a2}
key={a0}
>
<GuildFolderIcon item={a1} />
</TransitionWrapper>
);
}
if (type === 'preview') {
return (
<TransitionWrapper
cleanUp={a3}
state={a2}
key={a0}
>
{a1.guilds.map(_fun108991)}
</TransitionWrapper>
);
}
}
function _fun108992() { // fn#108992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:1296, offset: 0x023383ec, size: 503 bytes, params: 1, frame: 18
const value = a1;
const value2 = a2;
const r6 = value !== undefined ? value : 48;
const r8 = value2 !== undefined ? value2 : 0;
const object3 = {};
const object4 = {position: 'absolute'};
const GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
object4.top = GUILD_BAR_ITEM_MARGIN;
const GUILD_FOLDER_BACKGROUND_LEFT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_BACKGROUND_LEFT;
object4.left = GUILD_FOLDER_BACKGROUND_LEFT;
const GUILD_FOLDER_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.GUILD_FOLDER_BACKGROUND;
object4.backgroundColor = GUILD_FOLDER_BACKGROUND;
let GUILD_FOLDER_BACKGROUND_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_BACKGROUND_RADIUS;
object4.borderTopLeftRadius = GUILD_FOLDER_BACKGROUND_RADIUS;
GUILD_FOLDER_BACKGROUND_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_BACKGROUND_RADIUS;
object4.borderTopRightRadius = GUILD_FOLDER_BACKGROUND_RADIUS;
GUILD_FOLDER_BACKGROUND_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_BACKGROUND_RADIUS;
object4.borderBottomLeftRadius = GUILD_FOLDER_BACKGROUND_RADIUS;
GUILD_FOLDER_BACKGROUND_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_BACKGROUND_RADIUS;
object4.borderBottomRightRadius = GUILD_FOLDER_BACKGROUND_RADIUS;
object4.width = r6 + r8;
object3.folderBackground = object4;
object3.folderScaleContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': null, 'height': null,
'justifyContent': 'center', 'alignItems': 'center', width: r6, height: r6};
const GUILD_FOLDER_PREVIEW_ICON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_PREVIEW_ICON_MARGIN;
object3.guildPreviewIcon = {position: 'absolute', margin: GUILD_FOLDER_PREVIEW_ICON_MARGIN};
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.guildPreviewIconUnselected = object7;
object3.guildPreview0 = {'top': 0, 'left': 0};
object3.guildPreview1 = {'top': 0, 'right': 0};
object3.guildPreview2 = {'bottom': 0, 'left': 0};
object3.guildPreview3 = {'bottom': 0, 'right': 0};
const object8 = {position: 'absolute', width: r6, height: r6};
const GUILD_FOLDER_PREVIEW_OPACITY = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_PREVIEW_OPACITY;
object8.opacity = GUILD_FOLDER_PREVIEW_OPACITY;
object3.guildPreviewWrapper = object8;
return object3;
}
function FolderBGInner({folderId, totalItems, color}) { // fn#108993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:3118, offset: 0x023385e3, size: 542 bytes, params: 2, frame: 26
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarGuildFolder');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value3 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
const value4 = Reflect.apply(useToken, moduleValue2, [GUILD_BAR_ITEM_MARGIN]);
const moduleValue3 = useTokenModule;
useToken = moduleValue3.useToken;
const GUILD_FOLDER_BACKGROUND_WIDTH_OFFSET = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_BACKGROUND_WIDTH_OFFSET;
const styles = useStyles(value2, value3, Reflect.apply(useToken, moduleValue3,
[GUILD_FOLDER_BACKGROUND_WIDTH_OFFSET]));
const value9 = value3 + (value2 ? value4 : 0) + (value3 + 2 * value4) * totalItems + useFolderBGHeightOffset(folderId);
const binding = env0_3;
const useCallback = binding.useCallback;
const closure = function(a0) {
var object2 = {};
object2.height = require(dependencyMap[15]).withSpring(a0.targetHeight, TRANSITION_PHYSICS, 'animate-always');
return {animations: object2, initialValues: {height: a0.currentHeight}};
};
let object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.TRANSITION_PHYSICS = TRANSITION_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 2519256682742;
closure.__initData = env0_17;
const value10 = Reflect.apply(useCallback, binding, [closure, []]);
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const GUILD_FOLDER_COLOR_OPACITY = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_FOLDER_COLOR_OPACITY;
return ((Component) => <Component pointerEvents="none" collapsable={false} layout={value10} style={[styles.folderBackground,
env0_3.useMemo(_fun108995, [value2, color, Reflect.apply(useToken, moduleValue4,
[GUILD_FOLDER_COLOR_OPACITY])]),
{height: value9}]} />)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function GuildsBarGuildFolder({id, expanded, name, color, childNodes, isDragPreview, foldersChanged}) { // fn#108996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:7162, offset: 0x023388c9, size: 1243 bytes, params: 2, frame: 47
var object2;
const env0_3 = color;
isDragPreview = !(isDragPreview === undefined) && isDragPreview;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarGuildFolder');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const styles = useStyles(value2, Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]));
const value4 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles({disableSelectedColor: true,
disableBGColor: value2});
const {unread, mentionCount,
isMentionLowImportance} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildReadStateStore],
function() {
if (expanded) {
return {'unread': false, 'mentionCount': 0, 'isMentionLowImportance': false};
}
var env0_0 = GuildReadStateStore.getMutableGuildStates();
return childNodes.reduce(_fun108998, {'unread': false, 'mentionCount': 0, 'isMentionLowImportance': true});
});
const {selectedPreviewId,
hasGuildSelected} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SelectedGuildStore,
SortedGuildStore], _fun108999, [expanded, id, childNodes]);
const {badge,
cutouts} = (importDefault(14397) /* metro dependency 14397: useGuildsBarBottomRightBadge */)({mentionCount: mentionCount,
isMentionLowImportance: isMentionLowImportance});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const label = Reflect.apply(useStateFromStores, fluxModule, [[GuildStore], _fun109000, [name, childNodes],
importDefault(14405) /* metro dependency 14405: isGuildsBarGuildLabelEqual */]).label;
let binding = env0_3;
const {tintStyle, folderPreviewStyle} = binding.useMemo(_fun109001, [color]);
const value9 = env0_3.useMemo(function() {
return {onPress: _fun109003};
}, [id, foldersChanged]);
const value10 = env0_3.useMemo(_fun109004, [expanded, childNodes, tintStyle, selectedPreviewId]);
binding = env0_3;
let useCallback = binding.useCallback;
const value11 = Reflect.apply(useCallback, binding, [_fun109005, [expanded, styles.guildPreviewWrapper,
folderPreviewStyle]]);
const {isDragTarget, dragState, overState, itemSize, dragDropInProgress} = useItemDragState(id, isDragPreview);
const {accessibilityActions, onAccessibilityAction} = env0_3.useMemo(_fun109006, [id]);
const value14 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue('' + id);
binding = env0_3;
useCallback = binding.useCallback;
const closure = GuildsBarGuildFolderW;
object2 = {dragDropInProgress: dragDropInProgress, sharedId: value14, id: id, isDragTarget: isDragTarget};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.TRANSITION_PHYSICS = TRANSITION_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 11967845900199;
closure.__initData = env0_21;
const value15 = Reflect.apply(useCallback, binding, [closure, [id, value14, isDragTarget, dragDropInProgress]]);
const GuildsBarAnimatedItemWrapper = importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */;
const guildsBarAnimatedItemWrapperProps = {id: '' + id, draggedItemSize: itemSize,
accessibilityActions: accessibilityActions, onAccessibilityAction: onAccessibilityAction,
selected: hasGuildSelected, unread: !expanded && unread, circle: false, styles: value4, label: label,
isDragTarget: isDragTarget, dragState: dragState, sharedId: value14, cutouts: cutouts, config: value9,
isDragPreview: isDragPreview, overState: overState, preventClipping: true, expanded: expanded, layout: value15,
externalChildren: expanded ? isDragPreview ? badge : ((Component) => <Component color={color} folderId={id} totalItems={childNodes.length} />)(env0_18) : badge,
expandedChildren: ((Component) => <Component folderId={id} />)(importDefault(14406) /* metro dependency 14406: HomeDrawerFolderRow */)};
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<GuildsBarAnimatedItemWrapper {...guildsBarAnimatedItemWrapperProps}>
<TransitionGroup
renderItem={renderGuildFolderContent}
getItemKey={getItemKey_108988}
items={value10}
wrapChildren={value11}
/>
</GuildsBarAnimatedItemWrapper>
);
}
function TransitionWrapperA() { // fn#108985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:5059, owner: TransitionWrapper.a, offset: 0x02338033, size: 354 bytes, params: 1, frame: 25
const object3 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_4;
let get = binding.get;
const value3 = Reflect.apply(get, binding, []);
const closure = aE;
const object4 = {};
object4.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object4.TransitionStates = TransitionStates;
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 47605595424;
closure.__initData = env1_20;
object3.opacity = Reflect.apply(withSpring, springModule, [value3, FOLDER_SPRING_PHYSICS, undefined, closure]);
const moduleValue2 = springModule;
withSpring = moduleValue2.withSpring;
const value4 = env0_4.get();
const value5 = 1;
const items2 = [{translateY: Reflect.apply(withSpring, moduleValue2,
[value5 === value4 ? 0 : fromTop ? -env0_3 : env0_3, FOLDER_SPRING_PHYSICS])}];
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
binding = env0_4;
get = binding.get;
items2[1] = {scale: Reflect.apply(withSpring, moduleValue3, [value5 === Reflect.apply(get, binding,
[]) ? value5 : fromTop ? 0.3 : 1.3, FOLDER_SPRING_PHYSICS])};
object3.transform = items2;
return object3;
}
function _fun108987() { // fn#108987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:5742, offset: 0x02338200, size: 69 bytes, params: 1, frame: 14
const binding = env0_4;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
function _fun108991(a0, a1) { // fn#108991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:6306, offset: 0x02338373, size: 121 bytes, params: 3, frame: 17
var r0;
let value = a1;
const r1 = value === 0 || value === 1 || (value === 2 || value === 3) ? value : undefined;
value = null;
if (value != a0) {
if (value != r1) {
value = environment.__proto__;
value = <MiniGuildIcon guildId={a0} selected={a0 === require.selectedGuildId} position={r1} key={a0} />;
r0 = value;
} else {
r0 = value;
}
} else {
r0 = value;
}
return r0;
}
function _fun108995() { // fn#108995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:3836, offset: 0x02338859, size: 112 bytes, params: 1, frame: 17
var colorBinding;
var value2;
var moduleValue;
var hexWithOpacity;
var moduleValue2;
if (env0_1) {
if (color == null) {
return undefined;
}
colorBinding = color;
value2 = environment.__proto__;
if (colorBinding !== DEFAULT_FOLDER_COLOR) {
moduleValue = require(4000) /* metro dependency 4000: ColorUtils */;
hexWithOpacity = moduleValue.hexWithOpacity;
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
return {backgroundColor: Reflect.apply(hexWithOpacity, moduleValue, [moduleValue2.int2hex(color), env0_2])};
}
}
}
function _fun108997() { // fn#108997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:7523, offset: 0x02338da4, size: 88 bytes, params: 1, frame: 13
if (expanded) {
return {'unread': false, 'mentionCount': 0, 'isMentionLowImportance': false};
}
const env0_0 = GuildReadStateStore.getMutableGuildStates();
return childNodes.reduce(_fun108998, {'unread': false, 'mentionCount': 0, 'isMentionLowImportance': true});
}
function _fun108999() { // fn#108999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:8145, offset: 0x02338ec6, size: 182 bytes, params: 1, frame: 19
var r5;
var r8;
var r2;
var r1;
var value8;
var id2;
var value9;
var value10;
let value = environment.__proto__;
const guildId = SelectedGuildStore.getGuildId();
const _createForOfIteratorHelperLoose_108979Binding = _createForOfIteratorHelperLoose_108979;
const childNodesBinding = childNodes;
const value4 = undefined;
const value5 = _createForOfIteratorHelperLoose_108979Binding(childNodesBinding);
const value6 = value5();
let done = value6.done;
if (done) {
r2 = value4;
} else {
r5 = value6;
r8 = 0;
while (true) {
value8 = r5.value;
id2 = value8.id;
if (id2 === guildId) {
r2 = guildId;
break;
}
value9 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
if (value9 >= 4) {
r2 = value4;
break;
}
value10 = value5();
done = value10.done;
if (done) {
r2 = value4;
break;
}
r5 = value10;
r8 = value9;
continue;
}
}
const expandedBinding = expanded;
const value11 = false;
if (expandedBinding) {
r1 = value11;
} else if (guildId != null) {
value = SortedGuildStore.getGuildsTree();
value = value.getNode(guildId);
value = (value == null ? value4 : value.parentId) === id;
r1 = value;
} else {
r1 = value11;
}
return {selectedPreviewId: r2, hasGuildSelected: r1};
}
function _fun109000() { // fn#109000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:8584, offset: 0x02338f7c, size: 214 bytes, params: 1, frame: 21
var r2;
var r7;
var value6;
var getGuild;
var id;
var value7;
var push;
var name2;
var value8;
var value9;
let nameBinding = name;
if (nameBinding != null) {
nameBinding = name;
return {count: 1, names: [nameBinding], label: nameBinding};
}
const items = [];
const value3 = _createForOfIteratorHelperLoose_108979(childNodes);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
r7 = 0;
while (true) {
value6 = r2.value;
getGuild = GuildStore.getGuild;
id = value6.id;
value7 = Reflect.apply(getGuild, GuildStore, [id]);
if (value7 != null) {
push = items.push;
name2 = value7.name;
Reflect.apply(push, items, [name2]);
}
value8 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value8 >= 3) {
break;
}
value9 = value3();
done = value9.done;
if (done) {
break;
}
r2 = value9;
r7 = value8;
continue;
}
}
const object3 = {names: items};
childNodesBinding = childNodes;
object3.count = childNodesBinding.length;
object3.label = (require(8866) /* metro dependency 8866: ListUtils */).getListSummaryLabel(items,
childNodesBinding.length);
return object3;
}
function _fun109001() { // fn#109001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:8895, offset: 0x02339052, size: 86 bytes, params: 1, frame: 14
let value = environment.__proto__;
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
value = colorUtilsModule.int2hex(color ?? DEFAULT_FOLDER_COLOR);
return {tintStyle: {tintColor: value}, folderPreviewStyle: {backgroundColor: value}};
}
function _fun109002() { // fn#109002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:9065, offset: 0x023390a8, size: 17 bytes, params: 1, frame: 2
return {onPress: onPress_109003};
}
function _fun109004() { // fn#109004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:9296, offset: 0x023391a6, size: 176 bytes, params: 1, frame: 18
var r3;
var value5;
var type;
var GUILD;
var push;
var id;
var length;
var value6;
if (expanded) {
return [{type: 'icon', tintStyle: tintStyle}];
}
const items = [];
const value3 = _createForOfIteratorHelperLoose_108979(childNodes);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
reducibleLoop2: while (true) {
value5 = r3.value;
type = value5.type;
GUILD = GuildsNodeType.GUILD;
if (type === GUILD) {
push = items.push;
id = value5.id;
Reflect.apply(push, items, [id]);
length = items.length;
reducibleJoin4: while (true) {
if (length >= 4) {
break reducibleLoop2;
}
break reducibleJoin4;
}
}
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop2;
}
r3 = value6;
continue reducibleLoop2;
}
}
return [{type: 'preview', guilds: items, selectedGuildId: selectedPreviewId}];
}
function _fun109005(a0) { // fn#109005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:9558, offset: 0x02339256, size: 127 bytes, params: 2, frame: 21
const value = environment.__proto__;
const Fragment = env1_3.Fragment;
return (
<Fragment key="wrapper">
{[((Component) => <Component style={[styles.guildPreviewWrapper,
expanded ? undefined : folderPreviewStyle]} />)(importDefault(6821) /* metro dependency 6821: NativeView */),
a0]}
</Fragment>
);
}
function _fun109006() { // fn#109006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:9788, offset: 0x023392d5, size: 87 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
const getGuildFolderMenuItems = (require(14387) /* metro dependency 14387: GuildsBarFolderMenuItems */).getGuildFolderMenuItems;
value = Reflect.apply(getGuildFolderMenuItems, value, [id]);
const object2 = {};
object2.accessibilityActions = value.map(function(a0) {
return {name: a0.label, label: a0.label};
});
object2.onAccessibilityAction = onAccessibilityAction_109008;
return object2;
}
function GuildsBarGuildFolderW(a0) { // fn#109010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:10143, owner: GuildsBarGuildFolder.w, offset: 0x02339370, size: 304 bytes, params: 2, frame: 20
var r4;
var moduleValue;
var moduleValue2;
var value;
let r3 = dragDropInProgress.get() && env0_12.get() === '' + id && !isDragTarget;
const binding = env0_12;
const set = binding.set;
const idBinding = id;
const value6 = null;
Reflect.apply(set, binding, ['' + (value6 != idBinding ? id : value6)]);
const object = {};
if (r3) {
value = environment.__proto__;
moduleValue = require(4577) /* metro dependency 4577: spring */;
value = moduleValue.withSpring(a0.targetOriginY, TRANSITION_PHYSICS, 'animate-always');
r4 = value;
} else {
r4 = a0.targetOriginY;
}
object.originY = r4;
if (r3) {
value = environment.__proto__;
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
value = moduleValue2.withSpring(a0.targetHeight, TRANSITION_PHYSICS, 'animate-always');
r3 = value;
} else {
r3 = a0.targetHeight;
}
object.height = r3;
return {animations: object, initialValues: {originY: a0.currentOriginY, height: a0.currentHeight}};
}
function aE(a0) { // fn#108986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:5120, owner: TransitionWrapper.a.e, offset: 0x02338195, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun108998(a0, a1) { // fn#108998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:7641, offset: 0x02338dfc, size: 202 bytes, params: 3, frame: 10
var highImportanceMentionCount;
var r2;
var r4;
var r1;
var binding;
var property;
var value2;
var value3;
let id = a1.id;
if (id != null) {
binding = env0_0;
id = a1.id;
property = binding[id];
value2 = undefined;
highImportanceMentionCount = property == null ? value2 : property.highImportanceMentionCount;
value3 = 0;
r2 = highImportanceMentionCount ?? value3;
binding = env0_0;
id = a1.id;
property = binding[id];
a0.mentionCount = a0.mentionCount + r2 + ((property == null ? value2 : property.lowImportanceMentionCount) ?? value3);
r4 = a0.unread || (env0_0[a1.id] == null ? value2 : env0_0[a1.id].unread);
r1 = r4 != null && r4;
a0.unread = r1;
r1 = a0.isMentionLowImportance && value3 === r2;
a0.isMentionLowImportance = r1;
}
return a0;
}
function onPress_109003() { // fn#109003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:9071, offset: 0x023390b9, size: 237 bytes, params: 1, frame: 16
var value2;
var Set;
var value3;
var set;
let foldersChangedBinding = foldersChanged;
if (foldersChangedBinding != null) {
value2 = foldersChanged.get();
if (value2.has('' + id)) {
Set = global.Set;
foldersChangedBinding = foldersChanged;
value3 = foldersChangedBinding.get();
set = new Set();
set.add('' + id);
foldersChangedBinding.set(set);
}
}
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
const defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.toggleGuildFolderExpand(id);
}
function onAccessibilityAction_109008(a0) { // fn#109008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14591:9907, offset: 0x0233932c, size: 68 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = env0_0.find(_fun109009);
if (!(value == null || value.action == null)) {
value.action();
}
}
@@ -0,0 +1,41 @@
/* Metro module 14400; source: modules/guilds_bar/native/GuildsBarGuildJoinRequestBadge.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 3972, 14401, 14402, 14403, 11811, 5475, 2] */
function _fun109048(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14597:6, offset: 0x0233b59e, size: 276 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.badgeImageContainer = {'position': 'absolute', 'bottom': -3, 'right': -3, 'height': 22, 'width': 22,
'borderColor': null, 'borderWidth': 3, 'borderRadius': 11, 'justifyContent': 'center', 'alignItems': 'center',
'overflow': 'hidden', borderColor: BACKGROUND_BASE_LOWEST};
const DARK_1_LIGHT_08 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_1_LIGHT_08;
object2.badgeImage = {'height': 16, 'width': 16, opacity: DARK_1_LIGHT_08};
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarGuildJoinRequestBadge.tsx');
exports.default = GuildsBarGuildJoinRequestBadge;
}
function GuildsBarGuildJoinRequestBadge({style, joinRequestState}) { // fn#109049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14597:550, offset: 0x0233b6b2, size: 357 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles();
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
const REJECTED = GuildJoinRequestApplicationStatuses.REJECTED;
const r8 = REJECTED === joinRequestState ? importDefault(14401) /* metro dependency 14401 */ : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.SUBMITTED === joinRequestState ? importDefault(14402) /* metro dependency 14402 */ : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.STARTED === joinRequestState ? importDefault(14403) /* metro dependency 14403 */ : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.APPROVED !== joinRequestState ? null : importDefault(11811) /* metro dependency 11811 */;
if (r8 == null) {
r0 = null;
} else {
var viewBindingProps = {pointerEvents: 'none', style: [styles.badgeImageContainer, style]};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = <View {...viewBindingProps}>{((Component) => <Component source={r8} style={styles.badgeImage} />)(value)}</View>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,90 @@
/* Metro module 14443; source: modules/guilds_bar/native/GuildsBarItemEmptyNUX.tsx; dependencies: [31, 27, 3969, 661, 7607, 33, 4501, 697, 3860, 566, 6947, 4017, 4577, 1244, 14444, 14395, 2] */
function _fun109291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14640:6, offset: 0x02344cd2, size: 339 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.Pressable;
const env0_5 = value2.Image;
const env0_6 = value2.View;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.DM_WIDTH;
const env0_9 = constantsModule.EMPTY_NUX_SERVER;
const env0_10 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MODE_CHANGE_PHYSICS;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.jsxs;
const env0_13 = {'top': 4, 'left': 12, 'bottom': 4, 'right': 12};
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun109292);
object = {code: "function GuildsBarItemEmptyNUXTsx1(){const{withSpring,selected,activeColor,inactiveColor,MODE_CHANGE_PHYSICS}=this.__closure;return{backgroundColor:withSpring(selected?activeColor:inactiveColor,MODE_CHANGE_PHYSICS,'animate-always')};}"};
value = value.memo(GuildsBarEmptyNUX);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarItemEmptyNUX.tsx');
exports.default = value;
}
function _fun109292(a0) { // fn#109292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14640:320, offset: 0x02344e25, size: 184 bytes, params: 2, frame: 15
const GUILD_BAR_ITEM_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_PADDING;
return {container: {'position': 'relative', 'flexDirection': 'row', 'alignItems': 'center', 'marginTop': null,
'height': 55, marginTop: GUILD_BAR_ITEM_PADDING, width: a0}, guildIndicator: {'position': 'absolute',
'left': null, 'top': 4,
left: -(DM_WIDTH - a0) / 2}, icon: {'width': 59, 'height': 55, 'marginLeft': -3, 'marginRight': -6}, backdrop: {'position': 'absolute', 'top': 16, width: a0, height: a0 - 10, borderRadius: a0 / 3}};
}
function GuildsBarEmptyNUX() { // fn#109293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14640:922, offset: 0x02344edd, size: 729 bytes, params: 1, frame: 27
var object2;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const styles = useStyles(Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]));
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId() === EMPTY_NUX_SERVER;
});
const binding = env0_3;
let closure = function() {
require(dependencyMap[10]).transitionToGuild(EMPTY_NUX_SERVER);
};
const value4 = binding.useCallback(closure, []);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value6 = binding.useCallback(_fun109296, [value5]);
const value7 = binding.useCallback(_fun109297, [value5]);
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const value8 = Reflect.apply(useToken, moduleValue4, [BACKGROUND_SURFACE_HIGH]);
const moduleValue5 = useTokenModule;
useToken = moduleValue5.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const value9 = Reflect.apply(useToken, moduleValue5, [BACKGROUND_BRAND]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = GuildsBarEmptyNUXO;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, selected: value3,
activeColor: value9, inactiveColor: value8, MODE_CHANGE_PHYSICS: MODE_CHANGE_PHYSICS};
closure.__workletHash = 15012639840543;
closure.__initData = env0_15;
const value10 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
object2 = {style: styles.container, onPressIn: value6, onPressOut: value7, onPress: value4, accessible: true,
accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3S2xmm']);
object2.accessibilityState = {selected: value3};
object2.hitSlop = env0_13;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [<View2 style={[styles.backdrop, value10]} />];
items2[1] = <Image style={styles.icon} source={importDefault(14444) /* metro dependency 14444 */} resizeMode="contain" />;
const UnreadIndicator = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).UnreadIndicator;
items2[2] = <View style={styles.guildIndicator}><UnreadIndicator selected={value3 === true} /></View>;
return (
<Pressable {...object2}>
{items2}
</Pressable>
);
}
function GuildsBarEmptyNUXO() { // fn#109298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14640:1395, owner: GuildsBarEmptyNUX.o, offset: 0x02345229, size: 75 bytes, params: 1, frame: 17
const springModule = require(4577) /* metro dependency 4577: spring */;
return {backgroundColor: springModule.withSpring(env0_0 ? env0_3 : env0_2, MODE_CHANGE_PHYSICS, 'animate-always')};
}
@@ -0,0 +1,372 @@
/* Metro module 14446; source: modules/guilds_bar/native/GuildsBarItemIconPressable.tsx; dependencies: [57, 31, 27, 14385, 33, 4017, 7599, 4501, 697, 1357, 3860, 4504, 10083, 7701, 4507, 2] */
function _fun109322(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:6, offset: 0x02345e50, size: 967 bytes, params: 8, frame: 32
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const {Image, Pressable} = require(27) /* metro dependency 27 */;
const GUILD_ITEM_SIZE = (require(14385) /* metro dependency 14385: GuildsBarConstants */).GUILD_ITEM_SIZE;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.Fragment;
const env0_9 = value3.jsxs;
const env0_10 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
const env0_11 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Image);
const value6 = GUILD_ITEM_SIZE + 12;
const value7 = 0.6666666666666666 * value6;
const value8 = 0.4666666666666667 * value6;
const env0_15 = 0.05 * value6;
const value9 = 0.48333333333333334 * value6;
const value10 = 0.11666666666666667 * value6;
const env0_18 = 0.35 * value7;
const value11 = 0.2857142857142857 * value8;
const value12 = 0.5333333333333333 * value6;
const value13 = 0.3125 * value12;
const value14 = (value6 - value12) / 2;
const value15 = 0.3333333333333333 * value6;
const env0_25 = (value6 - GUILD_ITEM_SIZE) / 2;
const env0_26 = value15 + value12 - GUILD_ITEM_SIZE;
const env0_27 = GUILD_ITEM_SIZE / 2;
object2 = {duration: 150};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
let inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Reflect.apply(inOut, Easing, [Easing2.ease]);
object2 = {duration: 240};
inOut = Easing.inOut;
const Easing3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Reflect.apply(inOut, Easing, [Easing3.ease]);
object2 = {};
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
let RoundedRect = CutoutShape.RoundedRect;
object2.shape = RoundedRect;
object2.x = value14 - 2;
object2.y = value15 - 2;
const value16 = value12 + 4;
object2.width = value16;
object2.height = value16;
object2.cornerRadius = value13 + 2;
RoundedRect = CutoutShape.RoundedRect;
const value17 = value8 + 4;
const env0_30 = [{shape: RoundedRect, x: value9 - 2, y: value10 - 2, width: value17, height: value17,
cornerRadius: value11 + 2, rotationDegrees: 9}, object2];
const env0_31 = [object2];
const env0_32 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun109334);
object2 = {code: 'function GuildsBarItemIconPressableTsx1(){const{isExpandedSV,isSelectedSV,OVERLAY_BORDER_RADIUS,guildItemSelectedBorderRadius,OVERLAY_COLLAPSED_BORDER_RADIUS,withTiming,OVERLAY_ICON_SIZE,OVERLAY_COLLAPSED_SIZE,OVERLAY_TIMING,OVERLAY_ICON_OFFSET_X,OVERLAY_COLLAPSED_LEFT,OVERLAY_ICON_OFFSET_Y,OVERLAY_COLLAPSED_TOP,interpolateColor,styles}=this.__closure;const expanded=isExpandedSV.get()!==0;const selected=isSelectedSV.get()!==0;const taretBorderRadius=function(){if(expanded){return OVERLAY_BORDER_RADIUS;}if(selected){return guildItemSelectedBorderRadius;}return OVERLAY_COLLAPSED_BORDER_RADIUS;}();return{width:withTiming(expanded?OVERLAY_ICON_SIZE:OVERLAY_COLLAPSED_SIZE,OVERLAY_TIMING),height:withTiming(expanded?OVERLAY_ICON_SIZE:OVERLAY_COLLAPSED_SIZE,OVERLAY_TIMING),borderRadius:withTiming(taretBorderRadius,OVERLAY_TIMING),left:withTiming(expanded?OVERLAY_ICON_OFFSET_X:OVERLAY_COLLAPSED_LEFT,OVERLAY_TIMING),top:withTiming(expanded?OVERLAY_ICON_OFFSET_Y:OVERLAY_COLLAPSED_TOP,OVERLAY_TIMING),backgroundColor:withTiming(interpolateColor(selected?1:0,[0,1],[styles.newIconInactive.backgroundColor,styles.newIconActive.backgroundColor]),OVERLAY_TIMING)};}'};
object2 = {code: "function GuildsBarItemIconPressableTsx2(){const{isExpandedSV,withTiming,BG_LARGE_ICON_SIZE,GUILD_ICON_TIMING,BG_LARGE_ICON_ROTATION_DEGREES}=this.__closure;const expanded=isExpandedSV.get()!==0;return{transform:[{translateX:withTiming(expanded?0:BG_LARGE_ICON_SIZE/2,GUILD_ICON_TIMING)},{translateY:withTiming(expanded?0:BG_LARGE_ICON_SIZE/2,GUILD_ICON_TIMING)},{rotate:BG_LARGE_ICON_ROTATION_DEGREES+'deg'},{scale:withTiming(expanded?1:0,GUILD_ICON_TIMING)}]};}"};
object2 = {code: "function GuildsBarItemIconPressableTsx3(){const{isExpandedSV,withTiming,BG_SMALL_ICON_SIZE,GUILD_ICON_TIMING,BG_SMALL_ICON_ROTATION_DEGREES}=this.__closure;const expanded=isExpandedSV.get()!==0;return{transform:[{translateX:withTiming(expanded?0:-BG_SMALL_ICON_SIZE/2,GUILD_ICON_TIMING)},{translateY:withTiming(expanded?0:BG_SMALL_ICON_SIZE/2,GUILD_ICON_TIMING)},{rotate:BG_SMALL_ICON_ROTATION_DEGREES+'deg'},{scale:withTiming(expanded?1:0,GUILD_ICON_TIMING)}]};}"};
object2 = {code: 'function GuildsBarItemIconPressableTsx4(){const{stylesClientThemeOverride,styles,active,selected,withTiming,desaturated,timingStandard}=this.__closure;var _stylesClientThemeOve,_stylesClientThemeOve2;const defaultBackgroundColor=(_stylesClientThemeOve=(_stylesClientThemeOve2=stylesClientThemeOverride)===null||_stylesClientThemeOve2===void 0?void 0:_stylesClientThemeOve2.backgroundColor)!==null&&_stylesClientThemeOve!==void 0?_stylesClientThemeOve:styles.icon.backgroundColor;const isActive=active.get()||selected;return{backgroundColor:withTiming(isActive?desaturated?styles.iconColorDesaturated.color:styles.iconColorActive.color:defaultBackgroundColor,timingStandard)};}'};
object2 = {code: 'function GuildsBarItemIconPressableTsx5(){const{active,selected,withTiming,styles,desaturated,timingNone,timingStandard}=this.__closure;const isActive=active.get()||selected;return{tintColor:withTiming(isActive?styles.iconColor.color:desaturated?styles.iconColorDesaturated.color:styles.iconColorActive.color,isActive?timingNone:timingStandard)};}'};
value = value.memo(GuildsBarItemIconPresable);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarItemIconPressable.tsx');
exports.default = value;
exports.BG_CONTAINER_SIZE = value6;
}
function GuildsBarItemIconPressableWithGuildIcons({backgroundIcons, isExpanded, selected, onPress, onLayout, accessibilityLabel, style}) { // fn#109323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:4161, offset: 0x02346217, size: 1372 bytes, params: 2, frame: 40
var object2;
var r6;
var jsxRuntimeEnv0_8Binding;
var ClipView;
var items3;
var ClipView2;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarItemIconPressable');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value3 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const GUILD_ITEM_SELECTED_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_ITEM_SELECTED_BORDER_RADIUS;
const value4 = Reflect.apply(useToken, moduleValue2, [GUILD_ITEM_SELECTED_BORDER_RADIUS]);
const styles = useStyles(value2, value3);
let binding = env0_4Binding;
var [property, env0_4] = binding.useRef(0)(env0_4Binding.useState(false), 2);
binding = env0_4Binding;
let closure = _fun109324;
const value9 = binding.useCallback(closure, []);
const r1 = isExpanded && property;
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r1 ? 1 : 0);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(selected ? 1 : 0);
env0_4Binding.useEffect(_fun109325, [r1, value10, selected, value11]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = GuildsBarItemIconPressableWithGuildIconsQ;
object2 = {isExpandedSV: value10, isSelectedSV: value11, OVERLAY_BORDER_RADIUS: env0_21,
guildItemSelectedBorderRadius: value4, OVERLAY_COLLAPSED_BORDER_RADIUS: env0_27};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.OVERLAY_ICON_SIZE = env0_20;
object2.OVERLAY_COLLAPSED_SIZE = GUILD_ITEM_SIZE;
object2.OVERLAY_TIMING = env0_28;
object2.OVERLAY_ICON_OFFSET_X = env0_22;
object2.OVERLAY_COLLAPSED_LEFT = env0_25;
object2.OVERLAY_ICON_OFFSET_Y = env0_23;
object2.OVERLAY_COLLAPSED_TOP = env0_26;
object2.interpolateColor = reanimatedRexportModule.interpolateColor;
object2.styles = styles;
closure.__closure = object2;
closure.__workletHash = 9223164272732;
closure.__initData = env0_33;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = GuildsBarItemIconPressableWithGuildIcons$;
object2 = {isExpandedSV: value10};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.BG_LARGE_ICON_SIZE = env0_13;
object2.GUILD_ICON_TIMING = env0_29;
object2.BG_LARGE_ICON_ROTATION_DEGREES = -8;
closure.__closure = object2;
closure.__workletHash = 16484002406012;
closure.__initData = env0_34;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = GuildsBarItemIconPressableWithGuildIconsEe;
object2 = {isExpandedSV: value10};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.BG_SMALL_ICON_SIZE = env0_14;
object2.GUILD_ICON_TIMING = env0_29;
object2.BG_SMALL_ICON_ROTATION_DEGREES = 9;
closure.__closure = object2;
closure.__workletHash = 8721375757202;
closure.__initData = env0_35;
const value14 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const items2 = [styles.bgContainer, style];
const value15 = backgroundIcons.length >= 2;
if (value15) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
binding = env0_11;
items3 = [<ClipView style={styles.bgClipView} cutouts={env0_30}>{((Component) => <Component style={[styles.bgIconLarge,
value13]} source={backgroundIcons[0]} onLoad={value9} />)(binding)}</ClipView>];
ClipView2 = importDefault(7599) /* metro dependency 7599: ClipView */;
binding = env0_11;
items3[1] = <ClipView2 style={styles.bgSmallClipView} cutouts={env0_31}>{((Component) => <Component style={[styles.bgIconSmall,
value14]} source={backgroundIcons[1]} onLoad={value9} />)(binding)}</ClipView2>;
r6 = <>{items3}</>;
} else {
r6 = value15;
}
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items6 = [styles.overlayIconBase, value12];
const PlusSmallIcon = (require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
return (
<Pressable
style={items2}
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
onLayout={onLayout}
onPress={onPress}
>
{r6}
<View style={items6}>
<PlusSmallIcon size="lg" color={selected ? colors.WHITE : colors.ICON_SUBTLE} />
</View>
</Pressable>
);
}
function GuildsBarItemIconPresableNoIcons({iconSource, selected, desaturated, onPress, onLayout, accessibilityLabel, style}) { // fn#109329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:7975, offset: 0x02346b53, size: 658 bytes, params: 2, frame: 34
var object2;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarItemIconPressable');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const styles = useStyles(value2, Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]));
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride(styles.iconBackground);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_4 = value5;
const value6 = env0_4.useCallback(_fun109330, [value5]);
const value7 = env0_4.useCallback(_fun109331, [value5]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = GuildsBarItemIconPresableNoIconsE;
object2 = {stylesClientThemeOverride: value4, styles: styles, active: value5, selected: selected};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.desaturated = desaturated;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 15959074190934;
closure.__initData = env0_36;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = GuildsBarItemIconPresableNoIconsT;
object2 = {active: value5, selected: selected};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.styles = styles;
object2.desaturated = desaturated;
object2.timingNone = (require(4507) /* metro dependency 4507: timingPresets */).timingNone;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 3048736124982;
closure.__initData = env0_37;
return ((Component) => <Component style={[styles.icon, value4, style,
value8]} accessibilityRole="button" accessibilityLabel={accessibilityLabel} onLayout={onLayout} onPress={onPress} onPressIn={value6} onPressOut={value7}>{((Component) => <Component source={iconSource} style={Reflect.apply(useAnimatedStyle,
moduleValue5, [closure])} />)(env0_11)}</Component>)(env0_10);
}
function _fun109334() { // fn#109334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:885, offset: 0x02346f5f, size: 670 bytes, params: 1, frame: 18
const value = a0;
const value2 = a1;
let r3 = value !== undefined ? value : false;
const r7 = value2 !== undefined ? value2 : GUILD_ITEM_SIZE;
const object2 = {};
let colors = (importDefault(697) /* metro dependency 697: native */).colors;
let BACKGROUND_MOD_STRONG = colors.BACKGROUND_MOD_STRONG;
object2.iconBackground = {backgroundColor: BACKGROUND_MOD_STRONG};
const object4 = {};
let GUILD_BAR_ITEM_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_PADDING;
object4.marginTop = GUILD_BAR_ITEM_PADDING;
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object4.width = GUILD_BAR_ITEM_SIZE;
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object4.height = GUILD_BAR_ITEM_SIZE;
object4.borderRadius = r3 ? (importDefault(697) /* metro dependency 697: native */).radii.lg : r7 / 2;
object4.justifyContent = 'center';
object4.alignItems = 'center';
colors = (importDefault(697) /* metro dependency 697: native */).colors;
object4.backgroundColor = r3 ? colors.BACKGROUND_MOD_SUBTLE : colors.BACKGROUND_SURFACE_HIGH;
object2.icon = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.iconColor = {color: WHITE};
const defaultImport = importDefault(697) /* metro dependency 697: native */;
r3 = r3 ? defaultImport.colors.MOBILE_GUILDBAR_ICON_DEFAULT : defaultImport.unsafe_rawColors.GREEN_360;
object2.iconColorActive = {color: r3};
const ICON_SUBTLE = defaultImport.colors.ICON_SUBTLE;
object2.iconColorDesaturated = {color: ICON_SUBTLE};
const BACKGROUND_BRAND = defaultImport.colors.BACKGROUND_BRAND;
object2.newIconActive = {backgroundColor: BACKGROUND_BRAND};
BACKGROUND_MOD_STRONG = defaultImport.colors.BACKGROUND_MOD_STRONG;
object2.newIconInactive = {backgroundColor: BACKGROUND_MOD_STRONG};
GUILD_BAR_ITEM_PADDING = defaultImport.modules.mobile.GUILD_BAR_ITEM_PADDING;
const binding = env0_12;
object2.bgContainer = {marginTop: GUILD_BAR_ITEM_PADDING, width: binding, height: binding};
object2.bgClipView = {width: binding, height: binding};
object2.bgIconLarge = {left: env0_15, top: 0, width: env0_13, height: env0_13, borderRadius: env0_18};
object2.bgSmallClipView = {position: 'absolute', width: binding, height: binding};
object2.bgIconSmall = {position: 'absolute', left: env0_16, top: env0_17, width: env0_14, height: env0_14,
borderRadius: env0_19};
object2.overlayIconBase = {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center'};
return object2;
}
function GuildsBarItemIconPresable({iconSource, backgroundIcons, isExpanded, desaturated, selected, onPress, onLayout, accessibilityLabel, style}) { // fn#109335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:9450, offset: 0x023471fd, size: 186 bytes, params: 2, frame: 22
isExpanded = !(isExpanded === undefined) && isExpanded;
desaturated = !(desaturated === undefined) && desaturated;
selected = !(selected === undefined) && selected;
return backgroundIcons != null ? <GuildsBarItemIconPressableWithGuildIcons backgroundIcons={backgroundIcons} isExpanded={isExpanded} selected={selected} onPress={onPress} onLayout={onLayout} accessibilityLabel={accessibilityLabel} style={style} /> : <GuildsBarItemIconPresableNoIcons iconSource={iconSource} selected={selected} desaturated={desaturated} onPress={onPress} onLayout={onLayout} accessibilityLabel={accessibilityLabel} style={style} />;
}
function _fun109324() { // fn#109324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:4572, offset: 0x02346773, size: 54 bytes, params: 1, frame: 12
const binding = env0_3;
binding.current = binding.current + 1;
if (binding.current >= 2) {
env0_4(true);
}
}
function _fun109325() { // fn#109325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:4700, offset: 0x023467a9, size: 59 bytes, params: 1, frame: 14
let binding = env0_6;
const value2 = 0;
binding.set(env0_5 ? 1 : value2);
binding = env0_7;
binding.set(selected ? 1 : value2);
}
function GuildsBarItemIconPressableWithGuildIconsQ() { // fn#109326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:4786, owner: GuildsBarItemIconPressableWithGuildIcons.Q, offset: 0x023467e4, size: 420 bytes, params: 1, frame: 24
let binding = env0_6;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const value3 = 0;
const value4 = value3 !== value2;
binding = env0_7;
get = binding.get;
const value5 = value3 !== Reflect.apply(get, binding, []);
const r13 = value4 ? env1_21 : value5 ? env0_1 : env1_27;
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
object2.width = Reflect.apply(withTiming, timingModule, [value4 ? env1_20 : GUILD_ITEM_SIZE, env1_28]);
const moduleValue2 = timingModule;
object2.height = moduleValue2.withTiming(value4 ? env1_20 : GUILD_ITEM_SIZE, env1_28);
object2.borderRadius = timingModule.withTiming(r13, env1_28);
const moduleValue4 = timingModule;
object2.left = moduleValue4.withTiming(value4 ? env1_22 : env1_25, env1_28);
const moduleValue5 = timingModule;
object2.top = moduleValue5.withTiming(value4 ? env1_23 : env1_26, env1_28);
const moduleValue6 = timingModule;
withTiming = moduleValue6.withTiming;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolateColor = reanimatedRexportModule.interpolateColor;
const r8 = value5 ? 1 : value3;
const stylesBinding = styles;
object2.backgroundColor = Reflect.apply(withTiming, moduleValue6, [Reflect.apply(interpolateColor,
reanimatedRexportModule, [r8, [0, 1], [stylesBinding.newIconInactive.backgroundColor,
stylesBinding.newIconActive.backgroundColor]]), env1_28]);
return object2;
}
function GuildsBarItemIconPressableWithGuildIcons$() { // fn#109327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:5627, owner: GuildsBarItemIconPressableWithGuildIcons.$, offset: 0x02346988, size: 228 bytes, params: 1, frame: 22
let value = env0_6.get();
const value2 = 0;
value = value2 !== value;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const items2 = [{translateX: timingModule.withTiming(value ? value2 : env1_13 / 2, env1_29)}];
const moduleValue2 = timingModule;
items2[1] = {translateY: moduleValue2.withTiming(value ? value2 : env1_13 / 2, env1_29)};
items2[2] = {rotate: '-8deg'};
const moduleValue3 = timingModule;
items2[3] = {scale: moduleValue3.withTiming(value ? 1 : value2, env1_29)};
return {transform: items2};
}
function GuildsBarItemIconPressableWithGuildIconsEe() { // fn#109328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:6035, owner: GuildsBarItemIconPressableWithGuildIcons.ee, offset: 0x02346a6c, size: 231 bytes, params: 1, frame: 22
let value = env0_6.get();
const value2 = 0;
value = value2 !== value;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const items2 = [{translateX: timingModule.withTiming(value ? value2 : -env1_14 / 2, env1_29)}];
const moduleValue2 = timingModule;
items2[1] = {translateY: moduleValue2.withTiming(value ? value2 : env1_14 / 2, env1_29)};
items2[2] = {rotate: '9deg'};
const moduleValue3 = timingModule;
items2[3] = {scale: moduleValue3.withTiming(value ? 1 : value2, env1_29)};
return {transform: items2};
}
function _fun109330() { // fn#109330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:8328, offset: 0x02346de5, size: 21 bytes, params: 1, frame: 11
return env0_4.set(true);
}
function _fun109331() { // fn#109331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:8365, offset: 0x02346dfa, size: 21 bytes, params: 1, frame: 11
return env0_4.set(false);
}
function GuildsBarItemIconPresableNoIconsE() { // fn#109332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:8416, owner: GuildsBarItemIconPresableNoIcons.E, offset: 0x02346e0f, size: 176 bytes, params: 1, frame: 18
let backgroundColor = env0_3?.backgroundColor;
backgroundColor = backgroundColor ?? styles.icon.backgroundColor;
const r5 = env0_4.get() || selected;
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
object2.backgroundColor = timingModule.withTiming(r5 ? desaturated ? styles.iconColorDesaturated.color : styles.iconColorActive.color : backgroundColor,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
return object2;
}
function GuildsBarItemIconPresableNoIconsT() { // fn#109333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14643:8879, owner: GuildsBarItemIconPresableNoIcons.T, offset: 0x02346ebf, size: 160 bytes, params: 1, frame: 19
let r1 = env0_4.get() || selected;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const color = r1 ? styles.iconColor.color : desaturated ? styles.iconColorDesaturated.color : styles.iconColorActive.color;
const value = require(4507) /* metro dependency 4507: timingPresets */;
r1 = r1 ? value.timingNone : value.timingStandard;
return {tintColor: Reflect.apply(withTiming, timingModule, [color, r1])};
}
@@ -0,0 +1,61 @@
/* Metro module 14442; source: modules/guilds_bar/native/GuildsBarItemUnavailableGuilds.tsx; dependencies: [31, 27, 4646, 33, 4501, 697, 4647, 1244, 566, 14433, 2] */
function _fun109287(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14639:6, offset: 0x023449d4, size: 348 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.Image;
const env0_4 = value2.Pressable;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const GUILD_BAR_ITEM_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_PADDING;
object2.unavailableGuilds = {'marginTop': null, 'justifyContent': 'center', 'alignItems': 'center',
marginTop: GUILD_BAR_ITEM_PADDING};
const object4 = {};
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object4.width = GUILD_BAR_ITEM_SIZE;
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object4.height = GUILD_BAR_ITEM_SIZE;
object2.unavailableGuildsIcon = object4;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(GuildsBarItemUnavailableGuilds);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarItemUnavailableGuilds.tsx');
exports.default = value;
}
function GuildsBarItemUnavailableGuilds() { // fn#109288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14639:447, offset: 0x02344b30, size: 244 bytes, params: 1, frame: 23
var r0;
var intl;
const styles = useStyles();
const totalUnavailableGuilds = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildAvailabilityStore],
function() {
return GuildAvailabilityStore.totalUnavailableGuilds;
});
if (totalUnavailableGuilds <= 0) {
r0 = null;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <Pressable accessibilityRole="button" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['MEpX+2'],
{count: totalUnavailableGuilds})} onPress={onPress_109290} style={styles.unavailableGuilds}><Image style={styles.unavailableGuildsIcon} source={importDefault(14433) /* metro dependency 14433 */} /></Pressable>;
}
return r0;
}
function GuildsBarItemUnavailableGuildsOnPress() { // fn#109290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14639:704, owner: GuildsBarItemUnavailableGuilds.onPress, offset: 0x02344c33, size: 159 bytes, params: 1, frame: 20
const totalUnavailableGuildsBinding = totalUnavailableGuilds;
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const R0RpRX = t.R0RpRX;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [R0RpRX]), body: intl.format(t['TnH05/'],
{count: totalUnavailableGuildsBinding})}]);
}
@@ -0,0 +1,48 @@
/* Metro module 14409; source: modules/guilds_bar/native/GuildsBarMessages.tsx; dependencies: [31, 3969, 661, 33, 14410, 1357, 14395, 566, 14397, 697, 1244, 14411, 6682, 2] */
function _fun109079(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14606:6, offset: 0x0233c69f, size: 203 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
object = {onPress: function() {
importDefault(dependencyMap[4])(ME);
}};
value = value.memo(GuildsBarMessages);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarMessages.tsx');
exports.default = value;
}
function GuildsBarMessages() { // fn#109081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14606:186, offset: 0x0233c78e, size: 398 bytes, params: 1, frame: 21
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildsBarMessages');
const value3 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], _fun109082);
const {badge,
cutouts} = (importDefault(14397) /* metro dependency 14397: useGuildsBarBottomRightBadge */)({mentionCount: 0});
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
const r7 = value4 ? colors.WHITE : colors.MOBILE_GUILDBAR_ICON_DEFAULT;
const GuildsBarAnimatedItemWrapper = importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */;
const defaultImport3Props = {selected: value4, circle: !value2 && !value4, unread: false, styles: value3,
cutouts: cutouts, config: env0_6, overState: undefined};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const YUU0RF = (require(1244) /* metro dependency 1244: indexNative */).t.YUU0RF;
defaultImport3Props.label = Reflect.apply(string, intl, [YUU0RF]);
defaultImport3Props.externalChildren = badge;
defaultImport3Props.expandedChildren = ((Component) => <Component />)(importDefault(14411) /* metro dependency 14411: HomeDrawerDirectMessagesRow */);
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
return (
<GuildsBarAnimatedItemWrapper {...defaultImport3Props}>
<ChatIcon color={r7} />
</GuildsBarAnimatedItemWrapper>
);
}
function _fun109082() { // fn#109082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14606:330, offset: 0x0233c91c, size: 36 bytes, params: 1, frame: 11
const value = environment.__proto__;
const guildId = SelectedGuildStore.getGuildId();
return guildId == null || guildId === ME;
}
@@ -0,0 +1,127 @@
/* Metro module 14438; source: modules/guilds_bar/native/GuildsBarPendingGuild.tsx; dependencies: [31, 3970, 1422, 3969, 4896, 33, 4501, 697, 14395, 3860, 566, 6819, 14416, 14397, 3972, 8926, 14410, 14425, 14386, 4017, 14428, 5475, 2] */
function _fun109264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:6, offset: 0x023439bb, size: 332 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const userGuildJoinRequestStore = importDefault(3970) /* metro dependency 3970: UserGuildJoinRequestStore */;
const guildRecordModule = require(1422) /* metro dependency 1422: GuildRecord */;
const env0_5 = guildRecordModule.getGuildIconSource;
const env0_6 = guildRecordModule.getGuildIconURL;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object.width = GUILD_BAR_ITEM_SIZE;
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
object.height = GUILD_BAR_ITEM_SIZE;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{guildIcon: object}]);
value = value.memo(GuildsBarPendingGuild);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarPendingGuild.tsx');
exports.default = value;
}
function GuildsBarPendingGuild({guildId}) { // fn#109265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:354, offset: 0x02343b07, size: 867 bytes, params: 2, frame: 34
const styles = useStyles();
const value3 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles({'disableSelectedColor': true,
'disableBGColor': true});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value4 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], _fun109266,
[guildId]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildJoinRequestStore],
function() {
return UserGuildJoinRequestStore.getRequest(guildId);
}, [guildId]);
const env0_3 = value6;
const {asset, icon,
guildName} = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildJoinRequestStore],
_fun109268, [guildId, value4, value5],
importDefault(14416) /* metro dependency 14416: isGuildsBarGuildDataEqual */);
const {badge,
cutouts} = (importDefault(14397) /* metro dependency 14397: useGuildsBarBottomRightBadge */)({mentionCount: 0,
joinRequestState: value6?.applicationStatus});
const value9 = env0_3.useMemo(function() {
return {onPress: _fun109270};
}, [guildId, value6?.applicationStatus]);
const value10 = (importDefault(14425) /* metro dependency 14425: usePreloadedGuildAsset */)(guildId, icon, asset);
const {accessibilityActions, onAccessibilityAction} = env0_3.useMemo(_fun109272, [guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getGuildsTree().version;
})]);
return ((Component) => <Component id={guildId} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} cutouts={cutouts} selected={value5} sharedId={(require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(guildId)} circle={!value5} overState={undefined} unread={false} label={guildName ?? ''} config={value9} styles={value3} externalChildren={badge} expandedChildren={((Component) => <Component guildId={guildId} disableSubtitle />)(importDefault(14428) /* metro dependency 14428: HomeDrawerGuildRow */)}>{value10 != null ? ((Component) => <Component source={value10} style={styles.guildIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : ((Component) => <Component value={guildName} selected={value5} animate={value5} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</Component>)(importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */);
}
function _fun109266() { // fn#109266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:595, offset: 0x02343e6a, size: 30 bytes, params: 1, frame: 9
const value = environment.__proto__;
return SelectedGuildStore.getGuildId() === guildId;
}
function _fun109268() { // fn#109268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:720, offset: 0x02343ea3, size: 173 bytes, params: 1, frame: 20
const value = environment.__proto__;
const joinRequestGuild = UserGuildJoinRequestStore.getJoinRequestGuild(guildId);
const value4 = undefined;
let r1 = joinRequestGuild != null ? getGuildIconURL(joinRequestGuild, env0_1, env0_2) : value4;
const object2 = {};
object2.guildName = joinRequestGuild == null ? value4 : joinRequestGuild.name;
object2.icon = r1;
r1 = r1 != null && joinRequestGuild != null ? getGuildIconSource(joinRequestGuild,
(require(6819) /* metro dependency 6819: GuildIcon */).ImageSizes[(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE],
env0_2) : value4;
object2.asset = r1;
return object2;
}
function _fun109269() { // fn#109269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:1086, offset: 0x02343f50, size: 17 bytes, params: 1, frame: 2
return {onPress: onPress_109270};
}
function _fun109272() { // fn#109272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:1727, offset: 0x023440c6, size: 86 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(14386) /* metro dependency 14386: getGuildsBarGuildMenuItems */;
value = value(guildId, version);
const object2 = {};
object2.accessibilityActions = value.map(function(a0) {
return {name: a0.label, label: a0.label};
});
object2.onAccessibilityAction = onAccessibilityAction_109274;
return object2;
}
function onPress_109270() { // fn#109270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:1100, offset: 0x02343f61, size: 332 bytes, params: 1, frame: 15
var moduleValue2;
var moduleValue3;
const value2 = undefined;
const applicationStatus = env1_3 == null ? value2 : env1_3.applicationStatus;
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
const STARTED = GuildJoinRequestApplicationStatuses.STARTED;
if (STARTED === applicationStatus) {
moduleValue3 = require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */;
moduleValue3.openMemberVerificationIncompleteAlert(guildId);
} else if (GuildJoinRequestApplicationStatuses.SUBMITTED === applicationStatus) {
moduleValue2 = require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */;
moduleValue2.openMemberVerificationPendingAlert(guildId);
} else if (GuildJoinRequestApplicationStatuses.APPROVED === applicationStatus) {
(importDefault(14410) /* metro dependency 14410: transitionGuildsBarToGuildOrOpenSelectedChannel */)(guildId);
} else if (GuildJoinRequestApplicationStatuses.REJECTED === applicationStatus) {
(require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */).openMemberVerificationRejectedAlert({guildId: guildId,
canWithdraw: true});
}
return value2;
}
function onAccessibilityAction_109274(a0) { // fn#109274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14635:1823, offset: 0x0234411c, size: 68 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = env0_0.find(_fun109275);
if (!(value == null || value.action == null)) {
value.action();
}
}
@@ -0,0 +1,85 @@
/* Metro module 14408; source: modules/guilds_bar/native/GuildsBarPendingGuildFolder.tsx; dependencies: [31, 3969, 661, 33, 14395, 9319, 566, 14387, 4017, 4081, 6593, 1244, 14394, 10222, 2] */
function _fun109070(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:6, offset: 0x0233c2a9, size: 190 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(GuildsBarPendingGuildFolder);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarPendingGuildFolder.tsx');
exports.default = value;
}
function GuildsBarPendingGuildFolder({id, expanded, childNodes}) { // fn#109071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:180, offset: 0x0233c367, size: 513 bytes, params: 2, frame: 32
const value2 = (require(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */).useGuildsBarAnimatedWrapperStyles({'disableSelectedColor': true,
'disableBGColor': false});
const env0_1 = (importDefault(9319) /* metro dependency 9319: usePendingFolderGuildIds */)();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], _fun109072);
const binding = env0_3;
const {accessibilityActions, onAccessibilityAction} = binding.useMemo(_fun109073, [id]);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue('' + id);
const value6 = binding.useMemo(function() {
return {onPress: _fun109078};
}, [id]);
const GuildsBarAnimatedItemWrapper = importDefault(14395) /* metro dependency 14395: GuildsBarAnimatedItemWrapper */;
const defaultImportProps = {id: '' + id, accessibilityActions: accessibilityActions,
onAccessibilityAction: onAccessibilityAction, selected: value3, unread: false, circle: false, styles: value2};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['scsU+l']);
defaultImportProps.sharedId = value5;
defaultImportProps.cutouts = undefined;
defaultImportProps.overState = undefined;
defaultImportProps.preventClipping = true;
defaultImportProps.config = value6;
defaultImportProps.externalChildren = expanded ? ((GuildsBarGuildFolderBG) => <GuildsBarGuildFolderBG folderId={id} totalItems={childNodes.length} />)((require(14394) /* metro dependency 14394: GuildsBarGuildFolder */).GuildsBarGuildFolderBG) : null;
const HourglassIcon = (require(10222) /* metro dependency 10222: HourglassIcon */).HourglassIcon;
return (
<GuildsBarAnimatedItemWrapper {...defaultImportProps}>
<HourglassIcon />
</GuildsBarAnimatedItemWrapper>
);
}
function _fun109072() { // fn#109072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:388, offset: 0x0233c568, size: 46 bytes, params: 1, frame: 13
const binding = env0_1;
return binding.includes(SelectedGuildStore.getGuildId() ?? EMPTY_STRING_SNOWFLAKE_ID);
}
function _fun109073() { // fn#109073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:463, offset: 0x0233c596, size: 87 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
const getGuildFolderMenuItems = (require(14387) /* metro dependency 14387: GuildsBarFolderMenuItems */).getGuildFolderMenuItems;
value = Reflect.apply(getGuildFolderMenuItems, value, [id]);
const object2 = {};
object2.accessibilityActions = value.map(function(a0) {
return {name: a0.label, label: a0.label};
});
object2.onAccessibilityAction = onAccessibilityAction_109075;
return object2;
}
function _fun109077() { // fn#109077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:803, offset: 0x0233c631, size: 17 bytes, params: 1, frame: 2
return {onPress: onPress_109078};
}
function onAccessibilityAction_109075(a0) { // fn#109075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:580, offset: 0x0233c5ed, size: 68 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = env0_0.find(_fun109076);
if (!(value == null || value.action == null)) {
value.action();
}
}
function onPress_109078() { // fn#109078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14605:809, offset: 0x0233c642, size: 93 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.toggleGuildFolderExpand(id);
}
@@ -0,0 +1,54 @@
/* Metro module 14437; source: modules/guilds_bar/native/GuildsBarSeparator.tsx; dependencies: [31, 33, 4501, 697, 14374, 4017, 4577, 8141, 2] */
function _fun109261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14634:6, offset: 0x0234373a, size: 308 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {'height': 1, 'marginTop': null, 'marginBottom': null, 'marginLeft': 19, 'marginRight': 19};
let GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
object3.marginTop = GUILD_BAR_ITEM_MARGIN;
GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
object3.marginBottom = GUILD_BAR_ITEM_MARGIN;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.backgroundColor = BACKGROUND_MOD_STRONG;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{separator: object3}]);
object = {code: 'function GuildsBarSeparatorTsx1(){const{withSpring,panelX,HOME_DRAWER_FLING_PHYSICS}=this.__closure;return{maxWidth:withSpring(Math.max(34,panelX.get()+34),HOME_DRAWER_FLING_PHYSICS)};}'};
value = value.memo(GuildsBarSeparator);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarSeparator.tsx');
exports.default = value;
}
function GuildsBarSeparator() { // fn#109262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14634:573, offset: 0x0234386e, size: 228 bytes, params: 1, frame: 21
const styles = useStyles();
const binding = env0_3;
const useContext = binding.useContext;
const HomeDrawerStateContext = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HomeDrawerStateContext;
const panelX = Reflect.apply(useContext, binding, [HomeDrawerStateContext]).panelX;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = GuildsBarSeparatorS;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.panelX = panelX;
const HOME_DRAWER_FLING_PHYSICS = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS;
object2.HOME_DRAWER_FLING_PHYSICS = HOME_DRAWER_FLING_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 10108232556859;
closure.__initData = env0_6;
return ((Component) => <Component style={[styles.separator, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]} />)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function GuildsBarSeparatorS() { // fn#109263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14634:700, owner: GuildsBarSeparator.s, offset: 0x02343952, size: 105 bytes, params: 1, frame: 19
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const Math = global.Math;
const value4 = Math.max(34, panelX.get() + 34);
const HOME_DRAWER_FLING_PHYSICS = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS;
return {maxWidth: Reflect.apply(withSpring, value, [value4, HOME_DRAWER_FLING_PHYSICS])};
}
@@ -0,0 +1,936 @@
/* Metro module 14449; source: modules/guilds_bar/native/GuildsBarUnreadBars.tsx; dependencies: [57, 31, 27, 5214, 3969, 4896, 14385, 7553, 33, 4501, 5176, 8140, 1585, 4013, 13568, 6949, 628, 566, 4017, 14450, 2] */
function _fun109338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:6, offset: 0x02347343, size: 509 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_109341 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_9 = (require(4896) /* metro dependency 4896: SortedGuildStore */).GuildsNodeType;
const guildsBarConstantsModule = require(14385) /* metro dependency 14385: GuildsBarConstants */;
const env0_10 = guildsBarConstantsModule.FastListRenderSections;
const GUILD_LIST_WIDTH = guildsBarConstantsModule.GUILD_LIST_WIDTH;
const env0_11 = guildsBarConstantsModule.useGuildWrapperSize;
const youBarConstantsModule = require(7553) /* metro dependency 7553: YouBarConstants */;
const env0_12 = youBarConstantsModule.useYouBarTotalHeight;
const env0_13 = youBarConstantsModule.YOU_BAR_HEIGHT;
const env0_14 = youBarConstantsModule.YOU_BAR_MARGIN;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'position': 'absolute',
'top': 0, 'left': 0, 'bottom': 0, width: GUILD_LIST_WIDTH}});
object = {beforeItem: undefined, afterItem: undefined};
object = {beforeItem: {'section': 0, 'row': 0, 'mention': true}, afterItem: undefined};
object = {code: 'function GuildsBarUnreadBarsTsx1(){const{scrollPosValue}=this.__closure;return scrollPosValue.get();}'};
object = {code: 'function GuildsBarUnreadBarsTsx2(position,lastPosition){const{runOnJS,debouncedUpdate}=this.__closure;if(position!==lastPosition){runOnJS(debouncedUpdate)();}}'};
value = value.memo(GuildsBarUnreadBars);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarUnreadBars.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_109339(a0, a1) { // fn#109339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:365, offset: 0x02347540, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun109340;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_109341(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_109341(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_109341(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun109340;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function checkNodeAndIterate({node, section, item, direction, selectedGuildId}) { // fn#109342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:1366, offset: 0x023476b4, size: 347 bytes, params: 2, frame: 25
var r4;
var r11;
var r7;
var r15;
var r0;
var type;
var id;
var getMentionCount;
var value2;
var value3;
var value4;
var value5;
var children;
var length;
var value6;
var value7;
var checkNodeAndIterateBinding;
var object2;
var value8;
var value9;
var FOLDER;
var expanded;
if (node != null) {
type = node.type;
reducibleJoin14: while (true) {
reducibleJoin7: while (true) {
if (type !== GuildsNodeType.GUILD) {
if (direction === 1) {
r11 = 0;
break reducibleJoin7;
}
r11 = node.children.length - 1;
break reducibleJoin7;
}
id = node.id;
if (id !== selectedGuildId) {
getMentionCount = GuildReadStateStore.getMentionCount;
id = node.id;
value2 = Reflect.apply(getMentionCount, GuildReadStateStore, [id]);
value3 = 0;
value4 = undefined;
r4 = value2 > value3 ? node : value4;
reducibleJoin5: while (true) {
if (r4 != null) {
object2 = {node: r4};
r4 = section ?? value3;
object2.section = r4;
object2.item = item ?? value3;
return object2;
}
break reducibleJoin5;
}
}
value5 = 0;
if (direction === 1) {
r11 = value5;
break reducibleJoin7;
}
children = node.children;
length = children.length;
value6 = length - 1;
r11 = value6;
break reducibleJoin7;
}
if (r11 >= value5) {
children = node.children;
length = children.length;
value7 = undefined;
if (r11 < length) {
reducibleLoop9: while (true) {
r7 = section ?? r11;
checkNodeAndIterateBinding = checkNodeAndIterate;
children = node.children;
r15 = section != null ? r11 : value7;
value8 = checkNodeAndIterateBinding({node: children[r11], section: r7, item: r15,
direction: direction,
selectedGuildId: selectedGuildId});
if (value8 != null) {
break reducibleLoop9;
}
value9 = r11 + direction;
if (value9 >= value5) {
children = node.children;
length = children.length;
if (value9 < length) {
r11 = value9;
continue reducibleLoop9;
}
break reducibleJoin14;
}
break reducibleJoin14;
}
type = node.type;
FOLDER = GuildsNodeType.FOLDER;
reducibleJoin18: while (true) {
if (type !== FOLDER) {
r0 = value8;
break reducibleJoin18;
}
expanded = node.expanded;
if (expanded) {
r0 = value8;
break reducibleJoin18;
}
r0 = {node: node, section: r7};
break reducibleJoin18;
}
return r0;
}
break reducibleJoin14;
}
break reducibleJoin14;
}
}
}
function findFirstOrLastMentionedItem(a0, a1, a2, a3, a4) { // fn#109343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:2008, offset: 0x0234780f, size: 1364 bytes, params: 6, frame: 45
var object2;
var layoutStart;
var r22;
var r3;
var r17;
var r18;
var r31;
var r24;
var r5;
var r7;
var r1;
var value5;
var value9;
var value15;
var type;
const FastListItemTypes = (require(8140) /* metro dependency 8140: FastList */).FastListItemTypes;
var ITEM;
var SECTION;
var section;
var GUILDS;
var layoutSize;
var getNode;
var recyclerKey;
var value16;
var FOLDER;
var expanded;
var children;
var value17;
var value18;
var value19;
var GUILD;
var getMentionCount;
var id;
var value20;
var value21;
var value22;
var value23;
var value24;
var value25;
var binding;
const guildsTree = SortedGuildStore.getGuildsTree();
const root = guildsTree.root;
const getSectionItemFromPosition = a0.getSectionItemFromPosition;
let scrollPosValue = a0.scrollPosValue;
let get = scrollPosValue.get;
let item = Reflect.apply(getSectionItemFromPosition, a0, [Reflect.apply(get, scrollPosValue, []) + a4]).item;
const value4 = undefined;
reducibleJoin2: while (true) {
if (item == null) {
layoutStart = value4;
break reducibleJoin2;
}
layoutStart = item.layoutStart;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (layoutStart != null) {
r22 = layoutStart;
break reducibleJoin4;
}
scrollPosValue = a0.scrollPosValue;
get = scrollPosValue.get;
value5 = Reflect.apply(get, scrollPosValue, []);
r22 = value5;
break reducibleJoin4;
}
const YouBarExperiment = (require(5176) /* metro dependency 5176: YouBarExperiment */).YouBarExperiment;
const getConfig = YouBarExperiment.getConfig;
const enabled = Reflect.apply(getConfig, YouBarExperiment, [{location: 'guildsunreadbars'}]).enabled;
const value7 = a0.scrollPosValue.get() + a0.containerSize - a3;
const value8 = 0;
reducibleJoin6: while (true) {
if (enabled) {
value9 = YOU_BAR_HEIGHT + YOU_BAR_MARGIN;
r3 = value9;
break reducibleJoin6;
}
r3 = value8;
break reducibleJoin6;
}
const value10 = value7 - r3;
object2 = {'section': -1, 'item': -1};
const value11 = _createForOfIteratorHelperLoose_109339(a0.state.items);
const value12 = value11();
let done = value12.done;
const value13 = false;
const value14 = true;
if (done) {
r5 = value13;
} else {
r17 = value13;
r18 = value12;
reducibleLoop7: while (true) {
value15 = r18.value;
layoutStart = value15.layoutStart;
if (layoutStart < r22) {
r24 = r17;
} else {
type = value15.type;
ITEM = FastListItemTypes.ITEM;
reducibleJoin28: while (true) {
reducibleJoin29: while (true) {
if (type === ITEM) {
if (value15.layoutStart > value10) {
r5 = r17;
break reducibleJoin29;
}
section = value15.section;
if (section < FastListRenderSections.GUILDS) {
if (a1) {
r5 = value14;
break reducibleJoin29;
}
r24 = r17;
break reducibleJoin28;
}
if (value8 === value15.layoutSize) {
r24 = r17;
break reducibleJoin28;
}
section = object2.section;
reducibleJoin15: while (true) {
if (section !== -1) {
break reducibleJoin15;
}
section = value15.section;
object2.section = section;
item = value15.item;
object2.item = item;
break reducibleJoin15;
}
type = value15.type;
if (type !== FastListItemTypes.SECTION) {
type = value15.type;
ITEM = FastListItemTypes.ITEM;
if (type !== ITEM) {
r24 = r17;
break reducibleJoin28;
}
value21 = guildsTree.getNode(value15.recyclerKey);
if (value21 == null) {
r24 = r17;
break reducibleJoin28;
}
type = value21.type;
GUILD = GuildsNodeType.GUILD;
if (type !== GUILD) {
r24 = r17;
break reducibleJoin28;
}
getMentionCount = GuildReadStateStore.getMentionCount;
id = value21.id;
if (Reflect.apply(getMentionCount, GuildReadStateStore, [id]) > value8) {
r5 = value14;
break reducibleJoin29;
}
r24 = r17;
break reducibleJoin28;
}
value16 = guildsTree.getNode(value15.recyclerKey);
if (value16 == null) {
r24 = r17;
break reducibleJoin28;
}
type = value16.type;
if (type !== GuildsNodeType.FOLDER) {
r24 = r17;
break reducibleJoin28;
}
if (value16.expanded) {
r24 = r17;
break reducibleJoin28;
}
value17 = _createForOfIteratorHelperLoose_109339(value16.children);
value18 = value17();
done = value18.done;
if (done) {
r24 = r17;
break reducibleJoin28;
}
r31 = value18;
reducibleLoop20: while (true) {
value19 = r31.value;
type = value19.type;
GUILD = GuildsNodeType.GUILD;
if (type === GUILD) {
getMentionCount = GuildReadStateStore.getMentionCount;
id = value19.id;
reducibleJoin22: while (true) {
if (Reflect.apply(getMentionCount, GuildReadStateStore, [id]) > value8) {
r24 = value14;
break reducibleJoin28;
}
break reducibleJoin22;
}
}
value20 = value17();
done = value20.done;
if (done) {
r24 = r17;
break reducibleJoin28;
}
r31 = value20;
continue reducibleLoop20;
}
value22 = value11();
done = value22.done;
if (done) {
r5 = r24;
break reducibleJoin29;
}
r17 = r24;
r18 = value22;
continue reducibleLoop7;
}
type = value15.type;
SECTION = FastListItemTypes.SECTION;
if (type !== SECTION) {
r24 = r17;
break reducibleJoin28;
}
layoutStart = value15.layoutStart;
if (layoutStart > value10) {
r5 = r17;
break reducibleJoin29;
}
section = value15.section;
GUILDS = FastListRenderSections.GUILDS;
if (section < GUILDS) {
if (a1) {
r5 = value14;
break reducibleJoin29;
}
r24 = r17;
break reducibleJoin28;
}
layoutSize = value15.layoutSize;
if (value8 === layoutSize) {
r24 = r17;
break reducibleJoin28;
}
section = object2.section;
reducibleJoin15: while (true) {
if (section !== -1) {
break reducibleJoin15;
}
section = value15.section;
object2.section = section;
item = value15.item;
object2.item = item;
break reducibleJoin15;
}
type = value15.type;
SECTION = FastListItemTypes.SECTION;
if (type !== SECTION) {
type = value15.type;
ITEM = FastListItemTypes.ITEM;
if (type !== ITEM) {
r24 = r17;
break reducibleJoin28;
}
value21 = guildsTree.getNode(value15.recyclerKey);
if (value21 == null) {
r24 = r17;
break reducibleJoin28;
}
type = value21.type;
GUILD = GuildsNodeType.GUILD;
if (type !== GUILD) {
r24 = r17;
break reducibleJoin28;
}
getMentionCount = GuildReadStateStore.getMentionCount;
id = value21.id;
if (Reflect.apply(getMentionCount, GuildReadStateStore, [id]) > value8) {
r5 = value14;
break reducibleJoin29;
}
r24 = r17;
break reducibleJoin28;
}
getNode = guildsTree.getNode;
recyclerKey = value15.recyclerKey;
value16 = Reflect.apply(getNode, guildsTree, [recyclerKey]);
if (value16 == null) {
r24 = r17;
break reducibleJoin28;
}
type = value16.type;
FOLDER = GuildsNodeType.FOLDER;
if (type !== FOLDER) {
r24 = r17;
break reducibleJoin28;
}
expanded = value16.expanded;
if (expanded) {
r24 = r17;
break reducibleJoin28;
}
_createForOfIteratorHelperLoose_109339Binding = _createForOfIteratorHelperLoose_109339;
children = value16.children;
value17 = _createForOfIteratorHelperLoose_109339Binding(children);
value18 = value17();
done = value18.done;
if (done) {
r24 = r17;
break reducibleJoin28;
}
r31 = value18;
reducibleLoop20: while (true) {
value19 = r31.value;
type = value19.type;
GUILD = GuildsNodeType.GUILD;
if (type === GUILD) {
getMentionCount = GuildReadStateStore.getMentionCount;
id = value19.id;
reducibleJoin22: while (true) {
if (Reflect.apply(getMentionCount, GuildReadStateStore, [id]) > value8) {
r24 = value14;
break reducibleJoin28;
}
break reducibleJoin22;
}
}
value20 = value17();
done = value20.done;
if (done) {
r24 = r17;
break reducibleJoin28;
}
r31 = value20;
continue reducibleLoop20;
}
value22 = value11();
done = value22.done;
if (done) {
r5 = r24;
break reducibleJoin29;
}
r17 = r24;
r18 = value22;
continue reducibleLoop7;
}
if (r5) {
return env0_17;
}
reducibleJoin32: while (true) {
if (a1) {
r5 = value4;
break reducibleJoin32;
}
value23 = checkNodeAndIterate({node: root, direction: 1, selectedGuildId: a2});
r5 = value23;
break reducibleJoin32;
}
reducibleJoin29: while (true) {
reducibleJoin34: while (true) {
if (r5 == null) {
if (!a1) {
break reducibleJoin34;
}
if (r5 == null) {
return env0_18;
}
section = r5.section;
GUILDS = FastListRenderSections.GUILDS;
value24 = section + GUILDS;
section = object2.section;
if (!(value24 < section)) {
section = object2.section;
reducibleJoin46: while (true) {
reducibleJoin42: while (true) {
if (value24 !== section) {
break reducibleJoin42;
}
item = r5.item;
r7 = item ?? value8;
item = object2.item;
if (r7 < item) {
break reducibleJoin46;
}
break reducibleJoin42;
}
value25 = checkNodeAndIterate({node: root, direction: -1, selectedGuildId: a2});
if (value25 != null) {
section = value25.section;
GUILDS = FastListRenderSections.GUILDS;
item = value25.item;
r1 = {beforeItem: value4, afterItem: {section: section + GUILDS, row: item,
mention: value14}};
} else {
binding = env0_17;
r1 = binding;
}
return r1;
}
}
item = r5.item;
return {beforeItem: {section: value24, row: item, mention: value14}, afterItem: value4};
}
break reducibleJoin34;
}
if (r5 != null) {
if (r5 == null) {
return env0_18;
}
section = r5.section;
GUILDS = FastListRenderSections.GUILDS;
value24 = section + GUILDS;
section = object2.section;
reducibleJoin42: while (true) {
reducibleJoin46: while (true) {
if (value24 < section) {
break reducibleJoin46;
}
section = object2.section;
if (value24 !== section) {
break reducibleJoin42;
}
item = r5.item;
r7 = item ?? value8;
item = object2.item;
if (r7 < item) {
break reducibleJoin46;
}
break reducibleJoin42;
}
item = r5.item;
return {beforeItem: {section: value24, row: item, mention: value14}, afterItem: value4};
}
} else {
reducibleJoin42: while (true) {
if (r5 == null) {
return env0_17;
}
break reducibleJoin42;
}
}
value25 = checkNodeAndIterate({node: root, direction: -1, selectedGuildId: a2});
if (value25 != null) {
section = value25.section;
GUILDS = FastListRenderSections.GUILDS;
item = value25.item;
r1 = {beforeItem: value4, afterItem: {section: section + GUILDS, row: item,
mention: value14}};
} else {
binding = env0_17;
r1 = binding;
}
return r1;
}
break reducibleLoop7;
}
}
value22 = value11();
done = value22.done;
if (done) {
r5 = r24;
break reducibleLoop7;
}
r17 = r24;
r18 = value22;
continue reducibleLoop7;
}
}
if (r5) {
return env0_17;
}
reducibleJoin32: while (true) {
if (a1) {
r5 = value4;
break reducibleJoin32;
}
value23 = checkNodeAndIterate({node: root, direction: 1, selectedGuildId: a2});
r5 = value23;
break reducibleJoin32;
}
if (r5 == null) {
reducibleJoin34: while (true) {
if (a1) {
if (r5 == null) {
return env0_18;
}
section = r5.section;
GUILDS = FastListRenderSections.GUILDS;
value24 = section + GUILDS;
section = object2.section;
if (!(value24 < section)) {
section = object2.section;
reducibleJoin46: while (true) {
reducibleJoin42: while (true) {
if (value24 !== section) {
break reducibleJoin42;
}
item = r5.item;
r7 = item ?? value8;
item = object2.item;
if (r7 < item) {
break reducibleJoin46;
}
break reducibleJoin42;
}
value25 = checkNodeAndIterate({node: root, direction: -1, selectedGuildId: a2});
if (value25 != null) {
section = value25.section;
GUILDS = FastListRenderSections.GUILDS;
item = value25.item;
r1 = {beforeItem: value4, afterItem: {section: section + GUILDS, row: item,
mention: value14}};
} else {
binding = env0_17;
r1 = binding;
}
return r1;
}
}
item = r5.item;
return {beforeItem: {section: value24, row: item, mention: value14}, afterItem: value4};
}
break reducibleJoin34;
}
}
if (r5 != null) {
if (r5 == null) {
return env0_18;
}
section = r5.section;
value24 = section + FastListRenderSections.GUILDS;
section = object2.section;
reducibleJoin42: while (true) {
reducibleJoin46: while (true) {
if (value24 < section) {
break reducibleJoin46;
}
section = object2.section;
if (value24 !== section) {
break reducibleJoin42;
}
item = r5.item;
r7 = item ?? value8;
item = object2.item;
if (r7 < item) {
break reducibleJoin46;
}
break reducibleJoin42;
}
item = r5.item;
return {beforeItem: {section: value24, row: item, mention: value14}, afterItem: value4};
}
} else {
reducibleJoin42: while (true) {
if (r5 == null) {
return env0_17;
}
break reducibleJoin42;
}
}
value25 = checkNodeAndIterate({node: root, direction: -1, selectedGuildId: a2});
return value25 != null ? {beforeItem: value4, afterItem: {section: value25.section + FastListRenderSections.GUILDS,
row: value25.item, mention: value14}} : env0_17;
}
function GuildsBarUnreadBars({fastList}) { // fn#109344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:3951, offset: 0x02347d63, size: 589 bytes, params: 2, frame: 25
let env0_3 = undefined;
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const r9 = Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guilds'}]).enableHome ? 0 : top;
const value4 = useGuildWrapperSize() / 2;
const binding = undefined;
const value6 = env0_3(binding.useState(_fun109345), 2);
const {beforeItem, afterItem} = value6[0];
env0_3 = value6[1];
const value7 = binding.useMemo(_fun109346, [fastList, r9, value4]);
binding.useEffect(_fun109349, [value7]);
const scrollPosValue = fastList.scrollPosValue;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return scrollPosValue.get();
};
closure.__closure = {scrollPosValue: scrollPosValue};
closure.__workletHash = 16367582542434;
closure.__initData = env0_19;
const closure2 = GuildsBarUnreadBarsO;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, debouncedUpdate: value7};
closure2.__workletHash = 13727289405147;
closure2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value8 = useUnreadBarWrapperStyles();
return (
<View
style={value8.style}
collapsable={false}
pointerEvents="box-none"
testID="guilds-bar-unread-bars"
>
{((Component) => <Component beforeItem={beforeItem} afterItem={afterItem} scrollToLocation={binding.useCallback(function(a0) {
var r5;
var fastListBinding = fastList;
var object = {};
copyDataProperties(object, a0, r5);
object['paddingStart'] = paddingStart;
object['paddingEnd'] = paddingEnd;
object['orientation'] = 'visible';
fastListBinding.scrollToLocation(object);
}, [fastList, value8.paddingStart,
value8.paddingEnd])} compact />)(importDefault(14450) /* metro dependency 14450: UnreadBars */)}
</View>
);
}
function _fun109345() { // fn#109345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4122, offset: 0x02347fb0, size: 85 bytes, params: 1, frame: 19
let value = environment.__proto__;
const findFirstOrLastMentionedItemBinding = findFirstOrLastMentionedItem;
const fastListBinding = fastList;
const value4 = GuildReadStateStore.getPrivateChannelMentionCount() > 0;
value = SelectedGuildStore.getGuildId();
const value5 = null;
return findFirstOrLastMentionedItemBinding(fastListBinding, value4, value5 != value ? value : value5, env0_1,
env0_2);
}
function _fun109346() { // fn#109346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4312, offset: 0x02348005, size: 45 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (importDefault(6949) /* metro dependency 6949 */)(_fun109347, 100);
}
function _fun109349() { // fn#109349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4563, offset: 0x02348115, size: 121 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const BatchedStoreListener = (require(566) /* metro dependency 566: flux */).BatchedStoreListener;
new BatchedStoreListener([GuildReadStateStore, SelectedGuildStore, SortedGuildStore],
env0_4).attach('guild-mention-bars');
return _fun109350;
}
function GuildsBarUnreadBarsO(a0, a1) { // fn#109352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4838, owner: GuildsBarUnreadBars.O, offset: 0x023481a3, size: 60 bytes, params: 3, frame: 12
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_4)();
}
}
function useUnreadBarWrapperStyles() { // fn#109353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4995, owner: GuildsBarUnreadBars.useUnreadBarWrapperStyles, offset: 0x023481df, size: 225 bytes, params: 1, frame: 19
const styles = useStyles();
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const r6 = Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guilds'}]).enableHome ? top + 56 : top;
const value3 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileQuestDockHeight();
const value4 = 0;
return env1_4.useMemo(_fun109354, [styles.wrapper, r6, value3, useYouBarTotalHeight(value3 > value4 ? value4 : 8)]);
}
function _fun109347() { // fn#109347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4326, offset: 0x02348032, size: 109 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__.__proto__;
const findFirstOrLastMentionedItemBinding = findFirstOrLastMentionedItem;
const fastListBinding = fastList;
const value4 = GuildReadStateStore.getPrivateChannelMentionCount() > 0;
value = SelectedGuildStore.getGuildId();
const value5 = null;
const env0_0 = findFirstOrLastMentionedItemBinding(fastListBinding, value4, value5 != value ? value : value5,
env1_1, env1_2);
env1_3(_fun109348);
}
function _fun109354() { // fn#109354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:5217, offset: 0x023482c0, size: 92 bytes, params: 1, frame: 6
return {style: [styles.wrapper, {top: env0_1, bottom: env0_2 + env0_3}], paddingStart: env0_1,
paddingEnd: env0_2 + 4 + env0_3};
}
function _fun109348(a0) { // fn#109348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14646:4446, offset: 0x0234809f, size: 118 bytes, params: 2, frame: 18
const value = a0;
return value === env0_0 || (importDefault(628) /* metro dependency 628: shallowEqual */)(value.afterItem,
env0_0.afterItem) && (importDefault(628) /* metro dependency 628: shallowEqual */)(value.beforeItem,
env0_0.beforeItem) ? value : env0_0;
}
@@ -0,0 +1,197 @@
/* Metro module 14417; source: modules/guilds_bar/native/hooks/useGuildsBarBadges.tsx; dependencies: [29, 31, 10906, 3970, 3785, 1945, 1867, 3784, 1878, 661, 33, 4501, 566, 3971, 14418, 3860, 697, 1305, 14421, 14399, 14397, 2] */
function _fun109120(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:6, offset: 0x0233e64f, size: 363 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['guildActivityIndicatorSource'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
const userGuildJoinRequestStore = importDefault(3970) /* metro dependency 3970: UserGuildJoinRequestStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.GuildFeatures;
const env0_14 = constantsModule.Permissions;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({topRightBadge: {'position': 'absolute',
'right': 9, 'backgroundColor': 'transparent', 'borderColor': 'transparent'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/hooks/useGuildsBarBadges.tsx');
exports.default = useGuildsBarBadges;
}
function useGuildsBarBadges(a0, a1, a2) { // fn#109121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:510, offset: 0x0233e7ba, size: 603 bytes, params: 4, frame: 26
const env0_0 = a0;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildJoinRequestStore,
UserStore, GuildMemberStore], _fun109123, [a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun109122)]);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore, GuildStore,
GuildIncidentsStore], _fun109124, [a0]);
const value5 = (importDefault(14418) /* metro dependency 14418: useGuildMediaState */)(a0);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LurkingStore], _fun109125, [a0]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value7 = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const moduleValue6 = useTokenModule;
useToken = moduleValue6.useToken;
const GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
const value8 = Reflect.apply(useToken, moduleValue6, [GUILD_BAR_ITEM_MARGIN]);
const binding = value8;
let useMemo = binding.useMemo;
let value = Reflect.apply(useMemo, binding, [_fun109126, [styles.topRightBadge, value8]]);
value = binding.useMemo(_fun109127, [value5, value, value7]);
const badgeTopRight = value.badgeTopRight;
const cutoutTopRight = value.cutoutTopRight;
value = importDefault(14397) /* metro dependency 14397: useGuildsBarBottomRightBadge */;
value = value({mentionCount: a1, isMentionLowImportance: a2, joinRequestState: value3,
shouldShowInvitesDisabled: value4, lurkerPreviewExpiresAt: value6});
const badge = value.badge;
const cutout = value.cutout;
useMemo = binding.useMemo;
return {badgeTopRight: badgeTopRight, badgeBottomRight: badge, cutouts: Reflect.apply(useMemo, binding,
[function() {
var items = [];
if (cutoutTopRight != null) {
items.push(cutoutTopRight);
}
if (cutout != null) {
items.push(cutout);
}
return items;
}, [cutoutTopRight, cutout]]), mediaState: value5};
}
function _fun109122() { // fn#109122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:590, offset: 0x0233ea15, size: 74 bytes, params: 1, frame: 13
const value = environment.__proto__;
const guild = GuildStore.getGuild(env0_0);
const r1 = guild == null ? undefined : guild.features.has(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL);
return r1 != null && r1;
}
function _fun109123() { // fn#109123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:750, offset: 0x0233ea5f, size: 158 bytes, params: 1, frame: 16
var value2;
var request;
var currentUser;
var userId;
var getMember;
var binding;
var value;
if (env0_2) {
value2 = environment.__proto__;
request = UserGuildJoinRequestStore.getRequest(env0_0);
currentUser = UserStore.getCurrentUser();
if (currentUser == null) {
return undefined;
}
if (request == null) {
return undefined;
}
userId = request.userId;
if (userId !== currentUser.id) {
return undefined;
}
getMember = GuildMemberStore.getMember;
binding = env0_0;
userId = request.userId;
value = Reflect.apply(getMember, GuildMemberStore, [binding, userId]);
if (value == null) {
return request.applicationStatus;
}
if (value.isPending) {
return request.applicationStatus;
}
value = require(3971) /* metro dependency 3971: GuildJoinRequestUtils */;
if (value.isActionedAndNotAcked(request)) {
return request.applicationStatus;
}
}
}
function _fun109124() { // fn#109124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:1012, offset: 0x0233eafd, size: 232 bytes, params: 1, frame: 16
var r0;
var invitesDisabledUntil;
var r1;
var guildIncident;
var value5;
var Date;
var prototype;
var date;
var value6;
let value = environment.__proto__;
const guild = GuildStore.getGuild(env0_0);
if (guild != null) {
var can = PermissionStore.can;
var MANAGE_GUILD = Permissions.MANAGE_GUILD;
if (Reflect.apply(can, PermissionStore, [MANAGE_GUILD, guild])) {
guildIncident = GuildIncidentsStore.getGuildIncident(env0_0);
value5 = undefined;
r0 = guild == null || guild.features.has == null ? value5 : guild.features.has(GuildFeatures.INVITES_DISABLED);
if (!r0) {
invitesDisabledUntil = guildIncident == null ? value5 : guildIncident.invitesDisabledUntil;
value = invitesDisabledUntil != null;
if (value) {
Date = global.Date;
invitesDisabledUntil = guildIncident.invitesDisabledUntil;
prototype = Date.prototype;
value = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value = date instanceof Object ? date : value;
Date = global.Date;
prototype = Date.prototype;
value6 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value = value > (date instanceof Object ? date : value6);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
}
return r0;
}
}
return false;
}
function _fun109125() { // fn#109125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:1339, offset: 0x0233ebe5, size: 29 bytes, params: 1, frame: 11
return LurkingStore.getLurkingPreviewExpiry(env0_0);
}
function _fun109126() { // fn#109126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:1523, offset: 0x0233ec02, size: 72 bytes, params: 1, frame: 14
const items2 = [styles.topRightBadge];
const binding = env0_5;
const BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
items2[1] = {top: binding - BADGE_PADDING};
return items2;
}
function _fun109127() { // fn#109127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14614:1611, offset: 0x0233ec4a, size: 264 bytes, params: 1, frame: 21
var r1;
let value = environment.__proto__;
const value2 = undefined;
const mediaIcon = (require(14421) /* metro dependency 14421: GuildsBarActivityIndicator */).getMediaIcon(env0_3);
let object2 = {};
const value5 = null;
const source = value5 == mediaIcon ? value2 : mediaIcon.source;
object2.guildActivityIndicatorSource = value5 != source ? source : value5;
object2.IconComponent = value5 == mediaIcon ? value2 : mediaIcon.icon;
object2.isCurrentUserConnected = env0_3.isCurrentUserConnected;
const guildActivityIndicatorSource = object2.guildActivityIndicatorSource;
object2 = {badgeTopRight: value5 != guildActivityIndicatorSource ? ((GuildsBarActivityIndicatorBase) => <GuildsBarActivityIndicatorBase style={env0_6} source={guildActivityIndicatorSource} {...env1_4(object2,
env1_3)} />)((require(14421) /* metro dependency 14421: GuildsBarActivityIndicator */).GuildsBarActivityIndicatorBase) : value5};
if (value5 != guildActivityIndicatorSource) {
value = importDefault(14399) /* metro dependency 14399: computeGuildsBarCutout */;
value = value({position: 'top-right', containerSize: env0_4});
r1 = value;
} else {
r1 = value2;
}
object2.cutoutTopRight = r1;
return object2;
}
@@ -0,0 +1,112 @@
/* Metro module 14397; source: modules/guilds_bar/native/hooks/useGuildsBarBottomRightBadge.tsx; dependencies: [57, 31, 33, 4501, 14398, 1305, 3860, 697, 14399, 14400, 14404, 2] */
function _fun109029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14594:6, offset: 0x0233a7ea, size: 205 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({bottomRightBadge: {'position': 'absolute',
'right': 9, 'backgroundColor': 'transparent', 'borderColor': 'transparent'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/hooks/useGuildsBarBottomRightBadge.tsx');
exports.default = useGuildsBarBottomRightBadge;
}
function useGuildsBarBottomRightBadge({mentionCount, isMentionLowImportance, joinRequestState, shouldShowInvitesDisabled, lurkerPreviewExpiresAt}) { // fn#109030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14594:368, offset: 0x0233a8b7, size: 414 bytes, params: 2, frame: 28
shouldShowInvitesDisabled = !(shouldShowInvitesDisabled === undefined) && shouldShowInvitesDisabled;
const env0_3 = shouldShowInvitesDisabled;
lurkerPreviewExpiresAt = lurkerPreviewExpiresAt === undefined ? null : lurkerPreviewExpiresAt;
const env0_4 = lurkerPreviewExpiresAt;
const styles = useStyles();
const value2 = (require(14398) /* metro dependency 14398: LurkerPreviewCooldownBadge */).useHasExpired(lurkerPreviewExpiresAt);
const binding = env0_4;
const [property, env0_8] = env0_3(binding.useState(function() {
return mentionCount > 0 ? require(dependencyMap[5]).BADGE_MASK_SIZE : require(dependencyMap[5]).BADGE_MASK_UNREAD_SIZE;
}), 2);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
const value = Reflect.apply(useToken, useTokenModule, [GUILD_BAR_ITEM_SIZE]);
const moduleValue3 = useTokenModule;
useToken = moduleValue3.useToken;
const GUILD_BAR_ITEM_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_MARGIN;
return binding.useMemo(_fun109033, [property, shouldShowInvitesDisabled, joinRequestState, mentionCount,
isMentionLowImportance, binding.useMemo(_fun109032, [styles.bottomRightBadge, Reflect.apply(useToken,
moduleValue3, [GUILD_BAR_ITEM_MARGIN])]), value, lurkerPreviewExpiresAt, value2]);
}
function _fun109032() { // fn#109032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14594:809, offset: 0x0233aaa4, size: 72 bytes, params: 1, frame: 14
const items2 = [styles.bottomRightBadge];
const binding = env0_10;
const BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
items2[1] = {bottom: binding - BADGE_PADDING};
return items2;
}
function _fun109033() { // fn#109033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14594:910, offset: 0x0233aaec, size: 622 bytes, params: 1, frame: 20
var environment;
var object2;
var value4;
var value5;
var value6;
var value7;
var value8;
var defaultImport7;
var value9;
if (mentionCount > 0) {
value8 = environment.__proto__;
defaultImport7 = importDefault(14399) /* metro dependency 14399: computeGuildsBarCutout */;
object2 = {position: 'bottom-right', containerSize: env0_9};
object2.width = env0_7 - 2 * (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
value9 = defaultImport7(object2);
object2 = {};
object2.badge = ((MaskedBadge) => <MaskedBadge maskStyle={env0_11} value={mentionCount} isMentionLowImportance={isMentionLowImportance} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" onLayout={onLayout_109034} />)((require(1305) /* metro dependency 1305: native */).MaskedBadge);
object2.cutout = value9;
object2.cutouts = [value9];
} else {
if (joinRequestState != null) {
value6 = environment.__proto__;
value7 = (importDefault(14399) /* metro dependency 14399: computeGuildsBarCutout */)({position: 'bottom-right',
containerSize: env0_9});
object2 = {};
object2.badge = ((Component) => <Component style={env0_11} joinRequestState={joinRequestState} />)(importDefault(14400) /* metro dependency 14400: GuildsBarGuildJoinRequestBadge */);
object2.cutout = value7;
object2.cutouts = [value7];
return object2;
}
if (shouldShowInvitesDisabled) {
value4 = environment.__proto__;
value5 = (importDefault(14399) /* metro dependency 14399: computeGuildsBarCutout */)({position: 'bottom-right',
containerSize: env0_9});
object2 = {};
object2.badge = ((Component) => <Component style={env0_11} />)(importDefault(14404) /* metro dependency 14404: InvitesDisabledBadge */);
object2.cutout = value5;
object2.cutouts = [value5];
return object2;
}
if (lurkerPreviewExpiresAt == null) {
return {badge: null, cutout: undefined, cutouts: undefined};
}
if (env0_6) {
return {badge: null, cutout: undefined, cutouts: undefined};
}
var value3 = (importDefault(14399) /* metro dependency 14399: computeGuildsBarCutout */)({position: 'bottom-right',
containerSize: env0_9});
object2 = {};
object2.badge = ((Component) => <Component style={env0_11} expiresAt={lurkerPreviewExpiresAt} />)(importDefault(14398) /* metro dependency 14398: LurkerPreviewCooldownBadge */);
object2.cutout = value3;
object2.cutouts = [value3];
}
return object2;
}
function onLayout_109034({nativeEvent}) { // fn#109034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14594:1181, offset: 0x0233ad5a, size: 51 bytes, params: 2, frame: 12
const layout = nativeEvent.layout;
if (env1_7 !== layout.width) {
env1_8(layout.width);
}
}
@@ -0,0 +1,188 @@
/* Metro module 14453; source: modules/guilds_bar/native/hooks/useGuildsBarCreatePendingFolderNode.tsx; dependencies: [31, 3970, 4897, 566, 9319, 14454, 8934, 4898, 1244, 2] */
function _fun109380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14650:6, offset: 0x0234906d, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_109383 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userGuildJoinRequestStore = importDefault(3970) /* metro dependency 3970: UserGuildJoinRequestStore */;
const expandedGuildFolderStore = importDefault(4897) /* metro dependency 4897: ExpandedGuildFolderStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/hooks/useGuildsBarCreatePendingFolderNode.tsx');
exports.default = useGuildsBarCreatePendingFolderNode;
}
function _createForOfIteratorHelperLoose_109381(a0, a1) { // fn#109381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14650:131, offset: 0x0234911c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun109382;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_109383(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_109383(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_109383(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun109382;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useGuildsBarCreatePendingFolderNode() { // fn#109384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14650:1158, offset: 0x02349290, size: 405 bytes, params: 1, frame: 22
var r3;
var moduleValue3;
var createFolderNode;
var intl;
var folderNode;
var value4;
var value5;
var done;
var value6;
var children;
var push;
var moduleValue4;
var createGuildNode;
var id;
var value7;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserGuildJoinRequestStore];
const hasFetchedRequestToJoinGuilds = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserGuildJoinRequestStore.hasFetchedRequestToJoinGuilds;
}]);
const value2 = (importDefault(9319) /* metro dependency 9319: usePendingFolderGuildIds */)();
const value3 = fluxModule.useStateFromStores([ExpandedGuildFolderStore], function() {
return ExpandedGuildFolderStore.isFolderExpanded(require(dependencyMap[5]).SpecialGuildsNodeIds.PENDING_JOIN_REQUESTS_FOLDER);
});
env0_3.useEffect(_fun109387, [hasFetchedRequestToJoinGuilds]);
if (value2.length > 0) {
moduleValue3 = require(4898) /* metro dependency 4898: GuildsTree */;
createFolderNode = moduleValue3.createFolderNode;
object = {};
object.folderId = (require(14454) /* metro dependency 14454: GuildsBarTypes */).SpecialGuildsNodeIds.PENDING_JOIN_REQUESTS_FOLDER;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.folderName = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['scsU+l']);
object.expanded = value3;
object.guildIds = value2;
folderNode = Reflect.apply(createFolderNode, moduleValue3, [object]);
value4 = _createForOfIteratorHelperLoose_109381(value2);
value5 = value4();
done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop3: while (true) {
value6 = r3.value;
children = folderNode.children;
push = children.push;
moduleValue4 = require(4898) /* metro dependency 4898: GuildsTree */;
createGuildNode = moduleValue4.createGuildNode;
id = folderNode.id;
Reflect.apply(push, children, [Reflect.apply(createGuildNode, moduleValue4, [value6, id])]);
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop3;
}
r3 = value7;
continue reducibleLoop3;
}
}
return {expanded: value3, pendingFolderNode: folderNode};
}
return {'expanded': false, 'pendingFolderNode': null};
}
function _fun109387() { // fn#109387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14650:1430, offset: 0x0234945b, size: 49 bytes, params: 1, frame: 11
var value;
if (!hasFetchedRequestToJoinGuilds) {
value = environment.__proto__;
value = importDefault(8934) /* metro dependency 8934: GuildJoinRequestActionCreators */;
value.fetchRequestToJoinGuilds();
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,83 @@
/* Metro module 14425; source: modules/guilds_bar/native/hooks/usePreloadedGuildAsset.tsx; dependencies: [57, 31, 6619, 5475, 2] */
function _fun109166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14622:6, offset: 0x0234023f, size: 133 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/hooks/usePreloadedGuildAsset.tsx');
exports.default = usePreloadedGuildAsset;
}
function usePreloadedGuildAsset(a0, a1, a2) { // fn#109167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14622:218, offset: 0x023402c4, size: 184 bytes, params: 4, frame: 20
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = value;
const binding = env0_3;
var env0_3 = env0_2(binding.useState({}), 2)[1];
const value5 = binding.useRef({guildId: a0, asset: value, icon: a1, preloading: a1});
binding.useEffect(function() {
return _fun109169;
}, []);
const value6 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value5);
const r0 = a0 !== value6.guildId ? value : value6.asset;
env0_3.useEffect(_fun109170);
return r0;
}
function _fun109168() { // fn#109168, offset: 0x0234037c, size: 11 bytes, params: 1, frame: 1
return _fun109169;
}
function _fun109170() { // fn#109170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14622:456, offset: 0x0234039d, size: 235 bytes, params: 1, frame: 13
var environment;
var value;
let binding = env0_0;
let current = env0_4.current;
if (binding !== current.guildId) {
binding = env0_4;
current = binding.current;
current.guildId = env0_0;
current = binding.current;
current.icon = require;
current = binding.current;
current.preloading = require;
current = binding.current;
current.asset = importDefault;
} else if (require == null) {
binding = env0_4;
current = binding.current;
current.guildId = env0_0;
current = binding.current;
current.icon = require;
current = binding.current;
current.preloading = require;
current = binding.current;
current.asset = importDefault;
} else if (require !== env0_4.current.icon && require !== env0_4.current.preloading) {
env0_4.current.preloading = require;
value = environment.__proto__;
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = value.preload(require);
value.then(_fun109171);
}
}
function _fun109169() { // fn#109169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14622:359, offset: 0x02340387, size: 22 bytes, params: 1, frame: 2
env1_4.current.guildId = undefined;
}
function _fun109171() { // fn#109171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14622:667, offset: 0x02340488, size: 105 bytes, params: 1, frame: 12
var binding;
let current = env1_4.current;
if (current.guildId === env1_0 && env1_4.current.preloading === require) {
binding = env1_4;
current = binding.current;
current.icon = require;
current = binding.current;
current.asset = importDefault;
binding = env1_3;
binding({});
}
}
@@ -0,0 +1,10 @@
/* Metro module 14452; source: modules/guilds_bar/native/utils/areGuildsBarFastListStatesEqual.tsx; dependencies: [2] */
function _fun109378(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14649:6, offset: 0x02348ffe, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/areGuildsBarFastListStatesEqual.tsx');
exports.default = function({version}, a1) {
return version === a1.version;
};
}
@@ -0,0 +1,39 @@
/* Metro module 14399; source: modules/guilds_bar/native/utils/computeGuildsBarCutout.tsx; dependencies: [27, 14385, 1305, 7599, 2] */
function _fun109046(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14596:6, offset: 0x0233b3b8, size: 139 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).PixelRatio;
const env0_3 = (require(14385) /* metro dependency 14385: GuildsBarConstants */).GUILD_ITEM_SIZE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/computeGuildsBarCutout.tsx');
exports.default = computeGuildsBarCutout;
}
function computeGuildsBarCutout({position, containerSize = GUILD_ITEM_SIZE, width, height, padding}) { // fn#109047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14596:245, offset: 0x0233b443, size: 347 bytes, params: 2, frame: 21
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
const r4 = width !== undefined ? width : BADGE_SIZE;
const r5 = height !== undefined ? height : BADGE_SIZE;
const r1 = padding !== undefined ? padding : (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
let roundToNearestPixel = PixelRatio.roundToNearestPixel;
const value2 = Reflect.apply(roundToNearestPixel, PixelRatio, [r4 + 2 * r1]);
const value3 = PixelRatio.roundToNearestPixel(r5 + 2 * r1);
roundToNearestPixel = PixelRatio.roundToNearestPixel;
const Math = global.Math;
const value4 = Reflect.apply(roundToNearestPixel, PixelRatio, [Math.min(value2, value3) / 2]);
const object2 = {'shape': null, 'x': 0, 'y': 0};
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
object2.shape = RoundedRect;
object2.width = value2;
object2.height = value3;
object2.cornerRadius = value4;
if (position === 'top-right') {
object2.x = containerSize - value2 + r1;
object2.y = -r1;
} else {
object2.x = containerSize - value2 + r1;
object2.y = containerSize - value3 + r1;
}
return object2;
}
@@ -0,0 +1,57 @@
/* Metro module 14427; source: modules/guilds_bar/native/utils/getGuildBarNeighbors.tsx; dependencies: [4896, 4898, 2] */
function _fun109191(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14624:6, offset: 0x02340e4f, size: 125 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/getGuildBarNeighbors.tsx');
exports.default = getGuildBarNeighbors;
}
function toNeighbor(a0) { // fn#109192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14624:106, offset: 0x02340ecc, size: 75 bytes, params: 2, frame: 14
var r0;
var object2;
const value = null;
if (value == a0) {
r0 = value;
} else {
object2 = {node: a0};
object2.isFolder = a0.type === (require(4898) /* metro dependency 4898: GuildsTree */).GuildsNodeType.FOLDER;
r0 = object2;
}
return r0;
}
function getGuildBarNeighbors(a0) { // fn#109193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14624:306, offset: 0x02340f17, size: 258 bytes, params: 2, frame: 19
const guildsTree = SortedGuildStore.getGuildsTree();
const node = guildsTree.getNode(a0);
const value4 = null;
if (value4 == node) {
return value4;
}
let type = node.type;
const GuildsNodeType = (require(4898) /* metro dependency 4898: GuildsTree */).GuildsNodeType;
const GUILD = GuildsNodeType.GUILD;
if (type !== GUILD) {
return value4;
}
const r7 = value4 != node.parentId ? guildsTree.getNode(node.parentId) : guildsTree.root;
if (value4 == r7) {
return value4;
}
const value6 = r7.children.indexOf(node);
if (value6 < 0) {
return value4;
}
const property = r7.children[value6 - 1];
const property2 = r7.children[value6 + 1];
const object2 = {};
type = r7.type;
const FOLDER = GuildsNodeType.FOLDER;
object2.containingFolder = type !== FOLDER ? value4 : r7;
const toNeighborBinding = toNeighbor;
object2.above = toNeighborBinding(property);
object2.below = toNeighborBinding(property2);
return object2;
}
@@ -0,0 +1,184 @@
/* Metro module 14426; source: modules/guilds_bar/native/utils/getGuildsBarGuildAccessibilityActions.tsx; dependencies: [1867, 4896, 1244, 7896, 4002, 14427, 6593, 2] */
function _fun109172(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:6, offset: 0x023404f1, size: 167 bytes, params: 8, frame: 19
const env0_0 = require;
const persistAndAnnounce = function(a0) {
require(dependencyMap[3]).saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
if (a0 != null) {
require(dependencyMap[4]).AccessibilityAnnouncer.announce(a0);
}
};
const performMove = function(a0, a1, a2, a3, a4) {
var value3;
var value2 = importDefault(dependencyMap[5])(a0);
if (value2 != null) {
value3 = a1(value2);
if (value3 != null) {
importDefault(dependencyMap[6]).moveById(a0, value3.id, a2, a3);
persistAndAnnounce(a4);
}
}
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/getGuildsBarGuildAccessibilityActions.tsx');
exports.default = getGuildsBarGuildAccessibilityActions;
}
function folderLabel(a0) { // fn#109173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:116, offset: 0x02340598, size: 96 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return a0.name == null ? intl.string(t.ebAnWE) : a0.name !== '' ? a0.name : intl.string(t.ebAnWE);
}
function getGuildsBarGuildAccessibilityActions(a0) { // fn#109176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:609, offset: 0x023406ca, size: 1359 bytes, params: 2, frame: 29
var push;
var object;
var node;
var value6;
var id;
var object2;
var value7;
var value8;
const env0_0 = a0;
const items2 = [];
const r13 = GuildStore.getGuild(a0)?.name ?? '';
const value5 = (importDefault(14427) /* metro dependency 14427: getGuildBarNeighbors */)(a0);
if (value5 != null) {
var containingFolder = value5.containingFolder;
var above = value5.above;
var below = value5.below;
var intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString = intl.formatToPlainString;
var t = (require(1244) /* metro dependency 1244: indexNative */).t;
var env0_1 = Reflect.apply(formatToPlainString, intl, [t['2XShGC'], {name: r13}]);
formatToPlainString = intl.formatToPlainString;
var D4maKL = t.D4maKL;
var env0_2 = Reflect.apply(formatToPlainString, intl, [D4maKL, {name: r13}]);
var guildAbove = function(a0) {
var value = null;
return value == a0.above || a0.above.isFolder ? value : a0.above.node;
};
var guildBelow = function(a0) {
var value = null;
return value == a0.below || a0.below.isFolder ? value : a0.below.node;
};
var folderAbove = function(a0) {
var value = null;
return value != a0.above && a0.above.isFolder ? a0.above.node : value;
};
var folderBelow = function(a0) {
var value = null;
return value != a0.below && a0.below.isFolder ? a0.below.node : value;
};
var currentFolder = function(a0) {
return a0.containingFolder;
};
if (containingFolder == null) {
items2.push({name: 'create-new-folder', label: intl.string(t.ehmVyX), action: action_109182});
}
if (above != null) {
if (above.isFolder) {
node = above.node;
value6 = folderLabel(node);
push = items2.push;
id = node.id;
formatToPlainString = intl.formatToPlainString;
Reflect.apply(push, items2, [{name: 'move-up-into-folder-' + id,
label: Reflect.apply(formatToPlainString,
intl,
[t['08U1Sa'], {folderName: value6}]), action: action_109183}]);
push = items2.push;
id = node.id;
formatToPlainString = intl.formatToPlainString;
Reflect.apply(push, items2, [{name: 'move-above-folder-' + id, label: Reflect.apply(formatToPlainString,
intl,
[t.gBM0Vf, {folderName: value6}]), action: action_109184}]);
} else {
push = items2.push;
object = {name: 'move-up'};
object.label = intl.string(t['yiH+Tx']);
object.action = action_109185;
Reflect.apply(push, items2, [object]);
}
}
if (below != null) {
if (below.isFolder) {
node = below.node;
value7 = folderLabel(node);
push = items2.push;
id = node.id;
formatToPlainString = intl.formatToPlainString;
Reflect.apply(push, items2, [{name: 'move-down-into-folder-' + id,
label: Reflect.apply(formatToPlainString,
intl,
[t['6lLC/B'], {folderName: value7}]), action: action_109186}]);
push = items2.push;
id = node.id;
formatToPlainString = intl.formatToPlainString;
Reflect.apply(push, items2, [{name: 'move-below-folder-' + id, label: Reflect.apply(formatToPlainString,
intl,
[t.YhxCkM, {folderName: value7}]), action: action_109187}]);
} else {
push = items2.push;
object2 = {name: 'move-down'};
object2.label = intl.string(t['+V6oLI']);
object2.action = action_109188;
Reflect.apply(push, items2, [object2]);
}
}
if (containingFolder != null) {
id = containingFolder.id;
value8 = folderLabel(containingFolder);
push = items2.push;
formatToPlainString = intl.formatToPlainString;
Reflect.apply(push, items2, [{name: 'move-out-above-' + id, label: Reflect.apply(formatToPlainString, intl,
[t.vnfRJG, {folderName: value8}]), action: action_109189}]);
push = items2.push;
formatToPlainString = intl.formatToPlainString;
Reflect.apply(push, items2, [{name: 'move-out-below-' + id, label: Reflect.apply(formatToPlainString, intl,
[t.ejhw4S, {folderName: value8}]), action: action_109190}]);
}
}
return items2;
}
function getGuildsBarGuildAccessibilityActionsAction() { // fn#109182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:1315, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340cf0, size: 71 bytes, params: 1, frame: 16
const defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.createGuildFolderLocal([env0_0], '');
persistAndAnnounce(env0_1);
}
function getGuildsBarGuildAccessibilityActionsAction_109183() { // fn#109183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:1566, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340d37, size: 36 bytes, params: 1, frame: 18
performMove(env0_0, folderAbove, true, true, env0_1);
}
function getGuildsBarGuildAccessibilityActionsAction_109184() { // fn#109184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:1727, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340d5b, size: 34 bytes, params: 1, frame: 18
performMove(env0_0, folderAbove, false, false, null);
}
function getGuildsBarGuildAccessibilityActionsAction_109185() { // fn#109185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:1853, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340d7d, size: 34 bytes, params: 1, frame: 18
performMove(env0_0, guildAbove, false, false, null);
}
function getGuildsBarGuildAccessibilityActionsAction_109186() { // fn#109186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:2079, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340d9f, size: 36 bytes, params: 1, frame: 18
performMove(env0_0, folderBelow, true, true, env0_1);
}
function getGuildsBarGuildAccessibilityActionsAction_109187() { // fn#109187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:2240, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340dc3, size: 34 bytes, params: 1, frame: 19
performMove(env0_0, folderBelow, true, false, null);
}
function getGuildsBarGuildAccessibilityActionsAction_109188() { // fn#109188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:2368, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340de5, size: 34 bytes, params: 1, frame: 19
performMove(env0_0, guildBelow, true, false, null);
}
function getGuildsBarGuildAccessibilityActionsAction_109189() { // fn#109189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:2565, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340e07, size: 36 bytes, params: 1, frame: 18
performMove(env0_0, currentFolder, false, false, env0_2);
}
function getGuildsBarGuildAccessibilityActionsAction_109190() { // fn#109190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14623:2722, owner: getGuildsBarGuildAccessibilityActions.action, offset: 0x02340e2b, size: 36 bytes, params: 1, frame: 19
performMove(env0_0, currentFolder, true, false, env0_2);
}
@@ -0,0 +1,126 @@
/* Metro module 14386; source: modules/guilds_bar/native/utils/getGuildsBarGuildMenuItems.tsx; dependencies: [5, 3785, 1867, 4864, 661, 10633, 1244, 6914, 6911, 10939, 9027, 12686, 1962, 9216, 6613, 7002, 12681, 11844, 4080, 10936, 11845, 6610, 2] */
function _fun108899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:6, offset: 0x023340e5, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/getGuildsBarGuildMenuItems.tsx');
exports.default = getGuildsBarGuildMenuItems;
}
function getGuildsBarGuildMenuItems(a0) { // fn#108900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:271, offset: 0x023341a1, size: 676 bytes, params: 2, frame: 25
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var splice;
const env0_0 = a0;
if (LurkingStore.isLurking(a0)) {
object2 = {};
object2.IconComponent = (require(10633) /* metro dependency 10633: DoorExitIcon */).DoorExitIcon;
object2.label = intl.string(t['2vl7qn']);
object2.variant = 'destructive';
object2.action = action_108901;
return [object2];
}
const shouldShowUseNewNotificationSystem2 = (require(10939) /* metro dependency 10939: NotificationUtils */).shouldShowUseNewNotificationSystem('GuildPopoutMenu');
const isMuted2 = UserGuildSettingsStore.isMuted(a0);
const EnvelopeIcon = (require(9027) /* metro dependency 9027: EnvelopeIcon */).EnvelopeIcon;
const items2 = [{IconComponent: EnvelopeIcon, label: intl.string(t.e6RscS), action: action_108902}];
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
let string = intl.string;
const HcoRu0 = t.HcoRu0;
items2[1] = {IconComponent: BellIcon, label: Reflect.apply(string, intl, [HcoRu0]), action: action_108905};
object2 = {};
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
object2.IconComponent = SettingsIcon;
string = intl.string;
const PdRCRg = t.PdRCRg;
object2.label = Reflect.apply(string, intl, [PdRCRg]);
object2.action = action_108906;
items2[2] = object2;
if (shouldShowUseNewNotificationSystem2) {
splice = items2.splice;
object2 = {};
if (isMuted2) {
object2.iconSource = importDefault(11845) /* metro dependency 11845 */;
object2.label = intl.string(t.De0BTC);
object2.action = action_108907;
Reflect.apply(splice, items2, [1, 0, object2]);
} else {
object2.iconSource = importDefault(11844) /* metro dependency 11844 */;
object2.label = intl.string(t.vRzp7P);
object2.action = action_108908;
Reflect.apply(splice, items2, [1, 0, object2]);
}
}
return items2;
}
function getGuildsBarGuildMenuItemsAction() { // fn#108901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:440, owner: getGuildsBarGuildMenuItems.action, offset: 0x02334445, size: 68 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6914) /* metro dependency 6914: LurkerPreviewAnalytics */;
const trackLongPressLeaveClicked = value.trackLongPressLeaveClicked;
const binding = env0_0;
Reflect.apply(trackLongPressLeaveClicked, value, [binding]);
(require(6911) /* metro dependency 6911: LurkerActionCreators */).stopLurkingForGuild(binding);
}
function getGuildsBarGuildMenuItemsAction_108902() { // fn#108902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:695, owner: getGuildsBarGuildMenuItems.action, offset: 0x02334489, size: 29 bytes, params: 1, frame: 11
return env1_3(_fun108904)();
}
function getGuildsBarGuildMenuItemsAction_108905() { // fn#108905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:859, owner: getGuildsBarGuildMenuItems.action, offset: 0x0233451a, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */).open(env0_0);
}
function getGuildsBarGuildMenuItemsAction_108906() { // fn#108906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:968, owner: getGuildsBarGuildMenuItems.action, offset: 0x02334547, size: 62 bytes, params: 1, frame: 12
const guild = GuildStore.getGuild(env0_0);
if (guild != null) {
(importDefault(12681) /* metro dependency 12681: openGuildActionSheet */)(guild);
}
}
function getGuildsBarGuildMenuItemsAction_108907() { // fn#108907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:1112, owner: getGuildsBarGuildMenuItems.action, offset: 0x02334585, size: 96 bytes, params: 1, frame: 18
var value2;
var defaultImport;
if (env0_0 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
defaultImport.updateGuildNotificationSettings(env0_0, {muted: false},
(require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels.Unmuted);
}
}
function getGuildsBarGuildMenuItemsAction_108908() { // fn#108908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:1302, owner: getGuildsBarGuildMenuItems.action, offset: 0x023345e5, size: 111 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[18]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[12]);
value = value(dependencyMap[19], dependencyMap.paths);
const binding = env0_0;
Reflect.apply(openLazy, defaultImport, [value, 'muteSettings' + binding, {guildId: binding}]);
}
function* _fun108904() { // fn#108904, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14583:702, offset: 0x023344b1, size: 105 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_0;
var binding2 = env3_2;
var value3 = binding(binding2[12]);
var property = binding2[11];
yield value3(property, binding2.paths);
var value4 = undefined;
if (false) {
return value4;
}
property = value4.default;
var GUILD_LIST = env3_7.GUILD_LIST;
property([require], GUILD_LIST);
}
}
@@ -0,0 +1,10 @@
/* Metro module 14416; source: modules/guilds_bar/native/utils/isGuildsBarGuildDataEqual.tsx; dependencies: [2] */
function _fun109118(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14613:6, offset: 0x0233e5cf, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/isGuildsBarGuildDataEqual.tsx');
exports.default = function(a0, a1) {
return a0.icon === a1.icon && a0.guildName === a1.guildName;
};
}
@@ -0,0 +1,30 @@
/* Metro module 14405; source: modules/guilds_bar/native/utils/isGuildsBarGuildLabelEqual.tsx; dependencies: [2] */
function _fun109055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14602:6, offset: 0x0233bb40, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/isGuildsBarGuildLabelEqual.tsx');
exports.default = function(a0, a1) {
var r1;
var r0;
var property = a0.count;
var value = property === a1.count;
if (value) {
property = a0.names.length;
value = property === a1.names.length;
if (value) {
property = a0.names;
value = property.join('|');
property = a1.names;
value = value === property.join('|');
r1 = value;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
};
}
@@ -0,0 +1,134 @@
/* Metro module 14456; source: modules/guilds_bar/native/utils/registerSidebarVisibilityMethods.tsx; dependencies: [9485, 1867, 4896, 2] */
function _fun109394(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:6, offset: 0x02349632, size: 186 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const sidebarVisibilityMethodStoreModule = require(9485) /* metro dependency 9485: SidebarVisibilityMethodStore */;
const env0_0 = sidebarVisibilityMethodStoreModule.setGetVisibleChannelIds;
const env0_1 = sidebarVisibilityMethodStoreModule.setGetVisibleGuildIds;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_4 = (require(4896) /* metro dependency 4896: SortedGuildStore */).GuildsNodeType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/registerSidebarVisibilityMethods.tsx');
exports.registerGuildVisibilityMethod = registerGuildVisibilityMethod;
exports.registerFastListChannelVisibilityMethod = registerFastListChannelVisibilityMethod;
}
function registerGuildVisibilityMethod({current}) { // fn#109395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:339, offset: 0x023496ec, size: 45 bytes, params: 2, frame: 11
if (current != null) {
setGetVisibleGuildIds(_fun109396);
}
}
function registerFastListChannelVisibilityMethod({current}, a1) { // fn#109400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:802, offset: 0x02349895, size: 52 bytes, params: 3, frame: 11
const env0_0 = a1;
if (current != null) {
setGetVisibleChannelIds(_fun109401);
}
}
function _fun109396() { // fn#109396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:409, offset: 0x02349719, size: 149 bytes, params: 1, frame: 13
const currentBinding = current;
const items = currentBinding.getItems();
const env0_0 = currentBinding.getScrollPosition();
const env0_1 = currentBinding.containerSize;
const env0_2 = GuildStore.getGuilds();
const env0_3 = SortedGuildStore.getGuildsTree();
const Set = global.Set;
const set = new Set();
items.forEach(_fun109397);
const Array = global.Array;
return Array.from(set);
}
function _fun109401() { // fn#109401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:884, offset: 0x023498c9, size: 70 bytes, params: 1, frame: 12
const currentBinding = current;
const items = currentBinding.getItems();
const env0_0 = currentBinding.getScrollPosition();
const env0_1 = currentBinding.containerSize;
items.forEach(_fun109402);
return [];
}
function _fun109397(a0) { // fn#109397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:539, offset: 0x023497ae, size: 95 bytes, params: 2, frame: 14
var layoutStart;
const node = env0_3.getNode(a0.recyclerKey);
if (node !== undefined) {
layoutStart = a0.layoutStart;
if (layoutStart + a0.layoutSize >= env0_0 && layoutStart <= env0_0 + containerSize) {
((a0) => {
(a0.type === GuildsNodeType.FOLDER ? a0.children : [a0]).forEach(_fun109399);
})(node);
}
}
}
function _fun109402(a0) { // fn#109402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:973, offset: 0x0234990f, size: 178 bytes, params: 2, frame: 18
var channel;
var r2;
var value2;
var getChannelFromSectionRow;
var section;
var item;
var value3;
var value4;
var error;
var binding;
const value = undefined;
try {
try {
value2 = environment.__proto__;
getChannelFromSectionRow = require.getChannelFromSectionRow;
section = a0.section;
item = a0.item;
value3 = Reflect.apply(getChannelFromSectionRow, require, [section, item]);
value4 = value3 == null;
channel = value4 ? value : value3.channel;
r2 = channel;
} catch (error) {
r2 = value;
}
} catch (error) {
if (value == null) {
return value;
}
throw error;
}
if (r2 != null) {
var layoutStart = a0.layoutStart;
if (layoutStart + a0.layoutSize >= env0_0 && layoutStart <= env0_0 + containerSize) {
binding = env0_2;
binding.push(r2.id);
}
}
return value;
}
function _fun109398(a0) { // fn#109398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:637, offset: 0x0234980d, size: 63 bytes, params: 2, frame: 11
const type = a0.type;
const FOLDER = GuildsNodeType.FOLDER;
(type === FOLDER ? a0.children : [a0]).forEach(_fun109399);
}
function _fun109399(a0) { // fn#109399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14653:685, offset: 0x0234984c, size: 73 bytes, params: 2, frame: 12
var r1;
var id;
var binding;
const type = a0.type;
let value = environment.__proto__.__proto__.__proto__.__proto__;
const GUILD = GuildsNodeType.GUILD;
value = type === GUILD;
if (value) {
id = a0.id;
value = environment.__proto__.__proto__;
value = id in env2_2;
r1 = value;
} else {
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.add(a0.id);
}
}
@@ -0,0 +1,30 @@
/* Metro module 14410; source: modules/guilds_bar/native/utils/transitionGuildsBarToGuildOrOpenSelectedChannel.tsx; dependencies: [4008, 4007, 4601, 6947, 2] */
function _fun109083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14607:6, offset: 0x0233c940, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/utils/transitionGuildsBarToGuildOrOpenSelectedChannel.tsx');
exports.default = transitionGuildsBarToGuildOrOpenSelectedChannel;
}
function transitionGuildsBarToGuildOrOpenSelectedChannel(a0) { // fn#109084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14607:219, offset: 0x0233c9a0, size: 265 bytes, params: 2, frame: 18
var r3;
var moduleValue2;
var value4;
const value2 = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if ((rootNavigationRef == null ? value2 : rootNavigationRef.isReady()) !== true) {
r3 = value2;
} else {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value4 = moduleValue2.coerceGuildsRoute(rootNavigationRef.getCurrentRoute());
r3 = value4 != null ? (value4.params == null ? value2 : value4.params.drawerOpen) === true || (value4.params == null ? value2 : value4.params.guildId) !== a0 || value4.params == null ? value2 : value4.params.channelId : value2;
}
if (r3 != null) {
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToChannel(r3);
} else {
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(a0);
}
return value2;
}