This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,51 +1,77 @@
/* Metro module 15352; source: modules/main_tabs_v2/native/AppComponents.tsx; dependencies: [33, 15143, 477, 4007, 14885, 15261, 4026, 15277, 10904, 12799, 4500, 3870, 15353, 15359, 15392, 15404, 15567, 2] */
import ExternalPipViewAndroid from '../../external_pip/ExternalPipView.android.tsx'; /* Metro dependency 15353 */
import ActivityPanelContainer from '../../activities/panel/native/ActivityPanelContainer.tsx'; /* Metro dependency 15359 */
import FramePanelContainer from '../../frames/panel/native/FramePanelContainer.tsx'; /* Metro dependency 15392 */
import VoicePanelContainer from '../../voice_panel/native/VoicePanelContainer.tsx'; /* Metro dependency 15404 */
import MediaPlaybackPanelContainer from '../../media_panel/native/MediaPlaybackPanelContainer.tsx'; /* Metro dependency 15567 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PortalKeyboardModule from '../../keyboard/native/PortalKeyboard.tsx'; /* Metro dependency 4026 */
import * as AlertModalNativeModule from '../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
import * as ContextMenuContainerNativeModule from '../../../design/components/ContextMenu/native/ContextMenuContainer.native.tsx'; /* Metro dependency 12799 */
import * as PortalKeyboardRendererModule from '../../keyboard/native/PortalKeyboardRenderer.tsx'; /* Metro dependency 15143 */
import * as MainSharedModule from '../../../components_native/MainShared.tsx'; /* Metro dependency 15261 */
function _fun117349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15549:6, offset: 0x024b00da, size: 802 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const jsxRuntimejsx45 = value.jsx;
const jsxRuntimejsxs46 = value.jsxs;
const PortalKeyboardRenderer = (require(15143) /* metro dependency 15143: PortalKeyboardRenderer */).PortalKeyboardRenderer;
const PortalKeyboardRenderer = (PortalKeyboardRendererModule).PortalKeyboardRenderer;
const env0_2 = <PortalKeyboardRenderer />;
value = require(477) /* metro dependency 477: PlatformUtils */;
const r14 = value.isIOS() ? _fun117350 : _fun117351;
value = importDefault(14885) /* metro dependency 14885: AppFreezer */;
const PictureInPictureGlobalContainer = (require(15261) /* metro dependency 15261: MainShared */).PictureInPictureGlobalContainer;
const items2 = [<PictureInPictureGlobalContainer />];
const BurstReactionAnimationContainer = (require(15261) /* metro dependency 15261: MainShared */).BurstReactionAnimationContainer;
const PictureInPictureGlobalContainer = (MainSharedModule).PictureInPictureGlobalContainer;
const items2 = [
<PictureInPictureGlobalContainer />,
];
const BurstReactionAnimationContainer = (MainSharedModule).BurstReactionAnimationContainer;
items2[1] = <BurstReactionAnimationContainer />;
const MenuContainer = (require(15261) /* metro dependency 15261: MainShared */).MenuContainer;
const MenuContainer = (MainSharedModule).MenuContainer;
items2[2] = <MenuContainer />;
const PortalKeyboardHost = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardHost;
const PortalKeyboardHost = (PortalKeyboardModule).PortalKeyboardHost;
items2[3] = <PortalKeyboardHost />;
items2[4] = ((Component) => <Component />)(r14);
const ActionSheetContainer = (require(15261) /* metro dependency 15261: MainShared */).ActionSheetContainer;
const ActionSheetContainer = (MainSharedModule).ActionSheetContainer;
items2[5] = <ActionSheetContainer appEntryKey="main" />;
const Alerts = (require(15261) /* metro dependency 15261: MainShared */).Alerts;
const Alerts = (MainSharedModule).Alerts;
items2[6] = <Alerts />;
const SoundPlayer = (require(15261) /* metro dependency 15261: MainShared */).SoundPlayer;
const SoundPlayer = (MainSharedModule).SoundPlayer;
items2[7] = <SoundPlayer />;
items2[8] = ((Component) => <Component />)(importDefault(15277) /* metro dependency 15277: MainViewTooltipActionSheetsV2 */);
items2[9] = ((Component) => <Component />)(importDefault(10904) /* metro dependency 10904: Notifications */);
const ContextMenuContainer = (require(12799) /* metro dependency 12799: ContextMenuContainerNative */).ContextMenuContainer;
const ContextMenuContainer = (ContextMenuContainerNativeModule).ContextMenuContainer;
items2[10] = <ContextMenuContainer />;
const AlertModalContainer = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModalContainer;
const AlertModalContainer = (AlertModalNativeModule).AlertModalContainer;
items2[11] = <AlertModalContainer />;
const ToastContainer = (require(15261) /* metro dependency 15261: MainShared */).ToastContainer;
const ToastContainer = (MainSharedModule).ToastContainer;
items2[12] = <ToastContainer />;
value = ((Component) => <Component lockKeys={['external-pip']}>{items2}</Component>)(value);
const r4 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? ((AccessibilityAnnouncerLiveRegion) => <AccessibilityAnnouncerLiveRegion />)((require(3870) /* metro dependency 3870: AccessibilityAnnouncerLiveRegionNative */).AccessibilityAnnouncerLiveRegion) : null;
const value9 = ((Component) => <Component />)(importDefault(15353) /* metro dependency 15353: ExternalPipViewAndroid */);
const value16 = ((Component) => <Component lockKeys={['external-pip']}>{((Component) => <Component />)(importDefault(15359) /* metro dependency 15359: ActivityPanelContainer */)}{((Component) => <Component />)(importDefault(15392) /* metro dependency 15392: FramePanelContainer */)}{((Component) => <Component />)(importDefault(15404) /* metro dependency 15404: VoicePanelContainer */)}{((Component) => <Component />)(importDefault(15567) /* metro dependency 15567: MediaPlaybackPanelContainer */)}</Component>)(importDefault(14885) /* metro dependency 14885: AppFreezer */);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/AppComponents.tsx');
const r4 = (
(require(477) /* metro dependency 477: PlatformUtils */).isAndroid()
? ((AccessibilityAnnouncerLiveRegion) => <AccessibilityAnnouncerLiveRegion />)((require(3870) /* metro dependency 3870: AccessibilityAnnouncerLiveRegionNative */).AccessibilityAnnouncerLiveRegion)
: null
);
const value9 = ((Component) => <Component />)(ExternalPipViewAndroid);
const value16 = ((Component) => <Component lockKeys={['external-pip']}>{((Component) => <Component />)(ActivityPanelContainer)}{((Component) => <Component />)(FramePanelContainer)}{((Component) => <Component />)(VoicePanelContainer)}{((Component) => <Component />)(MediaPlaybackPanelContainer)}</Component>)(importDefault(14885) /* metro dependency 14885: AppFreezer */);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/AppComponents.tsx');
exports.APP_EXTRA_COMPONENTS = value;
exports.APP_EXTRA_COMPONENTS_NEVER_FREEZE = r4;
exports.APP_EXTRA_COMPONENTS_EXTERNAL_PIP = value9;
exports.APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO = value16;
function _fun117350() { // fn#117350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15549:180, offset: 0x024b03fc, size: 46 bytes, params: 1, frame: 12
return (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen() ? null : env0_2;
}
function _fun117351() { // fn#117351, offset: 0x00c36b39, size: 9 bytes, params: 1, frame: 1
return env0_2;
}
}
function _fun117350() { // fn#117350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15549:180, offset: 0x024b03fc, size: 46 bytes, params: 1, frame: 12
return (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen() ? null : env0_2;
}
global.__d(_fun117349, 15352, [33, 15143, 477, 4007, 14885, 15261, 4026, 15277, 10904, 12799, 4500, 3870, 15353,
15359, 15392, 15404, 15567,
2]) /* metro module 15352, dependencies: [33, 15143, 477, 4007, 14885, 15261, 4026, 15277, 10904, 12799, 4500, 3870, 15353, 15359, 15392, 15404, 15567, 2] */;
@@ -1,20 +1,33 @@
/* Metro module 14757; source: modules/main_tabs_v2/native/ConnectionBanner.tsx; dependencies: [57, 31, 27, 7554, 7553, 661, 33, 4501, 697, 1244, 3860, 14758, 14760, 4573, 674, 4017, 5302, 4589, 566, 683, 4577, 7555, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import Module05302 from '../../../by-id/module-05302.js'; /* Metro dependency 5302 */
import ConnectivityIndicatorStateStore from '../../connectivity/native/ConnectivityIndicatorStateStore.tsx'; /* Metro dependency 7554 */
import ConnectionIndicatorExperiment from './ConnectionIndicatorExperiment.tsx'; /* Metro dependency 7555 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as ConnectivityIndicatorStateStoreModule from '../../connectivity/native/ConnectivityIndicatorStateStore.tsx'; /* Metro dependency 7554 */
function _fun111423(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:6, offset: 0x023a146f, size: 687 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
const connectivityIndicatorStateStore = importDefault(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */;
const env0_8 = (require(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */).ConnectivityIndicatorState;
value = require(7553) /* metro dependency 7553: YouBarConstants */;
const CONNECTION_BANNER_HEIGHT = value.CONNECTION_BANNER_HEIGHT;
const env0_10 = value.useYouBarBottomMargin;
const env0_11 = value.YOU_BAR_SPRING_CONFIG;
const env0_12 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
@@ -27,263 +40,279 @@ function _fun111423(global, require, importDefault, importAll, module, exports,
const env0_21 = {'x': 0, 'y': 1};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'flexDirection': 'row',
const object3 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'center'};
object2.height = CONNECTION_BANNER_HEIGHT;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.gap = PX_8;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingHorizontal = PX_12;
object3.height = CONNECTION_BANNER_HEIGHT;
const PX_8 = (Native).space.PX_8;
object3.gap = PX_8;
const PX_12 = (Native).space.PX_12;
object3.paddingHorizontal = PX_12;
const env0_22 = Reflect.apply(createStyles, value, [{container: {'position': 'absolute', 'left': 0, 'right': 0,
'bottom': 0}, glow: {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0},
glowMaskGradient: {flex: 1}, content: object2, leadingSlot: {'width': 16, 'height': 16, 'alignItems': 'center',
glowMaskGradient: {flex: 1}, content: object3, leadingSlot: {'width': 16, 'height': 16, 'alignItems': 'center',
'justifyContent': 'center'}, spinner: {transform: [{scale: 0.8}]}}]);
object = {code: 'function ConnectionBannerTsx1(finished){const{shouldShowBanner,runOnJS,setRenderState}=this.__closure;if(finished===true&&!shouldShowBanner){runOnJS(setRenderState)(null);}}'};
object = {code: 'function ConnectionBannerTsx2(){const{progress,CONNECTION_BANNER_HEIGHT}=this.__closure;return{transform:[{translateY:(1-progress.get())*CONNECTION_BANNER_HEIGHT}],opacity:progress.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/ConnectionBanner.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/ConnectionBanner.tsx');
exports.default = ConnectionBanner;
}
function getBannerLabel(a0) { // fn#111424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:936, offset: 0x023a171e, size: 238 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const WAITING_FOR_NETWORK = ConnectivityIndicatorState.WAITING_FOR_NETWORK;
if (WAITING_FOR_NETWORK === a0) {
return intl.string(t.XKk1gp);
}
const NO_CONNECTION = ConnectivityIndicatorState.NO_CONNECTION;
if (NO_CONNECTION === a0) {
return intl.string(t.zPerw8);
}
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
if (BACK_ONLINE === a0) {
return intl.string(t.j8lYE2);
}
}
function ConnectionBannerIcon({state}) { // fn#111425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:1176, offset: 0x023a180c, size: 411 bytes, params: 2, frame: 22
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
const value2 = Reflect.apply(useToken, useTokenModule, [INTERACTIVE_ICON_DEFAULT]);
const WAITING_FOR_NETWORK = ConnectivityIndicatorState.WAITING_FOR_NETWORK;
if (WAITING_FOR_NETWORK === state) {
return (
<View style={styles.leadingSlot}>
<ActivityIndicator
size="small"
color={value2}
style={styles.spinner}
/>
</View>
);
}
const NO_CONNECTION = ConnectivityIndicatorState.NO_CONNECTION;
if (NO_CONNECTION === state) {
return (
<View style={styles.leadingSlot}>
{((ConnectionUnknownIcon) => <ConnectionUnknownIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT} />)((require(14758) /* metro dependency 14758: ConnectionUnknownIcon */).ConnectionUnknownIcon)}
</View>
);
}
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
if (BACK_ONLINE === state) {
return (
<View style={styles.leadingSlot}>
{((ConnectionFineIcon) => <ConnectionFineIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE} />)((require(14760) /* metro dependency 14760: ConnectionFineIcon */).ConnectionFineIcon)}
</View>
);
}
}
function ConnectionBannerContent({state}) { // fn#111426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:1718, offset: 0x023a19a7, size: 178 bytes, params: 2, frame: 21
const styles = useStyles();
const connectionBannerIcon = <ConnectionBannerIcon state={state} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
return (
<View style={styles.content}>
{connectionBannerIcon}
<Text
variant="text-sm/medium"
color={state !== BACK_ONLINE ? 'text-muted' : 'text-feedback-positive'}
maxFontSizeMultiplier={1.5}
>
{getBannerLabel(state)}
</Text>
</View>
);
}
function BackOnlineGlow({progress}) { // fn#111427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2006, offset: 0x023a1a59, size: 358 bytes, params: 2, frame: 26
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
const value3 = env0_4.useMemo(_fun111428, [Reflect.apply(useToken, useTokenModule, [ICON_FEEDBACK_POSITIVE])]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[styles.glow, {opacity: progress}]} pointerEvents="none">
{((Component) => <Component style={styles.glow} maskElement={((Component) => <Component style={styles.glowMaskGradient} colors={env0_15} locations={env0_16} start={env0_17} end={env0_18} />)(importDefault(4589) /* metro dependency 4589 */)}>{((Component) => <Component style={styles.glowMaskGradient} colors={value3} locations={env0_19} start={env0_20} end={env0_21} />)(importDefault(4589) /* metro dependency 4589 */)}</Component>)(importDefault(5302) /* metro dependency 5302 */)}
</View>
);
}
function ConnectionBannerInner() { // fn#111429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2906, offset: 0x023a1c6e, size: 565 bytes, params: 1, frame: 26
const styles = useStyles();
const value2 = useYouBarBottomMargin();
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectivityIndicatorStateStore],
function() {
return ConnectivityIndicatorStateStore.getState();
});
let HIDDEN = ConnectivityIndicatorState.HIDDEN;
const value3 = state !== HIDDEN;
let BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
const value4 = state === BACK_ONLINE;
HIDDEN = ConnectivityIndicatorState.HIDDEN;
const value5 = null;
const r7 = state === HIDDEN ? value5 : state;
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const [property, property2] = env0_3(env0_4.useState(r7), 2);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
var env0_4 = value9;
if (value5 != r7 && property !== r7) {
property2(r7);
}
env0_4.useEffect(_fun111431, [value3, value9]);
env0_4.useEffect(_fun111433, [value4, value6]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ConnectionBannerInnerV;
closure.__closure = {progress: value9, CONNECTION_BANNER_HEIGHT: CONNECTION_BANNER_HEIGHT};
closure.__workletHash = 13973493587548;
closure.__initData = env0_24;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
return (
<View pointerEvents="none" style={[styles.container, {height: value2 + CONNECTION_BANNER_HEIGHT}, value12]}>
{property !== BACK_ONLINE ? value5 : <BackOnlineGlow progress={value6} />}
{value5 != property ? <ConnectionBannerContent state={property} /> : value5}
</View>
);
}
function ConnectionBanner() { // fn#111435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4009, offset: 0x023a2031, size: 108 bytes, params: 1, frame: 15
const {timeoutMs,
hidden} = (importDefault(7555) /* metro dependency 7555: ConnectionIndicatorExperiment */).useConfig({location: 'ConnectionBanner'});
useConnectivityIndicatorAnalytics(hidden);
const value3 = null;
return value3 == timeoutMs || hidden ? value3 : <ConnectionBannerInner />;
}
function _fun111428() { // fn#111428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2126, offset: 0x023a1bbf, size: 175 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(env0_0);
const value3 = value.alpha(0);
const items2 = [value3.css()];
const value5 = value.alpha(0.1);
items2[1] = value5.css();
const value6 = value.alpha(0.28);
items2[2] = value6.css();
value = value.alpha(0.55);
items2[3] = value.css();
return items2;
}
function _fun111431() { // fn#111431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3197, offset: 0x023a1ea3, size: 178 bytes, params: 1, frame: 25
const binding = env0_4;
const set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const r6 = result ? 1 : 0;
const closure = n_111432;
const object2 = {};
object2.shouldShowBanner = result;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setRenderState = env0_3;
closure.__closure = object2;
closure.__workletHash = 3065113239920;
closure.__initData = env1_23;
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [r6, YOU_BAR_SPRING_CONFIG,
'respect-motion-settings', closure])]);
}
function _fun111433() { // fn#111433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3468, offset: 0x023a1fa0, size: 71 bytes, params: 1, frame: 17
const binding = env0_2;
const set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [springModule.withSpring(result_2 ? 1 : 0, YOU_BAR_SPRING_CONFIG)]);
}
function ConnectionBannerInnerV() { // fn#111434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3556, owner: ConnectionBannerInner.v, offset: 0x023a1fe7, size: 74 bytes, params: 1, frame: 12
const object3 = {};
const object4 = {};
object4.translateY = (1 - env0_4.get()) * CONNECTION_BANNER_HEIGHT;
object3.transform = [object4];
object3.opacity = env0_4.get();
return object3;
}
function useConnectivityIndicatorAnalytics(a0) { // fn#111436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4125, owner: ConnectionBanner.useConnectivityIndicatorAnalytics, offset: 0x023a209d, size: 124 bytes, params: 2, frame: 17
const env0_0 = a0;
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectivityIndicatorStateStore],
function() {
return ConnectivityIndicatorStateStore.getState();
});
const env0_2 = env1_4.useRef(null);
env1_4.useEffect(_fun111438, [state, a0]);
}
function n_111432(a0) { // fn#111432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3272, offset: 0x023a1f55, size: 75 bytes, params: 2, frame: 12
var r0;
var runOnJS;
var value2;
let value = a0 !== true;
if (value) {
r0 = value;
} else {
value = environment.__proto__;
r0 = result;
}
if (!r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_3]);
value(null);
}
}
function _fun111438() { // fn#111438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4259, offset: 0x023a212c, size: 199 bytes, params: 1, frame: 14
var r4;
var value2;
var value;
const binding = env0_2;
const current = binding.current;
binding.current = state;
if (current != null) {
value2 = environment.__proto__.__proto__;
if (current === ConnectivityIndicatorState.HIDDEN) {
if (state !== ConnectivityIndicatorState.HIDDEN) {
if (state !== ConnectivityIndicatorState.BACK_ONLINE) {
r4 = env0_0 ? 'hidden' : state !== ConnectivityIndicatorState.NO_CONNECTION ? 'connecting' : 'offline';
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(AnalyticEvents.CONNECTION_INDICATOR_SHOWN, {connection_indicator_type: r4});
}
}
} else if (current === ConnectivityIndicatorState.BACK_ONLINE) {
if (state !== ConnectivityIndicatorState.HIDDEN) {
if (state !== ConnectivityIndicatorState.BACK_ONLINE) {
r4 = env0_0 ? 'hidden' : state !== ConnectivityIndicatorState.NO_CONNECTION ? 'connecting' : 'offline';
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(AnalyticEvents.CONNECTION_INDICATOR_SHOWN, {connection_indicator_type: r4});
}
}
function getBannerLabel(a0) { // fn#111424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:936, offset: 0x023a171e, size: 238 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const WAITING_FOR_NETWORK = ConnectivityIndicatorState.WAITING_FOR_NETWORK;
if (WAITING_FOR_NETWORK === a0) {
return intl.string(t.XKk1gp);
}
const NO_CONNECTION = ConnectivityIndicatorState.NO_CONNECTION;
if (NO_CONNECTION === a0) {
return intl.string(t.zPerw8);
}
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
if (BACK_ONLINE === a0) {
return intl.string(t.j8lYE2);
}
}
function ConnectionBannerIcon({state}) { // fn#111425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:1176, offset: 0x023a180c, size: 411 bytes, params: 2, frame: 22
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
const value2 = Reflect.apply(useToken, UseTokenModule, [INTERACTIVE_ICON_DEFAULT]);
const WAITING_FOR_NETWORK = ConnectivityIndicatorState.WAITING_FOR_NETWORK;
if (WAITING_FOR_NETWORK === state) {
return (
<View style={styles.leadingSlot}>
<ActivityIndicator
size="small"
color={value2}
style={styles.spinner}
/>
</View>
);
}
const NO_CONNECTION = ConnectivityIndicatorState.NO_CONNECTION;
if (NO_CONNECTION === state) {
return (
<View style={styles.leadingSlot}>
{((ConnectionUnknownIcon) => <ConnectionUnknownIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT} />)((require(14758) /* metro dependency 14758: ConnectionUnknownIcon */).ConnectionUnknownIcon)}
</View>
);
}
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
if (BACK_ONLINE === state) {
return (
<View style={styles.leadingSlot}>
{((ConnectionFineIcon) => <ConnectionFineIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE} />)((require(14760) /* metro dependency 14760: ConnectionFineIcon */).ConnectionFineIcon)}
</View>
);
}
}
function ConnectionBannerContent({state}) { // fn#111426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:1718, offset: 0x023a19a7, size: 178 bytes, params: 2, frame: 21
const styles = useStyles();
const connectionBannerIcon = <ConnectionBannerIcon state={state} />;
const Text = (TextModule).Text;
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
return (
<View style={styles.content}>
{connectionBannerIcon}
<Text
variant="text-sm/medium"
color={state !== BACK_ONLINE ? 'text-muted' : 'text-feedback-positive'}
maxFontSizeMultiplier={1.5}
>
{getBannerLabel(state)}
</Text>
</View>
);
}
function BackOnlineGlow({progress}) { // fn#111427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2006, offset: 0x023a1a59, size: 358 bytes, params: 2, frame: 26
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const ICON_FEEDBACK_POSITIVE = (Native).colors.ICON_FEEDBACK_POSITIVE;
const value3 = ReactModule.useMemo(_fun111428, [Reflect.apply(useToken, UseTokenModule, [ICON_FEEDBACK_POSITIVE])]);
const View = (ReanimatedRexport).View;
return (
<View style={[styles.glow, {opacity: progress}]} pointerEvents="none">
{((Component) => <Component style={styles.glow} maskElement={((Component) => <Component style={styles.glowMaskGradient} colors={env0_15} locations={env0_16} start={env0_17} end={env0_18} />)(LinearGradient)}>{((Component) => <Component style={styles.glowMaskGradient} colors={value3} locations={env0_19} start={env0_20} end={env0_21} />)(LinearGradient)}</Component>)(Module05302)}
</View>
);
function _fun111428() { // fn#111428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2126, offset: 0x023a1bbf, size: 175 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(env0_0);
const value3 = value.alpha(0);
const items2 = [value3.css()];
const value5 = value.alpha(0.1);
items2[1] = value5.css();
const value6 = value.alpha(0.28);
items2[2] = value6.css();
value = value.alpha(0.55);
items2[3] = value.css();
return items2;
}
}
function ConnectionBannerInner() { // fn#111429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2906, offset: 0x023a1c6e, size: 565 bytes, params: 1, frame: 26
const styles = useStyles();
const value2 = useYouBarBottomMargin();
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectivityIndicatorStateStore],
function() {
return ConnectivityIndicatorStateStore.getState();
});
let HIDDEN = ConnectivityIndicatorState.HIDDEN;
const value3 = state !== HIDDEN;
let BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
const value4 = state === BACK_ONLINE;
HIDDEN = ConnectivityIndicatorState.HIDDEN;
const value5 = null;
const r7 = state === HIDDEN ? value5 : state;
const value6 = (ReanimatedRexportModule).useSharedValue(0);
const [property, property2] = Module00057(env0_4.useState(r7), 2);
const value9 = (ReanimatedRexportModule).useSharedValue(0);
var env0_4 = value9;
if (value5 != r7 && property !== r7) {
property2(r7);
}
env0_4.useEffect(_fun111431, [value3, value9]);
env0_4.useEffect(_fun111433, [value4, value6]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ConnectionBannerInnerV2 = ConnectionBannerInnerV;
ConnectionBannerInnerV2.__closure = {progress: value9, CONNECTION_BANNER_HEIGHT: CONNECTION_BANNER_HEIGHT};
ConnectionBannerInnerV2.__workletHash = 13973493587548;
ConnectionBannerInnerV2.__initData = env0_24;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ConnectionBannerInnerV2]);
const View = (ReanimatedRexport).View;
BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
return (
<View pointerEvents="none" style={[styles.container, {height: value2 + CONNECTION_BANNER_HEIGHT}, value12]}>
{
property !== BACK_ONLINE
? value5
: (
<BackOnlineGlow progress={value6} />
)
}
{
value5 != property
? (
<ConnectionBannerContent state={property} />
)
: value5
}
</View>
);
function _fun111431() { // fn#111431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3197, offset: 0x023a1ea3, size: 178 bytes, params: 1, frame: 25
const binding = env0_4;
const set = binding.set;
const withSpring = SpringModule.withSpring;
const r6 = result ? 1 : 0;
const n_1114322 = n_111432;
const object = {};
object.shouldShowBanner = result;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.setRenderState = Module00057;
n_1114322.__closure = object;
n_1114322.__workletHash = 3065113239920;
n_1114322.__initData = env1_23;
Reflect.apply(set, binding, [Reflect.apply(withSpring, SpringModule, [r6, YOU_BAR_SPRING_CONFIG,
'respect-motion-settings', n_1114322])]);
function n_111432(a0) { // fn#111432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3272, offset: 0x023a1f55, size: 75 bytes, params: 2, frame: 12
var r0;
var runOnJS;
var value2;
let value = a0 !== true;
if (value) {
r0 = value;
} else {
value = environment.__proto__;
r0 = result;
}
if (!r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_3]);
value(null);
}
}
}
function _fun111433() { // fn#111433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3468, offset: 0x023a1fa0, size: 71 bytes, params: 1, frame: 17
const binding = env0_2;
const set = binding.set;
Reflect.apply(set, binding, [SpringModule.withSpring(result_2 ? 1 : 0, YOU_BAR_SPRING_CONFIG)]);
}
function ConnectionBannerInnerV() { // fn#111434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3556, owner: ConnectionBannerInner.v, offset: 0x023a1fe7, size: 74 bytes, params: 1, frame: 12
const object = {};
const object2 = {};
object2.translateY = (1 - env0_4.get()) * CONNECTION_BANNER_HEIGHT;
object.transform = [object2];
object.opacity = env0_4.get();
return object;
}
}
function ConnectionBanner() { // fn#111435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4009, offset: 0x023a2031, size: 108 bytes, params: 1, frame: 15
const {timeoutMs,
hidden} = (ConnectionIndicatorExperiment).useConfig({location: 'ConnectionBanner'});
useConnectivityIndicatorAnalytics(hidden);
const value3 = null;
return (
value3 == timeoutMs || hidden
? value3
: (
<ConnectionBannerInner />
)
);
function useConnectivityIndicatorAnalytics(a0) { // fn#111436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4125, owner: ConnectionBanner.useConnectivityIndicatorAnalytics, offset: 0x023a209d, size: 124 bytes, params: 2, frame: 17
const env0_0 = a0;
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectivityIndicatorStateStore],
function() {
return ConnectivityIndicatorStateStore.getState();
});
const env0_2 = env1_4.useRef(null);
env1_4.useEffect(_fun111438, [state, a0]);
function _fun111438() { // fn#111438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4259, offset: 0x023a212c, size: 199 bytes, params: 1, frame: 14
var r4;
var value2;
var value;
const binding = env0_2;
const current = binding.current;
binding.current = state;
if (current != null) {
value2 = environment.__proto__.__proto__;
if (current === ConnectivityIndicatorState.HIDDEN) {
if (state !== ConnectivityIndicatorState.HIDDEN) {
if (state !== ConnectivityIndicatorState.BACK_ONLINE) {
r4 = env0_0 ? 'hidden' : state !== ConnectivityIndicatorState.NO_CONNECTION ? 'connecting' : 'offline';
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(AnalyticEvents.CONNECTION_INDICATOR_SHOWN, {connection_indicator_type: r4});
}
}
} else if (current === ConnectivityIndicatorState.BACK_ONLINE) {
if (state !== ConnectivityIndicatorState.HIDDEN) {
if (state !== ConnectivityIndicatorState.BACK_ONLINE) {
r4 = env0_0 ? 'hidden' : state !== ConnectivityIndicatorState.NO_CONNECTION ? 'connecting' : 'offline';
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(AnalyticEvents.CONNECTION_INDICATOR_SHOWN, {connection_indicator_type: r4});
}
}
}
}
}
}
}
}
global.__d(_fun111423, 14757, [57, 31, 27, 7554, 7553, 661, 33, 4501, 697, 1244, 3860, 14758, 14760, 4573, 674,
4017, 5302, 4589, 566, 683, 4577, 7555,
2]) /* metro module 14757, dependencies: [57, 31, 27, 7554, 7553, 661, 33, 4501, 697, 1244, 3860, 14758, 14760, 4573, 674, 4017, 5302, 4589, 566, 683, 4577, 7555, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 7555; source: modules/main_tabs_v2/native/ConnectionIndicatorExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun60761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7733:6, offset: 0x0170e18d, size: 211 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2025-12-connection-indicator', 'kind': 'user',
defaultConfig: {timeoutMs: undefined, hidden: true}, variations: {[1]: {'timeoutMs': 10000, 'hidden': false},
[2]: {'timeoutMs': 15000, 'hidden': false}, [3]: {'timeoutMs': 20000, 'hidden': false},
[4]: {'timeoutMs': 10000, 'hidden': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/ConnectionIndicatorExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/ConnectionIndicatorExperiment.tsx');
exports.default = value;
}
global.__d(_fun60761, 7555, [1854, 2]) /* metro module 7555, dependencies: [1854, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 14957; source: modules/main_tabs_v2/native/HideCoveredChannelsExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun113132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15154:6, offset: 0x023ea454, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-hide-covered-channels', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/HideCoveredChannelsExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/HideCoveredChannelsExperiment.tsx');
exports.default = value;
}
global.__d(_fun113132, 14957, [1854, 2]) /* metro module 14957, dependencies: [1854, 2] */;
@@ -1,4 +1,30 @@
/* Metro module 14299; source: modules/main_tabs_v2/native/MainNavigator.tsx; dependencies: [57, 31, 27, 1226, 14300, 661, 33, 4501, 477, 4092, 9884, 14301, 14302, 14360, 15124, 15129, 15132, 14899, 15170, 15224, 15227, 15231, 15233, 14893, 15260, 4015, 1482, 1583, 4863, 9603, 15261, 15310, 632, 5176, 7727, 4010, 5280, 11340, 14914, 15313, 10737, 15352, 9893, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import AppAnalyticsUtils from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import GetNavigationModalPresentation from './utils/getNavigationModalPresentation.tsx'; /* Metro dependency 9893 */
import GlobalStatusIndicator from '../../connectivity/native/components/GlobalStatusIndicator.tsx'; /* Metro dependency 10737 */
import StartupProfiler from '../../app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import CreateChatPanelNativeStackNavigator from './panels/createChatPanelNativeStackNavigator.tsx'; /* Metro dependency 14301 */
import VisualEffectViewTarget from '../../visual_effect_view/native/VisualEffectViewTarget.tsx'; /* Metro dependency 14914 */
import UseNativeThemeUpdater from '../../themes/native/useNativeThemeUpdater.tsx'; /* Metro dependency 15310 */
import LaunchPadContainer from '../../launchpad/native/LaunchPadContainer.tsx'; /* Metro dependency 15313 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as HeaderSharedModule from './shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../by-id/module-09884.js'; /* Metro dependency 9884 */
import * as StartupProfilerModule from '../../app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import * as NavigationConstantsModule from './NavigationConstants.tsx'; /* Metro dependency 14300 */
import * as AutoAnalyticsModule from '../../../components_native/AutoAnalytics.tsx'; /* Metro dependency 15124 */
import * as MainSharedModule from '../../../components_native/MainShared.tsx'; /* Metro dependency 15261 */
import * as AppComponentsModule from './AppComponents.tsx'; /* Metro dependency 15352 */
function _fun108153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:6, offset: 0x0231694b, size: 639 bytes, params: 8, frame: 24
var value8;
const env0_0 = require;
@@ -41,337 +67,423 @@ function _fun108153(global, require, importDefault, importAll, module, exports,
const getAccountStanding = function() {
return require(dependencyMap[24]).default;
};
const closure = getChannelScreen;
const getChannelScreen2 = getChannelScreen;
let 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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_7 = (require(14300) /* metro dependency 14300: NavigationConstants */).StackNavigationAnimationSettings;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.DrawerSourceTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const env0_12 = value3.Fragment;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({flex: {flex: 1}});
let value = ReactModule;
const env0_13 = (CreateStylesModule).createStyles({flex: {flex: 1}});
if ((require(477) /* metro dependency 477: PlatformUtils */).isIOS()) {
value8 = (require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() <= 15;
}
const env0_15 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_16 = (importDefault(14301) /* metro dependency 14301: createChatPanelNativeStackNavigator */)();
const env0_15 = (Module09884Module).createNativeStackNavigator();
const env0_16 = (CreateChatPanelNativeStackNavigator)();
Object = global.Object;
const env0_17 = Object.freeze({animation: 'none'});
value = value.memo(StackNavigator_108171);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/MainNavigator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/MainNavigator.tsx');
exports.default = value;
exports.MAIN_NAVIGATOR_ID = 'mainNavigator';
exports.getChannelScreen = closure;
}
function WrappedAutoAnalytics() { // fn#108157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:587, offset: 0x02316bca, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(15124) /* metro dependency 15124: AutoAnalytics */).default);
}
function getChannelScreen() { // fn#108168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1295, offset: 0x02316d36, size: 102 bytes, params: 1, frame: 17
const value = a0;
const env0_0 = value !== undefined ? value : StackNavigationAnimationSettings.animation;
const Screen = env0_16.Screen;
return (
<Screen
name="channel"
listeners={{beforeRemove: beforeRemove}}
options={options_108170}
getComponent={getChannelComponent}
/>
);
}
function StackNavigator_108171() { // fn#108171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1862, offset: 0x02316eec, size: 363 bytes, params: 1, frame: 22
const styles = useStyles();
(require(15261) /* metro dependency 15261: MainShared */).useScreenReaderEnabled();
(require(15261) /* metro dependency 15261: MainShared */).useAppKeyCommands();
(importDefault(15310) /* metro dependency 15310: useNativeThemeUpdater */)();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore],
_fun108172);
const binding = env0_4;
const useState = binding.useState;
let value = env0_3(Reflect.apply(useState, binding, [StackNavigationAnimationSettings.animation]), 2);
const property = value[0];
var env0_3 = value[1];
value = require(5176) /* metro dependency 5176: YouBarExperiment */;
value = value.useYouBarEnabled('stacknavigator');
return binding.useMemo(_fun108174, [styles, value2,
(require(7727) /* metro dependency 7727: HomeIndicator */).useHomeIndicatorStore(function(a0) {
return a0.autoHideHomeIndicator;
}), (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions(), property,
value, (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList]);
}
function beforeRemove({data}) { // fn#108169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1394, owner: getChannelScreen.beforeRemove, offset: 0x02316d9c, size: 220 bytes, params: 2, frame: 18
var moduleValue2;
var setKeyboardType;
var object2;
if ((require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput() != null) {
moduleValue2 = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
setKeyboardType = moduleValue2.setKeyboardType;
object2 = {};
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM;
Reflect.apply(setKeyboardType, moduleValue2, [object2]);
exports.getChannelScreen = getChannelScreen2;
function WrappedAutoAnalytics() { // fn#108157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:587, offset: 0x02316bca, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((AutoAnalyticsModule).default);
}
const type = data == null || data.action == null ? undefined : data.action.type;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const CHANNEL_BACK_NAVIGATED = AnalyticEvents.CHANNEL_BACK_NAVIGATED;
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_BACK_NAVIGATED,
{source: type === 'GO_BACK' ? DrawerSourceTypes.BACK_BUTTON : DrawerSourceTypes.SWIPE}]);
}
function getChannelScreenOptions({navigation, route}) { // fn#108170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1671, owner: getChannelScreen.options, offset: 0x02316e78, size: 116 bytes, params: 2, frame: 18
const object2 = {headerShown: true};
const renderHeader = (require(9603) /* metro dependency 9603: HeaderShared */).renderHeader;
object2.header = renderHeader;
const headerSharedModule = require(9603) /* metro dependency 9603: HeaderShared */;
const getDefaultChannelStackHeaderProps = headerSharedModule.getDefaultChannelStackHeaderProps;
copyDataProperties(object2, Reflect.apply(getDefaultChannelStackHeaderProps, headerSharedModule, [navigation,
route]), renderHeader);
copyDataProperties(object2, StackNavigationAnimationSettings, renderHeader);
object2['animation'] = env0_0;
return object2;
}
function _fun108172() { // fn#108172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2011, offset: 0x02317057, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getSessionId() != null;
}
function _fun108174() { // fn#108174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2301, offset: 0x0231707b, size: 1107 bytes, params: 1, frame: 40
const value2 = undefined;
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
const MainNavigator = Profiles.MainNavigator;
const VisualEffectViewTarget = importDefault(14914) /* metro dependency 14914: VisualEffectViewTarget */;
const LaunchPadContainer = importDefault(15313) /* metro dependency 15313: LaunchPadContainer */;
const GlobalStatusIndicator = importDefault(10737) /* metro dependency 10737: GlobalStatusIndicator */;
const value4 = null;
const r15 = env0_1 ? <WrappedAutoAnalytics /> : value4;
const defaultImport5 = StartupProfiler;
const StackNavigator = Profiles.StackNavigator;
const Navigator = env1_15.Navigator;
const object = {id: 'root', screenOptions: screenOptions_108175};
let Screen = env1_15.Screen;
const items2 = [<Screen name="main" options={env1_17}>{children_108176}</Screen>];
Screen = env1_15.Screen;
items2[1] = <Screen name="search" getComponent={getSearchComponent} />;
Screen = env1_15.Screen;
items2[2] = <Screen name="auth" getComponent={getAuthComponent} options={env1_17} />;
Screen = env1_15.Screen;
const getAccountStandingBinding = getAccountStanding;
const object2 = {'presentation': 'fullScreenModal', 'gestureEnabled': false};
copyDataProperties(object2, env1_17, undefined);
items2[3] = <Screen name="account-standing" getComponent={getAccountStandingBinding} options={object2} />;
items2[4] = env0_4 ? <env1_15.Screen name="you" options={options_108179} getComponent={getYouComponent} /> : value4;
Screen = env1_15.Screen;
const object3 = {name: 'friends', options: options_108180};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object3.listeners = {beforeRemove: platformUtilsModule.isAndroid() ? value2 : _fun108181};
object3.getComponent = getFriendsNavigatorComponent;
items2[5] = <Screen {...object3} />;
items2[6] = env0_4 ? <env1_15.Screen name="settings" options={options_108183} getComponent={getSettingsComponent} /> : value4;
Screen = env1_15.Screen;
items2[7] = <Screen name="sidebar" getComponent={getChannelDetailsComponent} options={options_108184} />;
Screen = env1_15.Screen;
items2[8] = <Screen name="message-requests" options={(importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)()} getComponent={getMessageRequestsComponent} />;
Screen = env1_15.Screen;
items2[9] = <Screen name="context-menu-commands" options={(importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)()} getComponent={getContextMenuCommandNavigatorComponent} />;
Screen = env1_15.Screen;
items2[10] = <Screen name="modal" options={options_108185} getComponent={getModalComponent} />;
const launchPadContainer = <LaunchPadContainer><GlobalStatusIndicator>{r15}{((Component) => <Component profile={StackNavigator}><Navigator {...object}>{items2}</Navigator></Component>)(defaultImport5)}</GlobalStatusIndicator></LaunchPadContainer>;
const APP_EXTRA_COMPONENTS = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS;
const APP_EXTRA_COMPONENTS_NEVER_FREEZE = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS_NEVER_FREEZE;
const APP_EXTRA_COMPONENTS_EXTERNAL_PIP = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS_EXTERNAL_PIP;
return (
<StartupProfiler profile={MainNavigator}>
<VisualEffectViewTarget
style={styles.flex}
nativeID="mainNavigator"
collapsableChildren={false}
>
{launchPadContainer}
{APP_EXTRA_COMPONENTS}
{APP_EXTRA_COMPONENTS_NEVER_FREEZE}
{APP_EXTRA_COMPONENTS_EXTERNAL_PIP}
</VisualEffectViewTarget>
</StartupProfiler>
);
}
function screenOptions_108175() { // fn#108175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2613, offset: 0x023174ce, size: 34 bytes, params: 1, frame: 12
const object2 = {headerShown: false};
const binding = env1_5;
object2.autoHideHomeIndicator = binding;
copyDataProperties(object2, env1_7, binding);
return object2;
}
function children_108176() { // fn#108176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2718, offset: 0x023174f0, size: 345 bytes, params: 1, frame: 25
const jsxRuntimeEnv2_12Binding = jsxRuntimeEnv2_12;
const Navigator = env2_16.Navigator;
const object = {id: 'tabs', screenOptions: screenOptions_108177};
let Screen = env2_16.Screen;
const getTabsComponentBinding = getTabsComponent;
const value2 = undefined;
const items2 = [<Screen name="tabs" getComponent={getTabsComponentBinding} options={env2_17} />];
Screen = env2_16.Screen;
const getMemberVerificationComponentBinding = getMemberVerificationComponent;
const object3 = {'presentation': 'transparentModal', 'animation': 'slide_from_bottom'};
const binding = env1_7;
copyDataProperties(object3, binding, undefined);
items2[1] = <Screen name="member-verification" getComponent={getMemberVerificationComponentBinding} options={object3} />;
const getChannelScreenBinding = getChannelScreen;
const value5 = null;
const animation = value5 == binding ? value2 : env1_7.animation;
items2[2] = getChannelScreenBinding(value5 != animation ? animation : env1_2);
items2[3] = env1_4 ? value5 : <env2_16.Screen name="settings" options={options_108178} getComponent={getSettingsComponent} />;
const navigator = <Navigator {...object}>{items2}</Navigator>;
const APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO;
return (
<>
{navigator}
{APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO}
</>
);
}
function options_108179() { // fn#108179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:3767, offset: 0x02317704, size: 247 bytes, params: 1, frame: 16
var r2;
var dependencyMap2;
var dependencyMap3;
var moduleValue2;
var value3;
var value4;
var value5;
const object2 = {};
let value = environment.__proto__.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[42]);
const moduleValue = require(dependencyMap[9]);
if (moduleValue.isIpadOS()) {
value5 = 'modal';
r2 = {presentation: value5};
dependencyMap3 = value5;
} else {
moduleValue2 = require(dependencyMap[8]);
if (moduleValue2.isAndroid()) {
value3 = environment.__proto__;
if (isChatBesideChannelList) {
value4 = 'transparentModal';
r2 = {presentation: value4};
dependencyMap2 = value4;
} else {
r2 = value2;
dependencyMap2 = dependencyMap;
function getChannelScreen() { // fn#108168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1295, offset: 0x02316d36, size: 102 bytes, params: 1, frame: 17
const value = a0;
const env0_0 = value !== undefined ? value : StackNavigationAnimationSettings.animation;
const Screen = env0_16.Screen;
return (
<Screen
name="channel"
listeners={{beforeRemove: beforeRemove_108169}}
options={options_108170}
getComponent={getChannelComponent}
/>
);
function getChannelScreenBeforeRemove({data}) { // fn#108169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1394, owner: getChannelScreen.beforeRemove, offset: 0x02316d9c, size: 220 bytes, params: 2, frame: 18
var moduleValue2;
var setKeyboardType;
var object;
if ((require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput() != null) {
moduleValue2 = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
setKeyboardType = moduleValue2.setKeyboardType;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM;
Reflect.apply(setKeyboardType, moduleValue2, [object]);
}
} else {
r2 = value2;
dependencyMap2 = dependencyMap;
const type = data == null || data.action == null ? undefined : data.action.type;
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const CHANNEL_BACK_NAVIGATED = AnalyticEvents.CHANNEL_BACK_NAVIGATED;
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_BACK_NAVIGATED,
{source: type === 'GO_BACK' ? DrawerSourceTypes.BACK_BUTTON : DrawerSourceTypes.SWIPE}]);
}
dependencyMap3 = dependencyMap2;
function getChannelScreenOptions({navigation, route}) { // fn#108170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1671, owner: getChannelScreen.options, offset: 0x02316e78, size: 116 bytes, params: 2, frame: 18
const object = {headerShown: true};
const renderHeader = (HeaderSharedModule).renderHeader;
object.header = renderHeader;
const getDefaultChannelStackHeaderProps = HeaderSharedModule.getDefaultChannelStackHeaderProps;
copyDataProperties(object, Reflect.apply(getDefaultChannelStackHeaderProps, HeaderSharedModule, [navigation,
route]), renderHeader);
copyDataProperties(object, StackNavigationAnimationSettings, renderHeader);
object['animation'] = env0_0;
return object;
}
}
copyDataProperties(object2, defaultImport(r2), dependencyMap3);
value = require(dependencyMap[8]);
object2['contentStyle'] = value.isAndroid() && isChatBesideChannelList ? {backgroundColor: 'transparent'} : value2;
object2['animation'] = 'slide_from_bottom';
value = environment.__proto__;
copyDataProperties(object2, env1_7, dependencyMap3);
return object2;
}
function options_108180({route}) { // fn#108180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4075, offset: 0x023177fb, size: 162 bytes, params: 2, frame: 18
const object2 = {};
let value = environment.__proto__.__proto__;
value = undefined;
const defaultImport = importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */;
let params = route.params;
const presentation = params == null || params.params == null ? value : params.params.presentation;
const value2 = presentation != null;
copyDataProperties(object2, defaultImport({presentation: value2 ? presentation : 'modal'}), value2);
params = route.params;
object2['fullScreenGestureEnabled'] = (params == null || params.params == null ? value : params.params.presentation) === 'card';
return object2;
}
function StackNavigator_108171() { // fn#108171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1862, offset: 0x02316eec, size: 363 bytes, params: 1, frame: 22
const styles = useStyles();
(MainSharedModule).useScreenReaderEnabled();
(MainSharedModule).useAppKeyCommands();
(UseNativeThemeUpdater)();
const value2 = (UseStateFromStoresModule).useStateFromStores([AuthenticationStore],
_fun108172);
const binding = env0_4;
const useState = binding.useState;
let value = env0_3(Reflect.apply(useState, binding, [StackNavigationAnimationSettings.animation]), 2);
const property = value[0];
var env0_3 = value[1];
value = require(5176) /* metro dependency 5176: YouBarExperiment */;
value = value.useYouBarEnabled('stacknavigator');
return binding.useMemo(_fun108174, [styles, value2,
(require(7727) /* metro dependency 7727: HomeIndicator */).useHomeIndicatorStore(function(a0) {
return a0.autoHideHomeIndicator;
}), (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions(), property,
value, (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList]);
function _fun108172() { // fn#108172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2011, offset: 0x02317057, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getSessionId() != null;
}
function _fun108181() { // fn#108181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4365, offset: 0x0231789d, size: 55 bytes, params: 1, frame: 13
env1_3('none');
global.setTimeout(_fun108182, StackNavigationAnimationSettings.duration);
}
function _fun108174() { // fn#108174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2301, offset: 0x0231707b, size: 1107 bytes, params: 1, frame: 40
const value2 = undefined;
const Profiles = (StartupProfilerModule).Profiles;
const MainNavigator = Profiles.MainNavigator;
const value4 = null;
const r15 = (
env0_1
? (
<WrappedAutoAnalytics />
)
: value4
);
const defaultImport5 = StartupProfiler;
const StackNavigator = Profiles.StackNavigator;
const Navigator = env1_15.Navigator;
const object4 = {id: 'root', screenOptions: screenOptions_108175};
let Screen = env1_15.Screen;
const items2 = [
<Screen name="main" options={env1_17}>
{children_108176}
</Screen>,
];
Screen = env1_15.Screen;
items2[1] = <Screen name="search" getComponent={getSearchComponent} />;
Screen = env1_15.Screen;
items2[2] = (
<Screen
name="auth"
getComponent={getAuthComponent}
options={env1_17}
/>
);
Screen = env1_15.Screen;
const getAccountStandingBinding = getAccountStanding;
const object5 = {'presentation': 'fullScreenModal', 'gestureEnabled': false};
copyDataProperties(object5, env1_17, undefined);
items2[3] = (
<Screen
name="account-standing"
getComponent={getAccountStandingBinding}
options={object5}
/>
);
items2[4] = (
env0_4
? (
<env1_15.Screen
name="you"
options={options_108179}
getComponent={getYouComponent}
/>
)
: value4
);
Screen = env1_15.Screen;
const object6 = {name: 'friends', options: options_108180};
object6.listeners = {beforeRemove: PlatformUtilsModule.isAndroid() ? value2 : _fun108181};
object6.getComponent = getFriendsNavigatorComponent;
items2[5] = <Screen {...object6} />;
items2[6] = (
env0_4
? (
<env1_15.Screen
name="settings"
options={options_108183}
getComponent={getSettingsComponent}
/>
)
: value4
);
Screen = env1_15.Screen;
items2[7] = (
<Screen
name="sidebar"
getComponent={getChannelDetailsComponent}
options={options_108184}
/>
);
Screen = env1_15.Screen;
items2[8] = (
<Screen
name="message-requests"
options={(importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)()}
getComponent={getMessageRequestsComponent}
/>
);
Screen = env1_15.Screen;
items2[9] = (
<Screen
name="context-menu-commands"
options={(importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)()}
getComponent={getContextMenuCommandNavigatorComponent}
/>
);
Screen = env1_15.Screen;
items2[10] = (
<Screen
name="modal"
options={options_108185}
getComponent={getModalComponent}
/>
);
const launchPadContainer = (
<LaunchPadContainer>
<GlobalStatusIndicator>
{r15}
{((Component) => <Component profile={StackNavigator}><Navigator {...object4}>{items2}</Navigator></Component>)(defaultImport5)}
</GlobalStatusIndicator>
</LaunchPadContainer>
);
const APP_EXTRA_COMPONENTS = (AppComponentsModule).APP_EXTRA_COMPONENTS;
const APP_EXTRA_COMPONENTS_NEVER_FREEZE = (AppComponentsModule).APP_EXTRA_COMPONENTS_NEVER_FREEZE;
const APP_EXTRA_COMPONENTS_EXTERNAL_PIP = (AppComponentsModule).APP_EXTRA_COMPONENTS_EXTERNAL_PIP;
return (
<StartupProfiler profile={MainNavigator}>
<VisualEffectViewTarget
style={styles.flex}
nativeID="mainNavigator"
collapsableChildren={false}
>
{launchPadContainer}
{APP_EXTRA_COMPONENTS}
{APP_EXTRA_COMPONENTS_NEVER_FREEZE}
{APP_EXTRA_COMPONENTS_EXTERNAL_PIP}
</VisualEffectViewTarget>
</StartupProfiler>
);
function screenOptions_108175() { // fn#108175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2613, offset: 0x023174ce, size: 34 bytes, params: 1, frame: 12
const object = {headerShown: false};
const binding = env1_5;
object.autoHideHomeIndicator = binding;
copyDataProperties(object, env1_7, binding);
return object;
}
function children_108176() { // fn#108176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2718, offset: 0x023174f0, size: 345 bytes, params: 1, frame: 25
const jsxRuntimeEnv2_12Binding = jsxRuntimeEnv2_12;
const Navigator = env2_16.Navigator;
const object2 = {id: 'tabs', screenOptions: screenOptions_108177};
let Screen = env2_16.Screen;
const getTabsComponentBinding = getTabsComponent;
const value2 = undefined;
const items2 = [
<Screen
name="tabs"
getComponent={getTabsComponentBinding}
options={env2_17}
/>,
];
Screen = env2_16.Screen;
const getMemberVerificationComponentBinding = getMemberVerificationComponent;
const object4 = {'presentation': 'transparentModal', 'animation': 'slide_from_bottom'};
const binding = env1_7;
copyDataProperties(object4, binding, undefined);
items2[1] = (
<Screen
name="member-verification"
getComponent={getMemberVerificationComponentBinding}
options={object4}
/>
);
const getChannelScreenBinding = getChannelScreen;
const value5 = null;
const animation = value5 == binding ? value2 : env1_7.animation;
items2[2] = getChannelScreenBinding(value5 != animation ? animation : env1_2);
items2[3] = (
env1_4
? value5
: (
<env2_16.Screen
name="settings"
options={options_108178}
getComponent={getSettingsComponent}
/>
)
);
const navigator = (
<Navigator {...object2}>
{items2}
</Navigator>
);
const APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO = (AppComponentsModule).APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO;
return (
<>
{navigator}
{APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO}
</>
);
function children_108176ScreenOptions({navigation}) { // fn#108177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2790, owner: children_108176.screenOptions, offset: 0x02317649, size: 106 bytes, params: 2, frame: 16
const object = {};
object.orientation = env3_14 ? 'default' : undefined;
object.headerShown = false;
const moduleValue = require(dependencyMap[29]);
const getDefaultStackHeaderProps = moduleValue.getDefaultStackHeaderProps;
copyDataProperties(object, Reflect.apply(getDefaultStackHeaderProps, moduleValue, [navigation]), dependencyMap);
copyDataProperties(object, StackNavigationAnimationSettings, dependencyMap);
copyDataProperties(object, env2_7, dependencyMap);
return object;
}
function children_108176Options({route}) { // fn#108178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:3250, owner: children_108176.options, offset: 0x023176b3, size: 81 bytes, params: 2, frame: 14
const object = {};
const params = route.params;
const value = params != null;
object.animation = value && params.isRootScreen ? 'slide_from_bottom' : 'slide_from_right';
object.headerShown = false;
copyDataProperties(object, env2_7, value);
return object;
}
}
function options_108179() { // fn#108179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:3767, offset: 0x02317704, size: 247 bytes, params: 1, frame: 16
var r2;
var dependencyMap2;
var dependencyMap3;
var moduleValue2;
var value3;
var value4;
var value5;
const object = {};
let value = environment.__proto__.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[42]);
const moduleValue = require(dependencyMap[9]);
if (moduleValue.isIpadOS()) {
value5 = 'modal';
r2 = {presentation: value5};
dependencyMap3 = value5;
} else {
moduleValue2 = require(dependencyMap[8]);
if (moduleValue2.isAndroid()) {
value3 = environment.__proto__;
if (isChatBesideChannelList) {
value4 = 'transparentModal';
r2 = {presentation: value4};
dependencyMap2 = value4;
} else {
r2 = value2;
dependencyMap2 = dependencyMap;
}
} else {
r2 = value2;
dependencyMap2 = dependencyMap;
}
dependencyMap3 = dependencyMap2;
}
copyDataProperties(object, defaultImport(r2), dependencyMap3);
value = require(dependencyMap[8]);
object['contentStyle'] = value.isAndroid() && isChatBesideChannelList ? {backgroundColor: 'transparent'} : value2;
object['animation'] = 'slide_from_bottom';
value = environment.__proto__;
copyDataProperties(object, env1_7, dependencyMap3);
return object;
}
function options_108180({route}) { // fn#108180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4075, offset: 0x023177fb, size: 162 bytes, params: 2, frame: 18
const object = {};
let value = environment.__proto__.__proto__;
value = undefined;
const defaultImport = GetNavigationModalPresentation;
let params = route.params;
const presentation = params == null || params.params == null ? value : params.params.presentation;
const value2 = presentation != null;
copyDataProperties(object, defaultImport({presentation: value2 ? presentation : 'modal'}), value2);
params = route.params;
object['fullScreenGestureEnabled'] = (params == null || params.params == null ? value : params.params.presentation) === 'card';
return object;
}
function _fun108181() { // fn#108181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4365, offset: 0x0231789d, size: 55 bytes, params: 1, frame: 13
env1_3('none');
global.setTimeout(_fun108182, StackNavigationAnimationSettings.duration);
function _fun108182() { // fn#108182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4392, offset: 0x023178d4, size: 29 bytes, params: 1, frame: 11
return env2_3(StackNavigationAnimationSettings.animation);
}
}
function options_108183() { // fn#108183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4508, offset: 0x023178f1, size: 126 bytes, params: 1, frame: 15
var r1;
var dependencyMap2;
const object = {};
let value = environment.__proto__.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[42]);
if (Reflect.apply(require(dependencyMap[9]).isIpadOS, value, [])) {
value = 'modal';
r1 = {presentation: value};
dependencyMap2 = value;
} else {
r1 = value2;
dependencyMap2 = dependencyMap;
}
copyDataProperties(object, defaultImport(r1), dependencyMap2);
object['animation'] = 'slide_from_bottom';
object['fullScreenGestureEnabled'] = true;
value = environment.__proto__;
copyDataProperties(object, env1_7, dependencyMap2);
return object;
}
function options_108184() { // fn#108184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4757, offset: 0x0231796f, size: 41 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
return (GetNavigationModalPresentation)({lockOrientation: false});
}
function options_108185({route}) { // fn#108185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:5040, offset: 0x02317998, size: 163 bytes, params: 2, frame: 19
const object = {};
object.fullScreenGestureEnabled = route.params.fullScreenGestureEnabled;
object.animation = route.params.animation ?? 'slide_from_bottom';
value = environment.__proto__.__proto__;
value = importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */;
const presentation = route.params.presentation;
const value2 = 'transparentModal';
copyDataProperties(object,
value({presentation: presentation === 'card' ? value2 : route.params.presentation ?? value2}), presentation);
return object;
}
}
function options_108183() { // fn#108183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4508, offset: 0x023178f1, size: 126 bytes, params: 1, frame: 15
var r1;
var dependencyMap2;
const object2 = {};
let value = environment.__proto__.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[42]);
if (Reflect.apply(require(dependencyMap[9]).isIpadOS, value, [])) {
value = 'modal';
r1 = {presentation: value};
dependencyMap2 = value;
} else {
r1 = value2;
dependencyMap2 = dependencyMap;
}
copyDataProperties(object2, defaultImport(r1), dependencyMap2);
object2['animation'] = 'slide_from_bottom';
object2['fullScreenGestureEnabled'] = true;
value = environment.__proto__;
copyDataProperties(object2, env1_7, dependencyMap2);
return object2;
}
function options_108184() { // fn#108184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4757, offset: 0x0231796f, size: 41 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
return (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)({lockOrientation: false});
}
function options_108185({route}) { // fn#108185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:5040, offset: 0x02317998, size: 163 bytes, params: 2, frame: 19
const object2 = {};
object2.fullScreenGestureEnabled = route.params.fullScreenGestureEnabled;
object2.animation = route.params.animation ?? 'slide_from_bottom';
value = environment.__proto__.__proto__;
value = importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */;
const presentation = route.params.presentation;
const value2 = 'transparentModal';
copyDataProperties(object2,
value({presentation: presentation === 'card' ? value2 : route.params.presentation ?? value2}), presentation);
return object2;
}
function children_108176ScreenOptions({navigation}) { // fn#108177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2790, owner: children_108176.screenOptions, offset: 0x02317649, size: 106 bytes, params: 2, frame: 16
const object2 = {};
object2.orientation = env3_14 ? 'default' : undefined;
object2.headerShown = false;
const moduleValue = require(dependencyMap[29]);
const getDefaultStackHeaderProps = moduleValue.getDefaultStackHeaderProps;
copyDataProperties(object2, Reflect.apply(getDefaultStackHeaderProps, moduleValue, [navigation]), dependencyMap);
copyDataProperties(object2, StackNavigationAnimationSettings, dependencyMap);
copyDataProperties(object2, env2_7, dependencyMap);
return object2;
}
function children_108176Options({route}) { // fn#108178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:3250, owner: children_108176.options, offset: 0x023176b3, size: 81 bytes, params: 2, frame: 14
const object2 = {};
const params = route.params;
const value = params != null;
object2.animation = value && params.isRootScreen ? 'slide_from_bottom' : 'slide_from_right';
object2.headerShown = false;
copyDataProperties(object2, env2_7, value);
return object2;
}
function _fun108182() { // fn#108182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4392, offset: 0x023178d4, size: 29 bytes, params: 1, frame: 11
return env2_3(StackNavigationAnimationSettings.animation);
}
global.__d(_fun108153, 14299, [57, 31, 27, 1226, 14300, 661, 33, 4501, 477, 4092, 9884, 14301, 14302, 14360, 15124,
15129, 15132, 14899, 15170, 15224, 15227, 15231, 15233, 14893, 15260, 4015, 1482, 1583, 4863, 9603, 15261,
15310, 632, 5176, 7727, 4010, 5280, 11340, 14914, 15313, 10737, 15352, 9893,
2]) /* metro module 14299, dependencies: [57, 31, 27, 1226, 14300, 661, 33, 4501, 477, 4092, 9884, 14301, 14302, 14360, 15124, 15129, 15132, 14899, 15170, 15224, 15227, 15231, 15233, 14893, 15260, 4015, 1482, 1583, 4863, 9603, 15261, 15310, 632, 5176, 7727, 4010, 5280, 11340, 14914, 15313, 10737, 15352, 9893, 2] */;
@@ -1,36 +1,46 @@
/* Metro module 14360; source: modules/main_tabs_v2/native/MainTabs.tsx; dependencies: [31, 27, 33, 4501, 4003, 7703, 1585, 3868, 7704, 14361, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseColorThemeBackground from '../../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
import ThemedGradient from '../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import MainTabsNavigatorPanel from './panels/MainTabsNavigatorPanel.tsx'; /* Metro dependency 14361 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseActiveThemeModule from '../../client_themes/native/useActiveTheme.tsx'; /* Metro dependency 7703 */
function _fun108668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14557:6, offset: 0x02328d04, size: 216 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
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({container: {flex: 1}});
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({container: {flex: 1}});
value = value.memo(MainTabs);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/MainTabs.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/MainTabs.tsx');
exports.default = value;
function MainTabs() { // fn#108669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14557:207, offset: 0x02328ddc, size: 247 bytes, params: 1, frame: 23
const value2 = (UseColorThemeBackground)();
const value3 = (UseActiveThemeModule).useIsCustomThemeActive();
const styles = useStyles();
const {left, right} = (UseSafeAreaInsetsNative)();
const items2 = [styles.container];
items2[1] = {marginLeft: left, marginRight: right};
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
let value = ThemedGradient;
value = ((Component) => <Component absolute mix={value3} />)(value);
return (
<View style={items2}>
<ThemeContextProvider gradient={value2}>
{value}
{((Component) => <Component />)(MainTabsNavigatorPanel)}
</ThemeContextProvider>
</View>
);
}
}
function MainTabs() { // fn#108669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14557:207, offset: 0x02328ddc, size: 247 bytes, params: 1, frame: 23
const value2 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const value3 = (require(7703) /* metro dependency 7703: useActiveTheme */).useIsCustomThemeActive();
const styles = useStyles();
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.container];
items2[1] = {marginLeft: left, marginRight: right};
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
let value = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
value = ((Component) => <Component absolute mix={value3} />)(value);
return (
<View style={items2}>
<ThemeContextProvider gradient={value2}>
{value}
{((Component) => <Component />)(importDefault(14361) /* metro dependency 14361: MainTabsNavigatorPanel */)}
</ThemeContextProvider>
</View>
);
}
global.__d(_fun108668, 14360, [31, 27, 33, 4501, 4003, 7703, 1585, 3868, 7704, 14361,
2]) /* metro module 14360, dependencies: [31, 27, 33, 4501, 4003, 7703, 1585, 3868, 7704, 14361, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 7607; source: modules/main_tabs_v2/native/MainTabsConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7785:6, offset: 0x01716047, size: 200 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/MainTabsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/MainTabsConstants.tsx');
exports.MODE_CHANGE_PHYSICS = {'mass': 0.5, 'damping': 30, 'stiffness': 320};
exports.MainTabsNavigatorScreens = {GUILDS: 'guilds', MESSAGES: 'messages', NOTIFICATIONS: 'notifications',
YOU: 'you', SETTINGS: 'settings', SETTINGS_JUMP: 'settings_jump', LAUNCHPAD: 'launchpad',
FRIENDS: 'friends-tab', ICYMI: 'icymi', PLAY: 'play'};
}
global.__d(_fun60951, 7607, [2]) /* metro module 7607, dependencies: [2] */;
@@ -1,9 +1,12 @@
/* Metro module 14300; source: modules/main_tabs_v2/native/NavigationConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun108186(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14497:6, offset: 0x02317a3b, size: 92 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/NavigationConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/NavigationConstants.tsx');
exports.StackNavigationAnimationSettings = {'animation': 'simple_push', 'duration': 250,
'fullScreenGestureEnabled': true};
}
global.__d(_fun108186, 14300, [2]) /* metro module 14300, dependencies: [2] */;
@@ -1,4 +1,13 @@
/* Metro module 6936; source: modules/main_tabs_v2/native/NavigationHistoryStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 4008, 4007, 4010, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as RootNavigationRefNativeModule from '../RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
function _fun55132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:6, offset: 0x01376d7a, size: 466 bytes, params: 8, frame: 25
const env0_0 = require;
const _arrayLikeToArray_55135 = function(a0, a1) {
@@ -46,187 +55,273 @@ function _fun55132(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const RegExp = global.RegExp;
const regExp = new RegExp('^(?:' + 'channel-' + '|' + 'guild-' + ')');
const env0_8 = [];
const Map = global.Map;
let map = new Map();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
map = _fun55141(PersistedStore);
map.displayName = 'NavigationHistoryStore';
map.persistKey = 'NavigationHistoryStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_55147});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/NavigationHistoryStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/NavigationHistoryStore.tsx');
exports.default = map;
exports.CHANNEL_PREFIX = 'channel-';
exports.GUILD_PREFIX = 'guild-';
exports.getIdFromHistoryItem = getIdFromHistoryItem;
exports.handleHistoryStoreNavigationChange = handleHistoryStoreNavigationChange;
exports.getNavigationHistory = getNavigationHistory;
}
function _createForOfIteratorHelperLoose_55133(a0, a1) { // fn#55133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:150, offset: 0x01376f4c, size: 370 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)) {
function _createForOfIteratorHelperLoose_55133(a0, a1) { // fn#55133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:150, offset: 0x01376f4c, size: 370 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);
}
return _fun55134;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_55135(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun55134;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_55135(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_55135(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_55135(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun55134;
}
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 _fun55134() { // fn#55134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:721, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _isNativeReflectConstruct_55136() { // fn#55136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1060, offset: 0x013770be, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_55136_isNativeReflectConstruct = function() {
return !!result;
})();
}
function cleanDuplicatesAndAppend(a0) { // fn#55139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2212, offset: 0x0137711c, size: 187 bytes, params: 2, frame: 16
var set;
var Date;
const env0_0 = a0;
let binding = env0_8;
const property = binding[binding.length - 1];
binding = env0_9;
env0_8 = binding.has(a0) ? env0_8.filter(_fun55140) : env0_8;
if (property != null) {
binding = env0_9;
set = binding.set;
Date = global.Date;
Reflect.apply(set, binding, [property, Date.now()]);
}
env0_9.set(a0, undefined);
env0_8.push(a0);
if (env0_8.length > 100) {
env0_8.shift();
}
env0_10.emitChange();
function _fun55140(a0) { // fn#55140, offset: 0x00ce1772, size: 16 bytes, params: 2, frame: 2
return a0 !== env0_0;
}
}
function _fun55141(a0) { // fn#55141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1333, offset: 0x013771d7, size: 141 bytes, params: 2, frame: 16
const NavigationHistoryStore2 = NavigationHistoryStore;
Inherits(NavigationHistoryStore2, a0);
return CreateClass(NavigationHistoryStore2, [{key: 'initialize', value: value_55143}, {key: 'getState',
value: value_55144}, {key: 'getLastHistory', value: value_55145}, {key: 'getLastFocusedTimestampForHistoryItem',
value: value_55146}]);
function NavigationHistoryStore() { // fn#55142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1345, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, NavigationHistoryStore);
const value3 = env1_5(NavigationHistoryStore);
return env1_4(this, _isNativeReflectConstruct_55136() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_55143(a0) { // fn#55143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1673, offset: 0x01377264, size: 140 bytes, params: 2, frame: 16
var history;
var r1;
var r3;
var value5;
var set;
var value6;
let binding = env1_9;
binding.clear();
const _createForOfIteratorHelperLoose_55133Binding = _createForOfIteratorHelperLoose_55133;
const value2 = undefined;
reducibleJoin2: while (true) {
if (a0 == null) {
history = value2;
break reducibleJoin2;
}
history = a0.history;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (history != null) {
r1 = history;
break reducibleJoin4;
}
r1 = [];
break reducibleJoin4;
}
const value3 = _createForOfIteratorHelperLoose_55133Binding(r1);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
reducibleLoop5: while (true) {
value5 = r3.value;
binding = env1_9;
set = binding.set;
Reflect.apply(set, binding, [value5, value2]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop5;
}
r3 = value6;
continue reducibleLoop5;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun55134;
}
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 _isNativeReflectConstruct_55136() { // fn#55136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1060, offset: 0x013770be, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_55136_isNativeReflectConstruct = function() {
return !!result;
})();
}
function cleanDuplicatesAndAppend(a0) { // fn#55139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2212, offset: 0x0137711c, size: 187 bytes, params: 2, frame: 16
var set;
var Date;
const env0_0 = a0;
let binding = env0_8;
const property = binding[binding.length - 1];
binding = env0_9;
env0_8 = binding.has(a0) ? env0_8.filter(_fun55140) : env0_8;
if (property != null) {
binding = env0_9;
set = binding.set;
Date = global.Date;
Reflect.apply(set, binding, [property, Date.now()]);
}
env0_9.set(a0, undefined);
env0_8.push(a0);
if (env0_8.length > 100) {
env0_8.shift();
}
env0_10.emitChange();
}
function _fun55141(a0) { // fn#55141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1333, offset: 0x013771d7, size: 141 bytes, params: 2, frame: 16
const closure = NavigationHistoryStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_55143}, {key: 'getState', value: value_55144},
{key: 'getLastHistory', value: value_55145}, {key: 'getLastFocusedTimestampForHistoryItem',
value: value_55146}]);
}
function LOGOUT_55147() { // fn#55147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2181, offset: 0x01377322, size: 29 bytes, params: 1, frame: 9
env0_8 = [];
env0_9.clear();
}
function getIdFromHistoryItem(a0) { // fn#55148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2563, offset: 0x0137733f, size: 27 bytes, params: 2, frame: 13
return a0.replace(env0_7, '');
}
function handleHistoryStoreNavigationChange() { // fn#55149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2658, offset: 0x0137735a, size: 365 bytes, params: 1, frame: 19
var channelId;
var guildId;
var value6;
var moduleValue4;
const value2 = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
var currentRoute = rootNavigationRef.getCurrentRoute();
if (currentRoute == null) {
const Array = global.Array;
const from = Array.from;
binding = env1_9;
env1_8 = Reflect.apply(from, Array, [binding.keys()]);
return value2;
}
var params = currentRoute.params;
if (params == null) {
return value2;
function value_55144() { // fn#55144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1879, offset: 0x013772f0, size: 16 bytes, params: 1, frame: 2
return {history: env1_8};
}
var value5 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(currentRoute);
if (value5 == null) {
value6 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(currentRoute);
if (value6 == null) {
function value_55145() { // fn#55145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1938, offset: 0x01377300, size: 34 bytes, params: 1, frame: 3
let value = a0;
const r2 = value !== undefined ? value : 1;
value = environment.__proto__;
const binding = env1_8;
return binding[binding.length - r2];
}
function value_55146(a0) { // fn#55146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2026, offset: 0x00f7ebd1, size: 22 bytes, params: 2, frame: 11
return env1_9.get(a0);
}
}
function LOGOUT_55147() { // fn#55147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2181, offset: 0x01377322, size: 29 bytes, params: 1, frame: 9
env0_8 = [];
env0_9.clear();
}
function getIdFromHistoryItem(a0) { // fn#55148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2563, offset: 0x0137733f, size: 27 bytes, params: 2, frame: 13
return a0.replace(env0_7, '');
}
function handleHistoryStoreNavigationChange() { // fn#55149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2658, offset: 0x0137735a, size: 365 bytes, params: 1, frame: 19
var channelId;
var guildId;
var value6;
var moduleValue4;
const value2 = undefined;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null) {
var currentRoute = rootNavigationRef.getCurrentRoute();
if (currentRoute == null) {
return value2;
}
moduleValue4 = require(4010) /* metro dependency 4010: useChatLayout */;
if (moduleValue4.getChatLayout().isChatLockedOpen) {
params = value6.params;
channelId = params == null ? value2 : params.channelId;
if (channelId != null) {
cleanDuplicatesAndAppend('' + 'channel-' + channelId);
var params = currentRoute.params;
if (params == null) {
return value2;
}
var value5 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(currentRoute);
if (value5 == null) {
value6 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(currentRoute);
if (value6 == null) {
return value2;
}
moduleValue4 = require(4010) /* metro dependency 4010: useChatLayout */;
if (moduleValue4.getChatLayout().isChatLockedOpen) {
params = value6.params;
channelId = params == null ? value2 : params.channelId;
if (channelId != null) {
cleanDuplicatesAndAppend('' + 'channel-' + channelId);
return value2;
}
params = value6.params;
guildId = params == null ? value2 : params.guildId;
if (guildId != null) {
cleanDuplicatesAndAppend('' + 'guild-' + guildId);
}
return value2;
}
params = value6.params;
@@ -236,80 +331,16 @@ function handleHistoryStoreNavigationChange() { // fn#55149, source: /ci/build/d
}
return value2;
}
params = value6.params;
guildId = params == null ? value2 : params.guildId;
if (guildId != null) {
cleanDuplicatesAndAppend('' + 'guild-' + guildId);
}
return value2;
cleanDuplicatesAndAppend('' + 'channel-' + value5.params.channelId);
}
cleanDuplicatesAndAppend('' + 'channel-' + value5.params.channelId);
return value2;
}
return value2;
}
function value_55143(a0) { // fn#55143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1673, offset: 0x01377264, size: 140 bytes, params: 2, frame: 16
var history;
var r1;
var r3;
var value5;
var set;
var value6;
let binding = env1_9;
binding.clear();
const _createForOfIteratorHelperLoose_55133Binding = _createForOfIteratorHelperLoose_55133;
const value2 = undefined;
reducibleJoin2: while (true) {
if (a0 == null) {
history = value2;
break reducibleJoin2;
}
history = a0.history;
break reducibleJoin2;
function getNavigationHistory() { // fn#55150, offset: 0x00c539ad, size: 9 bytes, params: 1, frame: 1
return env0_8;
}
reducibleJoin4: while (true) {
if (history != null) {
r1 = history;
break reducibleJoin4;
}
r1 = [];
break reducibleJoin4;
}
const value3 = _createForOfIteratorHelperLoose_55133Binding(r1);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
reducibleLoop5: while (true) {
value5 = r3.value;
binding = env1_9;
set = binding.set;
Reflect.apply(set, binding, [value5, value2]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop5;
}
r3 = value6;
continue reducibleLoop5;
}
}
const Array = global.Array;
const from = Array.from;
binding = env1_9;
env1_8 = Reflect.apply(from, Array, [binding.keys()]);
return value2;
}
function value_55144() { // fn#55144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1879, offset: 0x013772f0, size: 16 bytes, params: 1, frame: 2
return {history: env1_8};
}
function value_55145() { // fn#55145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1938, offset: 0x01377300, size: 34 bytes, params: 1, frame: 3
let value = a0;
const r2 = value !== undefined ? value : 1;
value = environment.__proto__;
const binding = env1_8;
return binding[binding.length - r2];
}
global.__d(_fun55132, 6936, [6, 7, 15, 17, 18, 566, 694, 4008, 4007, 4010,
2]) /* metro module 6936, dependencies: [6, 7, 15, 17, 18, 566, 694, 4008, 4007, 4010, 2] */;
@@ -1,4 +1,26 @@
/* Metro module 14892; source: modules/main_tabs_v2/native/TabsNavigator.tsx; dependencies: [31, 27, 9559, 1934, 3969, 7607, 33, 4501, 14370, 14762, 14893, 14899, 14812, 14922, 566, 13574, 14934, 1585, 6517, 14935, 14885, 14936, 14952, 14886, 7556, 9581, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UseIsWindowLarge from '../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
import AppFreezeStore from '../../panels/morphable/AppFreezeStore.tsx'; /* Metro dependency 9559 */
import AppFreezer from '../../panels/morphable/native/AppFreezer.tsx'; /* Metro dependency 14885 */
import UseNotificationPermissionPrompt from '../../nuf/native/useNotificationPermissionPrompt.tsx'; /* Metro dependency 14886 */
import UseTabBarTabOptions from './shared_components/tab_bar/useTabBarTabOptions.tsx'; /* Metro dependency 14936 */
import UseTabBarTabListeners from './shared_components/tab_bar/useTabBarTabListeners.tsx'; /* Metro dependency 14952 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as MainTabsConstantsModule from './MainTabsConstants.tsx'; /* Metro dependency 7607 */
import * as ICYMIExperimentModule from '../../icymi/ICYMIExperiment.tsx'; /* Metro dependency 9581 */
import * as UseTabsVisibleModule from './utils/useTabsVisible.tsx'; /* Metro dependency 13574 */
import * as Module14922Module from '../../../by-id/module-14922.js'; /* Metro dependency 14922 */
import * as UseLaunchWelcomeNuxModule from '../../launch_welcome/native/useLaunchWelcomeNux.tsx'; /* Metro dependency 14934 */
function _fun112651(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:6, offset: 0x023d62b0, size: 430 bytes, params: 8, frame: 22
const env0_0 = require;
const getGuildsComponent_112652 = function() {
@@ -18,165 +40,185 @@ function _fun112651(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const appFreezeStore = importDefault(9559) /* metro dependency 9559: AppFreezeStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_8 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.jsxs;
const env0_11 = value2.Fragment;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({tabBar: {display: 'flex'}});
const env0_13 = (require(14922) /* metro dependency 14922 */).createBottomTabNavigator();
let value = ReactModule;
const env0_12 = (CreateStylesModule).createStyles({tabBar: {display: 'flex'}});
const env0_13 = (Module14922Module).createBottomTabNavigator();
object = {ignoreQuestDock: true};
const env0_15 = value.memo(_fun112658);
value = value.memo(TabsNavigator);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/TabsNavigator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/TabsNavigator.tsx');
exports.default = value;
}
function renderTabBar(a0) { // fn#112657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1396, offset: 0x023d649f, size: 99 bytes, params: 2, frame: 18
a0.insets;
const value = Object.create(null);
value.insets = 0;
return ((Component) => <Component>{((Component) => <Component {...copyDataProperties({}, a0, value,
undefined)} />)(env0_15)}</Component>)(importDefault(14885) /* metro dependency 14885: AppFreezer */);
}
function _fun112658(a0) { // fn#112658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:640, offset: 0x023d6502, size: 547 bytes, params: 2, frame: 30
var r5;
var value;
const styles = useStyles();
const state = a0.state;
const value2 = (require(13574) /* metro dependency 13574: useTabsVisible */).useTabsVisible(state.routes[state.index]);
const useLaunchWelcomeNuxModule = require(14934) /* metro dependency 14934: useLaunchWelcomeNux */;
const useLaunchWelcomeNuxVisible = useLaunchWelcomeNuxModule.useLaunchWelcomeNuxVisible;
const isNuxVisible = Reflect.apply(useLaunchWelcomeNuxVisible, useLaunchWelcomeNuxModule, []).isNuxVisible;
const value3 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight(env0_14);
const value4 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsWidth();
const binding = env0_3;
const value5 = binding.useMemo(_fun112659, [value2, value3, value4]);
const value6 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value7 = binding.useMemo(function() {
return {top: top, bottom: bottom, left: 0, right: 0};
}, [value6.top, value6.bottom]);
const useContext = binding.useContext;
const BottomTabBarHeightCallbackContext = (require(14922) /* metro dependency 14922 */).BottomTabBarHeightCallbackContext;
const value9 = binding.useCallback(_fun112661, [Reflect.apply(useContext, binding,
[BottomTabBarHeightCallbackContext])]);
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
const Provider = BottomTabBarHeightCallbackContext.Provider;
const items2 = [styles.tabBar, value5];
const BottomTabBar = (require(14922) /* metro dependency 14922 */).BottomTabBar;
const provider = <Provider value={value9}><View style={items2}><BottomTabBar {...a0} {...{['insets']: value7}} /></View></Provider>;
if (isNuxVisible) {
value = importDefault(14935) /* metro dependency 14935: LaunchWelcomeNuxContainer */;
value = ((Component) => <Component descriptors={a0.descriptors} isTabsVisible={value2} />)(value);
r5 = value;
} else {
r5 = null;
function renderTabBar(a0) { // fn#112657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1396, offset: 0x023d649f, size: 99 bytes, params: 2, frame: 18
a0.insets;
const value = Object.create(null);
value.insets = 0;
return ((Component) => <Component>{((Component) => <Component {...copyDataProperties({}, a0, value,
undefined)} />)(env0_15)}</Component>)(AppFreezer);
}
return (
<LayerScope>
{provider}
{r5}
</LayerScope>
);
}
function TabsNavigator() { // fn#112662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1491, offset: 0x023d67c1, size: 266 bytes, params: 1, frame: 22
const value2 = (importDefault(14936) /* metro dependency 14936: useTabBarTabOptions */)();
const value3 = (importDefault(14952) /* metro dependency 14952: useTabBarTabListeners */)();
const value4 = TabsNavigatorUseInitialGuildParams();
(importDefault(14886) /* metro dependency 14886: useNotificationPermissionPrompt */)();
const value5 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const env0_3 = value5;
const value6 = (require(9581) /* metro dependency 9581: ICYMIExperiment */).useICYMIEnabled('TabsNavigator');
const value7 = AppFreezeStore(function(a0) {
return a0.lockKeys.size > 0;
});
const Navigator = env0_13.Navigator;
const renderTabBarBinding = renderTabBar;
const base = value2.base;
const binding = env0_3;
const useMemo = binding.useMemo;
return (
<Navigator
id="tabs"
tabBar={renderTabBarBinding}
freezeAllTabs={value7}
screenOptions={base}
>
{Reflect.apply(useMemo, binding, [_fun112666, [value2, value3, value4, value6, value5]])}
</Navigator>
);
}
function _fun112658(a0) { // fn#112658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:640, offset: 0x023d6502, size: 547 bytes, params: 2, frame: 30
var r5;
var value;
const styles = useStyles();
const state = a0.state;
const value2 = (UseTabsVisibleModule).useTabsVisible(state.routes[state.index]);
const useLaunchWelcomeNuxVisible = UseLaunchWelcomeNuxModule.useLaunchWelcomeNuxVisible;
const isNuxVisible = Reflect.apply(useLaunchWelcomeNuxVisible, UseLaunchWelcomeNuxModule, []).isNuxVisible;
const value3 = (UseTabsVisibleModule).useMainTabsHeight(env0_14);
const value4 = (UseTabsVisibleModule).useMainTabsWidth();
const binding = env0_3;
const value5 = binding.useMemo(_fun112659, [value2, value3, value4]);
const value6 = (UseSafeAreaInsetsNative)();
const value7 = binding.useMemo(function() {
return {top: top, bottom: bottom, left: 0, right: 0};
}, [value6.top, value6.bottom]);
const useContext = binding.useContext;
const BottomTabBarHeightCallbackContext = (Module14922Module).BottomTabBarHeightCallbackContext;
const value9 = binding.useCallback(_fun112661, [Reflect.apply(useContext, binding,
[BottomTabBarHeightCallbackContext])]);
const LayerScope = (LayerScopeNativeModule).LayerScope;
const Provider = BottomTabBarHeightCallbackContext.Provider;
const items2 = [styles.tabBar, value5];
const BottomTabBar = (Module14922Module).BottomTabBar;
const provider = (
<Provider value={value9}>
<View style={items2}>
<BottomTabBar {...a0} {...{['insets']: value7}} />
</View>
</Provider>
);
if (isNuxVisible) {
value = importDefault(14935) /* metro dependency 14935: LaunchWelcomeNuxContainer */;
value = ((Component) => <Component descriptors={a0.descriptors} isTabsVisible={value2} />)(value);
r5 = value;
} else {
r5 = null;
}
return (
<LayerScope>
{provider}
{r5}
</LayerScope>
);
function _fun112659() { // fn#112659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:849, offset: 0x023d6725, size: 58 bytes, params: 1, frame: 4
return {height: env0_1 > 0 ? env0_1 : undefined, width: env0_2, display: env0_0 ? 'flex' : 'none'};
}
function _fun112659() { // fn#112659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:849, offset: 0x023d6725, size: 58 bytes, params: 1, frame: 4
return {height: env0_1 > 0 ? env0_1 : undefined, width: env0_2, display: env0_0 ? 'flex' : 'none'};
}
function _fun112661(a0) { // fn#112661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1086, offset: 0x023d6780, size: 65 bytes, params: 2, frame: 12
if (env0_5 != null) {
env0_5(a0);
}
const value = environment.__proto__;
(UseTabsVisibleModule).setTabsHeight(a0);
}
function _fun112661(a0) { // fn#112661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1086, offset: 0x023d6780, size: 65 bytes, params: 2, frame: 12
if (env0_5 != null) {
env0_5(a0);
}
const value = environment.__proto__;
(require(13574) /* metro dependency 13574: useTabsVisible */).setTabsHeight(a0);
}
function TabsNavigatorUseInitialGuildParams() { // fn#112663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1548, owner: TabsNavigator.useInitialGuildParams, offset: 0x023d68cb, size: 142 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding.useRef(value2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [SelectedGuildStore];
const guildId = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return SelectedGuildStore.getGuildId();
}]);
if (value3.current == null && guildId != null) {
object = {guildId: guildId};
object.channelId = SelectedChannelStore.getChannelId(guildId) ?? value2;
value3.current = object;
function TabsNavigator() { // fn#112662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1491, offset: 0x023d67c1, size: 266 bytes, params: 1, frame: 22
const value2 = (UseTabBarTabOptions)();
const value3 = (UseTabBarTabListeners)();
const value4 = TabsNavigatorUseInitialGuildParams();
(UseNotificationPermissionPrompt)();
const value5 = (UseIsWindowLarge)();
const env0_3 = value5;
const value6 = (ICYMIExperimentModule).useICYMIEnabled('TabsNavigator');
const value7 = AppFreezeStore(function(a0) {
return a0.lockKeys.size > 0;
});
const Navigator = env0_13.Navigator;
const renderTabBarBinding = renderTabBar;
const base = value2.base;
const binding = env0_3;
const useMemo = binding.useMemo;
return (
<Navigator
id="tabs"
tabBar={renderTabBarBinding}
freezeAllTabs={value7}
screenOptions={base}
>
{Reflect.apply(useMemo, binding, [_fun112666, [value2, value3, value4, value6, value5]])}
</Navigator>
);
function TabsNavigatorUseInitialGuildParams() { // fn#112663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1548, owner: TabsNavigator.useInitialGuildParams, offset: 0x023d68cb, size: 142 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding.useRef(value2);
const useStateFromStores = FluxModule.useStateFromStores;
let object = [SelectedGuildStore];
const guildId = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return SelectedGuildStore.getGuildId();
}]);
if (value3.current == null && guildId != null) {
object = {guildId: guildId};
object.channelId = SelectedChannelStore.getChannelId(guildId) ?? value2;
value3.current = object;
}
return value3.current;
}
function _fun112666() { // fn#112666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1988, offset: 0x023d696f, size: 434 bytes, params: 1, frame: 21
var r5;
var icymi;
const jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
let Screen = env1_13.Screen;
const GUILDS = MainTabsNavigatorScreens.GUILDS;
const items2 = [
<Screen
name={GUILDS}
options={env0_0.guilds}
listeners={env0_1.guilds}
initialParams={env0_2}
getComponent={getGuildsComponent_112652}
/>,
];
if (ReactNativeModule.View) {
Screen = env1_13.Screen;
var screenProps = {name: MainTabsNavigatorScreens.ICYMI};
icymi = env0_0.icymi;
screenProps.options = icymi;
icymi = env0_1.icymi;
screenProps.listeners = icymi;
screenProps.getComponent = getICYMIComponent_112656;
r5 = <Screen {...screenProps} />;
} else {
r5 = null;
}
items2[1] = r5;
Screen = env1_13.Screen;
const NOTIFICATIONS = MainTabsNavigatorScreens.NOTIFICATIONS;
items2[2] = (
<Screen
name={NOTIFICATIONS}
options={env0_0.notifications}
listeners={env0_1.notifications}
getComponent={getNotificationsComponent_112653}
/>
);
items2[3] = env0_3 && <env1_13.Screen name={MainTabsNavigatorScreens.SETTINGS_JUMP} options={env0_0.settings} getComponent={getSettingsComponent_112654} />;
Screen = env1_13.Screen;
const YOU = MainTabsNavigatorScreens.YOU;
items2[4] = (
<Screen
name={YOU}
options={env0_0.you}
listeners={env0_1.you}
getComponent={getYouComponent_112655}
/>
);
return (
<>
{items2}
</>
);
}
}
return value3.current;
}
function _fun112666() { // fn#112666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1988, offset: 0x023d696f, size: 434 bytes, params: 1, frame: 21
var r5;
var icymi;
const jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
let Screen = env1_13.Screen;
const GUILDS = MainTabsNavigatorScreens.GUILDS;
const items2 = [<Screen name={GUILDS} options={env0_0.guilds} listeners={env0_1.guilds} initialParams={env0_2} getComponent={getGuildsComponent_112652} />];
if (env0_4) {
Screen = env1_13.Screen;
var screenProps = {name: MainTabsNavigatorScreens.ICYMI};
icymi = env0_0.icymi;
screenProps.options = icymi;
icymi = env0_1.icymi;
screenProps.listeners = icymi;
screenProps.getComponent = getICYMIComponent_112656;
r5 = <Screen {...screenProps} />;
} else {
r5 = null;
}
items2[1] = r5;
Screen = env1_13.Screen;
const NOTIFICATIONS = MainTabsNavigatorScreens.NOTIFICATIONS;
items2[2] = <Screen name={NOTIFICATIONS} options={env0_0.notifications} listeners={env0_1.notifications} getComponent={getNotificationsComponent_112653} />;
items2[3] = env0_3 && <env1_13.Screen name={MainTabsNavigatorScreens.SETTINGS_JUMP} options={env0_0.settings} getComponent={getSettingsComponent_112654} />;
Screen = env1_13.Screen;
const YOU = MainTabsNavigatorScreens.YOU;
items2[4] = <Screen name={YOU} options={env0_0.you} listeners={env0_1.you} getComponent={getYouComponent_112655} />;
return (
<>
{items2}
</>
);
}
global.__d(_fun112651, 14892, [31, 27, 9559, 1934, 3969, 7607, 33, 4501, 14370, 14762, 14893, 14899, 14812, 14922,
566, 13574, 14934, 1585, 6517, 14935, 14885, 14936, 14952, 14886, 7556, 9581,
2]) /* metro module 14892, dependencies: [31, 27, 9559, 1934, 3969, 7607, 33, 4501, 14370, 14762, 14893, 14899, 14812, 14922, 566, 13574, 14934, 1585, 6517, 14935, 14885, 14936, 14952, 14886, 7556, 9581, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,27 +1,37 @@
/* Metro module 7553; source: modules/main_tabs_v2/native/YouBarConstants.tsx; dependencies: [7554, 697, 1585, 478, 4010, 3860, 1357, 7555, 566, 5176, 7556, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseChatLayout from '../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import ConnectivityIndicatorStateStore from '../../connectivity/native/ConnectivityIndicatorStateStore.tsx'; /* Metro dependency 7554 */
import ConnectionIndicatorExperiment from './ConnectionIndicatorExperiment.tsx'; /* Metro dependency 7555 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as YouBarExperimentModule from '../YouBarExperiment.tsx'; /* Metro dependency 5176 */
import * as ConnectivityIndicatorStateStoreModule from '../../connectivity/native/ConnectivityIndicatorStateStore.tsx'; /* Metro dependency 7554 */
function _fun60729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:6, offset: 0x0170d062, size: 514 bytes, params: 8, frame: 28
const env0_0 = require;
const closure = function() {
return importDefault(dependencyMap[2])().bottom > 0 ? require(dependencyMap[3]).isAndroid() ? PX_16 : PX_24 : PX_16;
};
const closure2 = useYouBarBottomMargin;
const closure3 = useConnectionBannerHeight;
const closure4 = useYouBarSettingsOutsideSafeAreaTop;
const useYouBarBottomMargin2 = useYouBarBottomMargin;
const useConnectionBannerHeight2 = useConnectionBannerHeight;
const useYouBarSettingsOutsideSafeAreaTop2 = useYouBarSettingsOutsideSafeAreaTop;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const connectivityIndicatorStateStore = importDefault(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */;
const env0_4 = (require(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */).ConnectivityIndicatorState;
const Set = global.Set;
Object = global.Object;
let set = new Set(Object.values((importDefault(697) /* metro dependency 697: native */).space));
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
let set = new Set(Object.values((Native).space));
const PX_12 = (Native).space.PX_12;
set = 32 + 2 * PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_163 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_164 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/YouBarConstants.tsx');
const PX_16 = (Native).space.PX_16;
const PX_24 = (Native).space.PX_24;
const PX_162 = (Native).space.PX_16;
const PX_163 = (Native).space.PX_16;
const PX_164 = (Native).space.PX_16;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/YouBarConstants.tsx');
exports.CONNECTION_BANNER_HEIGHT = 48;
exports.YOU_BAR_SPRING_CONFIG = {'damping': 20, 'stiffness': 300, 'mass': 1.5, 'overshootClamping': true,
'restSpeedThreshold': 0.001, 'restDisplacementThreshold': 0.001};
@@ -33,91 +43,90 @@ function _fun60729(global, require, importDefault, importAll, module, exports, d
exports.YOU_BAR_FLOATING_OFFSET_MINIMUM = PX_163;
exports.useYouBarHorizontalMargin = closure;
exports.useYouBarRightInset = useYouBarRightInset;
exports.useYouBarBottomMargin = closure2;
exports.useConnectionBannerHeight = closure3;
exports.useYouBarBottomMargin = useYouBarBottomMargin2;
exports.useConnectionBannerHeight = useConnectionBannerHeight2;
exports.useYouBarTotalHeight = useYouBarTotalHeight;
exports.useYouBarSettingsOutsideSafeAreaTop = closure4;
exports.useYouBarSettingsOutsideSafeAreaTop = useYouBarSettingsOutsideSafeAreaTop2;
exports.useYouBarSettingsCustomHeaderPaddingTop = useYouBarSettingsCustomHeaderPaddingTop;
exports.useYouBarIOSModalPresentation = useYouBarIOSModalPresentation;
exports.YOU_BAR_GRADIENT_EXTRA_HEIGHT = PX_164;
}
function useYouBarBottomMargin() { // fn#60731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:391, offset: 0x0170d2b9, size: 206 bytes, params: 1, frame: 18
var r0;
var moduleValue2;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useYouBarBottomMargin');
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CHAT_INPUT_FLOATING_OFFSET_MINIMUM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_OFFSET_MINIMUM;
if (value2) {
r0 = global.Math.max(Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_FLOATING_OFFSET_MINIMUM]), bottom);
} else if (bottom > 0) {
moduleValue2 = require(478) /* metro dependency 478: PlatformUtils */;
r0 = moduleValue2.isAndroid() ? global.Math.max(PX_16, bottom) : PX_24;
} else {
r0 = global.Math.max(PX_16, bottom);
function useYouBarBottomMargin() { // fn#60731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:391, offset: 0x0170d2b9, size: 206 bytes, params: 1, frame: 18
var r0;
var moduleValue2;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value2 = (MobileVisualRefreshExperiment)('useYouBarBottomMargin');
const useToken = UseTokenModule.useToken;
const CHAT_INPUT_FLOATING_OFFSET_MINIMUM = (Native).modules.mobile.CHAT_INPUT_FLOATING_OFFSET_MINIMUM;
if (value2) {
r0 = global.Math.max(Reflect.apply(useToken, UseTokenModule, [CHAT_INPUT_FLOATING_OFFSET_MINIMUM]), bottom);
} else if (bottom > 0) {
moduleValue2 = require(478) /* metro dependency 478: PlatformUtils */;
r0 = moduleValue2.isAndroid() ? global.Math.max(PX_16, bottom) : PX_24;
} else {
r0 = global.Math.max(PX_16, bottom);
}
return r0;
}
return r0;
}
function useConnectionBannerHeight() { // fn#60732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:625, offset: 0x0170d387, size: 134 bytes, params: 1, frame: 16
const {timeoutMs,
hidden} = (importDefault(7555) /* metro dependency 7555: ConnectionIndicatorExperiment */).useConfig({location: 'useConnectionBannerHeight'});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return timeoutMs == null || hidden ? 0 : Reflect.apply(useStateFromStores, fluxModule,
[[ConnectivityIndicatorStateStore], function() {
return ConnectivityIndicatorStateStore.getState();
}]) !== ConnectivityIndicatorState.HIDDEN ? 48 : 0;
}
function useYouBarSettingsOutsideSafeAreaTop(a0) { // fn#60734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:841, offset: 0x0170d420, size: 106 bytes, params: 2, frame: 14
var r0;
var value;
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled(a0);
if (value2) {
value = require(478) /* metro dependency 478: PlatformUtils */;
value = value.isAndroid();
r0 = value ? (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)() : !value;
} else {
r0 = value2;
function useConnectionBannerHeight() { // fn#60732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:625, offset: 0x0170d387, size: 134 bytes, params: 1, frame: 16
const {timeoutMs,
hidden} = (ConnectionIndicatorExperiment).useConfig({location: 'useConnectionBannerHeight'});
const useStateFromStores = FluxModule.useStateFromStores;
return timeoutMs == null || hidden ? 0 : Reflect.apply(useStateFromStores, FluxModule,
[[ConnectivityIndicatorStateStore], function() {
return ConnectivityIndicatorStateStore.getState();
}]) !== ConnectivityIndicatorState.HIDDEN ? 48 : 0;
}
return r0;
}
function useYouBarRightInset() { // fn#60735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:1462, offset: 0x0170d48a, size: 132 bytes, params: 1, frame: 17
const value2 = useYouBarHorizontalMargin();
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CHANNEL_DRAWER_SPACING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_SPACING;
const r1 = isChatBesideChannelList ? value2 - Reflect.apply(useToken, useTokenModule,
[CHANNEL_DRAWER_SPACING]) : value2;
const binding = env0_5;
return binding.has(r1) ? r1 : value2;
}
function useYouBarTotalHeight() { // fn#60736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:1789, offset: 0x0170d50e, size: 90 bytes, params: 1, frame: 14
const value = a0;
return (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('YouBar') ? useYouBarBottomMargin() + env0_6 + useConnectionBannerHeight() + (value !== undefined ? value : 0) : 0;
}
function useYouBarSettingsCustomHeaderPaddingTop(a0) { // fn#60737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:2057, offset: 0x0170d568, size: 57 bytes, params: 2, frame: 12
return useYouBarSettingsOutsideSafeAreaTop(a0) ? 16 : (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
}
function useYouBarIOSModalPresentation(a0) { // fn#60738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:2213, offset: 0x0170d5a1, size: 77 bytes, params: 2, frame: 13
var r0;
var value;
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled(a0);
if (value2) {
value = require(478) /* metro dependency 478: PlatformUtils */;
value = !value.isAndroid();
r0 = value;
} else {
r0 = value2;
function useYouBarSettingsOutsideSafeAreaTop(a0) { // fn#60734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:841, offset: 0x0170d420, size: 106 bytes, params: 2, frame: 14
var r0;
var value;
const value2 = (YouBarExperimentModule).useYouBarEnabled(a0);
if (value2) {
value = require(478) /* metro dependency 478: PlatformUtils */;
value = value.isAndroid();
r0 = value ? (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)() : !value;
} else {
r0 = value2;
}
return r0;
}
return r0;
function useYouBarRightInset() { // fn#60735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:1462, offset: 0x0170d48a, size: 132 bytes, params: 1, frame: 17
const value2 = useYouBarHorizontalMargin();
const isChatBesideChannelList = (UseChatLayout)().isChatBesideChannelList;
const useToken = UseTokenModule.useToken;
const CHANNEL_DRAWER_SPACING = (Native).modules.mobile.CHANNEL_DRAWER_SPACING;
const r1 = isChatBesideChannelList ? value2 - Reflect.apply(useToken, UseTokenModule,
[CHANNEL_DRAWER_SPACING]) : value2;
const binding = env0_5;
return binding.has(r1) ? r1 : value2;
}
function useYouBarTotalHeight() { // fn#60736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:1789, offset: 0x0170d50e, size: 90 bytes, params: 1, frame: 14
const value = a0;
return (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('YouBar') ? useYouBarBottomMargin() + env0_6 + useConnectionBannerHeight() + (value !== undefined ? value : 0) : 0;
}
function useYouBarSettingsCustomHeaderPaddingTop(a0) { // fn#60737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:2057, offset: 0x0170d568, size: 57 bytes, params: 2, frame: 12
return useYouBarSettingsOutsideSafeAreaTop(a0) ? 16 : (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
}
function useYouBarIOSModalPresentation(a0) { // fn#60738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:2213, offset: 0x0170d5a1, size: 77 bytes, params: 2, frame: 13
var r0;
var value;
const value2 = (YouBarExperimentModule).useYouBarEnabled(a0);
if (value2) {
value = require(478) /* metro dependency 478: PlatformUtils */;
value = !value.isAndroid();
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
global.__d(_fun60729, 7553, [7554, 697, 1585, 478, 4010, 3860, 1357, 7555, 566, 5176, 7556,
2]) /* metro module 7553, dependencies: [7554, 697, 1585, 478, 4010, 3860, 1357, 7555, 566, 5176, 7556, 2] */;
@@ -1,4 +1,18 @@
/* Metro module 14369; source: modules/main_tabs_v2/native/YouBarStackNavigator.tsx; dependencies: [31, 27, 1934, 3969, 7607, 33, 9884, 14370, 14762, 14812, 566, 14886, 9581, 5280, 6517, 2] */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UseNotificationPermissionPrompt from '../../nuf/native/useNotificationPermissionPrompt.tsx'; /* Metro dependency 14886 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as MainTabsConstantsModule from './MainTabsConstants.tsx'; /* Metro dependency 7607 */
import * as ICYMIExperimentModule from '../../icymi/ICYMIExperiment.tsx'; /* Metro dependency 9581 */
import * as Module09884Module from '../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun108734(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:6, offset: 0x0232c32e, size: 315 bytes, params: 8, frame: 19
const env0_0 = require;
const getGuildsComponent = function() {
@@ -12,99 +26,120 @@ function _fun108734(global, require, importDefault, importAll, module, exports,
};
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.StyleSheet;
const env0_5 = value2.View;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_8 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.Fragment;
const env0_11 = value3.jsxs;
const env0_12 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
let value = ReactModule;
const env0_12 = (Module09884Module).createNativeStackNavigator();
value = value.memo(YouBarStackNavigator);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/YouBarStackNavigator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/YouBarStackNavigator.tsx');
exports.default = value;
}
function YouBarStackNavigator() { // fn#108738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:465, offset: 0x0232c48a, size: 274 bytes, params: 1, frame: 24
const value = useInitialGuildParams();
(UseNotificationPermissionPrompt)();
const value3 = (ICYMIExperimentModule).useICYMIEnabled('TabsNavigator');
const value4 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const binding = env0_3;
let useMemo = binding.useMemo;
const value5 = Reflect.apply(useMemo, binding, [_fun108741, [value4]]);
const absoluteFillObject = StyleSheet.absoluteFillObject;
const LayerScope = (LayerScopeNativeModule).LayerScope;
const Navigator = env0_12.Navigator;
useMemo = binding.useMemo;
return (
<View style={absoluteFillObject}>
<LayerScope>
<Navigator id="tabs" screenOptions={value5}>
{Reflect.apply(useMemo, binding, [_fun108742, [value, value3, value4]])}
</Navigator>
</LayerScope>
</View>
);
function useInitialGuildParams() { // fn#108739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:503, owner: YouBarStackNavigator.useInitialGuildParams, offset: 0x0232c59c, size: 142 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding.useRef(value2);
const useStateFromStores = FluxModule.useStateFromStores;
let object = [SelectedGuildStore];
const guildId = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return SelectedGuildStore.getGuildId();
}]);
if (value3.current == null && guildId != null) {
object = {guildId: guildId};
object.channelId = SelectedChannelStore.getChannelId(guildId) ?? value2;
value3.current = object;
}
return value3.current;
}
function YouBarStackNavigator() { // fn#108738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:465, offset: 0x0232c48a, size: 274 bytes, params: 1, frame: 24
const value = YouBarStackNavigatorUseInitialGuildParams();
(importDefault(14886) /* metro dependency 14886: useNotificationPermissionPrompt */)();
const value3 = (require(9581) /* metro dependency 9581: ICYMIExperiment */).useICYMIEnabled('TabsNavigator');
const value4 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const binding = env0_3;
let useMemo = binding.useMemo;
const value5 = Reflect.apply(useMemo, binding, [_fun108741, [value4]]);
const absoluteFillObject = StyleSheet.absoluteFillObject;
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
const Navigator = env0_12.Navigator;
useMemo = binding.useMemo;
return (
<View style={absoluteFillObject}>
<LayerScope>
<Navigator id="tabs" screenOptions={value5}>
{Reflect.apply(useMemo, binding, [_fun108742, [value, value3, value4]])}
</Navigator>
</LayerScope>
</View>
);
}
function _fun108741() { // fn#108741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:854, offset: 0x0232c63d, size: 49 bytes, params: 1, frame: 12
const object = {};
copyDataProperties(object, env0_2, undefined);
object['headerShown'] = false;
object['gestureEnabled'] = true;
object['fullScreenGestureEnabled'] = true;
return object;
}
function _fun108742() { // fn#108742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1075, offset: 0x0232c66e, size: 234 bytes, params: 1, frame: 21
const jsxRuntimeEnv1_10Binding = jsxRuntimeEnv1_10;
let Screen = env1_12.Screen;
const GUILDS = MainTabsNavigatorScreens.GUILDS;
const screen = (
<Screen
name={GUILDS}
initialParams={env0_0}
getComponent={getGuildsComponent}
options={options_108743}
/>
);
const r5 = (
env0_1
? (
<env1_12.Screen
name={MainTabsNavigatorScreens.ICYMI}
getComponent={getICYMIComponent}
options={options_108744}
/>
)
: null
);
Screen = env1_12.Screen;
const NOTIFICATIONS = MainTabsNavigatorScreens.NOTIFICATIONS;
return (
<>
{screen}
{r5}
<Screen
name={NOTIFICATIONS}
getComponent={getNotificationsComponent}
options={options_108745}
/>
</>
);
function options_108743() { // fn#108743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1176, offset: 0x0232c758, size: 18 bytes, params: 1, frame: 11
const object = {};
copyDataProperties(object, env1_2, environment.__proto__);
return object;
}
function options_108744() { // fn#108744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1257, offset: 0x0232c758, size: 18 bytes, params: 1, frame: 11
const object = {};
copyDataProperties(object, env1_2, environment.__proto__);
return object;
}
function options_108745() { // fn#108745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1357, offset: 0x0232c758, size: 18 bytes, params: 1, frame: 11
const object = {};
copyDataProperties(object, env1_2, environment.__proto__);
return object;
}
}
function YouBarStackNavigatorUseInitialGuildParams() { // fn#108739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:503, owner: YouBarStackNavigator.useInitialGuildParams, offset: 0x0232c59c, size: 142 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding.useRef(value2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [SelectedGuildStore];
const guildId = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return SelectedGuildStore.getGuildId();
}]);
if (value3.current == null && guildId != null) {
object = {guildId: guildId};
object.channelId = SelectedChannelStore.getChannelId(guildId) ?? value2;
value3.current = object;
}
return value3.current;
}
function _fun108741() { // fn#108741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:854, offset: 0x0232c63d, size: 49 bytes, params: 1, frame: 12
const object2 = {};
copyDataProperties(object2, env0_2, undefined);
object2['headerShown'] = false;
object2['gestureEnabled'] = true;
object2['fullScreenGestureEnabled'] = true;
return object2;
}
function _fun108742() { // fn#108742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1075, offset: 0x0232c66e, size: 234 bytes, params: 1, frame: 21
const jsxRuntimeEnv1_10Binding = jsxRuntimeEnv1_10;
let Screen = env1_12.Screen;
const GUILDS = MainTabsNavigatorScreens.GUILDS;
const screen = <Screen name={GUILDS} initialParams={env0_0} getComponent={getGuildsComponent} options={options_108743} />;
const r5 = env0_1 ? <env1_12.Screen name={MainTabsNavigatorScreens.ICYMI} getComponent={getICYMIComponent} options={options_108744} /> : null;
Screen = env1_12.Screen;
const NOTIFICATIONS = MainTabsNavigatorScreens.NOTIFICATIONS;
return (
<>
{screen}
{r5}
<Screen
name={NOTIFICATIONS}
getComponent={getNotificationsComponent}
options={options_108745}
/>
</>
);
}
function options_108743() { // fn#108743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1176, offset: 0x0232c758, size: 18 bytes, params: 1, frame: 11
const object2 = {};
copyDataProperties(object2, env1_2, environment.__proto__);
return object2;
}
global.__d(_fun108734, 14369, [31, 27, 1934, 3969, 7607, 33, 9884, 14370, 14762, 14812, 566, 14886, 9581, 5280,
6517,
2]) /* metro module 14369, dependencies: [31, 27, 1934, 3969, 7607, 33, 9884, 14370, 14762, 14812, 566, 14886, 9581, 5280, 6517, 2] */;
@@ -1,274 +1,304 @@
/* Metro module 9612; source: modules/main_tabs_v2/native/channel/ChannelActions.tsx; dependencies: [31, 27, 4790, 1383, 1379, 4297, 9613, 661, 9614, 33, 4501, 8850, 697, 9616, 9618, 9619, 9625, 566, 6860, 22, 9626, 7709, 1244, 9627, 6998, 9628, 9621, 477, 4015, 9672, 9673, 9690, 1239, 4008, 9694, 6684, 9695, 9697, 5072, 9698, 9700, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ActiveThreadsStore from '../../../threads/ActiveThreadsStore.tsx'; /* Metro dependency 4790 */
import UseIsNsfwGated from '../../../age_gate/useIsNsfwGated.tsx'; /* Metro dependency 9618 */
import UseIsWindowSmall from '../../../screen/native/useIsWindowSmall.tsx'; /* Metro dependency 9625 */
import GuildDirectorySearchModalActionCreators from '../../../directory_channels/native/components/GuildDirectorySearchModalActionCreators.tsx'; /* Metro dependency 9628 */
import Tracking from '../../../search/native/tracking/Tracking.tsx'; /* Metro dependency 9673 */
import ShowThreadBrowserModal from '../../../threads/native/showThreadBrowserModal.tsx'; /* Metro dependency 9695 */
import IconActionButton from '../shared_components/IconActionButton.tsx'; /* Metro dependency 9697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ThreadHooksModule from '../../../threads/ThreadHooks.tsx'; /* Metro dependency 6860 */
import * as PhoneCallIconModule from '../../../../design/components/Icon/native/redesign/generated/PhoneCallIcon.tsx'; /* Metro dependency 8850 */
import * as ChannelDetailsStoreModule from '../sidebar/details/stores/ChannelDetailsStore.tsx'; /* Metro dependency 9613 */
import * as TrackingConstantsModule from '../../../search/native/tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as PhoneHangUpIconModule from '../../../../design/components/Icon/native/redesign/generated/PhoneHangUpIcon.tsx'; /* Metro dependency 9616 */
import * as ForumHooksModule from '../../../forums/ForumHooks.tsx'; /* Metro dependency 9619 */
import * as UseSearchContextModule from '../../../search/native/hooks/useSearchContext.tsx'; /* Metro dependency 9672 */
function _fun75303(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:6, offset: 0x01da94e3, size: 425 bytes, params: 8, frame: 19
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 activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREADED_CHANNEL_TYPES;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_8 = (require(9613) /* metro dependency 9613: ChannelDetailsStore */).setIsChannelDetailsSearchActive;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.ChannelTypes;
const env0_10 = constantsModule.ChannelTypesSets;
const env0_11 = constantsModule.ComponentActions;
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchEntrypointAnalyticsLocations;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const env0_14 = (require(31) /* metro dependency 31 */).createElement;
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({actionWrapper: {'flexShrink': 0,
ReactModule;
const env0_15 = (CreateStylesModule).createStyles({actionWrapper: {'flexShrink': 0,
'flexDirection': 'row', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelActions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelActions.tsx');
exports.default = ChannelActions;
}
function JoinCallButton() { // fn#75304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:472, offset: 0x01da968c, size: 84 bytes, params: 1, frame: 16
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
return <PhoneCallIcon size="sm" color={GREEN_360} />;
}
function EndCallButton() { // fn#75305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:585, offset: 0x01da96e0, size: 84 bytes, params: 1, frame: 16
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
return <PhoneHangUpIcon size="sm" color={RED_400} />;
}
function ChannelActionButtons({channel, screenIndex}) { // fn#75306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:697, offset: 0x01da9734, size: 1192 bytes, params: 2, frame: 28
var r7;
var r2;
var push;
var object7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
var object8;
var object9;
var object10;
var object11;
var isChannelNSFWGated;
var channelHasThreads;
var value13;
var unshift;
var object12;
const styles = useStyles();
const value2 = (importDefault(9618) /* metro dependency 9618: useIsNsfwGated */)(channel);
const value3 = (require(9619) /* metro dependency 9619: ForumHooks */).useCanSearchForumPosts(channel);
const value4 = (importDefault(9625) /* metro dependency 9625: useIsWindowSmall */)();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActiveThreadsStore], function() {
var channelBinding = channel;
return ActiveThreadsStore.hasThreadsForChannel(channelBinding.guild_id, channelBinding.id);
});
items2 = [];
const value6 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanJoinThreadVoice(channel);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
if (channel.isVocalThread() && value6 && (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return !importDefault(dependencyMap[19]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
})) {
push = items2.push;
object7 = {source: null};
object7.IconComponent = value7 ? EndCallButton : JoinCallButton;
object7.onPress = value7 ? (importDefault(9626) /* metro dependency 9626: useHandleJoinThreadVoice */)(channel) : _fun75310;
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
object7.accessibilityLabel = value7 ? Reflect.apply(string, intl, [t['4ry6yi']]) : Reflect.apply(string, intl,
[t.My50nf]);
Reflect.apply(push, items2, [object7]);
function JoinCallButton() { // fn#75304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:472, offset: 0x01da968c, size: 84 bytes, params: 1, frame: 16
const PhoneCallIcon = (PhoneCallIconModule).PhoneCallIcon;
const GREEN_360 = (Native).unsafe_rawColors.GREEN_360;
return <PhoneCallIcon size="sm" color={GREEN_360} />;
}
const type = channel.type;
const GUILD_DIRECTORY = ChannelTypes.GUILD_DIRECTORY;
if (GUILD_DIRECTORY === type) {
push = items2.push;
object10 = {};
object10.source = importDefault(9627) /* metro dependency 9627 */;
object10.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object10.onPress = onPress_75311;
object10.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object10]);
} else if (ChannelTypes.GUILD_FORUM === type) {
if (value3) {
function EndCallButton() { // fn#75305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:585, offset: 0x01da96e0, size: 84 bytes, params: 1, frame: 16
const PhoneHangUpIcon = (PhoneHangUpIconModule).PhoneHangUpIcon;
const RED_400 = (Native).unsafe_rawColors.RED_400;
return <PhoneHangUpIcon size="sm" color={RED_400} />;
}
function ChannelActionButtons({channel, screenIndex}) { // fn#75306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:697, offset: 0x01da9734, size: 1192 bytes, params: 2, frame: 28
var r7;
var r2;
var push;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
var object2;
var object3;
var object4;
var object5;
var isChannelNSFWGated;
var channelHasThreads;
var value13;
var unshift;
var object6;
const styles = useStyles();
const value2 = (UseIsNsfwGated)(channel);
const value3 = (ForumHooksModule).useCanSearchForumPosts(channel);
const value4 = (UseIsWindowSmall)();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActiveThreadsStore], function() {
var activeThreadsStoreBinding = ActiveThreadsStore;
var channelBinding = channel;
return activeThreadsStoreBinding.hasThreadsForChannel(channelBinding.guild_id, channelBinding.id);
});
items2 = [];
const value6 = (ThreadHooksModule).useCanJoinThreadVoice(channel);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
if (channel.isVocalThread() && value6 && (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return !importDefault(dependencyMap[19]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
})) {
push = items2.push;
object9 = {};
object9.source = importDefault(9627) /* metro dependency 9627 */;
object9.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object9.onPress = onPress_75312;
object9.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object9]);
object = {source: null};
object.IconComponent = value7 ? EndCallButton : JoinCallButton;
object.onPress = value7 ? (importDefault(9626) /* metro dependency 9626: useHandleJoinThreadVoice */)(channel) : _fun75310;
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.accessibilityLabel = value7 ? Reflect.apply(string, intl, [t['4ry6yi']]) : Reflect.apply(string, intl,
[t.My50nf]);
Reflect.apply(push, items2, [object]);
}
} else if (ChannelTypes.GUILD_MEDIA === type) {
if (value3) {
const type = channel.type;
const GUILD_DIRECTORY = ChannelTypes.GUILD_DIRECTORY;
if (GUILD_DIRECTORY === type) {
push = items2.push;
object9 = {};
object9.source = importDefault(9627) /* metro dependency 9627 */;
object9.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object9.onPress = onPress_75312;
object9.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object9]);
object4 = {};
object4.source = importDefault(9627) /* metro dependency 9627 */;
object4.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object4.onPress = onPress_75311;
object4.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object4]);
} else if (ChannelTypes.GUILD_FORUM === type) {
if (value3) {
push = items2.push;
object3 = {};
object3.source = importDefault(9627) /* metro dependency 9627 */;
object3.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object3.onPress = onPress_75312;
object3.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object3]);
}
} else if (ChannelTypes.GUILD_MEDIA === type) {
if (value3) {
push = items2.push;
object3 = {};
object3.source = importDefault(9627) /* metro dependency 9627 */;
object3.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object3.onPress = onPress_75312;
object3.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object3]);
}
} else {
push = items2.push;
object2 = {};
object2.source = importDefault(9627) /* metro dependency 9627 */;
object2.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object2.onPress = onPress_75313;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object2]);
}
} else {
push = items2.push;
object8 = {};
object8.source = importDefault(9627) /* metro dependency 9627 */;
object8.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object8.onPress = onPress_75313;
object8.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
Reflect.apply(push, items2, [object8]);
}
let r1 = value4 && items2.length !== 0;
if (!r1) {
object11 = {channel: channel, isChannelNSFWGated: value2, channelHasThreads: value5};
channel = object11.channel;
isChannelNSFWGated = object11.isChannelNSFWGated;
channelHasThreads = object11.channelHasThreads;
value13 = THREADED_CHANNEL_TYPES.has(channel.type);
r7 = !value13 && channelHasThreads;
r7 = r7 && !ChannelTypesSets.GUILD_THREADS_ONLY.has(channel.type);
r2 = value13 && !isChannelNSFWGated;
r2 = r2 && !channel.isForumLikeChannel();
r2 = r2 && r7;
r1 = !r2;
}
if (!r1) {
unshift = items2.unshift;
object12 = {};
object12.source = importDefault(9694) /* metro dependency 9694 */;
object12.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object12.onPress = onPress_75314;
object12.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
Reflect.apply(unshift, items2, [object12]);
}
return (
<View style={styles.actionWrapper}>
{items2.map(_fun75315)}
</View>
);
}
function WrappedChannelNavButtons({channelId, screenIndex, showCreateThread}) { // fn#75316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3105, offset: 0x01da9f3c, size: 152 bytes, params: 2, frame: 20
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
return channel == null || (require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldHideChannelContent(channel) || showCreateThread ? null : <ChannelActionButtons channel={channel} screenIndex={screenIndex} />;
}
function ChannelActions({channelId, screenIndex, containerStyle, showCreateThread}) { // fn#75318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3465, offset: 0x01da9fd4, size: 275 bytes, params: 2, frame: 22
var r4;
var value;
const {isMultiUserDM,
isDM} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore], _fun75319);
if ((require(9619) /* metro dependency 9619: ForumHooks */).useHasForumSearchQuery(channelId)) {
const ForumChannelCloseSearchButton = (require(9698) /* metro dependency 9698: ForumChannelSearch */).ForumChannelCloseSearchButton;
r4 = <ForumChannelCloseSearchButton channelId={channelId} />;
} else if (isDM) {
value = importDefault(9700) /* metro dependency 9700: PrivateChannelButtons */;
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} />)(value);
r4 = value;
} else if (isMultiUserDM) {
value = importDefault(9700) /* metro dependency 9700: PrivateChannelButtons */;
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} />)(value);
r4 = value;
} else {
r4 = <WrappedChannelNavButtons channelId={channelId} screenIndex={screenIndex} showCreateThread={showCreateThread} />;
}
return (
<View style={containerStyle}>
{r4}
</View>
);
}
function _fun75310() { // fn#75310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1227, offset: 0x01da9c66, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
return value.openChannelCallModal(channel);
}
function ChannelActionButtonsOnPress() { // fn#75311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1468, owner: ChannelActionButtons.onPress, offset: 0x01da9c93, size: 51 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9628) /* metro dependency 9628: GuildDirectorySearchModalActionCreators */).open({channel: channel});
}
function ChannelActionButtonsOnPress_75312() { // fn#75312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1684, owner: ChannelActionButtons.onPress, offset: 0x01da9cc6, size: 55 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
value.updateForumSearchQuery(channel.id, '');
}
function ChannelActionButtonsOnPress_75313() { // fn#75313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1881, owner: ChannelActionButtons.onPress, offset: 0x01da9cfd, size: 439 bytes, params: 1, frame: 20
var moduleValue2;
var value3;
var ComponentDispatch;
let value = environment.__proto__;
setIsChannelDetailsSearchActive(channel.id, true, 'initial');
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
moduleValue2 = require(4015) /* metro dependency 4015: ChatInputUtils */;
value3 = moduleValue2.getChatInputRef(channel.id, screenIndex);
if (value3 != null) {
value3.blur();
let r1 = value4 && items2.length !== 0;
if (!r1) {
object5 = {channel: channel, isChannelNSFWGated: value2, channelHasThreads: value5};
channel = object5.channel;
isChannelNSFWGated = object5.isChannelNSFWGated;
channelHasThreads = object5.channelHasThreads;
value13 = THREADED_CHANNEL_TYPES.has(channel.type);
r7 = !value13 && channelHasThreads;
r7 = r7 && !ChannelTypesSets.GUILD_THREADS_ONLY.has(channel.type);
r2 = value13 && !isChannelNSFWGated;
r2 = r2 && !channel.isForumLikeChannel();
r2 = r2 && r7;
r1 = !r2;
}
}
channelBinding = channel;
const channelDetailsSearchContext = (require(9672) /* metro dependency 9672: useSearchContext */).getChannelDetailsSearchContext(channelBinding.id,
channelBinding.getGuildId(), channelBinding.isThread());
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchOpened = defaultImport.trackSearchOpened;
const CHANNEL_HEADER = SearchEntrypointAnalyticsLocations.CHANNEL_HEADER;
Reflect.apply(trackSearchOpened, defaultImport, [{searchContext: channelDetailsSearchContext,
searchLocation: CHANNEL_HEADER}]);
if ((require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).isSwipeToMemberListEnabled()) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SHOW_CHANNEL_DETAILS, {source: 'channel-header-search',
channelId: channel.id, screenIndex: screenIndex});
} else {
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value == null) {
return undefined;
if (!r1) {
unshift = items2.unshift;
object6 = {};
object6.source = importDefault(9694) /* metro dependency 9694 */;
object6.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object6.onPress = onPress_75314;
object6.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
Reflect.apply(unshift, items2, [object6]);
}
if (value.isReady()) {
value.navigate('sidebar', {'channelId': null, 'search': true, 'source': 'channel-header-search',
channelId: channel.id});
return undefined;
return (
<View style={styles.actionWrapper}>
{items2.map(_fun75315)}
</View>
);
function _fun75310() { // fn#75310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1227, offset: 0x01da9c66, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
return value.openChannelCallModal(channel);
}
function ChannelActionButtonsOnPress() { // fn#75311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1468, owner: ChannelActionButtons.onPress, offset: 0x01da9c93, size: 51 bytes, params: 1, frame: 13
const value = environment.__proto__;
(GuildDirectorySearchModalActionCreators).open({channel: channel});
}
function ChannelActionButtonsOnPress_75312() { // fn#75312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1684, owner: ChannelActionButtons.onPress, offset: 0x01da9cc6, size: 55 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
value.updateForumSearchQuery(channel.id, '');
}
function ChannelActionButtonsOnPress_75313() { // fn#75313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1881, owner: ChannelActionButtons.onPress, offset: 0x01da9cfd, size: 439 bytes, params: 1, frame: 20
var moduleValue2;
var value3;
var ComponentDispatch;
let value = environment.__proto__;
setIsChannelDetailsSearchActive(channel.id, true, 'initial');
if (PlatformUtilsModule.isIOS()) {
moduleValue2 = require(4015) /* metro dependency 4015: ChatInputUtils */;
value3 = moduleValue2.getChatInputRef(channel.id, screenIndex);
if (value3 != null) {
value3.blur();
}
}
channelBinding = channel;
const channelDetailsSearchContext = (UseSearchContextModule).getChannelDetailsSearchContext(channelBinding.id,
channelBinding.getGuildId(), channelBinding.isThread());
const defaultImport = Tracking;
const trackSearchOpened = defaultImport.trackSearchOpened;
const CHANNEL_HEADER = SearchEntrypointAnalyticsLocations.CHANNEL_HEADER;
Reflect.apply(trackSearchOpened, defaultImport, [{searchContext: channelDetailsSearchContext,
searchLocation: CHANNEL_HEADER}]);
if ((require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).isSwipeToMemberListEnabled()) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SHOW_CHANNEL_DETAILS, {source: 'channel-header-search',
channelId: channel.id, screenIndex: screenIndex});
} else {
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value == null) {
return undefined;
}
if (value.isReady()) {
value.navigate('sidebar', {'channelId': null, 'search': true, 'source': 'channel-header-search',
channelId: channel.id});
return undefined;
}
}
}
function ChannelActionButtonsOnPress_75314() { // fn#75314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:2889, owner: ChannelActionButtons.onPress, offset: 0x01da9eb4, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ShowThreadBrowserModal)(channel);
}
function _fun75315(a0, a1) { // fn#75315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3009, offset: 0x01da9edb, size: 97 bytes, params: 3, frame: 16
const value = env0_2.length - 1;
const createElementBinding = createElement;
const defaultImport = IconActionButton;
const object = {noMargin: a1 === value};
copyDataProperties(object, a0, value);
object['key'] = a0.accessibilityLabel;
return createElementBinding(defaultImport, object);
}
}
}
function ChannelActionButtonsOnPress_75314() { // fn#75314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:2889, owner: ChannelActionButtons.onPress, offset: 0x01da9eb4, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(9695) /* metro dependency 9695: showThreadBrowserModal */)(channel);
}
function _fun75315(a0, a1) { // fn#75315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3009, offset: 0x01da9edb, size: 97 bytes, params: 3, frame: 16
const value = env0_2.length - 1;
const createElementBinding = createElement;
const defaultImport = importDefault(9697) /* metro dependency 9697: IconActionButton */;
const object2 = {noMargin: a1 === value};
copyDataProperties(object2, a0, value);
object2['key'] = a0.accessibilityLabel;
return createElementBinding(defaultImport, object2);
}
function _fun75319() { // fn#75319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3599, offset: 0x01daa0e7, size: 116 bytes, params: 1, frame: 16
var r2;
const object2 = {};
let value = environment.__proto__;
const channel = ChannelStore.getChannel(channelId);
const value4 = undefined;
const r6 = channel == null ? value4 : channel.isMultiUserDM();
object2.isMultiUserDM = r6 != null && r6;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r2 = value4;
} else {
value = value.isDM();
r2 = value;
function WrappedChannelNavButtons({channelId, screenIndex, showCreateThread}) { // fn#75316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3105, offset: 0x01da9f3c, size: 152 bytes, params: 2, frame: 20
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
return (
channel == null || (require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldHideChannelContent(channel) || showCreateThread
? null
: (
<ChannelActionButtons channel={channel} screenIndex={screenIndex} />
)
);
}
object2.isDM = r2 != null && r2;
return object2;
function ChannelActions({channelId, screenIndex, containerStyle, showCreateThread}) { // fn#75318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3465, offset: 0x01da9fd4, size: 275 bytes, params: 2, frame: 22
var r4;
var value;
const {isMultiUserDM,
isDM} = (FluxModule).useStateFromStoresObject([ChannelStore], _fun75319);
if ((require(9619) /* metro dependency 9619: ForumHooks */).useHasForumSearchQuery(channelId)) {
const ForumChannelCloseSearchButton = (require(9698) /* metro dependency 9698: ForumChannelSearch */).ForumChannelCloseSearchButton;
r4 = <ForumChannelCloseSearchButton channelId={channelId} />;
} else if (isDM) {
value = importDefault(9700) /* metro dependency 9700: PrivateChannelButtons */;
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} />)(value);
r4 = value;
} else if (isMultiUserDM) {
value = importDefault(9700) /* metro dependency 9700: PrivateChannelButtons */;
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} />)(value);
r4 = value;
} else {
r4 = (
<WrappedChannelNavButtons
channelId={channelId}
screenIndex={screenIndex}
showCreateThread={showCreateThread}
/>
);
}
return (
<View style={containerStyle}>
{r4}
</View>
);
function _fun75319() { // fn#75319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3599, offset: 0x01daa0e7, size: 116 bytes, params: 1, frame: 16
var r2;
const object = {};
let value = environment.__proto__;
const channel = ChannelStore.getChannel(channelId);
const value4 = undefined;
const r6 = channel == null ? value4 : channel.isMultiUserDM();
object.isMultiUserDM = r6 != null && r6;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r2 = value4;
} else {
value = value.isDM();
r2 = value;
}
object.isDM = r2 != null && r2;
return object;
}
}
}
global.__d(_fun75303, 9612, [31, 27, 4790, 1383, 1379, 4297, 9613, 661, 9614, 33, 4501, 8850, 697, 9616, 9618, 9619,
9625, 566, 6860, 22, 9626, 7709, 1244, 9627, 6998, 9628, 9621, 477, 4015, 9672, 9673, 9690, 1239, 4008, 9694,
6684, 9695, 9697, 5072, 9698, 9700,
2]) /* metro module 9612, dependencies: [31, 27, 4790, 1383, 1379, 4297, 9613, 661, 9614, 33, 4501, 8850, 697, 9616, 9618, 9619, 9625, 566, 6860, 22, 9626, 7709, 1244, 9627, 6998, 9628, 9621, 477, 4015, 9672, 9673, 9690, 1239, 4008, 9694, 6684, 9695, 9697, 5072, 9698, 9700, 2] */;
@@ -1,10 +1,14 @@
/* Metro module 11959; source: modules/main_tabs_v2/native/channel/ChannelSafeAreaBottom.android.tsx; dependencies: [11278, 11960, 11961, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AnimatedKeyboardExperimentModule from '../../../keyboard/native/AnimatedKeyboardExperiment.tsx'; /* Metro dependency 11278 */
function _fun91755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12145:6, offset: 0x02070fe9, size: 132 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const animatedKeyboardExperimentModule = require(11278) /* metro dependency 11278: AnimatedKeyboardExperiment */;
const r1 = animatedKeyboardExperimentModule.isAnimatedAndroidKeyboard() ? importDefault(11960) /* metro dependency 11960: ChannelSafeAreaBottomNoop */ : importDefault(11961) /* metro dependency 11961: ChannelSafeAreaBottomAnimatedAndroid */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottom.android.tsx');
const r1 = AnimatedKeyboardExperimentModule.isAnimatedAndroidKeyboard() ? importDefault(11960) /* metro dependency 11960: ChannelSafeAreaBottomNoop */ : importDefault(11961) /* metro dependency 11961: ChannelSafeAreaBottomAnimatedAndroid */;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottom.android.tsx');
exports.default = r1;
}
global.__d(_fun91755, 11959, [11278, 11960, 11961,
2]) /* metro module 11959, dependencies: [11278, 11960, 11961, 2] */;
@@ -1,34 +1,46 @@
/* Metro module 11961; source: modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomAnimated.android.tsx; dependencies: [31, 27, 33, 11280, 11284, 4017, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseChannelSafeAreaHeightSharedValueAndroid from './useChannelSafeAreaHeightSharedValue.android.tsx'; /* Metro dependency 11280 */
import UseChannelSafeAreaBottomStyles from './useChannelSafeAreaBottomStyles.tsx'; /* Metro dependency 11284 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun91758(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12147:6, offset: 0x0207111e, size: 195 bytes, params: 8, frame: 18
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.StyleSheet;
const env0_4 = value2.View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
object = {code: 'function ChannelSafeAreaBottomAnimatedAndroidTsx1(){const{heightSharedValue}=this.__closure;return{height:heightSharedValue.get()};}'};
value = value.memo(ChannelSafeAreaBottom);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomAnimated.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomAnimated.android.tsx');
exports.default = value;
function ChannelSafeAreaBottom({channelId}) { // fn#91759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12147:312, offset: 0x020711e1, size: 209 bytes, params: 2, frame: 20
const value2 = (UseChannelSafeAreaHeightSharedValueAndroid)();
const value3 = (UseChannelSafeAreaBottomStyles)(channelId);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ChannelSafeAreaBottomN2 = ChannelSafeAreaBottomN;
ChannelSafeAreaBottomN2.__closure = {heightSharedValue: value2};
ChannelSafeAreaBottomN2.__workletHash = 6491350126069;
ChannelSafeAreaBottomN2.__initData = env0_6;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ChannelSafeAreaBottomN2]);
const View2 = (ReanimatedRexport).View;
return (
<View2 style={value4}>
<View style={[StyleSheet.absoluteFill, value3]} />
</View2>
);
function ChannelSafeAreaBottomN() { // fn#91760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12147:420, owner: ChannelSafeAreaBottom.n, offset: 0x01d65181, size: 24 bytes, params: 1, frame: 10
const object = {};
object.height = env0_0.get();
return object;
}
}
}
function ChannelSafeAreaBottom({channelId}) { // fn#91759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12147:312, offset: 0x020711e1, size: 209 bytes, params: 2, frame: 20
const value2 = (importDefault(11280) /* metro dependency 11280: useChannelSafeAreaHeightSharedValueAndroid */)();
const value3 = (importDefault(11284) /* metro dependency 11284: useChannelSafeAreaBottomStyles */)(channelId);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ChannelSafeAreaBottomN;
closure.__closure = {heightSharedValue: value2};
closure.__workletHash = 6491350126069;
closure.__initData = env0_6;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={value4}>
<View style={[StyleSheet.absoluteFill, value3]} />
</View2>
);
}
global.__d(_fun91758, 11961, [31, 27, 33, 11280, 11284, 4017,
2]) /* metro module 11961, dependencies: [31, 27, 33, 11280, 11284, 4017, 2] */;
@@ -1,12 +1,20 @@
/* Metro module 11960; source: modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomNoop.tsx; dependencies: [31, 27, 33, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun91756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12146:6, offset: 0x0207106d, size: 154 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(ChannelSafeAreaNoop);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomNoop.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomNoop.tsx');
exports.default = value;
function ChannelSafeAreaNoop() { // fn#91757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12146:149, offset: 0x02071107, size: 23 bytes, params: 1, frame: 13
return <View />;
}
}
global.__d(_fun91756, 11960, [31, 27, 33, 2]) /* metro module 11960, dependencies: [31, 27, 33, 2] */;
@@ -1,302 +1,369 @@
/* Metro module 14959; source: modules/main_tabs_v2/native/channel/StandaloneChannelScreen.tsx; dependencies: [31, 27, 9604, 661, 1386, 33, 4501, 697, 1485, 1585, 7701, 9390, 1244, 4007, 8811, 9605, 6517, 9709, 9612, 9690, 6632, 5103, 4048, 1357, 9722, 4010, 1305, 7704, 14960, 14977, 14994, 15011, 11273, 15015, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseChatLayout from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import UseChannelRoleSubscriptionStatus from '../../../guild_role_subscriptions/useChannelRoleSubscriptionStatus.tsx'; /* Metro dependency 6632 */
import ChannelActions from './ChannelActions.tsx'; /* Metro dependency 9612 */
import ChannelHeader from './header/ChannelHeader.tsx'; /* Metro dependency 9709 */
import ChatView from '../../../chat/native/ChatView.tsx'; /* Metro dependency 11273 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as ChannelConstantsModule from '../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as Module01485Module from '../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as NavigationRouteUtilsNativeModule from '../../helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as LayerScopeNativeModule from '../../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as ServerIconModule from '../../../../design/components/Icon/native/redesign/generated/ServerIcon.tsx'; /* Metro dependency 9390 */
import * as MainTabsV2ConstantsModule from '../shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
import * as PressableNavigatorBackIconModule from '../shared_components/navigator/PressableNavigatorBackIcon.tsx'; /* Metro dependency 9605 */
import * as SwipeToMemberListUtilsModule from '../sidebar/member_list/SwipeToMemberListUtils.tsx'; /* Metro dependency 9690 */
import * as UseIsForumChannelSearchActiveModule from '../../../forums/native/hooks/useIsForumChannelSearchActive.tsx'; /* Metro dependency 9722 */
function _fun113137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:6, offset: 0x023ea78c, size: 967 bytes, params: 8, frame: 27
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_4 = value2.View;
const StyleSheet = value2.StyleSheet;
const mainTabsV2ConstantsModule = require(9604) /* metro dependency 9604: MainTabsV2Constants */;
const env0_5 = mainTabsV2ConstantsModule.HEADER_CORNER_RADIUS;
const MIDNIGHT_BORDER_WIDTH = mainTabsV2ConstantsModule.MIDNIGHT_BORDER_WIDTH;
const env0_6 = mainTabsV2ConstantsModule.MIN_HEADER_HEIGHT;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
const env0_8 = constantsModule.ME;
const env0_9 = constantsModule.ThemeTypes;
const env0_10 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const value5 = require(33) /* metro dependency 33 */;
const env0_11 = value5.jsx;
const env0_12 = value5.jsxs;
const env0_13 = value5.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.container = {flex: 1};
const object4 = {borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const MIDNIGHT_BORDER_WIDTH = MainTabsV2ConstantsModule.MIDNIGHT_BORDER_WIDTH;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.container = {flex: 1};
const object3 = {borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
let BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object4.borderLeftColor = BORDER_STRONG;
object4.borderTopWidth = MIDNIGHT_BORDER_WIDTH;
object4.borderTopColor = 'transparent';
object2.midnightContainerBorder = object4;
object3.borderLeftColor = BORDER_STRONG;
object3.borderTopWidth = MIDNIGHT_BORDER_WIDTH;
object3.borderTopColor = 'transparent';
object.midnightContainerBorder = object3;
let STANDALONE_CHANNEL_CONTENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_CONTENT_BACKGROUND;
object2.contentContainer = {flex: 1, backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
const object6 = {borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
object.contentContainer = {flex: 1, backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
const object5 = {borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object6.borderLeftColor = BORDER_STRONG;
object2.midnightContentContainerBorder = object6;
object5.borderLeftColor = BORDER_STRONG;
object.midnightContentContainerBorder = object5;
STANDALONE_CHANNEL_CONTENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_CONTENT_BACKGROUND;
object2.containerEmpty = {backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
object.containerEmpty = {backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
STANDALONE_CHANNEL_CONTENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_CONTENT_BACKGROUND;
object2.headerWrapper = {'zIndex': 1, 'backgroundColor': null, 'flexDirection': 'row', 'alignItems': 'center',
object.headerWrapper = {'zIndex': 1, 'backgroundColor': null, 'flexDirection': 'row', 'alignItems': 'center',
'flexShrink': 0, backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['top'] = undefined;
object7['height'] = 1;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['top'] = undefined;
object8['height'] = 1;
const STANDALONE_CHANNEL_HEADER_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_HEADER_BORDER;
object7['backgroundColor'] = STANDALONE_CHANNEL_HEADER_BORDER;
object2.headerBottomBorder = object7;
object8['backgroundColor'] = STANDALONE_CHANNEL_HEADER_BORDER;
object.headerBottomBorder = object8;
const CHANNEL_DRAWER_CORNER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_CORNER_RADIUS;
object2.headerWithFadingFrame = {borderTopLeftRadius: CHANNEL_DRAWER_CORNER_RADIUS};
const object9 = {};
object.headerWithFadingFrame = {borderTopLeftRadius: CHANNEL_DRAWER_CORNER_RADIUS};
const object10 = {};
let CHANNEL_DRAWER_DIVIDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
object9.borderLeftWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
object10.borderLeftWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
let APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
object9.borderLeftColor = APP_FRAME_BORDER;
object2.splitDivider = object9;
const object13 = {};
object10.borderLeftColor = APP_FRAME_BORDER;
object.splitDivider = object10;
const object11 = {};
CHANNEL_DRAWER_DIVIDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
object13.borderTopWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
object11.borderTopWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
object13.borderTopColor = APP_FRAME_BORDER;
object2.splitDividerTop = object13;
const object14 = {};
object11.borderTopColor = APP_FRAME_BORDER;
object.splitDividerTop = object11;
const object12 = {};
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object14.borderLeftColor = BORDER_STRONG;
object12.borderLeftColor = BORDER_STRONG;
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object14.borderTopColor = BORDER_STRONG;
object14.borderLeftWidth = MIDNIGHT_BORDER_WIDTH;
object14.borderTopWidth = MIDNIGHT_BORDER_WIDTH;
object2.headerWithFadingFrameMidnight = object14;
object12.borderTopColor = BORDER_STRONG;
object12.borderLeftWidth = MIDNIGHT_BORDER_WIDTH;
object12.borderTopWidth = MIDNIGHT_BORDER_WIDTH;
object.headerWithFadingFrameMidnight = object12;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.midnightFrameCover = {backgroundColor: BACKGROUND_BASE_LOW, position: 'absolute',
object.midnightFrameCover = {backgroundColor: BACKGROUND_BASE_LOW, position: 'absolute',
left: -MIDNIGHT_BORDER_WIDTH, top: 0, width: MIDNIGHT_BORDER_WIDTH};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.actions = {marginRight: PX_16};
object.actions = {marginRight: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.spacer = {width: PX_16};
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.spacer = {width: PX_16};
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(StandaloneChannelScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/StandaloneChannelScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/StandaloneChannelScreen.tsx');
exports.default = value;
}
function Header_113138({channelId, screenIndex, guildId, isNavigationScreen, frame, isMIDNIGHTTheme, isChatInputFloating, showCreateThread, isBackEnabled}) { // fn#113138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:1793, offset: 0x023eab53, size: 908 bytes, params: 2, frame: 35
var object2;
const env0_3 = frame;
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
const styles = useStyles();
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value4 = env0_3.useMemo(_fun113139, [styles.headerWrapper, styles.headerWithFadingFrame, styles.splitDivider,
styles.splitDividerTop, styles.headerWithFadingFrameMidnight,
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop(), frame, isMIDNIGHTTheme,
isChatInputFloating, top]);
const value5 = env0_3.useCallback(_fun113140, [value2, isNavigationScreen]);
const value6 = env0_3.useMemo(_fun113141, [guildId]);
object2 = {};
const ServerIcon = (require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon;
object2.IconComponent = ServerIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WYj55Y = (require(1244) /* metro dependency 1244: indexNative */).t.WYj55Y;
object2.label = Reflect.apply(string, intl, [WYj55Y]);
object2.action = action_113142;
let r15 = value6 ? ((ContextMenu) => <ContextMenu triggerOnLongPress align="below" items={[object2]}>{children_113143}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu) : ((PressableNavigatorBackIcon) => <PressableNavigatorBackIcon onPress={value5} />)((require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const r6 = frame != null && isMIDNIGHTTheme ? isChatInputFloating ? null : <View style={[styles.midnightFrameCover,
{height: top + HEADER_CORNER_RADIUS}]} /> : null;
const view = <View style={styles.headerBottomBorder} />;
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
r15 = !isBackEnabled ? <View style={styles.spacer} /> : r15;
return (
<>
{r6}
<View style={value4}>
{view}
<LayerScope>
{r15}
{((Component) => <Component channelId={channelId} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9709) /* metro dependency 9709: ChannelHeader */)}
{((Component) => <Component containerStyle={styles.actions} channelId={channelId} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9612) /* metro dependency 9612: ChannelActions */)}
</LayerScope>
</View>
{frame}
</>
);
}
function StandaloneChannelScreen({guildId, channelId, isNavigationScreen, frame, showCreateThread, screenIndex}) { // fn#113144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3289, offset: 0x023eb0af, size: 1383 bytes, params: 2, frame: 36
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var object10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let env0_3 = undefined;
const styles = useStyles();
const env0_2 = (require(1485) /* metro dependency 1485 */).useNavigation();
const value3 = (require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).useIsSwipeToMemberListEnabled();
const needSubscriptionToAccess = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(channelId).needSubscriptionToAccess;
const value5 = (require(5103) /* metro dependency 5103: OnboardingHomeUtils */).useCanSeeOnboardingHome(guildId ?? EMPTY_STRING_SNOWFLAKE_ID);
let binding = env0_3;
const value6 = binding.useRef(null);
const value7 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const value8 = value7 === MIDNIGHT;
env0_3 = value8;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'StandaloneChannelScreen'}]).chatInputFloating;
binding = env0_3;
let useMemo = binding.useMemo;
const value9 = Reflect.apply(useMemo, binding, [_fun113145, [frame, value8, chatInputFloating, styles.container,
styles.midnightContainerBorder]]);
binding = env0_3;
useMemo = binding.useMemo;
items = [frame, value8, chatInputFloating];
items[3] = styles.contentContainer;
items[4] = styles.splitDivider;
items[5] = styles.midnightContentContainerBorder;
const value10 = Reflect.apply(useMemo, binding, [_fun113146, items]);
const value11 = (require(9722) /* metro dependency 9722: useIsForumChannelSearchActive */).useIsForumChannelSearchActive(channelId);
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
const r12 = (isChatLockedOpen ? isNavigationScreen : !isChatLockedOpen) && !value11;
if (channelId == null) {
return (
<View style={[value9, styles.containerEmpty]}>
<EmptyState title={intl.string(t.ai6Lbr)} body={intl.string(t['LTr+x9'])} />
</View>
function Header_113138({channelId, screenIndex, guildId, isNavigationScreen, frame, isMIDNIGHTTheme, isChatInputFloating, showCreateThread, isBackEnabled}) { // fn#113138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:1793, offset: 0x023eab53, size: 908 bytes, params: 2, frame: 35
const frame2 = frame;
const value2 = (Module01485Module).useNavigation();
const styles = useStyles();
const top = (UseSafeAreaInsetsNative)().top;
const value4 = frame2.useMemo(_fun113139, [styles.headerWrapper, styles.headerWithFadingFrame, styles.splitDivider,
styles.splitDividerTop, styles.headerWithFadingFrameMidnight,
(ClientThemesOverridesModule).useGradientTop(), frame, isMIDNIGHTTheme,
isChatInputFloating, top]);
const value5 = frame2.useCallback(_fun113140, [value2, isNavigationScreen]);
const value6 = frame2.useMemo(_fun113141, [guildId]);
object = {};
const ServerIcon = (ServerIconModule).ServerIcon;
object.IconComponent = ServerIcon;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const WYj55Y = (IndexNativeModule).t.WYj55Y;
object.label = Reflect.apply(string, intl, [WYj55Y]);
object.action = action_113142;
let r15 = (
value6
? ((ContextMenu) => <ContextMenu triggerOnLongPress align="below" items={[object]}>{children_113143}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)
: ((PressableNavigatorBackIcon) => <PressableNavigatorBackIcon onPress={value5} />)((require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon)
);
}
if (guildId == null) {
return (
<View style={[value9, styles.containerEmpty]}>
<EmptyState title={intl.string(t.ai6Lbr)} body={intl.string(t['LTr+x9'])} />
</View>
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const r6 = (
frame != null && isMIDNIGHTTheme
? (
isChatInputFloating
? null
: (
<View style={[styles.midnightFrameCover, {height: top + HEADER_CORNER_RADIUS}]} />
)
)
: null
);
const view = <View style={styles.headerBottomBorder} />;
const LayerScope = (LayerScopeNativeModule).LayerScope;
r15 = (
!isBackEnabled
? (
<View style={styles.spacer} />
)
: r15
);
}
const header_113138 = <Header_113138 channelId={channelId} frame={frame} guildId={guildId} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} isMIDNIGHTTheme={value8} isChatInputFloating={chatInputFloating} showCreateThread={showCreateThread} isBackEnabled={r12} />;
const ROLE_SUBSCRIPTIONS = StaticChannelRoute.ROLE_SUBSCRIPTIONS;
if (channelId === ROLE_SUBSCRIPTIONS) {
return (
<View style={value9}>
<>
{r6}
<View style={value4}>
{view}
<LayerScope>
{r15}
{((Component) => <Component channelId={channelId} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(ChannelHeader)}
{((Component) => <Component containerStyle={styles.actions} channelId={channelId} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(ChannelActions)}
</LayerScope>
</View>
{frame}
</>
);
function _fun113139() { // fn#113139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2045, offset: 0x023eaedf, size: 225 bytes, params: 1, frame: 6
const frameBinding = frame;
const value2 = undefined;
return [styles.headerWrapper, ConstantsModule.ThemeTypes, frameBinding != null ? styles.headerWithFadingFrame : value2,
frame != null ? styles.splitDivider : value2, frame != null ? styles.splitDividerTop : value2,
frame != null && isMIDNIGHTTheme ? isChatInputFloating ? value2 : styles.headerWithFadingFrameMidnight : value2,
frame != null ? {marginTop: top, minHeight: MIN_HEADER_HEIGHT} : {paddingTop: top,
minHeight: top + MIN_HEADER_HEIGHT}];
}
function _fun113140() { // fn#113140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2424, offset: 0x023eafc0, size: 28 bytes, params: 1, frame: 9
if (isNavigationScreen) {
MainTabsV2ConstantsModule.MIN_HEADER_HEIGHT.goBack();
}
}
function _fun113141() { // fn#113141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2465, offset: 0x023eafdc, size: 33 bytes, params: 1, frame: 3
var r0;
var value;
const value2 = guildId != null;
if (value2) {
guildIdBinding = guildId;
value = environment.__proto__;
value = guildIdBinding !== ME;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function Header_113138Action() { // fn#113142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2574, owner: Header_113138.action, offset: 0x023eaffd, size: 75 bytes, params: 1, frame: 14
const value = environment.__proto__;
(NavigationRouteUtilsNativeModule).navigateToRootTab({'screen': 'guilds',
'guildId': null, 'channelId': null, 'resetRoot': false, 'drawerOpen': false, guildId: guildId,
channelId: channelId});
}
function Header_113138Children(a0) { // fn#113143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2762, owner: Header_113138.children, offset: 0x023eb048, size: 103 bytes, params: 2, frame: 16
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, ref);
const PressableNavigatorBackIcon = (PressableNavigatorBackIconModule).PressableNavigatorBackIcon;
return (
<PressableNavigatorBackIcon
ref={ref}
{...value2}
{...{['onPress']: ChannelConstantsModule.StaticChannelRoute}}
/>
);
}
}
function StandaloneChannelScreen({guildId, channelId, isNavigationScreen, frame, showCreateThread, screenIndex}) { // fn#113144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3289, offset: 0x023eb0af, size: 1383 bytes, params: 2, frame: 36
const EmptyState = (NativeModule).EmptyState;
var object2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
let env0_3 = undefined;
const styles = useStyles();
const env0_2 = (Module01485Module).useNavigation();
const value3 = (SwipeToMemberListUtilsModule).useIsSwipeToMemberListEnabled();
const needSubscriptionToAccess = (UseChannelRoleSubscriptionStatus)(channelId).needSubscriptionToAccess;
const value5 = (require(5103) /* metro dependency 5103: OnboardingHomeUtils */).useCanSeeOnboardingHome(guildId ?? EMPTY_STRING_SNOWFLAKE_ID);
let binding = env0_3;
const value6 = binding.useRef(null);
const value7 = (UseTheme)();
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const value8 = value7 === MIDNIGHT;
env0_3 = value8;
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'StandaloneChannelScreen'}]).chatInputFloating;
binding = env0_3;
let useMemo = binding.useMemo;
const value9 = Reflect.apply(useMemo, binding, [_fun113145, [frame, value8, chatInputFloating, styles.container,
styles.midnightContainerBorder]]);
binding = env0_3;
useMemo = binding.useMemo;
items = [frame, value8, chatInputFloating];
items[3] = styles.contentContainer;
items[4] = styles.splitDivider;
items[5] = styles.midnightContentContainerBorder;
const value10 = Reflect.apply(useMemo, binding, [_fun113146, items]);
const value11 = (UseIsForumChannelSearchActiveModule).useIsForumChannelSearchActive(channelId);
const isChatLockedOpen = (UseChatLayout)().isChatLockedOpen;
const r12 = (isChatLockedOpen ? isNavigationScreen : !isChatLockedOpen) && !value11;
if (channelId == null) {
return (
<View style={[value9, styles.containerEmpty]}>
<EmptyState title={intl.string(t.ai6Lbr)} body={intl.string(t['LTr+x9'])} />
</View>
);
}
if (guildId == null) {
return (
<View style={[value9, styles.containerEmpty]}>
<EmptyState title={intl.string(t.ai6Lbr)} body={intl.string(t['LTr+x9'])} />
</View>
);
}
const header_113138 = (
<Header_113138
channelId={channelId}
frame={frame}
guildId={guildId}
isNavigationScreen={isNavigationScreen}
screenIndex={screenIndex}
isMIDNIGHTTheme={value8}
isChatInputFloating={chatInputFloating}
showCreateThread={showCreateThread}
isBackEnabled={r12}
/>
);
const ROLE_SUBSCRIPTIONS = StaticChannelRoute.ROLE_SUBSCRIPTIONS;
if (channelId === ROLE_SUBSCRIPTIONS) {
return (
<View style={value9}>
{header_113138}
<View style={value10}>
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
{((Component) => <Component guildId={guildId} gatedChannelId={needSubscriptionToAccess ? channelId : undefined} />)(importDefault(14960) /* metro dependency 14960: GuildRoleSubscriptionsOverview */)}
</View>
</View>
);
}
if (needSubscriptionToAccess) {
return (
<View style={value9}>
{header_113138}
<View style={value10}>
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
{((Component) => <Component guildId={guildId} gatedChannelId={needSubscriptionToAccess ? channelId : undefined} />)(importDefault(14960) /* metro dependency 14960: GuildRoleSubscriptionsOverview */)}
</View>
</View>
);
}
const GUILD_HOME = StaticChannelRoute.GUILD_HOME;
if (channelId === GUILD_HOME) {
return (
<View style={value9}>
{header_113138}
<View style={value10}>
{
value5
? ((Component) => <Component guildId={guildId} />)(importDefault(14977) /* metro dependency 14977: GuildOnboardingHomePage */)
: null
}
</View>
</View>
);
}
const MEMBER_SAFETY = StaticChannelRoute.MEMBER_SAFETY;
if (channelId === MEMBER_SAFETY) {
return ((Component) => <Component guildId={guildId} />)(importDefault(14994) /* metro dependency 14994: StandaloneMembersView */);
}
if (showCreateThread) {
return (
<View style={value10}>
{header_113138}
{((CreateThreadView) => <CreateThreadView channelId={channelId} screenIndex={screenIndex} />)((require(15011) /* metro dependency 15011: CreateThreadView */).CreateThreadView)}
</View>
);
}
const fragment = (
<>
{header_113138}
<View style={value10}>
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
{((Component) => <Component guildId={guildId} gatedChannelId={needSubscriptionToAccess ? channelId : undefined} />)(importDefault(14960) /* metro dependency 14960: GuildRoleSubscriptionsOverview */)}
{((Component) => <Component guildId={guildId} channelId={channelId} chatInputRef={value6} screenIndex={screenIndex} />)(ChatView)}
</View>
</View>
</>
);
}
if (needSubscriptionToAccess) {
return (
<View style={value9}>
{header_113138}
<View style={value10}>
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
{((Component) => <Component guildId={guildId} gatedChannelId={needSubscriptionToAccess ? channelId : undefined} />)(importDefault(14960) /* metro dependency 14960: GuildRoleSubscriptionsOverview */)}
</View>
</View>
value3
? ((Component) => <Component style={value9} channelId={channelId} screenIndex={screenIndex} isBackEnabled={r12}>{fragment}</Component>)(importDefault(15015) /* metro dependency 15015: SwipeForMemberListWrapper */)
: (
<View
style={value9}
accessible={false}
onAccessibilityEscape={onAccessibilityEscape_113147}
>
{fragment}
</View>
)
);
function _fun113145() { // fn#113145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3727, offset: 0x023eb616, size: 69 bytes, params: 1, frame: 5
const frameBinding = frame;
const value2 = undefined;
return [styles.container,
frameBinding == null && env0_3 ? chatInputFloating ? value2 : styles.midnightContainerBorder : value2];
}
function _fun113146() { // fn#113146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3854, offset: 0x023eb65b, size: 97 bytes, params: 1, frame: 6
const frameBinding = frame;
const value2 = undefined;
return [styles.contentContainer, frameBinding != null ? styles.splitDivider : value2,
frame != null && env0_3 ? chatInputFloating ? value2 : styles.midnightContentContainerBorder : value2];
}
function StandaloneChannelScreenOnAccessibilityEscape() { // fn#113147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:5149, owner: StandaloneChannelScreen.onAccessibilityEscape, offset: 0x023eb6bc, size: 28 bytes, params: 1, frame: 9
if (MainTabsV2ConstantsModule.HEADER_CORNER_RADIUS) {
env0_2.goBack();
}
}
}
const GUILD_HOME = StaticChannelRoute.GUILD_HOME;
if (channelId === GUILD_HOME) {
return (
<View style={value9}>
{header_113138}
<View style={value10}>
{value5 ? ((Component) => <Component guildId={guildId} />)(importDefault(14977) /* metro dependency 14977: GuildOnboardingHomePage */) : null}
</View>
</View>
);
}
const MEMBER_SAFETY = StaticChannelRoute.MEMBER_SAFETY;
if (channelId === MEMBER_SAFETY) {
return ((Component) => <Component guildId={guildId} />)(importDefault(14994) /* metro dependency 14994: StandaloneMembersView */);
}
if (showCreateThread) {
return (
<View style={value10}>
{header_113138}
{((CreateThreadView) => <CreateThreadView channelId={channelId} screenIndex={screenIndex} />)((require(15011) /* metro dependency 15011: CreateThreadView */).CreateThreadView)}
</View>
);
}
const fragment = <>{header_113138}<View style={value10}>{((Component) => <Component guildId={guildId} channelId={channelId} chatInputRef={value6} screenIndex={screenIndex} />)(importDefault(11273) /* metro dependency 11273: ChatView */)}</View></>;
return value3 ? ((Component) => <Component style={value9} channelId={channelId} screenIndex={screenIndex} isBackEnabled={r12}>{fragment}</Component>)(importDefault(15015) /* metro dependency 15015: SwipeForMemberListWrapper */) : <View style={value9} accessible={false} onAccessibilityEscape={onAccessibilityEscape_113147}>{fragment}</View>;
}
function _fun113139() { // fn#113139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2045, offset: 0x023eaedf, size: 225 bytes, params: 1, frame: 6
const frameBinding = frame;
const value2 = undefined;
return [styles.headerWrapper, env0_9, frameBinding != null ? styles.headerWithFadingFrame : value2,
frame != null ? styles.splitDivider : value2, frame != null ? styles.splitDividerTop : value2,
frame != null && isMIDNIGHTTheme ? isChatInputFloating ? value2 : styles.headerWithFadingFrameMidnight : value2,
frame != null ? {marginTop: top, minHeight: MIN_HEADER_HEIGHT} : {paddingTop: top,
minHeight: top + MIN_HEADER_HEIGHT}];
}
function _fun113140() { // fn#113140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2424, offset: 0x023eafc0, size: 28 bytes, params: 1, frame: 9
if (isNavigationScreen) {
env0_6.goBack();
}
}
function _fun113141() { // fn#113141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2465, offset: 0x023eafdc, size: 33 bytes, params: 1, frame: 3
var r0;
var value;
const value2 = guildId != null;
if (value2) {
guildIdBinding = guildId;
value = environment.__proto__;
value = guildIdBinding !== ME;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function Header_113138Action() { // fn#113142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2574, owner: Header_113138.action, offset: 0x023eaffd, size: 75 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).navigateToRootTab({'screen': 'guilds',
'guildId': null, 'channelId': null, 'resetRoot': false, 'drawerOpen': false, guildId: guildId,
channelId: channelId});
}
function Header_113138Children(a0) { // fn#113143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2762, owner: Header_113138.children, offset: 0x023eb048, size: 103 bytes, params: 2, frame: 16
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, ref);
const PressableNavigatorBackIcon = (require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon;
return (
<PressableNavigatorBackIcon
ref={ref}
{...value2}
{...{['onPress']: env0_10}}
/>
);
}
function _fun113145() { // fn#113145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3727, offset: 0x023eb616, size: 69 bytes, params: 1, frame: 5
const frameBinding = frame;
const value2 = undefined;
return [styles.container,
frameBinding == null && env0_3 ? chatInputFloating ? value2 : styles.midnightContainerBorder : value2];
}
function _fun113146() { // fn#113146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3854, offset: 0x023eb65b, size: 97 bytes, params: 1, frame: 6
const frameBinding = frame;
const value2 = undefined;
return [styles.contentContainer, frameBinding != null ? styles.splitDivider : value2,
frame != null && env0_3 ? chatInputFloating ? value2 : styles.midnightContentContainerBorder : value2];
}
function StandaloneChannelScreenOnAccessibilityEscape() { // fn#113147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:5149, owner: StandaloneChannelScreen.onAccessibilityEscape, offset: 0x023eb6bc, size: 28 bytes, params: 1, frame: 9
if (env0_5) {
env0_2.goBack();
}
}
global.__d(_fun113137, 14959, [31, 27, 9604, 661, 1386, 33, 4501, 697, 1485, 1585, 7701, 9390, 1244, 4007, 8811,
9605, 6517, 9709, 9612, 9690, 6632, 5103, 4048, 1357, 9722, 4010, 1305, 7704, 14960, 14977, 14994, 15011, 11273,
15015,
2]) /* metro module 14959, dependencies: [31, 27, 9604, 661, 1386, 33, 4501, 697, 1485, 1585, 7701, 9390, 1244, 4007, 8811, 9605, 6517, 9709, 9612, 9690, 6632, 5103, 4048, 1357, 9722, 4010, 1305, 7704, 14960, 14977, 14994, 15011, 11273, 15015, 2] */;
@@ -1,477 +1,525 @@
/* Metro module 15015; source: modules/main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx; dependencies: [57, 31, 27, 9613, 9604, 661, 33, 3, 4501, 697, 4863, 14368, 4010, 4017, 4594, 4048, 5459, 4015, 11335, 1239, 14364, 8621, 12080, 4008, 4007, 4571, 1485, 14958, 5321, 14954, 7704, 6517, 15016, 2] */
import Logger from '../../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseChatLayout from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import UseBackPressHandler from '../../../routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
import AppAnalyticsUtils from '../../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import ThemedGradient from '../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import UseChatWidth from '../../../chat/native/useChatWidth.tsx'; /* Metro dependency 11335 */
import RouteManager from '../../../routing/RouteManager.tsx'; /* Metro dependency 12080 */
import UseMainTabsPanelsGesture from '../panels/useMainTabsPanelsGesture.tsx'; /* Metro dependency 14364 */
import MainTabsNavigatorPanelContext from '../panels/MainTabsNavigatorPanelContext.tsx'; /* Metro dependency 14368 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
import * as Module01485Module from '../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as RootNavigationRefNativeModule from '../../RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
import * as UseChatLayoutModule from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import * as ChatInputUtilsModule from '../../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as RunAfterInteractionsUtilsModule from '../../../../utils/native/RunAfterInteractionsUtils.tsx'; /* Metro dependency 5459 */
import * as LayerScopeNativeModule from '../../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as MainTabsV2ConstantsModule from '../shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
import * as ChannelDetailsStoreModule from '../sidebar/details/stores/ChannelDetailsStore.tsx'; /* Metro dependency 9613 */
import * as MainTabsNavigatorPanelContextModule from '../panels/MainTabsNavigatorPanelContext.tsx'; /* Metro dependency 14368 */
import * as MainTabsContentScrimModule from '../panels/MainTabsContentScrim.tsx'; /* Metro dependency 14954 */
import * as UseMainTabsChannelScreenStylesModule from '../panels/useMainTabsChannelScreenStyles.tsx'; /* Metro dependency 14958 */
function _fun113500(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6, offset: 0x023fc99b, size: 669 bytes, params: 8, frame: 26
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 value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_6 = value2.View;
const channelDetailsStoreModule = require(9613) /* metro dependency 9613: ChannelDetailsStore */;
const env0_7 = channelDetailsStoreModule.getIsChannelDetailsSearchActive;
const env0_8 = channelDetailsStoreModule.setIsChannelDetailsSearchActive;
const MIDNIGHT_BORDER_WIDTH = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIDNIGHT_BORDER_WIDTH;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.AnalyticEvents;
const env0_11 = constantsModule.ComponentActions;
const env0_12 = constantsModule.ThemeTypes;
const value5 = require(33) /* metro dependency 33 */;
const env0_13 = value5.jsx;
const env0_14 = value5.jsxs;
const value8 = new (importDefault(3) /* metro dependency 3: Logger */)('SwipeForMemberListWrapper');
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const MIDNIGHT_BORDER_WIDTH = (MainTabsV2ConstantsModule).MIDNIGHT_BORDER_WIDTH;
const value8 = new (Logger)('SwipeForMemberListWrapper');
value = value.createContext(undefined);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.memberListPreview = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'flex-start',
'overflow': 'hidden', backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['overflow'] = 'hidden';
object2.content = object4;
const MODAL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MODAL_BACKGROUND;
object2.memberListContainer = {'flex': 1, 'overflow': 'hidden', backgroundColor: MODAL_BACKGROUND};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object2.midnightBorder = {borderLeftColor: BORDER_STRONG, borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
object2.midnightRightOverflow = {right: -MIDNIGHT_BORDER_WIDTH};
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function SwipeForMemberListWrapperTsx1(){const{shownPixels}=this.__closure;return shownPixels.get()>0;}'};
object2 = {code: 'function SwipeForMemberListWrapperTsx2(isVisible,wasVisible){const{mainDisallowGesture,stackDisallowGesture,panelDisallowGesture}=this.__closure;var _stackDisallowGesture;if(isVisible===wasVisible)return;mainDisallowGesture.set(isVisible);(_stackDisallowGesture=stackDisallowGesture)===null||_stackDisallowGesture===void 0||_stackDisallowGesture.set(isVisible);if(!isVisible){panelDisallowGesture.set(false);}}'};
object2 = {code: 'function SwipeForMemberListWrapperTsx3(){const{isChatLockedOpen,mainTranslateX,stackTranslateX}=this.__closure;return!isChatLockedOpen&&mainTranslateX.get()>0||stackTranslateX!=null&&stackTranslateX.get()>0;}'};
object2 = {code: 'function SwipeForMemberListWrapperTsx4(isInactive,wasInactive){const{panelDisallowGesture}=this.__closure;if(isInactive===wasInactive)return;panelDisallowGesture.set(isInactive);}'};
object2 = {code: 'function SwipeForMemberListWrapperTsx5(){const{maxWidth,translateX}=this.__closure;return maxWidth-translateX.get();}'};
object2 = {code: 'function SwipeForMemberListWrapperTsx6(){const{theme,ThemeTypes,isChatBesideChannelList,translateX,MIDNIGHT_BORDER_WIDTH}=this.__closure;if(theme!==ThemeTypes.MIDNIGHT||isChatBesideChannelList)return translateX.get();return translateX.get()-MIDNIGHT_BORDER_WIDTH;}'};
object2 = {code: "function SwipeForMemberListWrapperTsx7(){const{shownPixels,PEEK_PIXEL_THRESHOLD}=this.__closure;const exceedsPeekThreshold=shownPixels.get()>PEEK_PIXEL_THRESHOLD*2;return{display:exceedsPeekThreshold?'none':'flex',opacity:exceedsPeekThreshold?0:1-shownPixels.get()/PEEK_PIXEL_THRESHOLD};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx');
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.memberListPreview = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'flex-start', 'overflow': 'hidden',
backgroundColor: BACKGROUND_BASE_LOW};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['overflow'] = 'hidden';
object.content = object3;
const MODAL_BACKGROUND = (Native).colors.MODAL_BACKGROUND;
object.memberListContainer = {'flex': 1, 'overflow': 'hidden', backgroundColor: MODAL_BACKGROUND};
const BORDER_STRONG = (Native).colors.BORDER_STRONG;
object.midnightBorder = {borderLeftColor: BORDER_STRONG, borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
object.midnightRightOverflow = {right: -MIDNIGHT_BORDER_WIDTH};
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function SwipeForMemberListWrapperTsx1(){const{shownPixels}=this.__closure;return shownPixels.get()>0;}'};
object = {code: 'function SwipeForMemberListWrapperTsx2(isVisible,wasVisible){const{mainDisallowGesture,stackDisallowGesture,panelDisallowGesture}=this.__closure;var _stackDisallowGesture;if(isVisible===wasVisible)return;mainDisallowGesture.set(isVisible);(_stackDisallowGesture=stackDisallowGesture)===null||_stackDisallowGesture===void 0||_stackDisallowGesture.set(isVisible);if(!isVisible){panelDisallowGesture.set(false);}}'};
object = {code: 'function SwipeForMemberListWrapperTsx3(){const{isChatLockedOpen,mainTranslateX,stackTranslateX}=this.__closure;return!isChatLockedOpen&&mainTranslateX.get()>0||stackTranslateX!=null&&stackTranslateX.get()>0;}'};
object = {code: 'function SwipeForMemberListWrapperTsx4(isInactive,wasInactive){const{panelDisallowGesture}=this.__closure;if(isInactive===wasInactive)return;panelDisallowGesture.set(isInactive);}'};
object = {code: 'function SwipeForMemberListWrapperTsx5(){const{maxWidth,translateX}=this.__closure;return maxWidth-translateX.get();}'};
object = {code: 'function SwipeForMemberListWrapperTsx6(){const{theme,ThemeTypes,isChatBesideChannelList,translateX,MIDNIGHT_BORDER_WIDTH}=this.__closure;if(theme!==ThemeTypes.MIDNIGHT||isChatBesideChannelList)return translateX.get();return translateX.get()-MIDNIGHT_BORDER_WIDTH;}'};
object = {code: "function SwipeForMemberListWrapperTsx7(){const{shownPixels,PEEK_PIXEL_THRESHOLD}=this.__closure;const exceedsPeekThreshold=shownPixels.get()>PEEK_PIXEL_THRESHOLD*2;return{display:exceedsPeekThreshold?'none':'flex',opacity:exceedsPeekThreshold?0:1-shownPixels.get()/PEEK_PIXEL_THRESHOLD};}"};
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx');
exports.default = _default_113501;
exports.SwipeForMemberListContext = value;
}
function _default_113501({channelId, screenIndex, isBackEnabled, children, style}) { // fn#113501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2526, offset: 0x023fcc38, size: 1632 bytes, params: 2, frame: 42
const styles = useStyles();
const value3 = (UseTheme)();
const env0_3 = value3;
const isChatBesideChannelList = (UseChatLayout)().isChatBesideChannelList;
const binding = isChatBesideChannelList;
const [property, env0_5] = env0_3(binding.useState(channelId), 2);
binding.useEffect(_fun113502, [channelId]);
let closure = _fun113505;
const value6 = binding.useCallback(closure, []);
const value7 = (UseChatWidth)(screenIndex);
const {gesture, panelGestureContext, isDragging, translateX, movePanel,
maxWidth} = (UseMainTabsPanelsGesture)({'canDrag': true,
'onDragStart': null, 'onPreMovement': null, 'startShown': false, 'cancelOnSwipeRightFromStart': true,
onDragStart: value6, onPreMovement: binding.useCallback(_fun113507, [channelId, screenIndex]),
openWidth: binding.useMemo(_fun113506, [value3, value7])});
let useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = function() {
return maxWidth - translateX.get();
};
closure.__closure = {maxWidth: maxWidth, translateX: translateX};
closure.__workletHash = 10842481670591;
closure.__initData = env0_22;
const value11 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const value12 = (require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(value11,
function(a0) {
return a0 > 0;
});
binding.useEffect(_fun113510, [value12, channelId, screenIndex]);
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = _default_113501Te;
closure.__closure = {theme: value3, ThemeTypes: ThemeTypes, isChatBesideChannelList: isChatBesideChannelList,
translateX: translateX, MIDNIGHT_BORDER_WIDTH: MIDNIGHT_BORDER_WIDTH};
closure.__workletHash = 5498466465211;
closure.__initData = env0_23;
const value13 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const value14 = binding.useCallback(_fun113512, [channelId, screenIndex, movePanel]);
const value15 = binding.useCallback(function() {
movePanel(false, false, 0, true);
}, [movePanel]);
binding.useEffect(_fun113514, [value15]);
binding.useEffect(_fun113517, [value14, value15]);
const value16 = binding.useCallback(_fun113519, [value11, value15, channelId]);
(UseBackPressHandler)(value16, value12);
binding.useEffect(_fun113520, [channelId, screenIndex, value15]);
const env0_15 = (Module01485Module).useNavigation();
useAnalyticsEffect(channelId, screenIndex, isDragging, value12);
const value17 = useGestureCompositionEffect(gesture, value11, panelGestureContext);
const value18 = binding.useMemo(_fun113531, [panelGestureContext, channelId, screenIndex, value12]);
const value19 = (UseMainTabsChannelScreenStylesModule).useMainTabsChannelScreenStyles(isDragging,
value13, maxWidth);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = _default_113501Le;
closure.__closure = {shownPixels: value11, PEEK_PIXEL_THRESHOLD: 150};
closure.__workletHash = 9468759128012;
closure.__initData = env0_24;
const value20 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const Provider = env0_16.Provider;
const GestureDetector = (Module05321Module).GestureDetector;
const object2 = {style: style, onAccessibilityEscape: onAccessibilityEscape_113533};
const viewBindingProps = {style: styles.content};
const value21 = !value12;
viewBindingProps.accessibilityElementsHidden = value12 ? !value21 : undefined;
viewBindingProps.importantForAccessibility = value12 ? 'no-hide-descendants' : undefined;
const MainTabsContentScrim = (MainTabsContentScrimModule).MainTabsContentScrim;
const view = (
<View {...viewBindingProps}>
{children}
<MainTabsContentScrim translateX={value13} maxWidth={maxWidth} />
</View>
);
const View2 = (ReanimatedRexport).View;
const items3 = [value19];
items3[1] = styles.memberListContainer;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
items3[2] = value3 !== MIDNIGHT ? undefined : styles.midnightBorder;
items3[3] = isChatBesideChannelList || value3 !== ThemeTypes.MIDNIGHT ? undefined : styles.midnightRightOverflow;
const items4 = [
((Component) => <Component absolute withOverlay overlayOpacity={0.5} />)(ThemedGradient),
];
const LayerScope = (LayerScopeNativeModule).LayerScope;
items4[1] = (
<LayerScope>
{((Component) => <Component isShowing={value12} channelId={property} isSearchLocked={false} onBackPress={value16} componentWidth={value7} onChannelDeleted={value15} />)(importDefault(15016) /* metro dependency 15016: ChannelDetails */)}
</LayerScope>
);
const View3 = (ReanimatedRexport).View;
items4[2] = (
<View3 style={[StyleSheet.absoluteFill, value20]}>
<View style={styles.memberListPreview} />
</View3>
);
return (
<Provider value={value18}>
<GestureDetector gesture={value17}>
<View {...object2}>
{view}
<View2
style={items3}
accessibilityElementsHidden={value12 ? undefined : value21}
importantForAccessibility={value12 ? undefined : 'no-hide-descendants'}
>
{items4}
</View2>
</View>
</GestureDetector>
</Provider>
);
function _fun113502() { // fn#113502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2705, offset: 0x023fd298, size: 62 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const env0_0 = (RunAfterInteractionsUtilsModule).runAfterInteractions(_fun113503,
200);
return _fun113504;
function _fun113503() { // fn#113503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2747, offset: 0x023fd2d6, size: 20 bytes, params: 1, frame: 11
env1_5(channelId);
}
function _default_113501({channelId, screenIndex, isBackEnabled, children, style}) { // fn#113501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2526, offset: 0x023fcc38, size: 1632 bytes, params: 2, frame: 42
const styles = useStyles();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const env0_3 = value3;
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
const binding = isChatBesideChannelList;
const [property, env0_5] = env0_3(binding.useState(channelId), 2);
binding.useEffect(_fun113502, [channelId]);
let closure = _fun113505;
const value6 = binding.useCallback(closure, []);
const value7 = (importDefault(11335) /* metro dependency 11335: useChatWidth */)(screenIndex);
const {gesture, panelGestureContext, isDragging, translateX, movePanel,
maxWidth} = (importDefault(14364) /* metro dependency 14364: useMainTabsPanelsGesture */)({'canDrag': true,
'onDragStart': null, 'onPreMovement': null, 'startShown': false, 'cancelOnSwipeRightFromStart': true,
onDragStart: value6, onPreMovement: binding.useCallback(_fun113507, [channelId, screenIndex]),
openWidth: binding.useMemo(_fun113506, [value3, value7])});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
closure = function() {
return maxWidth - translateX.get();
};
closure.__closure = {maxWidth: maxWidth, translateX: translateX};
closure.__workletHash = 10842481670591;
closure.__initData = env0_22;
const value11 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const value12 = (require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(value11,
function(a0) {
return a0 > 0;
});
binding.useEffect(_fun113510, [value12, channelId, screenIndex]);
const moduleValue3 = reanimatedRexportModule;
useDerivedValue = moduleValue3.useDerivedValue;
closure = _default_113501Te;
closure.__closure = {theme: value3, ThemeTypes: ThemeTypes, isChatBesideChannelList: isChatBesideChannelList,
translateX: translateX, MIDNIGHT_BORDER_WIDTH: MIDNIGHT_BORDER_WIDTH};
closure.__workletHash = 5498466465211;
closure.__initData = env0_23;
const value13 = Reflect.apply(useDerivedValue, moduleValue3, [closure]);
const value14 = binding.useCallback(_fun113512, [channelId, screenIndex, movePanel]);
const value15 = binding.useCallback(function() {
movePanel(false, false, 0, true);
}, [movePanel]);
binding.useEffect(_fun113514, [value15]);
binding.useEffect(_fun113517, [value14, value15]);
const value16 = binding.useCallback(_fun113519, [value11, value15, channelId]);
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(value16, value12);
binding.useEffect(_fun113520, [channelId, screenIndex, value15]);
const env0_15 = (require(1485) /* metro dependency 1485 */).useNavigation();
useAnalyticsEffect(channelId, screenIndex, isDragging, value12);
const value17 = useGestureCompositionEffect(gesture, value11, panelGestureContext);
const value18 = binding.useMemo(_fun113531, [panelGestureContext, channelId, screenIndex, value12]);
const value19 = (require(14958) /* metro dependency 14958: useMainTabsChannelScreenStyles */).useMainTabsChannelScreenStyles(isDragging,
value13, maxWidth);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = _default_113501Le;
closure.__closure = {shownPixels: value11, PEEK_PIXEL_THRESHOLD: 150};
closure.__workletHash = 9468759128012;
closure.__initData = env0_24;
const value20 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const Provider = env0_16.Provider;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const object = {style: style, onAccessibilityEscape: onAccessibilityEscape_113533};
const viewBindingProps = {style: styles.content};
const value21 = !value12;
viewBindingProps.accessibilityElementsHidden = value12 ? !value21 : undefined;
viewBindingProps.importantForAccessibility = value12 ? 'no-hide-descendants' : undefined;
const MainTabsContentScrim = (require(14954) /* metro dependency 14954: MainTabsContentScrim */).MainTabsContentScrim;
const view = <View {...viewBindingProps}>{children}<MainTabsContentScrim translateX={value13} maxWidth={maxWidth} /></View>;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [value19];
items3[1] = styles.memberListContainer;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
items3[2] = value3 !== MIDNIGHT ? undefined : styles.midnightBorder;
items3[3] = isChatBesideChannelList || value3 !== ThemeTypes.MIDNIGHT ? undefined : styles.midnightRightOverflow;
const items4 = [((Component) => <Component absolute withOverlay overlayOpacity={0.5} />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)];
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
items4[1] = <LayerScope>{((Component) => <Component isShowing={value12} channelId={property} isSearchLocked={false} onBackPress={value16} componentWidth={value7} onChannelDeleted={value15} />)(importDefault(15016) /* metro dependency 15016: ChannelDetails */)}</LayerScope>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items4[2] = <View3 style={[StyleSheet.absoluteFill, value20]}><View style={styles.memberListPreview} /></View3>;
return (
<Provider value={value18}>
<GestureDetector gesture={value17}>
<View {...object}>
{view}
<View2
style={items3}
accessibilityElementsHidden={value12 ? undefined : value21}
importantForAccessibility={value12 ? undefined : 'no-hide-descendants'}
>
{items4}
</View2>
</View>
</GestureDetector>
</Provider>
);
}
function _fun113504() { // fn#113504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2770, offset: 0x0216dcad, size: 21 bytes, params: 1, frame: 9
env0_0.cancel();
}
function _fun113502() { // fn#113502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2705, offset: 0x023fd298, size: 62 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const env0_0 = (require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun113503,
200);
return _fun113504;
}
function _fun113505() { // fn#113505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2817, offset: 0x023fd2ea, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
}
function _fun113506() { // fn#113506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2882, offset: 0x023fd30f, size: 44 bytes, params: 1, frame: 4
const binding = env0_3;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
return binding === MIDNIGHT ? env0_6 + MIDNIGHT_BORDER_WIDTH : env0_6;
}
function _fun113507(a0) { // fn#113507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2932, offset: 0x023fd33b, size: 101 bytes, params: 2, frame: 17
var value;
var setIsChannelDetailsSearchActiveBinding;
var channelIdBinding;
var ComponentDispatch;
if (!a0) {
value = environment.__proto__;
setIsChannelDetailsSearchActiveBinding = setIsChannelDetailsSearchActive;
channelIdBinding = channelId;
setIsChannelDetailsSearchActiveBinding(channelIdBinding, false, 'initial');
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.CHANNEL_DETAILS_HIDDEN, {channelId: channelIdBinding,
screenIndex: screenIndex});
}
}
function _fun113510() { // fn#113510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3462, offset: 0x023fd3ba, size: 85 bytes, params: 1, frame: 15
var value2;
var ComponentDispatch;
if (env0_12) {
value2 = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.CHANNEL_DETAILS_SHOWN, {channelId: channelId,
screenIndex: screenIndex});
}
}
function _default_113501Te() { // fn#113511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3612, owner: _default_113501.te, offset: 0x023fd40f, size: 69 bytes, params: 1, frame: 11
var r0;
var value;
const binding = env0_3;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
if (binding !== MIDNIGHT) {
r0 = translateX.get();
} else if (isChatBesideChannelList) {
r0 = translateX.get();
} else {
value = translateX.get();
value -= MIDNIGHT_BORDER_WIDTH;
r0 = value;
}
return r0;
}
function _fun113512(a0) { // fn#113512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3834, offset: 0x023fd454, size: 128 bytes, params: 2, frame: 17
var value4;
if (a0.channelId === channelId && a0.screenIndex === screenIndex) {
value4 = environment.__proto__;
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
if (a0.search === true) {
setIsChannelDetailsSearchActive(a0.channelId, true, 'initial');
}
movePanel(true, false, 0, true);
}
}
function _fun113514() { // fn#113514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4028, offset: 0x023fd4ed, size: 58 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
const env0_0 = (importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(_fun113515);
return _fun113516;
}
function _fun113505() { // fn#113505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2817, offset: 0x023fd2ea, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ChatInputUtilsModule).dismissKeyboard();
}
function _fun113517() { // fn#113517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4122, offset: 0x023fd536, size: 108 bytes, params: 1, frame: 19
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
let subscribe = ComponentDispatch.subscribe;
const SHOW_CHANNEL_DETAILS = ComponentActions.SHOW_CHANNEL_DETAILS;
Reflect.apply(subscribe, ComponentDispatch, [SHOW_CHANNEL_DETAILS, env0_13]);
subscribe = ComponentDispatch.subscribe;
const HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
Reflect.apply(subscribe, ComponentDispatch, [HIDE_CHANNEL_DETAILS, env0_14]);
return _fun113518;
}
function _fun113506() { // fn#113506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2882, offset: 0x023fd30f, size: 44 bytes, params: 1, frame: 4
const binding = env0_3;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
return binding === MIDNIGHT ? ReactNativeModule.View + MIDNIGHT_BORDER_WIDTH : ReactNativeModule.View;
}
function _fun113519() { // fn#113519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4426, offset: 0x023fd605, size: 525 bytes, params: 1, frame: 23
var verbose;
var object2;
var value10;
let binding = env0_11;
if (binding.get() <= 0) {
value10 = environment.__proto__;
binding = env1_15;
verbose = binding.verbose;
object2 = {};
object2.shownPixels = env0_11.get();
Reflect.apply(verbose, binding, ['handleBackPress', 'shownPixels <= 0', object2]);
return false;
}
const value4 = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
const r7 = rootNavigationRef == null ? value4 : rootNavigationRef.getCurrentRoute();
const useChatLayoutModule = require(4010) /* metro dependency 4010: useChatLayout */;
const getChatLayout = useChatLayoutModule.getChatLayout;
const isChatLockedOpen = Reflect.apply(getChatLayout, useChatLayoutModule, []).isChatLockedOpen;
const value7 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(r7);
let r1 = value7 == null && isChatLockedOpen;
const r10 = r1 ? (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(r7) : value7;
binding = env1_15;
verbose = binding.verbose;
let params = r10 == null ? value4 : r10.params;
Reflect.apply(verbose, binding, ['handleBackPress', {route: r10, channelId: channelId, currentRoute: r7,
isChatLockedOpen: isChatLockedOpen, routeParams: params}]);
if (r10 == null) {
binding = env1_15;
binding.verbose('handleBackPress', 'route is null', {currentRoute: r7, isChatLockedOpen: isChatLockedOpen});
r1 = false;
} else {
params = r10.params;
if ((params == null ? value4 : params.channelId) !== channelId) {
function _fun113507(a0) { // fn#113507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2932, offset: 0x023fd33b, size: 101 bytes, params: 2, frame: 17
var value;
var setIsChannelDetailsSearchActiveBinding;
var channelIdBinding;
var ComponentDispatch;
if (!a0) {
value = environment.__proto__;
setIsChannelDetailsSearchActiveBinding = setIsChannelDetailsSearchActive;
channelIdBinding = channelId;
setIsChannelDetailsSearchActiveBinding(channelIdBinding, false, 'initial');
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.CHANNEL_DETAILS_HIDDEN, {channelId: channelIdBinding,
screenIndex: screenIndex});
}
}
function _fun113510() { // fn#113510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3462, offset: 0x023fd3ba, size: 85 bytes, params: 1, frame: 15
var value2;
var ComponentDispatch;
if (ConstantsModule.ThemeTypes) {
value2 = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.CHANNEL_DETAILS_SHOWN, {channelId: channelId,
screenIndex: screenIndex});
}
}
function _default_113501Te() { // fn#113511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3612, owner: _default_113501.te, offset: 0x023fd40f, size: 69 bytes, params: 1, frame: 11
var r0;
var value;
const binding = env0_3;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
if (binding !== MIDNIGHT) {
r0 = translateX.get();
} else if (isChatBesideChannelList) {
r0 = translateX.get();
} else {
value = translateX.get();
value -= MIDNIGHT_BORDER_WIDTH;
r0 = value;
}
return r0;
}
function _fun113512(a0) { // fn#113512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3834, offset: 0x023fd454, size: 128 bytes, params: 2, frame: 17
var value4;
if (a0.channelId === channelId && a0.screenIndex === screenIndex) {
value4 = environment.__proto__;
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
if (a0.search === true) {
setIsChannelDetailsSearchActive(a0.channelId, true, 'initial');
}
movePanel(true, false, 0, true);
}
}
function _fun113514() { // fn#113514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4028, offset: 0x023fd4ed, size: 58 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
const env0_0 = (RouteManager).addRouteChangeListener(_fun113515);
return _fun113516;
function _fun113515() { // fn#113515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4072, offset: 0x023fd527, size: 15 bytes, params: 1, frame: 9
env1_14();
}
function _fun113516() { // fn#113516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4091, offset: 0x00da750c, size: 15 bytes, params: 1, frame: 9
env0_0();
}
}
function _fun113517() { // fn#113517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4122, offset: 0x023fd536, size: 108 bytes, params: 1, frame: 19
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
let subscribe = ComponentDispatch.subscribe;
const SHOW_CHANNEL_DETAILS = ComponentActions.SHOW_CHANNEL_DETAILS;
Reflect.apply(subscribe, ComponentDispatch, [SHOW_CHANNEL_DETAILS, JsxRuntimeModule.jsx]);
subscribe = ComponentDispatch.subscribe;
const HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
Reflect.apply(subscribe, ComponentDispatch, [HIDE_CHANNEL_DETAILS, JsxRuntimeModule.jsxs]);
return _fun113518;
function _fun113518() { // fn#113518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4255, offset: 0x023fd5a2, size: 99 bytes, params: 1, frame: 19
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
let unsubscribe = ComponentDispatch.unsubscribe;
const SHOW_CHANNEL_DETAILS = ComponentActions.SHOW_CHANNEL_DETAILS;
Reflect.apply(unsubscribe, ComponentDispatch, [SHOW_CHANNEL_DETAILS, env1_13]);
unsubscribe = ComponentDispatch.unsubscribe;
const HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
Reflect.apply(unsubscribe, ComponentDispatch, [HIDE_CHANNEL_DETAILS, env1_14]);
}
}
function _fun113519() { // fn#113519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4426, offset: 0x023fd605, size: 525 bytes, params: 1, frame: 23
var verbose;
var object;
var value10;
let binding = ConstantsModule.ComponentActions;
if (binding.get() <= 0) {
value10 = environment.__proto__;
binding = env1_15;
verbose = binding.verbose;
object = {};
object.shownPixels = ConstantsModule.ComponentActions.get();
Reflect.apply(verbose, binding, ['handleBackPress', 'shownPixels <= 0', object]);
return false;
}
const value4 = undefined;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
const r7 = rootNavigationRef == null ? value4 : rootNavigationRef.getCurrentRoute();
const getChatLayout = UseChatLayoutModule.getChatLayout;
const isChatLockedOpen = Reflect.apply(getChatLayout, UseChatLayoutModule, []).isChatLockedOpen;
const value7 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(r7);
let r1 = value7 == null && isChatLockedOpen;
const r10 = r1 ? (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(r7) : value7;
binding = env1_15;
verbose = binding.verbose;
params = r10.params;
Reflect.apply(verbose, binding, ['handleBackPress', 'route channelId mismatch',
{routeChannelId: params == null ? value4 : params.channelId, expectedChannelId: channelId}]);
r1 = false;
} else if (getIsChannelDetailsSearchActive(channelId)) {
env1_15.verbose('handleBackPress', 'cancelling search before closing panel');
setIsChannelDetailsSearchActive(channelId, false, 'initial');
r1 = true;
} else {
env0_14();
r1 = true;
let params = r10 == null ? value4 : r10.params;
Reflect.apply(verbose, binding, ['handleBackPress', {route: r10, channelId: channelId, currentRoute: r7,
isChatLockedOpen: isChatLockedOpen, routeParams: params}]);
if (r10 == null) {
binding = env1_15;
binding.verbose('handleBackPress', 'route is null', {currentRoute: r7, isChatLockedOpen: isChatLockedOpen});
r1 = false;
} else {
params = r10.params;
if ((params == null ? value4 : params.channelId) !== channelId) {
binding = env1_15;
verbose = binding.verbose;
params = r10.params;
Reflect.apply(verbose, binding, ['handleBackPress', 'route channelId mismatch',
{routeChannelId: params == null ? value4 : params.channelId, expectedChannelId: channelId}]);
r1 = false;
} else if (getIsChannelDetailsSearchActive(channelId)) {
env1_15.verbose('handleBackPress', 'cancelling search before closing panel');
setIsChannelDetailsSearchActive(channelId, false, 'initial');
r1 = true;
} else {
(0, JsxRuntimeModule.jsxs)();
r1 = true;
}
}
return r1;
}
}
return r1;
}
function useAnalyticsEffect(a0, a1, a2, a3) { // fn#113521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5345, owner: _default_113501.useAnalyticsEffect, offset: 0x023fd812, size: 113 bytes, params: 5, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const binding = env1_4;
binding.useEffect(_fun113522, [a0, a1, a3]);
binding.useEffect(_fun113523, [a3, a0, a1, a2]);
}
function useGestureCompositionEffect(a0, a1, {disallowGesture}) { // fn#113524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5679, owner: _default_113501.useGestureCompositionEffect, offset: 0x023fd94f, size: 532 bytes, params: 4, frame: 27
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const binding = env1_4;
let useContext = binding.useContext;
const {gesture, disallowGesture, translateX} = Reflect.apply(useContext, binding,
[importDefault(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */]);
useContext = binding.useContext;
const MainTabsChannelScreenStackContext = (require(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */).MainTabsChannelScreenStackContext;
const r2 = Reflect.apply(useContext, binding, [MainTabsChannelScreenStackContext]) ?? ({});
const gesture2 = r2.gesture;
const disallowGesture2 = r2.disallowGesture;
const translateX2 = r2.translateX;
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
const value4 = env1_4.useMemo(_fun113525, [a0, gesture, gesture2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = useGestureCompositionEffectU;
closure.__closure = {shownPixels: a1};
closure.__workletHash = 15116046915956;
closure.__initData = env1_18;
const closure2 = useGestureCompositionEffectC;
closure2.__closure = {mainDisallowGesture: disallowGesture, stackDisallowGesture: disallowGesture2,
panelDisallowGesture: disallowGesture};
closure2.__workletHash = 13681610289748;
closure2.__initData = env1_19;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const moduleValue2 = reanimatedRexportModule;
useAnimatedReaction = moduleValue2.useAnimatedReaction;
closure = useGestureCompositionEffect_;
closure.__closure = {isChatLockedOpen: isChatLockedOpen, mainTranslateX: translateX, stackTranslateX: translateX2};
closure.__workletHash = 11938850302839;
closure.__initData = env1_20;
const closure3 = useGestureCompositionEffectH;
closure3.__closure = {panelDisallowGesture: disallowGesture};
closure3.__workletHash = 3362957347102;
closure3.__initData = env1_21;
Reflect.apply(useAnimatedReaction, moduleValue2, [closure, closure3]);
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(function() {
disallowGesture.set(false);
disallowGesture.set(false);
if (disallowGesture != null) {
disallowGesture.set(false);
function _fun113520() { // fn#113520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5290, offset: 0x0112f969, size: 15 bytes, params: 1, frame: 9
(0, JsxRuntimeModule.jsxs)();
}
});
return value4;
}
function _fun113531() { // fn#113531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6851, offset: 0x023fdca5, size: 59 bytes, params: 1, frame: 13
const object2 = {};
copyDataProperties(object2, panelGestureContext, undefined);
object2['channelId'] = channelId;
object2['screenIndex'] = screenIndex;
object2['isPanelActive'] = env0_12;
return object2;
}
function useAnalyticsEffect(a0, a1, a2, a3) { // fn#113521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5345, owner: _default_113501.useAnalyticsEffect, offset: 0x023fd812, size: 113 bytes, params: 5, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const binding = env1_4;
binding.useEffect(_fun113522, [a0, a1, a3]);
binding.useEffect(_fun113523, [a3, a0, a1, a2]);
function _fun113522() { // fn#113522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5395, offset: 0x023fd883, size: 95 bytes, params: 1, frame: 17
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const MEMBER_LIST_SWIPE_TOGGLED = AnalyticEvents.MEMBER_LIST_SWIPE_TOGGLED;
const object = {};
object.channel_id = env0_0;
const String = global.String;
object.screen_index = String(require);
object.member_list_open = importAll;
Reflect.apply(trackWithMetadata, defaultImport, [MEMBER_LIST_SWIPE_TOGGLED, object]);
}
function _default_113501Le() { // fn#113532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:7005, owner: _default_113501.le, offset: 0x023fdce0, size: 82 bytes, params: 1, frame: 12
var value;
const value3 = env0_11.get() > 300;
const object2 = {};
let r1 = value3 ? 'none' : 'flex';
object2.display = r1;
if (value3) {
r1 = 0;
} else {
value = env0_11.get();
value = 1 - value / 150;
r1 = value;
}
object2.opacity = r1;
return object2;
}
function _fun113523() { // fn#113523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5537, offset: 0x023fd8e2, size: 109 bytes, params: 1, frame: 16
var value3;
var defaultImport;
var trackWithMetadata;
var MEMBER_LIST_SWIPE_PEEK;
var object;
if (importAll && importDefault.get()) {
value3 = environment.__proto__.__proto__;
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
trackWithMetadata = defaultImport.trackWithMetadata;
MEMBER_LIST_SWIPE_PEEK = AnalyticEvents.MEMBER_LIST_SWIPE_PEEK;
object = {channel_id: env0_0};
object.screen_index = global.String(require);
Reflect.apply(trackWithMetadata, defaultImport, [MEMBER_LIST_SWIPE_PEEK, object]);
}
}
function _default_113501OnAccessibilityEscape() { // fn#113533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:7319, owner: _default_113501.onAccessibilityEscape, offset: 0x023fdd32, size: 28 bytes, params: 1, frame: 9
if (isBackEnabled) {
env0_15.goBack();
}
}
function _fun113503() { // fn#113503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2747, offset: 0x023fd2d6, size: 20 bytes, params: 1, frame: 11
env1_5(channelId);
}
function _fun113518() { // fn#113518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4255, offset: 0x023fd5a2, size: 99 bytes, params: 1, frame: 19
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
let unsubscribe = ComponentDispatch.unsubscribe;
const SHOW_CHANNEL_DETAILS = ComponentActions.SHOW_CHANNEL_DETAILS;
Reflect.apply(unsubscribe, ComponentDispatch, [SHOW_CHANNEL_DETAILS, env1_13]);
unsubscribe = ComponentDispatch.unsubscribe;
const HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
Reflect.apply(unsubscribe, ComponentDispatch, [HIDE_CHANNEL_DETAILS, env1_14]);
}
function _fun113522() { // fn#113522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5395, offset: 0x023fd883, size: 95 bytes, params: 1, frame: 17
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const MEMBER_LIST_SWIPE_TOGGLED = AnalyticEvents.MEMBER_LIST_SWIPE_TOGGLED;
const object2 = {};
object2.channel_id = env0_0;
const String = global.String;
object2.screen_index = String(require);
object2.member_list_open = importAll;
Reflect.apply(trackWithMetadata, defaultImport, [MEMBER_LIST_SWIPE_TOGGLED, object2]);
}
function _fun113523() { // fn#113523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5537, offset: 0x023fd8e2, size: 109 bytes, params: 1, frame: 16
var value3;
var defaultImport;
var trackWithMetadata;
var MEMBER_LIST_SWIPE_PEEK;
var object2;
if (importAll && importDefault.get()) {
value3 = environment.__proto__.__proto__;
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
trackWithMetadata = defaultImport.trackWithMetadata;
MEMBER_LIST_SWIPE_PEEK = AnalyticEvents.MEMBER_LIST_SWIPE_PEEK;
object2 = {channel_id: env0_0};
object2.screen_index = global.String(require);
Reflect.apply(trackWithMetadata, defaultImport, [MEMBER_LIST_SWIPE_PEEK, object2]);
}
}
function _fun113525() { // fn#113525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5993, offset: 0x023fdb63, size: 60 bytes, params: 1, frame: 14
return gesture == null ? env0_0.simultaneousWithExternalGesture(gesture) : env0_0.simultaneousWithExternalGesture(gesture,
gesture);
}
function useGestureCompositionEffectU() { // fn#113526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6131, owner: _default_113501.useGestureCompositionEffect.u, offset: 0x023fdb9f, size: 24 bytes, params: 1, frame: 9
return require.get() > 0;
}
function useGestureCompositionEffectC(a0, a1) { // fn#113527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6239, owner: _default_113501.useGestureCompositionEffect.c, offset: 0x023fdbb7, size: 74 bytes, params: 3, frame: 12
if (a0 !== a1) {
disallowGesture.set(a0);
if (disallowGesture != null) {
disallowGesture.set(a0);
}
if (!a0) {
disallowGesture.set(false);
function useGestureCompositionEffect(a0, a1, {disallowGesture}) { // fn#113524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5679, owner: _default_113501.useGestureCompositionEffect, offset: 0x023fd94f, size: 532 bytes, params: 4, frame: 27
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const binding = env1_4;
let useContext = binding.useContext;
const {gesture, disallowGesture, translateX} = Reflect.apply(useContext, binding,
[MainTabsNavigatorPanelContext]);
useContext = binding.useContext;
const MainTabsChannelScreenStackContext = (MainTabsNavigatorPanelContextModule).MainTabsChannelScreenStackContext;
const r2 = Reflect.apply(useContext, binding, [MainTabsChannelScreenStackContext]) ?? ({});
const gesture2 = r2.gesture;
const disallowGesture2 = r2.disallowGesture;
const translateX2 = r2.translateX;
const isChatLockedOpen = (UseChatLayout)().isChatLockedOpen;
const value4 = env1_4.useMemo(_fun113525, [a0, gesture, gesture2]);
let useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
let closure = useGestureCompositionEffectU;
closure.__closure = {shownPixels: a1};
closure.__workletHash = 15116046915956;
closure.__initData = env1_18;
const useGestureCompositionEffectC2 = useGestureCompositionEffectC;
useGestureCompositionEffectC2.__closure = {mainDisallowGesture: disallowGesture,
stackDisallowGesture: disallowGesture2, panelDisallowGesture: disallowGesture};
useGestureCompositionEffectC2.__workletHash = 13681610289748;
useGestureCompositionEffectC2.__initData = env1_19;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useGestureCompositionEffectC2]);
useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useGestureCompositionEffect_;
closure.__closure = {isChatLockedOpen: isChatLockedOpen, mainTranslateX: translateX, stackTranslateX: translateX2};
closure.__workletHash = 11938850302839;
closure.__initData = env1_20;
const useGestureCompositionEffectH2 = useGestureCompositionEffectH;
useGestureCompositionEffectH2.__closure = {panelDisallowGesture: disallowGesture};
useGestureCompositionEffectH2.__workletHash = 3362957347102;
useGestureCompositionEffectH2.__initData = env1_21;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useGestureCompositionEffectH2]);
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(function() {
disallowGesture.set(false);
disallowGesture.set(false);
if (disallowGesture != null) {
disallowGesture.set(false);
}
});
return value4;
function _fun113525() { // fn#113525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5993, offset: 0x023fdb63, size: 60 bytes, params: 1, frame: 14
return gesture == null ? env0_0.simultaneousWithExternalGesture(gesture) : env0_0.simultaneousWithExternalGesture(gesture,
gesture);
}
function useGestureCompositionEffectU() { // fn#113526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6131, owner: _default_113501.useGestureCompositionEffect.u, offset: 0x023fdb9f, size: 24 bytes, params: 1, frame: 9
return require.get() > 0;
}
function useGestureCompositionEffectC(a0, a1) { // fn#113527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6239, owner: _default_113501.useGestureCompositionEffect.c, offset: 0x023fdbb7, size: 74 bytes, params: 3, frame: 12
if (a0 !== a1) {
disallowGesture.set(a0);
if (disallowGesture != null) {
disallowGesture.set(a0);
}
if (!a0) {
disallowGesture.set(false);
}
}
}
function useGestureCompositionEffect_() { // fn#113528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6466, owner: _default_113501.useGestureCompositionEffect._, offset: 0x023fdc01, size: 72 bytes, params: 1, frame: 11
var r1;
var value5;
var value;
let r0 = !isChatLockedOpen && translateX.get() > 0;
if (!r0) {
value5 = translateX != null;
if (value5) {
value = translateX.get();
value = value > 0;
r1 = value;
} else {
r1 = value5;
}
r0 = r1;
}
return r0;
}
function useGestureCompositionEffectH(a0, a1) { // fn#113529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6637, owner: _default_113501.useGestureCompositionEffect.h, offset: 0x023fdc49, size: 31 bytes, params: 3, frame: 11
if (a0 !== a1) {
disallowGesture.set(a0);
}
}
}
}
}
function useGestureCompositionEffect_() { // fn#113528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6466, owner: _default_113501.useGestureCompositionEffect._, offset: 0x023fdc01, size: 72 bytes, params: 1, frame: 11
var r1;
var value5;
var value;
let r0 = !isChatLockedOpen && translateX.get() > 0;
if (!r0) {
value5 = translateX != null;
if (value5) {
value = translateX.get();
value = value > 0;
r1 = value;
} else {
r1 = value5;
function _fun113531() { // fn#113531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6851, offset: 0x023fdca5, size: 59 bytes, params: 1, frame: 13
const object = {};
copyDataProperties(object, panelGestureContext, undefined);
object['channelId'] = channelId;
object['screenIndex'] = screenIndex;
object['isPanelActive'] = ConstantsModule.ThemeTypes;
return object;
}
function _default_113501Le() { // fn#113532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:7005, owner: _default_113501.le, offset: 0x023fdce0, size: 82 bytes, params: 1, frame: 12
var value;
const value3 = ConstantsModule.ComponentActions.get() > 300;
const object = {};
let r1 = value3 ? 'none' : 'flex';
object.display = r1;
if (value3) {
r1 = 0;
} else {
value = ConstantsModule.ComponentActions.get();
value = 1 - value / 150;
r1 = value;
}
object.opacity = r1;
return object;
}
function _default_113501OnAccessibilityEscape() { // fn#113533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:7319, owner: _default_113501.onAccessibilityEscape, offset: 0x023fdd32, size: 28 bytes, params: 1, frame: 9
if (isBackEnabled) {
env0_15.goBack();
}
}
r0 = r1;
}
return r0;
}
function useGestureCompositionEffectH(a0, a1) { // fn#113529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6637, owner: _default_113501.useGestureCompositionEffect.h, offset: 0x023fdc49, size: 31 bytes, params: 3, frame: 11
if (a0 !== a1) {
disallowGesture.set(a0);
}
}
global.__d(_fun113500, 15015, [57, 31, 27, 9613, 9604, 661, 33, 3, 4501, 697, 4863, 14368, 4010, 4017, 4594, 4048,
5459, 4015, 11335, 1239, 14364, 8621, 12080, 4008, 4007, 4571, 1485, 14958, 5321, 14954, 7704, 6517, 15016,
2]) /* metro module 15015, dependencies: [57, 31, 27, 9613, 9604, 661, 33, 3, 4501, 697, 4863, 14368, 4010, 4017, 4594, 4048, 5459, 4015, 11335, 1239, 14364, 8621, 12080, 4008, 4007, 4571, 1485, 14958, 5321, 14954, 7704, 6517, 15016, 2] */;
@@ -1,38 +1,53 @@
/* Metro module 9709; source: modules/main_tabs_v2/native/channel/header/ChannelHeader.tsx; dependencies: [31, 1379, 661, 1386, 33, 477, 4015, 9690, 1239, 4008, 632, 5072, 9710, 9712, 9714, 9721, 1244, 9723, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelConstantsModule from '../../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
function _fun76307(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:6, offset: 0x01dc9d7f, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ChannelHeader.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ChannelHeader.tsx');
exports.default = ChannelHeader;
exports.navigateToChannelDetails = navigateToChannelDetails;
}
function ChannelHeader({channelId, screenIndex, isNavigationScreen, pressable, isGuildMemberCountVisible, showCreateThread}) { // fn#76308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:289, offset: 0x01dc9e52, size: 575 bytes, params: 2, frame: 24
var r0;
var defaultImport2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = undefined;
pressable = pressable === value || pressable;
isGuildMemberCountVisible = isGuildMemberCountVisible === value || isGuildMemberCountVisible;
showCreateThread = !(showCreateThread === value) && showCreateThread;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
const r7 = !(require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel) && pressable;
const ROLE_SUBSCRIPTIONS = StaticChannelRoute.ROLE_SUBSCRIPTIONS;
if (channelId === ROLE_SUBSCRIPTIONS) {
r0 = ((Component) => <Component />)(importDefault(9710) /* metro dependency 9710: GuildRoleSubscriptionsChannelHeader */);
} else if (channelId === StaticChannelRoute.GUILD_HOME) {
r0 = ((Component) => <Component />)(importDefault(9712) /* metro dependency 9712: HomeChannelHeader */);
} else if (channel == null) {
if (channel == null) {
function ChannelHeader({channelId, screenIndex, isNavigationScreen, pressable, isGuildMemberCountVisible, showCreateThread}) { // fn#76308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:289, offset: 0x01dc9e52, size: 575 bytes, params: 2, frame: 24
var r0;
var defaultImport2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = undefined;
pressable = pressable === value || pressable;
isGuildMemberCountVisible = isGuildMemberCountVisible === value || isGuildMemberCountVisible;
showCreateThread = !(showCreateThread === value) && showCreateThread;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
const r7 = !(require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel) && pressable;
const ROLE_SUBSCRIPTIONS = StaticChannelRoute.ROLE_SUBSCRIPTIONS;
if (channelId === ROLE_SUBSCRIPTIONS) {
r0 = ((Component) => <Component />)(importDefault(9710) /* metro dependency 9710: GuildRoleSubscriptionsChannelHeader */);
} else if (channelId === StaticChannelRoute.GUILD_HOME) {
r0 = ((Component) => <Component />)(importDefault(9712) /* metro dependency 9712: HomeChannelHeader */);
} else if (channel == null) {
if (channel == null) {
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
r0 = value;
} else if (channel.isForumLikeChannel()) {
defaultImport2 = importDefault(9721) /* metro dependency 9721: ForumChannelHeader */;
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} searchPlaceholder={channel.isForumChannel() ? value : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['L9fR+P'])} />)(defaultImport2);
r0 = value;
} else {
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
r0 = value;
}
} else if (channel.isPrivate()) {
r0 = ((Component) => <Component channelId={channelId} pressable={r7} screenIndex={screenIndex} />)(importDefault(9714) /* metro dependency 9714: PrivateChannelHeader */);
} else if (channel == null) {
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
r0 = value;
} else if (channel.isForumLikeChannel()) {
@@ -43,42 +58,33 @@ function ChannelHeader({channelId, screenIndex, isNavigationScreen, pressable, i
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
r0 = value;
}
} else if (channel.isPrivate()) {
r0 = ((Component) => <Component channelId={channelId} pressable={r7} screenIndex={screenIndex} />)(importDefault(9714) /* metro dependency 9714: PrivateChannelHeader */);
} else if (channel == null) {
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
r0 = value;
} else if (channel.isForumLikeChannel()) {
defaultImport2 = importDefault(9721) /* metro dependency 9721: ForumChannelHeader */;
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} searchPlaceholder={channel.isForumChannel() ? value : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['L9fR+P'])} />)(defaultImport2);
r0 = value;
} else {
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
r0 = value;
return r0;
}
return r0;
}
function navigateToChannelDetails(a0, a1, a2) { // fn#76310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:1124, offset: 0x01dca091, size: 266 bytes, params: 4, frame: 20
var chatInputRef;
var ComponentDispatch;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
chatInputRef = (require(4015) /* metro dependency 4015: ChatInputUtils */).getChatInputRef(a0, a1);
if (chatInputRef != null) {
chatInputRef.blur();
function navigateToChannelDetails(a0, a1, a2) { // fn#76310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:1124, offset: 0x01dca091, size: 266 bytes, params: 4, frame: 20
var chatInputRef;
var ComponentDispatch;
var value;
if (PlatformUtilsModule.isIOS()) {
chatInputRef = (require(4015) /* metro dependency 4015: ChatInputUtils */).getChatInputRef(a0, a1);
if (chatInputRef != null) {
chatInputRef.blur();
}
}
}
if ((require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).isSwipeToMemberListEnabled()) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SHOW_CHANNEL_DETAILS, {source: a2, channelId: a0, screenIndex: a1});
} else {
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null && value.isReady()) {
value.navigate('sidebar', {channelId: a0, source: a2});
if ((require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).isSwipeToMemberListEnabled()) {
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SHOW_CHANNEL_DETAILS, {source: a2, channelId: a0, screenIndex: a1});
} else {
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null && value.isReady()) {
value.navigate('sidebar', {channelId: a0, source: a2});
}
}
}
}
global.__d(_fun76307, 9709, [31, 1379, 661, 1386, 33, 477, 4015, 9690, 1239, 4008, 632, 5072, 9710, 9712, 9714,
9721, 1244, 9723,
2]) /* metro module 9709, dependencies: [31, 1379, 661, 1386, 33, 477, 4015, 9690, 1239, 4008, 632, 5072, 9710, 9712, 9714, 9721, 1244, 9723, 2] */;
@@ -1,308 +1,363 @@
/* Metro module 9717; source: modules/main_tabs_v2/native/channel/header/ChannelHeaderShared.tsx; dependencies: [57, 31, 27, 3793, 1878, 9604, 33, 4501, 697, 1357, 5278, 477, 8696, 4573, 1305, 9718, 9719, 6647, 9720, 1244, 4805, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MobileVisualRefreshExperiment from '../../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GroupDMAvatar from '../../../../group_dm/native/GroupDMAvatar.tsx'; /* Metro dependency 9719 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseChannelNameModule from '../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as ChannelUtilsModule from '../../../../../utils/native/ChannelUtils.tsx'; /* Metro dependency 6647 */
import * as MainTabsV2ConstantsModule from '../../shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
function _fun76344(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:6, offset: 0x01dcb930, size: 483 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = renderChannelIconRaw;
const renderChannelIconRaw2 = renderChannelIconRaw;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_8 = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).getMinHeaderHeight;
const value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun76356);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ChannelHeaderShared.tsx');
const env0_12 = (CreateStylesModule).createStyles(_fun76356);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ChannelHeaderShared.tsx');
exports.renderTitleWrapper = renderTitleWrapper;
exports.renderChannelTitle = renderChannelTitle;
exports.renderGroupDMIcon = renderGroupDMIcon;
exports.renderUserAvatar = renderUserAvatar;
exports.renderChannelIconRaw = closure;
exports.renderChannelIconRaw = renderChannelIconRaw2;
exports.renderChannelIcon = renderChannelIcon;
exports.renderMemberCountText = renderMemberCountText;
exports.renderParentChannelSubTitle = renderParentChannelSubTitle;
exports.renderEmptyIcon = renderEmptyIcon;
}
function TitleWrapper({children, onPress, headerAccessibilityLabel, titleContentHeight}) { // fn#76345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:971, offset: 0x01dcbb13, size: 337 bytes, params: 2, frame: 24
var r0;
var PressableOpacity;
var value;
const styles = useStyles((MobileVisualRefreshExperiment)('ChannelHeaderShared'));
let binding = ReactModule;
const [property, env0_1] = Module00057(binding.useState(undefined), 2);
const value6 = ReactModule.useCallback(_fun76346, []);
binding = ReactModule;
const useMemo = binding.useMemo;
if (onPress == null) {
r0 = (
<View style={styles.wrapper} accessibilityRole="header">
{children}
</View>
);
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = (
<PressableOpacity
onLayout={value.isAndroid() ? value6 : undefined}
onPress={onPress}
androidRippleConfig={property}
accessibilityRole="header"
accessibilityLabel={headerAccessibilityLabel}
hitSlop={Reflect.apply(useMemo, binding, [_fun76347, [titleContentHeight]])}
style={styles.wrapper}
>
{children}
</PressableOpacity>
);
r0 = value;
}
return r0;
function _fun76346({nativeEvent}) { // fn#76346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1170, offset: 0x01dcbc64, size: 50 bytes, params: 2, frame: 12
env0_1({borderless: true, radius: nativeEvent.layout.width});
}
function _fun76347() { // fn#76347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1250, offset: 0x01dcbc96, size: 85 bytes, params: 1, frame: 15
var Math;
var max;
var value2;
var value;
if (titleContentHeight != null) {
Math = global.Math;
max = Math.max;
value2 = environment.__proto__;
value = Reflect.apply(max, Math, [0, (getMinHeaderHeight('ChannelHeaderShared') - titleContentHeight) / 2]);
return {top: value, bottom: value};
}
}
function TitleWrapper({children, onPress, headerAccessibilityLabel, titleContentHeight}) { // fn#76345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:971, offset: 0x01dcbb13, size: 337 bytes, params: 2, frame: 24
var r0;
var PressableOpacity;
var value;
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
let binding = env0_4;
const [property, env0_1] = env0_3(binding.useState(undefined), 2);
const value6 = env0_4.useCallback(_fun76346, []);
binding = env0_4;
const useMemo = binding.useMemo;
if (onPress == null) {
r0 = <View style={styles.wrapper} accessibilityRole="header">{children}</View>;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = <PressableOpacity onLayout={value.isAndroid() ? value6 : undefined} onPress={onPress} androidRippleConfig={property} accessibilityRole="header" accessibilityLabel={headerAccessibilityLabel} hitSlop={Reflect.apply(useMemo,
binding, [_fun76347, [titleContentHeight]])} style={styles.wrapper}>{children}</PressableOpacity>;
r0 = value;
}
return r0;
}
function ChannelTitle({title, accessibleTitle, subtitle, disableArrow, userId, guildId, icon}) { // fn#76348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1610, offset: 0x01dcbceb, size: 550 bytes, params: 2, frame: 32
disableArrow = !(disableArrow === undefined) && disableArrow;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelTitle');
const styles = useStyles(value2);
const items2 = [value2 && icon != null ? icon : null];
items2[1] = userId != null ? ((Component) => <Component userId={userId} guildId={guildId} userName={title} variant={value2 ? 'redesign/heading-18/semibold' : 'heading-lg/bold'} defaultColor="mobile-text-heading-primary" lineClamp={1} style={styles.channelName} accessibilityLabel={accessibleTitle} accessibilityRole="header" maxFontSizeMultiplier={2} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */) : ((Text) => <Text variant={value2 ? 'redesign/heading-18/semibold' : 'heading-lg/bold'} color="mobile-text-heading-primary" lineClamp={1} style={styles.channelName} accessibilityLabel={accessibleTitle} accessibilityRole="header" maxFontSizeMultiplier={2}>{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items2[2] = !disableArrow && ((Icon) => <Icon source={importDefault(9718) /* metro dependency 9718 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} style={styles.arrowIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
return (
<View style={styles.channelContent}>
<View style={styles.nameWithArrow}>
{items2}
function ChannelTitle({title, accessibleTitle, subtitle, disableArrow, userId, guildId, icon}) { // fn#76348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1610, offset: 0x01dcbceb, size: 550 bytes, params: 2, frame: 32
disableArrow = !(disableArrow === undefined) && disableArrow;
const value2 = (MobileVisualRefreshExperiment)('ChannelTitle');
const styles = useStyles(value2);
const items2 = [value2 && icon != null ? icon : null];
items2[1] = (
userId != null
? ((Component) => <Component userId={userId} guildId={guildId} userName={title} variant={value2 ? 'redesign/heading-18/semibold' : 'heading-lg/bold'} defaultColor="mobile-text-heading-primary" lineClamp={1} style={styles.channelName} accessibilityLabel={accessibleTitle} accessibilityRole="header" maxFontSizeMultiplier={2} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)
: ((Text) => <Text variant={value2 ? 'redesign/heading-18/semibold' : 'heading-lg/bold'} color="mobile-text-heading-primary" lineClamp={1} style={styles.channelName} accessibilityLabel={accessibleTitle} accessibilityRole="header" maxFontSizeMultiplier={2}>{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
);
items2[2] = !disableArrow && ((Icon) => <Icon source={importDefault(9718) /* metro dependency 9718 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} style={styles.arrowIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
return (
<View style={styles.channelContent}>
<View style={styles.nameWithArrow}>
{items2}
</View>
{subtitle != null && <View style={styles.subTitleContainer}>{subtitle}</View>}
</View>
{subtitle != null && <View style={styles.subTitleContainer}>{subtitle}</View>}
</View>
);
}
function GroupDMIcon({channel}) { // fn#76349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:2498, offset: 0x01dcbf11, size: 125 bytes, params: 2, frame: 18
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
const GroupDMAvatar = importDefault(9719) /* metro dependency 9719: GroupDMAvatar */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<GroupDMAvatar
size={REFRESH_MEDIUM_32}
channel={channel}
style={styles.channelIcon}
/>
);
}
function UserAvatar({user, status, isMobileOnline, isVROnline}) { // fn#76350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:2671, offset: 0x01dcbf8e, size: 199 bytes, params: 2, frame: 22
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarDecoration = user.avatarDecoration;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<Avatar
user={user}
avatarDecoration={avatarDecoration}
guildId={undefined}
size={REFRESH_MEDIUM_32}
status={user.isSystemUser() ? null : status}
isMobileOnline={isMobileOnline}
isVROnline={isVROnline}
style={styles.channelIcon}
autoStatusCutout
/>
);
}
function renderChannelIconRaw(a0, a1) { // fn#76351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3015, offset: 0x01dcc055, size: 37 bytes, params: 3, frame: 13
return <ChannelIconRaw icon={a0} IconComponent={a1} />;
}
function ChannelIconRaw({icon, IconComponent}) { // fn#76352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3100, offset: 0x01dcc07a, size: 223 bytes, params: 2, frame: 21
var r5;
var r0;
var object2;
var value;
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared');
const styles = useStyles(value3);
if (IconComponent != null) {
object2 = {};
value = 'md';
r5 = value3 ? 'xs' : value;
object2.size = r5;
value = 'text-strong';
r5 = value3 ? 'icon-strong' : value;
object2.color = r5;
r5 = value3 ? {marginEnd: 4} : undefined;
object2.style = r5;
value = <IconComponent {...object2} />;
r0 = value;
} else {
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
r0 = <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} source={icon} color={styles.guildChannelIcon.tintColor} />;
);
}
return r0;
}
function MemberCountText({presenceCount, memberCount, withSeparator}) { // fn#76353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3395, offset: 0x01dcc159, size: 285 bytes, params: 2, frame: 24
var r9;
var r5;
var Text;
var object;
var value;
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared');
const value4 = 'online';
const r11 = presenceCount !== 0 || memberCount === null ? value4 : 'total';
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const value9 = ((Component) => <Component type={r11} count={(value4 !== r11 ? memberCount : presenceCount) ?? undefined} color={value3 ? 'text-subtle' : 'text-muted'} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */);
if (withSeparator) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object = {};
value = 'text-xs/medium';
r9 = value3 ? 'text-sm/normal' : value;
object.variant = r9;
value = 'border-subtle';
r9 = value3 ? 'text-subtle' : value;
object.color = r9;
value = <Text {...object}>{'•'}</Text>;
r5 = value;
} else {
r5 = null;
function GroupDMIcon({channel}) { // fn#76349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:2498, offset: 0x01dcbf11, size: 125 bytes, params: 2, frame: 18
const styles = useStyles((MobileVisualRefreshExperiment)('ChannelHeaderShared'));
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<GroupDMAvatar
size={REFRESH_MEDIUM_32}
channel={channel}
style={styles.channelIcon}
/>
);
}
return (
<>
{value9}
{r5}
</>
);
}
function ParentChannelSubTitle({channel}) { // fn#76354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3789, offset: 0x01dcc276, size: 284 bytes, params: 2, frame: 27
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared');
const styles = useStyles(value2);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const BjYvHO = (require(1244) /* metro dependency 1244: indexNative */).t.BjYvHO;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const moduleValue2 = useChannelNameModule;
return (
<Text
lineClamp={1}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [BjYvHO,
{channelName: useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore)}])}
maxFontSizeMultiplier={2}
variant={value2 ? 'text-sm/medium' : 'text-xs/medium'}
color={value2 ? 'text-subtle' : 'text-muted'}
style={styles.parentChannelName}
>
{moduleValue2.computeChannelName(channel, UserStore, RelationshipStore)}
</Text>
);
}
function EmptyIcon() { // fn#76355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4209, offset: 0x01dcc392, size: 73 bytes, params: 1, frame: 14
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
return <View style={styles.channelIconWrapper} />;
}
function _fun76356(a0) { // fn#76356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:244, offset: 0x01dcc3db, size: 291 bytes, params: 2, frame: 17
const object2 = {wrapper: {'flex': 1, 'alignItems': 'center', 'flexShrink': 1, 'flexDirection': 'row',
'paddingEnd': 8}};
object2.channelContent = {'flex': 1, 'flexShrink': 1, 'justifyContent': 'center', marginTop: a0 ? 4 : undefined};
object2.nameWithArrow = {'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1};
const object4 = {flexShrink: 1};
copyDataProperties(object4, a0 ? {} : {'fontSize': 18, 'lineHeight': 24}, undefined);
object2.channelName = object4;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.arrowIcon = {'tintColor': null, 'flexShrink': 0, 'flexGrow': 0, 'marginTop': 2, 'marginLeft': 2,
tintColor: INTERACTIVE_TEXT_DEFAULT};
object2.channelIcon = {'marginRight': 12, 'flexShrink': 0};
object2.channelIconWrapper = {'width': 32, 'height': 32, 'justifyContent': 'center', 'alignItems': 'center'};
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.guildChannelIcon = {tintColor: TEXT_STRONG};
object2.subTitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'marginBottom': 4};
object2.parentChannelName = {'lineHeight': 16, 'flexShrink': 1};
return object2;
}
function renderTitleWrapper(a0, a1, a2, a3) { // fn#76357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4437, offset: 0x01dcc4fe, size: 53 bytes, params: 5, frame: 13
return (
<TitleWrapper
onPress={a1}
headerAccessibilityLabel={a2}
titleContentHeight={a3}
>
{a0}
</TitleWrapper>
);
}
function renderChannelTitle(a0) { // fn#76358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4590, offset: 0x01dcc533, size: 109 bytes, params: 2, frame: 20
const value = a1;
const r0 = value !== undefined ? value : {};
const accessibleTitle = r0.accessibleTitle;
const subtitle = r0.subtitle;
const disableArrow = r0.disableArrow;
const r7 = disableArrow !== undefined && disableArrow;
const userId = r0.userId;
return (
<ChannelTitle
title={a0}
accessibleTitle={accessibleTitle}
subtitle={subtitle}
disableArrow={r7}
userId={userId}
guildId={r0.guildId}
icon={r0.icon}
/>
);
}
function renderGroupDMIcon(a0) { // fn#76359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4852, offset: 0x01dcc5a0, size: 30 bytes, params: 2, frame: 13
return <GroupDMIcon channel={a0} />;
}
function renderUserAvatar(a0, a1, a2, a3) { // fn#76360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4936, offset: 0x01dcc5be, size: 53 bytes, params: 5, frame: 13
return (
<UserAvatar
user={a0}
status={a1}
isMobileOnline={a2}
isVROnline={a3}
/>
);
}
function renderChannelIcon(a0, a1) { // fn#76361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5105, offset: 0x01dcc5f3, size: 109 bytes, params: 3, frame: 19
const renderChannelIconRawBinding = renderChannelIconRaw;
const value = undefined;
const channelIconWithGuild = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(a0,
a1);
const channelUtilsModule = require(6647) /* metro dependency 6647: ChannelUtils */;
const getChannelIconComponent = channelUtilsModule.getChannelIconComponent;
return renderChannelIconRawBinding(channelIconWithGuild, Reflect.apply(getChannelIconComponent, channelUtilsModule,
[a0, {isRulesChannel: (a1 == null ? value : a1.rulesChannelId) === a0.id}]));
}
function renderMemberCountText(a0, a1) { // fn#76362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5323, offset: 0x01dcc660, size: 68 bytes, params: 3, frame: 17
let value = a2;
const r5 = value !== undefined ? value : false;
value = null;
return value != a0 ? <MemberCountText presenceCount={a0} memberCount={a1} withSeparator={r5} /> : value == a1 ? value : <MemberCountText presenceCount={a0} memberCount={a1} withSeparator={r5} />;
}
function renderParentChannelSubTitle(a0) { // fn#76363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5491, offset: 0x01dcc6a4, size: 30 bytes, params: 2, frame: 13
return <ParentChannelSubTitle channel={a0} />;
}
function renderEmptyIcon() { // fn#76364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5594, offset: 0x01dcc6c2, size: 23 bytes, params: 1, frame: 13
return <EmptyIcon />;
}
function _fun76346({nativeEvent}) { // fn#76346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1170, offset: 0x01dcbc64, size: 50 bytes, params: 2, frame: 12
env0_1({borderless: true, radius: nativeEvent.layout.width});
}
function _fun76347() { // fn#76347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1250, offset: 0x01dcbc96, size: 85 bytes, params: 1, frame: 15
var Math;
var max;
var value2;
var value;
if (titleContentHeight != null) {
Math = global.Math;
max = Math.max;
value2 = environment.__proto__;
value = Reflect.apply(max, Math, [0, (getMinHeaderHeight('ChannelHeaderShared') - titleContentHeight) / 2]);
return {top: value, bottom: value};
function UserAvatar({user, status, isMobileOnline, isVROnline}) { // fn#76350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:2671, offset: 0x01dcbf8e, size: 199 bytes, params: 2, frame: 22
const styles = useStyles((MobileVisualRefreshExperiment)('ChannelHeaderShared'));
const Avatar = (NativeModule).Avatar;
const avatarDecoration = user.avatarDecoration;
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<Avatar
user={user}
avatarDecoration={avatarDecoration}
guildId={undefined}
size={REFRESH_MEDIUM_32}
status={user.isSystemUser() ? null : status}
isMobileOnline={isMobileOnline}
isVROnline={isVROnline}
style={styles.channelIcon}
autoStatusCutout
/>
);
}
function renderChannelIconRaw(a0, a1) { // fn#76351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3015, offset: 0x01dcc055, size: 37 bytes, params: 3, frame: 13
return <ChannelIconRaw icon={a0} IconComponent={a1} />;
}
function ChannelIconRaw({icon, IconComponent}) { // fn#76352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3100, offset: 0x01dcc07a, size: 223 bytes, params: 2, frame: 21
var r5;
var r0;
var object;
var value;
const value3 = (MobileVisualRefreshExperiment)('ChannelHeaderShared');
const styles = useStyles(value3);
if (IconComponent != null) {
object = {};
value = 'md';
r5 = value3 ? 'xs' : value;
object.size = r5;
value = 'text-strong';
r5 = value3 ? 'icon-strong' : value;
object.color = r5;
r5 = value3 ? {marginEnd: 4} : undefined;
object.style = r5;
value = <IconComponent {...object} />;
r0 = value;
} else {
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
r0 = (
<Icon
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20}
source={icon}
color={styles.guildChannelIcon.tintColor}
/>
);
}
return r0;
}
function MemberCountText({presenceCount, memberCount, withSeparator}) { // fn#76353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3395, offset: 0x01dcc159, size: 285 bytes, params: 2, frame: 24
var r9;
var r5;
var Text;
var object2;
var value;
const value3 = (MobileVisualRefreshExperiment)('ChannelHeaderShared');
const value4 = 'online';
const r11 = presenceCount !== 0 || memberCount === null ? value4 : 'total';
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const value9 = ((Component) => <Component type={r11} count={(value4 !== r11 ? memberCount : presenceCount) ?? undefined} color={value3 ? 'text-subtle' : 'text-muted'} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */);
if (withSeparator) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2 = {};
value = 'text-xs/medium';
r9 = value3 ? 'text-sm/normal' : value;
object2.variant = r9;
value = 'border-subtle';
r9 = value3 ? 'text-subtle' : value;
object2.color = r9;
value = (
<Text {...object2}>
{'•'}
</Text>
);
r5 = value;
} else {
r5 = null;
}
return (
<>
{value9}
{r5}
</>
);
}
function ParentChannelSubTitle({channel}) { // fn#76354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3789, offset: 0x01dcc276, size: 284 bytes, params: 2, frame: 27
const value2 = (MobileVisualRefreshExperiment)('ChannelHeaderShared');
const styles = useStyles(value2);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const BjYvHO = (IndexNativeModule).t.BjYvHO;
return (
<Text
lineClamp={1}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [BjYvHO,
{channelName: UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore)}])}
maxFontSizeMultiplier={2}
variant={value2 ? 'text-sm/medium' : 'text-xs/medium'}
color={value2 ? 'text-subtle' : 'text-muted'}
style={styles.parentChannelName}
>
{UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore)}
</Text>
);
}
function EmptyIcon() { // fn#76355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4209, offset: 0x01dcc392, size: 73 bytes, params: 1, frame: 14
const styles = useStyles((MobileVisualRefreshExperiment)('ChannelHeaderShared'));
return <View style={styles.channelIconWrapper} />;
}
function _fun76356(a0) { // fn#76356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:244, offset: 0x01dcc3db, size: 291 bytes, params: 2, frame: 17
const object = {wrapper: {'flex': 1, 'alignItems': 'center', 'flexShrink': 1, 'flexDirection': 'row',
'paddingEnd': 8}};
object.channelContent = {'flex': 1, 'flexShrink': 1, 'justifyContent': 'center', marginTop: a0 ? 4 : undefined};
object.nameWithArrow = {'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1};
const object3 = {flexShrink: 1};
copyDataProperties(object3, a0 ? {} : {'fontSize': 18, 'lineHeight': 24}, undefined);
object.channelName = object3;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object.arrowIcon = {'tintColor': null, 'flexShrink': 0, 'flexGrow': 0, 'marginTop': 2, 'marginLeft': 2,
tintColor: INTERACTIVE_TEXT_DEFAULT};
object.channelIcon = {'marginRight': 12, 'flexShrink': 0};
object.channelIconWrapper = {'width': 32, 'height': 32, 'justifyContent': 'center', 'alignItems': 'center'};
const TEXT_STRONG = (Native).colors.TEXT_STRONG;
object.guildChannelIcon = {tintColor: TEXT_STRONG};
object.subTitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'marginBottom': 4};
object.parentChannelName = {'lineHeight': 16, 'flexShrink': 1};
return object;
}
function renderTitleWrapper(a0, a1, a2, a3) { // fn#76357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4437, offset: 0x01dcc4fe, size: 53 bytes, params: 5, frame: 13
return (
<TitleWrapper
onPress={a1}
headerAccessibilityLabel={a2}
titleContentHeight={a3}
>
{a0}
</TitleWrapper>
);
}
function renderChannelTitle(a0) { // fn#76358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4590, offset: 0x01dcc533, size: 109 bytes, params: 2, frame: 20
const value = a1;
const r0 = value !== undefined ? value : {};
const accessibleTitle = r0.accessibleTitle;
const subtitle = r0.subtitle;
const disableArrow = r0.disableArrow;
const r7 = disableArrow !== undefined && disableArrow;
const userId = r0.userId;
return (
<ChannelTitle
title={a0}
accessibleTitle={accessibleTitle}
subtitle={subtitle}
disableArrow={r7}
userId={userId}
guildId={r0.guildId}
icon={r0.icon}
/>
);
}
function renderGroupDMIcon(a0) { // fn#76359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4852, offset: 0x01dcc5a0, size: 30 bytes, params: 2, frame: 13
return <GroupDMIcon channel={a0} />;
}
function renderUserAvatar(a0, a1, a2, a3) { // fn#76360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4936, offset: 0x01dcc5be, size: 53 bytes, params: 5, frame: 13
return (
<UserAvatar
user={a0}
status={a1}
isMobileOnline={a2}
isVROnline={a3}
/>
);
}
function renderChannelIcon(a0, a1) { // fn#76361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5105, offset: 0x01dcc5f3, size: 109 bytes, params: 3, frame: 19
const renderChannelIconRawBinding = renderChannelIconRaw;
const value = undefined;
const channelIconWithGuild = (ChannelUtilsModule).getChannelIconWithGuild(a0,
a1);
const getChannelIconComponent = ChannelUtilsModule.getChannelIconComponent;
return renderChannelIconRawBinding(channelIconWithGuild, Reflect.apply(getChannelIconComponent, ChannelUtilsModule,
[a0, {isRulesChannel: (a1 == null ? value : a1.rulesChannelId) === a0.id}]));
}
function renderMemberCountText(a0, a1) { // fn#76362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5323, offset: 0x01dcc660, size: 68 bytes, params: 3, frame: 17
let value = a2;
const r5 = value !== undefined ? value : false;
value = null;
return (
value != a0
? (
<MemberCountText
presenceCount={a0}
memberCount={a1}
withSeparator={r5}
/>
)
: (
value == a1
? value
: (
<MemberCountText
presenceCount={a0}
memberCount={a1}
withSeparator={r5}
/>
)
)
);
}
function renderParentChannelSubTitle(a0) { // fn#76363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5491, offset: 0x01dcc6a4, size: 30 bytes, params: 2, frame: 13
return <ParentChannelSubTitle channel={a0} />;
}
function renderEmptyIcon() { // fn#76364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5594, offset: 0x01dcc6c2, size: 23 bytes, params: 1, frame: 13
return <EmptyIcon />;
}
}
global.__d(_fun76344, 9717, [57, 31, 27, 3793, 1878, 9604, 33, 4501, 697, 1357, 5278, 477, 8696, 4573, 1305, 9718,
9719, 6647, 9720, 1244, 4805,
2]) /* metro module 9717, dependencies: [57, 31, 27, 3793, 1878, 9604, 33, 4501, 697, 1357, 5278, 477, 8696, 4573, 1305, 9718, 9719, 6647, 9720, 1244, 4805, 2] */;
@@ -1,30 +1,41 @@
/* Metro module 9721; source: modules/main_tabs_v2/native/channel/header/ForumChannelHeader.tsx; dependencies: [31, 27, 9604, 33, 4501, 9722, 9698, 9723, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as MainTabsV2ConstantsModule from '../../shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
function _fun76375(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9907:6, offset: 0x01dcd215, size: 238 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const MIN_HEADER_HEIGHT = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIN_HEADER_HEIGHT;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({search: {'flex': 1,
let value = ReactModule;
const MIN_HEADER_HEIGHT = (MainTabsV2ConstantsModule).MIN_HEADER_HEIGHT;
const env0_5 = (CreateStylesModule).createStyles({search: {'flex': 1,
'flexShrink': 1, 'flexDirection': 'row', 'alignItems': 'center', 'paddingStart': 4, height: MIN_HEADER_HEIGHT}});
value = value.memo(_fun76376);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ForumChannelHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ForumChannelHeader.tsx');
exports.default = value;
}
function _fun76376({channelId, screenIndex, guildId, pressable, isGuildMemberCountVisible, isNavigationScreen, searchPlaceholder}) { // fn#76376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9907:292, offset: 0x01dcd303, size: 227 bytes, params: 2, frame: 23
var r0;
var value;
const styles = useStyles();
if ((require(9722) /* metro dependency 9722: useIsForumChannelSearchActive */).useIsForumChannelSearchActive(channelId)) {
r0 = <View style={styles.search}>{((ForumChannelSearchInput) => <ForumChannelSearchInput channelId={channelId} guildId={guildId} placeholder={searchPlaceholder} />)((require(9698) /* metro dependency 9698: ForumChannelSearch */).ForumChannelSearchInput)}</View>;
} else {
value = importDefault(9723) /* metro dependency 9723: GuildChannelHeader */;
value = ((Component) => <Component channelId={channelId} guildId={guildId} pressable={pressable} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} />)(value);
r0 = value;
function _fun76376({channelId, screenIndex, guildId, pressable, isGuildMemberCountVisible, isNavigationScreen, searchPlaceholder}) { // fn#76376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9907:292, offset: 0x01dcd303, size: 227 bytes, params: 2, frame: 23
var r0;
var value;
const styles = useStyles();
if ((require(9722) /* metro dependency 9722: useIsForumChannelSearchActive */).useIsForumChannelSearchActive(channelId)) {
r0 = (
<View style={styles.search}>
{((ForumChannelSearchInput) => <ForumChannelSearchInput channelId={channelId} guildId={guildId} placeholder={searchPlaceholder} />)((require(9698) /* metro dependency 9698: ForumChannelSearch */).ForumChannelSearchInput)}
</View>
);
} else {
value = importDefault(9723) /* metro dependency 9723: GuildChannelHeader */;
value = ((Component) => <Component channelId={channelId} guildId={guildId} pressable={pressable} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun76375, 9721, [31, 27, 9604, 33, 4501, 9722, 9698, 9723,
2]) /* metro module 9721, dependencies: [31, 27, 9604, 33, 4501, 9722, 9698, 9723, 2] */;
@@ -1,4 +1,31 @@
/* Metro module 9723; source: modules/main_tabs_v2/native/channel/header/GuildChannelHeader.tsx; dependencies: [57, 31, 27, 9724, 4257, 1383, 6875, 1379, 4111, 1867, 3793, 1878, 661, 1376, 33, 566, 9717, 8581, 1244, 4805, 9715, 7013, 1365, 1948, 6647, 8543, 1357, 9725, 9709, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import MobileVisualRefreshExperiment from '../../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import HelpdeskUtils from '../../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildMemberCountStore from '../../../../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import GatewayConnectionStore from '../../../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import ChannelMemberStore from '../../../../../stores/ChannelMemberStore.tsx'; /* Metro dependency 6875 */
import ChannelMemberCountStore from '../../../../channel/ChannelMemberCountStore.tsx'; /* Metro dependency 9724 */
import UseGetThreadDraftSettings from '../../../../threads/useGetThreadDraftSettings.tsx'; /* Metro dependency 9725 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as ChannelRecordModule from '../../../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as UseSelectedDismissibleContentModule from '../../../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as UseCoachmarkNativeModule from '../../../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
import * as AgeGateUtilsModule from '../../../../age_gate/native/AgeGateUtils.tsx'; /* Metro dependency 8581 */
import * as ChannelHeaderSharedModule from './ChannelHeaderShared.tsx'; /* Metro dependency 9717 */
function _fun76380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:6, offset: 0x01dcd4eb, size: 477 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_76383 = function(a0, a1) {
@@ -46,385 +73,430 @@ function _fun76380(global, require, importDefault, importAll, module, exports, d
};
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 channelMemberCountStore = importDefault(9724) /* metro dependency 9724: ChannelMemberCountStore */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const env0_8 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES;
const channelMemberStore = importDefault(6875) /* metro dependency 6875: ChannelMemberStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_15 = constantsModule.ChannelTypes;
const env0_16 = constantsModule.HelpdeskArticles;
const env0_17 = constantsModule.StatusTypes;
const env0_18 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
let value3 = require(33) /* metro dependency 33 */;
let value = ReactModule;
let value3 = JsxRuntimeModule;
const env0_19 = value3.jsx;
const env0_20 = value3.Fragment;
const env0_21 = value3.jsxs;
value = value.memo(GuildChannelHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/GuildChannelHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/GuildChannelHeader.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_76381(a0, a1) { // fn#76381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:396, offset: 0x01dcd6c8, 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)) {
function _createForOfIteratorHelperLoose_76381(a0, a1) { // fn#76381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:396, offset: 0x01dcd6c8, 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);
}
return _fun76382;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_76383(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun76382;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_76383(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_76383(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_76383(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun76382;
}
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 _fun76382() { // fn#76382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:967, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function GuildChannelMemberCount({channel, withSeparator}) { // fn#76384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1306, offset: 0x01dcd83c, size: 213 bytes, params: 2, frame: 21
withSeparator = !(withSeparator === undefined) && withSeparator;
const {online,
total} = (FluxModule).useStateFromStoresObject([ChannelMemberStore,
ChannelMemberCountStore], _fun76385);
env0_4.useEffect(function() {
var channelMemberCountStoreBinding = ChannelMemberCountStore;
var channelBinding = channel;
channelMemberCountStoreBinding.requestCount(channelBinding.guild_id, channelBinding.id);
}, [channel.guild_id, channel.id]);
if (total != null) {
if (total > 500) {
return undefined;
}
}
if (online != null) {
if (online > 500) {
return undefined;
}
}
return (ChannelHeaderSharedModule).renderMemberCountText(online, total,
withSeparator);
function _fun76385() { // fn#76385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1419, offset: 0x01dcd911, size: 286 bytes, params: 1, frame: 33
var r7;
var r8;
var r9;
var r10;
var r11;
var r6;
var r20;
var r16;
var r17;
var r18;
var r2;
var r3;
var r4;
var r5;
var value7;
var count;
var value8;
var UNKNOWN;
var value9;
var value10;
var OFFLINE;
var value11;
var value12;
var value13;
const value = environment.__proto__;
const _createForOfIteratorHelperLoose_76381Binding = _createForOfIteratorHelperLoose_76381;
const channelMemberStoreBinding = ChannelMemberStore;
const getProps = channelMemberStoreBinding.getProps;
let {guild_id, id} = channel;
const value3 = _createForOfIteratorHelperLoose_76381Binding(Reflect.apply(getProps, channelMemberStoreBinding,
[guild_id, id]).groups);
const value4 = value3();
let done = value4.done;
const value5 = false;
const value6 = 0;
if (done) {
r2 = value6;
r3 = value5;
r4 = value6;
r5 = value5;
} else {
r7 = value6;
r8 = value6;
r9 = value5;
r10 = value5;
r11 = value4;
while (true) {
value7 = r11.value;
count = value7.count;
value8 = value6 !== count;
if (value8) {
id = value7.id;
UNKNOWN = StatusTypes.UNKNOWN;
value9 = id !== UNKNOWN;
r6 = value9;
} else {
r6 = value8;
}
if (!r6) {
r16 = r7;
r17 = r8;
r18 = r9;
continue;
}
count = value7.count;
value10 = r8 + count;
id = value7.id;
OFFLINE = StatusTypes.OFFLINE;
value11 = true;
if (id === OFFLINE) {
r6 = r7;
r20 = value11;
continue;
}
count = value7.count;
value12 = r7 + count;
r6 = value12;
r20 = r9;
r10 = value11;
r16 = r6;
r17 = value10;
r18 = r20;
value13 = value3();
done = value13.done;
if (done) {
r2 = r16;
r3 = r10;
r4 = r17;
r5 = r18;
break;
}
r7 = r16;
r8 = r17;
r9 = r18;
r11 = value13;
continue;
}
}
r5 = r6;
return r3 ? {total: r5 ? r4 : null, online: r2} : ChannelMemberCountStore.getMemberCount(channel.id);
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
function computeVisibleChannelName({channel, guildId, showCreateThread, isConnected}) { // fn#76387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1870, offset: 0x01dcda57, size: 312 bytes, params: 2, frame: 19
var r0;
var moduleValue2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
if (AgeGateUtilsModule.shouldNSFWGateGuild(guildId)) {
r0 = intl.string(t.HbPHt1);
} else if (showCreateThread) {
r0 = intl.string(t['4WNcpu']);
} else if (channel == null) {
string = intl.string;
r0 = isConnected ? Reflect.apply(string, intl, [t.ai6Lbr]) : Reflect.apply(string, intl, [t.ZTNur7]);
} else {
moduleValue2 = require(4805) /* metro dependency 4805: useChannelName */;
r0 = moduleValue2.computeChannelName(channel, UserStore, RelationshipStore);
}
return _fun76382;
return r0;
}
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 GuildChannelMemberCount({channel, withSeparator}) { // fn#76384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1306, offset: 0x01dcd83c, size: 213 bytes, params: 2, frame: 21
withSeparator = !(withSeparator === undefined) && withSeparator;
const {online,
total} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelMemberStore,
ChannelMemberCountStore], _fun76385);
env0_4.useEffect(function() {
var channelBinding = channel;
ChannelMemberCountStore.requestCount(channelBinding.guild_id, channelBinding.id);
}, [channel.guild_id, channel.id]);
if (total != null) {
if (total > 500) {
return undefined;
function ChannelLinkedLobbyCoachmark({iconRef, guild, channel}) { // fn#76388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2220, offset: 0x01dcdb8f, size: 230 bytes, params: 2, frame: 23
const useSelectedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedDismissibleContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
let CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP = DismissibleContent.CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
const value3 = Module00057(Reflect.apply(useSelectedDismissibleContent, UseSelectedDismissibleContentModule,
[[CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP], undefined, true]), 2);
const property = value3[0];
const property2 = value3[1];
CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP = DismissibleContent.CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
const value4 = property === CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
const binding = env0_4;
const useMemo = binding.useMemo;
(UseCoachmarkNativeModule).useCoachmark(iconRef, Reflect.apply(useMemo,
binding, [_fun76389, [channel, guild, property2, value4]]));
return null;
function _fun76389() { // fn#76389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2525, offset: 0x01dcdc75, size: 297 bytes, params: 1, frame: 19
var environment;
const object = {};
let value = environment.__proto__;
const value2 = undefined;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const YIVr4B = t.YIVr4B;
object.title = Reflect.apply(string, intl, [YIVr4B]);
const format = intl.format;
const w8VWRT = t.w8VWRT;
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const LINKED_LOBBIES = HelpdeskArticles.LINKED_LOBBIES;
object.description = Reflect.apply(format, intl, [w8VWRT, {helpdeskArticle: Reflect.apply(getArticleURL,
defaultImport, [LINKED_LOBBIES])}]);
let r1 = (channel == null ? value2 : channel.linkedLobby) != null && result;
object.visible = r1;
object.position = 'bottom';
object.offsetY = 15;
object.onDismiss = onDismiss_76390;
if (channel != null) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
value = value.getChannelIconWithGuild(channel, guild);
r1 = value;
} else {
r1 = value2;
}
object.imgSource = r1;
return object;
function onDismiss_76390() { // fn#76390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2779, offset: 0x01dcdd9e, size: 29 bytes, params: 1, frame: 11
const binding = env1_2;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
}
}
if (online != null) {
if (online > 500) {
return undefined;
function GuildChannelHeader({channelId, screenIndex, guildId, pressable, isGuildMemberCountVisible, showCreateThread}) { // fn#76391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2933, offset: 0x01dcddbb, size: 902 bytes, params: 2, frame: 36
var r15;
var r7;
var items2;
var visibleChannelName;
var intl;
const value3 = (MobileVisualRefreshExperiment)('GuildChannelHeader');
const value5 = channel2.useRef(null);
const useStateFromStores = FluxModule.useStateFromStores;
const channelStoreBinding = ChannelStore;
const channel = Reflect.apply(useStateFromStores, FluxModule, [[channelStoreBinding], function() {
return ChannelStore.getChannel(channelId);
}]);
var channel2 = channel;
const value6 = FluxModule.useStateFromStores([GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
});
const env0_5 = (UseGetThreadDraftSettings)(channelId);
const value7 = FluxModule.useStateFromStores([channelStoreBinding], _fun76394);
const r1 = pressable && channel != null && !showCreateThread;
const guild = FluxModule.useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let r18 = channel == null || showCreateThread ? null : (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderChannelIcon(channel,
guild);
const {node, hasSubtitle} = GuildChannelHeaderUseChannelName({channel: channel, parentChannel: value7,
guildId: guildId, disableArrow: !r1, disableGuildMemberCount: !isGuildMemberCountVisible,
showCreateThread: showCreateThread, icon: value3 ? r18 : null});
const value12 = channel2.useCallback(_fun76399, [channelId, screenIndex]);
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
if (value3) {
r15 = (
guild != null && channel?.linkedLobby != null
? (
<View ref={value5}>
<ChannelLinkedLobbyCoachmark
iconRef={value5}
guild={guild}
channel={channel}
/>
</View>
)
: null
);
} else {
var viewBindingProps = {ref: value5, style: {marginRight: 8}};
items2 = [r18];
r18 = (
guild != null && channel?.linkedLobby != null
? (
<ChannelLinkedLobbyCoachmark
iconRef={value5}
guild={guild}
channel={channel}
/>
)
: null
);
items2[1] = r18;
r15 = (
<View {...viewBindingProps}>
{items2}
</View>
);
}
}
return (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderMemberCountText(online, total,
withSeparator);
}
function computeVisibleChannelName({channel, guildId, showCreateThread, isConnected}) { // fn#76387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1870, offset: 0x01dcda57, size: 312 bytes, params: 2, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ageGateUtilsModule = require(8581) /* metro dependency 8581: AgeGateUtils */;
return ageGateUtilsModule.shouldNSFWGateGuild(guildId) ? intl.string(t.HbPHt1) : showCreateThread ? intl.string(t['4WNcpu']) : channel == null ? isConnected ? intl.string(t.ai6Lbr) : intl.string(t.ZTNur7) : (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
UserStore, RelationshipStore);
}
function ChannelLinkedLobbyCoachmark({iconRef, guild, channel}) { // fn#76388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2220, offset: 0x01dcdb8f, size: 230 bytes, params: 2, frame: 23
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
let CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP = DismissibleContent.CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
const value3 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
[[CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP], undefined, true]), 2);
const property = value3[0];
const property2 = value3[1];
CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP = DismissibleContent.CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
const value4 = property === CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
const binding = env0_4;
const useMemo = binding.useMemo;
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(iconRef, Reflect.apply(useMemo,
binding, [_fun76389, [channel, guild, property2, value4]]));
return null;
}
function GuildChannelHeader({channelId, screenIndex, guildId, pressable, isGuildMemberCountVisible, showCreateThread}) { // fn#76391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2933, offset: 0x01dcddbb, size: 902 bytes, params: 2, frame: 36
var r15;
var r7;
var items2;
var visibleChannelName;
var intl;
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildChannelHeader');
const value5 = env0_4.useRef(null);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
var env0_4 = channel;
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
});
const env0_5 = (importDefault(9725) /* metro dependency 9725: useGetThreadDraftSettings */)(channelId);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun76394);
const r1 = pressable && channel != null && !showCreateThread;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let r18 = channel == null || showCreateThread ? null : (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderChannelIcon(channel,
guild);
const {node, hasSubtitle} = GuildChannelHeaderUseChannelName({channel: channel, parentChannel: value7,
guildId: guildId, disableArrow: !r1, disableGuildMemberCount: !isGuildMemberCountVisible,
showCreateThread: showCreateThread, icon: value3 ? r18 : null});
const value12 = env0_4.useCallback(_fun76399, [channelId, screenIndex]);
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
if (value3) {
r15 = guild != null && channel?.linkedLobby != null ? <View ref={value5}><ChannelLinkedLobbyCoachmark iconRef={value5} guild={guild} channel={channel} /></View> : null;
} else {
var viewBindingProps = {ref: value5, style: {marginRight: 8}};
items2 = [r18];
r18 = guild != null && channel?.linkedLobby != null ? <ChannelLinkedLobbyCoachmark iconRef={value5} guild={guild} channel={channel} /> : null;
items2[1] = r18;
r15 = <View {...viewBindingProps}>{items2}</View>;
}
const fragment = <>{r15}{node}</>;
if (channel != null) {
visibleChannelName = computeVisibleChannelName({channel: channel, guildId: guildId,
showCreateThread: showCreateThread, isConnected: value6});
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = '' + visibleChannelName + ', ' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x87QCk);
} else {
r7 = undefined;
}
if (r1) {
return (
const fragment = (
<>
{(require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderTitleWrapper(fragment, value12,
r7,
hasSubtitle ? 44 : 24)}
{r15}
{node}
</>
);
}
return fragment;
}
function _fun76385() { // fn#76385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1419, offset: 0x01dcd911, size: 286 bytes, params: 1, frame: 33
var r7;
var r8;
var r9;
var r10;
var r11;
var r6;
var r20;
var r16;
var r17;
var r18;
var r2;
var r3;
var r4;
var r5;
var value7;
var count;
var value8;
var UNKNOWN;
var value9;
var value10;
var OFFLINE;
var value11;
var value12;
var value13;
const value = environment.__proto__;
const _createForOfIteratorHelperLoose_76381Binding = _createForOfIteratorHelperLoose_76381;
const getProps = ChannelMemberStore.getProps;
let {guild_id, id} = channel;
const value3 = _createForOfIteratorHelperLoose_76381Binding(Reflect.apply(getProps, ChannelMemberStore, [guild_id,
id]).groups);
const value4 = value3();
let done = value4.done;
const value5 = false;
const value6 = 0;
if (done) {
r2 = value6;
r3 = value5;
r4 = value6;
r5 = value5;
} else {
r7 = value6;
r8 = value6;
r9 = value5;
r10 = value5;
r11 = value4;
while (true) {
value7 = r11.value;
count = value7.count;
value8 = value6 !== count;
if (value8) {
id = value7.id;
UNKNOWN = StatusTypes.UNKNOWN;
value9 = id !== UNKNOWN;
r6 = value9;
} else {
r6 = value8;
}
if (!r6) {
r16 = r7;
r17 = r8;
r18 = r9;
continue;
}
count = value7.count;
value10 = r8 + count;
id = value7.id;
OFFLINE = StatusTypes.OFFLINE;
value11 = true;
if (id === OFFLINE) {
r6 = r7;
r20 = value11;
continue;
}
count = value7.count;
value12 = r7 + count;
r6 = value12;
r20 = r9;
r10 = value11;
r16 = r6;
r17 = value10;
r18 = r20;
value13 = value3();
done = value13.done;
if (done) {
r2 = r16;
r3 = r10;
r4 = r17;
r5 = r18;
break;
}
r7 = r16;
r8 = r17;
r9 = r18;
r11 = value13;
continue;
if (channel != null) {
visibleChannelName = computeVisibleChannelName({channel: channel, guildId: guildId,
showCreateThread: showCreateThread, isConnected: value6});
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = '' + visibleChannelName + ', ' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x87QCk);
} else {
r7 = undefined;
}
if (r1) {
return (
<>
{(require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderTitleWrapper(fragment, value12,
r7,
hasSubtitle ? 44 : 24)}
</>
);
}
return fragment;
function _fun76394() { // fn#76394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:3279, offset: 0x01dce141, size: 151 bytes, params: 1, frame: 16
return channel == null || showCreateThread ? ChannelStore.getChannel(env0_5?.parentChannelId) : channel != null && channel.parent_id != null && THREAD_CHANNEL_TYPES.has(channel.type) ? ChannelStore.getChannel(channel.parent_id) : undefined;
}
function GuildChannelHeaderUseChannelName({channel, parentChannel, guildId, disableArrow, disableGuildMemberCount, showCreateThread, icon}) { // fn#76396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:3544, owner: GuildChannelHeader.useChannelName, offset: 0x01dce1f3, size: 750 bytes, params: 2, frame: 30
var environment;
let value = environment.__proto__;
const useStateFromStores = FluxModule.useStateFromStores;
let items2 = [GatewayConnectionStore];
const visibleChannelName = computeVisibleChannelName({channel: channel, guildId: guildId,
showCreateThread: showCreateThread, isConnected: Reflect.apply(useStateFromStores, FluxModule, [items2,
function() {
return GatewayConnectionStore.isConnected();
}])});
let r4 = !(require(8581) /* metro dependency 8581: AgeGateUtils */).shouldNSFWGateGuild(guildId) && (showCreateThread || channel?.isThread());
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const value5 = Reflect.apply(formatToPlainString, intl, [r4 ? t['OkzL+Q'] : t.UbNmGc,
{channelName: visibleChannelName}]);
const r3 = r4 && parentChannel != null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderParentChannelSubTitle(parentChannel) : undefined;
r4 = !disableGuildMemberCount && (FluxModule.useStateFromStores([GuildMemberCountStore], function() {
return GuildMemberCountStore.getMemberCount(guildId);
}) ?? 0) < 500 && channel != null && !channel.isThread();
if (r4) {
items2 = [ChannelTypes.GUILD_DIRECTORY];
items2[1] = ChannelTypes.GUILD_FORUM;
r4 = !items2.includes(channel.type);
}
r4 = r4 && !showCreateThread;
const value14 = (require(9715) /* metro dependency 9715: ChatLoadingIndicator */).useShouldChannelShowLoadingIndicator(channel?.id);
let r1 = channel != null && channel.isForumLikeChannel();
r1 = !r1 && value14;
const r12 = (
r1
? ((ChannelHeaderLoadingIndicator) => <ChannelHeaderLoadingIndicator />)((require(9715) /* metro dependency 9715: ChatLoadingIndicator */).ChannelHeaderLoadingIndicator)
: (
<>
{r4 && <GuildChannelMemberCount channel={channel} withSeparator={r3 != null} />}
{parentChannel != null && r3}
</>
)
);
value = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
r1 = !r1 ? r4 : r1;
r1 = !r1 ? r3 != null : r1;
return {node: value.renderChannelTitle(visibleChannelName, {accessibleTitle: value5, subtitle: r12,
disableArrow: disableArrow, guildId: guildId, icon: icon}), hasSubtitle: r1};
}
function _fun76399() { // fn#76399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:4766, offset: 0x01dce50f, size: 57 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9709) /* metro dependency 9709: ChannelHeader */;
value.navigateToChannelDetails(channelId, screenIndex, 'guild-channel-header-title');
}
}
return r3 ? {total: r5 ? r4 : null, online: r2} : ChannelMemberCountStore.getMemberCount(channel.id);
}
function _fun76389() { // fn#76389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2525, offset: 0x01dcdc75, size: 297 bytes, params: 1, frame: 19
var environment;
const object2 = {};
let value = environment.__proto__;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const YIVr4B = t.YIVr4B;
object2.title = Reflect.apply(string, intl, [YIVr4B]);
const format = intl.format;
const w8VWRT = t.w8VWRT;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const LINKED_LOBBIES = HelpdeskArticles.LINKED_LOBBIES;
object2.description = Reflect.apply(format, intl, [w8VWRT, {helpdeskArticle: Reflect.apply(getArticleURL,
defaultImport, [LINKED_LOBBIES])}]);
let r1 = (channel == null ? value2 : channel.linkedLobby) != null && result;
object2.visible = r1;
object2.position = 'bottom';
object2.offsetY = 15;
object2.onDismiss = onDismiss_76390;
if (channel != null) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
value = value.getChannelIconWithGuild(channel, guild);
r1 = value;
} else {
r1 = value2;
}
object2.imgSource = r1;
return object2;
}
function _fun76394() { // fn#76394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:3279, offset: 0x01dce141, size: 151 bytes, params: 1, frame: 16
return channel == null || showCreateThread ? ChannelStore.getChannel(env0_5?.parentChannelId) : channel != null && channel.parent_id != null && THREAD_CHANNEL_TYPES.has(channel.type) ? ChannelStore.getChannel(channel.parent_id) : undefined;
}
function GuildChannelHeaderUseChannelName({channel, parentChannel, guildId, disableArrow, disableGuildMemberCount, showCreateThread, icon}) { // fn#76396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:3544, owner: GuildChannelHeader.useChannelName, offset: 0x01dce1f3, size: 750 bytes, params: 2, frame: 30
var environment;
let value = environment.__proto__;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let items = [GatewayConnectionStore];
const visibleChannelName = computeVisibleChannelName({channel: channel, guildId: guildId,
showCreateThread: showCreateThread, isConnected: Reflect.apply(useStateFromStores, fluxModule, [items,
function() {
return GatewayConnectionStore.isConnected();
}])});
let r4 = !(require(8581) /* metro dependency 8581: AgeGateUtils */).shouldNSFWGateGuild(guildId) && (showCreateThread || channel?.isThread());
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value5 = Reflect.apply(formatToPlainString, intl, [r4 ? t['OkzL+Q'] : t.UbNmGc,
{channelName: visibleChannelName}]);
const r3 = r4 && parentChannel != null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderParentChannelSubTitle(parentChannel) : undefined;
r4 = !disableGuildMemberCount && (fluxModule.useStateFromStores([GuildMemberCountStore], function() {
return GuildMemberCountStore.getMemberCount(guildId);
}) ?? 0) < 500 && channel != null && !channel.isThread();
if (r4) {
items = [ChannelTypes.GUILD_DIRECTORY];
items[1] = ChannelTypes.GUILD_FORUM;
r4 = !items.includes(channel.type);
}
r4 = r4 && !showCreateThread;
const value14 = (require(9715) /* metro dependency 9715: ChatLoadingIndicator */).useShouldChannelShowLoadingIndicator(channel?.id);
let r1 = channel != null && channel.isForumLikeChannel();
r1 = !r1 && value14;
const r12 = r1 ? ((ChannelHeaderLoadingIndicator) => <ChannelHeaderLoadingIndicator />)((require(9715) /* metro dependency 9715: ChatLoadingIndicator */).ChannelHeaderLoadingIndicator) : <>{r4 && <GuildChannelMemberCount channel={channel} withSeparator={r3 != null} />}{parentChannel != null && r3}</>;
value = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
r1 = !r1 ? r4 : r1;
r1 = !r1 ? r3 != null : r1;
return {node: value.renderChannelTitle(visibleChannelName, {accessibleTitle: value5, subtitle: r12,
disableArrow: disableArrow, guildId: guildId, icon: icon}), hasSubtitle: r1};
}
function _fun76399() { // fn#76399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:4766, offset: 0x01dce50f, size: 57 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9709) /* metro dependency 9709: ChannelHeader */;
value.navigateToChannelDetails(channelId, screenIndex, 'guild-channel-header-title');
}
function onDismiss_76390() { // fn#76390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2779, offset: 0x01dcdd9e, size: 29 bytes, params: 1, frame: 11
const binding = env1_2;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
global.__d(_fun76380, 9723, [57, 31, 27, 9724, 4257, 1383, 6875, 1379, 4111, 1867, 3793, 1878, 661, 1376, 33, 566,
9717, 8581, 1244, 4805, 9715, 7013, 1365, 1948, 6647, 8543, 1357, 9725, 9709,
2]) /* metro module 9723, dependencies: [57, 31, 27, 9724, 4257, 1383, 6875, 1379, 4111, 1867, 3793, 1878, 661, 1376, 33, 566, 9717, 8581, 1244, 4805, 9715, 7013, 1365, 1948, 6647, 8543, 1357, 9725, 9709, 2] */;
@@ -1,44 +1,52 @@
/* Metro module 9712; source: modules/main_tabs_v2/native/channel/header/HomeChannelHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 9713, 4573, 1244, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module09713 from '../../../../../by-id/module-09713.js'; /* Metro dependency 9713 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun76314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9898:6, offset: 0x01dca3c9, size: 250 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {'flex': 1, 'flexDirection': 'row',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const PX_8 = (Native).space.PX_8;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: {'flex': 1, 'flexDirection': 'row',
'alignItems': 'center', gap: PX_8}}]);
value = value.memo(HomeChannelHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/HomeChannelHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/HomeChannelHeader.tsx');
exports.default = value;
function HomeChannelHeader() { // fn#76315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9898:270, offset: 0x01dca4c3, size: 238 bytes, params: 1, frame: 22
const styles = useStyles();
const Icon = (NativeModule).Icon;
const iconProps = {source: Module09713};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
iconProps.disableColor = true;
const icon = <Icon {...iconProps} />;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const Ym2Ri6 = (IndexNativeModule).t.Ym2Ri6;
return (
<View style={styles.container}>
{icon}
<Text variant="heading-lg/extrabold" color="interactive-text-active">
{Reflect.apply(string, intl, [Ym2Ri6])}
</Text>
</View>
);
}
}
function HomeChannelHeader() { // fn#76315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9898:270, offset: 0x01dca4c3, size: 238 bytes, params: 1, frame: 22
const styles = useStyles();
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(9713) /* metro dependency 9713 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
iconProps.disableColor = true;
const icon = <Icon {...iconProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Ym2Ri6 = (require(1244) /* metro dependency 1244: indexNative */).t.Ym2Ri6;
return (
<View style={styles.container}>
{icon}
<Text variant="heading-lg/extrabold" color="interactive-text-active">
{Reflect.apply(string, intl, [Ym2Ri6])}
</Text>
</View>
);
}
global.__d(_fun76314, 9712, [31, 27, 33, 4501, 697, 1305, 9713, 4573, 1244,
2]) /* metro module 9712, dependencies: [31, 27, 33, 4501, 697, 1305, 9713, 4573, 1244, 2] */;
@@ -1,383 +1,445 @@
/* Metro module 9700; source: modules/main_tabs_v2/native/channel/header/PrivateChannelButtons.tsx; dependencies: [31, 27, 4606, 1379, 3793, 1878, 4297, 9613, 661, 4299, 1933, 9614, 33, 1305, 4501, 697, 566, 9701, 8214, 9707, 7708, 9708, 9709, 9672, 9673, 4863, 4080, 9726, 1962, 5278, 1244, 6998, 9727, 8876, 3853, 683, 9757, 7002, 7709, 6711, 9616, 8850, 4573, 9759, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import VoiceStateStore from '../../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ChannelRTCStore from '../../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseAppDMChatInputState from '../../../../app_dms/useAppDMChatInputState.tsx'; /* Metro dependency 9707 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ChangelogConstantsModule from '../../../../changelog/ChangelogConstants.tsx'; /* Metro dependency 1933 */
import * as CallConstantsModule from '../../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ChannelRTCStoreModule from '../../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChannelDetailsStoreModule from '../../sidebar/details/stores/ChannelDetailsStore.tsx'; /* Metro dependency 9613 */
import * as TrackingConstantsModule from '../../../../search/native/tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as UseInappropriateConversationSafetyToolsWarningForChannelModule from '../../../../self_mod/inappropriate_conversation/hooks/useInappropriateConversationSafetyToolsWarningForChannel.tsx'; /* Metro dependency 9701 */
import * as ChannelHeaderModule from './ChannelHeader.tsx'; /* Metro dependency 9709 */
function _fun76235(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:6, offset: 0x01dc777c, size: 812 bytes, params: 8, frame: 27
var object3;
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(27) /* metro dependency 27 */).View;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_6 = (require(4606) /* metro dependency 4606: ChannelRTCStore */).NO_PARTICIPANTS;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_11 = (require(9613) /* metro dependency 9613: ChannelDetailsStore */).setIsChannelDetailsSearchActive;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.AnalyticEvents;
const env0_13 = constantsModule.AnalyticsSections;
const env0_14 = constantsModule.ChannelTypes;
const env0_15 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const env0_16 = (require(1933) /* metro dependency 1933: ChangelogConstants */).CHANGELOG_URL;
const env0_17 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchEntrypointAnalyticsLocations;
const value3 = require(33) /* metro dependency 33 */;
const env0_18 = value3.jsx;
const env0_19 = value3.jsxs;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let value = ReactModule;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
const property = AVATAR_SIZE_MAP[XSMALL];
object3 = {};
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
object = {};
const CutoutDirection = (NativeModule).CutoutDirection;
const RIGHT = CutoutDirection.RIGHT;
object3.direction = RIGHT;
object3.radius = property / 2 + 3;
object3.inset = -6;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {privateChannelButtonsWrapper: {'flexDirection': 'row', 'gap': 12, 'paddingEnd': 1}};
const object5 = {};
object.direction = RIGHT;
object.radius = property / 2 + 3;
object.inset = -6;
const createStyles = CreateStylesModule.createStyles;
object = {privateChannelButtonsWrapper: {'flexDirection': 'row', 'gap': 12, 'paddingEnd': 1}};
const object2 = {};
let REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object5.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object2.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS;
object5.borderRadius = BORDER_RADIUS;
object2.borderRadius = BORDER_RADIUS;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.minHeight = PX_32;
object2.minHeight = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.minWidth = PX_32;
object2.minWidth = PX_32;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.padding = PX_4;
object5.justifyContent = 'center';
object5.flexDirection = 'row';
object5.alignItems = 'center';
object3.button = object5;
object3.disabledButton = {opacity: 0.6};
const object6 = {};
object2.padding = PX_4;
object2.justifyContent = 'center';
object2.flexDirection = 'row';
object2.alignItems = 'center';
object.button = object2;
object.disabledButton = {opacity: 0.6};
const object4 = {};
REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object6.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.width = property;
object6.height = property;
object6.justifyContent = 'center';
object6.alignItems = 'center';
object6.marginLeft = -6;
object3.overflowBadge = object6;
const env0_21 = Reflect.apply(createStyles, createStylesModule, [object3]);
object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.width = property;
object4.height = property;
object4.justifyContent = 'center';
object4.alignItems = 'center';
object4.marginLeft = -6;
object.overflowBadge = object4;
const env0_21 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(PrivateChannelButtons);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/PrivateChannelButtons.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/PrivateChannelButtons.tsx');
exports.default = value;
}
function PrivateChannelButtons({channelId, screenIndex}) { // fn#76236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1170, offset: 0x01dc7aa8, size: 2220 bytes, params: 2, frame: 42
var r25;
var r22;
var r11;
var r2;
var r1;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var object2;
var unsafe_rawColors;
var VoiceNormalIcon;
var items3;
var items5;
var object10;
var object12;
var items7;
var object14;
let value = undefined;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const env0_3 = channel;
const r6 = channel == null ? value : channel.getRecipientId();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], _fun76238,
[channel]);
const value6 = (require(9701) /* metro dependency 9701: useInappropriateConversationSafetyToolsWarningForChannel */).useInappropriateConversationSafetyToolsWarningForChannel(channelId);
const r19 = value6 != null && r6 != null;
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore, UserStore],
_fun76239);
const value10 = (require(8214) /* metro dependency 8214: useIsCallActive */).useIsCallActiveNullable(channel == null ? value : channel.id);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const callParticipants = Reflect.apply(useStateFromStoresObject, fluxModule, [[ChannelRTCStore],
_fun76240]).callParticipants;
let binding = env0_3;
let useMemo = binding.useMemo;
const {visibleParticipants, totalParticipantCount} = Reflect.apply(useMemo, binding, [_fun76241,
[callParticipants]]);
const r14 = channel == null ? value : channel.isMultiUserDM();
const r15 = r14 && callParticipants.length > 0;
const {application,
isAppDM} = (importDefault(9707) /* metro dependency 9707: useAppDMChatInputState */)({context: {type: 'channel',
channel: channel}});
binding = env0_3;
const value14 = binding.useCallback(_fun76243, [channel]);
const env0_13 = binding.useCallback(_fun76244, [value14]);
const value15 = binding.useCallback(_fun76245, [value14]);
const value16 = binding.useCallback(_fun76246, [channel, channelId, screenIndex]);
const value17 = binding.useCallback(_fun76247, [r6, channel, application]);
useMemo = binding.useMemo;
let button = styles.button;
const value18 = Reflect.apply(useMemo, binding, [_fun76248, [r19, button, value16, channelId, r6,
value6 == null ? value : value6.id, value6 == null ? value : value6.type]]);
if ((importDefault(8876) /* metro dependency 8876: isChangelogChannel */)(channelId)) {
return (
<PressableOpacity
style={styles.button}
onPress={function() {
importDefault(dependencyMap[34]).openURL(CHANGELOG_URL);
var defaultImport2 = importDefault(dependencyMap[35]);
var CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
defaultImport2.track(CHANGE_LOG_CTA_CLICKED, {cta_type: 'channel_header', target: CHANGELOG_URL});
}}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+KSnWX'])}
>
{((WindowLaunchIcon) => <WindowLaunchIcon size="sm" />)((require(9757) /* metro dependency 9757: WindowLaunchIcon */).WindowLaunchIcon)}
</PressableOpacity>
);
}
if (isAppDM) {
if (application == null) {
r2 = null;
function PrivateChannelButtons({channelId, screenIndex}) { // fn#76236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1170, offset: 0x01dc7aa8, size: 2220 bytes, params: 2, frame: 42
var r25;
var r22;
var r11;
var r2;
var r1;
const PressableOpacity = (PressablesModule).PressableOpacity;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var object4;
var unsafe_rawColors;
var VoiceNormalIcon;
var items3;
var items5;
var object5;
var object6;
var items7;
var object7;
let value = undefined;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const channel2 = channel;
const r6 = channel == null ? value : channel.getRecipientId();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], _fun76238,
[channel]);
const value6 = (UseInappropriateConversationSafetyToolsWarningForChannelModule).useInappropriateConversationSafetyToolsWarningForChannel(channelId);
const r19 = value6 != null && r6 != null;
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore, UserStore],
_fun76239);
const value10 = (require(8214) /* metro dependency 8214: useIsCallActive */).useIsCallActiveNullable(channel == null ? value : channel.id);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const callParticipants = Reflect.apply(useStateFromStoresObject, fluxModule, [[ChannelRTCStore],
_fun76240]).callParticipants;
let binding = channel2;
let useMemo = binding.useMemo;
const {visibleParticipants, totalParticipantCount} = Reflect.apply(useMemo, binding, [_fun76241,
[callParticipants]]);
const r14 = channel == null ? value : channel.isMultiUserDM();
const r15 = r14 && callParticipants.length > 0;
const {application,
isAppDM} = (UseAppDMChatInputState)({context: {type: 'channel',
channel: channel}});
binding = channel2;
const value14 = binding.useCallback(_fun76243, [channel]);
const env0_13 = binding.useCallback(_fun76244, [value14]);
const value15 = binding.useCallback(_fun76245, [value14]);
const value16 = binding.useCallback(_fun76246, [channel, channelId, screenIndex]);
const value17 = binding.useCallback(_fun76247, [r6, channel, application]);
useMemo = binding.useMemo;
let button = styles.button;
const value18 = Reflect.apply(useMemo, binding, [_fun76248, [r19, button, value16, channelId, r6,
value6 == null ? value : value6.id, value6 == null ? value : value6.type]]);
if ((importDefault(8876) /* metro dependency 8876: isChangelogChannel */)(channelId)) {
return (
<PressableOpacity
style={styles.button}
onPress={function() {
importDefault(dependencyMap[34]).openURL(CHANGELOG_URL);
var defaultImport2 = importDefault(dependencyMap[35]);
var CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
defaultImport2.track(CHANGE_LOG_CTA_CLICKED, {cta_type: 'channel_header', target: CHANGELOG_URL});
}}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+KSnWX'])}
>
{((WindowLaunchIcon) => <WindowLaunchIcon size="sm" />)((require(9757) /* metro dependency 9757: WindowLaunchIcon */).WindowLaunchIcon)}
</PressableOpacity>
);
}
if (isAppDM) {
if (application == null) {
r2 = null;
} else {
var viewBindingProps = {style: styles.privateChannelButtonsWrapper};
button = styles.button;
items7 = [
<PressableOpacity
style={button}
onPress={value16}
accessibilityLabel={intl.string(t['5h0QOP'])}
accessibilityRole="button"
>
{((MagnifyingGlassIcon) => <MagnifyingGlassIcon size="sm" />)((require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon)}
</PressableOpacity>,
];
button = styles.button;
items7[1] = (
<PressableOpacity
style={button}
onPress={value17}
accessibilityLabel={intl.string(t.oCqlGG)}
accessibilityRole="button"
>
{((SettingsIcon) => <SettingsIcon size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}
</PressableOpacity>
);
r2 = (
<View {...viewBindingProps}>
{items7}
</View>
);
}
r1 = r2;
} else {
var viewBindingProps = {style: styles.privateChannelButtonsWrapper};
button = styles.button;
items7 = [<PressableOpacity style={button} onPress={value16} accessibilityLabel={intl.string(t['5h0QOP'])} accessibilityRole="button">{((MagnifyingGlassIcon) => <MagnifyingGlassIcon size="sm" />)((require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon)}</PressableOpacity>];
button = styles.button;
items7[1] = <PressableOpacity style={button} onPress={value17} accessibilityLabel={intl.string(t.oCqlGG)} accessibilityRole="button">{((SettingsIcon) => <SettingsIcon size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}</PressableOpacity>;
r2 = <View {...viewBindingProps}>{items7}</View>;
}
r1 = r2;
} else {
var viewBindingProps = {style: styles.privateChannelButtonsWrapper};
object = {};
string = intl.string;
object.accessibilityLabel = r15 ? Reflect.apply(string, intl, [t['0D/6Rz']]) : value5 ? Reflect.apply(string,
intl,
[t['4ry6yi']]) : Reflect.apply(string, intl, [t.focH1t]);
object.accessibilityRole = 'button';
items2 = [styles.button];
object2 = {};
r25 = r15 ? 1 : value;
object2.borderWidth = r25;
if (r15) {
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r25 = value5 ? unsafe_rawColors.GREEN_360 : unsafe_rawColors.BRAND_400;
} else {
r25 = value;
}
object2.borderColor = r25;
items2[1] = object2;
items2[2] = value9 ? styles.disabledButton : null;
object.style = items2;
object.onPress = onPress_76250;
object.disabled = value9;
if (r15) {
VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r22 = <VoiceNormalIcon size="sm" color={value5 ? unsafe_rawColors.GREEN_360 : unsafe_rawColors.BRAND_400} />;
} else if (value5) {
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
r22 = <PhoneHangUpIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400} />;
} else {
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
r22 = <PhoneCallIcon size="sm" color={value10 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360 : value} />;
}
items3 = [r22];
items3[1] = visibleParticipants.map(_fun76251);
r22 = totalParticipantCount > 5 && <View style={styles.overflowBadge}>{((Text) => <Text variant="text-xxs/semibold" color="button-outline-primary-text">{'+'}{totalParticipantCount - 5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
items3[2] = r22;
items5 = [<PressableOpacity {...object}>{items3}</PressableOpacity>];
if (r14) {
r11 = null;
} else if (value5) {
r11 = null;
} else {
r11 = <PressableOpacity style={[styles.button,
value9 ? styles.disabledButton : null]} onPress={value15} disabled={value9} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oCqlGG)} accessibilityRole="button">{((VideoIcon) => <VideoIcon size="sm" />)((require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon)}</PressableOpacity>;
}
items5[1] = r11;
items5[2] = value18;
value = <View {...viewBindingProps}>{items5}</View>;
r1 = value;
}
return r1;
}
function _fun76238() { // fn#76238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1368, offset: 0x01dc8354, size: 45 bytes, params: 1, frame: 12
return channel != null && VoiceStateStore.isInChannel(channel.id);
}
function _fun76239() { // fn#76239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1534, offset: 0x01dc8381, size: 125 bytes, params: 1, frame: 16
var r1;
var isBlocked2;
var value;
const channelBinding = channel;
const value2 = undefined;
const type = channelBinding == null ? value2 : channel.type;
const DM = ChannelTypes.DM;
let r0 = type === DM && env0_4 != null;
if (r0) {
isBlocked2 = RelationshipStore.isBlocked(env0_4);
if (isBlocked2) {
r1 = isBlocked2;
} else {
value = UserStore.getUser(env0_4);
value = (value == null ? value2 : value.isProvisional) === true;
object3 = {};
string = intl.string;
object3.accessibilityLabel = r15 ? Reflect.apply(string, intl, [t['0D/6Rz']]) : value5 ? Reflect.apply(string,
intl,
[t['4ry6yi']]) : Reflect.apply(string, intl, [t.focH1t]);
object3.accessibilityRole = 'button';
items2 = [styles.button];
object4 = {};
r25 = r15 ? 1 : value;
object4.borderWidth = r25;
if (r15) {
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r25 = value5 ? unsafe_rawColors.GREEN_360 : unsafe_rawColors.BRAND_400;
} else {
r25 = value;
}
object4.borderColor = r25;
items2[1] = object4;
items2[2] = value9 ? styles.disabledButton : null;
object3.style = items2;
object3.onPress = onPress_76250;
object3.disabled = value9;
if (r15) {
VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r22 = <VoiceNormalIcon size="sm" color={value5 ? unsafe_rawColors.GREEN_360 : unsafe_rawColors.BRAND_400} />;
} else if (value5) {
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
r22 = (
<PhoneHangUpIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400} />
);
} else {
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
r22 = (
<PhoneCallIcon
size="sm"
color={value10 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360 : value}
/>
);
}
items3 = [r22];
items3[1] = visibleParticipants.map(_fun76251);
r22 = totalParticipantCount > 5 && <View style={styles.overflowBadge}>{((Text) => <Text variant="text-xxs/semibold" color="button-outline-primary-text">{'+'}{totalParticipantCount - 5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
items3[2] = r22;
items5 = [
<PressableOpacity {...object3}>
{items3}
</PressableOpacity>,
];
if (r14) {
r11 = null;
} else if (value5) {
r11 = null;
} else {
r11 = (
<PressableOpacity
style={[styles.button, value9 ? styles.disabledButton : null]}
onPress={value15}
disabled={value9}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oCqlGG)}
accessibilityRole="button"
>
{((VideoIcon) => <VideoIcon size="sm" />)((require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon)}
</PressableOpacity>
);
}
items5[1] = r11;
items5[2] = value18;
value = (
<View {...viewBindingProps}>
{items5}
</View>
);
r1 = value;
}
r0 = r1;
}
return r0;
}
return r1;
function _fun76238() { // fn#76238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1368, offset: 0x01dc8354, size: 45 bytes, params: 1, frame: 12
return channel != null && VoiceStateStore.isInChannel(channel.id);
}
function _fun76240() { // fn#76240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1763, offset: 0x01dc83fe, size: 154 bytes, params: 1, frame: 17
const object2 = {};
const channelBinding = channel;
const value2 = undefined;
let r1 = channelBinding == null ? value2 : channel.isMultiUserDM();
r1 = r1 === true ? ChannelRTCStore.getParticipants(channel.id) : NO_PARTICIPANTS;
object2.callParticipants = r1;
object2.participantsVersion = (channel == null ? value2 : channel.isMultiUserDM()) !== true ? -1 : ChannelRTCStore.getParticipantsVersion(channel.id);
return object2;
}
function _fun76239() { // fn#76239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1534, offset: 0x01dc8381, size: 125 bytes, params: 1, frame: 16
var r1;
var isBlocked2;
var value;
const channelBinding = channel;
const value2 = undefined;
const type = channelBinding == null ? value2 : channel.type;
const DM = ChannelTypes.DM;
let r0 = type === DM && ReactNativeModule.View != null;
if (r0) {
isBlocked2 = RelationshipStore.isBlocked(ReactNativeModule.View);
if (isBlocked2) {
r1 = isBlocked2;
} else {
value = UserStore.getUser(ReactNativeModule.View);
value = (value == null ? value2 : value.isProvisional) === true;
r1 = value;
}
r0 = r1;
}
return r0;
}
function _fun76241() { // fn#76241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1980, offset: 0x01dc8498, size: 61 bytes, params: 1, frame: 14
const value = callParticipants.filter(function({type}) {
return type === ParticipantTypes.USER;
});
const object2 = {};
object2.visibleParticipants = value.slice(0, 5);
object2.totalParticipantCount = value.length;
return object2;
}
function _fun76240() { // fn#76240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1763, offset: 0x01dc83fe, size: 154 bytes, params: 1, frame: 17
const object = {};
const channelBinding = channel;
const value2 = undefined;
let r1 = channelBinding == null ? value2 : channel.isMultiUserDM();
r1 = r1 === true ? ChannelRTCStore.getParticipants(channel.id) : NO_PARTICIPANTS;
object.callParticipants = r1;
object.participantsVersion = (channel == null ? value2 : channel.isMultiUserDM()) !== true ? -1 : ChannelRTCStore.getParticipantsVersion(channel.id);
return object;
}
function _fun76243() { // fn#76243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2296, offset: 0x01dc84f0, size: 132 bytes, params: 1, frame: 16
var value2;
var moduleValue;
let value = a0;
const r4 = value !== undefined ? value : false;
let channelBinding = channel;
if (channelBinding != null) {
channelBinding = channel;
if (channelBinding.isPrivate()) {
value2 = environment.__proto__;
value = (importDefault(7708) /* metro dependency 7708: getPrivateChannelCall */)(channel, r4);
if (value.inCall) {
value.onPress();
} else {
moduleValue = require(9708) /* metro dependency 9708: ConfirmStartCall */;
moduleValue.confirmStartCall(value.onPress);
function _fun76241() { // fn#76241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1980, offset: 0x01dc8498, size: 61 bytes, params: 1, frame: 14
const value = callParticipants.filter(function({type}) {
return type === ParticipantTypes.USER;
});
const object = {};
object.visibleParticipants = value.slice(0, 5);
object.totalParticipantCount = value.length;
return object;
}
function _fun76243() { // fn#76243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2296, offset: 0x01dc84f0, size: 132 bytes, params: 1, frame: 16
var value2;
var moduleValue;
let value = a0;
const r4 = value !== undefined ? value : false;
let channelBinding = channel;
if (channelBinding != null) {
channelBinding = channel;
if (channelBinding.isPrivate()) {
value2 = environment.__proto__;
value = (importDefault(7708) /* metro dependency 7708: getPrivateChannelCall */)(channel, r4);
if (value.inCall) {
value.onPress();
} else {
moduleValue = require(9708) /* metro dependency 9708: ConfirmStartCall */;
moduleValue.confirmStartCall(value.onPress);
}
}
}
}
}
}
function _fun76244() { // fn#76244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2435, offset: 0x01dc8574, size: 18 bytes, params: 1, frame: 11
env0_12(false);
}
function _fun76245() { // fn#76245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2470, offset: 0x01dc8586, size: 18 bytes, params: 1, frame: 11
env0_12(true);
}
function _fun76246() { // fn#76246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2505, offset: 0x01dc8598, size: 194 bytes, params: 1, frame: 18
var guildId;
var isThread2;
var moduleValue2;
const channelHeaderModule = require(9709) /* metro dependency 9709: ChannelHeader */;
const navigateToChannelDetails = channelHeaderModule.navigateToChannelDetails;
const channelIdBinding = channelId;
Reflect.apply(navigateToChannelDetails, channelHeaderModule, [channelIdBinding, screenIndex,
'private-channel-search-button']);
setIsChannelDetailsSearchActive(channelIdBinding, true, 'action');
let channelBinding = channel;
if (channelBinding != null) {
channelBinding = channel;
guildId = channelBinding.getGuildId();
isThread2 = channelBinding.isThread();
moduleValue2 = require(9672) /* metro dependency 9672: useSearchContext */;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchOpened({searchContext: moduleValue2.getChannelDetailsSearchContext(channelId,
guildId, isThread2), searchLocation: SearchEntrypointAnalyticsLocations.INDIVIDUAL_DM});
}
}
function _fun76247() { // fn#76247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2801, offset: 0x01dc865a, size: 227 bytes, params: 1, frame: 20
var value5;
var defaultImport;
var defaultImport2;
if (env0_4 != null && channel != null && application != null) {
value5 = environment.__proto__;
defaultImport = importDefault(dependencyMap[25]);
defaultImport.trackWithMetadata(AnalyticEvents.SETTINGS_PANE_VIEWED, {'settings_type': 'user',
'destination_pane': null, 'source_page': 'app_dm_settings',
destination_pane: AnalyticsSections.SETTINGS_APP_DMS_MENU, application_id: application.id});
defaultImport2 = importDefault(dependencyMap[26]);
defaultImport2.openLazy(require(dependencyMap[28])(dependencyMap[27], dependencyMap.paths),
'AppDMOptionsBottomSheet', {userId: env0_4, channel: channel, application: application});
}
}
function _fun76248() { // fn#76248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:3128, offset: 0x01dc873d, size: 252 bytes, params: 1, frame: 19
var r0;
var PressableOpacity;
var intl;
if (env0_6) {
const SafetyToolsButton = (require(9727) /* metro dependency 9727: SafetyToolsButton */).SafetyToolsButton;
r0 = <SafetyToolsButton channelId={channelId} recipientId={env0_4} warningId={env0_5.id} warningType={env0_5.type} />;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {style: styles.button, onPress: env0_14};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
pressableOpacityProps.accessibilityRole = 'button';
r0 = <PressableOpacity {...pressableOpacityProps}>{((MagnifyingGlassIcon) => <MagnifyingGlassIcon size="sm" />)((require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon)}</PressableOpacity>;
}
return r0;
}
function PrivateChannelButtonsOnPress_76250() { // fn#76250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:4669, owner: PrivateChannelButtons.onPress, offset: 0x01dc8896, size: 76 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_10) {
if (channel != null) {
value2 = environment.__proto__;
moduleValue = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
moduleValue.openChannelCallModal(channel);
} else {
env0_13();
function _fun76244() { // fn#76244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2435, offset: 0x01dc8574, size: 18 bytes, params: 1, frame: 11
(0, ConstantsModule.AnalyticEvents)(false);
}
} else {
env0_13();
function _fun76245() { // fn#76245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2470, offset: 0x01dc8586, size: 18 bytes, params: 1, frame: 11
(0, ConstantsModule.AnalyticEvents)(true);
}
function _fun76246() { // fn#76246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2505, offset: 0x01dc8598, size: 194 bytes, params: 1, frame: 18
var guildId;
var isThread2;
var moduleValue2;
const navigateToChannelDetails = ChannelHeaderModule.navigateToChannelDetails;
const channelIdBinding = channelId;
Reflect.apply(navigateToChannelDetails, ChannelHeaderModule, [channelIdBinding, screenIndex,
'private-channel-search-button']);
setIsChannelDetailsSearchActive(channelIdBinding, true, 'action');
let channelBinding = channel;
if (channelBinding != null) {
channelBinding = channel;
guildId = channelBinding.getGuildId();
isThread2 = channelBinding.isThread();
moduleValue2 = require(9672) /* metro dependency 9672: useSearchContext */;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchOpened({searchContext: moduleValue2.getChannelDetailsSearchContext(channelId,
guildId, isThread2), searchLocation: SearchEntrypointAnalyticsLocations.INDIVIDUAL_DM});
}
}
function _fun76247() { // fn#76247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2801, offset: 0x01dc865a, size: 227 bytes, params: 1, frame: 20
var value5;
var defaultImport;
var defaultImport2;
if (ReactNativeModule.View != null && channel != null && application != null) {
value5 = environment.__proto__;
defaultImport = importDefault(dependencyMap[25]);
defaultImport.trackWithMetadata(AnalyticEvents.SETTINGS_PANE_VIEWED, {'settings_type': 'user',
'destination_pane': null, 'source_page': 'app_dm_settings',
destination_pane: AnalyticsSections.SETTINGS_APP_DMS_MENU, application_id: application.id});
defaultImport2 = importDefault(dependencyMap[26]);
defaultImport2.openLazy(require(dependencyMap[28])(dependencyMap[27], dependencyMap.paths),
'AppDMOptionsBottomSheet', {userId: ReactNativeModule.View, channel: channel, application: application});
}
}
function _fun76248() { // fn#76248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:3128, offset: 0x01dc873d, size: 252 bytes, params: 1, frame: 19
var r0;
var PressableOpacity;
var intl;
if (ChannelRTCStoreModule.NO_PARTICIPANTS) {
const SafetyToolsButton = (require(9727) /* metro dependency 9727: SafetyToolsButton */).SafetyToolsButton;
r0 = (
<SafetyToolsButton
channelId={channelId}
recipientId={ReactNativeModule.View}
warningId={env0_5.id}
warningType={env0_5.type}
/>
);
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {style: styles.button, onPress: ConstantsModule.ChannelTypes};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
pressableOpacityProps.accessibilityRole = 'button';
r0 = (
<PressableOpacity {...pressableOpacityProps}>
{((MagnifyingGlassIcon) => <MagnifyingGlassIcon size="sm" />)((require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon)}
</PressableOpacity>
);
}
return r0;
}
function PrivateChannelButtonsOnPress_76250() { // fn#76250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:4669, owner: PrivateChannelButtons.onPress, offset: 0x01dc8896, size: 76 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_10) {
if (channel != null) {
value2 = environment.__proto__;
moduleValue = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
moduleValue.openChannelCallModal(channel);
} else {
env0_13();
}
} else {
env0_13();
}
}
function _fun76251(a0, a1) { // fn#76251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:5044, offset: 0x01dc88e2, size: 205 bytes, params: 3, frame: 25
const value2 = visibleParticipants.length - 1;
const value4 = undefined;
const CutoutableAvatarImage = (NativeModule).CutoutableAvatarImage;
const object2 = {};
const PX_4 = a1 !== 0 ? -6 : (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.marginLeft = PX_4;
const user = a0.user;
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
<CutoutableAvatarImage
style={object2}
user={user}
guildId={value4}
size={XSMALL}
cutout={a1 !== value2 || totalParticipantCount > 5 ? env1_20 : value4}
key={a0.id}
/>
);
}
}
}
function _fun76251(a0, a1) { // fn#76251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:5044, offset: 0x01dc88e2, size: 205 bytes, params: 3, frame: 25
const value2 = visibleParticipants.length - 1;
const value4 = undefined;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
const object = {};
const PX_4 = a1 !== 0 ? -6 : (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.marginLeft = PX_4;
const user = a0.user;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
<CutoutableAvatarImage
style={object}
user={user}
guildId={value4}
size={XSMALL}
cutout={a1 !== value2 || totalParticipantCount > 5 ? env1_20 : value4}
key={a0.id}
/>
);
}
global.__d(_fun76235, 9700, [31, 27, 4606, 1379, 3793, 1878, 4297, 9613, 661, 4299, 1933, 9614, 33, 1305, 4501, 697,
566, 9701, 8214, 9707, 7708, 9708, 9709, 9672, 9673, 4863, 4080, 9726, 1962, 5278, 1244, 6998, 9727, 8876, 3853,
683, 9757, 7002, 7709, 6711, 9616, 8850, 4573, 9759,
2]) /* metro module 9700, dependencies: [31, 27, 4606, 1379, 3793, 1878, 4297, 9613, 661, 4299, 1933, 9614, 33, 1305, 4501, 697, 566, 9701, 8214, 9707, 7708, 9708, 9709, 9672, 9673, 4863, 4080, 9726, 1962, 5278, 1244, 6998, 9727, 8876, 3853, 683, 9757, 7002, 7709, 6711, 9616, 8850, 4573, 9759, 2] */;
@@ -1,132 +1,150 @@
/* Metro module 9714; source: modules/main_tabs_v2/native/channel/header/PrivateChannelHeader.tsx; dependencies: [31, 1379, 4396, 3793, 1878, 661, 33, 1305, 4501, 697, 566, 9709, 4805, 1244, 8829, 9715, 3995, 9717, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import PresenceStore from '../../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ChannelHeaderSharedModule from './ChannelHeaderShared.tsx'; /* Metro dependency 9717 */
function _fun76317(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:6, offset: 0x01dca5f7, size: 387 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.ChannelTypes;
const env0_9 = constantsModule.StatusTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.Fragment;
const env0_12 = value3.jsxs;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let value = ReactModule;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const env0_13 = AVATAR_SIZE_MAP[REFRESH_MEDIUM_32];
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
const env0_14 = Reflect.apply(createStyles, createStylesModule, [{activityStatusText: {color: TEXT_MUTED}}]);
const createStyles = CreateStylesModule.createStyles;
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [{activityStatusText: {color: TEXT_MUTED}}]);
value = value.memo(PrivateChannelHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/PrivateChannelHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/PrivateChannelHeader.tsx');
exports.default = value;
}
function GroupDmMemberCount({channel}) { // fn#76318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:373, offset: 0x01dca77a, size: 114 bytes, params: 2, frame: 19
const value = (FluxModule).useStateFromStores([UserStore, PresenceStore],
_fun76319);
return ChannelHeaderSharedModule.renderMemberCountText(value, channel.recipients.length);
function _fun76319() { // fn#76319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:455, offset: 0x01dca7ec, size: 111 bytes, params: 1, frame: 17
const recipients = channel.recipients;
const items2 = [];
const value = arraySpread(items2, recipients, 0, undefined);
items2[value] = UserStore.getCurrentUser()?.id ?? '0';
value + 1;
return items2.reduce(_fun76320, 0);
function _fun76320(a0, a1) { // fn#76320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:557, offset: 0x01dca85b, size: 81 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__;
const status = PresenceStore.getStatus(a1);
const INVISIBLE = StatusTypes.INVISIBLE;
return a0 + (status === INVISIBLE || status === StatusTypes.OFFLINE || status === StatusTypes.UNKNOWN ? 0 : 1);
}
function GroupDmMemberCount({channel}) { // fn#76318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:373, offset: 0x01dca77a, size: 114 bytes, params: 2, frame: 19
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, PresenceStore],
_fun76319);
const channelHeaderSharedModule = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
return channelHeaderSharedModule.renderMemberCountText(value, channel.recipients.length);
}
}
function PrivateChannelHeader({channelId, screenIndex, pressable}) { // fn#76321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:730, offset: 0x01dca8ac, size: 1120 bytes, params: 2, frame: 33
var r15;
var r11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var moduleValue4;
var moduleValue6;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun76323);
const env0_3 = value3;
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun76324);
const value5 = env0_3.useCallback(_fun76325, [channelId, screenIndex]);
if (channel != null) {
moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */;
r15 = moduleValue4.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r15 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ai6Lbr);
}
let r0 = value3 != null ? ((Component) => <Component userId={value3.id} guildId={channel?.guild_id} textStyle={styles.activityStatusText} />)(importDefault(8829) /* metro dependency 8829: ActivityStatus */) : null;
if ((require(9715) /* metro dependency 9715: ChatLoadingIndicator */).useShouldChannelShowLoadingIndicator(channelId)) {
const ChannelHeaderLoadingIndicator = (require(9715) /* metro dependency 9715: ChatLoadingIndicator */).ChannelHeaderLoadingIndicator;
r0 = <ChannelHeaderLoadingIndicator />;
} else {
r0 = channel != null && channel.isMultiUserDM() ? <GroupDmMemberCount channel={channel} /> : r0;
}
const formatToPlainString = intl.formatToPlainString;
const UbNmGc = (require(1244) /* metro dependency 1244: indexNative */).t.UbNmGc;
const value13 = Reflect.apply(formatToPlainString, intl, [UbNmGc, {channelName: r15}]);
if (value3 == null) {
r11 = null;
} else if (value3.isSystemUser()) {
r11 = null;
} else {
moduleValue6 = require(3995) /* metro dependency 3995: UserUtils */;
r11 = moduleValue6.humanizeStatus(status, {isMobile: isMobileOnline, isVR: isVROnline});
}
const value15 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x87QCk);
const r8 = r11 != null ? '' + value13 + ', ' + r11 + ', ' + value15 : '' + value13 + ', ' + value15;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const items2 = [value3 != null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderUserAvatar(value3,
status, isMobileOnline,
isVROnline) : channel == null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderEmptyIcon() : channel.isGroupDM() ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderGroupDMIcon(channel) : (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderEmptyIcon()];
const channelHeaderSharedModule = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
items2[1] = channelHeaderSharedModule.renderChannelTitle(r15, {accessibleTitle: value13, subtitle: r0,
disableArrow: !pressable, userId: value3?.id, guildId: channel?.guild_id});
const fragment = <>{items2}</>;
if (pressable) {
return (
function PrivateChannelHeader({channelId, screenIndex, pressable}) { // fn#76321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:730, offset: 0x01dca8ac, size: 1120 bytes, params: 2, frame: 33
var r15;
var r11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var moduleValue4;
var moduleValue6;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun76323);
const env0_3 = value3;
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun76324);
const value5 = env0_3.useCallback(_fun76325, [channelId, screenIndex]);
if (channel != null) {
moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */;
r15 = moduleValue4.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r15 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ai6Lbr);
}
let r0 = (
value3 != null
? ((Component) => <Component userId={value3.id} guildId={channel?.guild_id} textStyle={styles.activityStatusText} />)(importDefault(8829) /* metro dependency 8829: ActivityStatus */)
: null
);
if ((require(9715) /* metro dependency 9715: ChatLoadingIndicator */).useShouldChannelShowLoadingIndicator(channelId)) {
const ChannelHeaderLoadingIndicator = (require(9715) /* metro dependency 9715: ChatLoadingIndicator */).ChannelHeaderLoadingIndicator;
r0 = <ChannelHeaderLoadingIndicator />;
} else {
r0 = (
channel != null && channel.isMultiUserDM()
? (
<GroupDmMemberCount channel={channel} />
)
: r0
);
}
const formatToPlainString = intl.formatToPlainString;
const UbNmGc = (require(1244) /* metro dependency 1244: indexNative */).t.UbNmGc;
const value13 = Reflect.apply(formatToPlainString, intl, [UbNmGc, {channelName: r15}]);
if (value3 == null) {
r11 = null;
} else if (value3.isSystemUser()) {
r11 = null;
} else {
moduleValue6 = require(3995) /* metro dependency 3995: UserUtils */;
r11 = moduleValue6.humanizeStatus(status, {isMobile: isMobileOnline, isVR: isVROnline});
}
const value15 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x87QCk);
const r8 = r11 != null ? '' + value13 + ', ' + r11 + ', ' + value15 : '' + value13 + ', ' + value15;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const items2 = [value3 != null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderUserAvatar(value3,
status, isMobileOnline,
isVROnline) : channel == null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderEmptyIcon() : channel.isGroupDM() ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderGroupDMIcon(channel) : (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderEmptyIcon()];
const channelHeaderSharedModule = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
items2[1] = channelHeaderSharedModule.renderChannelTitle(r15, {accessibleTitle: value13, subtitle: r0,
disableArrow: !pressable, userId: value3?.id, guildId: channel?.guild_id});
const fragment = (
<>
{channelHeaderSharedModule.renderTitleWrapper(fragment, value5, r8, r0 != null ? 44 : env0_13)}
{items2}
</>
);
if (pressable) {
return (
<>
{channelHeaderSharedModule.renderTitleWrapper(fragment, value5, r8, r0 != null ? 44 : env0_13)}
</>
);
}
return fragment;
function _fun76323() { // fn#76323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:903, offset: 0x01dcad26, size: 77 bytes, params: 1, frame: 13
const channelBinding = channel;
const value2 = undefined;
const type = channelBinding == null ? value2 : channel.type;
const DM = ChannelTypes.DM;
return type !== DM ? value2 : UserStore.getUser(channel.getRecipientId());
}
function _fun76324() { // fn#76324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:1018, offset: 0x01dcad73, size: 149 bytes, params: 1, frame: 15
return {isMobileOnline: env0_3 != null && PresenceStore.isMobileOnline(env0_3.id),
isVROnline: env0_3 != null && PresenceStore.isVROnline(env0_3.id),
status: env0_3 != null ? PresenceStore.getStatus(env0_3.id) : StatusTypes.UNKNOWN};
}
function _fun76325() { // fn#76325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:1219, offset: 0x01dcae08, size: 57 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9709) /* metro dependency 9709: ChannelHeader */;
value.navigateToChannelDetails(channelId, screenIndex, 'private-channel-header-title');
}
}
return fragment;
}
function _fun76319() { // fn#76319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:455, offset: 0x01dca7ec, size: 111 bytes, params: 1, frame: 17
const recipients = channel.recipients;
const items2 = [];
const value = arraySpread(items2, recipients, 0, undefined);
items2[value] = UserStore.getCurrentUser()?.id ?? '0';
value + 1;
return items2.reduce(_fun76320, 0);
}
function _fun76323() { // fn#76323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:903, offset: 0x01dcad26, size: 77 bytes, params: 1, frame: 13
const channelBinding = channel;
const value2 = undefined;
const type = channelBinding == null ? value2 : channel.type;
const DM = ChannelTypes.DM;
return type !== DM ? value2 : UserStore.getUser(channel.getRecipientId());
}
function _fun76324() { // fn#76324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:1018, offset: 0x01dcad73, size: 149 bytes, params: 1, frame: 15
return {isMobileOnline: env0_3 != null && PresenceStore.isMobileOnline(env0_3.id),
isVROnline: env0_3 != null && PresenceStore.isVROnline(env0_3.id),
status: env0_3 != null ? PresenceStore.getStatus(env0_3.id) : StatusTypes.UNKNOWN};
}
function _fun76325() { // fn#76325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:1219, offset: 0x01dcae08, size: 57 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9709) /* metro dependency 9709: ChannelHeader */;
value.navigateToChannelDetails(channelId, screenIndex, 'private-channel-header-title');
}
function _fun76320(a0, a1) { // fn#76320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:557, offset: 0x01dca85b, size: 81 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__;
const status = PresenceStore.getStatus(a1);
const INVISIBLE = StatusTypes.INVISIBLE;
return a0 + (status === INVISIBLE || status === StatusTypes.OFFLINE || status === StatusTypes.UNKNOWN ? 0 : 1);
}
global.__d(_fun76317, 9714, [31, 1379, 4396, 3793, 1878, 661, 33, 1305, 4501, 697, 566, 9709, 4805, 1244, 8829,
9715, 3995, 9717,
2]) /* metro module 9714, dependencies: [31, 1379, 4396, 3793, 1878, 661, 33, 1305, 4501, 697, 566, 9709, 4805, 1244, 8829, 9715, 3995, 9717, 2] */;
@@ -1,16 +1,27 @@
/* Metro module 11284; source: modules/main_tabs_v2/native/channel/useChannelSafeAreaBottomStyles.tsx; dependencies: [31, 4257, 3785, 1379, 4259, 4294, 661, 1386, 4501, 697, 11285, 6632, 4022, 632, 1583, 477, 1357, 3860, 7701, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import LurkingStore from '../../../lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */
import UseKeyboardType from '../../../keyboard/native/useKeyboardType.tsx'; /* Metro dependency 4022 */
import GatewayConnectionStore from '../../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import UseChannelRoleSubscriptionStatus from '../../../guild_role_subscriptions/useChannelRoleSubscriptionStatus.tsx'; /* Metro dependency 6632 */
import UseCreateThreadViewProps from '../../../threads/native/useCreateThreadViewProps.tsx'; /* Metro dependency 11285 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as ChannelConstantsModule from '../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as KeyboardTypesModule from '../../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
function _fun86159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:6, offset: 0x01f89dcf, size: 366 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).InputModes;
const env0_10 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
object = {LURKER: 'lurker', VOICE: 'voice', CHAT: 'chat', DIRECTORY: 'directory', EXPRESSION_PICKER: 'expression',
MEDIA: 'media', APPS: 'apps', NONE: 'none'};
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
@@ -23,358 +34,416 @@ function _fun86159(global, require, importDefault, importAll, module, exports, d
object.expressionPickerBackground = {backgroundColor: importDefault(dependencyMap[9]).colors.MOBILE_KEYBOARD_GAP_BACKGROUND};
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/useChannelSafeAreaBottomStyles.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/useChannelSafeAreaBottomStyles.tsx');
exports.default = useChannelSafeAreaBottomStyles;
}
function useChannelSafeAreaBottomStyles(a0) { // fn#86161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:738, offset: 0x01f89fa8, size: 232 bytes, params: 2, frame: 19
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'useChannelSafeAreaBottomStyles'}]).chatInputFloating;
const moduleValue2 = mobileVisualRefreshExperimentModule;
const resolveRefreshToken = moduleValue2.resolveRefreshToken;
const CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND;
const styles = useStyles((require(3860) /* metro dependency 3860: useToken */).useToken(Reflect.apply(resolveRefreshToken,
moduleValue2, [CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND, chatInputFloating])));
return env0_3.useMemo(_fun86164, [styles,
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom(),
useChannelSafeAreaBottomType(a0)]);
}
function useChannelSafeAreaBottomType(a0) { // fn#86162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1044, owner: useChannelSafeAreaBottomStyles.useChannelSafeAreaBottomType, offset: 0x01f8a090, size: 176 bytes, params: 2, frame: 17
const env0_0 = a0;
const result = (importDefault(11285) /* metro dependency 11285: useCreateThreadViewProps */)(a0) != null;
const env0_2 = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(a0).needSubscriptionToAccess;
const env0_3 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GatewayConnectionStore,
ChannelStore, LurkingStore, MediaEngineStore, RTCConnectionStore], _fun86163);
}
function _fun86164() { // fn#86164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1824, offset: 0x01f8a3b9, size: 261 bytes, params: 1, frame: 13
var r0;
var object2;
var stylesBinding;
let binding = env0_2;
const NONE = env1_11.NONE;
if (binding !== NONE) {
binding = env0_2;
var DIRECTORY = env1_11.DIRECTORY;
if (binding !== DIRECTORY) {
if (env0_2 === env1_11.EXPRESSION_PICKER) {
r0 = styles.expressionPickerBackground;
} else if (env0_2 === env1_11.MEDIA) {
r0 = styles.expressionPickerBackground;
} else if (env0_2 === env1_11.APPS) {
r0 = styles.expressionPickerBackground;
} else if (env0_2 === env1_11.CHAT) {
object2 = {};
stylesBinding = styles;
copyDataProperties(object2, env0_1, copyDataProperties(object2, stylesBinding.chat, stylesBinding));
r0 = object2;
} else if (env0_2 === env1_11.VOICE) {
object2 = {};
stylesBinding = styles;
copyDataProperties(object2, env0_1, copyDataProperties(object2, stylesBinding.voice, stylesBinding));
r0 = object2;
} else {
object2 = {};
stylesBinding = styles;
copyDataProperties(object2, stylesBinding[env0_2], stylesBinding);
copyDataProperties(object2, env0_1, stylesBinding);
r0 = object2;
function useChannelSafeAreaBottomStyles(a0) { // fn#86161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:738, offset: 0x01f89fa8, size: 232 bytes, params: 2, frame: 19
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'useChannelSafeAreaBottomStyles'}]).chatInputFloating;
const resolveRefreshToken = MobileVisualRefreshExperimentModule.resolveRefreshToken;
const CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND = (Native).modules.mobile.CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND;
const styles = useStyles((UseTokenModule).useToken(Reflect.apply(resolveRefreshToken,
MobileVisualRefreshExperimentModule, [CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND, chatInputFloating])));
return ReactModule.useMemo(_fun86164, [styles,
(ClientThemesOverridesModule).useGradientBottom(),
useChannelSafeAreaBottomType(a0)]);
function useChannelSafeAreaBottomType(a0) { // fn#86162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1044, owner: useChannelSafeAreaBottomStyles.useChannelSafeAreaBottomType, offset: 0x01f8a090, size: 176 bytes, params: 2, frame: 17
const env0_0 = a0;
const result = (UseCreateThreadViewProps)(a0) != null;
const env0_2 = (UseChannelRoleSubscriptionStatus)(a0).needSubscriptionToAccess;
const env0_3 = (UseKeyboardType)();
return (UseStateFromStoresModule).useStateFromStores([GatewayConnectionStore,
ChannelStore, LurkingStore, MediaEngineStore, RTCConnectionStore], _fun86163);
function _fun86163() { // fn#86163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1209, offset: 0x01f8a140, size: 633 bytes, params: 1, frame: 19
var r0;
var r2;
var gatewayConnectionStoreBinding;
var rtcConnectionStoreBinding;
const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes;
var moduleValue;
var moduleValue2;
var moduleValue3;
var lurkingStoreBinding;
const channel = ChannelStore.getChannel(env0_0);
const value4 = undefined;
const r9 = channel == null ? value4 : channel.getGuildId();
const binding = env0_0;
const GUILD_HOME = StaticChannelRoute.GUILD_HOME;
if (binding === GUILD_HOME) {
r0 = env2_11.NONE;
} else if (env0_0 === StaticChannelRoute.ROLE_SUBSCRIPTIONS) {
r0 = env2_11.NONE;
} else if (needSubscriptionToAccess) {
r0 = env2_11.NONE;
} else {
gatewayConnectionStoreBinding = GatewayConnectionStore;
if (gatewayConnectionStoreBinding.isConnected()) {
if (MediaEngineStore.getMode() !== InputModes.PUSH_TO_TALK) {
if (env0_3 !== KeyboardTypes.EXPRESSION) {
if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
}
} else {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
r2 = env2_11.EXPRESSION_PICKER;
} else if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
}
}
} else {
rtcConnectionStoreBinding = RTCConnectionStore;
if (rtcConnectionStoreBinding.getChannelId() != null) {
r2 = env2_11.VOICE;
} else if (env0_3 !== KeyboardTypes.EXPRESSION) {
if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
}
} else {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
r2 = env2_11.EXPRESSION_PICKER;
} else if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else {
lurkingStoreBinding = LurkingStore;
if (lurkingStoreBinding.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
}
}
}
r0 = r2;
} else {
r0 = env0_0 == null ? env2_11.NONE : env2_11.CHAT;
}
}
return r0;
}
return r0;
}
}
}
function _fun86163() { // fn#86163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1209, offset: 0x01f8a140, size: 633 bytes, params: 1, frame: 19
var r0;
var r2;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var moduleValue;
var moduleValue2;
var moduleValue3;
const channel = ChannelStore.getChannel(env0_0);
const value4 = undefined;
const r9 = channel == null ? value4 : channel.getGuildId();
const binding = env0_0;
const GUILD_HOME = StaticChannelRoute.GUILD_HOME;
if (binding === GUILD_HOME) {
r0 = env2_11.NONE;
} else if (env0_0 === StaticChannelRoute.ROLE_SUBSCRIPTIONS) {
r0 = env2_11.NONE;
} else if (needSubscriptionToAccess) {
r0 = env2_11.NONE;
} else if (GatewayConnectionStore.isConnected()) {
if (MediaEngineStore.getMode() !== InputModes.PUSH_TO_TALK) {
if (env0_3 !== KeyboardTypes.EXPRESSION) {
if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
function _fun86164() { // fn#86164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1824, offset: 0x01f8a3b9, size: 261 bytes, params: 1, frame: 13
var r0;
var object;
var stylesBinding;
let binding = env0_2;
const NONE = env1_11.NONE;
if (binding !== NONE) {
binding = env0_2;
var DIRECTORY = env1_11.DIRECTORY;
if (binding !== DIRECTORY) {
if (env0_2 === env1_11.EXPRESSION_PICKER) {
r0 = styles.expressionPickerBackground;
} else if (env0_2 === env1_11.MEDIA) {
r0 = styles.expressionPickerBackground;
} else if (env0_2 === env1_11.APPS) {
r0 = styles.expressionPickerBackground;
} else if (env0_2 === env1_11.CHAT) {
object = {};
stylesBinding = styles;
copyDataProperties(object, env0_1, copyDataProperties(object, stylesBinding.chat, stylesBinding));
r0 = object;
} else if (env0_2 === env1_11.VOICE) {
object = {};
stylesBinding = styles;
copyDataProperties(object, env0_1, copyDataProperties(object, stylesBinding.voice, stylesBinding));
r0 = object;
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
} else {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
r2 = env2_11.EXPRESSION_PICKER;
} else if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
}
} else if (RTCConnectionStore.getChannelId() != null) {
r2 = env2_11.VOICE;
} else if (env0_3 !== KeyboardTypes.EXPRESSION) {
if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
}
} else {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
r2 = env2_11.EXPRESSION_PICKER;
} else if (env0_3 !== KeyboardTypes.MEDIA) {
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r2 = env2_11.MEDIA;
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
}
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue3.isAndroid()) {
r2 = env2_11.APPS;
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
r2 = env2_11.DIRECTORY;
} else if (r9 == null) {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
} else if (LurkingStore.isLurking(r9)) {
r2 = env2_11.LURKER;
} else {
r2 = channel == null ? value4 : channel.isForumLikeChannel();
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
object = {};
stylesBinding = styles;
copyDataProperties(object, stylesBinding[env0_2], stylesBinding);
copyDataProperties(object, env0_1, stylesBinding);
r0 = object;
}
return r0;
}
}
}
r0 = r2;
} else {
r0 = env0_0 == null ? env2_11.NONE : env2_11.CHAT;
}
return r0;
}
global.__d(_fun86159, 11284, [31, 4257, 3785, 1379, 4259, 4294, 661, 1386, 4501, 697, 11285, 6632, 4022, 632, 1583,
477, 1357, 3860, 7701,
2]) /* metro module 11284, dependencies: [31, 4257, 3785, 1379, 4259, 4294, 661, 1386, 4501, 697, 11285, 6632, 4022, 632, 1583, 477, 1357, 3860, 7701, 2] */;
@@ -1,77 +1,86 @@
/* Metro module 11280; source: modules/main_tabs_v2/native/channel/useChannelSafeAreaHeightSharedValue.android.tsx; dependencies: [11281, 11283, 4022, 5466, 3860, 697, 1357, 4017, 1583, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseCustomKeyboardHeight from '../../../keyboard/native/useCustomKeyboardHeight.tsx'; /* Metro dependency 5466 */
import UseSafeAreaInsetsSharedValueNative from '../../../safe_area/useSafeAreaInsetsSharedValue.native.tsx'; /* Metro dependency 11281 */
import UseSafeAreaBottomKeyboardInfoController from './useSafeAreaBottomKeyboardInfoController.tsx'; /* Metro dependency 11283 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as KeyboardTypesModule from '../../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UseKeyboardTypeModule from '../../../keyboard/native/useKeyboardType.tsx'; /* Metro dependency 4022 */
function _fun86129(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:6, offset: 0x01f88cfa, size: 119 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function useChannelSafeAreaHeightSharedValueAndroidTsx1(){const{chatInputFloating,chatInputSpaceBottom,keyboardOpenOrOpening,keyboardWillOpenSharedValue,keyboardOpenedHeight,insets,keyboardTypeSharedValue,KeyboardTypes,customKeyboardHeight}=this.__closure;const resolveBottom=function(bottom){return chatInputFloating?Math.max(bottom,chatInputSpaceBottom):bottom;};if(keyboardOpenOrOpening.get()||keyboardWillOpenSharedValue.get()){const systemKeyboardHeight=keyboardOpenedHeight.get();if(systemKeyboardHeight<=0){return resolveBottom(insets.get().bottom);}return systemKeyboardHeight;}if(keyboardTypeSharedValue.get()===KeyboardTypes.SYSTEM){return resolveBottom(insets.get().bottom);}return customKeyboardHeight;}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/useChannelSafeAreaHeightSharedValue.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/useChannelSafeAreaHeightSharedValue.android.tsx');
exports.default = useChannelSafeAreaHeightSharedValue;
}
function useChannelSafeAreaHeightSharedValue() { // fn#86130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:950, offset: 0x01f88d71, size: 380 bytes, params: 1, frame: 24
const value2 = (UseSafeAreaInsetsSharedValueNative)();
const {keyboardOpenOrOpening,
keyboardOpenedHeight} = (UseSafeAreaBottomKeyboardInfoController)();
const value4 = (UseKeyboardTypeModule).useKeyboardTypeSharedValue();
const env0_3 = value4;
const value5 = (UseKeyboardTypeModule).useKeyboardWillOpenSharedValue();
const value6 = (UseCustomKeyboardHeight)();
const useToken = UseTokenModule.useToken;
const CHAT_INPUT_FLOATING_OFFSET_MINIMUM = (Native).modules.mobile.CHAT_INPUT_FLOATING_OFFSET_MINIMUM;
const value7 = Reflect.apply(useToken, UseTokenModule, [CHAT_INPUT_FLOATING_OFFSET_MINIMUM]);
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'ChatInput'}]).chatInputFloating;
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
const useChannelSafeAreaHeightSharedValueO2 = useChannelSafeAreaHeightSharedValueO;
object = {chatInputFloating: chatInputFloating, chatInputSpaceBottom: value7,
keyboardOpenOrOpening: keyboardOpenOrOpening, keyboardWillOpenSharedValue: value5,
keyboardOpenedHeight: keyboardOpenedHeight, insets: value2, keyboardTypeSharedValue: value4};
const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes;
object.KeyboardTypes = KeyboardTypes;
object.customKeyboardHeight = value6;
useChannelSafeAreaHeightSharedValueO2.__closure = object;
useChannelSafeAreaHeightSharedValueO2.__workletHash = 12201325230972;
useChannelSafeAreaHeightSharedValueO2.__initData = env0_3;
return Reflect.apply(useDerivedValue, ReanimatedRexportModule, [useChannelSafeAreaHeightSharedValueO2]);
function useChannelSafeAreaHeightSharedValueO() { // fn#86131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:1366, owner: useChannelSafeAreaHeightSharedValue.o, offset: 0x01f88eed, size: 175 bytes, params: 1, frame: 14
var r0;
var binding;
var value4;
const resolveBottom2 = resolveBottom;
const keyboardOpenOrOpeningBinding = keyboardOpenOrOpening;
const get = keyboardOpenOrOpeningBinding.get;
if (Reflect.apply(get, keyboardOpenOrOpeningBinding, [])) {
value4 = keyboardOpenedHeight.get();
r0 = value4 <= 0 ? resolveBottom2(env0_0.get().bottom) : value4;
} else {
if (Reflect.apply(env0_4.get, binding, [])) {
value4 = keyboardOpenedHeight.get();
return value4 <= 0 ? resolveBottom2(env0_0.get().bottom) : value4;
}
var value2 = env0_3.get();
var KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var SYSTEM = KeyboardTypes.SYSTEM;
r0 = value2 === SYSTEM ? resolveBottom2(env0_0.get().bottom) : env0_5;
}
return r0;
function resolveBottom(a0) { // fn#86132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:1395, owner: useChannelSafeAreaHeightSharedValue.o.resolveBottom, offset: 0x01f88f9c, size: 41 bytes, params: 2, frame: 14
var r0;
let value = a0;
if (chatInputFloating) {
value = global.Math.max(value, env1_6);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function useChannelSafeAreaHeightSharedValue() { // fn#86130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:950, offset: 0x01f88d71, size: 380 bytes, params: 1, frame: 24
var object2;
const value2 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
const {keyboardOpenOrOpening,
keyboardOpenedHeight} = (importDefault(11283) /* metro dependency 11283: useSafeAreaBottomKeyboardInfoController */)();
const value4 = (require(4022) /* metro dependency 4022: useKeyboardType */).useKeyboardTypeSharedValue();
const env0_3 = value4;
const value5 = (require(4022) /* metro dependency 4022: useKeyboardType */).useKeyboardWillOpenSharedValue();
const value6 = (importDefault(5466) /* metro dependency 5466: useCustomKeyboardHeight */)();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CHAT_INPUT_FLOATING_OFFSET_MINIMUM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_OFFSET_MINIMUM;
const value7 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_FLOATING_OFFSET_MINIMUM]);
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInput'}]).chatInputFloating;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = useChannelSafeAreaHeightSharedValueO;
object2 = {chatInputFloating: chatInputFloating, chatInputSpaceBottom: value7,
keyboardOpenOrOpening: keyboardOpenOrOpening, keyboardWillOpenSharedValue: value5,
keyboardOpenedHeight: keyboardOpenedHeight, insets: value2, keyboardTypeSharedValue: value4};
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
object2.KeyboardTypes = KeyboardTypes;
object2.customKeyboardHeight = value6;
closure.__closure = object2;
closure.__workletHash = 12201325230972;
closure.__initData = env0_3;
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
}
function useChannelSafeAreaHeightSharedValueO() { // fn#86131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:1366, owner: useChannelSafeAreaHeightSharedValue.o, offset: 0x01f88eed, size: 175 bytes, params: 1, frame: 14
var r0;
var binding;
var value4;
const closure = resolveBottom;
const keyboardOpenOrOpeningBinding = keyboardOpenOrOpening;
const get = keyboardOpenOrOpeningBinding.get;
if (Reflect.apply(get, keyboardOpenOrOpeningBinding, [])) {
value4 = keyboardOpenedHeight.get();
r0 = value4 <= 0 ? closure(env0_0.get().bottom) : value4;
} else {
if (Reflect.apply(env0_4.get, binding, [])) {
value4 = keyboardOpenedHeight.get();
return value4 <= 0 ? closure(env0_0.get().bottom) : value4;
}
var value2 = env0_3.get();
var KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var SYSTEM = KeyboardTypes.SYSTEM;
r0 = value2 === SYSTEM ? closure(env0_0.get().bottom) : env0_5;
}
return r0;
}
function resolveBottom(a0) { // fn#86132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:1395, owner: useChannelSafeAreaHeightSharedValue.o.resolveBottom, offset: 0x01f88f9c, size: 41 bytes, params: 2, frame: 14
var r0;
let value = a0;
if (chatInputFloating) {
value = global.Math.max(value, env1_6);
r0 = value;
} else {
r0 = value;
}
return r0;
}
global.__d(_fun86129, 11280, [11281, 11283, 4022, 5466, 3860, 697, 1357, 4017, 1583,
2]) /* metro module 11280, dependencies: [11281, 11283, 4022, 5466, 3860, 697, 1357, 4017, 1583, 2] */;
@@ -1,198 +1,205 @@
/* Metro module 11283; source: modules/main_tabs_v2/native/channel/useSafeAreaBottomKeyboardInfoController.tsx; dependencies: [31, 1581, 477, 1597, 1598, 1481, 1599, 4017, 1847, 2] */
import KeyboardStateDebugging from '../../../keyboard/KeyboardStateDebugging.tsx'; /* Metro dependency 1847 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as AppEntryKeyContextModule from '../../../window/native/AppEntryKeyContext.tsx'; /* Metro dependency 1481 */
import * as MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as Module01599Module from '../../../../by-id/module-01599.js'; /* Metro dependency 1599 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun86146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:6, offset: 0x01f89653, size: 196 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
let value = MetaQuestUtilsAndroidModule;
value = value.isMetaQuest();
object = {code: "function useSafeAreaBottomKeyboardInfoControllerTsx1(e){const{runOnJS,KeyboardStateDebugging,IS_SYSTEM_KEYBOARD_EXTERNAL,keyboardOverlapsCurrentAppEntry,keyboardOpenedHeight}=this.__closure;runOnJS(KeyboardStateDebugging.keyboardControllerWorkletEvent)('onStart',e.height);if(IS_SYSTEM_KEYBOARD_EXTERNAL)return;if(e.height>0&&keyboardOverlapsCurrentAppEntry.get()){keyboardOpenedHeight.set(e.height);}}"};
object = {code: "function useSafeAreaBottomKeyboardInfoControllerTsx2(e){const{runOnJS,KeyboardStateDebugging,IS_SYSTEM_KEYBOARD_EXTERNAL,keyboardOverlapsCurrentAppEntry,keyboardOpenedHeight}=this.__closure;runOnJS(KeyboardStateDebugging.keyboardControllerWorkletEvent)('onEnd',e.height);if(IS_SYSTEM_KEYBOARD_EXTERNAL)return;if(e.height>0&&keyboardOverlapsCurrentAppEntry.get()){keyboardOpenedHeight.set(e.height);}}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/useSafeAreaBottomKeyboardInfoController.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/channel/useSafeAreaBottomKeyboardInfoController.tsx');
exports.default = useSafeAreaBottomKeyboardInfoController;
exports.IS_SYSTEM_KEYBOARD_EXTERNAL = value;
}
function isKeyboardOverlappingAppEntry(a0) { // fn#86147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:132, offset: 0x01f89717, size: 153 bytes, params: 2, frame: 17
const env0_0 = a0;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
return isAndroid2 ? (importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */).getImeInsets(false,
a0) > 0 || !(require(1598) /* metro dependency 1598: AppEntryKey */).APP_ENTRY_KEYS.some(_fun86148) && null : !isAndroid2;
}
function useSafeAreaBottomKeyboardInfoController() { // fn#86149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1265, offset: 0x01f897f0, size: 519 bytes, params: 1, frame: 27
var object4;
var r1;
var value5;
const value2 = undefined;
const value3 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
const value4 = 0;
if (env0_4) {
r1 = value4;
} else {
value5 = (require(1599) /* metro dependency 1599 */).KeyboardController.state();
r1 = (value5 == null ? value2 : value5.height) ?? value4;
}
const r6 = value4 !== r1 && isKeyboardOverlappingAppEntry(value3) === true;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6 ? r1 : value4);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6);
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6);
let binding = value10;
binding.useEffect(_fun86150, [value3, value9, value8, value10]);
const moduleValue5 = require(1599) /* metro dependency 1599 */;
const useKeyboardHandler = moduleValue5.useKeyboardHandler;
object4 = {};
let closure = onStart_86157;
const object5 = {};
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object5.runOnJS = runOnJS;
object5.KeyboardStateDebugging = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
binding = env0_4;
object5.IS_SYSTEM_KEYBOARD_EXTERNAL = binding;
object5.keyboardOverlapsCurrentAppEntry = value10;
object5.keyboardOpenedHeight = value8;
closure.__closure = object5;
closure.__workletHash = 11726427166555;
closure.__initData = env0_5;
object4.onStart = closure;
closure = onEnd_86158;
const object6 = {};
object6.runOnJS = runOnJS;
object6.KeyboardStateDebugging = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
object6.IS_SYSTEM_KEYBOARD_EXTERNAL = binding;
object6.keyboardOverlapsCurrentAppEntry = value10;
object6.keyboardOpenedHeight = value8;
closure.__closure = object6;
closure.__workletHash = 15110866363831;
closure.__initData = env0_6;
object4.onEnd = closure;
Reflect.apply(useKeyboardHandler, moduleValue5, [object4, []]);
return {keyboardOpenOrOpening: value9, keyboardOpenedHeight: value8, keyboardOverlapsCurrentAppEntry: value10};
}
function _fun86148(a0) { // fn#86148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:263, offset: 0x01f897b0, size: 64 bytes, params: 2, frame: 14
var r0;
let value = a0 !== env0_0;
if (value) {
value = environment.__proto__;
value = importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */;
value = value.getImeInsets(false, a0);
value = value > 0;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun86150() { // fn#86150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1595, offset: 0x01f899f7, size: 234 bytes, params: 1, frame: 18
if (env1_4) {
return undefined;
}
const KeyboardEvents = (require(1599) /* metro dependency 1599 */).KeyboardEvents;
const env0_1 = KeyboardEvents.addListener('keyboardWillShow', _fun86152);
const env0_2 = KeyboardEvents.addListener('keyboardDidShow', _fun86153);
const env0_3 = KeyboardEvents.addListener('keyboardWillHide', _fun86154);
const env0_4 = KeyboardEvents.addListener('keyboardDidHide', _fun86155);
return _fun86156;
}
function useSafeAreaBottomKeyboardInfoControllerOnStart(a0) { // fn#86157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2440, owner: useSafeAreaBottomKeyboardInfoController.onStart, offset: 0x01f89cb9, size: 139 bytes, params: 2, frame: 17
var binding;
const value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS((importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerWorkletEvent)('onStart',
a0.height);
if (!env1_4) {
if (a0.height > 0 && env0_3.get()) {
binding = env0_1;
binding.set(a0.height);
}
}
}
function useSafeAreaBottomKeyboardInfoControllerOnEnd(a0) { // fn#86158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2782, owner: useSafeAreaBottomKeyboardInfoController.onEnd, offset: 0x01f89d44, size: 139 bytes, params: 2, frame: 17
var binding;
const value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS((importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerWorkletEvent)('onEnd',
a0.height);
if (!env1_4) {
if (a0.height > 0 && env0_3.get()) {
binding = env0_1;
binding.set(a0.height);
}
}
}
function handleKeyboardShow(a0) { // fn#86151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2240, offset: 0x01f89ae1, size: 110 bytes, params: 2, frame: 14
var value;
var isKeyboardOverlappingAppEntryBinding;
var isKeyboardOverlappingAppEntry2;
var binding;
if (!(a0 <= 0)) {
value = environment.__proto__.__proto__;
isKeyboardOverlappingAppEntryBinding = isKeyboardOverlappingAppEntry;
value = environment.__proto__;
isKeyboardOverlappingAppEntry2 = isKeyboardOverlappingAppEntryBinding(env1_0);
if (isKeyboardOverlappingAppEntry2 != null) {
env1_3.set(isKeyboardOverlappingAppEntry2);
}
if (isKeyboardOverlappingAppEntry2 !== false) {
if (isKeyboardOverlappingAppEntry2 === true) {
binding = env1_2;
binding.set(true);
binding = env1_1;
binding.set(a0);
function isKeyboardOverlappingAppEntry(a0) { // fn#86147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:132, offset: 0x01f89717, size: 153 bytes, params: 2, frame: 17
const env0_0 = a0;
const isAndroid2 = (PlatformUtilsModule).isAndroid();
return isAndroid2 ? (importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */).getImeInsets(false,
a0) > 0 || !(require(1598) /* metro dependency 1598: AppEntryKey */).APP_ENTRY_KEYS.some(_fun86148) && null : !isAndroid2;
function _fun86148(a0) { // fn#86148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:263, offset: 0x01f897b0, size: 64 bytes, params: 2, frame: 14
var r0;
let value = a0 !== env0_0;
if (value) {
value = environment.__proto__;
value = importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */;
value = value.getImeInsets(false, a0);
value = value > 0;
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
function useSafeAreaBottomKeyboardInfoController() { // fn#86149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1265, offset: 0x01f897f0, size: 519 bytes, params: 1, frame: 27
var r1;
var value5;
const value2 = undefined;
const value3 = (AppEntryKeyContextModule).useAppEntryKey();
const value4 = 0;
if (env0_4) {
r1 = value4;
} else {
env1_2.set(false);
value5 = (require(1599) /* metro dependency 1599 */).KeyboardController.state();
r1 = (value5 == null ? value2 : value5.height) ?? value4;
}
}
}
const r6 = value4 !== r1 && isKeyboardOverlappingAppEntry(value3) === true;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6 ? r1 : value4);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6);
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6);
let binding = value10;
binding.useEffect(_fun86150, [value3, value9, value8, value10]);
const moduleValue5 = require(1599) /* metro dependency 1599 */;
const useKeyboardHandler = moduleValue5.useKeyboardHandler;
object = {};
let closure = onStart_86157;
const object2 = {};
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.runOnJS = runOnJS;
object2.KeyboardStateDebugging = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
binding = env0_4;
object2.IS_SYSTEM_KEYBOARD_EXTERNAL = binding;
object2.keyboardOverlapsCurrentAppEntry = value10;
object2.keyboardOpenedHeight = value8;
closure.__closure = object2;
closure.__workletHash = 11726427166555;
closure.__initData = env0_5;
object.onStart = closure;
closure = onEnd_86158;
const object3 = {};
object3.runOnJS = runOnJS;
object3.KeyboardStateDebugging = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
object3.IS_SYSTEM_KEYBOARD_EXTERNAL = binding;
object3.keyboardOverlapsCurrentAppEntry = value10;
object3.keyboardOpenedHeight = value8;
closure.__closure = object3;
closure.__workletHash = 15110866363831;
closure.__initData = env0_6;
object.onEnd = closure;
Reflect.apply(useKeyboardHandler, moduleValue5, [object, []]);
return {keyboardOpenOrOpening: value9, keyboardOpenedHeight: value8, keyboardOverlapsCurrentAppEntry: value10};
function _fun86150() { // fn#86150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1595, offset: 0x01f899f7, size: 234 bytes, params: 1, frame: 18
if (env1_4) {
return undefined;
}
const KeyboardEvents = (Module01599Module).KeyboardEvents;
const env0_1 = KeyboardEvents.addListener('keyboardWillShow', _fun86152);
const env0_2 = KeyboardEvents.addListener('keyboardDidShow', _fun86153);
const env0_3 = KeyboardEvents.addListener('keyboardWillHide', _fun86154);
const env0_4 = KeyboardEvents.addListener('keyboardDidHide', _fun86155);
return _fun86156;
function handleKeyboardShow(a0) { // fn#86151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2240, offset: 0x01f89ae1, size: 110 bytes, params: 2, frame: 14
var value;
var isKeyboardOverlappingAppEntryBinding;
var isKeyboardOverlappingAppEntry2;
var binding;
if (!(a0 <= 0)) {
value = environment.__proto__.__proto__;
isKeyboardOverlappingAppEntryBinding = isKeyboardOverlappingAppEntry;
value = environment.__proto__;
isKeyboardOverlappingAppEntry2 = isKeyboardOverlappingAppEntryBinding(env1_0);
if (isKeyboardOverlappingAppEntry2 != null) {
env1_3.set(isKeyboardOverlappingAppEntry2);
}
if (isKeyboardOverlappingAppEntry2 !== false) {
if (isKeyboardOverlappingAppEntry2 === true) {
binding = env1_2;
binding.set(true);
binding = env1_1;
binding.set(a0);
}
} else {
env1_2.set(false);
}
}
}
function _fun86152(a0) { // fn#86152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1673, offset: 0x01f89b4f, size: 69 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
value.keyboardControllerKeyboardWillShow(a0.height);
handleKeyboardShow(a0.height);
}
function _fun86152(a0) { // fn#86152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1673, offset: 0x01f89b4f, size: 69 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
value.keyboardControllerKeyboardWillShow(a0.height);
handleKeyboardShow(a0.height);
}
function _fun86153(a0) { // fn#86153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1823, offset: 0x01f89b94, size: 69 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
value.keyboardControllerKeyboardDidShow(a0.height);
handleKeyboardShow(a0.height);
}
function _fun86153(a0) { // fn#86153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1823, offset: 0x01f89b94, size: 69 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
value.keyboardControllerKeyboardDidShow(a0.height);
handleKeyboardShow(a0.height);
}
function _fun86154() { // fn#86154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1973, offset: 0x01f89bd9, size: 82 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
(KeyboardStateDebugging).keyboardControllerKeyboardWillHide();
value = environment.__proto__;
const binding = env1_3;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
if (!env0_0) {
env1_2.set(false);
}
}
}
function _fun86155() { // fn#86155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2106, offset: 0x01f89c2b, size: 79 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
(KeyboardStateDebugging).keyboardControllerKeyboardDidHide();
value = environment.__proto__;
const binding = env1_3;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
env1_2.set(false);
}
}
function _fun86156() { // fn#86156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2190, offset: 0x01f89c7a, size: 63 bytes, params: 1, frame: 10
env0_1.remove();
env0_2.remove();
env0_3.remove();
env0_4.remove();
}
function _fun86154() { // fn#86154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1973, offset: 0x01f89bd9, size: 82 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
(importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerKeyboardWillHide();
value = environment.__proto__;
const binding = env1_3;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
if (!env0_0) {
env1_2.set(false);
}
function useSafeAreaBottomKeyboardInfoControllerOnStart(a0) { // fn#86157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2440, owner: useSafeAreaBottomKeyboardInfoController.onStart, offset: 0x01f89cb9, size: 139 bytes, params: 2, frame: 17
var binding;
const value = environment.__proto__;
ReanimatedRexportModule.runOnJS((KeyboardStateDebugging).keyboardControllerWorkletEvent)('onStart',
a0.height);
if (!env1_4) {
if (a0.height > 0 && ReactModule.get()) {
binding = env0_1;
binding.set(a0.height);
}
}
}
function useSafeAreaBottomKeyboardInfoControllerOnEnd(a0) { // fn#86158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2782, owner: useSafeAreaBottomKeyboardInfoController.onEnd, offset: 0x01f89d44, size: 139 bytes, params: 2, frame: 17
var binding;
const value = environment.__proto__;
ReanimatedRexportModule.runOnJS((KeyboardStateDebugging).keyboardControllerWorkletEvent)('onEnd',
a0.height);
if (!env1_4) {
if (a0.height > 0 && ReactModule.get()) {
binding = env0_1;
binding.set(a0.height);
}
}
}
}
}
function _fun86155() { // fn#86155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2106, offset: 0x01f89c2b, size: 79 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
(importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerKeyboardDidHide();
value = environment.__proto__;
const binding = env1_3;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
env1_2.set(false);
}
}
function _fun86156() { // fn#86156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2190, offset: 0x01f89c7a, size: 63 bytes, params: 1, frame: 10
env0_1.remove();
env0_2.remove();
env0_3.remove();
env0_4.remove();
}
global.__d(_fun86146, 11283, [31, 1581, 477, 1597, 1598, 1481, 1599, 4017, 1847,
2]) /* metro module 11283, dependencies: [31, 1581, 477, 1597, 1598, 1481, 1599, 4017, 1847, 2] */;
@@ -1,230 +1,310 @@
/* Metro module 15132; source: modules/main_tabs_v2/native/friends/FriendsNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 9606, 9603, 11944, 1244, 15133, 4884, 5280, 15134, 15140, 15153, 15154, 15155, 15161, 15162, 15163, 15165, 15168, 15169, 4003, 1585, 3868, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseColorThemeBackground from '../../../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
import PressableNavigatorButtonWrapper from '../shared_components/navigator/PressableNavigatorButtonWrapper.tsx'; /* Metro dependency 9606 */
import Module11944 from '../../../../by-id/module-11944.js'; /* Metro dependency 11944 */
import UseThemedHeaderOptions from '../../../client_themes/native/useThemedHeaderOptions.tsx'; /* Metro dependency 15133 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as TTIAnalyticsUtilsModule from '../../../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as HeaderSharedModule from '../shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun115344(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:6, offset: 0x0245d680, size: 329 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_7 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
object = {};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const MOBILE_ACTIONSHEET_BACKGROUND = (Native).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/FriendsNavigator.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/FriendsNavigator.tsx');
exports.default = ThemedFriendsNavigator;
}
function RequestsSettingsModalButton({onPress}) { // fn#115345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:402, offset: 0x0245d7c9, size: 163 bytes, params: 2, frame: 21
const PressableNavigatorButtonWrapper = importDefault(9606) /* metro dependency 9606: PressableNavigatorButtonWrapper */;
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
const object = {source: importDefault(11944) /* metro dependency 11944 */, onPress: onPress};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']);
return (
<PressableNavigatorButtonWrapper isModal>
<HeaderIconButton {...object} />
</PressableNavigatorButtonWrapper>
);
}
function FriendsNavigator() { // fn#115346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:607, offset: 0x0245d86c, size: 1187 bytes, params: 1, frame: 26
const env0_0 = useStyles();
const env0_1 = (importDefault(15133) /* metro dependency 15133: useThemedHeaderOptions */)();
env0_3.useLayoutEffect(_fun115347, []);
const env0_2 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const Navigator = env0_7.Navigator;
const object2 = {screenOptions: screenOptions_115348};
let Screen = env0_7.Screen;
const items2 = [<Screen name="root" options={function({navigation}) {
var object = {};
object.title = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t.TdEu5X);
object.headerRight = _fun115351;
return object;
}} getComponent={function() {
return require(dependencyMap[13]).default;
}} />];
Screen = env0_7.Screen;
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object3.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.jD1qzM]);
items2[1] = <Screen name="new-message" options={object3} getComponent={function() {
return require(dependencyMap[14]).default;
}} />;
Screen = env0_7.Screen;
const object5 = {};
object5.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3hF1W4']);
items2[2] = <Screen name="gdm" options={object5} getComponent={function() {
return require(dependencyMap[15]).default;
}} />;
Screen = env0_7.Screen;
const object7 = {};
object7.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
items2[3] = <Screen name="add-friend" options={object7} getComponent={function() {
return require(dependencyMap[16]).default;
}} />;
Screen = env0_7.Screen;
const object9 = {};
object9.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6);
items2[4] = <Screen name="add-friends" options={object9} getComponent={function() {
return require(dependencyMap[17]).default;
}} />;
Screen = env0_7.Screen;
string = intl.string;
const QzVsOs = (require(1244) /* metro dependency 1244: indexNative */).t.QzVsOs;
items2[5] = <Screen name="username-search" options={{title: Reflect.apply(string, intl,
[QzVsOs])}} getComponent={function() {
return require(dependencyMap[18]).default;
}} />;
Screen = env0_7.Screen;
const object11 = {};
object11.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1uAmCw']);
items2[6] = <Screen name="suggested-friends" options={object11} getComponent={function() {
return require(dependencyMap[19]).default;
}} />;
Screen = env0_7.Screen;
string = intl.string;
const XT4hVl = (require(1244) /* metro dependency 1244: indexNative */).t.XT4hVl;
items2[7] = <Screen name="requests-settings" options={{title: Reflect.apply(string, intl,
[XT4hVl])}} getComponent={function() {
return require(dependencyMap[20]).default;
}} />;
Screen = env0_7.Screen;
items2[8] = <Screen name="requests" options={function({navigation}) {
var object = {};
object.title = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t.fyA115);
object.headerRight = _fun115362;
return object;
}} getComponent={function() {
return require(dependencyMap[21]).default;
}} />;
Screen = env0_7.Screen;
const object12 = {};
object12.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oHVeHc);
items2[9] = <Screen name="spam-requests" options={object12} getComponent={function() {
return require(dependencyMap[22]).default;
}} />;
Screen = env0_7.Screen;
const object13 = {};
object13.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tFY5Zb);
items2[10] = <Screen name="ignored-user-requests" options={object13} getComponent={function() {
return require(dependencyMap[23]).default;
}} />;
return (
<Navigator {...object2}>
{items2}
</Navigator>
);
}
function ThemedFriendsNavigator() { // fn#115367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:3162, offset: 0x0245e200, size: 177 bytes, params: 1, frame: 21
const value2 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const styles = useStyles();
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<ThemeContextProvider gradient={value2}>
<View style={[styles.container, {paddingLeft: left, paddingRight: right}]}>
<FriendsNavigator />
</View>
</ThemeContextProvider>
);
}
function _fun115347() { // fn#115347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:677, offset: 0x0245dd0f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
}
function FriendsNavigatorScreenOptions({navigation, route}) { // fn#115348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:802, owner: FriendsNavigator.screenOptions, offset: 0x0245dd34, size: 368 bytes, params: 2, frame: 21
var r11;
var environment;
var r8;
var value5;
var value7;
let params = route.params;
let value = null;
const value3 = (value == params ? undefined : params.presentation) === 'card';
const object2 = {};
copyDataProperties(object2, env0_1, r11);
params = route.params;
object2['contentStyle'] = (value == params ? undefined : params.presentation) === 'card' || value3 ? value : env0_1.contentStyle;
object2['headerStyle'] = styles.header;
object2['headerShadowVisible'] = false;
object2['headerTitle'] = screenOptionsHeaderTitle_115349;
object2['headerTitleAlign'] = 'center';
const getState = navigation.getState;
if (Reflect.apply(getState, navigation, []).routes[0].key !== route.key) {
value5 = environment.__proto__;
r8 = require(dependencyMap[7]).getRenderModalBackImage(navigation);
} else {
params = route.params;
if ((value == params ? undefined : params.presentation) !== 'card') {
value7 = environment.__proto__;
r8 = require(dependencyMap[7]).getRenderModalCloseImage(navigation);
r11 = dependencyMap;
} else {
value5 = environment.__proto__;
r8 = require(dependencyMap[7]).getRenderModalBackImage(navigation);
}
function RequestsSettingsModalButton({onPress}) { // fn#115345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:402, offset: 0x0245d7c9, size: 163 bytes, params: 2, frame: 21
const HeaderIconButton = (HeaderSharedModule).HeaderIconButton;
const object2 = {source: Module11944, onPress: onPress};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']);
return (
<PressableNavigatorButtonWrapper isModal>
<HeaderIconButton {...object2} />
</PressableNavigatorButtonWrapper>
);
}
object2['headerLeft'] = r8;
params = route.params;
value = (value == params ? undefined : params.presentation) === 'card';
object2['fullScreenGestureEnabled'] = value || value3;
copyDataProperties(object2, env0_2, r11);
return object2;
}
function FriendsNavigatorOptions({navigation}) { // fn#115350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1442, owner: FriendsNavigator.options, offset: 0x0245defb, size: 95 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const TdEu5X = (require(1244) /* metro dependency 1244: indexNative */).t.TdEu5X;
return {title: Reflect.apply(string, intl, [TdEu5X]), headerRight: headerRight_115351};
}
function FriendsNavigatorOptions_115361({navigation}) { // fn#115361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:2609, owner: FriendsNavigator.options, offset: 0x0245e103, size: 95 bytes, params: 2, frame: 16
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyA115);
object2.headerRight = headerRight_115362;
return object2;
}
function screenOptionsHeaderTitle_115349(a0) { // fn#115349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1051, owner: FriendsNavigator.screenOptions.headerTitle, offset: 0x0245dea4, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
function optionsHeaderRight(a0) { // fn#115351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1518, owner: FriendsNavigator.options.headerRight, offset: 0x0245df5a, size: 129 bytes, params: 2, frame: 18
var environment;
const value = environment.__proto__.__proto__;
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
const headerTextButtonProps = {...a0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerTextButtonProps['label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6);
headerTextButtonProps['onPress'] = function() {
return navigation.navigate('add-friends', {sourcePage: 'Friends Screen Header'});
};
return <HeaderTextButton {...headerTextButtonProps} />;
}
function optionsHeaderRight_115362() { // fn#115362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:2685, owner: FriendsNavigator.options.headerRight, offset: 0x0245e162, size: 36 bytes, params: 1, frame: 13
return <RequestsSettingsModalButton onPress={function() {
return navigation.navigate('requests-settings');
}} />;
function FriendsNavigator() { // fn#115346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:607, offset: 0x0245d86c, size: 1187 bytes, params: 1, frame: 26
const env0_0 = useStyles();
const env0_1 = (UseThemedHeaderOptions)();
ReactModule.useLayoutEffect(_fun115347, []);
const env0_2 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const Navigator = env0_7.Navigator;
let object = {screenOptions: screenOptions_115348};
let Screen = env0_7.Screen;
const items2 = [
<Screen
name="root"
options={function({navigation}) {
var object = {};
object.title = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t.TdEu5X);
object.headerRight = _fun115351;
return object;
}}
getComponent={function() {
return require(dependencyMap[13]).default;
}}
/>,
];
Screen = env0_7.Screen;
const object4 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.jD1qzM]);
items2[1] = (
<Screen
name="new-message"
options={object4}
getComponent={function() {
return require(dependencyMap[14]).default;
}}
/>
);
Screen = env0_7.Screen;
const object6 = {};
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3hF1W4']);
items2[2] = (
<Screen
name="gdm"
options={object6}
getComponent={function() {
return require(dependencyMap[15]).default;
}}
/>
);
Screen = env0_7.Screen;
const object8 = {};
object8.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
items2[3] = (
<Screen
name="add-friend"
options={object8}
getComponent={function() {
return require(dependencyMap[16]).default;
}}
/>
);
Screen = env0_7.Screen;
const object10 = {};
object10.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6);
items2[4] = (
<Screen
name="add-friends"
options={object10}
getComponent={function() {
return require(dependencyMap[17]).default;
}}
/>
);
Screen = env0_7.Screen;
string = intl.string;
const QzVsOs = (require(1244) /* metro dependency 1244: indexNative */).t.QzVsOs;
items2[5] = (
<Screen
name="username-search"
options={{title: Reflect.apply(string, intl, [QzVsOs])}}
getComponent={function() {
return require(dependencyMap[18]).default;
}}
/>
);
Screen = env0_7.Screen;
const object14 = {};
object14.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1uAmCw']);
items2[6] = (
<Screen
name="suggested-friends"
options={object14}
getComponent={function() {
return require(dependencyMap[19]).default;
}}
/>
);
Screen = env0_7.Screen;
string = intl.string;
const XT4hVl = (require(1244) /* metro dependency 1244: indexNative */).t.XT4hVl;
items2[7] = (
<Screen
name="requests-settings"
options={{title: Reflect.apply(string, intl, [XT4hVl])}}
getComponent={function() {
return require(dependencyMap[20]).default;
}}
/>
);
Screen = env0_7.Screen;
items2[8] = (
<Screen
name="requests"
options={function({navigation}) {
var object = {};
object.title = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t.fyA115);
object.headerRight = _fun115362;
return object;
}}
getComponent={function() {
return require(dependencyMap[21]).default;
}}
/>
);
Screen = env0_7.Screen;
const object15 = {};
object15.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oHVeHc);
items2[9] = (
<Screen
name="spam-requests"
options={object15}
getComponent={function() {
return require(dependencyMap[22]).default;
}}
/>
);
Screen = env0_7.Screen;
const object16 = {};
object16.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tFY5Zb);
items2[10] = (
<Screen
name="ignored-user-requests"
options={object16}
getComponent={function() {
return require(dependencyMap[23]).default;
}}
/>
);
return (
<Navigator {...object}>
{items2}
</Navigator>
);
function _fun115347() { // fn#115347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:677, offset: 0x0245dd0f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (TTIAnalyticsUtilsModule).trackAppUIViewed();
}
function FriendsNavigatorScreenOptions({navigation, route}) { // fn#115348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:802, owner: FriendsNavigator.screenOptions, offset: 0x0245dd34, size: 368 bytes, params: 2, frame: 21
var r11;
var environment;
var r8;
var value5;
var value7;
let params = route.params;
let value = null;
const value3 = (value == params ? undefined : params.presentation) === 'card';
const object = {};
copyDataProperties(object, env0_1, r11);
params = route.params;
object['contentStyle'] = (value == params ? undefined : params.presentation) === 'card' || value3 ? value : env0_1.contentStyle;
object['headerStyle'] = styles.header;
object['headerShadowVisible'] = false;
object['headerTitle'] = screenOptionsHeaderTitle_115349;
object['headerTitleAlign'] = 'center';
const getState = navigation.getState;
if (Reflect.apply(getState, navigation, []).routes[0].key !== route.key) {
value5 = environment.__proto__;
r8 = require(dependencyMap[7]).getRenderModalBackImage(navigation);
} else {
params = route.params;
if ((value == params ? undefined : params.presentation) !== 'card') {
value7 = environment.__proto__;
r8 = require(dependencyMap[7]).getRenderModalCloseImage(navigation);
r11 = dependencyMap;
} else {
value5 = environment.__proto__;
r8 = require(dependencyMap[7]).getRenderModalBackImage(navigation);
}
}
object['headerLeft'] = r8;
params = route.params;
value = (value == params ? undefined : params.presentation) === 'card';
object['fullScreenGestureEnabled'] = value || value3;
copyDataProperties(object, env0_2, r11);
return object;
function screenOptionsHeaderTitle_115349(a0) { // fn#115349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1051, owner: FriendsNavigator.screenOptions.headerTitle, offset: 0x0245dea4, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
}
function FriendsNavigatorOptions({navigation}) { // fn#115350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1442, owner: FriendsNavigator.options, offset: 0x0245defb, size: 95 bytes, params: 2, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const TdEu5X = (IndexNativeModule).t.TdEu5X;
return {title: Reflect.apply(string, intl, [TdEu5X]), headerRight: headerRight_115351};
function optionsHeaderRight(a0) { // fn#115351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1518, owner: FriendsNavigator.options.headerRight, offset: 0x0245df5a, size: 129 bytes, params: 2, frame: 18
var environment;
const value = environment.__proto__.__proto__;
const HeaderTextButton = (HeaderSharedModule).HeaderTextButton;
const headerTextButtonProps = {...a0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerTextButtonProps['label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6);
headerTextButtonProps['onPress'] = function() {
return navigation.navigate('add-friends', {sourcePage: 'Friends Screen Header'});
};
return <HeaderTextButton {...headerTextButtonProps} />;
}
}
function FriendsNavigatorOptions_115361({navigation}) { // fn#115361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:2609, owner: FriendsNavigator.options, offset: 0x0245e103, size: 95 bytes, params: 2, frame: 16
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyA115);
object.headerRight = headerRight_115362;
return object;
function optionsHeaderRight_115362() { // fn#115362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:2685, owner: FriendsNavigator.options.headerRight, offset: 0x0245e162, size: 36 bytes, params: 1, frame: 13
return <RequestsSettingsModalButton onPress={function() {
return navigation.navigate('requests-settings');
}} />;
}
}
}
function ThemedFriendsNavigator() { // fn#115367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:3162, offset: 0x0245e200, size: 177 bytes, params: 1, frame: 21
const value2 = (UseColorThemeBackground)();
const {left, right} = (UseSafeAreaInsetsNative)();
const styles = useStyles();
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
return (
<ThemeContextProvider gradient={value2}>
<View style={[styles.container, {paddingLeft: left, paddingRight: right}]}>
<FriendsNavigator />
</View>
</ThemeContextProvider>
);
}
}
global.__d(_fun115344, 15132, [31, 27, 33, 9884, 4501, 697, 9606, 9603, 11944, 1244, 15133, 4884, 5280, 15134,
15140, 15153, 15154, 15155, 15161, 15162, 15163, 15165, 15168, 15169, 4003, 1585, 3868,
2]) /* metro module 15132, dependencies: [31, 27, 33, 9884, 4501, 697, 9606, 9603, 11944, 1244, 15133, 4884, 5280, 15134, 15140, 15153, 15154, 15155, 15161, 15162, 15163, 15165, 15168, 15169, 4003, 1585, 3868, 2] */;
@@ -1,10 +1,18 @@
/* Metro module 14805; source: modules/main_tabs_v2/native/friends/components/ActionStatusSubLabel.tsx; dependencies: [31, 33, 4501, 3869, 4017, 4573, 4584, 4504, 2] */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
function _fun111740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:6, offset: 0x023af92a, size: 315 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
@@ -16,195 +24,192 @@ function _fun111740(global, require, importDefault, importAll, module, exports,
};
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = value.createAnimatedComponent;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const Text = (TextModule).Text;
const env0_7 = Reflect.apply(createAnimatedComponent, value, [Text]);
object = {code: 'function ActionStatusSubLabelTsx1(){const{hasSecondLine,actioned,lineHeight,fontScale,animate,withTiming,interpolate}=this.__closure;const currentlyHasSecondLine=hasSecondLine&&!actioned.get();const lineHeightValue=lineHeight*fontScale;const currentLineHeightValue=currentlyHasSecondLine?lineHeightValue*2:lineHeightValue;return{height:!animate||!actioned.get()?currentLineHeightValue:withTiming(interpolate(actioned.get()?1:0,[0,1],[currentlyHasSecondLine?lineHeightValue*2:lineHeightValue,lineHeightValue]))};}'};
object = {code: 'function ActionStatusSubLabelTsx2(){const{actioned,lineHeight,fontScale,animate,withTiming,interpolate}=this.__closure;const translateYValue=actioned.get()?lineHeight*fontScale:0;return{transform:[{translateY:!animate?translateYValue:withTiming(interpolate(actioned.get()?1:0,[0,1],[0,translateYValue]))}]};}'};
object = {code: 'function ActionStatusSubLabelTsx3(){const{actioned,lineHeight,fontScale,animate,withTiming,interpolate}=this.__closure;const translateYValue=actioned.get()?0:-lineHeight*fontScale;return{transform:[{translateY:!animate?translateYValue:withTiming(interpolate(actioned.get()?1:0,[0,1],[translateYValue,0]))}],opacity:!animate?actioned.get()?1:0:withTiming(actioned.get()?1:0)};}'};
object = {code: 'function ActionStatusSubLabelTsx4(){const{actioned}=this.__closure;return actioned.get();}'};
object = {code: 'function ActionStatusSubLabelTsx5(actioned,actionedPrev){const{actionStatusAccessibilityLabel,runOnJS,announceActioned}=this.__closure;const isActioned=actioned&&actionedPrev===false;if(!isActioned||actionStatusAccessibilityLabel==null){return;}runOnJS(announceActioned)(actionStatusAccessibilityLabel);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ActionStatusSubLabel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ActionStatusSubLabel.tsx');
exports.ActionStatusSubLabel = ActionStatusSubLabel;
}
function ActionStatusSubLabel({lineHeight, textVariant, actioned, label, secondaryLabel, actionStatus, actionStatusAccessibilityLabel, maxFontSizeMultiplier, animate}) { // fn#111743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2121, offset: 0x023afab6, size: 897 bytes, params: 2, frame: 35
lineHeight = lineHeight === undefined ? 16 : lineHeight;
textVariant = textVariant === undefined ? 'text-xs/medium' : textVariant;
const value = secondaryLabel != null;
const value3 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = ActionStatusSubLabelL;
let object2 = {hasSecondLine: value, actioned: actioned, lineHeight: lineHeight, fontScale: value3,
animate: animate};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.interpolate = reanimatedRexportModule.interpolate;
closure.__closure = object2;
closure.__workletHash = 14210085997091;
closure.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = ActionStatusSubLabelY;
object2 = {actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.interpolate = reanimatedRexportModule.interpolate;
closure.__closure = object2;
closure.__workletHash = 1040596522101;
closure.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = ActionStatusSubLabelV;
object2 = {actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.interpolate = reanimatedRexportModule.interpolate;
closure.__closure = object2;
closure.__workletHash = 2183035188794;
closure.__initData = env0_10;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue5.useAnimatedReaction;
closure = function() {
return actioned.get();
};
closure.__closure = {actioned: actioned};
closure.__workletHash = 9609826744629;
closure.__initData = env0_11;
const closure2 = ActionStatusSubLabelV_111748;
object2 = {actionStatusAccessibilityLabel: actionStatusAccessibilityLabel};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.announceActioned = announceActioned;
closure2.__closure = object2;
closure2.__workletHash = 14141240445417;
closure2.__initData = env0_12;
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[styles.container, value4]}>
{((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} color="text-default" style={value5} lineClamp={1}>{label}</Component>)(env0_7)}
{value && ((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} style={value5} color="text-default" lineClamp={1}>{secondaryLabel}</Component>)(env0_7)}
{((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} color="text-default" style={[styles.actionStatus,
value6]} lineClamp={1}>{actionStatus}</Component>)(env0_7)}
</View>
);
}
function ActionStatusSubLabelL() { // fn#111744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2405, owner: ActionStatusSubLabel.L, offset: 0x023afe37, size: 207 bytes, params: 1, frame: 21
var r5;
var r1;
var actionedBinding;
var value5;
var moduleValue;
var withTiming;
var moduleValue2;
var interpolate;
var value;
const binding = env0_4;
if (binding) {
actionedBinding = actioned;
r5 = !actionedBinding.get();
} else {
r5 = binding;
}
const value3 = lineHeight * env0_5;
const r4 = r5 ? 2 * value3 : value3;
if (animate) {
actionedBinding = actioned;
if (actionedBinding.get()) {
value5 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
value = actioned.get();
value = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2, [value ? 1 : 0, [0,
1],
[r5 ? 2 * value3 : value3, value3]])]);
r1 = value;
} else {
r1 = r4;
function ActionStatusSubLabel({lineHeight, textVariant, actioned, label, secondaryLabel, actionStatus, actionStatusAccessibilityLabel, maxFontSizeMultiplier, animate}) { // fn#111743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2121, offset: 0x023afab6, size: 897 bytes, params: 2, frame: 35
lineHeight = lineHeight === undefined ? 16 : lineHeight;
textVariant = textVariant === undefined ? 'text-xs/medium' : textVariant;
const value = secondaryLabel != null;
const value3 = (UseFontScaleModule).useFontScale();
const styles = useStyles();
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = ActionStatusSubLabelL;
let object = {hasSecondLine: value, actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.interpolate = ReanimatedRexportModule.interpolate;
closure.__closure = object;
closure.__workletHash = 14210085997091;
closure.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = ActionStatusSubLabelY;
object = {actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.interpolate = ReanimatedRexportModule.interpolate;
closure.__closure = object;
closure.__workletHash = 1040596522101;
closure.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = ActionStatusSubLabelV;
object = {actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.interpolate = ReanimatedRexportModule.interpolate;
closure.__closure = object;
closure.__workletHash = 2183035188794;
closure.__initData = env0_10;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
return actioned.get();
};
closure.__closure = {actioned: actioned};
closure.__workletHash = 9609826744629;
closure.__initData = env0_11;
const ActionStatusSubLabelV_1117482 = ActionStatusSubLabelV_111748;
object = {actionStatusAccessibilityLabel: actionStatusAccessibilityLabel};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.announceActioned = announceActioned;
ActionStatusSubLabelV_1117482.__closure = object;
ActionStatusSubLabelV_1117482.__workletHash = 14141240445417;
ActionStatusSubLabelV_1117482.__initData = env0_12;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, ActionStatusSubLabelV_1117482]);
const View = (ReanimatedRexport).View;
return (
<View style={[styles.container, value4]}>
{((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} color="text-default" style={value5} lineClamp={1}>{label}</Component>)(env0_7)}
{value && ((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} style={value5} color="text-default" lineClamp={1}>{secondaryLabel}</Component>)(env0_7)}
{((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} color="text-default" style={[styles.actionStatus,
value6]} lineClamp={1}>{actionStatus}</Component>)(env0_7)}
</View>
);
function ActionStatusSubLabelL() { // fn#111744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2405, owner: ActionStatusSubLabel.L, offset: 0x023afe37, size: 207 bytes, params: 1, frame: 21
var r5;
var r1;
var actionedBinding;
var value5;
var moduleValue;
var withTiming;
var moduleValue2;
var interpolate;
var value;
const binding = env0_4;
if (binding) {
actionedBinding = actioned;
r5 = !actionedBinding.get();
} else {
r5 = binding;
}
const value3 = lineHeight * env0_5;
const r4 = r5 ? 2 * value3 : value3;
if (animate) {
actionedBinding = actioned;
if (actionedBinding.get()) {
value5 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
value = actioned.get();
value = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2, [value ? 1 : 0, [0,
1],
[r5 ? 2 * value3 : value3, value3]])]);
r1 = value;
} else {
r1 = r4;
}
} else {
r1 = r4;
}
return {height: r1};
}
} else {
r1 = r4;
}
return {height: r1};
}
function ActionStatusSubLabelY() { // fn#111745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2767, owner: ActionStatusSubLabel.y, offset: 0x023aff06, size: 171 bytes, params: 1, frame: 22
var r1;
var value5;
var moduleValue;
var withTiming;
var moduleValue2;
var interpolate;
const value2 = actioned.get();
const value3 = 0;
const r3 = value2 ? lineHeight * env0_5 : value3;
if (animate) {
value5 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
actionedBinding = actioned;
r1 = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2,
[actionedBinding.get() ? 1 : value3, [0, 1], [0, r3]])]);
} else {
r1 = r3;
}
return {transform: [{translateY: r1}]};
}
function ActionStatusSubLabelY() { // fn#111745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2767, owner: ActionStatusSubLabel.y, offset: 0x023aff06, size: 171 bytes, params: 1, frame: 22
var r1;
var value5;
var moduleValue;
var withTiming;
var moduleValue2;
var interpolate;
const value2 = actioned.get();
const value3 = 0;
const r3 = value2 ? lineHeight * env0_5 : value3;
if (animate) {
value5 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
actionedBinding = actioned;
r1 = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2,
[actionedBinding.get() ? 1 : value3, [0, 1], [0, r3]])]);
} else {
r1 = r3;
}
return {transform: [{translateY: r1}]};
}
function ActionStatusSubLabelV() { // fn#111746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:3101, owner: ActionStatusSubLabel.V, offset: 0x023affb1, size: 264 bytes, params: 1, frame: 22
var r1;
var value6;
var moduleValue;
var withTiming;
var moduleValue2;
var interpolate;
var value9;
var moduleValue3;
const value2 = actioned.get();
const value3 = 0;
const r3 = value2 ? value3 : -lineHeight * env0_5;
const object2 = {};
if (animate) {
value6 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
actionedBinding = actioned;
r1 = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2,
[actionedBinding.get() ? 1 : value3, [0, 1], [r3, value3]])]);
} else {
r1 = r3;
}
object2.transform = [{translateY: r1}];
if (animate) {
value9 = environment.__proto__;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
actionedBinding = actioned;
r1 = Reflect.apply(withTiming, moduleValue3, [actionedBinding.get() ? 1 : value3]);
} else {
actionedBinding = actioned;
r1 = actionedBinding.get() ? 1 : value3;
}
object2.opacity = r1;
return object2;
}
function ActionStatusSubLabelV() { // fn#111746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:3101, owner: ActionStatusSubLabel.V, offset: 0x023affb1, size: 264 bytes, params: 1, frame: 22
var r1;
var value6;
var moduleValue;
var withTiming;
var moduleValue2;
var interpolate;
var value9;
var moduleValue3;
const value2 = actioned.get();
const value3 = 0;
const r3 = value2 ? value3 : -lineHeight * env0_5;
const object = {};
if (animate) {
value6 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
actionedBinding = actioned;
r1 = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2,
[actionedBinding.get() ? 1 : value3, [0, 1], [r3, value3]])]);
} else {
r1 = r3;
}
object.transform = [{translateY: r1}];
if (animate) {
value9 = environment.__proto__;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
actionedBinding = actioned;
r1 = Reflect.apply(withTiming, moduleValue3, [actionedBinding.get() ? 1 : value3]);
} else {
actionedBinding = actioned;
r1 = actionedBinding.get() ? 1 : value3;
}
object.opacity = r1;
return object;
}
function ActionStatusSubLabelV_111748(a0, a1) { // fn#111748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:3587, owner: ActionStatusSubLabel.v, offset: 0x023b00b9, size: 89 bytes, params: 3, frame: 12
var moduleValue;
let value = a0;
if (value && a1 === false && actionStatusAccessibilityLabel != null) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = moduleValue.runOnJS(announceActioned);
value(actionStatusAccessibilityLabel);
}
}
function ActionStatusSubLabelV_111748(a0, a1) { // fn#111748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:3587, owner: ActionStatusSubLabel.v, offset: 0x023b00b9, size: 89 bytes, params: 3, frame: 12
var moduleValue;
let value = a0;
if (value && a1 === false && actionStatusAccessibilityLabel != null) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = moduleValue.runOnJS(announceActioned);
value(actionStatusAccessibilityLabel);
}
}
global.__d(_fun111740, 14805, [31, 33, 4501, 3869, 4017, 4573, 4584, 4504,
2]) /* metro module 14805, dependencies: [31, 33, 4501, 3869, 4017, 4573, 4584, 4504, 2] */;
@@ -1,11 +1,19 @@
/* Metro module 15160; source: modules/main_tabs_v2/native/friends/components/AddFriendsContactSyncEmptyState.tsx; dependencies: [31, 27, 33, 4501, 697, 12010, 4573, 1244, 6766, 11997, 4578, 11993, 2] */
import Module12010 from '../../../../../by-id/module-12010.js'; /* Metro dependency 12010 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TextWithIOSLinkWorkaroundModule from '../../../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as ContactSyncModalActionCreatorsModule from '../../../../contact_sync/native/ContactSyncModalActionCreators.tsx'; /* Metro dependency 11993 */
function _fun115691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:6, offset: 0x0246a671, size: 594 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(33) /* metro dependency 33 */;
@@ -13,76 +21,104 @@ function _fun115691(global, require, importDefault, importAll, module, exports,
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object6 = {alignItems: 'center'};
object = {};
const object2 = {alignItems: 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.marginTop = PX_24;
object2.marginTop = PX_24;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = PX_16;
object2.marginHorizontal = PX_16;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.paddingBottom = PX_12;
object2.paddingBottom = PX_12;
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object6.backgroundColor = CARD_BACKGROUND_DEFAULT;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.content = object6;
const object8 = {'height': 135, 'width': 216};
object2.backgroundColor = CARD_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.content = object2;
const object3 = {'height': 135, 'width': 216};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.marginTop = PX_24;
object3.marginTop = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.marginBottom = PX_16;
object4.headerImage = object8;
object3.marginBottom = PX_16;
object.headerImage = object3;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.title = {'marginBottom': null, 'width': '100%', 'textAlign': 'center', marginBottom: PX_8};
const object9 = {};
object.title = {'marginBottom': null, 'width': '100%', 'textAlign': 'center', marginBottom: PX_8};
const object5 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.marginBottom = PX_24;
object5.marginBottom = PX_24;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object9.paddingHorizontal = PX_48;
object9.width = '100%';
object9.alignContent = 'center';
object4.subtitle = object9;
object4.subtitleText = {textAlign: 'center'};
const object10 = {width: '100%'};
object5.paddingHorizontal = PX_48;
object5.width = '100%';
object5.alignContent = 'center';
object.subtitle = object5;
object.subtitleText = {textAlign: 'center'};
const object7 = {width: '100%'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.paddingBottom = PX_4;
object7.paddingBottom = PX_4;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingHorizontal = PX_12;
object4.trailing = object10;
const env0_7 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/AddFriendsContactSyncEmptyState.tsx');
object7.paddingHorizontal = PX_12;
object.trailing = object7;
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/AddFriendsContactSyncEmptyState.tsx');
exports.default = AddFriendsContactSyncEmptyState;
function AddFriendsContactSyncEmptyState() { // fn#115692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:945, offset: 0x0246a8c3, size: 491 bytes, params: 1, frame: 27
const styles = useStyles();
const items2 = [
<Image
resizeMode="contain"
style={styles.headerImage}
source={Module12010}
/>,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = (
<Text
style={styles.title}
variant="heading-lg/bold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['/G+nci']])}
</Text>
);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
const format = intl.format;
const OXdOPf = (require(1244) /* metro dependency 1244: indexNative */).t.OXdOPf;
const object2 = {};
object2.learnMoreHook = (require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink;
items2[2] = (
<View style={styles.subtitle}>
<TextWithIOSLinkWorkaround style={styles.subtitleText} variant="text-sm/medium">
{Reflect.apply(format, intl, [OXdOPf, object2])}
</TextWithIOSLinkWorkaround>
</View>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const QUXSpo = (require(1244) /* metro dependency 1244: indexNative */).t.QUXSpo;
items2[3] = (
<View style={styles.trailing}>
<Button
variant="primary"
size="lg"
text={Reflect.apply(string, intl, [QUXSpo])}
onPress={onPress_115693}
/>
</View>
);
return (
<View style={styles.content}>
{items2}
</View>
);
function AddFriendsContactSyncEmptyStateOnPress() { // fn#115693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:1585, owner: AddFriendsContactSyncEmptyState.onPress, offset: 0x0246aaae, size: 47 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ContactSyncModalActionCreatorsModule).openContactSyncModal({},
'Add Friends Contact Sync Empty State');
}
}
}
function AddFriendsContactSyncEmptyState() { // fn#115692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:945, offset: 0x0246a8c3, size: 491 bytes, params: 1, frame: 27
const styles = useStyles();
const items2 = [<Image resizeMode="contain" style={styles.headerImage} source={importDefault(12010) /* metro dependency 12010 */} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Text style={styles.title} variant="heading-lg/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['/G+nci']])}</Text>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const OXdOPf = (require(1244) /* metro dependency 1244: indexNative */).t.OXdOPf;
const object = {};
object.learnMoreHook = (require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink;
items2[2] = <View style={styles.subtitle}><TextWithIOSLinkWorkaround style={styles.subtitleText} variant="text-sm/medium">{Reflect.apply(format,
intl, [OXdOPf, object])}</TextWithIOSLinkWorkaround></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const QUXSpo = (require(1244) /* metro dependency 1244: indexNative */).t.QUXSpo;
items2[3] = <View style={styles.trailing}><Button variant="primary" size="lg" text={Reflect.apply(string, intl,
[QUXSpo])} onPress={onPress_115693} /></View>;
return (
<View style={styles.content}>
{items2}
</View>
);
}
function AddFriendsContactSyncEmptyStateOnPress() { // fn#115693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:1585, owner: AddFriendsContactSyncEmptyState.onPress, offset: 0x0246aaae, size: 47 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).openContactSyncModal({},
'Add Friends Contact Sync Empty State');
}
global.__d(_fun115691, 15160, [31, 27, 33, 4501, 697, 12010, 4573, 1244, 6766, 11997, 4578, 11993,
2]) /* metro module 15160, dependencies: [31, 27, 33, 4501, 697, 12010, 4573, 1244, 6766, 11997, 4578, 11993, 2] */;
@@ -1,13 +1,15 @@
/* Metro module 14478; source: modules/main_tabs_v2/native/friends/components/AddFriendsScreenUtils.tsx; dependencies: [5, 1379, 661, 4503, 8800, 4603, 3856, 1244, 11786, 7067, 8783, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MessageConstantsModule from '../../../../messages/MessageConstants.tsx'; /* Metro dependency 4503 */
function _fun109538(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:6, offset: 0x02350d11, size: 228 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
const env0_6 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/AddFriendsScreenUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/AddFriendsScreenUtils.tsx');
exports.dismissIncomingRequest = function({userId, applicationId}) {
importDefault(dependencyMap[4]).cancelFriendRequest({userId: userId, applicationId: applicationId,
location: AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL});
@@ -24,300 +26,302 @@ function _fun109538(global, require, importDefault, importAll, module, exports,
context: {location: AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL}, type: undefined,
fromFriendSuggestion: true});
};
}
function _sendWave() { // fn#109539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:174, offset: 0x02350df5, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun109541).apply(this, arguments);
}
async function _fun109541(a0) { // fn#109541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:215, offset: 0x02350e3b, size: 476 bytes, params: 2, frame: 25
var r1;
var r12;
var value;
var value2;
var value3;
var value4;
var binding;
var getDMFromUserId;
var value5;
var binding2;
var property;
var value6;
var getDMChannel;
var value7;
var value8;
var value9;
var value10;
var binding3;
var value11;
var trackWaveCtaClicked;
var object2;
var value12;
var sendStickers;
var SEND_WAVE;
var items2;
var value13;
var value14;
var value15;
var binding4;
var value16;
var openPrivateChannel;
var error;
var binding5;
var presentError;
var intl;
var string;
var t;
var iufib1;
exceptionLanding59: while (true) {
value = a1;
value2 = undefined;
value3 = false;
if (value3) {
return value2;
}
reducibleJoin3: while (true) {
if (value !== undefined) {
r1 = value;
break reducibleJoin3;
}
value = true;
r1 = value;
break reducibleJoin3;
}
await undefined;
value = undefined;
value4 = false;
if (value4) {
return value;
}
value = environment.__proto__.__proto__;
binding = env2_4;
getDMFromUserId = binding.getDMFromUserId;
value5 = Reflect.apply(getDMFromUserId, binding, [a0]);
if (value5 == null) {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding59;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding59;
}
try {
property = binding2[5];
} catch (error) {
break exceptionLanding59;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding59;
}
try {
getDMChannel = value6.getDMChannel;
} catch (error) {
break exceptionLanding59;
}
try {
value7 = Reflect.apply(getDMChannel, value6, [a0]);
} catch (error) {
break exceptionLanding59;
}
await value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding59;
}
if (value9) {
return value8;
}
r12 = value8;
} else {
r12 = value5;
}
reduciblePort57: while (true) {
exceptionLanding56: while (true) {
try {
value10 = r12 == null;
} catch (error) {
break exceptionLanding56;
function _sendWave() { // fn#109539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:174, offset: 0x02350df5, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun109541).apply(this, arguments);
async function _fun109541(a0) { // fn#109541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:215, offset: 0x02350e3b, size: 476 bytes, params: 2, frame: 25
var r1;
var r12;
var value;
var value2;
var value3;
var value4;
var binding;
var getDMFromUserId;
var value5;
var binding2;
var property;
var value6;
var getDMChannel;
var value7;
var value8;
var value9;
var value10;
var binding3;
var value11;
var trackWaveCtaClicked;
var object;
var value12;
var sendStickers;
var SEND_WAVE;
var items2;
var value13;
var value14;
var value15;
var binding4;
var value16;
var openPrivateChannel;
var error;
var binding5;
var presentError;
var intl;
var string;
var t;
var iufib1;
exceptionLanding59: while (true) {
value = a1;
value2 = undefined;
value3 = false;
if (value3) {
return value2;
}
if (value10) {
break reduciblePort57;
reducibleJoin3: while (true) {
if (value !== undefined) {
r1 = value;
break reducibleJoin3;
}
value = true;
r1 = value;
break reducibleJoin3;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding56;
await undefined;
value = undefined;
value4 = false;
if (value4) {
return value;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding56;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding56;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding56;
}
try {
trackWaveCtaClicked = value11.trackWaveCtaClicked;
} catch (error) {
break exceptionLanding56;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding56;
}
try {
object2.channelId = r12;
} catch (error) {
break exceptionLanding56;
}
try {
object2.source = a2;
} catch (error) {
break exceptionLanding56;
}
try {
Reflect.apply(trackWaveCtaClicked, value11, [object2]);
} catch (error) {
break exceptionLanding56;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding56;
}
try {
property = binding3[9];
} catch (error) {
break exceptionLanding56;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding56;
}
try {
sendStickers = value12.sendStickers;
} catch (error) {
break exceptionLanding56;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding56;
}
try {
binding = env2_6;
} catch (error) {
break exceptionLanding56;
}
try {
SEND_WAVE = binding.SEND_WAVE;
} catch (error) {
break exceptionLanding56;
}
try {
object2.location = SEND_WAVE;
} catch (error) {
break exceptionLanding56;
}
try {
items2 = ['749054660769218631'];
} catch (error) {
break exceptionLanding56;
}
try {
value13 = Reflect.apply(sendStickers, value12, [r12, items2, '', object2]);
} catch (error) {
break exceptionLanding56;
}
await value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
break exceptionLanding56;
}
if (value15) {
return value14;
}
if (r1) {
value = environment.__proto__.__proto__;
binding = env2_4;
getDMFromUserId = binding.getDMFromUserId;
value5 = Reflect.apply(getDMFromUserId, binding, [a0]);
if (value5 == null) {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
try {
binding4 = env2_2;
binding2 = env2_2;
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
try {
property = binding4[5];
property = binding2[5];
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
try {
value16 = binding(property);
value6 = binding(property);
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
try {
openPrivateChannel = value16.openPrivateChannel;
getDMChannel = value6.getDMChannel;
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
try {
object2 = {};
value7 = Reflect.apply(getDMChannel, value6, [a0]);
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
await value7;
try {
object2.recipientIds = a0;
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding56;
break exceptionLanding59;
}
try {
Reflect.apply(openPrivateChannel, value16, [object2]);
} catch (error) {
break exceptionLanding56;
if (value9) {
return value8;
}
r12 = value8;
} else {
r12 = value5;
}
reduciblePort57: while (true) {
exceptionLanding56: while (true) {
try {
value10 = r12 == null;
} catch (error) {
break exceptionLanding56;
}
if (value10) {
break reduciblePort57;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding56;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding56;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding56;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding56;
}
try {
trackWaveCtaClicked = value11.trackWaveCtaClicked;
} catch (error) {
break exceptionLanding56;
}
try {
object = {};
} catch (error) {
break exceptionLanding56;
}
try {
object.channelId = r12;
} catch (error) {
break exceptionLanding56;
}
try {
object.source = a2;
} catch (error) {
break exceptionLanding56;
}
try {
Reflect.apply(trackWaveCtaClicked, value11, [object]);
} catch (error) {
break exceptionLanding56;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding56;
}
try {
property = binding3[9];
} catch (error) {
break exceptionLanding56;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding56;
}
try {
sendStickers = value12.sendStickers;
} catch (error) {
break exceptionLanding56;
}
try {
object = {};
} catch (error) {
break exceptionLanding56;
}
try {
binding = env2_6;
} catch (error) {
break exceptionLanding56;
}
try {
SEND_WAVE = binding.SEND_WAVE;
} catch (error) {
break exceptionLanding56;
}
try {
object.location = SEND_WAVE;
} catch (error) {
break exceptionLanding56;
}
try {
items2 = ['749054660769218631'];
} catch (error) {
break exceptionLanding56;
}
try {
value13 = Reflect.apply(sendStickers, value12, [r12, items2, '', object]);
} catch (error) {
break exceptionLanding56;
}
await value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
break exceptionLanding56;
}
if (value15) {
return value14;
}
if (r1) {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding56;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding56;
}
try {
property = binding4[5];
} catch (error) {
break exceptionLanding56;
}
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding56;
}
try {
openPrivateChannel = value16.openPrivateChannel;
} catch (error) {
break exceptionLanding56;
}
try {
object = {};
} catch (error) {
break exceptionLanding56;
}
try {
object.recipientIds = a0;
} catch (error) {
break exceptionLanding56;
}
try {
Reflect.apply(openPrivateChannel, value16, [object]);
} catch (error) {
break exceptionLanding56;
}
break reduciblePort57;
}
break reduciblePort57;
}
binding = env2_0;
binding5 = env2_2;
value = binding(binding5[6]);
presentError = value.presentError;
intl = binding(binding5[7]).intl;
string = intl.string;
t = binding(binding5[7]).t;
iufib1 = t.iufib1;
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [iufib1])]);
break reduciblePort57;
}
break reduciblePort57;
return undefined;
}
binding = env2_0;
binding5 = env2_2;
value = binding(binding5[6]);
const binding6 = env2_2;
value = binding(binding6[6]);
presentError = value.presentError;
intl = binding(binding5[7]).intl;
string = intl.string;
t = binding(binding5[7]).t;
iufib1 = t.iufib1;
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [iufib1])]);
break reduciblePort57;
intl = binding(binding6[7]).intl;
Reflect.apply(presentError, value, [intl.string(binding(binding6[7]).t.iufib1)]);
}
return undefined;
}
binding = env2_0;
const binding6 = env2_2;
value = binding(binding6[6]);
presentError = value.presentError;
intl = binding(binding6[7]).intl;
Reflect.apply(presentError, value, [intl.string(binding(binding6[7]).t.iufib1)]);
}
global.__d(_fun109538, 14478, [5, 1379, 661, 4503, 8800, 4603, 3856, 1244, 11786, 7067, 8783,
2]) /* metro module 14478, dependencies: [5, 1379, 661, 4503, 8800, 4603, 3856, 1244, 11786, 7067, 8783, 2] */;
@@ -1,42 +1,63 @@
/* Metro module 15166; source: modules/main_tabs_v2/native/friends/components/ClearAllIncomingRequestsAlertModal.tsx; dependencies: [5, 31, 33, 8783, 4500, 1244, 4500, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AlertModalNativeModule from '../../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun115756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:6, offset: 0x0246ce8a, size: 185 bytes, params: 8, frame: 19
const env0_0 = require;
const handleConfirm = function() {
const handleConfirm_115757 = function() {
return _handleConfirm.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
ReactModule;
const value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ClearAllIncomingRequestsAlertModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ClearAllIncomingRequestsAlertModal.tsx');
exports.default = ClearAllIncomingRequestsAlertModal;
}
function _handleConfirm() { // fn#115758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:212, offset: 0x0246cf43, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun115760).apply(this, arguments);
function* _fun115760() { // fn#115760, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:263, offset: 0x0246cf80, size: 61 bytes, params: 1, frame: 12
if (true) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[3]);
yield value.clearPendingRelationships();
}
}
function _handleConfirm() { // fn#115758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:212, offset: 0x0246cf43, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun115760).apply(this, arguments);
}
function ClearAllIncomingRequestsAlertModal({incomingRequestCount}) { // fn#115761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:472, offset: 0x0246cfbd, size: 394 bytes, params: 2, frame: 26
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z2pFjo);
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0nTvEw'],
{incomingRequestCount: incomingRequestCount});
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
object2.actions = <AlertActions><AlertActionButton variant="destructive" onPress={handleConfirm} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob'])} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} key="cancel" /></AlertActions>;
return <AlertModal {...object2} />;
}
function* _fun115760() { // fn#115760, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:263, offset: 0x0246cf80, size: 61 bytes, params: 1, frame: 12
if (true) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[3]);
yield value.clearPendingRelationships();
}
function ClearAllIncomingRequestsAlertModal({incomingRequestCount}) { // fn#115761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:472, offset: 0x0246cfbd, size: 394 bytes, params: 2, frame: 26
const AlertModal = (AlertModalNativeModule).AlertModal;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z2pFjo);
object.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0nTvEw'],
{incomingRequestCount: incomingRequestCount});
const AlertActions = (AlertModalNativeModule).AlertActions;
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
object.actions = (
<AlertActions>
<AlertActionButton
variant="destructive"
onPress={handleConfirm_115757}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob'])}
key="confirm"
/>
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
key="cancel"
/>
</AlertActions>
);
return <AlertModal {...object} />;
}
}
global.__d(_fun115756, 15166, [5, 31, 33, 8783, 4500, 1244, 4500,
2]) /* metro module 15166, dependencies: [5, 31, 33, 8783, 4500, 1244, 4500, 2] */;
@@ -1,318 +1,333 @@
/* Metro module 14806; source: modules/main_tabs_v2/native/friends/components/ContactSuggestionActions.tsx; dependencies: [31, 27, 33, 4017, 4501, 697, 14478, 4504, 4577, 1305, 14807, 4578, 1244, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import Module14807 from '../../../../../by-id/module-14807.js'; /* Metro dependency 14807 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun111749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:6, offset: 0x023b0112, size: 618 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
object2 = {duration: 200};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Easing.in(Easing2.quad);
object2 = {duration: 250};
const Easing3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Easing.in(Easing3.quad);
object2 = {duration: 250};
const Easing4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Easing.in(Easing4.quad);
object2 = {duration: 250};
object = {duration: 200};
const Easing = (ReanimatedRexportModule).Easing;
const Easing2 = (ReanimatedRexportModule).Easing;
object.easing = Easing.in(Easing2.quad);
object = {duration: 250};
const Easing3 = (ReanimatedRexportModule).Easing;
object.easing = Easing.in(Easing3.quad);
object = {duration: 250};
const Easing4 = (ReanimatedRexportModule).Easing;
object.easing = Easing.in(Easing4.quad);
object = {duration: 250};
const out = Easing.out;
const Easing5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Reflect.apply(out, Easing, [Easing5.quad]);
const Easing5 = (ReanimatedRexportModule).Easing;
object.easing = Reflect.apply(out, Easing, [Easing5.quad]);
const env0_11 = {'mass': 1, 'stiffness': 172, 'damping': 17.3};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_12 = Reflect.apply(createStyles, value, [{icon: {'position': 'absolute', 'top': 4, 'zIndex': 2,
'color': null, 'opacity': 0, color: INTERACTIVE_TEXT_DEFAULT}}]);
object2 = {code: 'function ContactSuggestionActionsTsx1(){const{right,opacity,scale}=this.__closure;return{right:right.get(),opacity:opacity.get(),transform:[{scale:scale.get()}]};}'};
object2 = {code: 'function ContactSuggestionActionsTsx2(){const{buttonOpacity}=this.__closure;return{opacity:buttonOpacity.get()};}'};
object2 = {code: 'function ContactSuggestionActionsTsx3(){const{added}=this.__closure;return added.get();}'};
object2 = {code: "function ContactSuggestionActionsTsx4(added){const{animate,runOnJS,finishAnimationCallback,scale,withTiming,SCALE_CONFIG,opacity,OPACITY_CONFIG,buttonOpacity,right,withSpring,SPRING_CONFIG,withDelay,OPACITY_OUT_CONFIG,TRANSLATE_OUT_CONFIG}=this.__closure;if(!animate){runOnJS(finishAnimationCallback)();return;}if(added){scale.set(withTiming(1,SCALE_CONFIG));opacity.set(withTiming(1,OPACITY_CONFIG));buttonOpacity.set(withTiming(0,OPACITY_CONFIG));right.set(withSpring(12,SPRING_CONFIG,'respect-motion-settings',function(finished){if(!finished)return;opacity.set(withDelay(1000,withTiming(0,OPACITY_OUT_CONFIG)));scale.set(withDelay(1000,withTiming(0.5,SCALE_CONFIG)));right.set(withDelay(1000,withTiming(-8,TRANSLATE_OUT_CONFIG,'respect-motion-settings',function(finished){if(finished)runOnJS(finishAnimationCallback)();})));}));}else{buttonOpacity.set(1);scale.set(0.5);opacity.set(0);right.set(30);}}"};
object2 = {code: "function ContactSuggestionActionsTsx5(finished){const{opacity,withDelay,withTiming,OPACITY_OUT_CONFIG,scale,SCALE_CONFIG,right,TRANSLATE_OUT_CONFIG,runOnJS,finishAnimationCallback}=this.__closure;if(!finished)return;opacity.set(withDelay(1000,withTiming(0,OPACITY_OUT_CONFIG)));scale.set(withDelay(1000,withTiming(0.5,SCALE_CONFIG)));right.set(withDelay(1000,withTiming(-8,TRANSLATE_OUT_CONFIG,'respect-motion-settings',function(finished){if(finished)runOnJS(finishAnimationCallback)();})));}"};
object2 = {code: 'function ContactSuggestionActionsTsx6(finished){const{runOnJS,finishAnimationCallback}=this.__closure;if(finished)runOnJS(finishAnimationCallback)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ContactSuggestionActions.tsx');
object = {code: 'function ContactSuggestionActionsTsx1(){const{right,opacity,scale}=this.__closure;return{right:right.get(),opacity:opacity.get(),transform:[{scale:scale.get()}]};}'};
object = {code: 'function ContactSuggestionActionsTsx2(){const{buttonOpacity}=this.__closure;return{opacity:buttonOpacity.get()};}'};
object = {code: 'function ContactSuggestionActionsTsx3(){const{added}=this.__closure;return added.get();}'};
object = {code: "function ContactSuggestionActionsTsx4(added){const{animate,runOnJS,finishAnimationCallback,scale,withTiming,SCALE_CONFIG,opacity,OPACITY_CONFIG,buttonOpacity,right,withSpring,SPRING_CONFIG,withDelay,OPACITY_OUT_CONFIG,TRANSLATE_OUT_CONFIG}=this.__closure;if(!animate){runOnJS(finishAnimationCallback)();return;}if(added){scale.set(withTiming(1,SCALE_CONFIG));opacity.set(withTiming(1,OPACITY_CONFIG));buttonOpacity.set(withTiming(0,OPACITY_CONFIG));right.set(withSpring(12,SPRING_CONFIG,'respect-motion-settings',function(finished){if(!finished)return;opacity.set(withDelay(1000,withTiming(0,OPACITY_OUT_CONFIG)));scale.set(withDelay(1000,withTiming(0.5,SCALE_CONFIG)));right.set(withDelay(1000,withTiming(-8,TRANSLATE_OUT_CONFIG,'respect-motion-settings',function(finished){if(finished)runOnJS(finishAnimationCallback)();})));}));}else{buttonOpacity.set(1);scale.set(0.5);opacity.set(0);right.set(30);}}"};
object = {code: "function ContactSuggestionActionsTsx5(finished){const{opacity,withDelay,withTiming,OPACITY_OUT_CONFIG,scale,SCALE_CONFIG,right,TRANSLATE_OUT_CONFIG,runOnJS,finishAnimationCallback}=this.__closure;if(!finished)return;opacity.set(withDelay(1000,withTiming(0,OPACITY_OUT_CONFIG)));scale.set(withDelay(1000,withTiming(0.5,SCALE_CONFIG)));right.set(withDelay(1000,withTiming(-8,TRANSLATE_OUT_CONFIG,'respect-motion-settings',function(finished){if(finished)runOnJS(finishAnimationCallback)();})));}"};
object = {code: 'function ContactSuggestionActionsTsx6(finished){const{runOnJS,finishAnimationCallback}=this.__closure;if(finished)runOnJS(finishAnimationCallback)();}'};
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ContactSuggestionActions.tsx');
exports.ContactSuggestionActions = ContactSuggestionActions;
}
function ContactSuggestionActions({user, added, onAddSuggestion, onFinishAnimation, size, animate}) { // fn#111750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2682, offset: 0x023b037c, size: 1001 bytes, params: 2, frame: 33
const onFinishAnimation2 = onFinishAnimation;
size = size === undefined ? 'sm' : size;
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(30);
const value3 = (ReanimatedRexportModule).useSharedValue(0.5);
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const env0_7 = value4;
const value5 = (ReanimatedRexportModule).useSharedValue(1);
const env0_8 = value5;
const binding = onFinishAnimation2;
const value6 = binding.useCallback(function() {
if (onFinishAnimation != null) {
global.setTimeout(_fun111752, 1000);
}
}, [onFinishAnimation, user]);
const env0_9 = value6;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = ContactSuggestionActionsB;
closure.__closure = {right: value2, opacity: value4, scale: value3};
closure.__workletHash = 13774422449074;
closure.__initData = env0_13;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = ContactSuggestionActionsE;
closure.__closure = {buttonOpacity: value5};
closure.__workletHash = 4378005846847;
closure.__initData = env0_14;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value9 = binding.useCallback(_fun111755, [onAddSuggestion, user, added, animate, value2, value4, value3,
value5]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
return added.get();
};
closure.__closure = {added: added};
closure.__workletHash = 15816115253403;
closure.__initData = env0_15;
const ContactSuggestionActionsD2 = ContactSuggestionActionsD;
object = {animate: animate};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.finishAnimationCallback = value6;
object.scale = value3;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.SCALE_CONFIG = env0_9;
object.opacity = value4;
object.OPACITY_CONFIG = env0_7;
object.buttonOpacity = value5;
object.right = value2;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.SPRING_CONFIG = env0_11;
object.withDelay = ReanimatedRexportModule.withDelay;
object.OPACITY_OUT_CONFIG = env0_8;
object.TRANSLATE_OUT_CONFIG = env0_10;
ContactSuggestionActionsD2.__closure = object;
ContactSuggestionActionsD2.__workletHash = 6602847520399;
ContactSuggestionActionsD2.__initData = env0_16;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, ContactSuggestionActionsD2]);
const View2 = (ReanimatedRexport).View;
const items2 = [styles.icon, value7];
const Icon = (NativeModule).Icon;
const view = (
<View2 pointerEvents="none" style={items2}>
<Icon source={Module14807} color={styles.icon.color} />
</View2>
);
const View3 = (ReanimatedRexport).View;
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const OYkgVk = (IndexNativeModule).t.OYkgVk;
return (
<View>
{view}
<View3 style={value8}>
<Button
variant="secondary"
size={size}
grow={false}
text={Reflect.apply(string, intl, [OYkgVk])}
onPress={value9}
/>
</View3>
</View>
);
function _fun111751() { // fn#111751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2943, offset: 0x023b0765, size: 48 bytes, params: 1, frame: 13
if (onFinishAnimation != null) {
global.setTimeout(function() {
onFinishAnimation(user);
}, 1000);
}
function _fun111752() { // fn#111752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2969, offset: 0x023b0795, size: 20 bytes, params: 1, frame: 11
onFinishAnimation(user);
}
function ContactSuggestionActions({user, added, onAddSuggestion, onFinishAnimation, size, animate}) { // fn#111750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2682, offset: 0x023b037c, size: 1001 bytes, params: 2, frame: 33
var object2;
const env0_3 = onFinishAnimation;
size = size === undefined ? 'sm' : size;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(30);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.5);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_7 = value4;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
const env0_8 = value5;
const binding = env0_3;
const value6 = binding.useCallback(function() {
if (onFinishAnimation != null) {
global.setTimeout(_fun111752, 1000);
}
}, [onFinishAnimation, user]);
const env0_9 = value6;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = ContactSuggestionActionsB;
closure.__closure = {right: value2, opacity: value4, scale: value3};
closure.__workletHash = 13774422449074;
closure.__initData = env0_13;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = ContactSuggestionActionsE;
closure.__closure = {buttonOpacity: value5};
closure.__workletHash = 4378005846847;
closure.__initData = env0_14;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const value9 = binding.useCallback(_fun111755, [onAddSuggestion, user, added, animate, value2, value4, value3,
value5]);
const moduleValue7 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue7.useAnimatedReaction;
closure = function() {
return added.get();
};
closure.__closure = {added: added};
closure.__workletHash = 15816115253403;
closure.__initData = env0_15;
const closure2 = ContactSuggestionActionsD;
object2 = {animate: animate};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.finishAnimationCallback = value6;
object2.scale = value3;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.SCALE_CONFIG = env0_9;
object2.opacity = value4;
object2.OPACITY_CONFIG = env0_7;
object2.buttonOpacity = value5;
object2.right = value2;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.SPRING_CONFIG = env0_11;
object2.withDelay = reanimatedRexportModule.withDelay;
object2.OPACITY_OUT_CONFIG = env0_8;
object2.TRANSLATE_OUT_CONFIG = env0_10;
closure2.__closure = object2;
closure2.__workletHash = 6602847520399;
closure2.__initData = env0_16;
Reflect.apply(useAnimatedReaction, moduleValue7, [closure, closure2]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.icon, value7];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const view = <View2 pointerEvents="none" style={items2}><Icon source={importDefault(14807) /* metro dependency 14807 */} color={styles.icon.color} /></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OYkgVk = (require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk;
return (
<View>
{view}
<View3 style={value8}>
<Button
variant="secondary"
size={size}
grow={false}
text={Reflect.apply(string, intl, [OYkgVk])}
onPress={value9}
/>
</View3>
</View>
);
}
function _fun111751() { // fn#111751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2943, offset: 0x023b0765, size: 48 bytes, params: 1, frame: 13
if (onFinishAnimation != null) {
global.setTimeout(function() {
onFinishAnimation(user);
}, 1000);
}
}
function ContactSuggestionActionsB() { // fn#111753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3026, owner: ContactSuggestionActions.b, offset: 0x023b07a9, size: 73 bytes, params: 1, frame: 11
const object3 = {};
object3.right = env0_5.get();
object3.opacity = env0_7.get();
const object4 = {};
object4.scale = env0_6.get();
object3.transform = [object4];
return object3;
}
function ContactSuggestionActionsE() { // fn#111754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3211, owner: ContactSuggestionActions.E, offset: 0x023b07f2, size: 24 bytes, params: 1, frame: 10
const object2 = {};
object2.opacity = env0_8.get();
return object2;
}
function _fun111755() { // fn#111755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3330, offset: 0x023b080a, size: 141 bytes, params: 1, frame: 13
var binding;
let value = environment.__proto__;
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
const addContactSuggestion = value.addContactSuggestion;
const userBinding = user;
Reflect.apply(addContactSuggestion, value, [userBinding]);
onAddSuggestion(userBinding);
added.set(true);
if (!animate) {
binding = env0_5;
binding.set(12);
binding = env0_7;
binding.set(1);
binding = env0_6;
binding.set(1);
binding = env0_8;
binding.set(0);
}
}
function ContactSuggestionActionsD(a0) { // fn#111757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3569, owner: ContactSuggestionActions.D, offset: 0x023b0897, size: 491 bytes, params: 2, frame: 27
var environment;
var value2;
var moduleValue;
var binding;
var set;
var value3;
var moduleValue2;
var withTiming;
var binding2;
var moduleValue3;
var binding3;
var moduleValue4;
var moduleValue5;
var withSpring;
var binding4;
var closure;
var object2;
if (animate) {
if (a0) {
binding = env0_6;
set = binding.set;
value3 = environment.__proto__;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
binding2 = env1_9;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue2, [1, binding2])]);
binding = env0_7;
set = binding.set;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
binding3 = env1_7;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue3, [1, binding3])]);
binding = env0_8;
set = binding.set;
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue4.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue4, [0, binding3])]);
binding = env0_5;
set = binding.set;
moduleValue5 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue5.withSpring;
binding4 = env1_11;
closure = DN;
object2 = {opacity: env0_7};
object2.withDelay = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay;
withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.withTiming = withTiming;
object2.OPACITY_OUT_CONFIG = env1_8;
object2.scale = env0_6;
object2.SCALE_CONFIG = binding2;
object2.right = env0_5;
object2.TRANSLATE_OUT_CONFIG = env1_10;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.finishAnimationCallback = env0_9;
closure.__closure = object2;
closure.__workletHash = 9570116008915;
closure.__initData = env1_17;
Reflect.apply(set, binding, [Reflect.apply(withSpring, moduleValue5, [12, binding4,
'respect-motion-settings',
closure])]);
} else {
binding = env0_8;
binding.set(1);
binding = env0_6;
binding.set(0.5);
binding = env0_7;
binding.set(0);
binding = env0_5;
binding.set(30);
function ContactSuggestionActionsB() { // fn#111753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3026, owner: ContactSuggestionActions.b, offset: 0x023b07a9, size: 73 bytes, params: 1, frame: 11
const object = {};
object.right = env0_5.get();
object.opacity = env0_7.get();
const object2 = {};
object2.scale = env0_6.get();
object.transform = [object2];
return object;
}
} else {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(env0_9)();
}
}
function DN(a0) { // fn#111758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3745, owner: ContactSuggestionActions.D.n, offset: 0x023b0a82, size: 316 bytes, params: 2, frame: 27
var environment;
var value;
var binding;
var set;
var value2;
var moduleValue;
var withDelay;
var withTiming;
var moduleValue3;
var moduleValue4;
var moduleValue5;
var moduleValue6;
var binding2;
var closure;
var object2;
if (a0) {
value = environment.__proto__;
binding = env1_7;
set = binding.set;
value2 = environment.__proto__.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue.withDelay;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue, [1000,
(require(4504) /* metro dependency 4504: timing */).withTiming(0, env2_8)])]);
binding = env1_6;
set = binding.set;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue3.withDelay;
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue4.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue3, [1000, Reflect.apply(withTiming,
moduleValue4,
[0.5, env2_9])])]);
binding = env1_5;
set = binding.set;
moduleValue5 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue5.withDelay;
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue6.withTiming;
binding2 = env2_10;
closure = n_body;
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.finishAnimationCallback = env1_9;
closure.__closure = object2;
closure.__workletHash = 5242616772399;
closure.__initData = env2_18;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue5, [1000, Reflect.apply(withTiming,
moduleValue6,
[-8, binding2, 'respect-motion-settings', closure])])]);
}
}
function ContactSuggestionActionsE() { // fn#111754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3211, owner: ContactSuggestionActions.E, offset: 0x023b07f2, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_8.get();
return object;
}
function _fun111755() { // fn#111755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3330, offset: 0x023b080a, size: 141 bytes, params: 1, frame: 13
var binding;
let value = environment.__proto__;
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
const addContactSuggestion = value.addContactSuggestion;
const userBinding = user;
Reflect.apply(addContactSuggestion, value, [userBinding]);
onAddSuggestion(userBinding);
added.set(true);
if (!animate) {
binding = env0_5;
binding.set(12);
binding = env0_7;
binding.set(1);
binding = env0_6;
binding.set(1);
binding = env0_8;
binding.set(0);
}
}
function ContactSuggestionActionsD(a0) { // fn#111757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3569, owner: ContactSuggestionActions.D, offset: 0x023b0897, size: 491 bytes, params: 2, frame: 27
var environment;
var value2;
var moduleValue;
var binding;
var set;
var value3;
var moduleValue2;
var withTiming;
var binding2;
var moduleValue3;
var binding3;
var moduleValue4;
var moduleValue5;
var withSpring;
var binding4;
var DN2;
var object;
if (animate) {
if (a0) {
binding = env0_6;
set = binding.set;
value3 = environment.__proto__;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
binding2 = env1_9;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue2, [1, binding2])]);
binding = env0_7;
set = binding.set;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
binding3 = env1_7;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue3, [1, binding3])]);
binding = env0_8;
set = binding.set;
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue4.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue4, [0, binding3])]);
binding = env0_5;
set = binding.set;
moduleValue5 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue5.withSpring;
binding4 = env1_11;
DN2 = DN;
object = {opacity: env0_7};
object.withDelay = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay;
withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.withTiming = withTiming;
object.OPACITY_OUT_CONFIG = env1_8;
object.scale = env0_6;
object.SCALE_CONFIG = binding2;
object.right = env0_5;
object.TRANSLATE_OUT_CONFIG = env1_10;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.finishAnimationCallback = env0_9;
DN2.__closure = object;
DN2.__workletHash = 9570116008915;
DN2.__initData = env1_17;
Reflect.apply(set, binding, [Reflect.apply(withSpring, moduleValue5, [12, binding4,
'respect-motion-settings',
DN2])]);
} else {
binding = env0_8;
binding.set(1);
binding = env0_6;
binding.set(0.5);
binding = env0_7;
binding.set(0);
binding = env0_5;
binding.set(30);
}
} else {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(env0_9)();
}
function DN(a0) { // fn#111758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3745, owner: ContactSuggestionActions.D.n, offset: 0x023b0a82, size: 316 bytes, params: 2, frame: 27
var environment;
var value;
var binding;
var set;
var value2;
var moduleValue;
var withDelay;
var withTiming;
var moduleValue3;
var moduleValue4;
var moduleValue5;
var moduleValue6;
var binding2;
var n_body2;
var object;
if (a0) {
value = environment.__proto__;
binding = env1_7;
set = binding.set;
value2 = environment.__proto__.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue.withDelay;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue, [1000,
(require(4504) /* metro dependency 4504: timing */).withTiming(0, env2_8)])]);
binding = env1_6;
set = binding.set;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue3.withDelay;
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue4.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue3, [1000, Reflect.apply(withTiming,
moduleValue4,
[0.5, env2_9])])]);
binding = env1_5;
set = binding.set;
moduleValue5 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue5.withDelay;
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue6.withTiming;
binding2 = env2_10;
n_body2 = n_body;
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.finishAnimationCallback = env1_9;
n_body2.__closure = object;
n_body2.__workletHash = 5242616772399;
n_body2.__initData = env2_18;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue5, [1000, Reflect.apply(withTiming,
moduleValue6,
[-8, binding2, 'respect-motion-settings', n_body2])])]);
}
function n_body(a0) { // fn#111759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3957, owner: ContactSuggestionActions.D.n.body, offset: 0x023b0bbe, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [env2_9])();
}
}
}
}
function n_body(a0) { // fn#111759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3957, owner: ContactSuggestionActions.D.n.body, offset: 0x023b0bbe, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [env2_9])();
}
}
global.__d(_fun111749, 14806, [31, 27, 33, 4017, 4501, 697, 14478, 4504, 4577, 1305, 14807, 4578, 1244,
2]) /* metro module 14806, dependencies: [31, 27, 33, 4017, 4501, 697, 14478, 4504, 4577, 1305, 14807, 4578, 1244, 2] */;
@@ -1,154 +1,167 @@
/* Metro module 15159; source: modules/main_tabs_v2/native/friends/components/ContactSuggestionRow.tsx; dependencies: [31, 4502, 661, 33, 3995, 4017, 1244, 632, 14478, 14477, 7707, 14805, 14806, 683, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import AccessibilityStore from '../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UserRow from '../../shared_components/user_list/UserRow.tsx'; /* Metro dependency 7707 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FriendSuggestionUtilsModule from '../../../../friend_suggestions/FriendSuggestionUtils.tsx'; /* Metro dependency 14477 */
import * as ActionStatusSubLabelModule from './ActionStatusSubLabel.tsx'; /* Metro dependency 14805 */
import * as ContactSuggestionActionsModule from './ContactSuggestionActions.tsx'; /* Metro dependency 14806 */
function _fun115684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:6, offset: 0x0246a08a, size: 216 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.AnalyticEvents;
const env0_6 = constantsModule.InstantInviteSources;
const env0_7 = constantsModule.RelationshipTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
object = {ADD: 'add'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ContactSuggestionRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ContactSuggestionRow.tsx');
exports.ContactSuggestionRow = ContactSuggestionRow;
}
function ContactSuggestionRow(a0) { // fn#115685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:378, offset: 0x0246a162, size: 933 bytes, params: 2, frame: 29
var r12;
var r5;
var defaultImport;
var defaultImport2;
var defaultImport3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var z7y34b;
const suggestedFriend = a0.suggestedFriend;
const added = a0.added;
const onAddSuggestion = a0.onAddSuggestion;
let object = {'suggestedFriend': 0, 'added': 0, 'onAddSuggestion': 0};
silentSetPrototypeOf(object, null, undefined);
let value = copyDataProperties({}, a0, object, undefined);
const env0_3 = value;
const value2 = undefined;
if (suggestedFriend.friendSuggestionName == null) {
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r12 = defaultImport.getName(suggestedFriend.user);
} else if (suggestedFriend.friendSuggestionName.length > 0) {
r12 = suggestedFriend.friendSuggestionName;
} else {
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r12 = defaultImport.getName(suggestedFriend.user);
}
const value6 = (ReanimatedRexportModule).useSharedValue(false);
const binding = env0_3;
binding.useEffect(_fun115686, [added, value6]);
const value7 = binding.useMemo(_fun115687, [added]);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useCallback = binding.useCallback;
let user = suggestedFriend.user;
const value8 = Reflect.apply(useCallback, binding, [_fun115689, [value6, onAddSuggestion, user]]);
let mutualFriendsCount = suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount;
const r11 = mutualFriendsCount != null && (suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount) > 0;
const suggestedContactNameForSuggestion = (FriendSuggestionUtilsModule).getSuggestedContactNameForSuggestion(r12,
suggestedFriend);
if (suggestedContactNameForSuggestion != null) {
defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r5 = '' + defaultImport3.getUserTag(suggestedFriend.user) + ' · ' + suggestedContactNameForSuggestion;
} else {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r5 = defaultImport2.getUserTag(suggestedFriend.user);
}
const defaultImport4Props = {...value};
user = suggestedFriend.user;
defaultImport4Props['user'] = user;
const SUGGESTION = RelationshipTypes.SUGGESTION;
defaultImport4Props['type'] = SUGGESTION;
defaultImport4Props['accessibilityActions'] = value7;
defaultImport4Props['onAccessibilityAction'] = value8;
defaultImport4Props['labelLineClamp'] = 1;
defaultImport4Props['subLabelLineClamp'] = 1;
defaultImport4Props['label'] = r12;
const ActionStatusSubLabel = (ActionStatusSubLabelModule).ActionStatusSubLabel;
object = {actioned: value6, label: r5};
if (r11) {
formatToPlainString = intl.formatToPlainString;
z7y34b = (require(1244) /* metro dependency 1244: indexNative */).t.z7y34b;
mutualFriendsCount = suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount;
value = '';
value = Reflect.apply(formatToPlainString, intl, [z7y34b, {count: mutualFriendsCount ?? value}]);
r5 = value;
} else {
r5 = value2;
}
object.secondaryLabel = r5;
const string = intl.string;
const Kzyxm9 = (require(1244) /* metro dependency 1244: indexNative */).t.Kzyxm9;
object.actionStatus = Reflect.apply(string, intl, [Kzyxm9]);
object.animate = !useReducedMotion;
defaultImport4Props['subLabel'] = <ActionStatusSubLabel {...object} />;
const ContactSuggestionActions = (ContactSuggestionActionsModule).ContactSuggestionActions;
user = suggestedFriend.user;
value = (
<ContactSuggestionActions
user={user}
added={value6}
onAddSuggestion={onAddSuggestion_115690}
animate={value}
/>
);
defaultImport4Props['trailing'] = value;
return <UserRow {...defaultImport4Props} />;
function _fun115686() { // fn#115686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:619, offset: 0x0246a507, size: 25 bytes, params: 1, frame: 11
const binding = env0_4;
binding.set(added);
}
function _fun115687() { // fn#115687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:659, offset: 0x0246a520, size: 106 bytes, params: 1, frame: 15
var items2;
var object;
var intl;
if (added) {
items2 = [];
} else {
object = {};
value = environment.__proto__;
object.name = env1_9.ADD;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ed99+i']);
items2 = [object];
}
return items2;
}
function _fun115689({nativeEvent}) { // fn#115689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:812, offset: 0x0246a58a, size: 113 bytes, params: 2, frame: 13
var onAddSuggestionBinding;
var suggestedFriendBinding;
var user;
var addContactSuggestion;
const actionName = nativeEvent.actionName;
let value = environment.__proto__;
const ADD = env1_9.ADD;
if (actionName === ADD) {
env0_4.set(true);
onAddSuggestionBinding = onAddSuggestion;
suggestedFriendBinding = suggestedFriend;
user = suggestedFriendBinding.user;
onAddSuggestionBinding(user);
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
addContactSuggestion = value.addContactSuggestion;
user = suggestedFriendBinding.user;
return Reflect.apply(addContactSuggestion, value, [user]);
}
}
function ContactSuggestionRowOnAddSuggestion(a0) { // fn#115690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:1635, owner: ContactSuggestionRow.onAddSuggestion, offset: 0x0246a5fb, size: 118 bytes, params: 2, frame: 19
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
Reflect.apply(track, defaultImport, [FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0.id,
suggestion_source: suggestedFriend.source,
location: env0_3.location ?? InstantInviteSources.ADD_FRIENDS_MODAL}]);
onAddSuggestion(a0);
}
function ContactSuggestionRow(a0) { // fn#115685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:378, offset: 0x0246a162, size: 933 bytes, params: 2, frame: 29
var r12;
var r5;
var defaultImport;
var defaultImport2;
var defaultImport3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var z7y34b;
const suggestedFriend = a0.suggestedFriend;
const added = a0.added;
const onAddSuggestion = a0.onAddSuggestion;
let object2 = {'suggestedFriend': 0, 'added': 0, 'onAddSuggestion': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
const env0_3 = value;
const value2 = undefined;
if (suggestedFriend.friendSuggestionName == null) {
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r12 = defaultImport.getName(suggestedFriend.user);
} else if (suggestedFriend.friendSuggestionName.length > 0) {
r12 = suggestedFriend.friendSuggestionName;
} else {
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r12 = defaultImport.getName(suggestedFriend.user);
}
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_3;
binding.useEffect(_fun115686, [added, value6]);
const value7 = binding.useMemo(_fun115687, [added]);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useCallback = binding.useCallback;
let user = suggestedFriend.user;
const value8 = Reflect.apply(useCallback, binding, [_fun115689, [value6, onAddSuggestion, user]]);
let mutualFriendsCount = suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount;
const r11 = mutualFriendsCount != null && (suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount) > 0;
const suggestedContactNameForSuggestion = (require(14477) /* metro dependency 14477: FriendSuggestionUtils */).getSuggestedContactNameForSuggestion(r12,
suggestedFriend);
if (suggestedContactNameForSuggestion != null) {
defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r5 = '' + defaultImport3.getUserTag(suggestedFriend.user) + ' · ' + suggestedContactNameForSuggestion;
} else {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r5 = defaultImport2.getUserTag(suggestedFriend.user);
}
const UserRow = importDefault(7707) /* metro dependency 7707: UserRow */;
const defaultImport4Props = {...value};
user = suggestedFriend.user;
defaultImport4Props['user'] = user;
const SUGGESTION = RelationshipTypes.SUGGESTION;
defaultImport4Props['type'] = SUGGESTION;
defaultImport4Props['accessibilityActions'] = value7;
defaultImport4Props['onAccessibilityAction'] = value8;
defaultImport4Props['labelLineClamp'] = 1;
defaultImport4Props['subLabelLineClamp'] = 1;
defaultImport4Props['label'] = r12;
const ActionStatusSubLabel = (require(14805) /* metro dependency 14805: ActionStatusSubLabel */).ActionStatusSubLabel;
object2 = {actioned: value6, label: r5};
if (r11) {
formatToPlainString = intl.formatToPlainString;
z7y34b = (require(1244) /* metro dependency 1244: indexNative */).t.z7y34b;
mutualFriendsCount = suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount;
value = '';
value = Reflect.apply(formatToPlainString, intl, [z7y34b, {count: mutualFriendsCount ?? value}]);
r5 = value;
} else {
r5 = value2;
}
object2.secondaryLabel = r5;
const string = intl.string;
const Kzyxm9 = (require(1244) /* metro dependency 1244: indexNative */).t.Kzyxm9;
object2.actionStatus = Reflect.apply(string, intl, [Kzyxm9]);
object2.animate = !useReducedMotion;
defaultImport4Props['subLabel'] = <ActionStatusSubLabel {...object2} />;
const ContactSuggestionActions = (require(14806) /* metro dependency 14806: ContactSuggestionActions */).ContactSuggestionActions;
user = suggestedFriend.user;
value = <ContactSuggestionActions user={user} added={value6} onAddSuggestion={onAddSuggestion} animate={value} />;
defaultImport4Props['trailing'] = value;
return <UserRow {...defaultImport4Props} />;
}
function _fun115686() { // fn#115686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:619, offset: 0x0246a507, size: 25 bytes, params: 1, frame: 11
const binding = env0_4;
binding.set(added);
}
function _fun115687() { // fn#115687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:659, offset: 0x0246a520, size: 106 bytes, params: 1, frame: 15
var items;
var object2;
var intl;
if (added) {
items = [];
} else {
object2 = {};
value = environment.__proto__;
object2.name = env1_9.ADD;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ed99+i']);
items = [object2];
}
return items;
}
function _fun115689({nativeEvent}) { // fn#115689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:812, offset: 0x0246a58a, size: 113 bytes, params: 2, frame: 13
var onAddSuggestionBinding;
var suggestedFriendBinding;
var user;
var addContactSuggestion;
const actionName = nativeEvent.actionName;
let value = environment.__proto__;
const ADD = env1_9.ADD;
if (actionName === ADD) {
env0_4.set(true);
onAddSuggestionBinding = onAddSuggestion;
suggestedFriendBinding = suggestedFriend;
user = suggestedFriendBinding.user;
onAddSuggestionBinding(user);
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
addContactSuggestion = value.addContactSuggestion;
user = suggestedFriendBinding.user;
return Reflect.apply(addContactSuggestion, value, [user]);
}
}
function ContactSuggestionRowOnAddSuggestion(a0) { // fn#115690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:1635, owner: ContactSuggestionRow.onAddSuggestion, offset: 0x0246a5fb, size: 118 bytes, params: 2, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
Reflect.apply(track, defaultImport, [FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0.id,
suggestion_source: suggestedFriend.source,
location: env0_3.location ?? InstantInviteSources.ADD_FRIENDS_MODAL}]);
onAddSuggestion(a0);
}
global.__d(_fun115684, 15159, [31, 4502, 661, 33, 3995, 4017, 1244, 632, 14478, 14477, 7707, 14805, 14806, 683,
2]) /* metro module 15159, dependencies: [31, 4502, 661, 33, 3995, 4017, 1244, 632, 14478, 14477, 7707, 14805, 14806, 683, 2] */;
@@ -1,227 +1,271 @@
/* Metro module 15157; source: modules/main_tabs_v2/native/friends/components/IncomingRequestRow.tsx; dependencies: [31, 4502, 4234, 7690, 661, 33, 4017, 632, 1244, 3995, 14478, 10349, 7707, 14805, 15158, 2] */
import UserUtils from '../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import ApplicationStore from '../../../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import AccessibilityStore from '../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UserRow from '../../shared_components/user_list/UserRow.tsx'; /* Metro dependency 7707 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UserRowConstantsModule from '../../shared_components/user_list/UserRowConstants.tsx'; /* Metro dependency 7690 */
import * as ActionStatusSubLabelModule from './ActionStatusSubLabel.tsx'; /* Metro dependency 14805 */
import * as IncomingRequestRowActionsModule from './IncomingRequestRowActions.tsx'; /* Metro dependency 15158 */
function _fun115658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:6, offset: 0x02468aa2, size: 291 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const env0_6 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_7 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
object = {ACCEPT: 'accept', DECLINE: 'decline', WAVE: 'wave'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/IncomingRequestRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/IncomingRequestRow.tsx');
exports.IncomingFriendRequestRow = IncomingFriendRequestRow;
exports.ConnectedIncomingGameFriendRequestRow = ConnectedIncomingGameFriendRequestRow;
}
function IncomingRequestRow(a0) { // fn#115659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:274, offset: 0x02468bc5, size: 699 bytes, params: 2, frame: 35
const user = a0.user;
const applicationId = a0.applicationId;
const accepted = a0.accepted;
const onAcceptIncomingRequest = a0.onAcceptIncomingRequest;
const onAcceptIncomingRequest2 = onAcceptIncomingRequest;
const onDeclineIncomingRequest = a0.onDeclineIncomingRequest;
const accessibilityLabel = a0.accessibilityLabel;
const acceptRequestAccessibilityLabel = a0.acceptRequestAccessibilityLabel;
const ignoreRequestAccessibilityLabel = a0.ignoreRequestAccessibilityLabel;
const acceptedRequestLabel = a0.acceptedRequestLabel;
const acceptedRequestAccessibilityLabel = a0.acceptedRequestAccessibilityLabel;
const object = {'user': 0, 'applicationId': 0, 'accepted': 0, 'onAcceptIncomingRequest': 0,
'onDeclineIncomingRequest': 0, 'accessibilityLabel': 0, 'acceptRequestAccessibilityLabel': 0,
'ignoreRequestAccessibilityLabel': 0, 'acceptedRequestLabel': 0, 'acceptedRequestAccessibilityLabel': 0};
silentSetPrototypeOf(object, null, undefined);
let value = copyDataProperties({}, a0, object, undefined);
const value3 = (ReanimatedRexportModule).useSharedValue(false);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
onAcceptIncomingRequest2.useEffect(_fun115661, [accepted, value3]);
const value4 = onAcceptIncomingRequest2.useMemo(_fun115662, [acceptRequestAccessibilityLabel, accepted,
ignoreRequestAccessibilityLabel, user]);
const value5 = onAcceptIncomingRequest2.useCallback(_fun115663, [applicationId, onAcceptIncomingRequest,
onDeclineIncomingRequest, value3, user]);
const value7 = onAcceptIncomingRequest2.useMemo(_fun115665,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
}), applicationId, (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user)]);
const defaultImport2Props = {...value};
defaultImport2Props['user'] = user;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
defaultImport2Props['type'] = PENDING_INCOMING;
const ACTIONS = UserRowModes.ACTIONS;
defaultImport2Props['mode'] = ACTIONS;
defaultImport2Props['accessibilityActions'] = value4;
defaultImport2Props['accessibilityLabel'] = accessibilityLabel;
defaultImport2Props['onAccessibilityAction'] = value5;
const ActionStatusSubLabel = (ActionStatusSubLabelModule).ActionStatusSubLabel;
defaultImport2Props['subLabel'] = (
<ActionStatusSubLabel
actioned={value3}
label={value7}
actionStatus={acceptedRequestLabel}
actionStatusAccessibilityLabel={acceptedRequestAccessibilityLabel}
animate={!useReducedMotion}
/>
);
const IncomingRequestRowActions = (IncomingRequestRowActionsModule).IncomingRequestRowActions;
value = (
<IncomingRequestRowActions
user={user}
pressed={value3}
applicationId={applicationId}
onAcceptIncomingRequest={onAcceptIncomingRequest}
onDeclineIncomingRequest={onDeclineIncomingRequest}
animate={value}
acceptRequestAccessibilityLabel={acceptRequestAccessibilityLabel}
ignoreRequestAccessibilityLabel={ignoreRequestAccessibilityLabel}
/>
);
defaultImport2Props['trailing'] = value;
return <UserRow {...defaultImport2Props} />;
function _fun115661() { // fn#115661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:650, offset: 0x02468e80, size: 25 bytes, params: 1, frame: 11
ConstantsModule.RelationshipTypes.set(accepted);
}
function IncomingRequestRow(a0) { // fn#115659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:274, offset: 0x02468bc5, size: 699 bytes, params: 2, frame: 35
const user = a0.user;
const applicationId = a0.applicationId;
const accepted = a0.accepted;
const onAcceptIncomingRequest = a0.onAcceptIncomingRequest;
const env0_3 = onAcceptIncomingRequest;
const onDeclineIncomingRequest = a0.onDeclineIncomingRequest;
const accessibilityLabel = a0.accessibilityLabel;
const acceptRequestAccessibilityLabel = a0.acceptRequestAccessibilityLabel;
const ignoreRequestAccessibilityLabel = a0.ignoreRequestAccessibilityLabel;
const acceptedRequestLabel = a0.acceptedRequestLabel;
const acceptedRequestAccessibilityLabel = a0.acceptedRequestAccessibilityLabel;
const object2 = {'user': 0, 'applicationId': 0, 'accepted': 0, 'onAcceptIncomingRequest': 0,
'onDeclineIncomingRequest': 0, 'accessibilityLabel': 0, 'acceptRequestAccessibilityLabel': 0,
'ignoreRequestAccessibilityLabel': 0, 'acceptedRequestLabel': 0, 'acceptedRequestAccessibilityLabel': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
env0_3.useEffect(_fun115661, [accepted, value3]);
const value4 = env0_3.useMemo(_fun115662, [acceptRequestAccessibilityLabel, accepted,
ignoreRequestAccessibilityLabel, user]);
const value5 = env0_3.useCallback(_fun115663, [applicationId, onAcceptIncomingRequest, onDeclineIncomingRequest,
value3, user]);
const value7 = env0_3.useMemo(_fun115665,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
}), applicationId, (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user)]);
const UserRow = importDefault(7707) /* metro dependency 7707: UserRow */;
const defaultImport2Props = {...value};
defaultImport2Props['user'] = user;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
defaultImport2Props['type'] = PENDING_INCOMING;
const ACTIONS = UserRowModes.ACTIONS;
defaultImport2Props['mode'] = ACTIONS;
defaultImport2Props['accessibilityActions'] = value4;
defaultImport2Props['accessibilityLabel'] = accessibilityLabel;
defaultImport2Props['onAccessibilityAction'] = value5;
const ActionStatusSubLabel = (require(14805) /* metro dependency 14805: ActionStatusSubLabel */).ActionStatusSubLabel;
defaultImport2Props['subLabel'] = <ActionStatusSubLabel actioned={value3} label={value7} actionStatus={acceptedRequestLabel} actionStatusAccessibilityLabel={acceptedRequestAccessibilityLabel} animate={!useReducedMotion} />;
const IncomingRequestRowActions = (require(15158) /* metro dependency 15158: IncomingRequestRowActions */).IncomingRequestRowActions;
value = <IncomingRequestRowActions user={user} pressed={value3} applicationId={applicationId} onAcceptIncomingRequest={onAcceptIncomingRequest} onDeclineIncomingRequest={onDeclineIncomingRequest} animate={value} acceptRequestAccessibilityLabel={acceptRequestAccessibilityLabel} ignoreRequestAccessibilityLabel={ignoreRequestAccessibilityLabel} />;
defaultImport2Props['trailing'] = value;
return <UserRow {...defaultImport2Props} />;
}
function _fun115662() { // fn#115662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:690, offset: 0x02468e99, size: 198 bytes, params: 1, frame: 20
var items2;
var intl;
var formatToPlainString;
var m0zYbV;
var defaultImport;
const acceptedBinding = accepted;
const object = {};
const binding = env1_9;
if (acceptedBinding) {
object.name = binding.WAVE;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
m0zYbV = (require(1244) /* metro dependency 1244: indexNative */).t.m0zYbV;
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
object.label = Reflect.apply(formatToPlainString, intl, [m0zYbV, {username: defaultImport.getName(user)}]);
items2 = [object];
} else {
object.name = binding.ACCEPT;
object.label = acceptRequestAccessibilityLabel;
items2 = [object, {name: env1_9.DECLINE, label: ignoreRequestAccessibilityLabel}];
}
return items2;
}
function IncomingGameFriendRequestRow(a0) { // fn#115666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:1884, offset: 0x02469103, size: 455 bytes, params: 2, frame: 26
const user = a0.user;
const application = a0.application;
const value = Object.create(null);
value.user = 0;
value.application = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
const incomingRequestRowBindingProps = {user: user, applicationId: application.id};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
incomingRequestRowBindingProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.u6lp4x, {name: value4}]);
incomingRequestRowBindingProps.acceptedRequestLabel = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.gRgJGR,
{applicationNameHook: applicationNameHook});
formatToPlainString = intl.formatToPlainString;
const Ke6fRJ = (require(1244) /* metro dependency 1244: indexNative */).t.Ke6fRJ;
incomingRequestRowBindingProps.acceptedRequestAccessibilityLabel = Reflect.apply(formatToPlainString, intl, [Ke6fRJ,
{name: value4, applicationName: application.name}]);
incomingRequestRowBindingProps.acceptRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kMUpdH,
{name: value4, applicationName: application.name});
incomingRequestRowBindingProps.ignoreRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.d8Cw5e,
{name: value4, applicationName: application.name});
copyDataProperties(incomingRequestRowBindingProps, value2, value);
return <IncomingRequestRow {...incomingRequestRowBindingProps} />;
}
function _fun115663({nativeEvent}) { // fn#115663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:879, offset: 0x02468f5f, size: 292 bytes, params: 2, frame: 17
var userBinding;
var id;
var onDeclineIncomingRequestBinding;
var applicationIdBinding;
var dismissIncomingRequest;
var onAcceptIncomingRequestBinding;
var acceptIncomingRequest;
const actionName = nativeEvent.actionName;
let value = environment.__proto__;
const ACCEPT = env1_9.ACCEPT;
if (ACCEPT === actionName) {
ConstantsModule.RelationshipTypes.set(true);
onAcceptIncomingRequestBinding = onAcceptIncomingRequest;
userBinding = user;
id = userBinding.id;
applicationIdBinding = applicationId;
onAcceptIncomingRequestBinding(id, applicationIdBinding);
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
acceptIncomingRequest = value.acceptIncomingRequest;
id = userBinding.id;
return Reflect.apply(acceptIncomingRequest, value, [{userId: id, applicationId: applicationIdBinding}]);
}
const DECLINE = env1_9.DECLINE;
if (DECLINE === actionName) {
onDeclineIncomingRequestBinding = onDeclineIncomingRequest;
userBinding = user;
id = userBinding.id;
applicationIdBinding = applicationId;
onDeclineIncomingRequestBinding(id, applicationIdBinding);
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
dismissIncomingRequest = value.dismissIncomingRequest;
id = userBinding.id;
return Reflect.apply(dismissIncomingRequest, value, [{userId: id, applicationId: applicationIdBinding}]);
}
const WAVE = env1_9.WAVE;
if (WAVE === actionName) {
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
return value.sendWave(user.id, true, 'Incoming Friend Request');
}
}
function IncomingFriendRequestRow(a0) { // fn#115668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:2757, offset: 0x02469310, size: 386 bytes, params: 2, frame: 24
const user = a0.user;
const value = Object.create(null);
value.user = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
const object2 = {user: user};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.u6lp4x, {name: value4}]);
object2.acceptedRequestLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0E614Z']);
object2.acceptedRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cRwkp7,
{name: value4});
formatToPlainString = intl.formatToPlainString;
const MUfqsS = (require(1244) /* metro dependency 1244: indexNative */).t.MUfqsS;
object2.acceptRequestAccessibilityLabel = Reflect.apply(formatToPlainString, intl, [MUfqsS, {name: value4}]);
object2.ignoreRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0OF9IB'],
{name: value4});
copyDataProperties(object2, value2, value);
return <IncomingRequestRow {...object2} />;
}
function _fun115665() { // fn#115665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:1299, offset: 0x0246909e, size: 101 bytes, params: 1, frame: 17
var r0;
var value3;
var ApplicationIconAndName;
let applicationBinding = application;
if (applicationBinding != null) {
value3 = environment.__proto__;
ApplicationIconAndName = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
applicationBinding = application;
r0 = (
<ApplicationIconAndName
application={applicationBinding}
textVariant="text-xs/medium"
iconSize={12}
key={applicationBinding.id}
/>
);
} else {
r0 = applicationId != null ? '' : JsxRuntimeModule.jsx;
}
return r0;
}
function ConnectedIncomingGameFriendRequestRow(a0) { // fn#115669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:3340, offset: 0x02469492, size: 144 bytes, params: 2, frame: 20
const user = a0.user;
const env0_0 = a0.applicationId;
const value = null;
const value2 = Object.create(value);
value2.user = 0;
value2.applicationId = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const application = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
});
return value == application ? value : <IncomingGameFriendRequestRow user={user} application={application} {...value3} />;
}
}
function _fun115661() { // fn#115661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:650, offset: 0x02468e80, size: 25 bytes, params: 1, frame: 11
const binding = env0_7;
binding.set(accepted);
}
function _fun115662() { // fn#115662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:690, offset: 0x02468e99, size: 198 bytes, params: 1, frame: 20
var items;
var intl;
var formatToPlainString;
var m0zYbV;
var defaultImport;
const acceptedBinding = accepted;
const object2 = {};
const binding = env1_9;
if (acceptedBinding) {
object2.name = binding.WAVE;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
function IncomingGameFriendRequestRow(a0) { // fn#115666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:1884, offset: 0x02469103, size: 455 bytes, params: 2, frame: 26
const user = a0.user;
const application = a0.application;
const value = Object.create(null);
value.user = 0;
value.application = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (UserUtils).useUserTag(user);
const incomingRequestRowBindingProps = {user: user, applicationId: application.id};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
incomingRequestRowBindingProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.u6lp4x, {name: value4}]);
incomingRequestRowBindingProps.acceptedRequestLabel = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.gRgJGR,
{applicationNameHook: applicationNameHook});
formatToPlainString = intl.formatToPlainString;
m0zYbV = (require(1244) /* metro dependency 1244: indexNative */).t.m0zYbV;
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
object2.label = Reflect.apply(formatToPlainString, intl, [m0zYbV, {username: defaultImport.getName(user)}]);
items = [object2];
} else {
object2.name = binding.ACCEPT;
object2.label = acceptRequestAccessibilityLabel;
items = [object2, {name: env1_9.DECLINE, label: ignoreRequestAccessibilityLabel}];
const Ke6fRJ = (require(1244) /* metro dependency 1244: indexNative */).t.Ke6fRJ;
incomingRequestRowBindingProps.acceptedRequestAccessibilityLabel = Reflect.apply(formatToPlainString, intl, [Ke6fRJ,
{name: value4, applicationName: application.name}]);
incomingRequestRowBindingProps.acceptRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kMUpdH,
{name: value4, applicationName: application.name});
incomingRequestRowBindingProps.ignoreRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.d8Cw5e,
{name: value4, applicationName: application.name});
copyDataProperties(incomingRequestRowBindingProps, value2, value);
return <IncomingRequestRow {...incomingRequestRowBindingProps} />;
function applicationNameHook() { // fn#115667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:2192, owner: IncomingGameFriendRequestRow.applicationNameHook, offset: 0x024692ca, size: 70 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
const applicationBinding = application;
return ((Component) => <Component application={applicationBinding} textVariant="text-xs/medium" iconSize={12} key={applicationBinding.id} />)(value);
}
}
return items;
}
function _fun115663({nativeEvent}) { // fn#115663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:879, offset: 0x02468f5f, size: 292 bytes, params: 2, frame: 17
var userBinding;
var id;
var onDeclineIncomingRequestBinding;
var applicationIdBinding;
var dismissIncomingRequest;
var onAcceptIncomingRequestBinding;
var acceptIncomingRequest;
const actionName = nativeEvent.actionName;
let value = environment.__proto__;
const ACCEPT = env1_9.ACCEPT;
if (ACCEPT === actionName) {
env0_7.set(true);
onAcceptIncomingRequestBinding = onAcceptIncomingRequest;
userBinding = user;
id = userBinding.id;
applicationIdBinding = applicationId;
onAcceptIncomingRequestBinding(id, applicationIdBinding);
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
acceptIncomingRequest = value.acceptIncomingRequest;
id = userBinding.id;
return Reflect.apply(acceptIncomingRequest, value, [{userId: id, applicationId: applicationIdBinding}]);
function IncomingFriendRequestRow(a0) { // fn#115668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:2757, offset: 0x02469310, size: 386 bytes, params: 2, frame: 24
const user = a0.user;
const value = Object.create(null);
value.user = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (UserUtils).useUserTag(user);
const object = {user: user};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
object.accessibilityLabel = Reflect.apply(formatToPlainString, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.u6lp4x, {name: value4}]);
object.acceptedRequestLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0E614Z']);
object.acceptedRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cRwkp7,
{name: value4});
formatToPlainString = intl.formatToPlainString;
const MUfqsS = (require(1244) /* metro dependency 1244: indexNative */).t.MUfqsS;
object.acceptRequestAccessibilityLabel = Reflect.apply(formatToPlainString, intl, [MUfqsS, {name: value4}]);
object.ignoreRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0OF9IB'],
{name: value4});
copyDataProperties(object, value2, value);
return <IncomingRequestRow {...object} />;
}
const DECLINE = env1_9.DECLINE;
if (DECLINE === actionName) {
onDeclineIncomingRequestBinding = onDeclineIncomingRequest;
userBinding = user;
id = userBinding.id;
applicationIdBinding = applicationId;
onDeclineIncomingRequestBinding(id, applicationIdBinding);
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
dismissIncomingRequest = value.dismissIncomingRequest;
id = userBinding.id;
return Reflect.apply(dismissIncomingRequest, value, [{userId: id, applicationId: applicationIdBinding}]);
}
const WAVE = env1_9.WAVE;
if (WAVE === actionName) {
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
return value.sendWave(user.id, true, 'Incoming Friend Request');
}
}
function _fun115665() { // fn#115665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:1299, offset: 0x0246909e, size: 101 bytes, params: 1, frame: 17
var r0;
var value3;
var ApplicationIconAndName;
let applicationBinding = application;
if (applicationBinding != null) {
value3 = environment.__proto__;
ApplicationIconAndName = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
applicationBinding = application;
r0 = <ApplicationIconAndName application={applicationBinding} textVariant="text-xs/medium" iconSize={12} key={applicationBinding.id} />;
} else {
r0 = applicationId != null ? '' : env0_8;
function ConnectedIncomingGameFriendRequestRow(a0) { // fn#115669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:3340, offset: 0x02469492, size: 144 bytes, params: 2, frame: 20
const user = a0.user;
const env0_0 = a0.applicationId;
const value = null;
const value2 = Object.create(value);
value2.user = 0;
value2.applicationId = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const application = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
});
return (
value == application
? value
: (
<IncomingGameFriendRequestRow
user={user}
application={application}
{...value3}
/>
)
);
}
return r0;
}
function applicationNameHook() { // fn#115667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:2192, owner: IncomingGameFriendRequestRow.applicationNameHook, offset: 0x024692ca, size: 70 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
const applicationBinding = application;
return ((Component) => <Component application={applicationBinding} textVariant="text-xs/medium" iconSize={12} key={applicationBinding.id} />)(value);
}
global.__d(_fun115658, 15157, [31, 4502, 4234, 7690, 661, 33, 4017, 632, 1244, 3995, 14478, 10349, 7707, 14805,
15158,
2]) /* metro module 15157, dependencies: [31, 4502, 4234, 7690, 661, 33, 4017, 632, 1244, 3995, 14478, 10349, 7707, 14805, 15158, 2] */;
@@ -1,237 +1,274 @@
/* Metro module 15158; source: modules/main_tabs_v2/native/friends/components/IncomingRequestRowActions.tsx; dependencies: [31, 27, 33, 4501, 4017, 4504, 14478, 4572, 8341, 13436, 8096, 4578, 1244, 4573, 2] */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import Module08096 from '../../../../../by-id/module-08096.js'; /* Metro dependency 8096 */
import Module13436 from '../../../../../by-id/module-13436.js'; /* Metro dependency 13436 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as IconButtonNativeModule from '../../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as AddFriendsScreenUtilsModule from './AddFriendsScreenUtils.tsx'; /* Metro dependency 14478 */
function _fun115671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:6, offset: 0x02469522, size: 294 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flexDirection: 'row'}});
const env0_7 = (CreateStylesModule).createStyles({container: {flexDirection: 'row'}});
object = {code: "function IncomingRequestRowActionsTsx1(){const{animate,pressed,withTiming}=this.__closure;return{position:'absolute',right:0,flexDirection:'row',opacity:!animate?!pressed.get()?1:0:withTiming(!pressed.get()?1:0,{duration:150}),pointerEvents:!pressed.get()?'auto':'none'};}"};
object = {code: "function IncomingRequestRowActionsTsx2(){const{buttonWidth,buttonOffsetX,pressed,animate,withTiming}=this.__closure;const width=buttonWidth.get();const offset=buttonOffsetX.get();const scaleX=!pressed.get()?0.5:1;const translateX=!pressed.get()?width-offset:0;return{transform:[{translateX:!animate?translateX:withTiming(translateX)},{scaleX:!animate?scaleX:withTiming(scaleX)}],opacity:!animate?!pressed.get()?0:1:withTiming(!pressed.get()?0:1),pointerEvents:!pressed.get()?'none':'auto'};}"};
object = {code: 'function IncomingRequestRowActionsTsx3(){const{waveWidth,waveHeight}=this.__closure;return{transform:[{translateX:waveWidth.get()/2},{translateY:waveHeight.get()/2}]};}'};
object = {code: "function IncomingRequestRowActionsTsx4(){const{withDelay,withRepeat,withTiming,pressed,Easing,waveWidth,waveHeight}=this.__closure;return{transform:[{rotateZ:withDelay(450,withRepeat(withTiming(pressed.get()?'8deg':'-2deg',{duration:150,easing:Easing.inOut(Easing.quad)}),4,true))},{translateX:-waveWidth.get()/2},{translateY:-waveHeight.get()/2}]};}"};
object = {code: "function IncomingRequestRowActionsTsx5(){const{pressed}=this.__closure;return{pointerEvents:!pressed.get()?'none':'none'};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/IncomingRequestRowActions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/IncomingRequestRowActions.tsx');
exports.IncomingRequestRowActions = IncomingRequestRowActions;
}
function IncomingRequestRowActions({user, applicationId, pressed, onAcceptIncomingRequest, onDeclineIncomingRequest, animate, acceptRequestAccessibilityLabel, ignoreRequestAccessibilityLabel}) { // fn#115672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:1809, offset: 0x02469648, size: 1386 bytes, params: 2, frame: 38
const onAcceptIncomingRequest2 = onAcceptIncomingRequest;
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0);
const value3 = (ReanimatedRexportModule).useSharedValue(-1);
const value4 = (ReanimatedRexportModule).useSharedValue(-1);
const env0_8 = value4;
const value5 = (ReanimatedRexportModule).useSharedValue(-1);
const env0_9 = value5;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = IncomingRequestRowActionsE;
let object = {animate: animate, pressed: pressed};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object;
closure.__workletHash = 1291516991185;
closure.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = IncomingRequestRowActionsQ;
object = {buttonWidth: value3, buttonOffsetX: value2, pressed: pressed, animate: animate};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object;
closure.__workletHash = 2207673076655;
closure.__initData = env0_9;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = IncomingRequestRowActionsX;
closure.__closure = {waveWidth: value4, waveHeight: value5};
closure.__workletHash = 4308223742756;
closure.__initData = env0_10;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = IncomingRequestRowActionsA;
object = {withDelay: ReanimatedRexportModule.withDelay, withRepeat: ReanimatedRexportModule.withRepeat,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, pressed: pressed};
const Easing = ReanimatedRexportModule.Easing;
object.Easing = Easing;
object.waveWidth = value4;
object.waveHeight = value5;
closure.__closure = object;
closure.__workletHash = 6870822621980;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = function() {
pressed.get();
return {pointerEvents: 'none'};
};
closure.__closure = {pressed: pressed};
closure.__workletHash = 5804402563280;
closure.__initData = env0_12;
const value10 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
const binding = onAcceptIncomingRequest2;
const value11 = binding.useCallback(function() {
pressed.set(true);
var moduleValue = require(dependencyMap[6]);
var userBinding = user;
var applicationIdBinding = applicationId;
moduleValue.acceptIncomingRequest({userId: userBinding.id, applicationId: applicationIdBinding});
onAcceptIncomingRequest(userBinding.id, applicationIdBinding);
}, [applicationId, onAcceptIncomingRequest, pressed, user]);
const value12 = binding.useCallback(_fun115679, [applicationId, onDeclineIncomingRequest, user]);
const value13 = binding.useCallback(_fun115680, [user]);
const View2 = (ReanimatedRexport).View;
const object2 = {onLayout: onLayout_115681, style: value6};
const Stack = (StackNativeModule).Stack;
const IconButton = (IconButtonNativeModule).IconButton;
const view = (
<View2 {...object2}>
<Stack direction="horizontal" spacing={8}>
<IconButton
size="sm"
variant="tertiary"
icon={Module13436}
onPress={value12}
accessibilityLabel={ignoreRequestAccessibilityLabel}
maxFontSizeMultiplier={2}
/>
<IconButton
size="sm"
variant="active"
icon={Module08096}
onPress={value11}
accessibilityLabel={acceptRequestAccessibilityLabel}
maxFontSizeMultiplier={2}
/>
</Stack>
</View2>
);
const View3 = (ReanimatedRexport).View;
const view3Props = {style: value7, onLayout: onLayout_115682, ...value10};
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const n8nU4W = (IndexNativeModule).t.n8nU4W;
const View4 = (ReanimatedRexport).View;
const r13 = animate ? value8 : null;
const View5 = (ReanimatedRexport).View;
const view5Props = {style: animate ? value9 : null, onLayout: onLayout_115683};
const Text = (TextModule).Text;
return (
<View style={styles.container}>
{view}
<View3 {...view3Props}>
<Button
size="sm"
variant="secondary"
text={Reflect.apply(string, intl, [n8nU4W])}
icon={<View4
style={r13}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
>
<View5 {...view5Props}>
<Text maxFontSizeMultiplier={2} variant="text-sm/normal">
{'👋'}
</Text>
</View5>
</View4>}
onPress={value13}
/>
</View3>
</View>
);
function IncomingRequestRowActionsE() { // fn#115673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2177, owner: IncomingRequestRowActions.E, offset: 0x02469bb2, size: 148 bytes, params: 1, frame: 17
var r2;
var value5;
var moduleValue;
const object = {'position': 'absolute', 'right': 0, 'flexDirection': 'row'};
if (animate) {
value5 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
r2 = moduleValue.withTiming(pressed.get() ? 0 : 1, {duration: 150});
} else {
r2 = pressed.get() ? 0 : 1;
}
object.opacity = r2;
object.pointerEvents = pressed.get() ? 'none' : 'auto';
return object;
}
function IncomingRequestRowActions({user, applicationId, pressed, onAcceptIncomingRequest, onDeclineIncomingRequest, animate, acceptRequestAccessibilityLabel, ignoreRequestAccessibilityLabel}) { // fn#115672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:1809, offset: 0x02469648, size: 1386 bytes, params: 2, frame: 38
const env0_3 = onAcceptIncomingRequest;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const env0_8 = value4;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const env0_9 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = IncomingRequestRowActionsE;
let object3 = {animate: animate, pressed: pressed};
object3.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object3;
closure.__workletHash = 1291516991185;
closure.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = IncomingRequestRowActionsQ;
object3 = {buttonWidth: value3, buttonOffsetX: value2, pressed: pressed, animate: animate};
object3.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object3;
closure.__workletHash = 2207673076655;
closure.__initData = env0_9;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = IncomingRequestRowActionsX;
closure.__closure = {waveWidth: value4, waveHeight: value5};
closure.__workletHash = 4308223742756;
closure.__initData = env0_10;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const moduleValue8 = reanimatedRexportModule;
useAnimatedStyle = moduleValue8.useAnimatedStyle;
closure = IncomingRequestRowActionsA;
object3 = {withDelay: reanimatedRexportModule.withDelay, withRepeat: reanimatedRexportModule.withRepeat,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, pressed: pressed};
const Easing = reanimatedRexportModule.Easing;
object3.Easing = Easing;
object3.waveWidth = value4;
object3.waveHeight = value5;
closure.__closure = object3;
closure.__workletHash = 6870822621980;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
const moduleValue9 = reanimatedRexportModule;
const useAnimatedProps = moduleValue9.useAnimatedProps;
closure = function() {
pressed.get();
return {pointerEvents: 'none'};
};
closure.__closure = {pressed: pressed};
closure.__workletHash = 5804402563280;
closure.__initData = env0_12;
const value10 = Reflect.apply(useAnimatedProps, moduleValue9, [closure]);
const binding = env0_3;
const value11 = binding.useCallback(function() {
pressed.set(true);
var moduleValue = require(dependencyMap[6]);
var userBinding = user;
var applicationIdBinding = applicationId;
moduleValue.acceptIncomingRequest({userId: userBinding.id, applicationId: applicationIdBinding});
onAcceptIncomingRequest(userBinding.id, applicationIdBinding);
}, [applicationId, onAcceptIncomingRequest, pressed, user]);
const value12 = binding.useCallback(_fun115679, [applicationId, onDeclineIncomingRequest, user]);
const value13 = binding.useCallback(_fun115680, [user]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const object4 = {onLayout: onLayout_115681, style: value6};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const view = <View2 {...object4}><Stack direction="horizontal" spacing={8}><IconButton size="sm" variant="tertiary" icon={importDefault(13436) /* metro dependency 13436 */} onPress={value12} accessibilityLabel={ignoreRequestAccessibilityLabel} maxFontSizeMultiplier={2} /><IconButton size="sm" variant="active" icon={importDefault(8096) /* metro dependency 8096 */} onPress={value11} accessibilityLabel={acceptRequestAccessibilityLabel} maxFontSizeMultiplier={2} /></Stack></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view3Props = {style: value7, onLayout: onLayout_115682, ...value10};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const n8nU4W = (require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const r13 = animate ? value8 : null;
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view5Props = {style: animate ? value9 : null, onLayout: onLayout_115683};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
{view}
<View3 {...view3Props}>
<Button
size="sm"
variant="secondary"
text={Reflect.apply(string, intl, [n8nU4W])}
icon={<View4 style={r13} accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><View5 {...view5Props}><Text maxFontSizeMultiplier={2} variant="text-sm/normal">{'👋'}</Text></View5></View4>}
onPress={value13}
/>
</View3>
</View>
);
}
function IncomingRequestRowActionsQ() { // fn#115674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2493, owner: IncomingRequestRowActions.q, offset: 0x02469c46, size: 323 bytes, params: 1, frame: 18
var r2;
var withTiming;
var value15;
var moduleValue3;
const value2 = env0_7.get();
const value3 = JsxRuntimeModule.jsxs.get();
const r8 = pressed.get() ? 1 : 0.5;
const value7 = pressed.get();
const value8 = 0;
const r7 = value7 ? value8 : value2 - value3;
const object = {};
const items2 = [{translateX: animate ? (require(4504) /* metro dependency 4504: timing */).withTiming(r7) : r7}];
items2[1] = {scaleX: animate ? (require(4504) /* metro dependency 4504: timing */).withTiming(r8) : r8};
object.transform = items2;
if (animate) {
value15 = environment.__proto__;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
pressedBinding = pressed;
r2 = Reflect.apply(withTiming, moduleValue3, [pressedBinding.get() ? 1 : value8]);
} else {
pressedBinding = pressed;
r2 = pressedBinding.get() ? 1 : value8;
}
object.opacity = r2;
object.pointerEvents = pressed.get() ? 'auto' : 'none';
return object;
}
function IncomingRequestRowActionsX() { // fn#115675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2917, owner: IncomingRequestRowActions.x, offset: 0x02469d89, size: 74 bytes, params: 1, frame: 13
let binding = env0_8;
let get = binding.get;
const items2 = [{translateX: Reflect.apply(get, binding, []) / 2}];
binding = env0_9;
get = binding.get;
items2[1] = {translateY: Reflect.apply(get, binding, []) / 2};
return {transform: items2};
}
function IncomingRequestRowActionsA() { // fn#115676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3101, owner: IncomingRequestRowActions.A, offset: 0x02469dd3, size: 278 bytes, params: 1, frame: 27
let value = environment.__proto__;
const withDelay = ReanimatedRexportModule.withDelay;
const withRepeat = ReanimatedRexportModule.withRepeat;
const withTiming = TimingModule.withTiming;
const pressedBinding = pressed;
let get = pressedBinding.get;
const r4 = Reflect.apply(get, pressedBinding, []) ? '8deg' : '-2deg';
const Easing = ReanimatedRexportModule.Easing;
const inOut = Easing.inOut;
const Easing2 = ReanimatedRexportModule.Easing;
value = Reflect.apply(withTiming, TimingModule, [r4, {duration: 150, easing: Reflect.apply(inOut, Easing,
[Easing2.quad])}]);
value = Reflect.apply(withRepeat, ReanimatedRexportModule, [value, 4, true]);
const items2 = [{rotateZ: Reflect.apply(withDelay, ReanimatedRexportModule, [450, value])}];
let binding = env0_8;
get = binding.get;
items2[1] = {translateX: -Reflect.apply(get, binding, []) / 2};
binding = env0_9;
get = binding.get;
items2[2] = {translateY: -Reflect.apply(get, binding, []) / 2};
return {transform: items2};
}
function _fun115679() { // fn#115679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3840, offset: 0x02469f65, size: 79 bytes, params: 1, frame: 15
const onDeclineIncomingRequestBinding = onDeclineIncomingRequest;
const userBinding = user;
const id = userBinding.id;
const applicationIdBinding = applicationId;
onDeclineIncomingRequestBinding(id, applicationIdBinding);
const value = environment.__proto__;
(AddFriendsScreenUtilsModule).dismissIncomingRequest({userId: userBinding.id,
applicationId: applicationIdBinding});
}
function _fun115680() { // fn#115680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3945, offset: 0x02469fb4, size: 60 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
value.sendWave(user.id, true, 'Incoming Friend Request');
}
function IncomingRequestRowActionsOnLayout({nativeEvent}) { // fn#115681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4074, owner: IncomingRequestRowActions.onLayout, offset: 0x02469ff0, size: 41 bytes, params: 2, frame: 11
JsxRuntimeModule.jsxs.set(nativeEvent.layout.width);
}
function IncomingRequestRowActionsOnLayout_115682({nativeEvent}) { // fn#115682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4477, owner: IncomingRequestRowActions.onLayout, offset: 0x0246a019, size: 41 bytes, params: 2, frame: 11
const binding = env0_7;
binding.set(nativeEvent.layout.width);
}
function IncomingRequestRowActionsOnLayout_115683(a0) { // fn#115683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4788, owner: IncomingRequestRowActions.onLayout, offset: 0x0246a042, size: 72 bytes, params: 2, frame: 13
let binding = env0_8;
binding.set(a0.nativeEvent.layout.width);
binding = env0_9;
binding.set(a0.nativeEvent.layout.height);
}
function IncomingRequestRowActionsE() { // fn#115673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2177, owner: IncomingRequestRowActions.E, offset: 0x02469bb2, size: 148 bytes, params: 1, frame: 17
var r2;
var value5;
var moduleValue;
const object2 = {'position': 'absolute', 'right': 0, 'flexDirection': 'row'};
if (animate) {
value5 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
r2 = moduleValue.withTiming(pressed.get() ? 0 : 1, {duration: 150});
} else {
r2 = pressed.get() ? 0 : 1;
}
object2.opacity = r2;
object2.pointerEvents = pressed.get() ? 'none' : 'auto';
return object2;
}
function IncomingRequestRowActionsQ() { // fn#115674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2493, owner: IncomingRequestRowActions.q, offset: 0x02469c46, size: 323 bytes, params: 1, frame: 18
var r2;
var withTiming;
var value15;
var moduleValue3;
const value2 = env0_7.get();
const value3 = env0_6.get();
const r8 = pressed.get() ? 1 : 0.5;
const value7 = pressed.get();
const value8 = 0;
const r7 = value7 ? value8 : value2 - value3;
const object2 = {};
const items2 = [{translateX: animate ? (require(4504) /* metro dependency 4504: timing */).withTiming(r7) : r7}];
items2[1] = {scaleX: animate ? (require(4504) /* metro dependency 4504: timing */).withTiming(r8) : r8};
object2.transform = items2;
if (animate) {
value15 = environment.__proto__;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
pressedBinding = pressed;
r2 = Reflect.apply(withTiming, moduleValue3, [pressedBinding.get() ? 1 : value8]);
} else {
pressedBinding = pressed;
r2 = pressedBinding.get() ? 1 : value8;
}
object2.opacity = r2;
object2.pointerEvents = pressed.get() ? 'auto' : 'none';
return object2;
}
function IncomingRequestRowActionsX() { // fn#115675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2917, owner: IncomingRequestRowActions.x, offset: 0x02469d89, size: 74 bytes, params: 1, frame: 13
let binding = env0_8;
let get = binding.get;
const items2 = [{translateX: Reflect.apply(get, binding, []) / 2}];
binding = env0_9;
get = binding.get;
items2[1] = {translateY: Reflect.apply(get, binding, []) / 2};
return {transform: items2};
}
function IncomingRequestRowActionsA() { // fn#115676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3101, owner: IncomingRequestRowActions.A, offset: 0x02469dd3, size: 278 bytes, params: 1, frame: 27
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = reanimatedRexportModule.withDelay;
const moduleValue2 = reanimatedRexportModule;
const withRepeat = moduleValue2.withRepeat;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const pressedBinding = pressed;
let get = pressedBinding.get;
const r4 = Reflect.apply(get, pressedBinding, []) ? '8deg' : '-2deg';
const Easing = reanimatedRexportModule.Easing;
const inOut = Easing.inOut;
const Easing2 = reanimatedRexportModule.Easing;
value = Reflect.apply(withTiming, timingModule, [r4, {duration: 150, easing: Reflect.apply(inOut, Easing,
[Easing2.quad])}]);
value = Reflect.apply(withRepeat, moduleValue2, [value, 4, true]);
const items2 = [{rotateZ: Reflect.apply(withDelay, reanimatedRexportModule, [450, value])}];
let binding = env0_8;
get = binding.get;
items2[1] = {translateX: -Reflect.apply(get, binding, []) / 2};
binding = env0_9;
get = binding.get;
items2[2] = {translateY: -Reflect.apply(get, binding, []) / 2};
return {transform: items2};
}
function _fun115679() { // fn#115679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3840, offset: 0x02469f65, size: 79 bytes, params: 1, frame: 15
const onDeclineIncomingRequestBinding = onDeclineIncomingRequest;
const userBinding = user;
const id = userBinding.id;
const applicationIdBinding = applicationId;
onDeclineIncomingRequestBinding(id, applicationIdBinding);
const value = environment.__proto__;
(require(14478) /* metro dependency 14478: AddFriendsScreenUtils */).dismissIncomingRequest({userId: userBinding.id,
applicationId: applicationIdBinding});
}
function _fun115680() { // fn#115680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3945, offset: 0x02469fb4, size: 60 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
value.sendWave(user.id, true, 'Incoming Friend Request');
}
function IncomingRequestRowActionsOnLayout({nativeEvent}) { // fn#115681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4074, owner: IncomingRequestRowActions.onLayout, offset: 0x02469ff0, size: 41 bytes, params: 2, frame: 11
env0_6.set(nativeEvent.layout.width);
}
function IncomingRequestRowActionsOnLayout_115682({nativeEvent}) { // fn#115682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4477, owner: IncomingRequestRowActions.onLayout, offset: 0x0246a019, size: 41 bytes, params: 2, frame: 11
const binding = env0_7;
binding.set(nativeEvent.layout.width);
}
function IncomingRequestRowActionsOnLayout_115683(a0) { // fn#115683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4788, owner: IncomingRequestRowActions.onLayout, offset: 0x0246a042, size: 72 bytes, params: 2, frame: 13
let binding = env0_8;
binding.set(a0.nativeEvent.layout.width);
binding = env0_9;
binding.set(a0.nativeEvent.layout.height);
}
global.__d(_fun115671, 15158, [31, 27, 33, 4501, 4017, 4504, 14478, 4572, 8341, 13436, 8096, 4578, 1244, 4573,
2]) /* metro module 15158, dependencies: [31, 27, 33, 4501, 4017, 4504, 14478, 4572, 8341, 13436, 8096, 4578, 1244, 4573, 2] */;
@@ -1,57 +1,83 @@
/* Metro module 15156; source: modules/main_tabs_v2/native/friends/components/ShowAllRow.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 12808, 1305, 4573, 1244, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as AvatarDuoPileNativeModule from '../../../../../design/components/Pile/native/AvatarDuoPile.native.tsx'; /* Metro dependency 12808 */
function _fun115655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:6, offset: 0x024687af, size: 246 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const PX_12 = (Native).space.PX_12;
const env0_5 = Reflect.apply(createStyles, value, [{labelContainer: {'flexDirection': 'row',
'alignItems': 'center'}, showAllText: {marginLeft: PX_12}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ShowAllRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ShowAllRow.tsx');
exports.default = ShowAllRow;
function ShowAllRow({users, onPress, count}) { // fn#115656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:382, offset: 0x024688a5, size: 371 bytes, params: 2, frame: 27
const styles = useStyles();
const TableRow = (TableRowNativeModule).TableRow;
const object = {onPress: onPress, end: true};
const AvatarDuoPile = (AvatarDuoPileNativeModule).AvatarDuoPile;
const object3 = {};
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL_20 = AvatarSizes.XSMALL_20;
object3.size = XSMALL_20;
object3['aria-label'] = '';
let value = users.slice(0, 2);
value = (
<AvatarDuoPile {...object3}>
{value.map(_fun115657)}
</AvatarDuoPile>
);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const NrzztX = (IndexNativeModule).t.NrzztX;
object.label = (
<View style={styles.labelContainer}>
{value}
<Text
style={styles.showAllText}
variant="text-md/semibold"
color="text-brand"
>
{Reflect.apply(format, intl, [NrzztX, {count: count}])}
</Text>
</View>
);
const TableRow2 = (TableRowNativeModule).TableRow;
const Arrow = TableRow2.Arrow;
object.trailing = <Arrow />;
return <TableRow {...object} />;
function _fun115657(a0, a1) { // fn#115657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:632, offset: 0x02468a18, size: 138 bytes, params: 3, frame: 22
const Avatar = (NativeModule).Avatar;
const getAvatarSource = a0.getAvatarSource;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const {XSMALL, XSMALL_20} = (NativeModule).AvatarSizes;
return (
<Avatar
source={Reflect.apply(getAvatarSource, a0, [null, false, AVATAR_SIZE_MAP[XSMALL]])}
size={XSMALL_20}
key={a1}
/>
);
}
}
}
function ShowAllRow({users, onPress, count}) { // fn#115656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:382, offset: 0x024688a5, size: 371 bytes, params: 2, frame: 27
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {onPress: onPress, end: true};
const AvatarDuoPile = (require(12808) /* metro dependency 12808: AvatarDuoPileNative */).AvatarDuoPile;
const object4 = {};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL_20 = AvatarSizes.XSMALL_20;
object4.size = XSMALL_20;
object4['aria-label'] = '';
let value = users.slice(0, 2);
value = <AvatarDuoPile {...object4}>{value.map(_fun115657)}</AvatarDuoPile>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const NrzztX = (require(1244) /* metro dependency 1244: indexNative */).t.NrzztX;
object2.label = <View style={styles.labelContainer}>{value}<Text style={styles.showAllText} variant="text-md/semibold" color="text-brand">{Reflect.apply(format,
intl, [NrzztX, {count: count}])}</Text></View>;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Arrow = TableRow2.Arrow;
object2.trailing = <Arrow />;
return <TableRow {...object2} />;
}
function _fun115657(a0, a1) { // fn#115657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:632, offset: 0x02468a18, size: 138 bytes, params: 3, frame: 22
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const getAvatarSource = a0.getAvatarSource;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const {XSMALL, XSMALL_20} = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
return (
<Avatar
source={Reflect.apply(getAvatarSource, a0, [null, false, AVATAR_SIZE_MAP[XSMALL]])}
size={XSMALL_20}
key={a1}
/>
);
}
global.__d(_fun115655, 15156, [31, 27, 33, 4501, 697, 6238, 12808, 1305, 4573, 1244,
2]) /* metro module 15156, dependencies: [31, 27, 33, 4501, 697, 6238, 12808, 1305, 4573, 1244, 2] */;
@@ -1,62 +1,71 @@
/* Metro module 14480; source: modules/main_tabs_v2/native/friends/components/useSuggestedFriends.tsx; dependencies: [57, 31, 5244, 12016, 632, 22, 3995, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserUtils from '../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import FriendSuggestionStore from '../../../../friend_suggestions/FriendSuggestionStore.tsx'; /* Metro dependency 5244 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FriendsScreenConstantsModule from '../screens/FriendsScreenConstants.tsx'; /* Metro dependency 12016 */
function _fun109552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:6, offset: 0x02351613, size: 175 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 friendSuggestionStore = importDefault(5244) /* metro dependency 5244: FriendSuggestionStore */;
const env0_6 = (require(12016) /* metro dependency 12016: FriendsScreenConstants */).SuggestedFriendSource;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/useSuggestedFriends.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/useSuggestedFriends.tsx');
exports.default = useSuggestedFriends;
}
function useSuggestedFriends(a0) { // fn#109553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:274, offset: 0x023516c2, size: 218 bytes, params: 2, frame: 18
const isConnected = (a0 ?? ({})).isConnected;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([FriendSuggestionStore],
function() {
return FriendSuggestionStore.getSuggestions();
});
const [property, property2] = env0_3(env0_4.useState([]), 2);
const r3 = isConnected == null || isConnected;
value = env0_4.useMemo(_fun109555, [property, value2, r3]);
return {added: property, setAdded: property2, friendSuggestions: value,
numFriendSuggestions: r3 ? value.length : value2.length};
}
function _fun109555() { // fn#109555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:469, offset: 0x023517af, size: 125 bytes, params: 1, frame: 16
var environment;
var binding;
var value2;
var value3;
var value;
if (env0_2) {
binding = env0_1;
value2 = binding.filter(function({source}) {
return source === SuggestedFriendSource.USER_SUGGESTIONS;
function useSuggestedFriends(a0) { // fn#109553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:274, offset: 0x023516c2, size: 218 bytes, params: 2, frame: 18
const isConnected = (a0 ?? ({})).isConnected;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([FriendSuggestionStore],
function() {
return FriendSuggestionStore.getSuggestions();
});
binding = env0_0;
value = binding.map(_fun109557);
value3 = environment.__proto__;
value = (importDefault(22) /* metro dependency 22 */).unionBy(value2, value, _fun109558);
return value.sort(_fun109559);
const [property, property2] = Module00057(ReactModule.useState([]), 2);
const r3 = isConnected == null || isConnected;
value = ReactModule.useMemo(_fun109555, [property, value2, r3]);
return {added: property, setAdded: property2, friendSuggestions: value,
numFriendSuggestions: r3 ? value.length : value2.length};
function _fun109555() { // fn#109555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:469, offset: 0x023517af, size: 125 bytes, params: 1, frame: 16
var environment;
var binding;
var value2;
var value3;
var value;
if (env0_2) {
binding = env0_1;
value2 = binding.filter(function({source}) {
return source === SuggestedFriendSource.USER_SUGGESTIONS;
});
binding = env0_0;
value = binding.map(_fun109557);
value3 = environment.__proto__;
value = (importDefault(22) /* metro dependency 22 */).unionBy(value2, value, _fun109558);
return value.sort(_fun109559);
}
return [];
function _fun109557({user, name, contactNames}) { // fn#109557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:549, offset: 0x02351847, size: 68 bytes, params: 2, frame: 5
value = environment.__proto__.__proto__;
const USER_SUGGESTIONS = SuggestedFriendSource.USER_SUGGESTIONS;
return {user: user, friendSuggestionName: name ?? undefined, source: USER_SUGGESTIONS, contactNames: contactNames};
}
function _fun109559({user}, {user}) { // fn#109559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:732, offset: 0x0235188b, size: 85 bytes, params: 3, frame: 15
let value = environment.__proto__.__proto__;
let getName = (UserUtils).getName;
value = Reflect.apply(getName, value, [user]);
const localeCompare = value.localeCompare;
const defaultImport = UserUtils;
getName = defaultImport.getName;
return Reflect.apply(localeCompare, value, [Reflect.apply(getName, defaultImport, [user])]);
}
}
}
return [];
}
function _fun109557({user, name, contactNames}) { // fn#109557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:549, offset: 0x02351847, size: 68 bytes, params: 2, frame: 5
value = environment.__proto__.__proto__;
const USER_SUGGESTIONS = SuggestedFriendSource.USER_SUGGESTIONS;
return {user: user, friendSuggestionName: name ?? undefined, source: USER_SUGGESTIONS, contactNames: contactNames};
}
function _fun109559({user}, {user}) { // fn#109559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:732, offset: 0x0235188b, size: 85 bytes, params: 3, frame: 15
let value = environment.__proto__.__proto__;
let getName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName;
value = Reflect.apply(getName, value, [user]);
const localeCompare = value.localeCompare;
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport.getName;
return Reflect.apply(localeCompare, value, [Reflect.apply(getName, defaultImport, [user])]);
function _fun109558({user}) { // fn#109558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:711, offset: 0x016bf81d, size: 15 bytes, params: 2, frame: 1
return user.id;
}
global.__d(_fun109552, 14480, [57, 31, 5244, 12016, 632, 22, 3995,
2]) /* metro module 14480, dependencies: [57, 31, 5244, 12016, 632, 22, 3995, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 15167; source: modules/main_tabs_v2/native/friends/hooks/getPendingRelationshipIds.tsx; dependencies: [3793, 661, 2] */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun115762(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:6, offset: 0x0246d147, size: 161 bytes, params: 8, frame: 18
const _arrayLikeToArray_115765 = function(a0, a1) {
var r0;
@@ -45,155 +49,159 @@ function _fun115762(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_1 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/hooks/getPendingRelationshipIds.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/hooks/getPendingRelationshipIds.tsx');
exports.getPendingRelationshipIds = getPendingRelationshipIds;
}
function _createForOfIteratorHelperLoose_115763(a0, a1) { // fn#115763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:139, offset: 0x0246d1e8, 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)) {
function _createForOfIteratorHelperLoose_115763(a0, a1) { // fn#115763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:139, offset: 0x0246d1e8, 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);
}
return _fun115764;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_115765(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun115764;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_115765(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_115765(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_115765(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun115764;
}
return _fun115764;
}
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 filterFromPending(a0) { // fn#115766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:1071, offset: 0x0246d35c, size: 41 bytes, params: 2, frame: 12
return RelationshipStore.isSpam(a0) || RelationshipStore.isIgnored(a0);
}
function getPendingRelationshipIds(a0) { // fn#115767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:1237, offset: 0x0246d385, size: 297 bytes, params: 2, frame: 22
var r5;
var r0;
var value5;
var value6;
var PENDING_INCOMING;
var value7;
var value8;
var PENDING_OUTGOING;
var value9;
var isSpam2;
var value10;
var isIgnored2;
var value11;
const items5 = [];
const items2 = [];
const items3 = [];
const items4 = [];
const value3 = _createForOfIteratorHelperLoose_115763(a0.keys());
const value4 = value3();
let done = value4.done;
if (!done) {
r5 = value4;
while (true) {
value5 = r5.value;
value6 = a0.get(value5);
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
value7 = value6 !== PENDING_INCOMING;
if (value7) {
r0 = value7;
} else {
value8 = filterFromPending(value5);
r0 = value8;
}
if (r0) {
continue;
}
items5.push(value5);
PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
if (value6 !== PENDING_OUTGOING) {
continue;
}
items2.push(value5);
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
value9 = value6 === PENDING_INCOMING;
if (!value9) {
r0 = value9;
continue;
}
isSpam2 = RelationshipStore.isSpam(value5);
r0 = isSpam2;
if (!r0) {
continue;
}
items3.push(value5);
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
value10 = value6 === PENDING_INCOMING;
if (!value10) {
r0 = value10;
continue;
}
isIgnored2 = RelationshipStore.isIgnored(value5);
r0 = isIgnored2;
if (!r0) {
continue;
}
items4.push(value5);
value11 = value3();
done = value11.done;
if (done) {
break;
}
r5 = value11;
continue;
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 _fun115764() { // fn#115764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:710, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return ConstantsModule.RelationshipTypes >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof ConstantsModule.RelationshipTypes === 'bigint' ? ConstantsModule.RelationshipTypes : +ConstantsModule.RelationshipTypes]};
}
}
items5.reverse();
items2.reverse();
items3.reverse();
return {pendingIncomingIds: items5, pendingOutgoingIds: items2, spamIds: items3, ignoredUserIds: items4};
function filterFromPending(a0) { // fn#115766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:1071, offset: 0x0246d35c, size: 41 bytes, params: 2, frame: 12
return RelationshipStore.isSpam(a0) || RelationshipStore.isIgnored(a0);
}
function getPendingRelationshipIds(a0) { // fn#115767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:1237, offset: 0x0246d385, size: 297 bytes, params: 2, frame: 22
var r5;
var r0;
var value5;
var value6;
var PENDING_INCOMING;
var value7;
var value8;
var PENDING_OUTGOING;
var value9;
var isSpam2;
var value10;
var isIgnored2;
var value11;
const items5 = [];
const items2 = [];
const items3 = [];
const items4 = [];
const value3 = _createForOfIteratorHelperLoose_115763(a0.keys());
const value4 = value3();
let done = value4.done;
if (!done) {
r5 = value4;
while (true) {
value5 = r5.value;
value6 = a0.get(value5);
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
value7 = value6 !== PENDING_INCOMING;
if (value7) {
r0 = value7;
} else {
value8 = filterFromPending(value5);
r0 = value8;
}
if (r0) {
continue;
}
items5.push(value5);
PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
if (value6 !== PENDING_OUTGOING) {
continue;
}
items2.push(value5);
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
value9 = value6 === PENDING_INCOMING;
if (!value9) {
r0 = value9;
continue;
}
isSpam2 = RelationshipStore.isSpam(value5);
r0 = isSpam2;
if (!r0) {
continue;
}
items3.push(value5);
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
value10 = value6 === PENDING_INCOMING;
if (!value10) {
r0 = value10;
continue;
}
isIgnored2 = RelationshipStore.isIgnored(value5);
r0 = isIgnored2;
if (!r0) {
continue;
}
items4.push(value5);
value11 = value3();
done = value11.done;
if (done) {
break;
}
r5 = value11;
continue;
}
}
items5.reverse();
items2.reverse();
items3.reverse();
return {pendingIncomingIds: items5, pendingOutgoingIds: items2, spamIds: items3, ignoredUserIds: items4};
}
}
global.__d(_fun115762, 15167, [3793, 661, 2]) /* metro module 15167, dependencies: [3793, 661, 2] */;
@@ -1,6 +1,19 @@
/* Metro module 12616; source: modules/main_tabs_v2/native/friends/screens/AddFriendById.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 1244, 4573, 6985, 12617, 8787, 8783, 3856, 683, 3869, 7681, 4578, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import FriendRequestMessageExperiment from '../../../../people/FriendRequestMessageExperiment.tsx'; /* Metro dependency 12617 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TextFieldNativeModule from '../../../../../design/components/TextField/native/TextField.native.tsx'; /* Metro dependency 6985 */
function _fun96767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:6, offset: 0x02165c1f, size: 759 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const getDefaultTextState = function() {
var object = {validatedText: ''};
@@ -9,350 +22,403 @@ function _fun96767(global, require, importDefault, importAll, module, exports, d
};
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 value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.Keyboard;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.PLACEHOLDER_TAG;
const env0_8 = constantsModule.AnalyticEvents;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const env0_11 = value4.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center',
object.container = {'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center',
'paddingHorizontal': 16, backgroundColor: BACKGROUND_BASE_LOWER};
object2.textInputContainer = {alignSelf: 'stretch'};
object.textInputContainer = {alignSelf: 'stretch'};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.placeholderText = {color: TEXT_MUTED};
object.placeholderText = {color: TEXT_MUTED};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.inputAccessoryText = {'fontSize': 12, 'lineHeight': 16, 'marginVertical': 8, color: TEXT_SUBTLE};
object.inputAccessoryText = {'fontSize': 12, 'lineHeight': 16, 'marginVertical': 8, color: TEXT_SUBTLE};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.redesignInputAccessoryText = {marginBottom: PX_8};
object2.inputHeaderText = {marginTop: 0};
object.redesignInputAccessoryText = {marginBottom: PX_8};
object.inputHeaderText = {marginTop: 0};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.redesignGrow = {flexGrow: 2, minHeight: PX_24};
object.redesignGrow = {flexGrow: 2, minHeight: PX_24};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.errorStateText = {color: RED_400, marginVertical: 4};
object.errorStateText = {color: RED_400, marginVertical: 4};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.friendMessageContainer = {alignSelf: 'stretch', marginTop: PX_16};
object.friendMessageContainer = {alignSelf: 'stretch', marginTop: PX_16};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.messageLabel = {marginBottom: PX_4};
object.messageLabel = {marginBottom: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.messageFooterText = {marginTop: PX_4};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {SUCCESS: 0};
object2[0] = 'SUCCESS';
object2.ERROR = 1;
object2[1] = 'ERROR';
object2.LOADING = 2;
object2[2] = 'LOADING';
object2.NONE = 3;
object2[3] = 'NONE';
object2 = {DISCORD_TAG: 'DISCORD_TAG', MESSAGE: 'MESSAGE'};
object.messageFooterText = {marginTop: PX_4};
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {SUCCESS: 0};
object[0] = 'SUCCESS';
object.ERROR = 1;
object[1] = 'ERROR';
object.LOADING = 2;
object[2] = 'LOADING';
object.NONE = 3;
object[3] = 'NONE';
object = {DISCORD_TAG: 'DISCORD_TAG', MESSAGE: 'MESSAGE'};
const env0_15 = value.forwardRef(_fun96770);
value = value.forwardRef(_fun96771);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendById.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendById.tsx');
exports.default = value;
}
function ErrorMessage({errorMessage}) { // fn#96769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:1278, offset: 0x02165f66, size: 105 bytes, params: 2, frame: 17
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/medium"
color="text-feedback-critical"
style={[styles.inputAccessoryText, styles.errorStateText]}
>
{errorMessage}
</Text>
);
}
function _fun96770({textState, onChangeText, onSelectionChange, onKeyPress, onSubmitEditing, onFocus, validationState, autoFocus, headerText, headerTextStyle}, a1) { // fn#96770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:1486, offset: 0x02165fcf, size: 664 bytes, params: 3, frame: 33
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const r10 = headerText !== undefined ? headerText : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YegTF2).toUpperCase();
const styles = useStyles();
let status = validationState.status;
let ERROR = env0_13.ERROR;
const message = status !== ERROR || validationState.field !== env0_14.DISCORD_TAG ? undefined : validationState.message;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text style={[styles.redesignInputAccessoryText, styles.inputHeaderText,
headerTextStyle]} variant="text-sm/semibold" color="text-muted">{r10}</Text>];
const TextField = (require(6985) /* metro dependency 6985: TextFieldNative */).TextField;
const textFieldProps2 = {ref: a1, value: textState.validatedText,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qRaqel)};
status = validationState.status;
ERROR = env0_13.ERROR;
textFieldProps2.accessibilityHint = status !== ERROR ? undefined : validationState.a11yMessage;
textFieldProps2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qRaqel);
textFieldProps2.placeholderTextColor = styles.placeholderText.color;
textFieldProps2.onChange = onChangeText;
textFieldProps2.onSelectionChange = onSelectionChange;
textFieldProps2.onKeyPress = onKeyPress;
textFieldProps2.onSubmitEditing = onSubmitEditing;
textFieldProps2.autoCapitalize = 'none';
textFieldProps2.returnKeyType = 'send';
textFieldProps2.keyboardType = 'twitter';
textFieldProps2.autoCorrect = false;
textFieldProps2.blurOnSubmit = true;
textFieldProps2.maxLength = 37;
textFieldProps2.autoFocus = autoFocus;
textFieldProps2.onFocus = onFocus;
textFieldProps2.status = message != null ? 'error' : undefined;
items2[1] = <TextField {...textFieldProps2} />;
items2[2] = message != null ? <ErrorMessage errorMessage={message} /> : null;
return (
<View style={styles.textInputContainer}>
{items2}
</View>
);
}
function _fun96771({style, onFocus, autoFocusInput, headerText, headerTextStyle, sourcePage}, a1) { // fn#96771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:2502, offset: 0x02166267, size: 1215 bytes, params: 3, frame: 38
var r7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items4;
const styles = useStyles();
const binding = env0_4;
const env0_1 = binding.useRef(0);
const env0_2 = binding.useRef('');
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [function() {
return getDefaultTextState();
}]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_4 = value4[1];
useState = binding.useState;
const NONE = env0_13.NONE;
const value5 = binding2(Reflect.apply(useState, binding, [{status: NONE}]), 2);
const property2 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property3 = value6[0];
const env0_8 = value6[1];
let defaultImport = importDefault(12617) /* metro dependency 12617: FriendRequestMessageExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'AddFriendbyId'}]).enabled;
const value7 = binding.useCallback(_fun96773, [property2]);
const value8 = binding.useCallback(_fun96774, [property2]);
const closure = onSubmitEditing_96775;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[14]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: 'Id', source_page: sourcePage});
}, [sourcePage]);
binding.useEffect(_fun96779, [property2]);
const validatedText = property.validatedText;
const length = validatedText.trim().length;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const items2 = [styles.container, style];
const env0_152 = ((Component) => <Component textState={property} onChangeText={value7} onSelectionChange={onSelectionChange} onKeyPress={onKeyPress} onSubmitEditing={closure} onFocus={onFocus} validationState={property2} autoFocus={autoFocusInput} headerText={headerText} headerTextStyle={headerTextStyle} ref={a1} />)(env0_15);
if (enabled) {
var viewBinding2Props = {style: styles.friendMessageContainer};
items4 = [<Text style={[styles.messageLabel, styles.inputHeaderText,
headerTextStyle]} variant="text-sm/semibold" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yi6Mpu)}</Text>];
items4[1] = ((TextArea) => <TextArea returnKeyType="done" submitBehavior="submit" value={property3} maxLength={120} onSubmitEditing={closure} onChange={value8} status={property2.field !== env0_14.MESSAGE || property2.status !== env0_13.ERROR ? undefined : 'error'} />)((require(7681) /* metro dependency 7681: TextAreaNative */).TextArea);
items4[2] = property2.status !== env0_13.ERROR ? <Text style={styles.messageFooterText} variant="text-xs/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UtfQNw)}</Text> : property2.field === env0_14.MESSAGE ? <ErrorMessage errorMessage={property2.message} /> : <Text style={styles.messageFooterText} variant="text-xs/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UtfQNw)}</Text>;
r7 = <View {...viewBinding2Props}>{items4}</View>;
} else {
r7 = enabled;
function ErrorMessage({errorMessage}) { // fn#96769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:1278, offset: 0x02165f66, size: 105 bytes, params: 2, frame: 17
const styles = useStyles();
const Text = (TextModule).Text;
return (
<Text
variant="text-xs/medium"
color="text-feedback-critical"
style={[styles.inputAccessoryText, styles.errorStateText]}
>
{errorMessage}
</Text>
);
}
const items5 = [<View style={items2}>{env0_152}{r7}</View>];
items5[1] = <View style={styles.redesignGrow} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const status = property2.status;
const LOADING = env0_13.LOADING;
items5[2] = <Button size="lg" text={Reflect.apply(string, intl,
[t['PMsq/b']])} disabled={length <= 0} onPress={closure} loading={status === LOADING} grow={false} />;
return (
<>
{items5}
</>
);
}
function _fun96773(a0) { // fn#96773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:2860, offset: 0x02166735, size: 226 bytes, params: 2, frame: 19
var r2;
var value3;
var value4;
var property;
var value9;
const binding = env0_4;
const length = a0.length;
const value2 = 0;
if (length <= value2) {
value9 = environment.__proto__;
r2 = getDefaultTextState();
} else {
value3 = a0.split('#');
value4 = environment.__proto__;
property = env1_3(value3, 2)[1];
r2 = {validatedText: a0,
hint: property != null ? a0 + PLACEHOLDER_TAG.slice(property != null ? property.length + 1 : value2) : ''};
function _fun96770({textState, onChangeText, onSelectionChange, onKeyPress, onSubmitEditing, onFocus, validationState, autoFocus, headerText, headerTextStyle}, a1) { // fn#96770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:1486, offset: 0x02165fcf, size: 664 bytes, params: 3, frame: 33
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const r10 = headerText !== undefined ? headerText : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YegTF2).toUpperCase();
const styles = useStyles();
let status = validationState.status;
let ERROR = env0_13.ERROR;
const message = status !== ERROR || validationState.field !== env0_14.DISCORD_TAG ? undefined : validationState.message;
const Text = (TextModule).Text;
const items2 = [
<Text
style={[styles.redesignInputAccessoryText, styles.inputHeaderText, headerTextStyle]}
variant="text-sm/semibold"
color="text-muted"
>
{r10}
</Text>,
];
const TextField = (TextFieldNativeModule).TextField;
const textFieldProps2 = {ref: a1, value: textState.validatedText,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qRaqel)};
status = validationState.status;
ERROR = env0_13.ERROR;
textFieldProps2.accessibilityHint = status !== ERROR ? undefined : validationState.a11yMessage;
textFieldProps2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qRaqel);
textFieldProps2.placeholderTextColor = styles.placeholderText.color;
textFieldProps2.onChange = onChangeText;
textFieldProps2.onSelectionChange = onSelectionChange;
textFieldProps2.onKeyPress = onKeyPress;
textFieldProps2.onSubmitEditing = onSubmitEditing;
textFieldProps2.autoCapitalize = 'none';
textFieldProps2.returnKeyType = 'send';
textFieldProps2.keyboardType = 'twitter';
textFieldProps2.autoCorrect = false;
textFieldProps2.blurOnSubmit = true;
textFieldProps2.maxLength = 37;
textFieldProps2.autoFocus = autoFocus;
textFieldProps2.onFocus = onFocus;
textFieldProps2.status = message != null ? 'error' : undefined;
items2[1] = <TextField {...textFieldProps2} />;
items2[2] = (
message != null
? (
<ErrorMessage errorMessage={message} />
)
: null
);
return (
<View style={styles.textInputContainer}>
{items2}
</View>
);
}
binding(r2);
const status = env0_5.status;
const ERROR = env1_13.ERROR;
if (status === ERROR && env0_5.field === env1_14.DISCORD_TAG) {
env0_6({status: env1_13.NONE});
}
}
function _fun96774(a0) { // fn#96774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3145, offset: 0x02166817, size: 129 bytes, params: 2, frame: 15
env0_8(a0.replace(RegExp('\\n', 'g'), ''));
const status = env0_5.status;
value = environment.__proto__;
const ERROR = env1_13.ERROR;
if (status === ERROR && env0_5.field === env1_14.MESSAGE) {
env0_6({status: env1_13.NONE});
}
}
function onPress_96775() { // fn#96775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3267, offset: 0x02166898, size: 484 bytes, params: 1, frame: 23
var environment;
var r6;
var value8;
var value9;
var value10;
var object2;
var sendRequest;
var intl;
var value;
const value2 = env0_3.validatedText.trim();
let binding = env0_7;
const value3 = binding.trim();
if (value2.length <= 0) {
binding = env0_6;
object2 = {};
value = environment.__proto__;
object2.status = env1_13.ERROR;
object2.field = env1_14.DISCORD_TAG;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.message = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mxnceg);
binding(object2);
} else {
r6 = !value2.includes('#') && value2.startsWith('@') ? value2.substring(1) : value2;
value8 = environment.__proto__;
value9 = undefined;
value10 = (require(8787) /* metro dependency 8787: FriendsUtils */).validateDiscordTag(r6);
if (value10 != null) {
env0_6({status: env1_13.ERROR, field: env1_14.DISCORD_TAG, message: value10});
function _fun96771({style, onFocus, autoFocusInput, headerText, headerTextStyle, sourcePage}, a1) { // fn#96771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:2502, offset: 0x02166267, size: 1215 bytes, params: 3, frame: 38
var r7;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items4;
const styles = useStyles();
const binding = env0_4;
const env0_1 = binding.useRef(0);
const env0_2 = binding.useRef('');
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [function() {
return getDefaultTextState();
}]);
const value4 = Module00057(value3, 2);
const property = value4[0];
var env0_4 = value4[1];
useState = binding.useState;
const NONE = env0_13.NONE;
const value5 = Module00057(Reflect.apply(useState, binding, [{status: NONE}]), 2);
const property2 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = Module00057(Reflect.apply(useState, binding, ['']), 2);
const property3 = value6[0];
const env0_8 = value6[1];
let defaultImport = FriendRequestMessageExperiment;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'AddFriendbyId'}]).enabled;
const value7 = binding.useCallback(_fun96773, [property2]);
const value8 = binding.useCallback(_fun96774, [property2]);
const onSubmitEditing_967752 = onSubmitEditing_96775;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[14]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: 'Id', source_page: sourcePage});
}, [sourcePage]);
binding.useEffect(_fun96779, [property2]);
const validatedText = property.validatedText;
const length = validatedText.trim().length;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const items2 = [styles.container, style];
const env0_153 = ((Component) => <Component textState={property} onChangeText={value7} onSelectionChange={onSelectionChange_96780} onKeyPress={onKeyPress_96781} onSubmitEditing={onSubmitEditing_967752} onFocus={onFocus} validationState={property2} autoFocus={autoFocusInput} headerText={headerText} headerTextStyle={headerTextStyle} ref={a1} />)(env0_15);
if (enabled) {
var viewBinding2Props = {style: styles.friendMessageContainer};
items4 = [
<Text
style={[styles.messageLabel, styles.inputHeaderText, headerTextStyle]}
variant="text-sm/semibold"
color="text-muted"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yi6Mpu)}
</Text>,
];
items4[1] = ((TextArea) => <TextArea returnKeyType="done" submitBehavior="submit" value={property3} maxLength={120} onSubmitEditing={onSubmitEditing_967752} onChange={value8} status={property2.field !== env0_14.MESSAGE || property2.status !== env0_13.ERROR ? undefined : 'error'} />)((require(7681) /* metro dependency 7681: TextAreaNative */).TextArea);
items4[2] = (
property2.status !== env0_13.ERROR
? (
<Text
style={styles.messageFooterText}
variant="text-xs/medium"
color="text-muted"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UtfQNw)}
</Text>
)
: (
property2.field === env0_14.MESSAGE
? (
<ErrorMessage errorMessage={property2.message} />
)
: (
<Text
style={styles.messageFooterText}
variant="text-xs/medium"
color="text-muted"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UtfQNw)}
</Text>
)
)
);
r7 = (
<View {...viewBinding2Props}>
{items4}
</View>
);
} else {
env0_6({status: env1_13.LOADING});
value = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
sendRequest = value.sendRequest;
object2 = {discordTag: r6};
object2.context = {location: 'Search - Add Friend Search'};
object2.errorUxConfig = (require(8783) /* metro dependency 8783: RelationshipActionCreators */).RelationshipErrorUXConfig.SHOW_ONLY_IF_ACTION_NEEDED;
object2.note = value3.length > 0 ? value3 : value9;
value = Reflect.apply(sendRequest, value, [object2]);
value.then(_fun96776, _fun96777);
r7 = enabled;
}
const items5 = [
<View style={items2}>
{env0_153}
{r7}
</View>,
];
items5[1] = <View style={styles.redesignGrow} />;
const Button = (ButtonNativeModule).Button;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const status = property2.status;
const LOADING = env0_13.LOADING;
items5[2] = (
<Button
size="lg"
text={Reflect.apply(string, intl, [t['PMsq/b']])}
disabled={length <= 0}
onPress={onSubmitEditing_967752}
loading={status === LOADING}
grow={false}
/>
);
return (
<>
{items5}
</>
);
function _fun96773(a0) { // fn#96773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:2860, offset: 0x02166735, size: 226 bytes, params: 2, frame: 19
var r2;
var value3;
var value4;
var property;
var value9;
const binding = env0_4;
const length = a0.length;
const value2 = 0;
if (length <= value2) {
value9 = environment.__proto__;
r2 = getDefaultTextState();
} else {
value3 = a0.split('#');
value4 = environment.__proto__;
property = env1_3(value3, 2)[1];
r2 = {validatedText: a0,
hint: property != null ? a0 + PLACEHOLDER_TAG.slice(property != null ? property.length + 1 : value2) : ''};
}
binding(r2);
const status = ReactNativeModule.View.status;
const ERROR = env1_13.ERROR;
if (status === ERROR && ReactNativeModule.View.field === env1_14.DISCORD_TAG) {
env0_6({status: env1_13.NONE});
}
}
function _fun96774(a0) { // fn#96774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3145, offset: 0x02166817, size: 129 bytes, params: 2, frame: 15
env0_8(a0.replace(RegExp('\\n', 'g'), ''));
const status = ReactNativeModule.View.status;
value = environment.__proto__;
const ERROR = env1_13.ERROR;
if (status === ERROR && ReactNativeModule.View.field === env1_14.MESSAGE) {
env0_6({status: env1_13.NONE});
}
}
function onPress_96775() { // fn#96775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3267, offset: 0x02166898, size: 484 bytes, params: 1, frame: 23
var environment;
var r6;
var value8;
var value9;
var value10;
var object;
var sendRequest;
var intl;
var value;
const value2 = Module00057.validatedText.trim();
let binding = ConstantsModule.PLACEHOLDER_TAG;
const value3 = binding.trim();
if (value2.length <= 0) {
binding = env0_6;
object = {};
value = environment.__proto__;
object.status = env1_13.ERROR;
object.field = env1_14.DISCORD_TAG;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.message = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mxnceg);
binding(object);
} else {
r6 = !value2.includes('#') && value2.startsWith('@') ? value2.substring(1) : value2;
value8 = environment.__proto__;
value9 = undefined;
value10 = (require(8787) /* metro dependency 8787: FriendsUtils */).validateDiscordTag(r6);
if (value10 != null) {
env0_6({status: env1_13.ERROR, field: env1_14.DISCORD_TAG, message: value10});
} else {
env0_6({status: env1_13.LOADING});
value = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
sendRequest = value.sendRequest;
object = {discordTag: r6};
object.context = {location: 'Search - Add Friend Search'};
object.errorUxConfig = (require(8783) /* metro dependency 8783: RelationshipActionCreators */).RelationshipErrorUXConfig.SHOW_ONLY_IF_ACTION_NEEDED;
object.note = value3.length > 0 ? value3 : value9;
value = Reflect.apply(sendRequest, value, [object]);
value.then(_fun96776, _fun96777);
}
}
function _fun96776() { // fn#96776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3784, offset: 0x02166a7c, size: 177 bytes, params: 1, frame: 20
const value = environment.__proto__;
let binding = env1_4;
binding(getDefaultTextState());
env1_8('');
binding = env1_6;
const object = {};
const SUCCESS = env2_13.SUCCESS;
object.status = SUCCESS;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const Rtl1Ep = (IndexNativeModule).t.Rtl1Ep;
object.message = Reflect.apply(format, intl, [Rtl1Ep, {discordTag: env0_0}]);
binding(object);
(ToastUtilsModule).presentAddedFriendToast();
Keyboard.dismiss();
}
function _fun96777(a0) { // fn#96777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3953, offset: 0x02166b2d, size: 416 bytes, params: 2, frame: 22
var code;
var value2;
var binding;
var object;
var value3;
var moduleValue;
var humanizeAbortCode;
var value4;
var moduleValue2;
var humanizeAbortCodeForA11y;
var value6;
var value7;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var ckHwck;
const value = undefined;
if ((a0 == null || a0.body == null ? value : a0.body.note) != null) {
value6 = environment.__proto__;
binding = env1_6;
object = {};
value7 = environment.__proto__.__proto__;
object.status = env2_13.ERROR;
object.field = env2_14.MESSAGE;
string = intl.string;
ckHwck = t.ckHwck;
object.message = Reflect.apply(string, intl, [ckHwck]);
string = intl.string;
ckHwck = t.ckHwck;
object.a11yMessage = Reflect.apply(string, intl, [ckHwck]);
binding(object);
} else {
value2 = environment.__proto__;
binding = env1_6;
object = {};
value3 = environment.__proto__.__proto__;
object.status = env2_13.ERROR;
object.field = env2_14.DISCORD_TAG;
moduleValue = require(8787) /* metro dependency 8787: FriendsUtils */;
humanizeAbortCode = moduleValue.humanizeAbortCode;
code = a0 == null || a0.body == null ? value : a0.body.code;
value4 = -1;
object.message = Reflect.apply(humanizeAbortCode, moduleValue, [code ?? value4, env0_0]);
moduleValue2 = require(8787) /* metro dependency 8787: FriendsUtils */;
humanizeAbortCodeForA11y = moduleValue2.humanizeAbortCodeForA11y;
code = a0 == null || a0.body == null ? value : a0.body.code;
object.a11yMessage = Reflect.apply(humanizeAbortCodeForA11y, moduleValue2, [code ?? value4, env0_0]);
binding(object);
}
return value;
}
}
function _fun96779() { // fn#96779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4505, offset: 0x02166d16, size: 104 bytes, params: 1, frame: 13
var AccessibilityAnnouncer;
const status = ReactNativeModule.View.status;
const ERROR = env1_13.ERROR;
if (status === ERROR && ReactNativeModule.View.a11yMessage != null) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(ReactNativeModule.View.a11yMessage);
}
}
function onSelectionChange_96780({nativeEvent}) { // fn#96780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4759, offset: 0x02166d7e, size: 50 bytes, params: 2, frame: 3
const start = nativeEvent.selection.start;
if (start !== env0_1.current) {
env0_1.current = start;
}
}
function onKeyPress_96781({nativeEvent}) { // fn#96781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4840, offset: 0x02166db0, size: 31 bytes, params: 2, frame: 2
env0_2.current = nativeEvent.key;
}
}
}
function _fun96779() { // fn#96779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4505, offset: 0x02166d16, size: 104 bytes, params: 1, frame: 13
var AccessibilityAnnouncer;
const status = env0_5.status;
const ERROR = env1_13.ERROR;
if (status === ERROR && env0_5.a11yMessage != null) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(env0_5.a11yMessage);
}
}
function onSelectionChange({nativeEvent}) { // fn#96780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4759, offset: 0x02166d7e, size: 50 bytes, params: 2, frame: 3
const start = nativeEvent.selection.start;
if (start !== env0_1.current) {
env0_1.current = start;
}
}
function onKeyPress({nativeEvent}) { // fn#96781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4840, offset: 0x02166db0, size: 31 bytes, params: 2, frame: 2
env0_2.current = nativeEvent.key;
}
function _fun96776() { // fn#96776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3784, offset: 0x02166a7c, size: 177 bytes, params: 1, frame: 20
const value = environment.__proto__;
let binding = env1_4;
binding(getDefaultTextState());
env1_8('');
binding = env1_6;
const object2 = {};
const SUCCESS = env2_13.SUCCESS;
object2.status = SUCCESS;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const Rtl1Ep = (require(1244) /* metro dependency 1244: indexNative */).t.Rtl1Ep;
object2.message = Reflect.apply(format, intl, [Rtl1Ep, {discordTag: env0_0}]);
binding(object2);
(require(3856) /* metro dependency 3856: ToastUtils */).presentAddedFriendToast();
Keyboard.dismiss();
}
function _fun96777(a0) { // fn#96777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3953, offset: 0x02166b2d, size: 416 bytes, params: 2, frame: 22
var code;
var value2;
var binding;
var object2;
var value3;
var moduleValue;
var humanizeAbortCode;
var value4;
var moduleValue2;
var humanizeAbortCodeForA11y;
var value6;
var value7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ckHwck;
const value = undefined;
if ((a0 == null || a0.body == null ? value : a0.body.note) != null) {
value6 = environment.__proto__;
binding = env1_6;
object2 = {};
value7 = environment.__proto__.__proto__;
object2.status = env2_13.ERROR;
object2.field = env2_14.MESSAGE;
string = intl.string;
ckHwck = t.ckHwck;
object2.message = Reflect.apply(string, intl, [ckHwck]);
string = intl.string;
ckHwck = t.ckHwck;
object2.a11yMessage = Reflect.apply(string, intl, [ckHwck]);
binding(object2);
} else {
value2 = environment.__proto__;
binding = env1_6;
object2 = {};
value3 = environment.__proto__.__proto__;
object2.status = env2_13.ERROR;
object2.field = env2_14.DISCORD_TAG;
moduleValue = require(8787) /* metro dependency 8787: FriendsUtils */;
humanizeAbortCode = moduleValue.humanizeAbortCode;
code = a0 == null || a0.body == null ? value : a0.body.code;
value4 = -1;
object2.message = Reflect.apply(humanizeAbortCode, moduleValue, [code ?? value4, env0_0]);
moduleValue2 = require(8787) /* metro dependency 8787: FriendsUtils */;
humanizeAbortCodeForA11y = moduleValue2.humanizeAbortCodeForA11y;
code = a0 == null || a0.body == null ? value : a0.body.code;
object2.a11yMessage = Reflect.apply(humanizeAbortCodeForA11y, moduleValue2, [code ?? value4, env0_0]);
binding(object2);
}
return value;
}
global.__d(_fun96767, 12616, [57, 31, 27, 661, 33, 4501, 697, 1244, 4573, 6985, 12617, 8787, 8783, 3856, 683, 3869,
7681, 4578,
2]) /* metro module 12616, dependencies: [57, 31, 27, 661, 33, 4501, 697, 1244, 4573, 6985, 12617, 8787, 8783, 3856, 683, 3869, 7681, 4578, 2] */;
@@ -1,137 +1,174 @@
/* Metro module 15154; source: modules/main_tabs_v2/native/friends/screens/AddFriendScreen.tsx; dependencies: [57, 31, 27, 1878, 661, 11995, 33, 4501, 697, 11997, 3995, 683, 1244, 9212, 9603, 477, 7704, 4573, 12616, 12618, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ThemedGradient from '../../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ShowShareActionSheetAndroidModule from '../../../../action_sheet/native/showShareActionSheet.android.tsx'; /* Metro dependency 9212 */
import * as ContactSyncConstantsModule from '../../../../contact_sync/native/ContactSyncConstants.tsx'; /* Metro dependency 11995 */
import * as ContactSyncUtilsModule from '../../../../contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun115595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:6, offset: 0x0246650f, size: 436 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_9 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {headerText: {'marginTop': 32, 'marginHorizontal': 16, 'textAlign': 'center'},
object = {headerText: {'marginTop': 32, 'marginHorizontal': 16, 'textAlign': 'center'},
subheaderText: {'marginVertical': 8, 'marginHorizontal': 16, 'textAlign': 'center'}};
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.input = {marginTop: 16, backgroundColor: BACKGROUND_BASE_LOWER};
object2.otherOptionsContainer = {'marginTop': 16, 'paddingHorizontal': 16};
object2.rowContainer = {marginTop: 8};
object.input = {marginTop: 16, backgroundColor: BACKGROUND_BASE_LOWER};
object.otherOptionsContainer = {'marginTop': 16, 'paddingHorizontal': 16};
object.rowContainer = {marginTop: 8};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.background = {backgroundColor: BACKGROUND_BASE_LOWER};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendScreen.tsx');
object.background = {backgroundColor: BACKGROUND_BASE_LOWER};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendScreen.tsx');
exports.default = AddFriendScreen;
}
function AddFriendScreen(a0) { // fn#115596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:750, offset: 0x024666c3, size: 745 bytes, params: 2, frame: 32
var r11;
const navigation = a0.navigation;
const sourcePage = a0.route.params.sourcePage;
var value;
const styles = useStyles();
const value2 = (ContactSyncUtilsModule).useContactSyncAccount();
const useState = ReactModule.useState;
const value4 = Module00057(Reflect.apply(useState, ReactModule, [!ContactSyncUtilsModule.isContactSyncEnabled(value2)]), 2);
const property = value4[0];
const env0_2 = value4[1];
ReactModule.useLayoutEffect(_fun115598, [ReactModule.useCallback(_fun115597, []), navigation, value2]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const value6 = ((Component) => <Component absolute />)(ThemedGradient);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const GWMTSE = (require(1244) /* metro dependency 1244: indexNative */).t.GWMTSE;
const items2 = [
<Text
style={styles.headerText}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [GWMTSE])}
</Text>,
];
items2[1] = (
<Text
style={styles.subheaderText}
variant="text-sm/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Rn/sLl'])}
</Text>
);
items2[2] = ((Component) => <Component style={styles.input} autoFocusInput={false} sourcePage={sourcePage} />)(importDefault(12616) /* metro dependency 12616: AddFriendById */);
const text = (
<Text
accessibilityRole="header"
variant="eyebrow"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dukg0Z)}
</Text>
);
if (property) {
value = importDefault(12618) /* metro dependency 12618: ContactSyncUpsellCTA */;
value = ((Component) => <Component style={styles.rowContainer} location="Add Friend Modal" />)(value);
r11 = value;
} else {
r11 = null;
}
items2[3] = (
<View style={styles.otherOptionsContainer}>
{text}
{r11}
</View>
);
return (
<>
{value6}
<ScrollView keyboardShouldPersistTaps="handled" style={styles.background}>
{items2}
</ScrollView>
</>
);
function _fun115597() { // fn#115597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:952, offset: 0x024669ac, size: 269 bytes, params: 1, frame: 22
let value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const r8 = currentUser != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(currentUser) : value3;
const defaultImport2 = AnalyticsUtils;
const track = defaultImport2.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
Reflect.apply(track, defaultImport2, [FRIEND_ADD_VIEWED, {'friend_add_type': 'Invite',
'source_page': 'Add Friend Modal'}]);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (IndexNativeModule).t['6E9a1J'];
const protocol = global.location.protocol;
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const WEBAPP_ENDPOINT = GLOBAL_ENV.WEBAPP_ENDPOINT;
value = Reflect.apply(formatToPlainString, intl, [property, {url: '' + protocol + WEBAPP_ENDPOINT, username: r8}]);
ShowShareActionSheetAndroidModule.showShareActionSheet({message: value}, 'Add Friend Modal');
return value3;
}
function _fun115598() { // fn#115598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1348, offset: 0x02466ab9, size: 88 bytes, params: 1, frame: 13
var environment;
const navigationBinding = navigation;
navigationBinding.setOptions({headerRight: headerRight_115599});
let value = environment.__proto__;
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun115600);
function headerRight_115599(a0) { // fn#115599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1379, offset: 0x02466b11, size: 110 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
const getRenderHeaderTextButton = require(dependencyMap[14]).getRenderHeaderTextButton;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const RDE0Sc = require(dependencyMap[12]).t.RDE0Sc;
value = Reflect.apply(getRenderHeaderTextButton, value, [Reflect.apply(string, intl, [RDE0Sc]), env1_3]);
const object = {};
copyDataProperties(object, a0, dependencyMap);
return value(object);
}
function _fun115600(a0) { // fn#115600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1510, offset: 0x02466b7f, size: 133 bytes, params: 2, frame: 14
var isContactSyncEnabled;
var value4;
let value = environment.__proto__.__proto__;
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
let r2 = a0 === NOT_DETERMINED || (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && a0 === ContactPermissions.UNAUTHORIZED;
if (!r2) {
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
isContactSyncEnabled = value.isContactSyncEnabled;
value4 = environment.__proto__;
value = !Reflect.apply(isContactSyncEnabled, value, [env1_1]);
r2 = value;
}
value = environment.__proto__;
env1_2(r2);
}
}
function AddFriendScreen(a0) { // fn#115596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:750, offset: 0x024666c3, size: 745 bytes, params: 2, frame: 32
var r11;
const navigation = a0.navigation;
const sourcePage = a0.route.params.sourcePage;
var value;
const styles = useStyles();
const value2 = (require(11997) /* metro dependency 11997: ContactSyncUtils */).useContactSyncAccount();
const binding = env0_4;
const useState = binding.useState;
const contactSyncUtilsModule = require(11997) /* metro dependency 11997: ContactSyncUtils */;
const value4 = env0_3(Reflect.apply(useState, binding, [!contactSyncUtilsModule.isContactSyncEnabled(value2)]), 2);
const property = value4[0];
const env0_2 = value4[1];
binding.useLayoutEffect(_fun115598, [binding.useCallback(_fun115597, []), navigation, value2]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const value6 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const GWMTSE = (require(1244) /* metro dependency 1244: indexNative */).t.GWMTSE;
const items2 = [<Text style={styles.headerText} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [GWMTSE])}</Text>];
items2[1] = <Text style={styles.subheaderText} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Rn/sLl'])}</Text>;
items2[2] = ((Component) => <Component style={styles.input} autoFocusInput={false} sourcePage={sourcePage} />)(importDefault(12616) /* metro dependency 12616: AddFriendById */);
const text = <Text accessibilityRole="header" variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dukg0Z)}</Text>;
if (property) {
value = importDefault(12618) /* metro dependency 12618: ContactSyncUpsellCTA */;
value = ((Component) => <Component style={styles.rowContainer} location="Add Friend Modal" />)(value);
r11 = value;
} else {
r11 = null;
}
items2[3] = <View style={styles.otherOptionsContainer}>{text}{r11}</View>;
return (
<>
{value6}
<ScrollView keyboardShouldPersistTaps="handled" style={styles.background}>
{items2}
</ScrollView>
</>
);
}
function _fun115597() { // fn#115597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:952, offset: 0x024669ac, size: 269 bytes, params: 1, frame: 22
let value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const r8 = currentUser != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(currentUser) : value3;
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport2.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
Reflect.apply(track, defaultImport2, [FRIEND_ADD_VIEWED, {'friend_add_type': 'Invite',
'source_page': 'Add Friend Modal'}]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['6E9a1J'];
const protocol = global.location.protocol;
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const WEBAPP_ENDPOINT = GLOBAL_ENV.WEBAPP_ENDPOINT;
value = Reflect.apply(formatToPlainString, intl, [property, {url: '' + protocol + WEBAPP_ENDPOINT, username: r8}]);
const showShareActionSheetAndroidModule = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheetAndroidModule.showShareActionSheet({message: value}, 'Add Friend Modal');
return value3;
}
function _fun115598() { // fn#115598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1348, offset: 0x02466ab9, size: 88 bytes, params: 1, frame: 13
var environment;
const navigationBinding = navigation;
navigationBinding.setOptions({headerRight: headerRight_115599});
let value = environment.__proto__;
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun115600);
}
function headerRight_115599(a0) { // fn#115599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1379, offset: 0x02466b11, size: 110 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
const getRenderHeaderTextButton = require(dependencyMap[14]).getRenderHeaderTextButton;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const RDE0Sc = require(dependencyMap[12]).t.RDE0Sc;
value = Reflect.apply(getRenderHeaderTextButton, value, [Reflect.apply(string, intl, [RDE0Sc]), env1_3]);
const object2 = {};
copyDataProperties(object2, a0, dependencyMap);
return value(object2);
}
function _fun115600(a0) { // fn#115600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1510, offset: 0x02466b7f, size: 133 bytes, params: 2, frame: 14
var isContactSyncEnabled;
var value4;
let value = environment.__proto__.__proto__;
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
let r2 = a0 === NOT_DETERMINED || (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && a0 === ContactPermissions.UNAUTHORIZED;
if (!r2) {
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
isContactSyncEnabled = value.isContactSyncEnabled;
value4 = environment.__proto__;
value = !Reflect.apply(isContactSyncEnabled, value, [env1_1]);
r2 = value;
}
value = environment.__proto__;
env1_2(r2);
}
global.__d(_fun115595, 15154, [57, 31, 27, 1878, 661, 11995, 33, 4501, 697, 11997, 3995, 683, 1244, 9212, 9603, 477,
7704, 4573, 12616, 12618,
2]) /* metro module 15154, dependencies: [57, 31, 27, 1878, 661, 11995, 33, 4501, 697, 11997, 3995, 683, 1244, 9212, 9603, 477, 7704, 4573, 12616, 12618, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,442 +1,503 @@
/* Metro module 15165; source: modules/main_tabs_v2/native/friends/screens/FriendRequestsScreen.tsx; dependencies: [57, 31, 27, 4623, 3793, 1878, 7690, 661, 8804, 33, 4501, 697, 15166, 1962, 4497, 632, 4624, 3829, 14777, 4788, 21, 6771, 6789, 683, 10341, 6777, 15167, 644, 8743, 1244, 1484, 6231, 6238, 4573, 8853, 7704, 9221, 5278, 9768, 5473, 7697, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Module00644 from '../../../../../by-id/module-00644.js'; /* Metro dependency 644 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import NotificationCenterItemsStore from '../../../../notification_center/NotificationCenterItemsStore.tsx'; /* Metro dependency 4623 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseGetOrFetchApplications from '../../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import AnalyticsLocation from '../../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ThemedGradient from '../../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import ShowUserProfileActionSheet from '../../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseStateFromStoresModule from '../../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UserSettingsModule from '../../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as UseAlertStoreNativeModule from '../../../../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as NotificationCenterItemsTypesModule from '../../../../notification_center/NotificationCenterItemsTypes.tsx'; /* Metro dependency 4624 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseAnalyticsLocationsModule from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as UserRowConstantsModule from '../../shared_components/user_list/UserRowConstants.tsx'; /* Metro dependency 7690 */
import * as ConstantsModule2 from '../../../../people/Constants.tsx'; /* Metro dependency 8804 */
import * as SegmentedControlStateNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as SegmentedControlNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControl.native.tsx'; /* Metro dependency 9221 */
import * as GameRelationshipStoreHooksModule from '../../../../game_relationships/GameRelationshipStoreHooks.tsx'; /* Metro dependency 10341 */
import * as GetPendingRelationshipIdsModule from '../hooks/getPendingRelationshipIds.tsx'; /* Metro dependency 15167 */
function _fun115716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:6, offset: 0x0246ba53, size: 790 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_10 = value.AnalyticEvents;
const env0_11 = value.AnalyticsSections;
const env0_12 = value.RelationshipTypes;
const env0_13 = (require(8804) /* metro dependency 8804: Constants */).MINIMUM_PENDING_INCOMING_COUNT_FOR_CLEAR_ALL;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
object2 = {Incoming: 0};
object2[0] = 'Incoming';
object2.Outgoing = 1;
object2[1] = 'Outgoing';
object = {Incoming: 0};
object[0] = 'Incoming';
object.Outgoing = 1;
object[1] = 'Outgoing';
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {flex: 1};
object = {};
object.container = {flex: 1};
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.noResultsContainer = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object3 = {};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.backgroundColor = BACKGROUND_BASE_LOWER;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = PX_16;
object3.justifyContent = 'flex-end';
object3.flexDirection = 'row';
object2.clearAllContainer = object3;
const object7 = {};
let INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object7.backgroundColor = INPUT_BACKGROUND_DEFAULT;
INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object7.borderColor = INPUT_BACKGROUND_DEFAULT;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingHorizontal = PX_16;
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object7.minWidth = 2 * PX_64;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object7.alignItems = 'center';
object7.paddingVertical = 5;
object7.borderWidth = 3;
object2.clearAll = object7;
const object8 = {};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object8.backgroundColor = BACKGROUND_BASE_LOWER;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingBottom = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingTop = PX_8;
object2.tabs = object8;
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendRequestsScreen.tsx');
exports.default = FriendRequestsScreen;
}
function compareUserItems(a0, a1) { // fn#115717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1192, offset: 0x0246bd69, size: 138 bytes, params: 3, frame: 15
var r0;
var value;
var compare;
let user = a0.user;
let id = user.id;
user = a1.user;
if (id === user.id) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.applicationId, a1.applicationId);
r0 = value;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = value.compare;
user = a0.user;
id = user.id;
user = a1.user;
value = Reflect.apply(compare, value, [id, user.id]);
r0 = value;
}
return r0;
}
function FriendRequestsScreen() { // fn#115718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1453, offset: 0x0246bdf3, size: 1743 bytes, params: 1, frame: 41
var object6;
var r2;
const styles = useStyles();
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const FRIEND_REQUESTS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIEND_REQUESTS;
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
useNotificationCenterAckFriendRequests();
let binding = env0_4;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[23]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_REQUESTS_MODAL});
}, []);
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([RelationshipStore],
_fun115726);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
let property = value3[0];
const property2 = value3[1];
const gameRelationshipStoreHooksModule = require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */;
let useGameRelationshipsByType = gameRelationshipStoreHooksModule.useGameRelationshipsByType;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const value4 = Reflect.apply(useGameRelationshipsByType, gameRelationshipStoreHooksModule, [PENDING_INCOMING]);
const moduleValue3 = gameRelationshipStoreHooksModule;
useGameRelationshipsByType = moduleValue3.useGameRelationshipsByType;
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
const value5 = Reflect.apply(useGameRelationshipsByType, moduleValue3, [PENDING_OUTGOING]);
const useMemo = binding.useMemo;
(importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(Reflect.apply(useMemo, binding,
[_fun115727, [value4, value5]]));
const {pendingIncomingIds, pendingOutgoingIds, spamIds, ignoredUserIds} = binding.useMemo(_fun115730, [property,
property2]);
const {incoming, outgoing, spam,
ignoredUsers} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
_fun115731, [ignoredUserIds, value4, value5, pendingIncomingIds, pendingOutgoingIds, spamIds],
importDefault(644) /* metro dependency 644 */);
const {incomingData, incomingSection, outgoingData, outgoingSection} = binding.useMemo(_fun115744, [ignoredUsers,
incoming, outgoing, spam]);
const useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [_fun115745]), 2);
property = value10[0];
const env0_16 = value10[1];
const value11 = binding.useCallback(_fun115746, [analyticsLocations]);
const value12 = binding.useCallback(_fun115747, []);
const value14 = binding.useCallback(_fun115748, [property, incomingData, outgoingData, value11, spam.length,
ignoredUsers.length, (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()]);
let Outgoing = env0_16.Outgoing;
let r8 = property === Outgoing && outgoing.length === 0;
if (!r8) {
r2 = property === env0_16.Incoming && incoming.length === 0;
r2 = r2 && spam.length === 0;
r2 = r2 && ignoredUserIds.length === 0;
r8 = r2;
}
let Incoming = env0_16.Incoming;
const r11 = property === Incoming && incoming.length >= MINIMUM_PENDING_INCOMING_COUNT_FOR_CLEAR_ALL;
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
object6 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: onSetActiveIndex_115752};
object.noResultsContainer = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object4 = {};
binding = env0_16;
Incoming = binding.Incoming;
object4.id = Incoming.toString();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bekioP);
const value23 = null;
object4.page = value23;
const items2 = [object4];
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingBottom = PX_16;
object4.justifyContent = 'flex-end';
object4.flexDirection = 'row';
object.clearAllContainer = object4;
const object5 = {};
Outgoing = binding.Outgoing;
object5.id = Outgoing.toString();
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tWqcIF);
object5.page = value23;
items2[1] = object5;
object6.items = items2;
const value24 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object6]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const value25 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
const view = <View style={styles.tabs}><SegmentedControl state={value24} /></View>;
const PressableComponent = r11 ? <View style={styles.clearAllContainer}>{((PressableOpacity) => <PressableOpacity style={styles.clearAll} onPress={function() {
_fun115754(incoming.length);
}}>{((Text) => <Text variant="text-sm/semibold" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.O8k7O4)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : value23;
if (r8) {
r8 = <View style={styles.noResultsContainer}>{((Component) => <Component title={property === env0_16.Incoming ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7uvAKe']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['yvzX/Z'])} illustration={(require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration} disableBackgroundOverlay />)(importDefault(9768) /* metro dependency 9768: NoResults */)}</View>;
} else {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r8 = <UsersFastList sections={property !== env0_16.Incoming ? outgoingSection : incomingSection} getItemProps={value14} getSectionProps={value12} />;
let INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object5.backgroundColor = INPUT_BACKGROUND_DEFAULT;
INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object5.borderColor = INPUT_BACKGROUND_DEFAULT;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object5.minWidth = 2 * PX_64;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.alignItems = 'center';
object5.paddingVertical = 5;
object5.borderWidth = 3;
object.clearAll = object5;
const object6 = {};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object6.backgroundColor = BACKGROUND_BASE_LOWER;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingTop = PX_8;
object.tabs = object6;
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendRequestsScreen.tsx');
exports.default = FriendRequestsScreen;
function compareUserItems(a0, a1) { // fn#115717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1192, offset: 0x0246bd69, size: 138 bytes, params: 3, frame: 15
var r0;
var value;
var compare;
let user = a0.user;
let id = user.id;
user = a1.user;
if (id === user.id) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.applicationId, a1.applicationId);
r0 = value;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = value.compare;
user = a0.user;
id = user.id;
user = a1.user;
value = Reflect.apply(compare, value, [id, user.id]);
r0 = value;
}
return r0;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value25}
<View style={styles.container}>
{view}
{PressableComponent}
{r8}
function FriendRequestsScreen() { // fn#115718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1453, offset: 0x0246bdf3, size: 1743 bytes, params: 1, frame: 41
var object3;
var r2;
const styles = useStyles();
let defaultImport = UseAnalyticsLocations;
const FRIEND_REQUESTS = (AnalyticsLocation).FRIEND_REQUESTS;
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
useNotificationCenterAckFriendRequests();
let binding = ReactModule;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[23]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_REQUESTS_MODAL});
}, []);
const value2 = (UseStateFromStoresModule).useStateFromStoresArray([RelationshipStore],
_fun115726);
const value3 = Module00057(value2, 2);
let property = value3[0];
const property2 = value3[1];
let useGameRelationshipsByType = GameRelationshipStoreHooksModule.useGameRelationshipsByType;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const value4 = Reflect.apply(useGameRelationshipsByType, GameRelationshipStoreHooksModule, [PENDING_INCOMING]);
useGameRelationshipsByType = GameRelationshipStoreHooksModule.useGameRelationshipsByType;
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
const value5 = Reflect.apply(useGameRelationshipsByType, GameRelationshipStoreHooksModule, [PENDING_OUTGOING]);
const useMemo = binding.useMemo;
(UseGetOrFetchApplications)(Reflect.apply(useMemo, binding,
[_fun115727, [value4, value5]]));
const {pendingIncomingIds, pendingOutgoingIds, spamIds, ignoredUserIds} = binding.useMemo(_fun115730, [property,
property2]);
const {incoming, outgoing, spam,
ignoredUsers} = (UseStateFromStoresModule).useStateFromStores([UserStore],
_fun115731, [ignoredUserIds, value4, value5, pendingIncomingIds, pendingOutgoingIds, spamIds],
Module00644);
const {incomingData, incomingSection, outgoingData, outgoingSection} = binding.useMemo(_fun115744, [ignoredUsers,
incoming, outgoing, spam]);
const useState = binding.useState;
const value10 = Module00057(Reflect.apply(useState, binding, [_fun115745]), 2);
property = value10[0];
const env0_16 = value10[1];
const value11 = binding.useCallback(_fun115746, [analyticsLocations]);
const value12 = binding.useCallback(_fun115747, []);
const value14 = binding.useCallback(_fun115748, [property, incomingData, outgoingData, value11, spam.length,
ignoredUsers.length, (UseNavigationNativeModule).useNavigation()]);
let Outgoing = env0_16.Outgoing;
let r8 = property === Outgoing && outgoing.length === 0;
if (!r8) {
r2 = property === env0_16.Incoming && incoming.length === 0;
r2 = r2 && spam.length === 0;
r2 = r2 && ignoredUserIds.length === 0;
r8 = r2;
}
let Incoming = env0_16.Incoming;
const r11 = property === Incoming && incoming.length >= MINIMUM_PENDING_INCOMING_COUNT_FOR_CLEAR_ALL;
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
object3 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: onSetActiveIndex_115752};
const object = {};
binding = env0_16;
Incoming = binding.Incoming;
object.id = Incoming.toString();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bekioP);
const value23 = null;
object.page = value23;
const items2 = [object];
const object2 = {};
Outgoing = binding.Outgoing;
object2.id = Outgoing.toString();
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tWqcIF);
object2.page = value23;
items2[1] = object2;
object3.items = items2;
const value24 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object3]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const value25 = ((Component) => <Component absolute />)(ThemedGradient);
const SegmentedControl = (SegmentedControlNativeModule).SegmentedControl;
const view = (
<View style={styles.tabs}>
<SegmentedControl state={value24} />
</View>
</AnalyticsLocationProvider>
);
}
);
const PressableComponent = (
r11
? (
<View style={styles.clearAllContainer}>
{((PressableOpacity) => <PressableOpacity style={styles.clearAll} onPress={function() {
_fun115754(incoming.length);
}}>{((Text) => <Text variant="text-sm/semibold" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.O8k7O4)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}
</View>
)
: value23
);
if (r8) {
r8 = (
<View style={styles.noResultsContainer}>
{((Component) => <Component title={property === env0_16.Incoming ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7uvAKe']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['yvzX/Z'])} illustration={(require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration} disableBackgroundOverlay />)(importDefault(9768) /* metro dependency 9768: NoResults */)}
</View>
);
} else {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r8 = (
<UsersFastList
sections={property !== env0_16.Incoming ? outgoingSection : incomingSection}
getItemProps={value14}
getSectionProps={value12}
/>
);
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value25}
<View style={styles.container}>
{view}
{PressableComponent}
{r8}
</View>
</AnalyticsLocationProvider>
);
function useNotificationCenterAckFriendRequests() { // fn#115719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1552, owner: FriendRequestsScreen.useNotificationCenterAckFriendRequests, offset: 0x0246c4c2, size: 130 bytes, params: 1, frame: 18
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([NotificationCenterItemsStore],
function() {
return NotificationCenterItemsStore.localItems.filter(_fun115721);
});
const NotificationCenterAckedBeforeId = (UserSettingsModule).NotificationCenterAckedBeforeId;
env1_4.useEffect(_fun115722, [value2, NotificationCenterAckedBeforeId.useSetting()]);
function _fun115720() { // fn#115720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1646, offset: 0x0246c544, size: 34 bytes, params: 1, frame: 11
return NotificationCenterItemsStore.localItems.filter(_fun115721);
function _fun115721(a0) { // fn#115721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1671, offset: 0x0246c566, size: 92 bytes, params: 2, frame: 15
const type = a0.type;
const value = environment.__proto__.__proto__.__proto__;
const NotificationCenterLocalItems = (NotificationCenterItemsTypesModule).NotificationCenterLocalItems;
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
return type === INCOMING_FRIEND_REQUESTS || a0.type === NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
}
function useNotificationCenterAckFriendRequests() { // fn#115719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1552, owner: FriendRequestsScreen.useNotificationCenterAckFriendRequests, offset: 0x0246c4c2, size: 130 bytes, params: 1, frame: 18
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([NotificationCenterItemsStore],
function() {
return NotificationCenterItemsStore.localItems.filter(_fun115721);
});
const NotificationCenterAckedBeforeId = (require(3829) /* metro dependency 3829: UserSettings */).NotificationCenterAckedBeforeId;
env1_4.useEffect(_fun115722, [value2, NotificationCenterAckedBeforeId.useSetting()]);
}
}
function _fun115726() { // fn#115726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2263, offset: 0x0246c6bf, size: 41 bytes, params: 1, frame: 10
const value = environment.__proto__;
const items2 = [RelationshipStore.getMutableRelationships()];
const getVersion = RelationshipStore.getVersion;
items2[1] = Reflect.apply(getVersion, RelationshipStore, []);
return items2;
}
function _fun115722() { // fn#115722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1897, offset: 0x0246c5c2, size: 136 bytes, params: 1, frame: 17
var environment;
var binding;
var value2;
var value;
if (env0_0.length > 0) {
binding = env0_0;
value = binding.map(function(a0) {
return a0.local_id;
});
value = value.filter(global.Boolean);
value2 = environment.__proto__.__proto__;
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).markNotificationCenterLocalItemsAcked(value);
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.bulkMarkNotificationCenterItemsAcked(binding.filter(_fun115724));
}
function _fun115724(a0) { // fn#115724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2068, offset: 0x0246c64a, size: 52 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
return !value.isRemoteAcked(a0, env1_1);
}
function _fun115727() { // fn#115727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2466, offset: 0x0246c6e8, size: 97 bytes, params: 1, frame: 15
const Set = global.Set;
const set = new Set();
env0_3.forEach(_fun115728);
env0_4.forEach(_fun115729);
const Array = global.Array;
return Array.from(set);
}
}
function _fun115730() { // fn#115730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2626, offset: 0x0246c766, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(15167) /* metro dependency 15167: getPendingRelationshipIds */).getPendingRelationshipIds(env0_1,
env0_2);
}
}
function _fun115731() { // fn#115731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2790, offset: 0x0246c798, size: 335 bytes, params: 1, frame: 19
const value3 = pendingIncomingIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
object.isGameRelationship = false;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const value5 = env0_3.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0.id);
object.isGameRelationship = true;
object.applicationId = a0.applicationId;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const value7 = pendingOutgoingIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
object.isGameRelationship = false;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const value9 = env0_4.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0.id);
object.isGameRelationship = true;
object.applicationId = a0.applicationId;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const object2 = {};
const items3 = [];
arraySpread(items3, value5, arraySpread(items3, value3, 0, items3), items3);
const sort = items3.sort;
const compareUserItemsBinding = compareUserItems;
object2.incoming = Reflect.apply(sort, items3, [compareUserItemsBinding]);
const items2 = [];
arraySpread(items2, value9, arraySpread(items2, value7, 0, items3), items3);
object2.outgoing = items2.sort(compareUserItemsBinding);
object2.spam = spamIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
return object;
}).filter(function(a0) {
return a0.user != null;
});
object2.ignoredUsers = ignoredUserIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
return object;
}).filter(function(a0) {
return a0.user != null;
});
return object2;
}
function _fun115726() { // fn#115726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2263, offset: 0x0246c6bf, size: 41 bytes, params: 1, frame: 10
const value = environment.__proto__;
const relationshipStoreBinding = RelationshipStore;
const items2 = [relationshipStoreBinding.getMutableRelationships()];
const getVersion = relationshipStoreBinding.getVersion;
items2[1] = Reflect.apply(getVersion, relationshipStoreBinding, []);
return items2;
}
function _fun115744() { // fn#115744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3526, offset: 0x0246c96a, size: 143 bytes, params: 1, frame: 7
const value2 = spam.length + ignoredUsers.length;
const incomingBinding = incoming;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const value4 = 0;
const outgoingBinding = outgoing;
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
return {incomingData: {items: incomingBinding, relationship: PENDING_INCOMING},
incomingSection: [incomingBinding.length, value2 > value4 ? 1 : value4], outgoingData: {items: outgoingBinding,
relationship: PENDING_OUTGOING}, outgoingSection: [outgoingBinding.length]};
}
function _fun115727() { // fn#115727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2466, offset: 0x0246c6e8, size: 97 bytes, params: 1, frame: 15
const Set = global.Set;
const set = new Set();
Module00057.forEach(_fun115728);
ReactModule.forEach(_fun115729);
const Array = global.Array;
return Array.from(set);
function _fun115728({applicationId}) { // fn#115728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2503, offset: 0x0246c749, size: 29 bytes, params: 2, frame: 11
env0_0.add(applicationId);
}
function _fun115745() { // fn#115745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3836, offset: 0x0246c9f9, size: 61 bytes, params: 1, frame: 3
return incoming.length !== 0 ? env1_16.Incoming : outgoing.length > 0 ? env1_16.Outgoing : env1_16.Incoming;
}
function _fun115729({applicationId}) { // fn#115729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2544, offset: 0x0246c749, size: 29 bytes, params: 2, frame: 11
env0_0.add(applicationId);
}
function _fun115746(a0) { // fn#115746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3929, offset: 0x0246ca36, size: 63 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
}
function _fun115730() { // fn#115730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2626, offset: 0x0246c766, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (GetPendingRelationshipIdsModule).getPendingRelationshipIds(env0_1,
env0_2);
}
function _fun115731() { // fn#115731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2790, offset: 0x0246c798, size: 335 bytes, params: 1, frame: 19
const value3 = pendingIncomingIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
object.isGameRelationship = false;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const value5 = Module00057.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0.id);
object.isGameRelationship = true;
object.applicationId = a0.applicationId;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const value7 = pendingOutgoingIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
object.isGameRelationship = false;
return object;
}).filter(function(a0) {
return a0.user != null;
});
const value9 = ReactModule.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0.id);
object.isGameRelationship = true;
object.applicationId = a0.applicationId;
return object;
}).filter(function(a0) {
return a0.user != null;
});
let object = {};
const items3 = [];
arraySpread(items3, value5, arraySpread(items3, value3, 0, items3), items3);
const sort = items3.sort;
const compareUserItemsBinding = compareUserItems;
object.incoming = Reflect.apply(sort, items3, [compareUserItemsBinding]);
const items2 = [];
arraySpread(items2, value9, arraySpread(items2, value7, 0, items3), items3);
object.outgoing = items2.sort(compareUserItemsBinding);
object.spam = spamIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
return object;
}).filter(function(a0) {
return a0.user != null;
});
object.ignoredUsers = ignoredUserIds.map(function(a0) {
var object = {};
object.user = UserStore.getUser(a0);
return object;
}).filter(function(a0) {
return a0.user != null;
});
return object;
}
function _fun115744() { // fn#115744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3526, offset: 0x0246c96a, size: 143 bytes, params: 1, frame: 7
const value2 = spam.length + ignoredUsers.length;
const incomingBinding = incoming;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const value4 = 0;
const outgoingBinding = outgoing;
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
return {incomingData: {items: incomingBinding, relationship: PENDING_INCOMING},
incomingSection: [incomingBinding.length, value2 > value4 ? 1 : value4], outgoingData: {items: outgoingBinding,
relationship: PENDING_OUTGOING}, outgoingSection: [outgoingBinding.length]};
}
function _fun115745() { // fn#115745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3836, offset: 0x0246c9f9, size: 61 bytes, params: 1, frame: 3
return incoming.length !== 0 ? env1_16.Incoming : outgoing.length > 0 ? env1_16.Outgoing : env1_16.Incoming;
}
function _fun115746(a0) { // fn#115746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3929, offset: 0x0246ca36, size: 63 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115747(a0) { // fn#115747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4020, offset: 0x0246ca75, size: 98 bytes, params: 2, frame: 16
var object2;
var value;
var intl;
if (a0 === 1) {
object2 = {};
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NHpP/k']);
return {type: 'section', props: object2};
}
}
function _fun115748(a0, a1) { // fn#115748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4163, offset: 0x0246cad7, size: 205 bytes, params: 3, frame: 8
var r7;
var object;
if (a0 === 1) {
object = {'type': 'custom', 'component': null, 'key': 'spamRequests', 'itemType': 'spamRequests'};
object.component = component_115749;
} else {
var binding = env0_15;
var Incoming = env1_16.Incoming;
r7 = binding === Incoming ? incomingData : outgoingData;
var items2 = r7.items;
object = {type: 'user'};
var user = items2[a1].user;
var ACTIONS = UserRowModes.ACTIONS;
object.props = {type: r7.relationship, user: user, onPress: env0_17, mode: ACTIONS, start: a1 === 0,
end: a1 === items2.length - 1, applicationId: items2[a1].applicationId,
isGameRelationship: items2[a1].isGameRelationship};
}
return object;
function component_115749() { // fn#115749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4211, offset: 0x0246cba4, size: 445 bytes, params: 1, frame: 27
var environment;
var r7;
var r5;
const TableRow = (TableRowNativeModule).TableRow;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object3;
const value = environment.__proto__.__proto__;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const length = spam.length;
const value3 = null;
if (length > 0) {
r7 = (
<TableRow
onPress={onPress_115750}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fUQoqD)}
trailing={((Text) => <Text variant="text-sm/medium" color="text-muted">{spam.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
arrow
/>
);
} else {
r7 = value3;
}
if (ignoredUsers.length > 0) {
r5 = (
<TableRow
onPress={onPress_115751}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.en1Gkz)}
trailing={((Text) => <Text variant="text-sm/medium" color="text-muted">{ignoredUsers.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
arrow
/>
);
} else {
r5 = value3;
}
return (
<TableRowGroup hasIcons={false}>
{r7}
{r5}
</TableRowGroup>
);
function component_115749OnPress() { // fn#115750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4303, owner: component_115749.onPress, offset: 0x0246cd61, size: 40 bytes, params: 1, frame: 13
env2_18.navigate('friends', {screen: 'spam-requests'});
}
function component_115749OnPress_115751() { // fn#115751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4548, owner: component_115749.onPress, offset: 0x0246cd89, size: 40 bytes, params: 1, frame: 13
env2_18.navigate('friends', {screen: 'ignored-user-requests'});
}
}
}
function FriendRequestsScreenOnSetActiveIndex(a0) { // fn#115752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5273, owner: FriendRequestsScreen.onSetActiveIndex, offset: 0x0246cdb1, size: 53 bytes, params: 2, frame: 11
env0_16(a0 === 0 ? env1_16.Incoming : env1_16.Outgoing);
}
function FriendRequestsScreenOnPress() { // fn#115753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5773, owner: FriendRequestsScreen.onPress, offset: 0x0246cde6, size: 30 bytes, params: 1, frame: 11
handleClearAllIncomingRequests(incoming.length);
function handleClearAllIncomingRequests(a0) { // fn#115754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5777, owner: FriendRequestsScreen.onPress.handleClearAllIncomingRequests, offset: 0x0246ce04, size: 89 bytes, params: 2, frame: 16
var environment;
const value = environment.__proto__.__proto__;
(UseAlertStoreNativeModule).openAlert('clear-all-incoming-requests',
((Component) => <Component incomingRequestCount={a0} />)(env2_4.lazy(_fun115755)));
function _fun115755() { // fn#115755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5834, offset: 0x0246ce5d, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
}
}
}
function _fun115747(a0) { // fn#115747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4020, offset: 0x0246ca75, size: 98 bytes, params: 2, frame: 16
var object;
var value;
var intl;
if (a0 === 1) {
object = {};
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NHpP/k']);
return {type: 'section', props: object};
}
}
function _fun115748(a0, a1) { // fn#115748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4163, offset: 0x0246cad7, size: 205 bytes, params: 3, frame: 8
var r7;
var object2;
if (a0 === 1) {
object2 = {'type': 'custom', 'component': null, 'key': 'spamRequests', 'itemType': 'spamRequests'};
object2.component = component_115749;
} else {
var binding = env0_15;
var Incoming = env1_16.Incoming;
r7 = binding === Incoming ? incomingData : outgoingData;
var items2 = r7.items;
object2 = {type: 'user'};
var user = items2[a1].user;
var ACTIONS = UserRowModes.ACTIONS;
object2.props = {type: r7.relationship, user: user, onPress: env0_17, mode: ACTIONS, start: a1 === 0,
end: a1 === items2.length - 1, applicationId: items2[a1].applicationId,
isGameRelationship: items2[a1].isGameRelationship};
}
return object2;
}
function FriendRequestsScreenOnSetActiveIndex(a0) { // fn#115752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5273, owner: FriendRequestsScreen.onSetActiveIndex, offset: 0x0246cdb1, size: 53 bytes, params: 2, frame: 11
env0_16(a0 === 0 ? env1_16.Incoming : env1_16.Outgoing);
}
function FriendRequestsScreenOnPress() { // fn#115753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5773, owner: FriendRequestsScreen.onPress, offset: 0x0246cde6, size: 30 bytes, params: 1, frame: 11
handleClearAllIncomingRequests(incoming.length);
}
function _fun115720() { // fn#115720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1646, offset: 0x0246c544, size: 34 bytes, params: 1, frame: 11
return NotificationCenterItemsStore.localItems.filter(_fun115721);
}
function _fun115722() { // fn#115722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1897, offset: 0x0246c5c2, size: 136 bytes, params: 1, frame: 17
var environment;
var binding;
var value2;
var value;
if (env0_0.length > 0) {
binding = env0_0;
value = binding.map(function(a0) {
return a0.local_id;
});
value = value.filter(global.Boolean);
value2 = environment.__proto__.__proto__;
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).markNotificationCenterLocalItemsAcked(value);
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.bulkMarkNotificationCenterItemsAcked(binding.filter(_fun115724));
}
}
function _fun115728({applicationId}) { // fn#115728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2503, offset: 0x0246c749, size: 29 bytes, params: 2, frame: 11
env0_0.add(applicationId);
}
function component_115749() { // fn#115749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4211, offset: 0x0246cba4, size: 445 bytes, params: 1, frame: 27
var environment;
var r7;
var r5;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object4;
const value = environment.__proto__.__proto__;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const length = spam.length;
const value3 = null;
if (length > 0) {
r7 = <TableRow onPress={onPress_115750} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fUQoqD)} trailing={((Text) => <Text variant="text-sm/medium" color="text-muted">{spam.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} arrow />;
} else {
r7 = value3;
}
if (ignoredUsers.length > 0) {
r5 = <TableRow onPress={onPress_115751} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.en1Gkz)} trailing={((Text) => <Text variant="text-sm/medium" color="text-muted">{ignoredUsers.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} arrow />;
} else {
r5 = value3;
}
return (
<TableRowGroup hasIcons={false}>
{r7}
{r5}
</TableRowGroup>
);
}
function handleClearAllIncomingRequests(a0) { // fn#115754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5777, owner: FriendRequestsScreen.onPress.handleClearAllIncomingRequests, offset: 0x0246ce04, size: 89 bytes, params: 2, frame: 16
var environment;
const value = environment.__proto__.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('clear-all-incoming-requests',
((Component) => <Component incomingRequestCount={a0} />)(env2_4.lazy(_fun115755)));
}
function _fun115721(a0) { // fn#115721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1671, offset: 0x0246c566, size: 92 bytes, params: 2, frame: 15
const type = a0.type;
const value = environment.__proto__.__proto__.__proto__;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
return type === INCOMING_FRIEND_REQUESTS || a0.type === NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
}
function _fun115724(a0) { // fn#115724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2068, offset: 0x0246c64a, size: 52 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
return !value.isRemoteAcked(a0, env1_1);
}
function component_115749OnPress() { // fn#115750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4303, owner: component_115749.onPress, offset: 0x0246cd61, size: 40 bytes, params: 1, frame: 13
env2_18.navigate('friends', {screen: 'spam-requests'});
}
function component_115749OnPress_115751() { // fn#115751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4548, owner: component_115749.onPress, offset: 0x0246cd89, size: 40 bytes, params: 1, frame: 13
env2_18.navigate('friends', {screen: 'ignored-user-requests'});
}
function _fun115755() { // fn#115755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5834, offset: 0x0246ce5d, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
}
global.__d(_fun115716, 15165, [57, 31, 27, 4623, 3793, 1878, 7690, 661, 8804, 33, 4501, 697, 15166, 1962, 4497, 632,
4624, 3829, 14777, 4788, 21, 6771, 6789, 683, 10341, 6777, 15167, 644, 8743, 1244, 1484, 6231, 6238, 4573, 8853,
7704, 9221, 5278, 9768, 5473, 7697,
2]) /* metro module 15165, dependencies: [57, 31, 27, 4623, 3793, 1878, 7690, 661, 8804, 33, 4501, 697, 15166, 1962, 4497, 632, 4624, 3829, 14777, 4788, 21, 6771, 6789, 683, 10341, 6777, 15167, 644, 8743, 1244, 1484, 6231, 6238, 4573, 8853, 7704, 9221, 5278, 9768, 5473, 7697, 2] */;
@@ -1,37 +1,45 @@
/* Metro module 15163; source: modules/main_tabs_v2/native/friends/screens/FriendRequestsSettingsScreen.tsx; dependencies: [31, 27, 33, 4501, 697, 7704, 15164, 2] */
import ThemedGradient from '../../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import UserSettingsFriendRequests from '../../../../user_settings/content_and_social/native/UserSettingsFriendRequests.tsx'; /* Metro dependency 15164 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun115708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15360:6, offset: 0x0246b49f, size: 287 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).ScrollView;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.Fragment;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.backgroundColor = BACKGROUND_BASE_LOWER;
object.flex = 1;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
object2.flex = 1;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
object2.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const env0_6 = Reflect.apply(createStyles, value, [{container: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendRequestsSettingsScreen.tsx');
object2.paddingHorizontal = PX_16;
const env0_6 = Reflect.apply(createStyles, value, [{container: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendRequestsSettingsScreen.tsx');
exports.default = FriendRequestsSettingsScreen;
function FriendRequestsSettingsScreen() { // fn#115709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15360:452, offset: 0x0246b5be, size: 131 bytes, params: 1, frame: 21
const styles = useStyles();
return (
<>
{((Component) => <Component absolute />)(ThemedGradient)}
<ScrollView style={styles.container}>
{((Component) => <Component />)(UserSettingsFriendRequests)}
</ScrollView>
</>
);
}
}
function FriendRequestsSettingsScreen() { // fn#115709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15360:452, offset: 0x0246b5be, size: 131 bytes, params: 1, frame: 21
const styles = useStyles();
return (
<>
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
<ScrollView style={styles.container}>
{((Component) => <Component />)(importDefault(15164) /* metro dependency 15164: UserSettingsFriendRequests */)}
</ScrollView>
</>
);
}
global.__d(_fun115708, 15163, [31, 27, 33, 4501, 697, 7704, 15164,
2]) /* metro module 15163, dependencies: [31, 27, 33, 4501, 697, 7704, 15164, 2] */;
@@ -1,174 +1,210 @@
/* Metro module 15134; source: modules/main_tabs_v2/native/friends/screens/FriendsScreen.tsx; dependencies: [31, 27, 5242, 3793, 33, 4501, 697, 1484, 6771, 6789, 1585, 566, 15135, 1848, 8743, 15136, 15139, 14807, 4058, 1244, 6238, 9768, 5473, 4578, 7691, 9871, 2] */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GameRelationshipStore from '../../../../game_relationships/GameRelationshipStore.tsx'; /* Metro dependency 5242 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import SearchableUserList from '../../shared_components/user_list/SearchableUserList.tsx'; /* Metro dependency 7691 */
import ShowUserProfileActionSheet from '../../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import NoResults from '../../shared_components/user_list/NoResults.tsx'; /* Metro dependency 9768 */
import TrackFriendListViewed from '../../../../app_analytics/track/friends_list_viewed/trackFriendListViewed.tsx'; /* Metro dependency 15136 */
import TrackFriendListClicked from '../../../../app_analytics/track/friends_list_viewed/trackFriendListClicked.tsx'; /* Metro dependency 15139 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as KeyboardManagerUtilsModule from '../../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as UseAnalyticsLocationsModule from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as TTIFirstContentfulPaintModule from '../../../../tti_analytics/native/TTIFirstContentfulPaint.tsx'; /* Metro dependency 9871 */
import * as UseFriendRequestCountsModule from '../../../../people/hooks/useFriendRequestCounts.tsx'; /* Metro dependency 15135 */
function _fun115372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:6, offset: 0x0245e4a7, size: 396 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const gameRelationshipStore = importDefault(5242) /* metro dependency 5242: GameRelationshipStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {paddingTop: PX_8, flex: 1};
const object4 = {};
object.container = {paddingTop: PX_8, flex: 1};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginHorizontal = PX_16;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.overflow = 'hidden';
object2.requestsButtonContainer = object4;
object2.emptyContainer = {'justifyContent': 'center', 'flexGrow': 1};
object3.marginHorizontal = PX_16;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.overflow = 'hidden';
object.requestsButtonContainer = object3;
object.emptyContainer = {'justifyContent': 'center', 'flexGrow': 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonContainer = {'flexDirection': 'row', 'marginBottom': null, 'width': '100%', marginBottom: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendsScreen.tsx');
object.buttonContainer = {'flexDirection': 'row', 'marginBottom': null, 'width': '100%', marginBottom: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendsScreen.tsx');
exports.default = FriendsScreen;
}
function FriendsScreen() { // fn#115373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:596, offset: 0x0245e633, size: 535 bytes, params: 1, frame: 30
const value2 = (UseNavigationNativeModule).useNavigation();
const styles = useStyles();
const defaultImport = UseAnalyticsLocations;
const FRIENDS_LIST = (AnalyticsLocation).FRIENDS_LIST;
const analyticsLocations = defaultImport(FRIENDS_LIST).analyticsLocations;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const bottom2 = bottom;
const {incoming, outgoing, spam,
pendingIgnored} = (FluxModule).useStateFromStoresObject([RelationshipStore,
GameRelationshipStore], _fun115374);
const binding = bottom2;
const value4 = binding.useCallback(_fun115375, [analyticsLocations]);
const value5 = binding.useCallback(_fun115376, [value2]);
binding.useEffect(_fun115377, []);
const value6 = binding.useMemo(_fun115378, [incoming, value2, outgoing, spam, pendingIgnored]);
const value7 = binding.useMemo(_fun115380, [bottom, incoming, value2, outgoing, styles, spam]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
let value = SearchableUserList;
value = ((Component) => <Component onSelectUser={value4} handleMessage={value5} actions={value6} withAffinitySuggestions={false} withGameFriends defaultNoResultsFound={value7} hideSearchOnDefaultNoResults disableThemedGradient />)(value);
const TTIFirstContentfulPaint = (TTIFirstContentfulPaintModule).TTIFirstContentfulPaint;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value}
<TTIFirstContentfulPaint label="friends" />
</AnalyticsLocationProvider>
);
function _fun115374() { // fn#115374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:771, offset: 0x0245e84a, size: 136 bytes, params: 1, frame: 19
const object = {};
const value = environment.__proto__;
const getIncomingFriendRequestCount = UseFriendRequestCountsModule.getIncomingFriendRequestCount;
const relationshipStoreBinding = RelationshipStore;
const gameRelationshipStoreBinding = GameRelationshipStore;
object.incoming = Reflect.apply(getIncomingFriendRequestCount, UseFriendRequestCountsModule,
[[relationshipStoreBinding, gameRelationshipStoreBinding]]);
object.outgoing = UseFriendRequestCountsModule.getOutgoingFriendRequestCount([relationshipStoreBinding,
gameRelationshipStoreBinding]);
object.spam = relationshipStoreBinding.getSpamCount();
object.pendingIgnored = relationshipStoreBinding.getPendingIgnoredCount();
return object;
}
function FriendsScreen() { // fn#115373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:596, offset: 0x0245e633, size: 535 bytes, params: 1, frame: 30
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const FRIENDS_LIST = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIENDS_LIST;
const analyticsLocations = defaultImport(FRIENDS_LIST).analyticsLocations;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const env0_3 = bottom;
const {incoming, outgoing, spam,
pendingIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore,
GameRelationshipStore], _fun115374);
const binding = env0_3;
const value4 = binding.useCallback(_fun115375, [analyticsLocations]);
const value5 = binding.useCallback(_fun115376, [value2]);
binding.useEffect(_fun115377, []);
const value6 = binding.useMemo(_fun115378, [incoming, value2, outgoing, spam, pendingIgnored]);
const value7 = binding.useMemo(_fun115380, [bottom, incoming, value2, outgoing, styles, spam]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
let value = importDefault(7691) /* metro dependency 7691: SearchableUserList */;
value = ((Component) => <Component onSelectUser={value4} handleMessage={value5} actions={value6} withAffinitySuggestions={false} withGameFriends defaultNoResultsFound={value7} hideSearchOnDefaultNoResults disableThemedGradient />)(value);
const TTIFirstContentfulPaint = (require(9871) /* metro dependency 9871: TTIFirstContentfulPaint */).TTIFirstContentfulPaint;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value}
<TTIFirstContentfulPaint label="friends" />
</AnalyticsLocationProvider>
);
}
function _fun115375(a0) { // fn#115375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1026, offset: 0x0245e8d2, size: 89 bytes, params: 2, frame: 14
const value = environment.__proto__;
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
(ShowUserProfileActionSheet)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115374() { // fn#115374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:771, offset: 0x0245e84a, size: 136 bytes, params: 1, frame: 19
const object2 = {};
const value = environment.__proto__;
object2.incoming = (require(15135) /* metro dependency 15135: useFriendRequestCounts */).getIncomingFriendRequestCount([RelationshipStore,
GameRelationshipStore]);
object2.outgoing = (require(15135) /* metro dependency 15135: useFriendRequestCounts */).getOutgoingFriendRequestCount([RelationshipStore,
GameRelationshipStore]);
object2.spam = RelationshipStore.getSpamCount();
object2.pendingIgnored = RelationshipStore.getPendingIgnoredCount();
return object2;
}
function _fun115376({id}) { // fn#115376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1150, offset: 0x0245e92b, size: 71 bytes, params: 2, frame: 14
env0_0.navigate('friends', {screen: 'new-message', params: {defaultSelectedUserId: id,
sourcePage: 'Friends Screen'}});
}
function _fun115375(a0) { // fn#115375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1026, offset: 0x0245e8d2, size: 89 bytes, params: 2, frame: 14
const value = environment.__proto__;
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115377() { // fn#115377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1283, offset: 0x0245e972, size: 65 bytes, params: 1, frame: 15
const value = environment.__proto__;
(TrackFriendListViewed)({tab_opened: null});
(TrackFriendListClicked)({tab_opened: null});
}
function _fun115376({id}) { // fn#115376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1150, offset: 0x0245e92b, size: 71 bytes, params: 2, frame: 14
env0_0.navigate('friends', {screen: 'new-message', params: {defaultSelectedUserId: id,
sourcePage: 'Friends Screen'}});
}
function _fun115378() { // fn#115378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1367, offset: 0x0245e9b3, size: 258 bytes, params: 1, frame: 21
var environment;
var push;
var object;
var value6;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const items2 = [];
const value3 = incoming + spam + pendingIgnored;
if (value3 > 0 || outgoing > 0) {
push = items2.push;
object = {};
value6 = environment.__proto__;
object.icon = importDefault(14807) /* metro dependency 14807 */;
object.IconComponent = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
object.iconVariant = 'default';
object.label = intl.string(t.fyA115);
object.subLabel = intl.formatToPlainString(t['1IEawz'], {incoming: value3, outgoing: outgoing});
object.onPress = onPress_115379;
Reflect.apply(push, items2, [object]);
}
return items2;
function onPress_115379() { // fn#115379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1633, offset: 0x0245eab5, size: 36 bytes, params: 1, frame: 13
return env1_0.navigate('friends', {screen: 'requests'});
}
function _fun115377() { // fn#115377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1283, offset: 0x0245e972, size: 65 bytes, params: 1, frame: 15
const value = environment.__proto__;
(importDefault(15136) /* metro dependency 15136: trackFriendListViewed */)({tab_opened: null});
(importDefault(15139) /* metro dependency 15139: trackFriendListClicked */)({tab_opened: null});
}
}
function _fun115378() { // fn#115378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1367, offset: 0x0245e9b3, size: 258 bytes, params: 1, frame: 21
var environment;
var push;
var object2;
var value6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [];
const value3 = incoming + spam + pendingIgnored;
if (value3 > 0 || outgoing > 0) {
push = items2.push;
object2 = {};
value6 = environment.__proto__;
object2.icon = importDefault(14807) /* metro dependency 14807 */;
object2.IconComponent = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
object2.iconVariant = 'default';
object2.label = intl.string(t.fyA115);
object2.subLabel = intl.formatToPlainString(t['1IEawz'], {incoming: value3, outgoing: outgoing});
object2.onPress = onPress_115379;
Reflect.apply(push, items2, [object2]);
}
return items2;
}
function _fun115380() { // fn#115380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1711, offset: 0x0245ead9, size: 760 bytes, params: 1, frame: 30
var r0;
var TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (incoming + outgoing + spam > 0) {
var viewBinding2Props = {style: styles.requestsButtonContainer};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
r0 = <View {...viewBinding2Props}><TableRow start end icon={((Icon) => <Icon source={importDefault(14807) /* metro dependency 14807 */} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} trailing={((Arrow) => <Arrow />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Arrow)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyA115)} subLabel={incoming + outgoing > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1IEawz'],
{incoming: incoming,
outgoing: outgoing}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.e6BtLq,
{spam: spam})} onPress={onPress_115381} /></View>;
} else {
r0 = null;
}
const NoResults = importDefault(9768) /* metro dependency 9768: NoResults */;
const noResultsProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oi+B4p']),
fullHeight: true};
stylesBinding = styles;
noResultsProps.containerStyle = stylesBinding.emptyContainer;
const WumpusCouchSpotIllustration = (require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration;
noResultsProps.illustration = WumpusCouchSpotIllustration;
const items2 = [stylesBinding.buttonContainer];
items2[1] = {paddingBottom: bottom};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={styles.container}>
{r0}
<NoResults {...noResultsProps}>
<View style={items2}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6)}
size="lg"
onPress={onPress_115382}
grow
/>
function _fun115380() { // fn#115380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1711, offset: 0x0245ead9, size: 760 bytes, params: 1, frame: 30
var r0;
var TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (incoming + outgoing + spam > 0) {
var viewBinding2Props = {style: styles.requestsButtonContainer};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
r0 = (
<View {...viewBinding2Props}>
<TableRow
start
end
icon={((Icon) => <Icon source={importDefault(14807) /* metro dependency 14807 */} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)}
trailing={((Arrow) => <Arrow />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Arrow)}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyA115)}
subLabel={incoming + outgoing > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1IEawz'],
{incoming: incoming,
outgoing: outgoing}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.e6BtLq,
{spam: spam})}
onPress={onPress_115381}
/>
</View>
);
} else {
r0 = null;
}
const noResultsProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oi+B4p']),
fullHeight: true};
stylesBinding = styles;
noResultsProps.containerStyle = stylesBinding.emptyContainer;
const WumpusCouchSpotIllustration = (NativeModule).WumpusCouchSpotIllustration;
noResultsProps.illustration = WumpusCouchSpotIllustration;
const items2 = [stylesBinding.buttonContainer];
items2[1] = {paddingBottom: bottom};
const Button = (ButtonNativeModule).Button;
return (
<View style={styles.container}>
{r0}
<NoResults {...noResultsProps}>
<View style={items2}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6)}
size="lg"
onPress={onPress_115382}
grow
/>
</View>
</NoResults>
</View>
</NoResults>
</View>
);
}
);
function onPress_115381() { // fn#115381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:2138, offset: 0x0245edd1, size: 91 bytes, params: 1, frame: 14
if (incoming + outgoing > 0) {
env1_0.navigate('friends', {screen: 'requests'});
} else {
env1_0.navigate('friends', {screen: 'spam-requests'});
}
}
function onPress_115379() { // fn#115379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1633, offset: 0x0245eab5, size: 36 bytes, params: 1, frame: 13
return env1_0.navigate('friends', {screen: 'requests'});
}
function onPress_115382() { // fn#115382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:2554, offset: 0x0245ee2c, size: 56 bytes, params: 1, frame: 14
return env1_0.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Friends Screen'}});
}
}
function onPress_115381() { // fn#115381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:2138, offset: 0x0245edd1, size: 91 bytes, params: 1, frame: 14
if (incoming + outgoing > 0) {
env1_0.navigate('friends', {screen: 'requests'});
} else {
env1_0.navigate('friends', {screen: 'spam-requests'});
}
}
function onPress_115382() { // fn#115382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:2554, offset: 0x0245ee2c, size: 56 bytes, params: 1, frame: 14
return env1_0.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Friends Screen'}});
}
global.__d(_fun115372, 15134, [31, 27, 5242, 3793, 33, 4501, 697, 1484, 6771, 6789, 1585, 566, 15135, 1848, 8743,
15136, 15139, 14807, 4058, 1244, 6238, 9768, 5473, 4578, 7691, 9871,
2]) /* metro module 15134, dependencies: [31, 27, 5242, 3793, 33, 4501, 697, 1484, 6771, 6789, 1585, 566, 15135, 1848, 8743, 15136, 15139, 14807, 4058, 1244, 6238, 9768, 5473, 4578, 7691, 9871, 2] */;
@@ -1,26 +1,28 @@
/* Metro module 12016; source: modules/main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun92311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12202:6, offset: 0x020843af, size: 219 bytes, params: 8, frame: 17
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {USER_SUGGESTIONS: 1};
object3[1] = 'USER_SUGGESTIONS';
object3.FF_PEOPLE_YOU_MAY_KNOW = 2;
object3[2] = 'FF_PEOPLE_YOU_MAY_KNOW';
const object4 = {SYNC_CONTACTS: 0};
object4[0] = 'SYNC_CONTACTS';
object4.FRIEND_SUGGESTIONS = 1;
object4[1] = 'FRIEND_SUGGESTIONS';
object4.PENDING = 2;
object4[2] = 'PENDING';
object4.ONLINE = 3;
object4[3] = 'ONLINE';
object4.OFFLINE = 4;
object4[4] = 'OFFLINE';
object4.SPAM = 5;
object4[5] = 'SPAM';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx');
exports.SuggestedFriendSource = object3;
exports.Sections = object4;
object = {USER_SUGGESTIONS: 1};
object[1] = 'USER_SUGGESTIONS';
object.FF_PEOPLE_YOU_MAY_KNOW = 2;
object[2] = 'FF_PEOPLE_YOU_MAY_KNOW';
const object2 = {SYNC_CONTACTS: 0};
object2[0] = 'SYNC_CONTACTS';
object2.FRIEND_SUGGESTIONS = 1;
object2[1] = 'FRIEND_SUGGESTIONS';
object2.PENDING = 2;
object2[2] = 'PENDING';
object2.ONLINE = 3;
object2[3] = 'ONLINE';
object2.OFFLINE = 4;
object2[4] = 'OFFLINE';
object2.SPAM = 5;
object2[5] = 'SPAM';
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx');
exports.SuggestedFriendSource = object;
exports.Sections = object2;
}
global.__d(_fun92311, 12016, [2]) /* metro module 12016, dependencies: [2] */;
@@ -1,58 +1,70 @@
/* Metro module 15169; source: modules/main_tabs_v2/native/friends/screens/IgnoredUserRequestsScreen.tsx; dependencies: [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8743, 7697, 2] */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ShowUserProfileActionSheet from '../../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UserRowConstantsModule from '../../shared_components/user_list/UserRowConstants.tsx'; /* Metro dependency 7690 */
function _fun115777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:6, offset: 0x0246d83b, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_7 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/IgnoredUserRequestsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/IgnoredUserRequestsScreen.tsx');
exports.default = IgnoredUserRequestsScreen;
}
function IgnoredUserRequestsScreen({navigation}) { // fn#115778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:309, offset: 0x0246d915, size: 349 bytes, params: 2, frame: 22
const defaultImport = UseAnalyticsLocations;
const FRIEND_REQUESTS = (AnalyticsLocation).FRIEND_REQUESTS;
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun115780,
[(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore], function() {
return require(dependencyMap[9]).getPendingRelationshipIds(RelationshipStore.getMutableRelationships()).ignoredUserIds;
})]);
let useCallback = ReactModule.useCallback;
const value4 = Reflect.apply(useCallback, ReactModule, [_fun115783, [analyticsLocations]]);
const value5 = ReactModule.useCallback(function() {
}, []);
useCallback = ReactModule.useCallback;
if (value3.length !== 0) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
return (
<UsersFastList
getItemProps={Reflect.apply(useCallback, ReactModule, [_fun115785, [value4, value3]])}
getSectionProps={value5}
sections={[value3.length]}
/>
);
}
navigation.goBack();
function _fun115780() { // fn#115780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:575, offset: 0x0246daac, size: 45 bytes, params: 1, frame: 12
return env0_1.map(function(a0) {
return UserStore.getUser(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun115783(a0) { // fn#115783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:648, offset: 0x0246b302, size: 63 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115785(a0) { // fn#115785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:768, offset: 0x0246dad9, size: 105 bytes, params: 2, frame: 7
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const binding = env0_2;
const ACTIONS = UserRowModes.ACTIONS;
return {type: 'user', props: {type: PENDING_INCOMING, user: binding[a0], onPress: ReactModule, mode: ACTIONS,
start: a0 === 0, end: a0 === binding.length - 1}};
}
function IgnoredUserRequestsScreen({navigation}) { // fn#115778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:309, offset: 0x0246d915, size: 349 bytes, params: 2, frame: 22
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const FRIEND_REQUESTS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIEND_REQUESTS;
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun115780,
[(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore], function() {
return require(dependencyMap[9]).getPendingRelationshipIds(RelationshipStore.getMutableRelationships()).ignoredUserIds;
})]);
const binding = env0_3;
let useCallback = binding.useCallback;
const value4 = Reflect.apply(useCallback, binding, [_fun115783, [analyticsLocations]]);
const value5 = binding.useCallback(function() {
}, []);
useCallback = binding.useCallback;
if (value3.length !== 0) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
return (
<UsersFastList
getItemProps={Reflect.apply(useCallback, binding, [_fun115785, [value4, value3]])}
getSectionProps={value5}
sections={[value3.length]}
/>
);
}
navigation.goBack();
}
function _fun115780() { // fn#115780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:575, offset: 0x0246daac, size: 45 bytes, params: 1, frame: 12
return env0_1.map(function(a0) {
return UserStore.getUser(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun115785(a0) { // fn#115785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:768, offset: 0x0246dad9, size: 105 bytes, params: 2, frame: 7
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const binding = env0_2;
const ACTIONS = UserRowModes.ACTIONS;
return {type: 'user', props: {type: PENDING_INCOMING, user: binding[a0], onPress: env0_3, mode: ACTIONS,
start: a0 === 0, end: a0 === binding.length - 1}};
}
global.__d(_fun115777, 15169, [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8743, 7697,
2]) /* metro module 15169, dependencies: [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8743, 7697, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,70 +1,78 @@
/* Metro module 15168; source: modules/main_tabs_v2/native/friends/screens/SpamRequestsScreen.tsx; dependencies: [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8742, 480, 8743, 7697, 2] */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseTrackImpression from '../../../../app_analytics/useTrackImpression.tsx'; /* Metro dependency 8742 */
import ShowUserProfileActionSheet from '../../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UserRowConstantsModule from '../../shared_components/user_list/UserRowConstants.tsx'; /* Metro dependency 7690 */
function _fun115768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:6, offset: 0x0246d4ae, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_7 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/SpamRequestsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/SpamRequestsScreen.tsx');
exports.default = SpamRequestsScreen;
}
function SpamRequestsScreen({navigation}) { // fn#115769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:302, offset: 0x0246d588, size: 397 bytes, params: 2, frame: 23
const defaultImport = UseAnalyticsLocations;
const FRIEND_REQUESTS = (AnalyticsLocation).FRIEND_REQUESTS;
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
function() {
return require(dependencyMap[9]).getPendingRelationshipIds(RelationshipStore.getMutableRelationships()).spamIds;
});
const defaultImport2 = UseTrackImpression;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const FRIEND_REQUESTS_SPAM_INBOX = ImpressionNames.FRIEND_REQUESTS_SPAM_INBOX;
defaultImport2({name: FRIEND_REQUESTS_SPAM_INBOX});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun115771,
[value2]);
let useCallback = ReactModule.useCallback;
const value4 = Reflect.apply(useCallback, ReactModule, [_fun115774, [analyticsLocations]]);
const value5 = ReactModule.useCallback(function() {
}, []);
useCallback = ReactModule.useCallback;
if (value3.length !== 0) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
return (
<UsersFastList
getItemProps={Reflect.apply(useCallback, ReactModule, [_fun115776, [value4, value3]])}
getSectionProps={value5}
sections={[value3.length]}
/>
);
}
navigation.goBack();
function _fun115771() { // fn#115771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:632, offset: 0x0246d74f, size: 45 bytes, params: 1, frame: 12
return env0_1.map(function(a0) {
return UserStore.getUser(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun115774(a0) { // fn#115774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:705, offset: 0x0246d793, size: 63 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115776(a0, a1) { // fn#115776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:825, offset: 0x0246d7d2, size: 105 bytes, params: 3, frame: 7
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const binding = env0_2;
const ACTIONS = UserRowModes.ACTIONS;
return {type: 'user', props: {type: PENDING_INCOMING, user: binding[a1], onPress: ReactModule, mode: ACTIONS,
start: a1 === 0, end: a1 === binding.length - 1}};
}
function SpamRequestsScreen({navigation}) { // fn#115769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:302, offset: 0x0246d588, size: 397 bytes, params: 2, frame: 23
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const FRIEND_REQUESTS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIEND_REQUESTS;
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
function() {
return require(dependencyMap[9]).getPendingRelationshipIds(RelationshipStore.getMutableRelationships()).spamIds;
});
const defaultImport2 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const FRIEND_REQUESTS_SPAM_INBOX = ImpressionNames.FRIEND_REQUESTS_SPAM_INBOX;
defaultImport2({name: FRIEND_REQUESTS_SPAM_INBOX});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun115771,
[value2]);
const binding = env0_3;
let useCallback = binding.useCallback;
const value4 = Reflect.apply(useCallback, binding, [_fun115774, [analyticsLocations]]);
const value5 = binding.useCallback(function() {
}, []);
useCallback = binding.useCallback;
if (value3.length !== 0) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
return (
<UsersFastList
getItemProps={Reflect.apply(useCallback, binding, [_fun115776, [value4, value3]])}
getSectionProps={value5}
sections={[value3.length]}
/>
);
}
navigation.goBack();
}
function _fun115771() { // fn#115771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:632, offset: 0x0246d74f, size: 45 bytes, params: 1, frame: 12
return env0_1.map(function(a0) {
return UserStore.getUser(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun115774(a0) { // fn#115774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:705, offset: 0x0246d793, size: 63 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115776(a0, a1) { // fn#115776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:825, offset: 0x0246d7d2, size: 105 bytes, params: 3, frame: 7
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
const binding = env0_2;
const ACTIONS = UserRowModes.ACTIONS;
return {type: 'user', props: {type: PENDING_INCOMING, user: binding[a1], onPress: env0_3, mode: ACTIONS,
start: a1 === 0, end: a1 === binding.length - 1}};
}
global.__d(_fun115768, 15168, [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8742, 480, 8743, 7697,
2]) /* metro module 15168, dependencies: [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8742, 480, 8743, 7697, 2] */;
@@ -1,11 +1,22 @@
/* Metro module 15162; source: modules/main_tabs_v2/native/friends/screens/SuggestedFriendsScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6771, 6789, 683, 14480, 8743, 15159, 7704, 7697, 9768, 1244, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ThemedGradient from '../../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import ShowUserProfileActionSheet from '../../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import UseSuggestedFriends from '../components/useSuggestedFriends.tsx'; /* Metro dependency 14480 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseAnalyticsLocationsModule from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as ContactSuggestionRowModule from '../components/ContactSuggestionRow.tsx'; /* Metro dependency 15159 */
function _fun115699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:6, offset: 0x0246af83, size: 281 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.AnalyticEvents;
const env0_6 = value.AnalyticsSections;
value = require(33) /* metro dependency 33 */;
@@ -13,96 +24,118 @@ function _fun115699(global, require, importDefault, importAll, module, exports,
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const PX_32 = (Native).space.PX_32;
const env0_9 = Reflect.apply(createStyles, value, [{emptyContainer: {flex: 1, paddingTop: PX_32},
container: {flex: 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/SuggestedFriendsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/SuggestedFriendsScreen.tsx');
exports.default = SuggestedFriendsScreen;
}
function SuggestedFriendsScreen() { // fn#115700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:414, offset: 0x0246b09c, size: 549 bytes, params: 1, frame: 32
var r8;
var NoResults;
var intl;
const styles = useStyles();
let defaultImport = UseAnalyticsLocations;
const SUGGESTED_FRIENDS = (AnalyticsLocation).SUGGESTED_FRIENDS;
const analyticsLocations = defaultImport(SUGGESTED_FRIENDS).analyticsLocations;
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_SUGGESTED_FRIENDS_MODAL});
}, []);
const {added, setAdded,
friendSuggestions} = (UseSuggestedFriends)();
const value4 = ReactModule.useCallback(_fun115703, [added, friendSuggestions, ReactModule.useCallback(_fun115702,
[analyticsLocations]), setAdded]);
const value5 = ReactModule.useCallback(function() {
}, []);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const value6 = ((Component) => <Component absolute />)(ThemedGradient);
if (friendSuggestions.length !== 0) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r8 = (
<UsersFastList
sections={[friendSuggestions.length]}
getItemProps={value4}
getSectionProps={value5}
insetStart={8}
/>
);
} else {
var viewBinding2Props = {style: styles.emptyContainer};
NoResults = importDefault(9768) /* metro dependency 9768: NoResults */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = (
<View {...viewBinding2Props}>
<NoResults
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pxFW8V)}
disableBackgroundOverlay
/>
</View>
);
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value6}
<View style={styles.container}>
{r8}
</View>
</AnalyticsLocationProvider>
);
function _fun115702(a0) { // fn#115702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:703, offset: 0x0246b302, size: 63 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: a0.id, localUser: a0,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun115703(a0, a1) { // fn#115703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:794, offset: 0x0246b341, size: 151 bytes, params: 3, frame: 8
const env0_0 = a1;
const property = friendSuggestions[a1];
const value2 = undefined;
const r4 = (property == null ? value2 : property.mutualFriendsCount) != null && (property == null ? value2 : property.mutualFriendsCount) > 0;
const result = a1 === friendSuggestions.length - 1;
const user = property.user;
return {type: 'custom', itemType: r4 ? 'contactSuggestionMutualCount' : 'contactSuggestionNoMutualCount',
key: user.id, component: component};
function component() { // fn#115704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1037, offset: 0x0246b3d8, size: 137 bytes, params: 1, frame: 19
const ContactSuggestionRow = (ContactSuggestionRowModule).ContactSuggestionRow;
const addedBinding = added;
const includes = addedBinding.includes;
const binding = env0_1;
const resultBinding = result;
const FRIENDS_SUGGESTED_FRIENDS_MODAL = AnalyticsSections.FRIENDS_SUGGESTED_FRIENDS_MODAL;
return (
<ContactSuggestionRow
added={Reflect.apply(includes, addedBinding, [binding])}
suggestedFriend={binding}
start={require === 0}
end={resultBinding}
onPress={env1_4}
onAddSuggestion={function() {
return setAdded(_fun115706);
}}
location={FRIENDS_SUGGESTED_FRIENDS_MODAL}
/>
);
function componentOnAddSuggestion_115705() { // fn#115705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1156, owner: component.onAddSuggestion, offset: 0x0246b461, size: 25 bytes, params: 1, frame: 11
return setAdded(_fun115706);
function _fun115706(a0) { // fn#115706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1163, offset: 0x0246b47a, size: 37 bytes, params: 2, frame: 13
const items2 = [];
const value = arraySpread(items2, a0, 0, undefined);
items2[value] = env2_1;
value + 1;
return items2;
}
}
}
}
function SuggestedFriendsScreen() { // fn#115700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:414, offset: 0x0246b09c, size: 549 bytes, params: 1, frame: 32
var r8;
var NoResults;
var intl;
const styles = useStyles();
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const SUGGESTED_FRIENDS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SUGGESTED_FRIENDS;
const analyticsLocations = defaultImport(SUGGESTED_FRIENDS).analyticsLocations;
const binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_SUGGESTED_FRIENDS_MODAL});
}, []);
const {added, setAdded,
friendSuggestions} = (importDefault(14480) /* metro dependency 14480: useSuggestedFriends */)();
const value4 = binding.useCallback(_fun115703, [added, friendSuggestions, binding.useCallback(_fun115702,
[analyticsLocations]), setAdded]);
const value5 = binding.useCallback(function() {
}, []);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const value6 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
if (friendSuggestions.length !== 0) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r8 = <UsersFastList sections={[friendSuggestions.length]} getItemProps={value4} getSectionProps={value5} insetStart={8} />;
} else {
var viewBinding2Props = {style: styles.emptyContainer};
NoResults = importDefault(9768) /* metro dependency 9768: NoResults */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = <View {...viewBinding2Props}><NoResults title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pxFW8V)} disableBackgroundOverlay /></View>;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value6}
<View style={styles.container}>
{r8}
</View>
</AnalyticsLocationProvider>
);
}
function _fun115703(a0, a1) { // fn#115703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:794, offset: 0x0246b341, size: 151 bytes, params: 3, frame: 8
const env0_0 = a1;
const property = friendSuggestions[a1];
const value2 = undefined;
const r4 = (property == null ? value2 : property.mutualFriendsCount) != null && (property == null ? value2 : property.mutualFriendsCount) > 0;
const result = a1 === friendSuggestions.length - 1;
const user = property.user;
return {type: 'custom', itemType: r4 ? 'contactSuggestionMutualCount' : 'contactSuggestionNoMutualCount',
key: user.id, component: component};
}
function component() { // fn#115704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1037, offset: 0x0246b3d8, size: 137 bytes, params: 1, frame: 19
const ContactSuggestionRow = (require(15159) /* metro dependency 15159: ContactSuggestionRow */).ContactSuggestionRow;
const addedBinding = added;
const includes = addedBinding.includes;
const binding = env0_1;
const resultBinding = result;
const FRIENDS_SUGGESTED_FRIENDS_MODAL = AnalyticsSections.FRIENDS_SUGGESTED_FRIENDS_MODAL;
return (
<ContactSuggestionRow
added={Reflect.apply(includes, addedBinding, [binding])}
suggestedFriend={binding}
start={require === 0}
end={resultBinding}
onPress={env1_4}
onAddSuggestion={function() {
return setAdded(_fun115706);
}}
location={FRIENDS_SUGGESTED_FRIENDS_MODAL}
/>
);
}
function componentOnAddSuggestion_115705() { // fn#115705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1156, owner: component.onAddSuggestion, offset: 0x0246b461, size: 25 bytes, params: 1, frame: 11
return setAdded(_fun115706);
}
function _fun115706(a0) { // fn#115706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1163, offset: 0x0246b47a, size: 37 bytes, params: 2, frame: 13
const items2 = [];
const value = arraySpread(items2, a0, 0, undefined);
items2[value] = env2_1;
value + 1;
return items2;
}
global.__d(_fun115699, 15162, [31, 27, 661, 33, 4501, 697, 6771, 6789, 683, 14480, 8743, 15159, 7704, 7697, 9768,
1244,
2]) /* metro module 15162, dependencies: [31, 27, 661, 33, 4501, 697, 6771, 6789, 683, 14480, 8743, 15159, 7704, 7697, 9768, 1244, 2] */;
@@ -1,11 +1,21 @@
/* Metro module 15161; source: modules/main_tabs_v2/native/friends/screens/UsernameSearchScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 683, 5463, 4559, 7701, 477, 5467, 7704, 12616, 1244, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import KeyboardAwareView from '../../../../keyboard/native/KeyboardAwareView.tsx'; /* Metro dependency 5467 */
import ThemedGradient from '../../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import AddFriendById from './AddFriendById.tsx'; /* Metro dependency 12616 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ClientThemesOverridesModule from '../../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
function _fun115694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:6, offset: 0x0246aadd, size: 464 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.ScrollView;
const env0_5 = value.View;
value = require(661) /* metro dependency 661: Constants */;
@@ -16,100 +26,98 @@ function _fun115694(global, require, importDefault, importAll, module, exports,
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.background = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.background = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.content = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.content = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object2.iosPaddingThemeAdjust = {paddingTop: PX_40};
const object3 = {flexGrow: 1};
object.iosPaddingThemeAdjust = {paddingTop: PX_40};
const object4 = {flexGrow: 1};
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object3.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object2.container = object3;
object4.paddingHorizontal = PX_16;
object.container = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.inputContainer = {'marginTop': null, 'backgroundColor': 'transparent', 'paddingHorizontal': 0,
object.inputContainer = {'marginTop': null, 'backgroundColor': 'transparent', 'paddingHorizontal': 0,
marginTop: PX_16};
object2.headerText = {textTransform: 'none'};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/UsernameSearchScreen.tsx');
object.headerText = {textTransform: 'none'};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/UsernameSearchScreen.tsx');
exports.default = UsernameSearchScreen;
}
function UsernameSearchScreen({navigation}) { // fn#115695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:827, offset: 0x0246acad, size: 540 bytes, params: 2, frame: 29
const styles = useStyles();
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[6]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_ADD_BY_USERNAME_MODAL});
}, []);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)().insets;
const value3 = ReactModule.useRef(null);
ReactModule.useEffect(function() {
return navigation.addListener('transitionEnd', _fun115698);
}, [navigation]);
const value4 = (ClientThemesOverridesModule).useClientThemesOverride();
const iosPaddingThemeAdjust = PlatformUtilsModule.isIOS() && value4 != null && insets.top > 0 ? styles.iosPaddingThemeAdjust : null;
const items2 = [styles.content, value4];
const value5 = ((Component) => <Component absolute />)(ThemedGradient);
const items3 = [styles.container, iosPaddingThemeAdjust];
const bottom = insets.bottom;
const PX_16 = (Native).space.PX_16;
items3[2] = {paddingBottom: bottom + PX_16};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const YEOwDM = (IndexNativeModule).t.YEOwDM;
return (
<View style={styles.background}>
<KeyboardAwareView style={items2}>
{value5}
<ScrollView
alwaysBounceVertical={false}
keyboardShouldPersistTaps="handled"
contentContainerStyle={items3}
>
<AddFriendById
style={styles.inputContainer}
autoFocusInput={false}
headerText={Reflect.apply(string, intl, [YEOwDM])}
headerTextStyle={styles.headerText}
ref={value3}
/>
</ScrollView>
</KeyboardAwareView>
</View>
);
function _fun115697() { // fn#115697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:1045, offset: 0x0246af0a, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('transitionEnd', _fun115698);
function _fun115698({data}) { // fn#115698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:1080, offset: 0x0246af2c, size: 87 bytes, params: 2, frame: 12
var r0;
var value;
var current;
const closing = data.closing;
if (closing) {
r0 = closing;
} else {
value = environment.__proto__.__proto__;
value = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
value = value.getIsScreenReaderEnabled();
r0 = value;
}
if (!r0) {
value = environment.__proto__;
current = env1_1.current;
if (current != null) {
current.focus();
}
}
}
function UsernameSearchScreen({navigation}) { // fn#115695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:827, offset: 0x0246acad, size: 540 bytes, params: 2, frame: 29
const styles = useStyles();
const binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[6]);
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_ADD_BY_USERNAME_MODAL});
}, []);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets;
const value3 = binding.useRef(null);
binding.useEffect(function() {
return navigation.addListener('transitionEnd', _fun115698);
}, [navigation]);
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const iosPaddingThemeAdjust = platformUtilsModule.isIOS() && value4 != null && insets.top > 0 ? styles.iosPaddingThemeAdjust : null;
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
const items2 = [styles.content, value4];
const value5 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const items3 = [styles.container, iosPaddingThemeAdjust];
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items3[2] = {paddingBottom: bottom + PX_16};
const AddFriendById = importDefault(12616) /* metro dependency 12616: AddFriendById */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const YEOwDM = (require(1244) /* metro dependency 1244: indexNative */).t.YEOwDM;
return (
<View style={styles.background}>
<KeyboardAwareView style={items2}>
{value5}
<ScrollView
alwaysBounceVertical={false}
keyboardShouldPersistTaps="handled"
contentContainerStyle={items3}
>
<AddFriendById
style={styles.inputContainer}
autoFocusInput={false}
headerText={Reflect.apply(string, intl, [YEOwDM])}
headerTextStyle={styles.headerText}
ref={value3}
/>
</ScrollView>
</KeyboardAwareView>
</View>
);
}
function _fun115697() { // fn#115697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:1045, offset: 0x0246af0a, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('transitionEnd', _fun115698);
}
function _fun115698({data}) { // fn#115698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:1080, offset: 0x0246af2c, size: 87 bytes, params: 2, frame: 12
var r0;
var value;
var current;
const closing = data.closing;
if (closing) {
r0 = closing;
} else {
value = environment.__proto__.__proto__;
value = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
value = value.getIsScreenReaderEnabled();
r0 = value;
}
if (!r0) {
value = environment.__proto__;
current = env1_1.current;
if (current != null) {
current.focus();
}
}
}
global.__d(_fun115694, 15161, [31, 27, 661, 33, 4501, 697, 683, 5463, 4559, 7701, 477, 5467, 7704, 12616, 1244,
2]) /* metro module 15161, dependencies: [31, 27, 661, 33, 4501, 697, 683, 5463, 4559, 7701, 477, 5467, 7704, 12616, 1244, 2] */;
@@ -1,41 +1,44 @@
/* Metro module 13098; source: modules/main_tabs_v2/native/getChannelDetailsFromRoute.tsx; dependencies: [4007, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun100152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13288:6, offset: 0x021dfa54, 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/main_tabs_v2/native/getChannelDetailsFromRoute.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/getChannelDetailsFromRoute.tsx');
exports.default = getChannelDetailsFromRoute;
}
function getChannelDetailsFromRoute(a0) { // fn#100153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13288:194, offset: 0x021dfab4, size: 209 bytes, params: 2, frame: 16
var r0;
var items2;
var params;
let value = a1;
const value2 = undefined;
const r2 = value !== value2 ? value : false;
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(a0);
if (value3 != null) {
params = value3.params;
items2 = [params.guildId];
params = value3.params;
items2[1] = params.channelId;
return items2;
}
if (r2) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(a0);
if (value != null) {
params = value.params;
items2 = [params == null ? value2 : params.guildId];
params = value.params;
items2[1] = params == null ? value2 : params.channelId;
r0 = items2;
} else {
r0 = [value2, value2];
function getChannelDetailsFromRoute(a0) { // fn#100153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13288:194, offset: 0x021dfab4, size: 209 bytes, params: 2, frame: 16
var r0;
var items2;
var params;
let value = a1;
const value2 = undefined;
const r2 = value !== value2 ? value : false;
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(a0);
if (value3 != null) {
params = value3.params;
items2 = [params.guildId];
params = value3.params;
items2[1] = params.channelId;
return items2;
}
return r0;
if (r2) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(a0);
if (value != null) {
params = value.params;
items2 = [params == null ? value2 : params.guildId];
params = value.params;
items2[1] = params == null ? value2 : params.channelId;
r0 = items2;
} else {
r0 = [value2, value2];
}
return r0;
}
return [value2, value2];
}
return [value2, value2];
}
global.__d(_fun100152, 13098, [4007, 2]) /* metro module 13098, dependencies: [4007, 2] */;
@@ -1,171 +1,178 @@
/* Metro module 4009; source: modules/main_tabs_v2/native/getInitialNavigationState.tsx; dependencies: [57, 1226, 3973, 1934, 661, 3, 4010, 4013, 1230, 3974, 3987, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import DefaultRouteStore from '../../../stores/DefaultRouteStore.tsx'; /* Metro dependency 3973 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as RouteUtilsModule from '../../routing/RouteUtils.tsx'; /* Metro dependency 3987 */
import * as UseChatLayoutModule from '../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import * as HomeDrawerExperimentModule from '../../home_drawer/native/HomeDrawerExperiment.tsx'; /* Metro dependency 4013 */
function _fun33036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:6, offset: 0x0102602e, size: 295 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function(a0) {
return [{name: 'main', state: {routes: a0, index: a0.length - 1}}];
};
const closure2 = getInitialGuildState;
const getInitialGuildState2 = getInitialGuildState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const defaultRouteStore = importDefault(3973) /* metro dependency 3973: DefaultRouteStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_6 = value.ME;
const env0_7 = value.Routes;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('getInitialNavigationState');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/getInitialNavigationState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/getInitialNavigationState.tsx');
exports.default = getInitialNavigationState;
exports.wrapRouteForRootNavigator = closure;
exports.getInitialAuthState = function() {
return {routes: [{name: 'auth'}], index: 0};
};
exports.getInitialGuildState = closure2;
exports.getInitialGuildState = getInitialGuildState2;
exports.computeInitialNavigationState = computeInitialNavigationState;
}
function getInitialGuildState(a0, a1, a2) { // fn#33039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:374, offset: 0x010261a8, size: 414 bytes, params: 4, frame: 24
var r0;
var object3;
var object4;
const r11 = a1 ?? SelectedChannelStore.getChannelId(a0) ?? undefined;
const useChatLayoutModule = require(4010) /* metro dependency 4010: useChatLayout */;
const getChatLayout = useChatLayoutModule.getChatLayout;
const isChatLockedOpen = Reflect.apply(getChatLayout, useChatLayoutModule, []).isChatLockedOpen;
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const getConfig = MobileHomeDrawerExperiment.getConfig;
let object = {location: 'app-start'};
const landOnHome = Reflect.apply(getConfig, MobileHomeDrawerExperiment, [object]).landOnHome;
if (a2) {
if (r11 == null) {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object4 = {index: 0};
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object4;
r0 = object;
} else if (isChatLockedOpen) {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object4 = {index: 0};
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object4;
r0 = object;
} else if (landOnHome) {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object4 = {index: 0};
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object4;
r0 = object;
function getInitialGuildState(a0, a1, a2) { // fn#33039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:374, offset: 0x010261a8, size: 414 bytes, params: 4, frame: 24
var r0;
var object2;
var object5;
const r11 = a1 ?? SelectedChannelStore.getChannelId(a0) ?? undefined;
const getChatLayout = UseChatLayoutModule.getChatLayout;
const isChatLockedOpen = Reflect.apply(getChatLayout, UseChatLayoutModule, []).isChatLockedOpen;
const MobileHomeDrawerExperiment = (HomeDrawerExperimentModule).MobileHomeDrawerExperiment;
const getConfig = MobileHomeDrawerExperiment.getConfig;
let object = {location: 'app-start'};
const landOnHome = Reflect.apply(getConfig, MobileHomeDrawerExperiment, [object]).landOnHome;
if (a2) {
if (r11 == null) {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object5 = {index: 0};
object5.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object5;
r0 = object;
} else if (isChatLockedOpen) {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object5 = {index: 0};
object5.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object5;
r0 = object;
} else if (landOnHome) {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object5 = {index: 0};
object5.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object5;
r0 = object;
} else {
object2 = {index: 0};
object2.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11}}], index: 0}}, {name: 'channel', params: {guildId: a0, channelId: r11}}]);
r0 = [true, object2];
}
} else {
object3 = {index: 0};
object3.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object5 = {index: 0};
object5.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11}}], index: 0}}, {name: 'channel', params: {guildId: a0, channelId: r11}}]);
r0 = [true, object3];
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object5;
r0 = object;
}
} else {
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
object4 = {index: 0};
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
params: {guildId: a0,
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
object[1] = object4;
r0 = object;
}
return r0;
}
function computeInitialNavigationStateWithoutLogging() { // fn#33040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:966, offset: 0x01026346, size: 606 bytes, params: 1, frame: 28
var r5;
var r3;
var r0;
var r2;
var object2;
var value3;
var moduleValue;
var location;
var moduleValue2;
var matchPath;
var pathname;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
var guildId;
var channelId;
var value6;
var openChannel;
var moduleValue3;
var lastNonVoiceRoute;
var value9;
var value10;
var value13;
var property;
var property2;
var items5;
if (AuthenticationStore.getToken() != null) {
value3 = undefined;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
location = moduleValue.getHistory().location;
moduleValue2 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue2.matchPath;
pathname = location.pathname;
object2 = {};
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}), ':messageId?');
value6 = Reflect.apply(matchPath, moduleValue2, [pathname, object2]);
if (value6 == null) {
moduleValue3 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue3.matchPath;
lastNonVoiceRoute = DefaultRouteStore.lastNonVoiceRoute;
object2 = {};
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}), ':messageId?');
value9 = Reflect.apply(matchPath, moduleValue3, [lastNonVoiceRoute, object2]);
value10 = false;
r3 = value9;
r5 = value10;
} else {
openChannel = location.openChannel;
r5 = openChannel != null && openChannel;
r3 = value6;
}
r0 = (r3 == null ? value3 : r3.params) ?? ({});
channelId = r0.channelId;
guildId = r0.guildId;
if (guildId == null) {
items5 = [{page: 'private-channels'}];
items5[1] = getInitialGuildState(ME, value3, false)[1];
return items5;
}
r5 = !r5 ? guildId !== ME : r5;
value13 = env0_2(getInitialGuildState(guildId, channelId, r5), 2);
property = value13[0];
property2 = value13[1];
r2 = property ? 'other' : guildId !== ME ? 'guild-channels' : 'private-channels';
r0 = r2 === 'private-channels' ? [{page: r2}, property2] : [{page: r2, guildId: guildId}, property2];
return r0;
}
return [{page: 'other'}, {routes: [{name: 'auth'}], index: 0}];
}
function getInitialNavigationState(a0) { // fn#33041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:1981, offset: 0x010265a4, size: 52 bytes, params: 2, frame: 12
const property = computeInitialNavigationStateWithoutLogging()[1];
if (a0 != null) {
a0.forEach(_fun33042);
function computeInitialNavigationStateWithoutLogging() { // fn#33040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:966, offset: 0x01026346, size: 606 bytes, params: 1, frame: 28
var r5;
var r3;
var r0;
var r2;
var object;
var value3;
var moduleValue;
var location;
var moduleValue2;
var matchPath;
var pathname;
const RouteParam = (RouteUtilsModule).RouteParam;
var guildId;
var channelId;
var value6;
var openChannel;
var moduleValue3;
var lastNonVoiceRoute;
var value9;
var value10;
var value13;
var property;
var property2;
var items5;
if (AuthenticationStore.getToken() != null) {
value3 = undefined;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
location = moduleValue.getHistory().location;
moduleValue2 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue2.matchPath;
pathname = location.pathname;
object = {};
object.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}), ':messageId?');
value6 = Reflect.apply(matchPath, moduleValue2, [pathname, object]);
if (value6 == null) {
moduleValue3 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue3.matchPath;
lastNonVoiceRoute = DefaultRouteStore.lastNonVoiceRoute;
object = {};
object.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}), ':messageId?');
value9 = Reflect.apply(matchPath, moduleValue3, [lastNonVoiceRoute, object]);
value10 = false;
r3 = value9;
r5 = value10;
} else {
openChannel = location.openChannel;
r5 = openChannel != null && openChannel;
r3 = value6;
}
r0 = (r3 == null ? value3 : r3.params) ?? ({});
channelId = r0.channelId;
guildId = r0.guildId;
if (guildId == null) {
items5 = [{page: 'private-channels'}];
items5[1] = getInitialGuildState(ME, value3, false)[1];
return items5;
}
r5 = !r5 ? guildId !== ME : r5;
value13 = Module00057(getInitialGuildState(guildId, channelId, r5), 2);
property = value13[0];
property2 = value13[1];
r2 = property ? 'other' : guildId !== ME ? 'guild-channels' : 'private-channels';
r0 = r2 === 'private-channels' ? [{page: r2}, property2] : [{page: r2, guildId: guildId}, property2];
return r0;
}
return [{page: 'other'}, {routes: [{name: 'auth'}], index: 0}];
}
return property;
}
function computeInitialNavigationState() { // fn#33043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:2298, offset: 0x010265f4, size: 37 bytes, params: 1, frame: 13
const initialNavigationStateWithoutLogging = computeInitialNavigationStateWithoutLogging();
env0_8.log('Initial State:', initialNavigationStateWithoutLogging);
return initialNavigationStateWithoutLogging;
}
function getInitialNavigationState(a0) { // fn#33041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:1981, offset: 0x010265a4, size: 52 bytes, params: 2, frame: 12
const property = computeInitialNavigationStateWithoutLogging()[1];
if (a0 != null) {
a0.forEach(_fun33042);
}
return property;
function _fun33042(a0) { // fn#33042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:2101, offset: 0x010265d8, size: 28 bytes, params: 2, frame: 11
return env0_0.routes.push(a0);
}
}
function computeInitialNavigationState() { // fn#33043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:2298, offset: 0x010265f4, size: 37 bytes, params: 1, frame: 13
const initialNavigationStateWithoutLogging = computeInitialNavigationStateWithoutLogging();
env0_8.log('Initial State:', initialNavigationStateWithoutLogging);
return initialNavigationStateWithoutLogging;
}
function _fun33042(a0) { // fn#33042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:2101, offset: 0x010265d8, size: 28 bytes, params: 2, frame: 11
return env0_0.routes.push(a0);
}
global.__d(_fun33036, 4009, [57, 1226, 3973, 1934, 661, 3, 4010, 4013, 1230, 3974, 3987,
2]) /* metro module 4009, dependencies: [57, 1226, 3973, 1934, 661, 3, 4010, 4013, 1230, 3974, 3987, 2] */;
@@ -1,87 +1,125 @@
/* Metro module 15233; source: modules/main_tabs_v2/native/message_requests/MessageRequestsNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 5280, 4884, 1585, 9603, 1244, 9893, 15234, 15254, 15255, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GetNavigationModalPresentation from '../utils/getNavigationModalPresentation.tsx'; /* Metro dependency 9893 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TTIAnalyticsUtilsModule from '../../../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as HeaderSharedModule from '../shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun116528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:6, offset: 0x0248cd08, size: 307 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_7 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
object = {};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
backgroundColor: BACKGROUND_BASE_LOW};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/MessageRequestsNavigator.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/MessageRequestsNavigator.tsx');
exports.default = MessageRequestsNavigator;
function MessageRequestsNavigator() { // fn#116529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:510, offset: 0x0248ce3b, size: 551 bytes, params: 1, frame: 30
const styles = useStyles();
const env0_1 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
let binding = ReactModule;
binding.useLayoutEffect(_fun116530, []);
const {left, right} = (UseSafeAreaInsetsNative)();
const items3 = [styles.container];
items3[1] = {paddingLeft: left, paddingRight: right};
binding = env0_7;
const Navigator = binding.Navigator;
const object3 = {screenOptions: screenOptions_116531};
let Screen = binding.Screen;
const object5 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object5.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ);
copyDataProperties(object5, (GetNavigationModalPresentation)(),
undefined);
const items2 = [
<Screen
name="root"
options={object5}
getComponent={function() {
return require(dependencyMap[12]).default;
}}
/>,
];
Screen = binding.Screen;
const object7 = {};
object7.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ulKXHp);
copyDataProperties(object7, (GetNavigationModalPresentation)(),
intl);
items2[1] = (
<Screen
name="spam"
options={object7}
getComponent={function() {
return require(dependencyMap[13]).default;
}}
/>
);
Screen = binding.Screen;
const object8 = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
object8.title = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.iilwGH);
copyDataProperties(object8, (GetNavigationModalPresentation)(),
intl);
items2[2] = (
<Screen
name="preview"
options={object8}
getComponent={function() {
return require(dependencyMap[14]).default;
}}
/>
);
return (
<View style={items3}>
<Navigator {...object3}>
{items2}
</Navigator>
</View>
);
function _fun116530() { // fn#116530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:622, offset: 0x0248d062, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (TTIAnalyticsUtilsModule).trackAppUIViewed();
}
function MessageRequestsNavigatorScreenOptions({navigation}) { // fn#116531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:794, owner: MessageRequestsNavigator.screenOptions, offset: 0x0248d087, size: 112 bytes, params: 2, frame: 15
const object = {};
object.headerStyle = styles.header;
object.headerShadowVisible = false;
object.headerTitle = headerTitle_116532;
object.headerTitleAlign = 'center';
object.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
copyDataProperties(object, env0_1, require);
return object;
function screenOptionsHeaderTitle_116532(a0) { // fn#116532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:870, owner: MessageRequestsNavigator.screenOptions.headerTitle, offset: 0x0248b1cd, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
}
}
}
function MessageRequestsNavigator() { // fn#116529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:510, offset: 0x0248ce3b, size: 551 bytes, params: 1, frame: 30
const styles = useStyles();
const env0_1 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
let binding = env0_3;
binding.useLayoutEffect(_fun116530, []);
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items3 = [styles.container];
items3[1] = {paddingLeft: left, paddingRight: right};
binding = env0_7;
const Navigator = binding.Navigator;
const object = {screenOptions: screenOptions_116531};
let Screen = binding.Screen;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ);
copyDataProperties(object2, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
undefined);
const items2 = [<Screen name="root" options={object2} getComponent={function() {
return require(dependencyMap[12]).default;
}} />];
Screen = binding.Screen;
const object4 = {};
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ulKXHp);
copyDataProperties(object4, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
intl);
items2[1] = <Screen name="spam" options={object4} getComponent={function() {
return require(dependencyMap[13]).default;
}} />;
Screen = binding.Screen;
const object6 = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
object6.title = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.iilwGH);
copyDataProperties(object6, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
intl);
items2[2] = <Screen name="preview" options={object6} getComponent={function() {
return require(dependencyMap[14]).default;
}} />;
return (
<View style={items3}>
<Navigator {...object}>
{items2}
</Navigator>
</View>
);
}
function _fun116530() { // fn#116530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:622, offset: 0x0248d062, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
}
function MessageRequestsNavigatorScreenOptions({navigation}) { // fn#116531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:794, owner: MessageRequestsNavigator.screenOptions, offset: 0x0248d087, size: 112 bytes, params: 2, frame: 15
const object2 = {};
object2.headerStyle = styles.header;
object2.headerShadowVisible = false;
object2.headerTitle = headerTitle_116532;
object2.headerTitleAlign = 'center';
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
copyDataProperties(object2, env0_1, require);
return object2;
}
global.__d(_fun116528, 15233, [31, 27, 33, 9884, 4501, 697, 5280, 4884, 1585, 9603, 1244, 9893, 15234, 15254, 15255,
2]) /* metro module 15233, dependencies: [31, 27, 33, 9884, 4501, 697, 5280, 4884, 1585, 9603, 1244, 9893, 15234, 15254, 15255, 2] */;
@@ -1,45 +1,49 @@
/* Metro module 15255; source: modules/main_tabs_v2/native/message_requests/screens/MessageRequestsPreviewScreen.tsx; dependencies: [31, 4605, 661, 33, 11896, 9597, 10903, 15256, 11273, 2] */
import ReadStateStore from '../../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelContainerModule from '../../../../../components_native/ChannelContainer.tsx'; /* Metro dependency 10903 */
import * as UseIsMessageRequestRestrictedViewerModule from '../../../../message_request/hooks/useIsMessageRequestRestrictedViewer.tsx'; /* Metro dependency 11896 */
function _fun116644(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15452:6, offset: 0x024913a7, size: 180 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsPreviewScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsPreviewScreen.tsx');
exports.default = MessageRequestsScreen_116645;
}
function MessageRequestsScreen_116645(a0) { // fn#116645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15452:272, offset: 0x0249145b, size: 254 bytes, params: 2, frame: 21
var object2;
var r4;
const channelId = a0.route.params.channelId;
var value;
const binding = env0_3;
const value2 = binding.useRef(null);
const value3 = (require(11896) /* metro dependency 11896: useIsMessageRequestRestrictedViewer */).useIsMessageRequestRestrictedViewer('MessageRequestsPreviewScreen');
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[5]);
var object = {};
var channelIdBinding = channelId;
object.channelId = channelIdBinding;
object.messageId = ReadStateStore.lastMessageId(channelIdBinding);
defaultImport.fetchMessages(object);
}, [channelId]);
const ChannelContainer = (require(10903) /* metro dependency 10903: ChannelContainer */).ChannelContainer;
object2 = {guildId: ME, channelId: channelId};
if (value3) {
value = importDefault(15256) /* metro dependency 15256: RestrictedMessageRequestPreview */;
value = ((Component) => <Component channelId={channelId} />)(value);
r4 = value;
} else {
r4 = ((Component) => <Component guildId={ME} channelId={channelId} chatInputRef={value2} HACK_fixModalInteraction screenIndex="message-request" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
function MessageRequestsScreen_116645(a0) { // fn#116645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15452:272, offset: 0x0249145b, size: 254 bytes, params: 2, frame: 21
var r4;
const channelId = a0.route.params.channelId;
var value;
const value2 = ReactModule.useRef(null);
const value3 = (UseIsMessageRequestRestrictedViewerModule).useIsMessageRequestRestrictedViewer('MessageRequestsPreviewScreen');
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[5]);
var object = {};
var channelIdBinding = channelId;
object.channelId = channelIdBinding;
object.messageId = ReadStateStore.lastMessageId(channelIdBinding);
defaultImport.fetchMessages(object);
}, [channelId]);
const ChannelContainer = (ChannelContainerModule).ChannelContainer;
object = {guildId: ME, channelId: channelId};
if (value3) {
value = importDefault(15256) /* metro dependency 15256: RestrictedMessageRequestPreview */;
value = ((Component) => <Component channelId={channelId} />)(value);
r4 = value;
} else {
r4 = ((Component) => <Component guildId={ME} channelId={channelId} chatInputRef={value2} HACK_fixModalInteraction screenIndex="message-request" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
}
return (
<ChannelContainer {...object}>
{r4}
</ChannelContainer>
);
}
return (
<ChannelContainer {...object2}>
{r4}
</ChannelContainer>
);
}
global.__d(_fun116644, 15255, [31, 4605, 661, 33, 11896, 9597, 10903, 15256, 11273,
2]) /* metro module 15255, dependencies: [31, 4605, 661, 33, 11896, 9597, 10903, 15256, 11273, 2] */;
@@ -1,66 +1,84 @@
/* Metro module 15234; source: modules/main_tabs_v2/native/message_requests/screens/MessageRequestsScreenWithTabs.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 8853, 1244, 15235, 15252, 9221, 8861, 9871, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SegmentedControlStateNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as SegmentedControlPagesNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
import * as SegmentedControlNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControl.native.tsx'; /* Metro dependency 9221 */
import * as TTIFirstContentfulPaintModule from '../../../../tti_analytics/native/TTIFirstContentfulPaint.tsx'; /* Metro dependency 9871 */
function _fun116536(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15431:6, offset: 0x0248d0f7, size: 338 bytes, params: 8, frame: 24
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 env0_5 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
object2 = {REQUEST: 'REQUEST', SPAM: 'SPAM'};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object2.messageRequestContent = {flex: 1};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.tabContainer = {minHeight: 32, paddingHorizontal: PX_16};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
let value = ReactModule;
object = {REQUEST: 'REQUEST', SPAM: 'SPAM'};
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object.messageRequestContent = {flex: 1};
const PX_16 = (Native).space.PX_16;
object.tabContainer = {minHeight: 32, paddingHorizontal: PX_16};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun116537);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsScreenWithTabs.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsScreenWithTabs.tsx');
exports.default = value;
function _fun116537({navigation}) { // fn#116537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15431:428, offset: 0x0248d249, size: 569 bytes, params: 2, frame: 29
const styles = useStyles();
let binding = env0_4;
const [property, env0_1] = Module00057(binding.useState(0), 2);
const value4 = binding.useCallback(function(a0) {
return navigation.push('preview', {channelId: a0});
}, [navigation]);
const value5 = binding.useCallback(_fun116539, []);
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7RFcXZ']);
binding = env0_8;
const REQUEST = binding.REQUEST;
object2.id = REQUEST;
object2.page = ((Component) => <Component goToMessageRequestPreview={value4} />)(importDefault(15235) /* metro dependency 15235: MessageRequestList */);
const items3 = [object2];
const object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ulKXHp);
const SPAM = binding.SPAM;
object4.id = SPAM;
object4.page = ((Component) => <Component goToMessageRequestPreview={value4} />)(importDefault(15252) /* metro dependency 15252: SpamMessageList */);
items3[1] = object4;
const value6 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [{items: items3,
pageWidth: property, defaultIndex: 0}]);
const SegmentedControl = (SegmentedControlNativeModule).SegmentedControl;
const items2 = [
<View style={styles.tabContainer} onLayout={value5}>
<SegmentedControl state={value6} />
</View>,
];
const SegmentedControlPages = (SegmentedControlPagesNativeModule).SegmentedControlPages;
items2[1] = (
<View style={styles.messageRequestContent}>
<SegmentedControlPages state={value6} />
</View>
);
const TTIFirstContentfulPaint = (TTIFirstContentfulPaintModule).TTIFirstContentfulPaint;
items2[2] = <TTIFirstContentfulPaint label="message_requests" />;
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun116539({nativeEvent}) { // fn#116539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15431:577, offset: 0x0223338d, size: 36 bytes, params: 2, frame: 11
env0_1(nativeEvent.layout.width);
}
}
}
function _fun116537({navigation}) { // fn#116537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15431:428, offset: 0x0248d249, size: 569 bytes, params: 2, frame: 29
const styles = useStyles();
let binding = env0_4;
const [property, env0_1] = env0_3(binding.useState(0), 2);
const value4 = binding.useCallback(function(a0) {
return navigation.push('preview', {channelId: a0});
}, [navigation]);
const value5 = binding.useCallback(_fun116539, []);
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7RFcXZ']);
binding = env0_8;
const REQUEST = binding.REQUEST;
object.id = REQUEST;
object.page = ((Component) => <Component goToMessageRequestPreview={value4} />)(importDefault(15235) /* metro dependency 15235: MessageRequestList */);
const items3 = [object];
const object3 = {};
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ulKXHp);
const SPAM = binding.SPAM;
object3.id = SPAM;
object3.page = ((Component) => <Component goToMessageRequestPreview={value4} />)(importDefault(15252) /* metro dependency 15252: SpamMessageList */);
items3[1] = object3;
const value6 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [{items: items3,
pageWidth: property, defaultIndex: 0}]);
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
const items2 = [<View style={styles.tabContainer} onLayout={value5}><SegmentedControl state={value6} /></View>];
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
items2[1] = <View style={styles.messageRequestContent}><SegmentedControlPages state={value6} /></View>;
const TTIFirstContentfulPaint = (require(9871) /* metro dependency 9871: TTIFirstContentfulPaint */).TTIFirstContentfulPaint;
items2[2] = <TTIFirstContentfulPaint label="message_requests" />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
global.__d(_fun116536, 15234, [57, 31, 27, 33, 4501, 697, 8853, 1244, 15235, 15252, 9221, 8861, 9871,
2]) /* metro module 15234, dependencies: [57, 31, 27, 33, 4501, 697, 8853, 1244, 15235, 15252, 9221, 8861, 9871, 2] */;
@@ -1,16 +1,19 @@
/* Metro module 15254; source: modules/main_tabs_v2/native/message_requests/screens/MessageRequestsSpamScreen.tsx; dependencies: [31, 33, 15252, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun116641(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15451:6, offset: 0x024912c4, size: 138 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsSpamScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsSpamScreen.tsx');
exports.default = MessageRequestsScreen;
function MessageRequestsScreen({navigation}) { // fn#116642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15451:246, offset: 0x0249134e, size: 89 bytes, params: 2, frame: 15
return ((Component) => <Component goToMessageRequestPreview={ReactModule.useCallback(function(a0) {
return navigation.push('preview', {channelId: a0});
}, [navigation])} />)(importDefault(15252) /* metro dependency 15252: SpamMessageList */);
}
}
function MessageRequestsScreen({navigation}) { // fn#116642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15451:246, offset: 0x0249134e, size: 89 bytes, params: 2, frame: 15
return ((Component) => <Component goToMessageRequestPreview={env0_2.useCallback(function(a0) {
return navigation.push('preview', {channelId: a0});
}, [navigation])} />)(importDefault(15252) /* metro dependency 15252: SpamMessageList */);
}
global.__d(_fun116641, 15254, [31, 33, 15252, 2]) /* metro module 15254, dependencies: [31, 33, 15252, 2] */;
@@ -1,6 +1,20 @@
/* Metro module 15845; source: modules/main_tabs_v2/native/modal/DeprecatedModalManager.tsx; dependencies: [7, 6, 15, 17, 18, 9113, 1226, 9152, 15846, 1373, 661, 4008, 4007, 5082, 8961, 15847, 15848, 15856, 15857, 16128, 16130, 4860, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserRequiredActionStore from '../../../../stores/UserRequiredActionStore.tsx'; /* Metro dependency 1373 */
import GuildSettingsStore from '../../../guild_settings/GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import NotificationSettingsModalStore from '../../../../stores/NotificationSettingsModalStore.tsx'; /* Metro dependency 15846 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NavigationRouteUtilsNativeModule from '../../helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as RootNavigationRefNativeModule from '../../RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
function _fun121836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:6, offset: 0x025525ae, size: 510 bytes, params: 8, frame: 19
var object2;
let env0_0 = require;
const _arrayLikeToArray_121842 = function(a0, a1) {
var r0;
@@ -52,293 +66,290 @@ function _fun121836(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const notificationSettingsModalStore = importDefault(15846) /* metro dependency 15846: NotificationSettingsModalStore */;
let value = importDefault(1373) /* metro dependency 1373: UserRequiredActionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.UserRequiredActions;
const AppContext = constantsModule.AppContext;
let value = UserRequiredActionStore;
const AppContext = ConstantsModule.AppContext;
const env0_14 = AppContext.APP;
object2 = {'key': 'EMAIL_VERIFICATION_MODAL_OPEN', 'store': null, 'closable': false, 'center': true};
object2.store = value;
object2.isOpen = isOpen_121848;
object2.getComponent = function() {
object = {'key': 'EMAIL_VERIFICATION_MODAL_OPEN', 'store': null, 'closable': false, 'center': true};
object.store = value;
object.isOpen = isOpen_121848;
object.getComponent = function() {
return require(dependencyMap[16]).default;
};
object2 = {'key': 'USER_REQUIRED_ACTION_UPDATE', 'store': null, 'center': true};
object2.store = value;
object2.isOpen = isOpen_121850;
object2.getComponent = function() {
object = {'key': 'USER_REQUIRED_ACTION_UPDATE', 'store': null, 'center': true};
object.store = value;
object.isOpen = isOpen_121850;
object.getComponent = function() {
return require(dependencyMap[17]).default;
};
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121852(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/modal/DeprecatedModalManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/modal/DeprecatedModalManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121837() { // fn#121837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:236, offset: 0x025527ac, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_121837_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_121840(a0, a1) { // fn#121840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:429, offset: 0x0255280e, 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) {
function _isNativeReflectConstruct_121837() { // fn#121837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:236, offset: 0x025527ac, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return _fun121841;
return (_isNativeReflectConstruct_121837_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_121842(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') {
function _createForOfIteratorHelperLoose_121840(a0, a1) { // fn#121840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:429, offset: 0x0255280e, 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 _fun121841;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_121842(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_121842(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_121842(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun121841;
}
return _fun121841;
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 _fun121841() { // fn#121841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1000, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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 handlePushedModal(a0) { // fn#121843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1362, offset: 0x02552982, size: 88 bytes, params: 2, frame: 14
let value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate({name: 'modal', key: a0.key, params: {modal: a0}});
function handlePushedModal(a0) { // fn#121843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1362, offset: 0x02552982, size: 88 bytes, params: 2, frame: 14
let value = RootNavigationRefNativeModule;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate({name: 'modal', key: a0.key, params: {modal: a0}});
}
}
}
function handlePoppedModal() { // fn#121844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1494, offset: 0x025529da, size: 37 bytes, params: 1, frame: 11
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal();
}
function handlePoppedModal() { // fn#121844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1494, offset: 0x025529da, size: 37 bytes, params: 1, frame: 11
(NavigationRouteUtilsNativeModule).popModal();
}
function pushFirstOpenModal(a0, a1) { // fn#121845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1544, offset: 0x025529ff, size: 219 bytes, params: 3, frame: 20
var r3;
var value5;
var isOpen;
var isOpen2;
var value6;
const _createForOfIteratorHelperLoose_121840Binding = _createForOfIteratorHelperLoose_121840;
const value2 = undefined;
const value3 = _createForOfIteratorHelperLoose_121840Binding(a0);
const value4 = value3();
let done = value4.done;
if (!done) {
var r4 = value4;
while (true) {
value5 = r4.value;
if (value5 != null) {
isOpen = value5.isOpen;
if (isOpen == null) {
r3 = value2;
function pushFirstOpenModal(a0, a1) { // fn#121845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1544, offset: 0x025529ff, size: 219 bytes, params: 3, frame: 20
var r3;
var value5;
var isOpen;
var isOpen2;
var value6;
const _createForOfIteratorHelperLoose_121840Binding = _createForOfIteratorHelperLoose_121840;
const value2 = undefined;
const value3 = _createForOfIteratorHelperLoose_121840Binding(a0);
const value4 = value3();
let done = value4.done;
if (!done) {
var r4 = value4;
while (true) {
value5 = r4.value;
if (value5 != null) {
isOpen = value5.isOpen;
if (isOpen == null) {
r3 = value2;
break;
}
isOpen2 = value5.isOpen(APP, a1);
r3 = isOpen2;
break;
}
isOpen2 = value5.isOpen(APP, a1);
r3 = isOpen2;
break;
r3 = value2;
if (r3 == null) {
break;
}
if (r3) {
break;
}
value6 = value3();
done = value6.done;
if (done) {
return value2;
}
r4 = value6;
continue;
}
r3 = value2;
if (r3 == null) {
break;
}
if (r3) {
break;
}
value6 = value3();
done = value6.done;
if (done) {
return value2;
}
r4 = value6;
continue;
var component = value5.getComponent();
var store = value5.store;
var getProps = store == null ? value2 : store.getProps;
r4 = typeof getProps === 'function' ? value5.store.getProps() : {};
handlePushedModal((importDefault(5082) /* metro dependency 5082: getDeprecatedModalData */)(component,
{key: value5.key}, r4));
}
var component = value5.getComponent();
var store = value5.store;
var getProps = store == null ? value2 : store.getProps;
r4 = typeof getProps === 'function' ? value5.store.getProps() : {};
handlePushedModal((importDefault(5082) /* metro dependency 5082: getDeprecatedModalData */)(component,
{key: value5.key}, r4));
return value2;
}
return value2;
}
function createPushModalHandler(a0) { // fn#121846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1882, offset: 0x02552ada, size: 21 bytes, params: 2, frame: 10
const env0_0 = copyRestArgs(0, undefined);
return _fun121847;
}
function isOpen_121848(a0, a1) { // fn#121848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2036, offset: 0x02552b06, size: 134 bytes, params: 3, frame: 14
let value = a1;
let r0 = (importDefault(8961) /* metro dependency 8961: VerificationUtils */).isFullScreenVerification(value ?? UserRequiredActionStore.getAction()) && AuthenticationStore.getToken() != null;
if (r0) {
value = require(15847) /* metro dependency 15847: SafetyFlowsExperiment */;
value = !value.isEligibleForSafetyFlowsExperiment({location: 'modal-manager-verification'});
r0 = value;
}
return r0;
}
function isOpen_121850(a0, a1) { // fn#121850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2329, offset: 0x02552b8c, size: 45 bytes, params: 3, frame: 10
const r1 = a1 ?? UserRequiredActionStore.getAction();
const AGREEMENTS = UserRequiredActions.AGREEMENTS;
return r1 === AGREEMENTS;
}
function _fun121852(a0) { // fn#121852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2419, offset: 0x02552bb9, size: 42 bytes, params: 2, frame: 14
const closure = DeprecatedModalManager;
env0_7(closure, a0);
return env0_3(closure);
}
function _fun121847() { // fn#121847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1926, offset: 0x02552aef, size: 23 bytes, params: 1, frame: 11
pushFirstOpenModal(env0_0);
}
function DeprecatedModalManager(a0) { // fn#121853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2431, offset: 0x02552be3, size: 366 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, DeprecatedModalManager);
let object = [];
arraySpread(object, value, 0, object);
value = env1_6(DeprecatedModalManager);
binding = env1_5;
if (_isNativeReflectConstruct_121837()) {
Reflect = global.Reflect;
value = Reflect.construct(value, object, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, object);
r0 = value;
}
value = binding(this, r0);
object = {};
const createPushModalHandlerBinding = createPushModalHandler;
binding = env1_16;
const binding2 = env1_15;
object.CONNECTION_OPEN_SUPPLEMENTAL = createPushModalHandlerBinding(binding, binding2);
object.EMAIL_VERIFICATION_MODAL_OPEN = createPushModalHandlerBinding(binding2);
object.USER_REQUIRED_ACTION_UPDATE = USER_REQUIRED_ACTION_UPDATE;
object.GUILD_SETTINGS_OPEN = createPushModalHandlerBinding({'key': 'GUILD_SETTINGS_OPEN', 'store': null,
'closable': false, store: GuildSettingsStore, getComponent: function() {
return require(dependencyMap[18]).default;
}});
object.NOTIFICATION_SETTINGS_MODAL_OPEN = createPushModalHandlerBinding({'key': 'NOTIFICATION_SETTINGS_MODAL_OPEN',
'store': null, 'closable': false, store: NotificationSettingsModalStore, getComponent: function() {
return require(dependencyMap[19]).default;
}});
object.CREATE_INVITE_MODAL_OPEN = createPushModalHandlerBinding({'key': 'CREATE_INVITE_MODAL_OPEN', 'store': null,
'closable': false, store: CreateInviteModalStore, getComponent: function() {
return require(dependencyMap[20]).default;
}});
const handlePoppedModalBinding = handlePoppedModal;
object.GUILD_SETTINGS_CLOSE = handlePoppedModalBinding;
object.NOTIFICATION_SETTINGS_MODAL_CLOSE = handlePoppedModalBinding;
object.PREMIUM_PAYMENT_MODAL_CLOSE = handlePoppedModalBinding;
object.EMAIL_VERIFICATION_MODAL_CLOSE = handlePoppedModalBinding;
object.CREATE_INVITE_MODAL_CLOSE = handlePoppedModalBinding;
object.QUICKSWITCHER_HIDE = handlePoppedModalBinding;
object.IFE_EXPERIMENT_SEARCH_MODAL_CLOSE = handlePoppedModalBinding;
value.actions = object;
return value;
}
function USER_REQUIRED_ACTION_UPDATE(a0) { // fn#121854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2835, owner: DeprecatedModalManager.USER_REQUIRED_ACTION_UPDATE, offset: 0x02552d51, size: 201 bytes, params: 2, frame: 15
var value;
var moduleValue;
var isModalOpen;
var moduleValue3;
if (a0.requiredAction == null) {
value = environment.__proto__.__proto__;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue.isModalOpen;
if (Reflect.apply(isModalOpen, moduleValue, ['USER_REQUIRED_ACTION_UPDATE'])) {
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal('USER_REQUIRED_ACTION_UPDATE');
function createPushModalHandler(a0) { // fn#121846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1882, offset: 0x02552ada, size: 21 bytes, params: 2, frame: 10
const env0_0 = copyRestArgs(0, undefined);
return _fun121847;
function _fun121847() { // fn#121847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1926, offset: 0x02552aef, size: 23 bytes, params: 1, frame: 11
pushFirstOpenModal(env0_0);
}
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue3.isModalOpen;
if (Reflect.apply(isModalOpen, moduleValue3, ['EMAIL_VERIFICATION_MODAL_OPEN'])) {
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal('EMAIL_VERIFICATION_MODAL_OPEN');
}
} else {
value = environment.__proto__.__proto__;
pushFirstOpenModal([env2_16, env2_15], a0.requiredAction);
}
function isOpen_121848(a0, a1) { // fn#121848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2036, offset: 0x02552b06, size: 134 bytes, params: 3, frame: 14
let value = a1;
let r0 = (importDefault(8961) /* metro dependency 8961: VerificationUtils */).isFullScreenVerification(value ?? userRequiredActionStore.getAction()) && AuthenticationStore.getToken() != null;
if (r0) {
value = require(15847) /* metro dependency 15847: SafetyFlowsExperiment */;
value = !value.isEligibleForSafetyFlowsExperiment({location: 'modal-manager-verification'});
r0 = value;
}
return r0;
}
function isOpen_121850(a0, a1) { // fn#121850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2329, offset: 0x02552b8c, size: 45 bytes, params: 3, frame: 10
const r1 = a1 ?? userRequiredActionStore.getAction();
const AGREEMENTS = UserRequiredActions.AGREEMENTS;
return r1 === AGREEMENTS;
}
function _fun121852(a0) { // fn#121852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2419, offset: 0x02552bb9, size: 42 bytes, params: 2, frame: 14
const DeprecatedModalManager2 = DeprecatedModalManager;
Inherits(DeprecatedModalManager2, a0);
return CreateClass(DeprecatedModalManager2);
function DeprecatedModalManager(a0) { // fn#121853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2431, offset: 0x02552be3, size: 366 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, DeprecatedModalManager);
let object = [];
arraySpread(object, value, 0, object);
value = env1_6(DeprecatedModalManager);
binding = env1_5;
if (_isNativeReflectConstruct_121837()) {
Reflect = global.Reflect;
value = Reflect.construct(value, object, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, object);
r0 = value;
}
value = binding(this, r0);
object = {};
const createPushModalHandlerBinding = createPushModalHandler;
binding = env1_16;
const binding2 = env1_15;
object.CONNECTION_OPEN_SUPPLEMENTAL = createPushModalHandlerBinding(binding, binding2);
object.EMAIL_VERIFICATION_MODAL_OPEN = createPushModalHandlerBinding(binding2);
object.USER_REQUIRED_ACTION_UPDATE = USER_REQUIRED_ACTION_UPDATE;
object.GUILD_SETTINGS_OPEN = createPushModalHandlerBinding({'key': 'GUILD_SETTINGS_OPEN', 'store': null,
'closable': false, store: GuildSettingsStore, getComponent: function() {
return require(dependencyMap[18]).default;
}});
object.NOTIFICATION_SETTINGS_MODAL_OPEN = createPushModalHandlerBinding({'key': 'NOTIFICATION_SETTINGS_MODAL_OPEN',
'store': null, 'closable': false, store: NotificationSettingsModalStore, getComponent: function() {
return require(dependencyMap[19]).default;
}});
object.CREATE_INVITE_MODAL_OPEN = createPushModalHandlerBinding({'key': 'CREATE_INVITE_MODAL_OPEN', 'store': null,
'closable': false, store: CreateInviteModalStore, getComponent: function() {
return require(dependencyMap[20]).default;
}});
const handlePoppedModalBinding = handlePoppedModal;
object.GUILD_SETTINGS_CLOSE = handlePoppedModalBinding;
object.NOTIFICATION_SETTINGS_MODAL_CLOSE = handlePoppedModalBinding;
object.PREMIUM_PAYMENT_MODAL_CLOSE = handlePoppedModalBinding;
object.EMAIL_VERIFICATION_MODAL_CLOSE = handlePoppedModalBinding;
object.CREATE_INVITE_MODAL_CLOSE = handlePoppedModalBinding;
object.QUICKSWITCHER_HIDE = handlePoppedModalBinding;
object.IFE_EXPERIMENT_SEARCH_MODAL_CLOSE = handlePoppedModalBinding;
value.actions = object;
return value;
function USER_REQUIRED_ACTION_UPDATE(a0) { // fn#121854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2835, owner: DeprecatedModalManager.USER_REQUIRED_ACTION_UPDATE, offset: 0x02552d51, size: 201 bytes, params: 2, frame: 15
var value;
var moduleValue;
var isModalOpen;
var moduleValue3;
if (a0.requiredAction == null) {
value = environment.__proto__.__proto__;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue.isModalOpen;
if (Reflect.apply(isModalOpen, moduleValue, ['USER_REQUIRED_ACTION_UPDATE'])) {
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal('USER_REQUIRED_ACTION_UPDATE');
}
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue3.isModalOpen;
if (Reflect.apply(isModalOpen, moduleValue3, ['EMAIL_VERIFICATION_MODAL_OPEN'])) {
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal('EMAIL_VERIFICATION_MODAL_OPEN');
}
} else {
value = environment.__proto__.__proto__;
pushFirstOpenModal([env2_16, env2_15], a0.requiredAction);
}
}
}
}
}
global.__d(_fun121836, 15845, [7, 6, 15, 17, 18, 9113, 1226, 9152, 15846, 1373, 661, 4008, 4007, 5082, 8961, 15847,
15848, 15856, 15857, 16128, 16130, 4860,
2]) /* metro module 15845, dependencies: [7, 6, 15, 17, 18, 9113, 1226, 9152, 15846, 1373, 661, 4008, 4007, 5082, 8961, 15847, 15848, 15856, 15857, 16128, 16130, 4860, 2] */;
@@ -1,39 +1,42 @@
/* Metro module 5083; source: modules/main_tabs_v2/native/modal/ModalDispatchQueue.tsx; dependencies: [6, 7, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun44116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:6, offset: 0x01168afe, size: 144 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
let value = _fun44117();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/modal/ModalDispatchQueue.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/modal/ModalDispatchQueue.tsx');
exports.default = value;
}
function _fun44117() { // fn#44117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:122, offset: 0x01168b8e, size: 78 bytes, params: 1, frame: 15
return env0_1(ModalDispatchQueue, [{key: 'enqueue', value: function(a0) {
this.queue.push(a0);
}}, {key: 'flush', value: function() {
var queue;
var value;
if (this.queue.length > 0) {
while (true) {
queue = this.queue;
value = queue.shift();
if (value != null) {
value();
function _fun44117() { // fn#44117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:122, offset: 0x01168b8e, size: 78 bytes, params: 1, frame: 15
return CreateClass(ModalDispatchQueue, [{key: 'enqueue', value: function(a0) {
this.queue.push(a0);
}}, {key: 'flush', value: function() {
var queue;
var value;
if (this.queue.length > 0) {
while (true) {
queue = this.queue;
value = queue.shift();
if (value != null) {
value();
}
if (this.queue.length > 0) {
continue;
}
break;
}
if (this.queue.length > 0) {
continue;
}
break;
}
}}]);
function ModalDispatchQueue() { // fn#44118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:143, offset: 0x01168bdc, size: 37 bytes, params: 1, frame: 13
env1_0(this, ModalDispatchQueue);
this.queue = [];
}
}}]);
}
function ModalDispatchQueue() { // fn#44118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:143, offset: 0x01168bdc, size: 37 bytes, params: 1, frame: 13
env1_0(this, ModalDispatchQueue);
this.queue = [];
}
}
global.__d(_fun44116, 5083, [6, 7, 2]) /* metro module 5083, dependencies: [6, 7, 2] */;
@@ -1,97 +1,105 @@
/* Metro module 15231; source: modules/main_tabs_v2/native/modal/ModalScreen.tsx; dependencies: [29, 31, 27, 661, 33, 4501, 697, 5080, 8742, 480, 4884, 1585, 15232, 477, 15143, 2] */
import ObjectWithoutProperties from '../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TTIAnalyticsUtilsModule from '../../../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
function _fun116519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:6, offset: 0x0248c7b1, size: 296 bytes, params: 8, frame: 21
const env0_0 = require;
const env0_3 = ['impressionName', 'impressionProperties'];
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.StyleSheet;
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
const env0_11 = Reflect.apply(createStyles, value,
[{containerWithPadding: {backgroundColor: BACKGROUND_BASE_LOWEST}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/modal/ModalScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/modal/ModalScreen.tsx');
exports.default = Modal_116520;
function Modal_116520(a0) { // fn#116520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:349, offset: 0x0248c8d9, size: 627 bytes, params: 2, frame: 25
let modal = a0.route.params.modal;
const value = undefined;
const styles = useStyles();
const r5 = modal.props ?? ({});
const impressionName = r5.impressionName;
const impressionProperties = r5.impressionProperties;
let binding = ObjectWithoutProperties;
const value3 = binding(r5, env0_3);
binding = ReactModule;
const value4 = binding.useCallback(_fun116521, []);
const defaultImport = importDefault(dependencyMap[8]);
const ImpressionTypes = require(dependencyMap[9]).ImpressionTypes;
const MODAL = ImpressionTypes.MODAL;
defaultImport({type: MODAL, name: impressionName, properties: impressionProperties});
const useRef = binding.useRef;
const callbacks = modal.callbacks;
const env0_1 = Reflect.apply(useRef, binding, [callbacks == null ? value : callbacks.onExited]);
binding = ReactModule;
binding.useEffect(_fun116522);
binding.useEffect(function() {
return _fun116524;
}, []);
binding.useLayoutEffect(_fun116525, []);
const {left, right} = importDefault(dependencyMap[11])();
const moduleValue = require(dependencyMap[12]);
const shouldExcludeSafeAreaForModalKey2 = moduleValue.shouldExcludeSafeAreaForModalKey(modal.key);
const viewProps = {style: [StyleSheet.absoluteFillObject,
shouldExcludeSafeAreaForModalKey2 ? value : [styles.containerWithPadding, {paddingLeft: left,
paddingRight: right}]], onAccessibilityEscape: modal.closable ? importDefault(dependencyMap[7]).pop : NOOP};
binding = ReactModule;
const createElement = binding.createElement;
modal = modal.modal;
const object = {};
copyDataProperties(object, value3, dependencyMap);
object['style'] = value;
object['transitionState'] = null;
object['onClose'] = value4;
return (
<View {...viewProps}>
{Reflect.apply(createElement, binding, [modal, object])}
{require(dependencyMap[13]).isIOS() && ((PortalKeyboardRenderer) => <PortalKeyboardRenderer portal={false} />)(require(dependencyMap[14]).PortalKeyboardRenderer)}
</View>
);
function _fun116521() { // fn#116521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:501, offset: 0x0248cb4c, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ModalActionCreators).pop();
}
function _fun116522() { // fn#116522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:661, offset: 0x0248cb71, size: 44 bytes, params: 1, frame: 5
const binding = env0_1;
const callbacks = modal.callbacks;
const value = undefined;
binding.current = callbacks == null ? value : callbacks.onExited;
return value;
}
function _fun116523() { // fn#116523, offset: 0x0248cb9d, size: 11 bytes, params: 1, frame: 1
return _fun116524;
function _fun116524() { // fn#116524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:742, offset: 0x0248cba8, size: 38 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_1.current?.();
}
}
function _fun116525() { // fn#116525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:805, offset: 0x0248cbce, size: 42 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (TTIAnalyticsUtilsModule).trackAppUIViewed('ModalScreen');
}
}
}
function Modal_116520(a0) { // fn#116520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:349, offset: 0x0248c8d9, size: 627 bytes, params: 2, frame: 25
let modal = a0.route.params.modal;
const value = undefined;
const styles = useStyles();
const r5 = modal.props ?? ({});
const impressionName = r5.impressionName;
const impressionProperties = r5.impressionProperties;
let binding = env0_4;
const value3 = binding(r5, env0_3);
binding = env0_5;
const value4 = binding.useCallback(_fun116521, []);
const defaultImport = importDefault(dependencyMap[8]);
const ImpressionTypes = require(dependencyMap[9]).ImpressionTypes;
const MODAL = ImpressionTypes.MODAL;
defaultImport({type: MODAL, name: impressionName, properties: impressionProperties});
const useRef = binding.useRef;
const callbacks = modal.callbacks;
const env0_1 = Reflect.apply(useRef, binding, [callbacks == null ? value : callbacks.onExited]);
binding = env0_5;
binding.useEffect(_fun116522);
binding.useEffect(function() {
return _fun116524;
}, []);
binding.useLayoutEffect(_fun116525, []);
const {left, right} = importDefault(dependencyMap[11])();
const moduleValue = require(dependencyMap[12]);
const shouldExcludeSafeAreaForModalKey2 = moduleValue.shouldExcludeSafeAreaForModalKey(modal.key);
const viewProps = {style: [StyleSheet.absoluteFillObject,
shouldExcludeSafeAreaForModalKey2 ? value : [styles.containerWithPadding, {paddingLeft: left,
paddingRight: right}]], onAccessibilityEscape: modal.closable ? importDefault(dependencyMap[7]).pop : NOOP};
binding = env0_5;
const createElement = binding.createElement;
modal = modal.modal;
const object = {};
copyDataProperties(object, value3, dependencyMap);
object['style'] = value;
object['transitionState'] = null;
object['onClose'] = value4;
return (
<View {...viewProps}>
{Reflect.apply(createElement, binding, [modal, object])}
{require(dependencyMap[13]).isIOS() && ((PortalKeyboardRenderer) => <PortalKeyboardRenderer portal={false} />)(require(dependencyMap[14]).PortalKeyboardRenderer)}
</View>
);
}
function _fun116521() { // fn#116521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:501, offset: 0x0248cb4c, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun116522() { // fn#116522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:661, offset: 0x0248cb71, size: 44 bytes, params: 1, frame: 5
const binding = env0_1;
const callbacks = modal.callbacks;
const value = undefined;
binding.current = callbacks == null ? value : callbacks.onExited;
return value;
}
function _fun116523() { // fn#116523, offset: 0x0248cb9d, size: 11 bytes, params: 1, frame: 1
return _fun116524;
}
function _fun116525() { // fn#116525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:805, offset: 0x0248cbce, size: 42 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed('ModalScreen');
}
function _fun116524() { // fn#116524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:742, offset: 0x0248cba8, size: 38 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_1.current?.();
}
global.__d(_fun116519, 15231, [29, 31, 27, 661, 33, 4501, 697, 5080, 8742, 480, 4884, 1585, 15232, 477, 15143,
2]) /* metro module 15231, dependencies: [29, 31, 27, 661, 33, 4501, 697, 5080, 8742, 480, 4884, 1585, 15232, 477, 15143, 2] */;
@@ -1,32 +1,37 @@
/* Metro module 8776; source: modules/main_tabs_v2/native/navigateToLastChannel.tsx; dependencies: [4007, 8777, 4601, 2] */
import GetNavigatorCurrentRoute from '../navigator/getNavigatorCurrentRoute.tsx'; /* Metro dependency 8777 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NavigationRouteUtilsNativeModule from '../helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
function _fun68628(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8961:6, offset: 0x01c56849, size: 103 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/main_tabs_v2/native/navigateToLastChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/navigateToLastChannel.tsx');
exports.default = navigateToLastChannel;
function navigateToLastChannel() { // fn#68629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8961:189, offset: 0x01c568b0, size: 144 bytes, params: 1, frame: 16
var r3;
var params;
var transitionToChannel;
var value;
const value2 = undefined;
const value3 = (NavigationRouteUtilsNativeModule).coerceGuildsRoute((GetNavigatorCurrentRoute)());
const value4 = value3 != null;
if (value4) {
params = value3.params;
r3 = (params == null ? value2 : params.channelId) != null;
} else {
r3 = value4;
}
if (r3) {
value = require(4601) /* metro dependency 4601: transitionToChannel */;
transitionToChannel = value.transitionToChannel;
params = value3.params;
Reflect.apply(transitionToChannel, value, [params == null ? value2 : params.channelId]);
}
return value2;
}
}
function navigateToLastChannel() { // fn#68629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8961:189, offset: 0x01c568b0, size: 144 bytes, params: 1, frame: 16
var r3;
var params;
var transitionToChannel;
var value;
const value2 = undefined;
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute((importDefault(8777) /* metro dependency 8777: getNavigatorCurrentRoute */)());
const value4 = value3 != null;
if (value4) {
params = value3.params;
r3 = (params == null ? value2 : params.channelId) != null;
} else {
r3 = value4;
}
if (r3) {
value = require(4601) /* metro dependency 4601: transitionToChannel */;
transitionToChannel = value.transitionToChannel;
params = value3.params;
Reflect.apply(transitionToChannel, value, [params == null ? value2 : params.channelId]);
}
return value2;
}
global.__d(_fun68628, 8776, [4007, 8777, 4601, 2]) /* metro module 8776, dependencies: [4007, 8777, 4601, 2] */;
@@ -1,91 +1,102 @@
/* Metro module 14367; source: modules/main_tabs_v2/native/panels/ChannelScreenAnimatedFrame.tsx; dependencies: [31, 27, 9604, 661, 33, 4501, 697, 4048, 1357, 4017, 4504, 1305, 14365, 7701, 6618, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as MainTabsV2ConstantsModule from '../shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
import * as PanelsConfigModule from '../../../panels/native/PanelsConfig.tsx'; /* Metro dependency 14365 */
function _fun108730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:6, offset: 0x0232be35, size: 415 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(9604) /* metro dependency 9604: MainTabsV2Constants */;
ReactModule;
let value = MainTabsV2ConstantsModule;
const HEADER_CORNER_RADIUS = value.HEADER_CORNER_RADIUS;
const MIDNIGHT_BORDER_WIDTH = value.MIDNIGHT_BORDER_WIDTH;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'position': 'absolute', 'zIndex': 1, 'top': 0, 'width': '100%',
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {'position': 'absolute', 'zIndex': 1, 'top': 0, 'width': '100%',
backgroundColor: BACKGROUND_BASE_LOW};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object2.midnightContainer = {borderLeftColor: BORDER_STRONG, borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
const object3 = {};
const APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
object3.borderLeftColor = APP_FRAME_BORDER;
const CHANNEL_DRAWER_DIVIDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
object3.borderLeftWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
object2.splitDivider = object3;
object2.additionalHeight = {height: HEADER_CORNER_RADIUS};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function ChannelScreenAnimatedFrameTsx1(){const{translateX,maxWidth,isChatLockedOpen,withTiming,STANDARD_EASING,SIDE_PANEL_CLOSE_DURATION_MS,SIDE_PANEL_OPEN_DURATION_MS}=this.__closure;const hide=translateX.get()===maxWidth||isChatLockedOpen;return{opacity:withTiming(hide?0:1,{easing:STANDARD_EASING,duration:hide?SIDE_PANEL_CLOSE_DURATION_MS:SIDE_PANEL_OPEN_DURATION_MS})};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/ChannelScreenAnimatedFrame.tsx');
const BORDER_STRONG = (Native).colors.BORDER_STRONG;
object.midnightContainer = {borderLeftColor: BORDER_STRONG, borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
const object4 = {};
const APP_FRAME_BORDER = (Native).colors.APP_FRAME_BORDER;
object4.borderLeftColor = APP_FRAME_BORDER;
const CHANNEL_DRAWER_DIVIDER_WIDTH = (Native).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
object4.borderLeftWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
object.splitDivider = object4;
object.additionalHeight = {height: HEADER_CORNER_RADIUS};
const env0_7 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function ChannelScreenAnimatedFrameTsx1(){const{translateX,maxWidth,isChatLockedOpen,withTiming,STANDARD_EASING,SIDE_PANEL_CLOSE_DURATION_MS,SIDE_PANEL_OPEN_DURATION_MS}=this.__closure;const hide=translateX.get()===maxWidth||isChatLockedOpen;return{opacity:withTiming(hide?0:1,{easing:STANDARD_EASING,duration:hide?SIDE_PANEL_CLOSE_DURATION_MS:SIDE_PANEL_OPEN_DURATION_MS})};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/ChannelScreenAnimatedFrame.tsx');
exports.default = ChannelScreenAnimatedFrame;
function ChannelScreenAnimatedFrame({translateX, maxWidth, isChatLockedOpen}) { // fn#108731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:1105, offset: 0x0232bfd4, size: 490 bytes, params: 2, frame: 26
const styles = useStyles();
const value3 = (UseTheme)();
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'ChannelScreenAnimatedFrame'}]).chatInputFloating;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ChannelScreenAnimatedFrameE2 = ChannelScreenAnimatedFrameE;
object = {translateX: translateX, maxWidth: maxWidth, isChatLockedOpen: isChatLockedOpen};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
const SIDE_PANEL_CLOSE_DURATION_MS = (PanelsConfigModule).SIDE_PANEL_CLOSE_DURATION_MS;
object.SIDE_PANEL_CLOSE_DURATION_MS = SIDE_PANEL_CLOSE_DURATION_MS;
const SIDE_PANEL_OPEN_DURATION_MS = (PanelsConfigModule).SIDE_PANEL_OPEN_DURATION_MS;
object.SIDE_PANEL_OPEN_DURATION_MS = SIDE_PANEL_OPEN_DURATION_MS;
ChannelScreenAnimatedFrameE2.__closure = object;
ChannelScreenAnimatedFrameE2.__workletHash = 9063010717249;
ChannelScreenAnimatedFrameE2.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ChannelScreenAnimatedFrameE2]);
const value5 = (ClientThemesOverridesModule).useGradientTop();
const View2 = (ReanimatedRexport).View;
const items2 = [styles.container];
items2[1] = styles.splitDivider;
items2[2] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainer;
items2[3] = value5;
items2[4] = value4;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
return (
<View2 pointerEvents="none" style={items2}>
<SafeAreaPaddingView top />
<View style={styles.additionalHeight} />
</View2>
);
function ChannelScreenAnimatedFrameE() { // fn#108732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:1353, owner: ChannelScreenAnimatedFrame.E, offset: 0x0232c1be, size: 157 bytes, params: 1, frame: 20
let r5 = translateX.get() === maxWidth || isChatLockedOpen;
let value = environment.__proto__;
const withTiming = TimingModule.withTiming;
const r2 = r5 ? 0 : 1;
const object2 = {};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object2.easing = STANDARD_EASING;
value = require(14365) /* metro dependency 14365: PanelsConfig */;
r5 = r5 ? value.SIDE_PANEL_CLOSE_DURATION_MS : value.SIDE_PANEL_OPEN_DURATION_MS;
object2.duration = r5;
return {opacity: Reflect.apply(withTiming, TimingModule, [r2, object2])};
}
}
}
function ChannelScreenAnimatedFrame({translateX, maxWidth, isChatLockedOpen}) { // fn#108731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:1105, offset: 0x0232bfd4, size: 490 bytes, params: 2, frame: 26
var object2;
const styles = useStyles();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChannelScreenAnimatedFrame'}]).chatInputFloating;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ChannelScreenAnimatedFrameE;
object2 = {translateX: translateX, maxWidth: maxWidth, isChatLockedOpen: isChatLockedOpen};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
const SIDE_PANEL_CLOSE_DURATION_MS = (require(14365) /* metro dependency 14365: PanelsConfig */).SIDE_PANEL_CLOSE_DURATION_MS;
object2.SIDE_PANEL_CLOSE_DURATION_MS = SIDE_PANEL_CLOSE_DURATION_MS;
const SIDE_PANEL_OPEN_DURATION_MS = (require(14365) /* metro dependency 14365: PanelsConfig */).SIDE_PANEL_OPEN_DURATION_MS;
object2.SIDE_PANEL_OPEN_DURATION_MS = SIDE_PANEL_OPEN_DURATION_MS;
closure.__closure = object2;
closure.__workletHash = 9063010717249;
closure.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value5 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container];
items2[1] = styles.splitDivider;
items2[2] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainer;
items2[3] = value5;
items2[4] = value4;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
return (
<View2 pointerEvents="none" style={items2}>
<SafeAreaPaddingView top />
<View style={styles.additionalHeight} />
</View2>
);
}
function ChannelScreenAnimatedFrameE() { // fn#108732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:1353, owner: ChannelScreenAnimatedFrame.E, offset: 0x0232c1be, size: 157 bytes, params: 1, frame: 20
let r5 = translateX.get() === maxWidth || isChatLockedOpen;
let value = environment.__proto__;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const r2 = r5 ? 0 : 1;
const object = {};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object.easing = STANDARD_EASING;
value = require(14365) /* metro dependency 14365: PanelsConfig */;
r5 = r5 ? value.SIDE_PANEL_CLOSE_DURATION_MS : value.SIDE_PANEL_OPEN_DURATION_MS;
object.duration = r5;
return {opacity: Reflect.apply(withTiming, timingModule, [r2, object])};
}
global.__d(_fun108730, 14367, [31, 27, 9604, 661, 33, 4501, 697, 4048, 1357, 4017, 4504, 1305, 14365, 7701, 6618,
2]) /* metro module 14367, dependencies: [31, 27, 9604, 661, 33, 4501, 697, 4048, 1357, 4017, 4504, 1305, 14365, 7701, 6618, 2] */;
@@ -1,4 +1,32 @@
/* Metro module 14956; source: modules/main_tabs_v2/native/panels/MainTabsChannelScreenStack.tsx; dependencies: [57, 31, 27, 9604, 661, 482, 33, 4501, 14957, 4017, 4594, 4048, 1357, 14958, 4508, 4018, 4521, 14959, 1485, 14364, 4015, 14368, 5321, 4003, 14363, 4010, 694, 4016, 3868, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseColorThemeBackground from '../../../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
import REAWorkaroundView from '../../../reanimated/native/REAWorkaroundView.tsx'; /* Metro dependency 4018 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import UseMainTabsPanelsGesture from './useMainTabsPanelsGesture.tsx'; /* Metro dependency 14364 */
import MainTabsNavigatorPanelContext from './MainTabsNavigatorPanelContext.tsx'; /* Metro dependency 14368 */
import HideCoveredChannelsExperiment from '../HideCoveredChannelsExperiment.tsx'; /* Metro dependency 14957 */
import StandaloneChannelScreen from '../channel/StandaloneChannelScreen.tsx'; /* Metro dependency 14959 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as Module01485Module from '../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as ScreenIndexFrozenModule from '../../../channel/native/ScreenIndexFrozen.tsx'; /* Metro dependency 4016 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as FreezeModule from '../../../../by-id/module-04521-Freeze.jsx'; /* Metro dependency 4521 */
import * as UseMountEffectModule from '../../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as MainTabsV2ConstantsModule from '../shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
import * as UseChannelScreensFromNavigationModule from './useChannelScreensFromNavigation.tsx'; /* Metro dependency 14363 */
import * as MainTabsNavigatorPanelContextModule from './MainTabsNavigatorPanelContext.tsx'; /* Metro dependency 14368 */
import * as UseMainTabsChannelScreenStylesModule from './useMainTabsChannelScreenStyles.tsx'; /* Metro dependency 14958 */
function _fun113107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6, offset: 0x023e9123, size: 526 bytes, params: 8, frame: 22
const env0_0 = require;
const getKey_113113 = function(a0) {
@@ -7,22 +35,13 @@ function _fun113107(global, require, importDefault, importAll, module, exports,
};
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 value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.NativeModules;
const env0_6 = value2.StyleSheet;
const env0_7 = value2.View;
const MIDNIGHT_BORDER_WIDTH = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIDNIGHT_BORDER_WIDTH;
const constantsModule = require(661) /* metro dependency 661: Constants */;
let value = ReactModule;
const MIDNIGHT_BORDER_WIDTH = (MainTabsV2ConstantsModule).MIDNIGHT_BORDER_WIDTH;
const constantsModule = ConstantsModule2;
const env0_8 = constantsModule.AnalyticsObjectTypes;
const env0_9 = constantsModule.AnalyticsObjects;
const env0_10 = constantsModule.AnalyticsSections;
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_12 = value4.jsx;
const env0_13 = value4.jsxs;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({midnightContainerStyles: {marginTop: -MIDNIGHT_BORDER_WIDTH,
const env0_14 = (CreateStylesModule).createStyles({midnightContainerStyles: {marginTop: -MIDNIGHT_BORDER_WIDTH,
marginLeft: -MIDNIGHT_BORDER_WIDTH}});
object = {code: 'function MainTabsChannelScreenStackTsx1(){const{translateX}=this.__closure;return translateX.get()>0;}'};
object = {code: 'function MainTabsChannelScreenStackTsx2(isVisibleBeneath,wasVisibleBeneath){const{highestFullyRenderedScreenIndex,index}=this.__closure;if(isVisibleBeneath===wasVisibleBeneath)return;if(isVisibleBeneath){if(highestFullyRenderedScreenIndex.get()>=index){highestFullyRenderedScreenIndex.set(index-1);}return;}if(highestFullyRenderedScreenIndex.get()<index){highestFullyRenderedScreenIndex.set(index);}}'};
@@ -34,190 +53,277 @@ function _fun113107(global, require, importDefault, importAll, module, exports,
object = {code: 'function MainTabsChannelScreenStackTsx6(){const{translateX,maxWidth}=this.__closure;return translateX.get()===maxWidth;}'};
object = {code: 'function MainTabsChannelScreenStackTsx7(value,prev){const{runOnJS,setIsHidden}=this.__closure;if(value===prev)return;runOnJS(setIsHidden)(value);}'};
value = value.memo(MainTabsChannelScreenStack);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsChannelScreenStack.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsChannelScreenStack.tsx');
exports.default = value;
}
function useIsCompletelyCovered(a0, a1, a2) { // fn#113108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1114, offset: 0x023e9331, size: 310 bytes, params: 4, frame: 24
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const defaultImport = importDefault(14957) /* metro dependency 14957: HideCoveredChannelsExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'MainTabsChannelScreenStack'}]).enabled;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = useIsCompletelyCoveredC;
closure.__closure = {translateX: a2};
closure.__workletHash = 10608377273080;
closure.__initData = env0_15;
const closure2 = useIsCompletelyCoveredL;
closure2.__closure = {highestFullyRenderedScreenIndex: a1, index: a0};
closure2.__workletHash = 10137919010401;
closure2.__initData = env0_16;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun113111);
const moduleValue3 = reanimatedRexportModule;
const useDerivedValue = moduleValue3.useDerivedValue;
closure = useIsCompletelyCoveredU;
closure.__closure = {enabled: enabled, highestFullyRenderedScreenIndex: a1, index: a0};
closure.__workletHash = 1648562234730;
closure.__initData = env0_17;
return Reflect.apply(useDerivedValue, moduleValue3, [closure]);
}
function FirstChannelScreen({guildId, channelId, showCreateThread, frame, index, freeze, isDragging, translateX, containerWidth, isActive, maxWidth, focusChatPressableComponent, transitionState, cleanup, parentFreezeValue, highestFullyRenderedScreenIndex}) { // fn#113114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1782, offset: 0x023e9548, size: 571 bytes, params: 2, frame: 40
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const styles = useStyles();
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'MainTabsChannelScreenStack'}]).chatInputFloating;
const value5 = (require(14958) /* metro dependency 14958: useMainTabsChannelScreenStyles */).useMainTabsChannelScreenStyles(isDragging,
translateX, maxWidth, useIsCompletelyCovered(index, highestFullyRenderedScreenIndex, translateX),
parentFreezeValue);
env0_4.useEffect(function() {
if (transitionState === require(dependencyMap[14]).TransitionStates.YEETED) {
cleanup();
function useIsCompletelyCovered(a0, a1, a2) { // fn#113108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1114, offset: 0x023e9331, size: 310 bytes, params: 4, frame: 24
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const defaultImport = HideCoveredChannelsExperiment;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'MainTabsChannelScreenStack'}]).enabled;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
let closure = useIsCompletelyCoveredC;
closure.__closure = {translateX: a2};
closure.__workletHash = 10608377273080;
closure.__initData = env0_15;
const useIsCompletelyCoveredL2 = useIsCompletelyCoveredL;
useIsCompletelyCoveredL2.__closure = {highestFullyRenderedScreenIndex: a1, index: a0};
useIsCompletelyCoveredL2.__workletHash = 10137919010401;
useIsCompletelyCoveredL2.__initData = env0_16;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useIsCompletelyCoveredL2]);
(UseMountEffectModule).useUnmountEffect(_fun113111);
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = useIsCompletelyCoveredU;
closure.__closure = {enabled: enabled, highestFullyRenderedScreenIndex: a1, index: a0};
closure.__workletHash = 1648562234730;
closure.__initData = env0_17;
return Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
function useIsCompletelyCoveredC() { // fn#113109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1271, owner: useIsCompletelyCovered.c, offset: 0x023e9467, size: 24 bytes, params: 1, frame: 9
return importDefault.get() > 0;
}
}, [cleanup, transitionState]);
const REAWorkaroundView = importDefault(4018) /* metro dependency 4018: REAWorkaroundView */;
const items2 = [value5];
items2[1] = containerWidth != null ? {width: containerWidth} : null;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
items2[2] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainerStyles;
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
const viewBindingProps = {collapsable: false, style: StyleSheet.absoluteFill,
pointerEvents: isActive ? 'auto' : 'box-only', accessibilityElementsHidden: isActive ? undefined : !isActive,
importantForAccessibility: isActive ? undefined : 'no-hide-descendants'};
let value = importDefault(14959) /* metro dependency 14959: StandaloneChannelScreen */;
value = <Freeze freeze={freeze}><View {...viewBindingProps}>{((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread} isNavigationScreen={containerWidth == null} frame={frame} screenIndex={index} />)(value)}</View></Freeze>;
return (
<REAWorkaroundView style={items2}>
{value}
{focusChatPressableComponent}
</REAWorkaroundView>
);
}
function ChannelScreen({guildId, channelId, showCreateThread, transitionState, cleanup, isActive, freeze, parentFreezeValue, index, highestFullyRenderedScreenIndex}) { // fn#113116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3121, offset: 0x023e97bd, size: 907 bytes, params: 2, frame: 46
var object2;
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const styles = useStyles();
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'MainTabsChannelScreenStack'}]).chatInputFloating;
const value4 = (require(1485) /* metro dependency 1485 */).useNavigation();
const binding = env0_4;
var env0_4 = binding.useRef(false);
const value5 = binding.useCallback(_fun113117, [cleanup, value4]);
const defaultImport = importDefault(14364) /* metro dependency 14364: useMainTabsPanelsGesture */;
object2 = {};
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
object2.canDrag = transitionState !== YEETED;
object2.onVisibilityChange = value5;
object2.onDragStart = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
object2.startShown = false;
const {gesture, panelGestureContext, isDragging, translateX, movePanel, maxWidth} = defaultImport(object2);
const value7 = useIsCompletelyCovered(index, highestFullyRenderedScreenIndex, translateX);
const useContext = binding.useContext;
const disallowGesture = Reflect.apply(useContext, binding,
[importDefault(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */]).disallowGesture;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = ChannelScreenV;
closure.__closure = {translateX: translateX};
closure.__workletHash = 1803281708382;
closure.__initData = env0_19;
const closure2 = ChannelScreenY;
closure2.__closure = {index: index, mainTabsDisallowGesture: disallowGesture};
closure2.__workletHash = 4369586160197;
closure2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const env0_8 = binding.useRef({cleanup: cleanup, movePanel: movePanel});
binding.useEffect(_fun113120);
binding.useEffect(_fun113121, [transitionState]);
const value8 = (require(14958) /* metro dependency 14958: useMainTabsChannelScreenStyles */).useMainTabsChannelScreenStyles(isDragging,
translateX, maxWidth, value7, parentFreezeValue);
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const MainTabsChannelScreenStackContext = (require(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */).MainTabsChannelScreenStackContext;
const Provider = MainTabsChannelScreenStackContext.Provider;
const REAWorkaroundView = importDefault(4018) /* metro dependency 4018: REAWorkaroundView */;
const items2 = [value8];
const MIDNIGHT = ThemeTypes.MIDNIGHT;
items2[1] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainerStyles;
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
return (
<GestureDetector gesture={gesture}>
<Provider value={panelGestureContext}>
<REAWorkaroundView
style={items2}
accessibilityElementsHidden={isActive ? undefined : !isActive}
importantForAccessibility={isActive ? undefined : 'no-hide-descendants'}
>
<Freeze freeze={freeze}>
{((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread} isNavigationScreen frame={null} screenIndex={index} />)(importDefault(14959) /* metro dependency 14959: StandaloneChannelScreen */)}
function useIsCompletelyCoveredL(a0, a1) { // fn#113110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1363, owner: useIsCompletelyCovered.l, offset: 0x023e947f, size: 90 bytes, params: 3, frame: 14
var value2;
var binding;
if (a0 !== a1) {
value2 = require.get();
binding = env0_0;
if (a0) {
if (value2 >= binding) {
require.set(env0_0 - 1);
}
} else if (value2 < binding) {
require.set(env0_0);
}
}
}
function _fun113111() { // fn#113111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1563, offset: 0x023e94d9, size: 53 bytes, params: 1, frame: 12
if (require.get() >= env0_0) {
require.set(env0_0 - 1);
}
}
function useIsCompletelyCoveredU() { // fn#113112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1622, owner: useIsCompletelyCovered.u, offset: 0x023e950e, size: 33 bytes, params: 1, frame: 11
return enabled && require.get() > env0_0;
}
}
function FirstChannelScreen({guildId, channelId, showCreateThread, frame, index, freeze, isDragging, translateX, containerWidth, isActive, maxWidth, focusChatPressableComponent, transitionState, cleanup, parentFreezeValue, highestFullyRenderedScreenIndex}) { // fn#113114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1782, offset: 0x023e9548, size: 571 bytes, params: 2, frame: 40
const value3 = (UseTheme)();
const styles = useStyles();
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'MainTabsChannelScreenStack'}]).chatInputFloating;
const value5 = (UseMainTabsChannelScreenStylesModule).useMainTabsChannelScreenStyles(isDragging,
translateX, maxWidth, useIsCompletelyCovered(index, highestFullyRenderedScreenIndex, translateX),
parentFreezeValue);
env0_4.useEffect(function() {
if (transitionState === require(dependencyMap[14]).TransitionStates.YEETED) {
cleanup();
}
}, [cleanup, transitionState]);
const items2 = [value5];
items2[1] = containerWidth != null ? {width: containerWidth} : null;
const MIDNIGHT = ThemeTypes.MIDNIGHT;
items2[2] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainerStyles;
const Freeze = (FreezeModule).Freeze;
const viewBindingProps = {collapsable: false, style: StyleSheet.absoluteFill,
pointerEvents: isActive ? 'auto' : 'box-only', accessibilityElementsHidden: isActive ? undefined : !isActive,
importantForAccessibility: isActive ? undefined : 'no-hide-descendants'};
let value = StandaloneChannelScreen;
value = (
<Freeze freeze={freeze}>
<View {...viewBindingProps}>
{((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread} isNavigationScreen={containerWidth == null} frame={frame} screenIndex={index} />)(value)}
</View>
</Freeze>
);
return (
<REAWorkaroundView style={items2}>
{value}
{focusChatPressableComponent}
</REAWorkaroundView>
);
}
function ChannelScreen({guildId, channelId, showCreateThread, transitionState, cleanup, isActive, freeze, parentFreezeValue, index, highestFullyRenderedScreenIndex}) { // fn#113116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3121, offset: 0x023e97bd, size: 907 bytes, params: 2, frame: 46
const value3 = (UseTheme)();
const styles = useStyles();
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'MainTabsChannelScreenStack'}]).chatInputFloating;
const value4 = (Module01485Module).useNavigation();
const binding = env0_4;
var env0_4 = binding.useRef(false);
const value5 = binding.useCallback(_fun113117, [cleanup, value4]);
const defaultImport = UseMainTabsPanelsGesture;
object = {};
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
object.canDrag = transitionState !== YEETED;
object.onVisibilityChange = value5;
object.onDragStart = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
object.startShown = false;
const {gesture, panelGestureContext, isDragging, translateX, movePanel, maxWidth} = defaultImport(object);
const value7 = useIsCompletelyCovered(index, highestFullyRenderedScreenIndex, translateX);
const useContext = binding.useContext;
const disallowGesture = Reflect.apply(useContext, binding,
[MainTabsNavigatorPanelContext]).disallowGesture;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const ChannelScreenV2 = ChannelScreenV;
ChannelScreenV2.__closure = {translateX: translateX};
ChannelScreenV2.__workletHash = 1803281708382;
ChannelScreenV2.__initData = env0_19;
const ChannelScreenY2 = ChannelScreenY;
ChannelScreenY2.__closure = {index: index, mainTabsDisallowGesture: disallowGesture};
ChannelScreenY2.__workletHash = 4369586160197;
ChannelScreenY2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [ChannelScreenV2, ChannelScreenY2]);
const env0_8 = binding.useRef({cleanup: cleanup, movePanel: movePanel});
binding.useEffect(_fun113120);
binding.useEffect(_fun113121, [transitionState]);
const value8 = (UseMainTabsChannelScreenStylesModule).useMainTabsChannelScreenStyles(isDragging,
translateX, maxWidth, value7, parentFreezeValue);
const GestureDetector = (Module05321Module).GestureDetector;
const MainTabsChannelScreenStackContext = (MainTabsNavigatorPanelContextModule).MainTabsChannelScreenStackContext;
const Provider = MainTabsChannelScreenStackContext.Provider;
const items2 = [value8];
const MIDNIGHT = ThemeTypes.MIDNIGHT;
items2[1] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainerStyles;
const Freeze = (FreezeModule).Freeze;
return (
<GestureDetector gesture={gesture}>
<Provider value={panelGestureContext}>
<REAWorkaroundView
style={items2}
accessibilityElementsHidden={isActive ? undefined : !isActive}
importantForAccessibility={isActive ? undefined : 'no-hide-descendants'}
>
<Freeze freeze={freeze}>
{((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread} isNavigationScreen frame={null} screenIndex={index} />)(importDefault(14959) /* metro dependency 14959: StandaloneChannelScreen */)}
</Freeze>
</REAWorkaroundView>
</Provider>
</GestureDetector>
);
function _fun113117(a0) { // fn#113117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3483, offset: 0x023e9b48, size: 63 bytes, params: 2, frame: 10
if (!a0) {
if (env0_4.current) {
cleanup();
} else {
env0_4.current = true;
Module00057.goBack();
}
}
}
function ChannelScreenV() { // fn#113118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3870, owner: ChannelScreen.v, offset: 0x023e9b87, size: 24 bytes, params: 1, frame: 9
return translateX.get() === 0;
}
function ChannelScreenY(a0, a1) { // fn#113119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3964, owner: ChannelScreen.y, offset: 0x023e9b9f, size: 51 bytes, params: 3, frame: 12
if (a0 !== a1 && index === 1) {
disallowGesture.set(a0);
}
}
function _fun113120() { // fn#113120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:4155, offset: 0x01df0b6c, size: 21 bytes, params: 1, frame: 2
env0_8.current = ReactNativeModule.View;
}
function _fun113121() { // fn#113121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:4188, offset: 0x023e9bd2, size: 168 bytes, params: 1, frame: 20
const {cleanup, movePanel} = env0_8.current;
const transitionStateBinding = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
if (transitionStateBinding === MOUNTED) {
movePanel(true, false, 0, false);
} else if (transitionState !== TransitionStates.ENTERED) {
if (env0_4.current) {
cleanup();
} else {
env0_4.current = true;
movePanel(false, false, 0, true);
}
} else {
movePanel(true, false, 0, false);
}
}
}
function MainTabsChannelScreenStack({screens, screenStackActive, translateX, isDragging, maxWidth, highestFullyRenderedScreenIndex, shouldFreeze, focusChatPressableComponent, firstScreenWidth, firstScreenFrame}) { // fn#113122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5237, offset: 0x023e9c7a, size: 989 bytes, params: 2, frame: 35
var r7;
var r0;
const Freeze = (FreezeModule).Freeze;
const isDragging2 = isDragging;
const maxWidth2 = maxWidth;
let value = undefined;
const value3 = (UseColorThemeBackground)();
let binding = maxWidth2;
const useState = binding.useState;
const get = translateX.get;
const isDragging22 = isDragging2(Reflect.apply(useState, binding, [Reflect.apply(get, translateX,
[]) === maxWidth]), 2);
const property = isDragging22[0];
const property2 = isDragging22[1];
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return translateX.get() === maxWidth;
};
closure.__closure = {translateX: translateX, maxWidth: maxWidth};
closure.__workletHash = 9963940499904;
closure.__initData = env0_22;
const MainTabsChannelScreenStackD2 = MainTabsChannelScreenStackD;
MainTabsChannelScreenStackD2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, setIsHidden: property2};
MainTabsChannelScreenStackD2.__workletHash = 10167608718442;
MainTabsChannelScreenStackD2.__initData = env0_23;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, MainTabsChannelScreenStackD2]);
const value6 = binding.useMemo(_fun113125, [screens]);
let useEffect = binding.useEffect;
Reflect.apply(useEffect, binding, [_fun113126, [value6]]);
const property3 = screens[0];
const r5 = shouldFreeze && property && (property3 == null || property3.type !== (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType.DEFAULT);
const value9 = ReanimatedRexportModule.useSharedValue(0);
binding = maxWidth2;
binding.useEffect(function() {
var env0_0 = global.setTimeout(_fun113128, 10);
return _fun113129;
}, [r5, value9]);
const value10 = binding.useCallback(_fun113130, [screens.length, focusChatPressableComponent, isDragging,
translateX, firstScreenWidth, firstScreenFrame, maxWidth, value9, screenStackActive,
highestFullyRenderedScreenIndex]);
const env0_12 = binding.useRef((property3 == null ? value : property3.channelId) ?? null);
binding = maxWidth2;
const env0_13 = binding.useRef(null);
useEffect = binding.useEffect;
object = [property3 == null ? value : property3.type];
object[1] = property3 == null ? value : property3.channelId;
Reflect.apply(useEffect, binding, [_fun113131, object]);
(ScreenIndexFrozenModule).freezeScreenIndex(r5, 0);
if (r5) {
if (property3 == null ? value : property3.showCreateThread) {
r0 = null;
} else {
object = {freeze: r5};
var viewBindingProps = {'collapsable': false, 'style': null, 'pointerEvents': 'box-none',
style: StyleSheet.absoluteFill};
r7 = screenStackActive ? value : !screenStackActive;
viewBindingProps.accessibilityElementsHidden = r7;
r7 = screenStackActive ? value : 'no-hide-descendants';
viewBindingProps.importantForAccessibility = r7;
value = (
<Freeze {...object}>
<View {...viewBindingProps}>
{((ThemeContextProvider) => <ThemeContextProvider gradient={value3}>{((TransitionGroup) => <TransitionGroup items={screens} renderItem={value10} getItemKey={getKey_113113} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup)}</ThemeContextProvider>)((require(3868) /* metro dependency 3868: native */).ThemeContextProvider)}
</View>
</Freeze>
</REAWorkaroundView>
</Provider>
</GestureDetector>
);
}
function MainTabsChannelScreenStack({screens, screenStackActive, translateX, isDragging, maxWidth, highestFullyRenderedScreenIndex, shouldFreeze, focusChatPressableComponent, firstScreenWidth, firstScreenFrame}) { // fn#113122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5237, offset: 0x023e9c7a, size: 989 bytes, params: 2, frame: 35
var r7;
var r0;
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
const env0_3 = isDragging;
const env0_4 = maxWidth;
let value = undefined;
const value3 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
let binding = env0_4;
const useState = binding.useState;
const get = translateX.get;
const value5 = env0_3(Reflect.apply(useState, binding, [Reflect.apply(get, translateX, []) === maxWidth]), 2);
const property = value5[0];
const property2 = value5[1];
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return translateX.get() === maxWidth;
};
closure.__closure = {translateX: translateX, maxWidth: maxWidth};
closure.__workletHash = 9963940499904;
closure.__initData = env0_22;
const closure2 = MainTabsChannelScreenStackD;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsHidden: property2};
closure2.__workletHash = 10167608718442;
closure2.__initData = env0_23;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value6 = binding.useMemo(_fun113125, [screens]);
let useEffect = binding.useEffect;
Reflect.apply(useEffect, binding, [_fun113126, [value6]]);
const property3 = screens[0];
const r5 = shouldFreeze && property && (property3 == null || property3.type !== (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType.DEFAULT);
const value9 = reanimatedRexportModule.useSharedValue(0);
binding = env0_4;
binding.useEffect(function() {
var env0_0 = global.setTimeout(_fun113128, 10);
return _fun113129;
}, [r5, value9]);
const value10 = binding.useCallback(_fun113130, [screens.length, focusChatPressableComponent, isDragging,
translateX, firstScreenWidth, firstScreenFrame, maxWidth, value9, screenStackActive,
highestFullyRenderedScreenIndex]);
const env0_12 = binding.useRef((property3 == null ? value : property3.channelId) ?? null);
binding = env0_4;
const env0_13 = binding.useRef(null);
useEffect = binding.useEffect;
object = [property3 == null ? value : property3.type];
object[1] = property3 == null ? value : property3.channelId;
Reflect.apply(useEffect, binding, [_fun113131, object]);
(require(4016) /* metro dependency 4016: ScreenIndexFrozen */).freezeScreenIndex(r5, 0);
if (r5) {
if (property3 == null ? value : property3.showCreateThread) {
r0 = null;
);
r0 = value;
}
} else {
object = {freeze: r5};
var viewBindingProps = {'collapsable': false, 'style': null, 'pointerEvents': 'box-none',
@@ -226,206 +332,140 @@ function MainTabsChannelScreenStack({screens, screenStackActive, translateX, isD
viewBindingProps.accessibilityElementsHidden = r7;
r7 = screenStackActive ? value : 'no-hide-descendants';
viewBindingProps.importantForAccessibility = r7;
value = <Freeze {...object}><View {...viewBindingProps}>{((ThemeContextProvider) => <ThemeContextProvider gradient={value3}>{((TransitionGroup) => <TransitionGroup items={screens} renderItem={value10} getItemKey={getKey_113113} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup)}</ThemeContextProvider>)((require(3868) /* metro dependency 3868: native */).ThemeContextProvider)}</View></Freeze>;
value = (
<Freeze {...object}>
<View {...viewBindingProps}>
{((ThemeContextProvider) => <ThemeContextProvider gradient={value3}>{((TransitionGroup) => <TransitionGroup items={screens} renderItem={value10} getItemKey={getKey_113113} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup)}</ThemeContextProvider>)((require(3868) /* metro dependency 3868: native */).ThemeContextProvider)}
</View>
</Freeze>
);
r0 = value;
}
} else {
object = {freeze: r5};
var viewBindingProps = {'collapsable': false, 'style': null, 'pointerEvents': 'box-none',
style: StyleSheet.absoluteFill};
r7 = screenStackActive ? value : !screenStackActive;
viewBindingProps.accessibilityElementsHidden = r7;
r7 = screenStackActive ? value : 'no-hide-descendants';
viewBindingProps.importantForAccessibility = r7;
value = <Freeze {...object}><View {...viewBindingProps}>{((ThemeContextProvider) => <ThemeContextProvider gradient={value3}>{((TransitionGroup) => <TransitionGroup items={screens} renderItem={value10} getItemKey={getKey_113113} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup)}</ThemeContextProvider>)((require(3868) /* metro dependency 3868: native */).ThemeContextProvider)}</View></Freeze>;
r0 = value;
}
return r0;
}
function useIsCompletelyCoveredC() { // fn#113109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1271, owner: useIsCompletelyCovered.c, offset: 0x023e9467, size: 24 bytes, params: 1, frame: 9
return importDefault.get() > 0;
}
function useIsCompletelyCoveredL(a0, a1) { // fn#113110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1363, owner: useIsCompletelyCovered.l, offset: 0x023e947f, size: 90 bytes, params: 3, frame: 14
var value2;
var binding;
if (a0 !== a1) {
value2 = require.get();
binding = env0_0;
if (a0) {
if (value2 >= binding) {
require.set(env0_0 - 1);
return r0;
function MainTabsChannelScreenStackD(a0, a1) { // fn#113124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5669, owner: MainTabsChannelScreenStack.D, offset: 0x023ea071, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_9)(a0);
}
} else if (value2 < binding) {
require.set(env0_0);
}
}
}
function _fun113111() { // fn#113111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1563, offset: 0x023e94d9, size: 53 bytes, params: 1, frame: 12
if (require.get() >= env0_0) {
require.set(env0_0 - 1);
}
}
function useIsCompletelyCoveredU() { // fn#113112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1622, owner: useIsCompletelyCovered.u, offset: 0x023e950e, size: 33 bytes, params: 1, frame: 11
return enabled && require.get() > env0_0;
}
function _fun113117(a0) { // fn#113117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3483, offset: 0x023e9b48, size: 63 bytes, params: 2, frame: 10
if (!a0) {
if (env0_4.current) {
cleanup();
} else {
env0_4.current = true;
env0_3.goBack();
function _fun113125() { // fn#113125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5830, offset: 0x023ea0ae, size: 90 bytes, params: 1, frame: 15
const value = screens.at(-1);
const value2 = null;
const type = value2 == value ? undefined : value.type;
const ChannelScreenType = (UseChannelScreensFromNavigationModule).ChannelScreenType;
const DEFAULT = ChannelScreenType.DEFAULT;
return type !== DEFAULT ? value2 : value.channelId;
}
}
}
function ChannelScreenV() { // fn#113118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3870, owner: ChannelScreen.v, offset: 0x023e9b87, size: 24 bytes, params: 1, frame: 9
return translateX.get() === 0;
}
function ChannelScreenY(a0, a1) { // fn#113119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3964, owner: ChannelScreen.y, offset: 0x023e9b9f, size: 51 bytes, params: 3, frame: 12
if (a0 !== a1 && index === 1) {
disallowGesture.set(a0);
}
}
function _fun113121() { // fn#113121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:4188, offset: 0x023e9bd2, size: 168 bytes, params: 1, frame: 20
const {cleanup, movePanel} = env0_8.current;
const transitionStateBinding = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
if (transitionStateBinding === MOUNTED) {
movePanel(true, false, 0, false);
} else if (transitionState !== TransitionStates.ENTERED) {
if (env0_4.current) {
cleanup();
} else {
env0_4.current = true;
movePanel(false, false, 0, true);
function _fun113126() { // fn#113126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5954, offset: 0x023ea108, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
const MediaPlayerManager = NativeModules.MediaPlayerManager;
if (!(MediaPlayerManager == null || MediaPlayerManager.pauseAllMediaPlayers == null)) {
MediaPlayerManager.pauseAllMediaPlayers();
}
}
} else {
movePanel(true, false, 0, false);
}
}
function MainTabsChannelScreenStackD(a0, a1) { // fn#113124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5669, owner: MainTabsChannelScreenStack.D, offset: 0x023ea071, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_9)(a0);
}
}
function _fun113127() { // fn#113127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6174, offset: 0x023ea139, size: 41 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun113128, 10);
return _fun113129;
function _fun113128() { // fn#113128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6197, offset: 0x023ea162, size: 41 bytes, params: 1, frame: 12
const value = environment.__proto__;
const binding = env1_11;
binding.set(env1_11.get() + 1);
}
function _fun113125() { // fn#113125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5830, offset: 0x023ea0ae, size: 90 bytes, params: 1, frame: 15
const value = screens.at(-1);
const value2 = null;
const type = value2 == value ? undefined : value.type;
const ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
const DEFAULT = ChannelScreenType.DEFAULT;
return type !== DEFAULT ? value2 : value.channelId;
}
function _fun113129() { // fn#113129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6231, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0);
}
function _fun113126() { // fn#113126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5954, offset: 0x023ea108, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
const MediaPlayerManager = NativeModules.MediaPlayerManager;
if (!(MediaPlayerManager == null || MediaPlayerManager.pauseAllMediaPlayers == null)) {
MediaPlayerManager.pauseAllMediaPlayers();
}
}
}
function _fun113127() { // fn#113127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6174, offset: 0x023ea139, size: 41 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun113128, 10);
return _fun113129;
}
function _fun113130(a0, a1, a2, a3) { // fn#113130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6281, offset: 0x023ea18b, size: 392 bytes, params: 5, frame: 23
var r0;
var value2;
var binding;
var guildId;
var channelId;
var showCreateThread;
var screensBinding;
var length;
var value5;
const Number = global.Number;
let value = Number(a0);
if (value === 0) {
value5 = environment.__proto__;
binding = env1_18;
guildId = a1.guildId;
channelId = a1.channelId;
showCreateThread = a1.showCreateThread;
value = ((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread != null && showCreateThread} focusChatPressableComponent={focusChatPressableComponent} index={value} transitionState={a2} cleanup={a3} isDragging={isDragging} translateX={translateX} isActive={screenStackActive && value === screens.length - 1} freeze={value < screens.length - 2} containerWidth={firstScreenWidth} frame={firstScreenFrame} parentFreezeValue={env0_11} maxWidth={maxWidth} highestFullyRenderedScreenIndex={highestFullyRenderedScreenIndex} key={a0} />)(binding);
r0 = value;
} else {
value2 = environment.__proto__;
binding = env1_21;
var bindingProps = {guildId: a1.guildId, channelId: a1.channelId};
showCreateThread = a1.showCreateThread;
bindingProps.showCreateThread = showCreateThread != null && showCreateThread;
bindingProps.index = value;
bindingProps.transitionState = a2;
bindingProps.parentFreezeValue = env0_11;
bindingProps.cleanup = a3;
screensBinding = screens;
length = screensBinding.length;
bindingProps.isActive = value === length - 1;
length = screensBinding.length;
bindingProps.freeze = value < length - 2;
bindingProps.highestFullyRenderedScreenIndex = highestFullyRenderedScreenIndex;
value = ((Component) => <Component {...bindingProps} key={a0} />)(binding);
r0 = value;
}
return r0;
}
function _fun113131() { // fn#113131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:7010, offset: 0x023ea313, size: 321 bytes, params: 1, frame: 16
var binding;
var binding2;
var value5;
var value6;
var moduleValue;
const value2 = undefined;
let type = env0_10 == null ? value2 : env0_10.type;
let r1 = type != null && env0_13.current !== env0_10.type;
if (r1) {
binding = env0_13;
binding2 = env0_10;
type = binding2.type;
binding.current = type;
if (binding2.channelId === env0_12.current) {
type = env0_10.type;
value5 = environment.__proto__;
value6 = type !== (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType.DEFAULT;
if (value6) {
r1 = value6;
function _fun113130(a0, a1, a2, a3) { // fn#113130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6281, offset: 0x023ea18b, size: 392 bytes, params: 5, frame: 23
var r0;
var value2;
var binding;
var guildId;
var channelId;
var showCreateThread;
var screensBinding;
var length;
var value5;
const Number = global.Number;
let value = Number(a0);
if (value === 0) {
value5 = environment.__proto__;
binding = env1_18;
guildId = a1.guildId;
channelId = a1.channelId;
showCreateThread = a1.showCreateThread;
value = ((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread != null && showCreateThread} focusChatPressableComponent={focusChatPressableComponent} index={value} transitionState={a2} cleanup={a3} isDragging={isDragging} translateX={translateX} isActive={screenStackActive && value === screens.length - 1} freeze={value < screens.length - 2} containerWidth={firstScreenWidth} frame={firstScreenFrame} parentFreezeValue={ConstantsModule.ThemeTypes} maxWidth={maxWidth} highestFullyRenderedScreenIndex={highestFullyRenderedScreenIndex} key={a0} />)(binding);
r0 = value;
} else {
moduleValue = require(4010) /* metro dependency 4010: useChatLayout */;
r1 = moduleValue.getChatLayout().isChatLockedOpen;
value2 = environment.__proto__;
binding = env1_21;
var bindingProps = {guildId: a1.guildId, channelId: a1.channelId};
showCreateThread = a1.showCreateThread;
bindingProps.showCreateThread = showCreateThread != null && showCreateThread;
bindingProps.index = value;
bindingProps.transitionState = a2;
bindingProps.parentFreezeValue = ConstantsModule.ThemeTypes;
bindingProps.cleanup = a3;
screensBinding = screens;
length = screensBinding.length;
bindingProps.isActive = value === length - 1;
length = screensBinding.length;
bindingProps.freeze = value < length - 2;
bindingProps.highestFullyRenderedScreenIndex = highestFullyRenderedScreenIndex;
value = ((Component) => <Component {...bindingProps} key={a0} />)(binding);
r0 = value;
}
if (!r1) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRY_ACK',
location: {section: AnalyticsSections.CHANNEL,
object: AnalyticsObjects.ACK_CHANNEL_SELECT_SAME_CHANNEL_DISPATCH,
objectType: AnalyticsObjectTypes.ACK_AUTOMATIC}, channelId: env0_10.channelId});
}
} else {
env0_12.current = env0_10.channelId;
return r0;
}
function _fun113131() { // fn#113131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:7010, offset: 0x023ea313, size: 321 bytes, params: 1, frame: 16
var binding;
var binding2;
var value5;
var value6;
var moduleValue;
const value2 = undefined;
let type = env0_10 == null ? value2 : env0_10.type;
let r1 = type != null && env0_13.current !== env0_10.type;
if (r1) {
binding = env0_13;
binding2 = env0_10;
type = binding2.type;
binding.current = type;
if (binding2.channelId === env0_12.current) {
type = env0_10.type;
value5 = environment.__proto__;
value6 = type !== (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType.DEFAULT;
if (value6) {
r1 = value6;
} else {
moduleValue = require(4010) /* metro dependency 4010: useChatLayout */;
r1 = moduleValue.getChatLayout().isChatLockedOpen;
}
if (!r1) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRY_ACK',
location: {section: AnalyticsSections.CHANNEL,
object: AnalyticsObjects.ACK_CHANNEL_SELECT_SAME_CHANNEL_DISPATCH,
objectType: AnalyticsObjectTypes.ACK_AUTOMATIC}, channelId: env0_10.channelId});
}
} else {
env0_12.current = env0_10.channelId;
}
}
return value2;
}
}
return value2;
}
function _fun113128() { // fn#113128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6197, offset: 0x023ea162, size: 41 bytes, params: 1, frame: 12
const value = environment.__proto__;
const binding = env1_11;
binding.set(env1_11.get() + 1);
}
global.__d(_fun113107, 14956, [57, 31, 27, 9604, 661, 482, 33, 4501, 14957, 4017, 4594, 4048, 1357, 14958, 4508,
4018, 4521, 14959, 1485, 14364, 4015, 14368, 5321, 4003, 14363, 4010, 694, 4016, 3868,
2]) /* metro module 14956, dependencies: [57, 31, 27, 9604, 661, 482, 33, 4501, 14957, 4017, 4594, 4048, 1357, 14958, 4508, 4018, 4521, 14959, 1485, 14364, 4015, 14368, 5321, 4003, 14363, 4010, 694, 4016, 3868, 2] */;
@@ -1,50 +1,57 @@
/* Metro module 14954; source: modules/main_tabs_v2/native/panels/MainTabsContentScrim.tsx; dependencies: [27, 33, 4501, 697, 4017, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun113102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:6, offset: 0x023e8caa, size: 246 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['zIndex'] = 5;
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
object3['backgroundColor'] = BACKGROUND_SCRIM;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{scrim: object3}]);
object = {code: 'function MainTabsContentScrimTsx1(){const{interpolate,translateX,maxWidth,Extrapolation}=this.__closure;return{opacity:interpolate(translateX.get(),[maxWidth,0],[0,0.5],Extrapolation.CLAMP)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsContentScrim.tsx');
exports.MainTabsContentScrim = MainTabsContentScrim;
}
function MainTabsContentScrim({translateX, maxWidth}) { // fn#113103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:566, offset: 0x023e8da0, size: 223 bytes, params: 2, frame: 22
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = MainTabsContentScrimC;
const StyleSheet = (ReactNativeModule).StyleSheet;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.translateX = translateX;
object2.maxWidth = maxWidth;
const Extrapolation = reanimatedRexportModule.Extrapolation;
object2.Extrapolation = Extrapolation;
closure.__closure = object2;
closure.__workletHash = 7933670426250;
closure.__initData = env0_5;
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View style={[styles.scrim, value2]} pointerEvents="none" />;
}
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['zIndex'] = 5;
const BACKGROUND_SCRIM = (Native).colors.BACKGROUND_SCRIM;
object2['backgroundColor'] = BACKGROUND_SCRIM;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{scrim: object2}]);
object = {code: 'function MainTabsContentScrimTsx1(){const{interpolate,translateX,maxWidth,Extrapolation}=this.__closure;return{opacity:interpolate(translateX.get(),[maxWidth,0],[0,0.5],Extrapolation.CLAMP)};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsContentScrim.tsx');
exports.MainTabsContentScrim = MainTabsContentScrim;
function MainTabsContentScrim({translateX, maxWidth}) { // fn#113103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:566, offset: 0x023e8da0, size: 223 bytes, params: 2, frame: 22
const styles = useStyles();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const MainTabsContentScrimC2 = MainTabsContentScrimC;
const object = {};
object.interpolate = ReanimatedRexportModule.interpolate;
object.translateX = translateX;
object.maxWidth = maxWidth;
const Extrapolation = ReanimatedRexportModule.Extrapolation;
object.Extrapolation = Extrapolation;
MainTabsContentScrimC2.__closure = object;
MainTabsContentScrimC2.__workletHash = 7933670426250;
MainTabsContentScrimC2.__initData = env0_5;
const value2 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [MainTabsContentScrimC2]);
const View = (ReanimatedRexport).View;
return <View style={[styles.scrim, value2]} pointerEvents="none" />;
function MainTabsContentScrimC() { // fn#113104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:666, owner: MainTabsContentScrim.c, offset: 0x023e8e7f, size: 117 bytes, params: 1, frame: 21
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const value3 = translateX.get();
const items2 = [maxWidth, 0];
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return {opacity: Reflect.apply(interpolate, value, [value3, items2, [0, 0.5], CLAMP])};
}
}
function MainTabsContentScrimC() { // fn#113104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:666, owner: MainTabsContentScrim.c, offset: 0x023e8e7f, size: 117 bytes, params: 1, frame: 21
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const value3 = translateX.get();
const items2 = [maxWidth, 0];
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return {opacity: Reflect.apply(interpolate, value, [value3, items2, [0, 0.5], CLAMP])};
}
global.__d(_fun113102, 14954, [27, 33, 4501, 697, 4017,
2]) /* metro module 14954, dependencies: [27, 33, 4501, 697, 4017, 2] */;
@@ -1,397 +1,439 @@
/* Metro module 14361; source: modules/main_tabs_v2/native/panels/MainTabsNavigatorPanel.tsx; dependencies: [57, 31, 27, 661, 33, 3, 4501, 697, 1485, 4010, 11336, 11335, 14362, 4015, 14363, 4008, 4601, 1239, 14364, 4603, 14367, 4017, 5115, 5176, 7703, 14368, 5321, 14369, 14892, 14954, 14955, 14956, 2] */
import Logger from '../../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
import * as ChatInputUtilsModule from '../../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseChannelScreensFromNavigationModule from './useChannelScreensFromNavigation.tsx'; /* Metro dependency 14363 */
function _fun108670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:6, offset: 0x02328ed3, size: 391 bytes, params: 8, frame: 23
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 value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.StyleSheet;
const env0_7 = value2.Pressable;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.ComponentActions;
const env0_9 = constantsModule.ME;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const value7 = new (importDefault(3) /* metro dependency 3: Logger */)('MainTabsNavigatorPanel');
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1},
let value = ReactModule;
const value7 = new (Logger)('MainTabsNavigatorPanel');
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [{container: {flex: 1},
containerBackground: {backgroundColor: BACKGROUND_BASE_LOWEST}, tabsContainer: {flex: 1}}]);
object = {code: 'function MainTabsNavigatorPanelTsx1(){const{translateX,highestFullyRenderedScreenIndex}=this.__closure;return{opacity:translateX.get()>0&&highestFullyRenderedScreenIndex.get()<1?1:0};}'};
value = value.memo(MainTabsNavigatorPanel);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsNavigatorPanel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsNavigatorPanel.tsx');
exports.default = value;
}
function MainTabsNavigatorPanel() { // fn#108671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:626, offset: 0x0232905a, size: 1828 bytes, params: 1, frame: 42
var object2;
var r10;
var value;
const value2 = undefined;
const styles = useStyles();
const value3 = require(dependencyMap[8]).useNavigation();
const {isChatBesideChannelList, isChatLockedOpen} = importDefault(dependencyMap[9])();
const value5 = require(dependencyMap[10]).useDrawerWidth();
const value6 = importDefault(dependencyMap[11])();
let binding = env0_4;
const env0_3 = binding.useRef(isChatLockedOpen);
var env0_4 = binding.useRef(false);
binding.useLayoutEffect(_fun108672, [isChatLockedOpen]);
const value7 = importDefault(dependencyMap[14])(value3);
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, [_fun108673]);
const binding2 = env0_3;
const value9 = binding2(value8, 2);
const value10 = 0;
const property = value9[value10];
const env0_7 = value9[1];
const property2 = value7[value10];
const env0_9 = binding.useRef(property2);
binding.useEffect(_fun108674, [property2]);
const value11 = binding.useCallback(_fun108675, [value3]);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [_fun108676]), 2);
const property3 = value12[value10];
const env0_12 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [_fun108677]), 2);
const property4 = value13[value10];
const env0_13 = value13[1];
binding.useEffect(function() {
var closure = _fun108679;
closure.addListener('state', closure);
return _fun108680;
}, [value3]);
binding.useEffect(_fun108681, [property3]);
const r18 = property4 && isChatBesideChannelList;
const env0_14 = r18;
binding = env0_4;
const env0_15 = binding.useRef(false);
const value14 = binding.useCallback(_fun108682, [value3, value11]);
let closure = _fun108683;
const value15 = binding.useCallback(closure, []);
const value16 = null;
const r1 = value16 != property2 && property2.type !== require(dependencyMap[14]).ChannelScreenType.FALLBACK_RENDERED;
const defaultImport = importDefault(dependencyMap[18]);
object2 = {};
let r15 = r18 && isChatLockedOpen;
r15 = !r15 && r1;
object2.canDrag = r15;
object2.onVisibilityChange = value14;
object2.onDragStart = value15;
const property5 = value7[value10];
const type = value16 == property5 ? value2 : property5.type;
const ChannelScreenType = require(dependencyMap[14]).ChannelScreenType;
const DEFAULT = ChannelScreenType.DEFAULT;
object2.startShown = type === DEFAULT;
object2.openWidth = r18 ? value5 : value2;
const {gesture, panelGestureContext, isDragging, translateX, movePanel, maxWidth,
isDraggingRef} = defaultImport(object2);
binding = env0_4;
binding.useEffect(_fun108684, [r18, value5]);
const env0_22 = binding.useRef({handleExit: value11, maxWidth: maxWidth, movePanel: movePanel, screens: value7,
firstScreen: property2});
binding.useEffect(_fun108685);
binding.useEffect(_fun108686, [value16 == property2 ? value2 : property2.type, translateX, isDraggingRef]);
env0_4.useEffect(_fun108687, [value16 == property2 ? value2 : property2.channelId]);
binding = env0_4;
const value22 = binding.useMemo(_fun108689, [binding.useCallback(_fun108688, [movePanel, r1]), property,
isChatLockedOpen, r18]);
const r29 = r18 && isChatLockedOpen ? value7.length <= 1 : !property;
const value25 = env0_4.useMemo(_fun108690, [isChatLockedOpen, r18, maxWidth, translateX]);
const moduleValue3 = require(dependencyMap[21]);
const useSharedValue = moduleValue3.useSharedValue;
const get = translateX.get;
const value27 = Reflect.apply(useSharedValue, moduleValue3, [Reflect.apply(get, translateX,
[]) > value10 ? -1 : value10]);
const moduleValue4 = require(dependencyMap[21]);
const useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = MainTabsNavigatorPanelSe;
closure.__closure = {translateX: translateX, highestFullyRenderedScreenIndex: value27};
closure.__workletHash = 10839500061449;
closure.__initData = env0_14;
const value28 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const value29 = importDefault(dependencyMap[22])('channel_list_scrim');
const value30 = require(dependencyMap[23]).useYouBarEnabled('MainTabs');
const value31 = require(dependencyMap[24]).useIsCustomThemeActive();
const Provider = importDefault(dependencyMap[25]).Provider;
const GestureDetector = require(dependencyMap[26]).GestureDetector;
const items2 = [styles.container];
items2[1] = !value31 && styles.containerBackground;
const View2 = importDefault(dependencyMap[21]).View;
const items4 = [<View2 style={[styles.tabsContainer,
value28]} accessibilityElementsHidden={r29 ? value2 : !r29} importantForAccessibility={r29 ? value2 : 'no-hide-descendants'}>{((Component) => <Component />)(importDefault(value30 ? dependencyMap[27] : dependencyMap[28]))}{value29 ? ((MainTabsContentScrim) => <MainTabsContentScrim translateX={translateX} maxWidth={maxWidth} />)(require(dependencyMap[29]).MainTabsContentScrim) : value2}</View2>];
items4[1] = ((Component) => <Component />)(importDefault(dependencyMap[30]));
if (value7.length > value10) {
value = importDefault(dependencyMap[31]);
value = ((Component) => <Component screens={value7} screenStackActive={property || r18 && isChatLockedOpen} translateX={translateX} isDragging={isDragging} maxWidth={maxWidth} highestFullyRenderedScreenIndex={value27} shouldFreeze={!r18} focusChatPressableComponent={value22} firstScreenWidth={r18 && isChatLockedOpen ? value6 : value2} firstScreenFrame={value25} />)(value);
r10 = value;
} else {
r10 = value16;
}
items4[2] = r10;
return (
<Provider value={panelGestureContext}>
<GestureDetector gesture={gesture}>
<View style={items2} collapsable={false}>
{items4}
</View>
</GestureDetector>
</Provider>
);
}
function _fun108672() { // fn#108672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:848, offset: 0x0232977e, size: 136 bytes, params: 1, frame: 14
var binding;
var value2;
const current = env0_3.current;
let isChatLockedOpenBinding = isChatLockedOpen;
if (current !== isChatLockedOpenBinding) {
binding = env0_3;
isChatLockedOpenBinding = isChatLockedOpen;
binding.current = isChatLockedOpenBinding;
value2 = environment.__proto__;
if (isChatLockedOpenBinding) {
(require(14362) /* metro dependency 14362: PanelsNavigationUtils */).convertPortraitToLandscapeScreens();
function MainTabsNavigatorPanel() { // fn#108671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:626, offset: 0x0232905a, size: 1828 bytes, params: 1, frame: 42
var r10;
var value;
const value2 = undefined;
const styles = useStyles();
const value3 = require(dependencyMap[8]).useNavigation();
const {isChatBesideChannelList, isChatLockedOpen} = importDefault(dependencyMap[9])();
const value5 = require(dependencyMap[10]).useDrawerWidth();
const value6 = importDefault(dependencyMap[11])();
let binding = env0_4;
const env0_3 = binding.useRef(isChatLockedOpen);
var env0_4 = binding.useRef(false);
binding.useLayoutEffect(_fun108672, [isChatLockedOpen]);
const value7 = importDefault(dependencyMap[14])(value3);
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, [_fun108673]);
const binding2 = env0_3;
const value9 = binding2(value8, 2);
const value10 = 0;
const property = value9[value10];
const env0_7 = value9[1];
const property2 = value7[value10];
const env0_9 = binding.useRef(property2);
binding.useEffect(_fun108674, [property2]);
const value11 = binding.useCallback(_fun108675, [value3]);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [_fun108676]), 2);
const property3 = value12[value10];
const env0_12 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [_fun108677]), 2);
const property4 = value13[value10];
const env0_13 = value13[1];
binding.useEffect(function() {
var closure = _fun108679;
closure.addListener('state', closure);
return _fun108680;
}, [value3]);
binding.useEffect(_fun108681, [property3]);
const r18 = property4 && isChatBesideChannelList;
const env0_14 = r18;
binding = env0_4;
const env0_15 = binding.useRef(false);
const value14 = binding.useCallback(_fun108682, [value3, value11]);
let closure = _fun108683;
const value15 = binding.useCallback(closure, []);
const value16 = null;
const r1 = value16 != property2 && property2.type !== require(dependencyMap[14]).ChannelScreenType.FALLBACK_RENDERED;
const defaultImport = importDefault(dependencyMap[18]);
object = {};
let r15 = r18 && isChatLockedOpen;
r15 = !r15 && r1;
object.canDrag = r15;
object.onVisibilityChange = value14;
object.onDragStart = value15;
const property5 = value7[value10];
const type = value16 == property5 ? value2 : property5.type;
const ChannelScreenType = require(dependencyMap[14]).ChannelScreenType;
const DEFAULT = ChannelScreenType.DEFAULT;
object.startShown = type === DEFAULT;
object.openWidth = r18 ? value5 : value2;
const {gesture, panelGestureContext, isDragging, translateX, movePanel, maxWidth,
isDraggingRef} = defaultImport(object);
binding = env0_4;
binding.useEffect(_fun108684, [r18, value5]);
const env0_22 = binding.useRef({handleExit: value11, maxWidth: maxWidth, movePanel: movePanel, screens: value7,
firstScreen: property2});
binding.useEffect(_fun108685);
binding.useEffect(_fun108686, [value16 == property2 ? value2 : property2.type, translateX, isDraggingRef]);
env0_4.useEffect(_fun108687, [value16 == property2 ? value2 : property2.channelId]);
binding = env0_4;
const value22 = binding.useMemo(_fun108689, [binding.useCallback(_fun108688, [movePanel, r1]), property,
isChatLockedOpen, r18]);
const r29 = r18 && isChatLockedOpen ? value7.length <= 1 : !property;
const value25 = env0_4.useMemo(_fun108690, [isChatLockedOpen, r18, maxWidth, translateX]);
const moduleValue3 = require(dependencyMap[21]);
const useSharedValue = moduleValue3.useSharedValue;
const get = translateX.get;
const value27 = Reflect.apply(useSharedValue, moduleValue3, [Reflect.apply(get, translateX,
[]) > value10 ? -1 : value10]);
const moduleValue4 = require(dependencyMap[21]);
const useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = MainTabsNavigatorPanelSe;
closure.__closure = {translateX: translateX, highestFullyRenderedScreenIndex: value27};
closure.__workletHash = 10839500061449;
closure.__initData = env0_14;
const value28 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const value29 = importDefault(dependencyMap[22])('channel_list_scrim');
const value30 = require(dependencyMap[23]).useYouBarEnabled('MainTabs');
const value31 = require(dependencyMap[24]).useIsCustomThemeActive();
const Provider = importDefault(dependencyMap[25]).Provider;
const GestureDetector = require(dependencyMap[26]).GestureDetector;
const items2 = [styles.container];
items2[1] = !value31 && styles.containerBackground;
const View2 = importDefault(dependencyMap[21]).View;
const items4 = [
<View2
style={[styles.tabsContainer, value28]}
accessibilityElementsHidden={r29 ? value2 : !r29}
importantForAccessibility={r29 ? value2 : 'no-hide-descendants'}
>
{((Component) => <Component />)(importDefault(value30 ? dependencyMap[27] : dependencyMap[28]))}
{
value29
? ((MainTabsContentScrim) => <MainTabsContentScrim translateX={translateX} maxWidth={maxWidth} />)(require(dependencyMap[29]).MainTabsContentScrim)
: value2
}
</View2>,
];
items4[1] = ((Component) => <Component />)(importDefault(dependencyMap[30]));
if (value7.length > value10) {
value = importDefault(dependencyMap[31]);
value = ((Component) => <Component screens={value7} screenStackActive={property || r18 && isChatLockedOpen} translateX={translateX} isDragging={isDragging} maxWidth={maxWidth} highestFullyRenderedScreenIndex={value27} shouldFreeze={!r18} focusChatPressableComponent={value22} firstScreenWidth={r18 && isChatLockedOpen ? value6 : value2} firstScreenFrame={value25} />)(value);
r10 = value;
} else {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
(require(14362) /* metro dependency 14362: PanelsNavigationUtils */).convertLandscapeToPortraitScreens();
r10 = value16;
}
env0_4.current = true;
}
}
function _fun108673() { // fn#108673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1055, offset: 0x02329806, size: 72 bytes, params: 1, frame: 13
const type = env0_5[0]?.type;
const ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
const DEFAULT = ChannelScreenType.DEFAULT;
return type === DEFAULT;
}
function _fun108675() { // fn#108675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1245, offset: 0x0232984e, size: 141 bytes, params: 1, frame: 22
var r5;
var r9;
var r3;
var value5;
var value6;
const value2 = undefined;
env0_7(false);
const state = env0_0.getState();
const index = state.index;
let routes = state.routes;
let property = routes[index];
let name = property == null ? value2 : property.name;
const value4 = 0;
if (name !== 'channel') {
r3 = value4;
} else {
r5 = value4;
r9 = index;
while (true) {
value5 = r5 + 1;
value6 = r9 - 1;
routes = state.routes;
property = routes[value6];
name = property == null ? value2 : property.name;
if (name === 'channel') {
r5 = value5;
r9 = value6;
continue;
}
r3 = value5;
break;
}
}
if (r3 > value4) {
env0_0.pop(r3);
}
return value2;
}
function _fun108676() { // fn#108676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1396, offset: 0x023298db, size: 55 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */;
const isActiveTabsGuilds = value.isActiveTabsGuilds;
const binding = env0_0;
const getState = binding.getState;
return Reflect.apply(isActiveTabsGuilds, value, [Reflect.apply(getState, binding, [])]);
}
function _fun108678() { // fn#108678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1525, offset: 0x02329912, size: 45 bytes, params: 1, frame: 14
env0_0.addListener('state', handleStateChange_108679);
return _fun108680;
}
function _fun108681() { // fn#108681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1723, offset: 0x0232997e, size: 20 bytes, params: 1, frame: 11
env0_13(env0_11);
}
function _fun108682(a0) { // fn#108682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1783, offset: 0x02329992, size: 303 bytes, params: 2, frame: 17
var index;
var name;
var binding;
var getState;
var routes;
var value3;
var rootNavigationRef;
var state;
var state2;
var property;
var moduleValue2;
const value2 = undefined;
env0_7(a0);
env0_15.current = false;
if (a0) {
if (env0_9.current != null) {
binding = env0_0;
getState = binding.getState;
routes = Reflect.apply(getState, binding, []).routes;
getState = binding.getState;
index = Reflect.apply(getState, binding, []).index;
name = routes[index].name;
if (name !== 'channel') {
value3 = environment.__proto__;
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef == null) {
name = value2;
items4[2] = r10;
return (
<Provider value={panelGestureContext}>
<GestureDetector gesture={gesture}>
<View style={items2} collapsable={false}>
{items4}
</View>
</GestureDetector>
</Provider>
);
function _fun108672() { // fn#108672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:848, offset: 0x0232977e, size: 136 bytes, params: 1, frame: 14
var binding;
var value2;
const current = env0_3.current;
let isChatLockedOpenBinding = isChatLockedOpen;
if (current !== isChatLockedOpenBinding) {
binding = env0_3;
isChatLockedOpenBinding = isChatLockedOpen;
binding.current = isChatLockedOpenBinding;
value2 = environment.__proto__;
if (isChatLockedOpenBinding) {
(require(14362) /* metro dependency 14362: PanelsNavigationUtils */).convertPortraitToLandscapeScreens();
} else {
state = rootNavigationRef.getState();
if (state == null) {
name = value2;
} else {
routes = state.routes;
if (rootNavigationRef == null) {
index = value2;
} else {
state2 = rootNavigationRef.getState();
index = state2 == null ? value2 : state2.index;
}
property = routes[index];
name = property == null ? value2 : property.name;
}
}
if (name !== 'modal') {
env0_15.current = true;
moduleValue2 = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue2.transitionToChannel(env0_9.current.channelId);
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
(require(14362) /* metro dependency 14362: PanelsNavigationUtils */).convertLandscapeToPortraitScreens();
}
env0_4.current = true;
}
}
} else {
env0_10();
}
return value2;
}
function _fun108683() { // fn#108683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2163, offset: 0x02329ac1, size: 75 bytes, params: 1, frame: 14
const value = environment.__proto__;
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const BOTTOM_CHANNEL_SCREEN_DRAG_START = ComponentActions.BOTTOM_CHANNEL_SCREEN_DRAG_START;
Reflect.apply(dispatch, ComponentDispatch, [BOTTOM_CHANNEL_SCREEN_DRAG_START]);
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
}
function _fun108673() { // fn#108673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1055, offset: 0x02329806, size: 72 bytes, params: 1, frame: 13
const type = ReactNativeModule.View[0]?.type;
const ChannelScreenType = (UseChannelScreensFromNavigationModule).ChannelScreenType;
const DEFAULT = ChannelScreenType.DEFAULT;
return type === DEFAULT;
}
function _fun108684() { // fn#108684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2633, offset: 0x02329b0c, size: 54 bytes, params: 1, frame: 14
env1_12.log('Chat Layout Changed', {isNavigatorPanelsBesideChannelList: env0_14, drawerWidth: env0_2});
}
function _fun108674() { // fn#108674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1200, offset: 0x01f55925, size: 21 bytes, params: 1, frame: 2
env0_9.current = ConstantsModule.ComponentActions;
}
function _fun108685() { // fn#108685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2829, offset: 0x02329b42, size: 21 bytes, params: 1, frame: 2
env0_22.current = env0_21;
}
function _fun108686() { // fn#108686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2864, offset: 0x02329b57, size: 293 bytes, params: 1, frame: 22
var translateXBinding;
let current = isDraggingRef.current;
if (!current) {
current = env0_22.current;
var handleExit = current.handleExit;
var maxWidth = current.maxWidth;
var movePanel = current.movePanel;
var screens = current.screens;
var value2 = undefined;
var type = env0_8 == null ? value2 : env0_8.type;
var ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
var DEFAULT = ChannelScreenType.DEFAULT;
var value4 = type === DEFAULT;
if (screens.length >= 2) {
translateXBinding = translateX;
translateXBinding.set(value4 ? 0 : maxWidth);
env0_7(value4);
function _fun108675() { // fn#108675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1245, offset: 0x0232984e, size: 141 bytes, params: 1, frame: 22
var r5;
var r9;
var r3;
var value5;
var value6;
const value2 = undefined;
env0_7(false);
const state = env0_0.getState();
const index = state.index;
let routes = state.routes;
let property = routes[index];
let name = property == null ? value2 : property.name;
const value4 = 0;
if (name !== 'channel') {
r3 = value4;
} else {
r5 = value4;
r9 = index;
while (true) {
value5 = r5 + 1;
value6 = r9 - 1;
routes = state.routes;
property = routes[value6];
name = property == null ? value2 : property.name;
if (name === 'channel') {
r5 = value5;
r9 = value6;
continue;
}
r3 = value5;
break;
}
}
if (r3 > value4) {
env0_0.pop(r3);
}
return value2;
}
if (value4) {
if (env0_15.current) {
env0_15.current = false;
translateXBinding = translateX;
if (translateXBinding.get() === maxWidth) {
handleExit();
}
return value2;
function _fun108676() { // fn#108676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1396, offset: 0x023298db, size: 55 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */;
const isActiveTabsGuilds = value.isActiveTabsGuilds;
const binding = env0_0;
const getState = binding.getState;
return Reflect.apply(isActiveTabsGuilds, value, [Reflect.apply(getState, binding, [])]);
}
function _fun108677() { // fn#108677, offset: 0x01183c08, size: 9 bytes, params: 1, frame: 1
return JsxRuntimeModule.jsxs;
}
function _fun108678() { // fn#108678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1525, offset: 0x02329912, size: 45 bytes, params: 1, frame: 14
env0_0.addListener('state', handleStateChange_108679);
return _fun108680;
function handleStateChange_108679({data}) { // fn#108679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1530, offset: 0x0232993f, size: 63 bytes, params: 2, frame: 13
let value = environment.__proto__;
const binding = env1_12;
value = environment.__proto__.__proto__;
value = require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */;
binding(value.isActiveTabsGuilds(data.state));
}
movePanel(true, false, 0, true);
return undefined;
function _fun108680() { // fn#108680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1653, offset: 0x01e7b678, size: 34 bytes, params: 1, frame: 13
const binding = env1_0;
binding.removeListener('state', handleStateChange_108679);
}
}
if (movePanel(false, false, 0, false)) {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
function _fun108681() { // fn#108681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1723, offset: 0x0232997e, size: 20 bytes, params: 1, frame: 11
env0_13(JsxRuntimeModule.jsxs);
}
function _fun108682(a0) { // fn#108682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1783, offset: 0x02329992, size: 303 bytes, params: 2, frame: 17
var index;
var name;
var binding;
var getState;
var routes;
var value3;
var rootNavigationRef;
var state;
var state2;
var property;
var moduleValue2;
const value2 = undefined;
env0_7(a0);
env0_15.current = false;
if (a0) {
if (env0_9.current != null) {
binding = env0_0;
getState = binding.getState;
routes = Reflect.apply(getState, binding, []).routes;
getState = binding.getState;
index = Reflect.apply(getState, binding, []).index;
name = routes[index].name;
if (name !== 'channel') {
value3 = environment.__proto__;
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef == null) {
name = value2;
} else {
state = rootNavigationRef.getState();
if (state == null) {
name = value2;
} else {
routes = state.routes;
if (rootNavigationRef == null) {
index = value2;
} else {
state2 = rootNavigationRef.getState();
index = state2 == null ? value2 : state2.index;
}
property = routes[index];
name = property == null ? value2 : property.name;
}
}
if (name !== 'modal') {
env0_15.current = true;
moduleValue2 = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue2.transitionToChannel(env0_9.current.channelId);
}
}
}
} else {
(0, JsxRuntimeModule.jsx)();
}
return value2;
}
function _fun108683() { // fn#108683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2163, offset: 0x02329ac1, size: 75 bytes, params: 1, frame: 14
const value = environment.__proto__;
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const BOTTOM_CHANNEL_SCREEN_DRAG_START = ComponentActions.BOTTOM_CHANNEL_SCREEN_DRAG_START;
Reflect.apply(dispatch, ComponentDispatch, [BOTTOM_CHANNEL_SCREEN_DRAG_START]);
(ChatInputUtilsModule).dismissKeyboard();
}
function _fun108684() { // fn#108684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2633, offset: 0x02329b0c, size: 54 bytes, params: 1, frame: 14
env1_12.log('Chat Layout Changed', {isNavigatorPanelsBesideChannelList: env0_14, drawerWidth: env0_2});
}
function _fun108685() { // fn#108685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2829, offset: 0x02329b42, size: 21 bytes, params: 1, frame: 2
env0_22.current = env0_21;
}
function _fun108686() { // fn#108686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2864, offset: 0x02329b57, size: 293 bytes, params: 1, frame: 22
var translateXBinding;
let current = isDraggingRef.current;
if (!current) {
current = env0_22.current;
var handleExit = current.handleExit;
var maxWidth = current.maxWidth;
var movePanel = current.movePanel;
var screens = current.screens;
var value2 = undefined;
var type = ConstantsModule.ComponentActions == null ? value2 : ConstantsModule.ComponentActions.type;
var ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
var DEFAULT = ChannelScreenType.DEFAULT;
var value4 = type === DEFAULT;
if (screens.length >= 2) {
translateXBinding = translateX;
translateXBinding.set(value4 ? 0 : maxWidth);
env0_7(value4);
return value2;
}
if (value4) {
if (env0_15.current) {
env0_15.current = false;
translateXBinding = translateX;
if (translateXBinding.get() === maxWidth) {
handleExit();
}
return value2;
}
movePanel(true, false, 0, true);
return undefined;
}
if (movePanel(false, false, 0, false)) {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
}
}
}
function _fun108687() { // fn#108687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3234, offset: 0x02329c7c, size: 127 bytes, params: 1, frame: 17
var defaultImport;
const firstScreen = env0_22.current.firstScreen;
const value = undefined;
const type = firstScreen == null ? value : firstScreen.type;
const ChannelScreenType = (UseChannelScreensFromNavigationModule).ChannelScreenType;
const BACKGROUND_SAVED = ChannelScreenType.BACKGROUND_SAVED;
if (type === BACKGROUND_SAVED) {
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
defaultImport.preload(firstScreen.guildId ?? ME, firstScreen.channelId);
}
return value;
}
function _fun108688() { // fn#108688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3452, offset: 0x02329cfb, size: 32 bytes, params: 1, frame: 16
if (env0_16) {
movePanel(true, false, 0, false);
}
}
function _fun108689() { // fn#108689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3499, offset: 0x02329d1b, size: 75 bytes, params: 1, frame: 15
const value2 = null;
return (
env0_14
? (
isChatLockedOpen || ReactNativeModule.StyleSheet
? value2
: (
<Pressable style={StyleSheet.absoluteFill} onPress={env0_23} />
)
)
: value2
);
}
function _fun108690() { // fn#108690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3606, offset: 0x02329d66, size: 78 bytes, params: 1, frame: 16
return (
env0_14
? ((Component) => <Component translateX={translateX} maxWidth={maxWidth} isChatLockedOpen={isChatLockedOpen} />)(importDefault(14367) /* metro dependency 14367: ChannelScreenAnimatedFrame */)
: null
);
}
function MainTabsNavigatorPanelSe() { // fn#108691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3765, owner: MainTabsNavigatorPanel.se, offset: 0x02329db4, size: 63 bytes, params: 1, frame: 12
var r1;
var value4;
var value;
const value2 = translateX.get();
const value3 = 0;
if (value2 > value3) {
value = env0_24.get();
value4 = 1;
r1 = value < value4 ? value4 : value3;
} else {
r1 = value3;
}
return {opacity: r1};
}
}
}
function _fun108687() { // fn#108687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3234, offset: 0x02329c7c, size: 127 bytes, params: 1, frame: 17
var defaultImport;
const firstScreen = env0_22.current.firstScreen;
const value = undefined;
const type = firstScreen == null ? value : firstScreen.type;
const ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
const BACKGROUND_SAVED = ChannelScreenType.BACKGROUND_SAVED;
if (type === BACKGROUND_SAVED) {
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
defaultImport.preload(firstScreen.guildId ?? ME, firstScreen.channelId);
}
return value;
}
function _fun108688() { // fn#108688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3452, offset: 0x02329cfb, size: 32 bytes, params: 1, frame: 16
if (env0_16) {
movePanel(true, false, 0, false);
}
}
function _fun108689() { // fn#108689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3499, offset: 0x02329d1b, size: 75 bytes, params: 1, frame: 15
const value2 = null;
return env0_14 ? isChatLockedOpen || env0_6 ? value2 : <Pressable style={StyleSheet.absoluteFill} onPress={env0_23} /> : value2;
}
function _fun108690() { // fn#108690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3606, offset: 0x02329d66, size: 78 bytes, params: 1, frame: 16
return env0_14 ? ((Component) => <Component translateX={translateX} maxWidth={maxWidth} isChatLockedOpen={isChatLockedOpen} />)(importDefault(14367) /* metro dependency 14367: ChannelScreenAnimatedFrame */) : null;
}
function MainTabsNavigatorPanelSe() { // fn#108691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3765, owner: MainTabsNavigatorPanel.se, offset: 0x02329db4, size: 63 bytes, params: 1, frame: 12
var r1;
var value4;
var value;
const value2 = translateX.get();
const value3 = 0;
if (value2 > value3) {
value = env0_24.get();
value4 = 1;
r1 = value < value4 ? value4 : value3;
} else {
r1 = value3;
}
return {opacity: r1};
}
function handleStateChange_108679({data}) { // fn#108679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1530, offset: 0x0232993f, size: 63 bytes, params: 2, frame: 13
let value = environment.__proto__;
const binding = env1_12;
value = environment.__proto__.__proto__;
value = require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */;
binding(value.isActiveTabsGuilds(data.state));
}
global.__d(_fun108670, 14361, [57, 31, 27, 661, 33, 3, 4501, 697, 1485, 4010, 11336, 11335, 14362, 4015, 14363,
4008, 4601, 1239, 14364, 4603, 14367, 4017, 5115, 5176, 7703, 14368, 5321, 14369, 14892, 14954, 14955, 14956,
2]) /* metro module 14361, dependencies: [57, 31, 27, 661, 33, 3, 4501, 697, 1485, 4010, 11336, 11335, 14362, 4015, 14363, 4008, 4601, 1239, 14364, 4603, 14367, 4017, 5115, 5176, 7703, 14368, 5321, 14369, 14892, 14954, 14955, 14956, 2] */;
@@ -1,18 +1,22 @@
/* Metro module 14368; source: modules/main_tabs_v2/native/panels/MainTabsNavigatorPanelContext.tsx; dependencies: [31, 5321, 8142, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun108733(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14565:6, offset: 0x0232c25b, size: 211 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
object2 = {};
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
object2.gesture = Gesture.Pan();
object2.disallowGesture = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(false);
object2.translateX = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(0);
const context = value.createContext(object2);
let value = ReactModule;
object = {};
const Gesture = (Module05321Module).Gesture;
object.gesture = Gesture.Pan();
object.disallowGesture = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(false);
object.translateX = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(0);
const context = value.createContext(object);
value = value.createContext(undefined);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsNavigatorPanelContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsNavigatorPanelContext.tsx');
exports.default = context;
exports.MainTabsChannelScreenStackContext = value;
}
global.__d(_fun108733, 14368, [31, 5321, 8142, 2]) /* metro module 14368, dependencies: [31, 5321, 8142, 2] */;
@@ -1,97 +1,100 @@
/* Metro module 14362; source: modules/main_tabs_v2/native/panels/PanelsNavigationUtils.tsx; dependencies: [4008, 4007, 1489, 491, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module01489Module from '../../../../by-id/module-01489.js'; /* Metro dependency 1489 */
import * as RootNavigationRefNativeModule from '../../RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
function _fun108692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:6, offset: 0x02329df3, size: 109 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/main_tabs_v2/native/panels/PanelsNavigationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/PanelsNavigationUtils.tsx');
exports.convertPortraitToLandscapeScreens = convertPortraitToLandscapeScreens;
exports.convertLandscapeToPortraitScreens = convertLandscapeToPortraitScreens;
}
function convertPortraitToLandscapeScreens() { // fn#108693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:222, offset: 0x02329e60, size: 500 bytes, params: 1, frame: 26
var r15;
var r4;
var state4;
var moduleValue2;
var coerceMainRoute;
var routes;
var value5;
var state;
var moduleValue3;
var coerceChannelRoute;
var moduleValue4;
var coerceTabsRoute;
var value6;
var moduleValue5;
var coerceGuildsRoute;
var state2;
var state3;
var value7;
var object;
var items2;
var slice;
var dispatch;
var CommonActions;
var reset;
var object3;
const value2 = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
state4 = rootNavigationRef.getState();
if (state4 != null) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceMainRoute = moduleValue2.coerceMainRoute;
routes = state4.routes;
value5 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[0]]);
if (value5 != null) {
state = value5.state;
if (state != null) {
if (state.index !== 0) {
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceChannelRoute = moduleValue3.coerceChannelRoute;
routes = state.routes;
if (Reflect.apply(coerceChannelRoute, moduleValue3, [routes[1]]) != null) {
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceTabsRoute = moduleValue4.coerceTabsRoute;
function convertPortraitToLandscapeScreens() { // fn#108693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:222, offset: 0x02329e60, size: 500 bytes, params: 1, frame: 26
var r15;
var r4;
var state4;
var moduleValue2;
var coerceMainRoute;
var routes;
var value5;
var state;
var moduleValue3;
var coerceChannelRoute;
var moduleValue4;
var coerceTabsRoute;
var value6;
var moduleValue5;
var coerceGuildsRoute;
var state2;
var state3;
var value7;
var object;
var items2;
var slice;
var dispatch;
var CommonActions;
var reset;
var object2;
const value2 = undefined;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null) {
state4 = rootNavigationRef.getState();
if (state4 != null) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceMainRoute = moduleValue2.coerceMainRoute;
routes = state4.routes;
value5 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[0]]);
if (value5 != null) {
state = value5.state;
if (state != null) {
if (state.index !== 0) {
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceChannelRoute = moduleValue3.coerceChannelRoute;
routes = state.routes;
value6 = Reflect.apply(coerceTabsRoute, moduleValue4, [routes[0]]);
if (value6 != null) {
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
state2 = value6.state;
if (state2 == null) {
r4 = value2;
} else {
routes = state2.routes;
state3 = value6.state;
value7 = state3 == null;
r4 = routes[value7 ? value2 : state3.index];
r15 = value7;
}
if (Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]) != null) {
object = {};
copyDataProperties(object, state, undefined);
object['index'] = state.index - 1;
routes = state.routes;
items2 = [routes[0]];
routes = state.routes;
slice = routes.slice;
arraySpread(items2, Reflect.apply(slice, routes, [2]), 1, r15);
object['routes'] = items2;
value5.state = object;
object = [value5];
routes = state4.routes;
slice = routes.slice;
arraySpread(object, Reflect.apply(slice, routes, [1]), 1, r15);
dispatch = rootNavigationRef.dispatch;
CommonActions = (require(1489) /* metro dependency 1489 */).CommonActions;
reset = CommonActions.reset;
object3 = {};
copyDataProperties(object3, state4, 1);
object3['routes'] = object;
object3['index'] = object.length - 1;
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions,
[object3])]);
if (Reflect.apply(coerceChannelRoute, moduleValue3, [routes[1]]) != null) {
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceTabsRoute = moduleValue4.coerceTabsRoute;
routes = state.routes;
value6 = Reflect.apply(coerceTabsRoute, moduleValue4, [routes[0]]);
if (value6 != null) {
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
state2 = value6.state;
if (state2 == null) {
r4 = value2;
} else {
routes = state2.routes;
state3 = value6.state;
value7 = state3 == null;
r4 = routes[value7 ? value2 : state3.index];
r15 = value7;
}
if (Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]) != null) {
object = {};
copyDataProperties(object, state, undefined);
object['index'] = state.index - 1;
routes = state.routes;
items2 = [routes[0]];
routes = state.routes;
slice = routes.slice;
arraySpread(items2, Reflect.apply(slice, routes, [2]), 1, r15);
object['routes'] = items2;
value5.state = object;
object = [value5];
routes = state4.routes;
slice = routes.slice;
arraySpread(object, Reflect.apply(slice, routes, [1]), 1, r15);
dispatch = rootNavigationRef.dispatch;
CommonActions = (require(1489) /* metro dependency 1489 */).CommonActions;
reset = CommonActions.reset;
object2 = {};
copyDataProperties(object2, state4, 1);
object2['routes'] = object;
object2['index'] = object.length - 1;
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions,
[object2])]);
}
}
}
}
@@ -99,53 +102,106 @@ function convertPortraitToLandscapeScreens() { // fn#108693, source: /ci/build/d
}
}
}
return value2;
}
return value2;
}
function convertLandscapeToPortraitScreens() { // fn#108694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:879, offset: 0x0232a054, size: 667 bytes, params: 1, frame: 27
var r4;
var channelId;
var r11;
var moduleValue4;
var coerceTabsRoute;
var value6;
var moduleValue5;
var coerceGuildsRoute;
var state2;
var state3;
var value7;
var object;
var items2;
var params;
var value10;
var dispatch;
const CommonActions = (require(1489) /* metro dependency 1489 */).CommonActions;
var reset;
var object2;
const value2 = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
var state4 = rootNavigationRef.getState();
if (state4 == null) {
return value2;
}
var moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
var coerceMainRoute = moduleValue2.coerceMainRoute;
var routes = state4.routes;
var value5 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[0]]);
if (value5 == null) {
return value2;
}
var state = value5.state;
if (state == null) {
return value2;
}
if (state4.index !== 0) {
function convertLandscapeToPortraitScreens() { // fn#108694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:879, offset: 0x0232a054, size: 667 bytes, params: 1, frame: 27
var r4;
var channelId;
var r11;
var moduleValue4;
var coerceTabsRoute;
var value6;
var moduleValue5;
var coerceGuildsRoute;
var state2;
var state3;
var value7;
var object;
var items2;
var params;
var value10;
var dispatch;
const CommonActions = (Module01489Module).CommonActions;
var reset;
var object3;
const value2 = undefined;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null) {
var state4 = rootNavigationRef.getState();
if (state4 == null) {
return value2;
}
var moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
var coerceMainRoute = moduleValue2.coerceMainRoute;
var routes = state4.routes;
var value5 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[0]]);
if (value5 == null) {
return value2;
}
var state = value5.state;
if (state == null) {
return value2;
}
if (state4.index !== 0) {
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceTabsRoute = moduleValue4.coerceTabsRoute;
routes = state.routes;
value6 = Reflect.apply(coerceTabsRoute, moduleValue4, [routes[0]]);
if (value6 != null) {
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
state2 = value6.state;
if (state2 == null) {
r4 = value2;
} else {
routes = state2.routes;
state3 = value6.state;
r4 = routes[state3 == null ? value2 : state3.index];
}
value7 = Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]);
if (value7 != null) {
object = {};
copyDataProperties(object, state, undefined);
object['index'] = state.index + 1;
routes = state.routes;
items2 = [routes[0]];
params = value7.params;
channelId = params == null ? value2 : params.channelId;
r11 = channelId ?? 'channel-' + (require(491) /* metro dependency 491 */).v4();
params = value7.params;
value10 = params == null;
channelId = value10 ? value2 : params.channelId;
params = value7.params;
items2[1] = {name: 'channel', key: r11, params: {channelId: channelId,
guildId: params == null ? value2 : params.guildId}};
routes = state.routes;
arraySpread(items2, routes.slice(1), 2, value10);
object['routes'] = items2;
value5.state = object;
object = [value5];
routes = state4.routes;
arraySpread(object, routes.slice(1), 1, value10);
dispatch = rootNavigationRef.dispatch;
reset = CommonActions.reset;
object3 = {};
copyDataProperties(object3, state4, 1);
object3['routes'] = object;
object3['index'] = object.length - 1;
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object3])]);
}
}
return value2;
}
if (state.index === 0) {
return value2;
}
var moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (moduleValue3.coerceChannelRoute(state.routes[1]) == null) {
return value2;
}
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceTabsRoute = moduleValue4.coerceTabsRoute;
routes = state.routes;
value6 = Reflect.apply(coerceTabsRoute, moduleValue4, [routes[0]]);
value6 = moduleValue4.coerceTabsRoute(state.routes[0]);
if (value6 != null) {
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
@@ -182,68 +238,18 @@ function convertLandscapeToPortraitScreens() { // fn#108694, source: /ci/build/d
arraySpread(object, routes.slice(1), 1, value10);
dispatch = rootNavigationRef.dispatch;
reset = CommonActions.reset;
object2 = {};
copyDataProperties(object2, state4, 1);
object2['routes'] = object;
object2['index'] = object.length - 1;
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object2])]);
object3 = {};
copyDataProperties(object3, state4, 1);
object3['routes'] = object;
object3['index'] = object.length - 1;
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object3])]);
}
}
return value2;
}
if (state.index === 0) {
return value2;
}
var moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (moduleValue3.coerceChannelRoute(state.routes[1]) == null) {
return value2;
}
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value6 = moduleValue4.coerceTabsRoute(state.routes[0]);
if (value6 != null) {
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
state2 = value6.state;
if (state2 == null) {
r4 = value2;
} else {
routes = state2.routes;
state3 = value6.state;
r4 = routes[state3 == null ? value2 : state3.index];
}
value7 = Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]);
if (value7 != null) {
object = {};
copyDataProperties(object, state, undefined);
object['index'] = state.index + 1;
routes = state.routes;
items2 = [routes[0]];
params = value7.params;
channelId = params == null ? value2 : params.channelId;
r11 = channelId ?? 'channel-' + (require(491) /* metro dependency 491 */).v4();
params = value7.params;
value10 = params == null;
channelId = value10 ? value2 : params.channelId;
params = value7.params;
items2[1] = {name: 'channel', key: r11, params: {channelId: channelId,
guildId: params == null ? value2 : params.guildId}};
routes = state.routes;
arraySpread(items2, routes.slice(1), 2, value10);
object['routes'] = items2;
value5.state = object;
object = [value5];
routes = state4.routes;
arraySpread(object, routes.slice(1), 1, value10);
dispatch = rootNavigationRef.dispatch;
reset = CommonActions.reset;
object2 = {};
copyDataProperties(object2, state4, 1);
object2['routes'] = object;
object2['index'] = object.length - 1;
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object2])]);
}
}
return value2;
}
return value2;
}
global.__d(_fun108692, 14362, [4008, 4007, 1489, 491,
2]) /* metro module 14362, dependencies: [4008, 4007, 1489, 491, 2] */;
@@ -1,32 +1,39 @@
/* Metro module 14955; source: modules/main_tabs_v2/native/panels/ThemedHeaderBackgroundGradient.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 3860, 673, 4589, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import LinearGradient from '../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun113105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15152:6, offset: 0x023e8ef4, size: 225 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(27) /* metro dependency 27 */;
const env0_3 = value2.StyleSheet;
const env0_4 = value2.View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'position': 'absolute',
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({container: {'position': 'absolute',
'left': 0, 'right': 0, 'top': 0}});
value = value.memo(ThemedHeaderBackgroundGradient);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/ThemedHeaderBackgroundGradient.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/ThemedHeaderBackgroundGradient.tsx');
exports.default = value;
function ThemedHeaderBackgroundGradient({baseColor = importDefault(dependencyMap[4]).colors.BACKGROUND_BASE_LOWEST, minHeight}) { // fn#113106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15152:247, offset: 0x023e8fd5, size: 334 bytes, params: 2, frame: 19
minHeight = minHeight === undefined ? 16 : minHeight;
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
const value3 = (UseTokenModule).useToken(baseColor);
const r7 = (require(673) /* metro dependency 673: ColorUtils */).hex2rgb(value3, 0) ?? 'transparent';
const Math = global.Math;
return (
<View style={[styles.container, {height: Math.max(value2.top, minHeight)}]} pointerEvents="none">
{((Component) => <Component style={StyleSheet.absoluteFill} colors={[value3, r7]} start={{'x': 0,
'y': 0}} end={{'x': 0, 'y': 1}} />)(LinearGradient)}
</View>
);
}
}
function ThemedHeaderBackgroundGradient({baseColor = importDefault(dependencyMap[4]).colors.BACKGROUND_BASE_LOWEST, minHeight}) { // fn#113106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15152:247, offset: 0x023e8fd5, size: 334 bytes, params: 2, frame: 19
minHeight = minHeight === undefined ? 16 : minHeight;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (require(3860) /* metro dependency 3860: useToken */).useToken(baseColor);
const r7 = (require(673) /* metro dependency 673: ColorUtils */).hex2rgb(value3, 0) ?? 'transparent';
const Math = global.Math;
return (
<View style={[styles.container, {height: Math.max(value2.top, minHeight)}]} pointerEvents="none">
{((Component) => <Component style={StyleSheet.absoluteFill} colors={[value3, r7]} start={{'x': 0,
'y': 0}} end={{'x': 0, 'y': 1}} />)(importDefault(4589) /* metro dependency 4589 */)}
</View>
);
}
global.__d(_fun113105, 14955, [31, 27, 33, 4501, 697, 1585, 3860, 673, 4589,
2]) /* metro module 14955, dependencies: [31, 27, 33, 4501, 697, 1585, 3860, 673, 4589, 2] */;
@@ -1,165 +1,170 @@
/* Metro module 14301; source: modules/main_tabs_v2/native/panels/createChatPanelNativeStackNavigator.tsx; dependencies: [31, 33, 1485, 4007, 9884, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module01485Module from '../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as Module09884Module from '../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun108187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:6, offset: 0x02317a97, size: 158 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = require(1485) /* metro dependency 1485 */;
let value = Module01485Module;
value = value.createNavigatorFactory(ChatPanelNativeStackNavigator);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/createChatPanelNativeStackNavigator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/createChatPanelNativeStackNavigator.tsx');
exports.default = value;
}
function ChatPanelNativeStackNavigator(a0) { // fn#108188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:161, offset: 0x02317b35, size: 354 bytes, params: 2, frame: 25
const id = a0.id;
const initialRouteName = a0.initialRouteName;
const children = a0.children;
const screenListeners = a0.screenListeners;
const screenOptions = a0.screenOptions;
const object2 = {'id': 0, 'initialRouteName': 0, 'children': 0, 'screenListeners': 0, 'screenOptions': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, id);
const moduleValue = require(1485) /* metro dependency 1485 */;
const useNavigationBuilder = moduleValue.useNavigationBuilder;
const StackRouter = moduleValue.StackRouter;
const value3 = Reflect.apply(useNavigationBuilder, moduleValue, [StackRouter, {id: id,
initialRouteName: initialRouteName, children: children, screenListeners: screenListeners,
screenOptions: screenOptions}]);
var stateBinding = value3.state;
const descriptors = value3.descriptors;
const navigation = value3.navigation;
const env0_2 = navigation;
const NavigationContent = value3.NavigationContent;
const binding = env0_2;
var {state, filteredDescriptors} = binding.useMemo(_fun108189, [stateBinding, descriptors]);
binding.useEffect(_fun108190, [navigation, stateBinding.index, stateBinding.key]);
const NativeStackView = (require(9884) /* metro dependency 9884 */).NativeStackView;
return (
<NavigationContent>
<NativeStackView
{...value}
{...{['state']: stateBinding}}
{...{['navigation']: navigation}}
{...{['descriptors']: filteredDescriptors}}
/>
</NavigationContent>
);
}
function _fun108189() { // fn#108189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:480, offset: 0x02317c97, size: 366 bytes, params: 1, frame: 28
var r5;
var r6;
var r14;
var r7;
var property;
var moduleValue;
var coerceChannelRoute;
var key;
var descriptorsBinding;
var key2;
var index;
var value4;
var value5;
const object3 = {};
const stateBinding = state;
copyDataProperties(object3, stateBinding, undefined);
let routes = stateBinding.routes;
const items4 = [];
const value2 = 0;
arraySpread(items4, routes, value2, undefined);
object3['routes'] = items4;
const items2 = [];
const items3 = [];
const object4 = {};
let length = object3.routes.length;
if (value2 < length) {
r5 = value2;
r6 = value2;
while (true) {
routes = object3.routes;
property = routes[r5];
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceChannelRoute = moduleValue.coerceChannelRoute;
if (Reflect.apply(coerceChannelRoute, moduleValue, [property]) != null) {
items2.push(property);
index = object3.index;
if (r5 <= index) {
value4 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
r14 = value4;
function ChatPanelNativeStackNavigator(a0) { // fn#108188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:161, offset: 0x02317b35, size: 354 bytes, params: 2, frame: 25
const id = a0.id;
const initialRouteName = a0.initialRouteName;
const children = a0.children;
const screenListeners = a0.screenListeners;
const screenOptions = a0.screenOptions;
const object = {'id': 0, 'initialRouteName': 0, 'children': 0, 'screenListeners': 0, 'screenOptions': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, id);
const useNavigationBuilder = Module01485Module.useNavigationBuilder;
const StackRouter = Module01485Module.StackRouter;
const value3 = Reflect.apply(useNavigationBuilder, Module01485Module, [StackRouter, {id: id,
initialRouteName: initialRouteName, children: children, screenListeners: screenListeners,
screenOptions: screenOptions}]);
var stateBinding = value3.state;
const descriptors = value3.descriptors;
const navigation = value3.navigation;
const navigation2 = navigation;
const NavigationContent = value3.NavigationContent;
const binding = navigation2;
var {state, filteredDescriptors} = binding.useMemo(_fun108189, [stateBinding, descriptors]);
binding.useEffect(_fun108190, [navigation, stateBinding.index, stateBinding.key]);
const NativeStackView = (Module09884Module).NativeStackView;
return (
<NavigationContent>
<NativeStackView
{...value}
{...{['state']: stateBinding}}
{...{['navigation']: navigation}}
{...{['descriptors']: filteredDescriptors}}
/>
</NavigationContent>
);
function _fun108189() { // fn#108189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:480, offset: 0x02317c97, size: 366 bytes, params: 1, frame: 28
var r5;
var r6;
var r14;
var r7;
var property;
var moduleValue;
var coerceChannelRoute;
var key;
var descriptorsBinding;
var key2;
var index;
var value4;
var value5;
const object = {};
const stateBinding = state;
copyDataProperties(object, stateBinding, undefined);
let routes = stateBinding.routes;
const items4 = [];
const value2 = 0;
arraySpread(items4, routes, value2, undefined);
object['routes'] = items4;
const items2 = [];
const items3 = [];
const object2 = {};
let length = object.routes.length;
if (value2 < length) {
r5 = value2;
r6 = value2;
while (true) {
routes = object.routes;
property = routes[r5];
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceChannelRoute = moduleValue.coerceChannelRoute;
if (Reflect.apply(coerceChannelRoute, moduleValue, [property]) != null) {
items2.push(property);
index = object.index;
if (r5 <= index) {
value4 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
r14 = value4;
break;
}
r14 = r6;
break;
}
items3.push(property);
key = property.key;
descriptorsBinding = descriptors;
if (key in descriptorsBinding) {
key = property.key;
descriptorsBinding = descriptors;
key2 = property.key;
object2[key] = descriptorsBinding[key2];
r14 = r6;
break;
}
r14 = r6;
break;
value5 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
routes = object.routes;
length = routes.length;
if (value5 < length) {
r5 = value5;
r6 = r14;
continue;
}
r7 = r14;
break;
}
r14 = r6;
break;
} else {
r7 = value2;
}
items3.push(property);
key = property.key;
descriptorsBinding = descriptors;
if (key in descriptorsBinding) {
key = property.key;
descriptorsBinding = descriptors;
key2 = property.key;
object4[key] = descriptorsBinding[key2];
r14 = r6;
break;
const Math = global.Math;
object.index = Math.max(value2, object.index - r7);
object.routes = items3;
if (value2 === object.routes.length) {
object.index = value2;
} else if (object.index >= object.routes.length) {
object.index = object.routes.length - 1;
}
r14 = r6;
break;
value5 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
routes = object3.routes;
length = routes.length;
if (value5 < length) {
r5 = value5;
r6 = r14;
continue;
}
r7 = r14;
break;
return {state: object, filteredDescriptors: object2};
}
} else {
r7 = value2;
}
const Math = global.Math;
object3.index = Math.max(value2, object3.index - r7);
object3.routes = items3;
if (value2 === object3.routes.length) {
object3.index = value2;
} else if (object3.index >= object3.routes.length) {
object3.index = object3.routes.length - 1;
}
return {state: object3, filteredDescriptors: object4};
}
function _fun108190() { // fn#108190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:922, offset: 0x02317e05, size: 68 bytes, params: 1, frame: 14
return navigation == null || navigation.addListener == null ? undefined : navigation.addListener('tabPress',
function(a0) {
var env0_0 = a0;
var env0_1 = navigation.isFocused();
global.requestAnimationFrame(_fun108192);
});
}
function _fun108190() { // fn#108190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:922, offset: 0x02317e05, size: 68 bytes, params: 1, frame: 14
return navigation == null || navigation.addListener == null ? undefined : navigation.addListener('tabPress',
function(a0) {
var env0_0 = a0;
var env0_1 = navigation.isFocused();
global.requestAnimationFrame(_fun108192);
});
function _fun108191(a0) { // fn#108191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:988, offset: 0x02317e49, size: 54 bytes, params: 2, frame: 11
const env0_0 = a0;
const env0_1 = navigation.isFocused();
global.requestAnimationFrame(_fun108192);
function _fun108192() { // fn#108192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:1035, offset: 0x02317e7f, size: 136 bytes, params: 1, frame: 16
var navigationBinding;
var dispatch;
var object;
var value6;
var StackActions;
if (state.index > 0 && env0_1 && !env0_0.defaultPrevented) {
navigationBinding = navigation;
dispatch = navigationBinding.dispatch;
object = {};
value6 = environment.__proto__.__proto__.__proto__;
StackActions = (require(1485) /* metro dependency 1485 */).StackActions;
copyDataProperties(object, StackActions.popToTop(), require);
object['target'] = state.key;
Reflect.apply(dispatch, navigationBinding, [object]);
}
}
function _fun108191(a0) { // fn#108191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:988, offset: 0x02317e49, size: 54 bytes, params: 2, frame: 11
const env0_0 = a0;
const env0_1 = navigation.isFocused();
global.requestAnimationFrame(_fun108192);
}
}
}
function _fun108192() { // fn#108192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:1035, offset: 0x02317e7f, size: 136 bytes, params: 1, frame: 16
var navigationBinding;
var dispatch;
var object2;
var value6;
var StackActions;
if (state.index > 0 && env0_1 && !env0_0.defaultPrevented) {
navigationBinding = navigation;
dispatch = navigationBinding.dispatch;
object2 = {};
value6 = environment.__proto__.__proto__.__proto__;
StackActions = (require(1485) /* metro dependency 1485 */).StackActions;
copyDataProperties(object2, StackActions.popToTop(), require);
object2['target'] = state.key;
Reflect.apply(dispatch, navigationBinding, [object2]);
}
}
global.__d(_fun108187, 14301, [31, 33, 1485, 4007, 9884,
2]) /* metro module 14301, dependencies: [31, 33, 1485, 4007, 9884, 2] */;
@@ -1,322 +1,332 @@
/* Metro module 14363; source: modules/main_tabs_v2/native/panels/useChannelScreensFromNavigation.tsx; dependencies: [57, 31, 1379, 1934, 3969, 661, 1386, 4008, 4007, 4010, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UseChatLayout from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelConstantsModule from '../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as UseChatLayoutModule from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
function _fun108695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:6, offset: 0x0232a2ef, size: 337 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const closure = getActiveTabsRoute;
const getActiveTabsRoute2 = getActiveTabsRoute;
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_9 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
object2 = {DEFAULT: 0};
object2[0] = 'DEFAULT';
object2.BACKGROUND_SAVED = 1;
object2[1] = 'BACKGROUND_SAVED';
object2.FALLBACK_RENDERED = 2;
object2[2] = 'FALLBACK_RENDERED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/useChannelScreensFromNavigation.tsx');
object = {DEFAULT: 0};
object[0] = 'DEFAULT';
object.BACKGROUND_SAVED = 1;
object[1] = 'BACKGROUND_SAVED';
object.FALLBACK_RENDERED = 2;
object[2] = 'FALLBACK_RENDERED';
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/useChannelScreensFromNavigation.tsx');
exports.default = useChannelScreensFromNavigation;
exports.ChannelScreenType = object2;
exports.getActiveTabsRoute = closure;
exports.ChannelScreenType = object;
exports.getActiveTabsRoute = getActiveTabsRoute2;
exports.isActiveTabsGuilds = isActiveTabsGuilds;
}
function getActiveTabsRoute(a0) { // fn#108696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:333, offset: 0x0232a440, size: 246 bytes, params: 2, frame: 17
var r0;
var object;
if (a0 != null) {
var state = a0.state;
var value = undefined;
r0 = state == null ? value : state.routes[(a0.state == null ? value : a0.state.index) ?? (a0.state == null ? value : a0.state.routes.length) - 1];
if (r0 != null) {
return r0;
}
var params = a0.params;
if ((params == null ? value : params.screen) != null) {
object = {key: 'resolved'};
params = a0.params;
object.name = params.screen;
params = a0.params;
params = params.params;
object.params = params;
return object;
}
var rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if ((rootNavigationRef == null ? value : rootNavigationRef.isReady()) === true) {
return rootNavigationRef.getCurrentRoute();
}
}
}
function getActiveTabsRoute(a0) { // fn#108696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:333, offset: 0x0232a440, size: 246 bytes, params: 2, frame: 17
var r0;
var object2;
if (a0 != null) {
var state = a0.state;
var value = undefined;
r0 = state == null ? value : state.routes[(a0.state == null ? value : a0.state.index) ?? (a0.state == null ? value : a0.state.routes.length) - 1];
if (r0 != null) {
function resolveBackgroundScreen({routes}) { // fn#108697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:756, offset: 0x0232a536, size: 315 bytes, params: 2, frame: 17
var search;
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(routes[0]);
if (value3 != null) {
var activeTabsRoute = getActiveTabsRoute(value3);
if (activeTabsRoute == null) {
return [];
}
var value5 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(activeTabsRoute);
if (value5 == null) {
return [];
}
var params = value5.params;
var guildId = params?.guildId;
params = value5.params;
var r0 = params?.channelId ?? undefined;
if (r0 == null) {
return [];
}
if (isStaticChannelRoute(r0)) {
search = value5.params?.search;
return [{index: 0,
type: search == null ? env0_10.BACKGROUND_SAVED : search ? env0_10.FALLBACK_RENDERED : env0_10.BACKGROUND_SAVED,
guildId: guildId, channelId: r0, showCreateThread: false}];
}
var channelStoreBinding = ChannelStore;
var getChannel = channelStoreBinding.getChannel;
if (Reflect.apply(getChannel, channelStoreBinding, [r0]) != null) {
search = value5.params?.search;
return [{index: 0,
type: search == null ? env0_10.BACKGROUND_SAVED : search ? env0_10.FALLBACK_RENDERED : env0_10.BACKGROUND_SAVED,
guildId: guildId, channelId: r0, showCreateThread: false}];
}
}
return [];
}
function resolveChannelScreens(a0, a1) { // fn#108698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1286, offset: 0x0232a671, size: 276 bytes, params: 3, frame: 23
var r12;
var r2;
var r0;
var routes;
var property;
var moduleValue;
var value3;
var push;
var length;
var DEFAULT;
var params;
var guildId;
var channelId;
var showCreateThread;
var value4;
var backgroundScreen;
var items2;
const items3 = [];
let index = a0.index;
let value = 0;
if (value <= index) {
r2 = value;
while (true) {
routes = a0.routes;
property = routes[r2];
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value3 = moduleValue.coerceChannelRoute(property);
if (value3 != null) {
push = items3.push;
length = items3.length;
DEFAULT = env0_10.DEFAULT;
params = value3.params;
guildId = params.guildId;
params = value3.params;
channelId = params.channelId;
params = value3.params;
showCreateThread = params.showCreateThread;
Reflect.apply(push, items3, [{index: length, type: DEFAULT, guildId: guildId, channelId: channelId,
showCreateThread: showCreateThread}]);
r12 = channelId;
}
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
index = a0.index;
if (value4 <= index) {
r2 = value4;
continue;
}
break;
}
}
if (a1.isChatLockedOpen) {
backgroundScreen = resolveBackgroundScreen(a0);
length = backgroundScreen.length;
if (length > value) {
items2 = [];
value = arraySpread(items2, backgroundScreen, value, r12);
arraySpread(items2, items3.map(_fun108699), value, r12);
return items2;
}
length = items3.length;
r0 = length > value ? items3 : resolveBackgroundScreen(a0);
} else {
r0 = items3.length > value ? items3 : resolveBackgroundScreen(a0);
}
return r0;
function _fun108699(a0) { // fn#108699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1699, offset: 0x0232a785, size: 47 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['index'] = a0.index + env0_0.length;
return object;
}
}
function useChannelScreensFromNavigation(a0) { // fn#108700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1900, offset: 0x0232a7b4, size: 185 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (UseChatLayout)();
let value = Module00057(ReactModule.useState(_fun108701), 2);
const property = value[0];
const env0_2 = value[1];
value = ReactModule.useCallback(_fun108702, []);
ReactModule.useEffect(_fun108704, [a0, value2, value]);
ReactModule.useEffect(function() {
var closure = _fun108706;
closure.addListener('state', closure);
return _fun108707;
}, [a0, value]);
return property;
function _fun108701() { // fn#108701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1974, offset: 0x0232a86d, size: 136 bytes, params: 1, frame: 16
var r0;
var guildId;
var channelId;
const channelScreens = resolveChannelScreens(env0_0.getState(), env0_1);
if (channelScreens.length > 0) {
r0 = channelScreens;
} else {
guildId = SelectedGuildStore.getGuildId();
channelId = SelectedChannelStore.getChannelId();
r0 = channelId == null ? [] : [{index: 0, type: env1_10.FALLBACK_RENDERED, guildId: guildId ?? ME,
channelId: channelId}];
}
return r0;
}
var params = a0.params;
if ((params == null ? value : params.screen) != null) {
object2 = {key: 'resolved'};
params = a0.params;
object2.name = params.screen;
params = a0.params;
params = params.params;
object2.params = params;
return object2;
}
var rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if ((rootNavigationRef == null ? value : rootNavigationRef.isReady()) === true) {
return rootNavigationRef.getCurrentRoute();
}
}
}
function resolveBackgroundScreen({routes}) { // fn#108697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:756, offset: 0x0232a536, size: 315 bytes, params: 2, frame: 17
var search;
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(routes[0]);
if (value3 != null) {
var activeTabsRoute = getActiveTabsRoute(value3);
if (activeTabsRoute == null) {
return [];
}
var value5 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(activeTabsRoute);
if (value5 == null) {
return [];
}
var params = value5.params;
var guildId = params?.guildId;
params = value5.params;
var r0 = params?.channelId ?? undefined;
if (r0 == null) {
return [];
}
if (isStaticChannelRoute(r0)) {
search = value5.params?.search;
return [{index: 0,
type: search == null ? env0_10.BACKGROUND_SAVED : search ? env0_10.FALLBACK_RENDERED : env0_10.BACKGROUND_SAVED,
guildId: guildId, channelId: r0, showCreateThread: false}];
}
var getChannel = ChannelStore.getChannel;
if (Reflect.apply(getChannel, ChannelStore, [r0]) != null) {
search = value5.params?.search;
return [{index: 0,
type: search == null ? env0_10.BACKGROUND_SAVED : search ? env0_10.FALLBACK_RENDERED : env0_10.BACKGROUND_SAVED,
guildId: guildId, channelId: r0, showCreateThread: false}];
}
}
return [];
}
function resolveChannelScreens(a0, a1) { // fn#108698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1286, offset: 0x0232a671, size: 276 bytes, params: 3, frame: 23
var r12;
var r2;
var r0;
var routes;
var property;
var moduleValue;
var value3;
var push;
var length;
var DEFAULT;
var params;
var guildId;
var channelId;
var showCreateThread;
var value4;
var backgroundScreen;
var items2;
const items3 = [];
let index = a0.index;
let value = 0;
if (value <= index) {
r2 = value;
while (true) {
routes = a0.routes;
property = routes[r2];
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value3 = moduleValue.coerceChannelRoute(property);
if (value3 != null) {
push = items3.push;
length = items3.length;
DEFAULT = env0_10.DEFAULT;
params = value3.params;
guildId = params.guildId;
params = value3.params;
channelId = params.channelId;
params = value3.params;
showCreateThread = params.showCreateThread;
Reflect.apply(push, items3, [{index: length, type: DEFAULT, guildId: guildId, channelId: channelId,
showCreateThread: showCreateThread}]);
r12 = channelId;
}
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
index = a0.index;
if (value4 <= index) {
r2 = value4;
continue;
}
break;
}
}
if (a1.isChatLockedOpen) {
backgroundScreen = resolveBackgroundScreen(a0);
length = backgroundScreen.length;
if (length > value) {
items2 = [];
value = arraySpread(items2, backgroundScreen, value, r12);
arraySpread(items2, items3.map(_fun108699), value, r12);
return items2;
}
length = items3.length;
r0 = length > value ? items3 : resolveBackgroundScreen(a0);
} else {
r0 = items3.length > value ? items3 : resolveBackgroundScreen(a0);
}
return r0;
}
function useChannelScreensFromNavigation(a0) { // fn#108700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1900, offset: 0x0232a7b4, size: 185 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (importDefault(4010) /* metro dependency 4010: useChatLayout */)();
const binding = env0_4;
let value = env0_3(binding.useState(_fun108701), 2);
const property = value[0];
const env0_2 = value[1];
value = binding.useCallback(_fun108702, []);
binding.useEffect(_fun108704, [a0, value2, value]);
binding.useEffect(function() {
var closure = _fun108706;
closure.addListener('state', closure);
return _fun108707;
}, [a0, value]);
return property;
}
function isActiveTabsGuilds({routes}) { // fn#108708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:3078, offset: 0x0232aaf5, size: 111 bytes, params: 2, frame: 15
var r0;
const property = routes[0];
var value;
const value2 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
if (value2 == null) {
return false;
}
const activeTabsRoute = getActiveTabsRoute(value2);
const value4 = activeTabsRoute != null;
if (value4) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(activeTabsRoute) != null;
r0 = value;
} else {
r0 = value4;
}
return r0;
}
function _fun108699(a0) { // fn#108699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1699, offset: 0x0232a785, size: 47 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['index'] = a0.index + env0_0.length;
return object2;
}
function _fun108701() { // fn#108701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1974, offset: 0x0232a86d, size: 136 bytes, params: 1, frame: 16
var r0;
var guildId;
var channelId;
const channelScreens = resolveChannelScreens(env0_0.getState(), env0_1);
if (channelScreens.length > 0) {
r0 = channelScreens;
} else {
guildId = SelectedGuildStore.getGuildId();
channelId = SelectedChannelStore.getChannelId();
r0 = channelId == null ? [] : [{index: 0, type: env1_10.FALLBACK_RENDERED, guildId: guildId ?? ME,
channelId: channelId}];
}
return r0;
}
function _fun108702(a0, a1) { // fn#108702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2249, offset: 0x0232a8f5, size: 206 bytes, params: 3, frame: 17
var environment;
var guildId;
var property;
var value;
var value2;
var value3;
var activeTabsRoute;
if (a0 == null) {
property = a1.routes[0];
value = environment.__proto__;
value2 = undefined;
value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
if (value3 != null) {
activeTabsRoute = getActiveTabsRoute(value3);
if (activeTabsRoute != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(activeTabsRoute);
guildId = value == null || value.params == null ? value2 : value.params.guildId;
}
}
env0_2(_fun108703);
} else if (a0.length > 0) {
env0_2(a0);
} else {
property = a1.routes[0];
value = environment.__proto__;
value2 = undefined;
value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
if (value3 != null) {
activeTabsRoute = getActiveTabsRoute(value3);
if (activeTabsRoute != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(activeTabsRoute);
guildId = value == null || value.params == null ? value2 : value.params.guildId;
}
}
env0_2(_fun108703);
}
}
function _fun108704() { // fn#108704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2679, offset: 0x0232aa45, size: 48 bytes, params: 1, frame: 14
const state = env0_0.getState();
env0_3(resolveChannelScreens(state, env0_1), state);
}
function _fun108705() { // fn#108705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2763, offset: 0x0232aa75, size: 45 bytes, params: 1, frame: 14
env0_0.addListener('state', handleStateChange_108706);
return _fun108707;
}
function _fun108703(a0) { // fn#108703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2532, offset: 0x0232a9c3, size: 130 bytes, params: 2, frame: 16
var r1;
var r0;
var type;
var value3;
var object2;
const value = a0;
if (value.length === 0) {
r0 = value;
} else {
if (env0_0 == null) {
type = value[0].type;
value3 = environment.__proto__.__proto__;
if (type === env2_10.FALLBACK_RENDERED) {
r1 = value;
function _fun108702(a0, a1) { // fn#108702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2249, offset: 0x0232a8f5, size: 206 bytes, params: 3, frame: 17
var environment;
var guildId;
var property;
var value;
var value2;
var value3;
var activeTabsRoute;
if (a0 == null) {
property = a1.routes[0];
value = environment.__proto__;
value2 = undefined;
value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
if (value3 != null) {
activeTabsRoute = getActiveTabsRoute(value3);
if (activeTabsRoute != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(activeTabsRoute);
guildId = value == null || value.params == null ? value2 : value.params.guildId;
}
}
env0_2(_fun108703);
} else if (a0.length > 0) {
env0_2(a0);
} else {
object2 = {};
copyDataProperties(object2, value[0], type);
object2['type'] = env2_10.FALLBACK_RENDERED;
r1 = [object2];
property = a1.routes[0];
value = environment.__proto__;
value2 = undefined;
value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
if (value3 != null) {
activeTabsRoute = getActiveTabsRoute(value3);
if (activeTabsRoute != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(activeTabsRoute);
guildId = value == null || value.params == null ? value2 : value.params.guildId;
}
}
env0_2(_fun108703);
}
} else if (env0_0 !== value[0].guildId) {
r1 = [];
function _fun108703(a0) { // fn#108703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2532, offset: 0x0232a9c3, size: 130 bytes, params: 2, frame: 16
var r1;
var r0;
var type;
var value3;
var object;
const value = a0;
if (value.length === 0) {
r0 = value;
} else {
if (env0_0 == null) {
type = value[0].type;
value3 = environment.__proto__.__proto__;
if (type === env2_10.FALLBACK_RENDERED) {
r1 = value;
} else {
object = {};
copyDataProperties(object, value[0], type);
object['type'] = env2_10.FALLBACK_RENDERED;
r1 = [object];
}
} else if (env0_0 !== value[0].guildId) {
r1 = [];
} else {
type = value[0].type;
value3 = environment.__proto__.__proto__;
if (type === env2_10.FALLBACK_RENDERED) {
r1 = value;
} else {
object = {};
copyDataProperties(object, value[0], type);
object['type'] = env2_10.FALLBACK_RENDERED;
r1 = [object];
}
}
r0 = r1;
}
return r0;
}
}
function _fun108704() { // fn#108704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2679, offset: 0x0232aa45, size: 48 bytes, params: 1, frame: 14
const state = env0_0.getState();
Module00057(resolveChannelScreens(state, env0_1), state);
}
function _fun108705() { // fn#108705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2763, offset: 0x0232aa75, size: 45 bytes, params: 1, frame: 14
env0_0.addListener('state', handleStateChange_108706);
return _fun108707;
function handleStateChange_108706(a0) { // fn#108706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2768, offset: 0x0232aaa2, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const resolveChannelScreensBinding = resolveChannelScreens;
const state = a0.data.state;
const getChatLayout = (UseChatLayoutModule).getChatLayout;
value = resolveChannelScreensBinding(state, Reflect.apply(getChatLayout, value, []));
env1_3(value, a0.data.state);
}
function _fun108707() { // fn#108707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2930, offset: 0x01e7b678, size: 34 bytes, params: 1, frame: 13
const binding = env1_0;
binding.removeListener('state', handleStateChange_108706);
}
}
}
function isActiveTabsGuilds({routes}) { // fn#108708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:3078, offset: 0x0232aaf5, size: 111 bytes, params: 2, frame: 15
var r0;
const property = routes[0];
var value;
const value2 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
if (value2 == null) {
return false;
}
const activeTabsRoute = getActiveTabsRoute(value2);
const value4 = activeTabsRoute != null;
if (value4) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceGuildsRoute(activeTabsRoute) != null;
r0 = value;
} else {
type = value[0].type;
value3 = environment.__proto__.__proto__;
if (type === env2_10.FALLBACK_RENDERED) {
r1 = value;
} else {
object2 = {};
copyDataProperties(object2, value[0], type);
object2['type'] = env2_10.FALLBACK_RENDERED;
r1 = [object2];
}
r0 = value4;
}
r0 = r1;
return r0;
}
return r0;
}
function handleStateChange_108706(a0) { // fn#108706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2768, offset: 0x0232aaa2, size: 83 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const resolveChannelScreensBinding = resolveChannelScreens;
const state = a0.data.state;
const getChatLayout = (require(4010) /* metro dependency 4010: useChatLayout */).getChatLayout;
value = resolveChannelScreensBinding(state, Reflect.apply(getChatLayout, value, []));
env1_3(value, a0.data.state);
}
global.__d(_fun108695, 14363, [57, 31, 1379, 1934, 3969, 661, 1386, 4008, 4007, 4010,
2]) /* metro module 14363, dependencies: [57, 31, 1379, 1934, 3969, 661, 1386, 4008, 4007, 4010, 2] */;
@@ -1,53 +1,60 @@
/* Metro module 14958; source: modules/main_tabs_v2/native/panels/useMainTabsChannelScreenStyles.tsx; dependencies: [31, 27, 4501, 697, 4017, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun113133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:6, offset: 0x023ea4e5, size: 230 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object3, SHADOW_LOW, undefined);
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{elevation: object3}]);
const StyleSheet = (ReactNativeModule).StyleSheet;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const SHADOW_LOW = (Native).shadows.SHADOW_LOW;
copyDataProperties(object2, SHADOW_LOW, undefined);
const env0_3 = Reflect.apply(createStyles, CreateStylesModule, [{elevation: object2}]);
object = {code: 'function useMainTabsChannelScreenStylesTsx1(){const{freezeValue,isDragging,translateX,maxWidth,elevationStyle,isCompletelyCovered}=this.__closure;var _freezeValue,_isCompletelyCovered;(_freezeValue=freezeValue)===null||_freezeValue===void 0||_freezeValue.get();const showBorder=isDragging.get()||translateX.get()!==0&&translateX.get()!==maxWidth;return{transform:[{translateX:translateX.get()}],shadowOpacity:showBorder?elevationStyle.shadowOpacity:0,elevation:showBorder?elevationStyle.elevation:0,opacity:(_isCompletelyCovered=isCompletelyCovered)!==null&&_isCompletelyCovered!==void 0&&_isCompletelyCovered.get()?0:1};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/useMainTabsChannelScreenStyles.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/panels/useMainTabsChannelScreenStyles.tsx');
exports.useMainTabsChannelScreenStyles = useMainTabsChannelScreenStyles;
}
function useMainTabsChannelScreenStyles(a0, a1, a2, a3, a4) { // fn#113134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:989, offset: 0x023ea5cb, size: 212 bytes, params: 6, frame: 22
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a4;
const styles = useStyles();
const elevation = styles.elevation;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const useMainTabsChannelScreenStylesC2 = useMainTabsChannelScreenStylesC;
useMainTabsChannelScreenStylesC2.__closure = {freezeValue: a4, isDragging: a0, translateX: a1, maxWidth: a2,
elevationStyle: elevation, isCompletelyCovered: a3};
useMainTabsChannelScreenStylesC2.__workletHash = 16765484569296;
useMainTabsChannelScreenStylesC2.__initData = env0_4;
return env0_2.useMemo(_fun113136, [styles, Reflect.apply(useAnimatedStyle, ReanimatedRexportModule,
[useMainTabsChannelScreenStylesC2])]);
function useMainTabsChannelScreenStylesC() { // fn#113135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:1097, owner: useMainTabsChannelScreenStyles.c, offset: 0x023ea69f, size: 206 bytes, params: 1, frame: 14
if (env0_4 != null) {
env0_4.get();
}
const r5 = env0_0.get() || require.get() !== 0 && require.get() !== importDefault;
const object2 = {};
object2.translateX = require.get();
const value7 = 0;
return {transform: [object2], shadowOpacity: r5 ? elevation.shadowOpacity : value7,
elevation: r5 ? elevation.elevation : value7, opacity: importAll != null && importAll.get() ? value7 : 1};
}
function useMainTabsChannelScreenStyles(a0, a1, a2, a3, a4) { // fn#113134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:989, offset: 0x023ea5cb, size: 212 bytes, params: 6, frame: 22
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a4;
const styles = useStyles();
const elevation = styles.elevation;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useMainTabsChannelScreenStylesC;
closure.__closure = {freezeValue: a4, isDragging: a0, translateX: a1, maxWidth: a2, elevationStyle: elevation,
isCompletelyCovered: a3};
closure.__workletHash = 16765484569296;
closure.__initData = env0_4;
return env0_2.useMemo(_fun113136, [styles, Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])]);
}
function _fun113136() { // fn#113136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:1466, offset: 0x023ea76d, size: 31 bytes, params: 1, frame: 3
return [styles.elevation, env0_7];
}
function useMainTabsChannelScreenStylesC() { // fn#113135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:1097, owner: useMainTabsChannelScreenStyles.c, offset: 0x023ea69f, size: 206 bytes, params: 1, frame: 14
if (env0_4 != null) {
env0_4.get();
}
const r5 = env0_0.get() || require.get() !== 0 && require.get() !== importDefault;
const object = {};
object.translateX = require.get();
const value7 = 0;
return {transform: [object], shadowOpacity: r5 ? elevation.shadowOpacity : value7,
elevation: r5 ? elevation.elevation : value7, opacity: importAll != null && importAll.get() ? value7 : 1};
}
function _fun113136() { // fn#113136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:1466, offset: 0x023ea76d, size: 31 bytes, params: 1, frame: 3
return [styles.elevation, env0_7];
}
global.__d(_fun113133, 14958, [31, 27, 4501, 697, 4017,
2]) /* metro module 14958, dependencies: [31, 27, 4501, 697, 4017, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,131 +1,150 @@
/* Metro module 14764; source: modules/main_tabs_v2/native/shared_components/BackIconWithBadge.tsx; dependencies: [31, 27, 5214, 33, 4501, 697, 566, 14745, 1305, 7599, 478, 5284, 5312, 4066, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildReadStateStore from '../../../../stores/GuildReadStateStore.tsx'; /* Metro dependency 5214 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as XLargeIconModule from '../../../../design/components/Icon/native/redesign/generated/XLargeIcon.tsx'; /* Metro dependency 4066 */
import * as ArrowLargeLeftIconModule from '../../../../design/components/Icon/native/redesign/generated/ArrowLargeLeftIcon.tsx'; /* Metro dependency 5284 */
function _fun111461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:6, offset: 0x023a3183, size: 447 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {badgeWrapper: {'position': 'absolute', 'top': 16, 'left': 12}, backIcon: {'height': 24, 'width': 24}};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': null,
object = {badgeWrapper: {'position': 'absolute', 'top': 16, 'left': 12}, backIcon: {'height': 24, 'width': 24}};
const object2 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': null,
'borderRadius': null, 'padding': 7};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.gap = PX_4;
const BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS;
object4.borderRadius = BORDER_RADIUS;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object3.iconWithBadge = object4;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.downIconWithBadge = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/BackIconWithBadge.tsx');
const PX_4 = (Native).space.PX_4;
object2.gap = PX_4;
const BORDER_RADIUS = (Native).modules.button.BORDER_RADIUS;
object2.borderRadius = BORDER_RADIUS;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (Native).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object2.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object.iconWithBadge = object2;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (Native).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.downIconWithBadge = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/BackIconWithBadge.tsx');
exports.BACK_ICON_WITH_BADGE_HIT_SLOP = {'top': 8, 'bottom': 8, 'left': 8, 'right': 8};
exports.SettingsLeftIconWithBadge = SettingsLeftIconWithBadge;
exports.LeftBackIconWithBadge = LeftBackIconWithBadge;
exports.CloseIconWithBadgeOnSide = CloseIconWithBadgeOnSide;
}
function IconWithBadge({includeNotificationsCount, Icon}) { // fn#111462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:581, offset: 0x023a3342, size: 519 bytes, params: 2, frame: 28
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
const styles = useStyles();
const value7 = ((require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.getTotalMentionCount();
}) ?? 0) + (includeNotificationsCount ? (importDefault(14745) /* metro dependency 14745: useNotificationsTabBadge */)().value : 0);
const value9 = env0_3.useMemo(_fun111465, [value7, env0_3.useMemo(_fun111464, [value7])]);
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
return (
<View
style={platformUtilsModule.isAndroid() ? {'height': 40, 'width': 40, 'paddingTop': 8,
'marginRight': -8} : undefined}
>
<View style={styles.backIcon}>
{((Component) => <Component cutouts={value9 != null ? [value9] : []}><Icon size="md" style={styles.backIcon} color="interactive-text-default" /></Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}
{value7 > 0 ? <View style={styles.badgeWrapper}>{((Badge) => <Badge value={value7} maxValue={99} />)((require(1305) /* metro dependency 1305: native */).Badge)}</View> : null}
function IconWithBadge({includeNotificationsCount, Icon}) { // fn#111462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:581, offset: 0x023a3342, size: 519 bytes, params: 2, frame: 28
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
const styles = useStyles();
const value7 = ((require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.getTotalMentionCount();
}) ?? 0) + (includeNotificationsCount ? (importDefault(14745) /* metro dependency 14745: useNotificationsTabBadge */)().value : 0);
const value9 = ReactModule.useMemo(_fun111465, [value7, ReactModule.useMemo(_fun111464, [value7])]);
return (
<View
style={PlatformUtilsModule.isAndroid() ? {'height': 40, 'width': 40, 'paddingTop': 8,
'marginRight': -8} : undefined}
>
<View style={styles.backIcon}>
{((Component) => <Component cutouts={value9 != null ? [value9] : []}><Icon size="md" style={styles.backIcon} color="interactive-text-default" /></Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}
{
value7 > 0
? (
<View style={styles.badgeWrapper}>
{((Badge) => <Badge value={value7} maxValue={99} />)((require(1305) /* metro dependency 1305: native */).Badge)}
</View>
)
: null
}
</View>
</View>
</View>
);
}
);
function _fun111464() { // fn#111464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:775, offset: 0x023a355c, size: 84 bytes, params: 1, frame: 12
var r0;
const BADGE_SIZE = (NativeModule).BADGE_SIZE;
var value;
if (env0_0 < 10) {
value = environment.__proto__;
r0 = BADGE_SIZE;
} else {
value = environment.__proto__;
value = BADGE_SIZE + 8;
r0 = value;
}
return r0;
}
function _fun111465() { // fn#111465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:843, offset: 0x023a35b0, size: 181 bytes, params: 1, frame: 17
var value2;
var BADGE_PADDING;
var object;
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
if (env0_0 !== 0) {
value2 = environment.__proto__;
BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
object = {};
object.shape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape.RoundedRect;
object.x = 12 - BADGE_PADDING;
object.y = 16 - BADGE_PADDING;
object.width = env0_1 + 2 * BADGE_PADDING;
object.height = BADGE_SIZE + 2 * BADGE_PADDING;
object.cornerRadius = (BADGE_SIZE + 2 * BADGE_PADDING) / 2;
return object;
}
}
function SettingsLeftIconWithBadge({navigation, includeNotificationsCount}) { // fn#111466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:1570, offset: 0x023a3665, size: 148 bytes, params: 2, frame: 17
var object2;
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
const value2 = env0_3.useMemo(function() {
return navigation.getState().index > 0;
}, [navigation]);
object2 = {includeNotificationsCount: includeNotificationsCount};
if (value2) {
object2.Icon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
} else {
object2.Icon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
}
return <IconWithBadge {...object2} />;
}
function LeftBackIconWithBadge({includeNotificationsCount}) { // fn#111468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:1869, offset: 0x023a3717, size: 73 bytes, params: 2, frame: 16
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
const ArrowLargeLeftIcon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
return <IconWithBadge includeNotificationsCount={includeNotificationsCount} Icon={ArrowLargeLeftIcon} />;
}
function CloseIconWithBadgeOnSide() { // fn#111469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:2049, offset: 0x023a3760, size: 270 bytes, params: 1, frame: 21
const styles = useStyles();
const totalMentionCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.getTotalMentionCount();
});
const value2 = null;
const value3 = 0;
const value5 = (value2 != totalMentionCount ? totalMentionCount : value3) + (importDefault(14745) /* metro dependency 14745: useNotificationsTabBadge */)().value;
const items2 = [styles.iconWithBadge];
items2[1] = styles.downIconWithBadge;
const XLargeIcon = (require(4066) /* metro dependency 4066: XLargeIcon */).XLargeIcon;
return (
<View style={items2}>
<XLargeIcon size="sm" color="white" />
{value5 > value3 ? ((Badge) => <Badge value={value5} />)((require(1305) /* metro dependency 1305: native */).Badge) : value2}
</View>
);
}
function _fun111464() { // fn#111464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:775, offset: 0x023a355c, size: 84 bytes, params: 1, frame: 12
var r0;
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
var value;
if (env0_0 < 10) {
value = environment.__proto__;
r0 = BADGE_SIZE;
} else {
value = environment.__proto__;
value = BADGE_SIZE + 8;
r0 = value;
function SettingsLeftIconWithBadge({navigation, includeNotificationsCount}) { // fn#111466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:1570, offset: 0x023a3665, size: 148 bytes, params: 2, frame: 17
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
const value2 = ReactModule.useMemo(function() {
return navigation.getState().index > 0;
}, [navigation]);
object = {includeNotificationsCount: includeNotificationsCount};
if (value2) {
object.Icon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
} else {
object.Icon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
}
return <IconWithBadge {...object} />;
}
return r0;
}
function _fun111465() { // fn#111465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:843, offset: 0x023a35b0, size: 181 bytes, params: 1, frame: 17
var value2;
var BADGE_PADDING;
var object2;
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
if (env0_0 !== 0) {
value2 = environment.__proto__;
BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
object2 = {};
object2.shape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape.RoundedRect;
object2.x = 12 - BADGE_PADDING;
object2.y = 16 - BADGE_PADDING;
object2.width = env0_1 + 2 * BADGE_PADDING;
object2.height = BADGE_SIZE + 2 * BADGE_PADDING;
object2.cornerRadius = (BADGE_SIZE + 2 * BADGE_PADDING) / 2;
return object2;
function LeftBackIconWithBadge({includeNotificationsCount}) { // fn#111468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:1869, offset: 0x023a3717, size: 73 bytes, params: 2, frame: 16
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
const ArrowLargeLeftIcon = (ArrowLargeLeftIconModule).ArrowLargeLeftIcon;
return <IconWithBadge includeNotificationsCount={includeNotificationsCount} Icon={ArrowLargeLeftIcon} />;
}
function CloseIconWithBadgeOnSide() { // fn#111469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:2049, offset: 0x023a3760, size: 270 bytes, params: 1, frame: 21
const styles = useStyles();
const totalMentionCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.getTotalMentionCount();
});
const value2 = null;
const value3 = 0;
const value5 = (value2 != totalMentionCount ? totalMentionCount : value3) + (importDefault(14745) /* metro dependency 14745: useNotificationsTabBadge */)().value;
const items2 = [styles.iconWithBadge];
items2[1] = styles.downIconWithBadge;
const XLargeIcon = (XLargeIconModule).XLargeIcon;
return (
<View style={items2}>
<XLargeIcon size="sm" color="white" />
{
value5 > value3
? ((Badge) => <Badge value={value5} />)((require(1305) /* metro dependency 1305: native */).Badge)
: value2
}
</View>
);
}
}
global.__d(_fun111461, 14764, [31, 27, 5214, 33, 4501, 697, 566, 14745, 1305, 7599, 478, 5284, 5312, 4066,
2]) /* metro module 14764, dependencies: [31, 27, 5214, 33, 4501, 697, 566, 14745, 1305, 7599, 478, 5284, 5312, 4066, 2] */;
@@ -1,475 +1,515 @@
/* Metro module 14939; source: modules/main_tabs_v2/native/shared_components/BadgableTabBarIcon.tsx; dependencies: [31, 27, 4502, 3969, 6876, 1878, 482, 33, 1305, 697, 4501, 1244, 9609, 7599, 1357, 7556, 6817, 3859, 14937, 632, 3995, 14940, 14743, 4017, 4577, 4581, 12771, 14943, 8696, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UserUtils from '../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import SelfPresenceStore from '../../../../stores/SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import UseIsWindowLarge from '../../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
import UsePrivateProfileCoachmark from '../../../user_profile/native/usePrivateProfileCoachmark.tsx'; /* Metro dependency 14743 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as IconSizeModule from '../../../../design/components/Icon/IconSize.tsx'; /* Metro dependency 6817 */
import * as ClipViewModule from '../../../../design/components/Icon/native/ClipView.tsx'; /* Metro dependency 7599 */
import * as UseTabBarStylesModule from './tab_bar/useTabBarStyles.tsx'; /* Metro dependency 14937 */
import * as MobileTrialUserSettingsAvatarBadgeModule from '../../../premium/native/MobileTrialUserSettingsAvatarBadge.tsx'; /* Metro dependency 14943 */
function _fun112992(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:6, offset: 0x023e4d23, size: 435 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(482) /* metro dependency 482: Constants */).StatusTypes;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
const env0_12 = AVATAR_SIZE_MAP[NORMAL];
const env0_13 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112994);
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112995);
const env0_14 = (CreateStylesModule).createStyles(_fun112994);
const env0_15 = (CreateStylesModule).createStyles(_fun112995);
object = {code: 'function BadgableTabBarIconTsx1(){const{scaleDownAnimation,rotationAnimation,wobbleAnimationX,wobbleAnimationY}=this.__closure;return{transform:[{scale:scaleDownAnimation.get()},{rotate:rotationAnimation.get()+"deg"},{scaleX:wobbleAnimationX.get()},{scaleY:wobbleAnimationY.get()}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/BadgableTabBarIcon.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/BadgableTabBarIcon.tsx');
exports.BadgableTabBarIcon = BadgableTabBarIcon;
exports.YouIcon = YouIcon;
}
function BadgeContent({value, countA11yLabel, unread, lowPriority, unreadA11yLabel}) { // fn#112993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:907, offset: 0x023e4ed6, size: 313 bytes, params: 2, frame: 23
var r0;
var object2;
var Badge;
var intl;
const styles = useStyles();
if (value > 0) {
Badge = (require(1305) /* metro dependency 1305: native */).Badge;
var badgeProps = {style: lowPriority && styles.lowPriorityBadge, value: value, accessible: false};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
badgeProps.accessibilityLabel = intl.formatToPlainString(countA11yLabel ?? (require(1244) /* metro dependency 1244: indexNative */).t.XNn2u2,
{count: value});
value = <View style={{margin: 3}}><Badge {...badgeProps} /></View>;
r0 = value;
} else if (unread) {
object2 = {accessibilityLabel: unreadA11yLabel};
value = importDefault(9609) /* metro dependency 9609: Badge */;
value = <View {...object2}>{((Component) => <Component size={12} style={styles.unread} />)(value)}</View>;
r0 = value;
} else {
r0 = null;
function BadgeContent({value, countA11yLabel, unread, lowPriority, unreadA11yLabel}) { // fn#112993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:907, offset: 0x023e4ed6, size: 313 bytes, params: 2, frame: 23
var r0;
var object;
var Badge;
var intl;
const styles = useStyles();
if (value > 0) {
Badge = (require(1305) /* metro dependency 1305: native */).Badge;
var badgeProps = {style: lowPriority && styles.lowPriorityBadge, value: value, accessible: false};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
badgeProps.accessibilityLabel = intl.formatToPlainString(countA11yLabel ?? (require(1244) /* metro dependency 1244: indexNative */).t.XNn2u2,
{count: value});
value = (
<View style={{margin: 3}}>
<Badge {...badgeProps} />
</View>
);
r0 = value;
} else if (unread) {
object = {accessibilityLabel: unreadA11yLabel};
value = importDefault(9609) /* metro dependency 9609: Badge */;
value = (
<View {...object}>
{((Component) => <Component size={12} style={styles.unread} />)(value)}
</View>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
return r0;
}
function _fun112994() { // fn#112994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:317, offset: 0x023e500f, size: 215 bytes, params: 1, frame: 16
const object2 = {};
object2.container = {position: 'relative'};
object2.content = {position: 'absolute'};
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object2.lowPriorityBadge = {backgroundColor: PRIMARY_400};
const object3 = {};
let TAB_BAR_UNREAD_BADGE_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TAB_BAR_UNREAD_BADGE_SIZE;
object3.height = TAB_BAR_UNREAD_BADGE_SIZE;
TAB_BAR_UNREAD_BADGE_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TAB_BAR_UNREAD_BADGE_SIZE;
object3.width = TAB_BAR_UNREAD_BADGE_SIZE;
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
object3.borderRadius = BADGE_SIZE / 2;
object2.unread = object3;
const binding = env0_12;
object2.avatarTablet = {width: binding, height: binding};
object2.avatarCutoutWrapper = {padding: PX_4};
return object2;
}
function _fun112995(a0) { // fn#112995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:704, offset: 0x023e50e6, size: 164 bytes, params: 2, frame: 18
const object2 = {};
const binding = env0_12;
const value2 = -(a0 - binding) / 2;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.containerTablet = {left: value2 + PX_24};
const object4 = {'width': null, 'left': null, 'height': null, 'justifyContent': 'center', 'position': 'absolute',
'bottom': 0, 'top': 0};
const value = a0 - binding;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.width = value - PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.left = binding + PX_16;
object4.height = binding;
object2.usernameTablet = object4;
return object2;
}
function BadgableTabBarIcon(a0) { // fn#112996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:1722, offset: 0x023e518a, size: 737 bytes, params: 2, frame: 32
var r6;
var r0;
var object3;
var intl;
var ClipView;
const badgeA11yLabel = a0.badgeA11yLabel;
const color = a0.color;
const icon = a0.icon;
const iconAnimated = a0.iconAnimated;
a0.focused;
const navigation = a0.navigation;
const useBadgeCount = a0.useBadgeCount;
const value = undefined;
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('BadgableTabBarIcon');
const styles = useStyles();
const value4 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
const md = ICON_SIZE.md;
let object4 = {iconSize: md};
const value5 = BadgableTabBarIconUseIconContentStyle(object4);
const value6 = useBadgeCount();
const value7 = value6.value;
const showDot = value6.showDot;
const lowPriority = value6.lowPriority;
const value8 = BadgableTabBarIconUseIconBadgeCutout({iconSize: md, cutoutRadius: 11, badgeCount: value7,
isWindowLarge: value4});
const binding = env0_3;
const value9 = null;
const value10 = binding.useRef(value9);
const r11 = value4 ? value : iconAnimated;
let r10 = value7 > 0 || showDot;
env0_3.useEffect(_fun113001, [navigation, r11]);
if (r10) {
var viewBindingProps = {style: [styles.content, value5]};
object3 = {value: value7, countA11yLabel: badgeA11yLabel, unread: showDot, lowPriority: lowPriority};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.unreadA11yLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sRUdB8);
r6 = <View {...viewBindingProps}><BadgeContent {...object3} /></View>;
} else {
r6 = value9;
function _fun112994() { // fn#112994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:317, offset: 0x023e500f, size: 215 bytes, params: 1, frame: 16
const object = {};
object.container = {position: 'relative'};
object.content = {position: 'absolute'};
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object.lowPriorityBadge = {backgroundColor: PRIMARY_400};
const object4 = {};
let TAB_BAR_UNREAD_BADGE_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TAB_BAR_UNREAD_BADGE_SIZE;
object4.height = TAB_BAR_UNREAD_BADGE_SIZE;
TAB_BAR_UNREAD_BADGE_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TAB_BAR_UNREAD_BADGE_SIZE;
object4.width = TAB_BAR_UNREAD_BADGE_SIZE;
const BADGE_SIZE = (NativeModule).BADGE_SIZE;
object4.borderRadius = BADGE_SIZE / 2;
object.unread = object4;
const binding = env0_12;
object.avatarTablet = {width: binding, height: binding};
object.avatarCutoutWrapper = {padding: PX_4};
return object;
}
if (value9 != r11) {
object4 = {};
object4.style = styles.container;
ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
r10 = r10 ? [value8] : [];
object4.children = [<ClipView cutouts={r10}>{((Component) => <Component ref={value10} size={value3 ? 'refresh_sm' : 'md'} color={color} />)(r11)}</ClipView>,
r6];
r0 = object4;
} else {
object4 = {};
object4.style = styles.container;
object4.children = [((Component) => <Component cutouts={r10 ? [value8] : []}>{((BaseIconImage) => <BaseIconImage source={icon} size="sm" color={color} />)((require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */),
r6];
r0 = object4;
function _fun112995(a0) { // fn#112995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:704, offset: 0x023e50e6, size: 164 bytes, params: 2, frame: 18
const object = {};
const binding = env0_12;
const value2 = -(a0 - binding) / 2;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.containerTablet = {left: value2 + PX_24};
const object3 = {'width': null, 'left': null, 'height': null, 'justifyContent': 'center', 'position': 'absolute',
'bottom': 0, 'top': 0};
const value = a0 - binding;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.width = value - PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.left = binding + PX_16;
object3.height = binding;
object.usernameTablet = object3;
return object;
}
return <View {...r0} />;
}
function YouIcon({focused, tintColor, navigation}) { // fn#113003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:3112, offset: 0x023e5701, size: 2000 bytes, params: 2, frame: 48
var view;
var View2;
var Avatar;
var items5;
let env0_3 = undefined;
const value3 = (require(14937) /* metro dependency 14937: useTabBarStyles */).useTabletIconYouWidth();
const value4 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('YouIcon');
const value5 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let r23 = value5 ? AvatarSizes.NORMAL : value4 ? AvatarSizes.XSMALL : AvatarSizes.TABS_22;
const styles = useStyles();
const styles2 = useStyles(value3);
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value6 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(currentUser);
const status = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelfPresenceStore],
function() {
return SelfPresenceStore.getStatus();
});
let r21 = status != null && status !== StatusTypes.UNKNOWN;
const value10 = currentUser?.avatar == null;
const guildId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
let binding = env0_3;
const value11 = binding.useRef(null);
(require(14940) /* metro dependency 14940: useGuildTagCoachmark */).useGuildTagAvailableCoachmark(value11,
guildId ?? null);
(require(14940) /* metro dependency 14940: useGuildTagCoachmark */).useGuildTagUpdatedCoachmark(value11,
currentUser ?? null);
(importDefault(14743) /* metro dependency 14743: usePrivateProfileCoachmark */)(value11);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
env0_3 = useReducedMotion;
const r31 = value5 || focused ? 1 : 0.5;
binding = env0_3;
const value14 = binding.useRef(null);
const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
const value16 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value17 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
const value18 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
const value22 = binding.useCallback(_fun113011, [useReducedMotion, binding.useCallback(_fun113008, [value15]),
binding.useCallback(_fun113009, [value16]), binding.useCallback(_fun113010, [value17, value18])]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = YouIconX;
closure.__closure = {scaleDownAnimation: value15, rotationAnimation: value16, wobbleAnimationX: value17,
wobbleAnimationY: value18};
closure.__workletHash = 3024112617373;
closure.__initData = env0_16;
const value23 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding.useEffect(function() {
return navigation.addListener('tabPress', _fun113014);
}, [navigation, value22]);
const StatusSizes = (require(1305) /* metro dependency 1305: native */).StatusSizes;
const REFRESH_MEDIUM_10 = StatusSizes.REFRESH_MEDIUM_10;
const value24 = REFRESH_MEDIUM_10 / 2 + 3;
const value25 = binding.useMemo(_fun113015, [status, r23, value24, REFRESH_MEDIUM_10]);
const r34 = value5 ? 'lg' : 'md';
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
const value28 = env0_3.useMemo(_fun113016, [ICON_SIZE[r34], value24, REFRESH_MEDIUM_10]);
object = {opacity: r31};
const containerTablet = value5 ? styles2.containerTablet : undefined;
if (value10) {
items5 = [((Component) => <Component cutouts={r21 ? [value28] : []}>{((YouTabLottie) => <YouTabLottie ref={value14} size={r34} color={tintColor} opacity={r31} />)((require(12771) /* metro dependency 12771: YouTabLottie */).YouTabLottie)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)];
r21 = r21 && <View style={[styles.content, {bottom: -2, right: -2 - REFRESH_MEDIUM_10 + 4},
object]}>{((Status) => <Status size={REFRESH_MEDIUM_10 ?? (require(1305) /* metro dependency 1305: native */).StatusSizes.MEDIUM} status={status} />)((require(1305) /* metro dependency 1305: native */).Status)}</View>;
items5[1] = r21;
view = <View>{items5}</View>;
} else {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [value23]};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var avatarProps = {user: currentUser, guildId: undefined, style: value5 ? styles.avatarTablet : undefined,
size: r23, animate: false, needsOffscreenAlphaCompositing: true,
avatarDecoration: currentUser?.avatarDecoration};
r23 = r21 ? status : undefined;
avatarProps.status = r23;
r23 = value5 ? undefined : REFRESH_MEDIUM_10;
avatarProps.statusSizeOverride = r23;
r23 = value5 ? undefined : [{bottom: -REFRESH_MEDIUM_10 / 2, right: 1 - REFRESH_MEDIUM_10}, object];
avatarProps.statusStyle = r23;
r23 = value5 ? undefined : value25;
avatarProps.cutout = r23;
r23 = value5 ? !!value5 : undefined;
avatarProps.autoStatusCutout = r23;
view = <View2 {...view2Props}><Avatar {...avatarProps} /></View2>;
function BadgableTabBarIcon(a0) { // fn#112996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:1722, offset: 0x023e518a, size: 737 bytes, params: 2, frame: 32
var r6;
var r0;
var object;
var intl;
var ClipView;
const badgeA11yLabel = a0.badgeA11yLabel;
const color = a0.color;
const icon = a0.icon;
const iconAnimated = a0.iconAnimated;
a0.focused;
const navigation = a0.navigation;
const useBadgeCount = a0.useBadgeCount;
const value = undefined;
const value3 = (MobileVisualRefreshExperiment)('BadgableTabBarIcon');
const styles = useStyles();
const value4 = (UseIsWindowLarge)();
const ICON_SIZE = (IconSizeModule).ICON_SIZE;
const md = ICON_SIZE.md;
let object2 = {iconSize: md};
const value5 = BadgableTabBarIconUseIconContentStyle(object2);
const value6 = useBadgeCount();
const value7 = value6.value;
const showDot = value6.showDot;
const lowPriority = value6.lowPriority;
const value8 = BadgableTabBarIconUseIconBadgeCutout({iconSize: md, cutoutRadius: 11, badgeCount: value7,
isWindowLarge: value4});
const value9 = null;
const value10 = ReactModule.useRef(value9);
const r11 = value4 ? value : iconAnimated;
let r10 = value7 > 0 || showDot;
ReactModule.useEffect(_fun113001, [navigation, r11]);
if (r10) {
var viewBindingProps = {style: [styles.content, value5]};
object = {value: value7, countA11yLabel: badgeA11yLabel, unread: showDot, lowPriority: lowPriority};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.unreadA11yLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sRUdB8);
r6 = (
<View {...viewBindingProps}>
<BadgeContent {...object} />
</View>
);
} else {
r6 = value9;
}
if (value9 != r11) {
object2 = {};
object2.style = styles.container;
ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
r10 = r10 ? [value8] : [];
object2.children = [
<ClipView cutouts={r10}>
{((Component) => <Component ref={value10} size={value3 ? 'refresh_sm' : 'md'} color={color} />)(r11)}
</ClipView>,
r6,
];
r0 = object2;
} else {
object2 = {};
object2.style = styles.container;
object2.children = [
((Component) => <Component cutouts={r10 ? [value8] : []}>{((BaseIconImage) => <BaseIconImage source={icon} size="sm" color={color} />)((require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */),
r6,
];
r0 = object2;
}
return <View {...r0} />;
function BadgableTabBarIconUseIconContentStyle({iconSize, offset, adjustForYouTab}) { // fn#112997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:1921, owner: BadgableTabBarIcon.useIconContentStyle, offset: 0x023e546b, size: 94 bytes, params: 2, frame: 16
var environment;
offset = offset === undefined ? 0 : offset;
adjustForYouTab = !(adjustForYouTab === undefined) && adjustForYouTab;
const value = environment.__proto__;
return env1_3.useMemo(function() {
var r3;
var adjustForYouTabBinding = adjustForYouTab;
var iconSizeBinding = iconSize;
r3 = adjustForYouTabBinding ? 0.55 * iconSizeBinding : iconSizeBinding / 3;
adjustForYouTabBinding = adjustForYouTab;
iconSizeBinding = iconSize;
return {borderRadius: 8, top: r3 + offset,
left: (adjustForYouTabBinding ? 0.65 * iconSizeBinding : 0.625 * iconSizeBinding) + offset};
}, [iconSize, offset, adjustForYouTab]);
}
function BadgableTabBarIconUseIconBadgeCutout({iconSize, offset, cutoutRadius, badgeCount, isWindowLarge}) { // fn#112999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2152, owner: BadgableTabBarIcon.useIconBadgeCutout, offset: 0x023e553a, size: 114 bytes, params: 2, frame: 18
var environment;
offset = offset === undefined ? 0 : offset;
const value = environment.__proto__;
return env1_3.useMemo(_fun113000, [iconSize, offset, cutoutRadius, badgeCount, isWindowLarge]);
function _fun113000() { // fn#113000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2267, offset: 0x023e55ac, size: 242 bytes, params: 1, frame: 14
let r1 = badgeCount > 0 ? {'x': 0, 'y': 0, 'size': 0} : {'x': 2, 'y': 2, 'size': -4};
const object = {};
const CutoutShape = (ClipViewModule).CutoutShape;
const Circle = CutoutShape.Circle;
object.shape = Circle;
let isWindowLargeBinding = isWindowLarge;
let iconSizeBinding = iconSize;
object.x = (isWindowLargeBinding ? 0.67 * iconSizeBinding : 0.625 * iconSizeBinding + r1.x) + offset;
isWindowLargeBinding = isWindowLarge;
iconSizeBinding = iconSize;
object.y = (isWindowLargeBinding ? 0.57 * iconSizeBinding : iconSizeBinding / 3 + r1.y) + offset;
isWindowLargeBinding = isWindowLarge;
let value = 2 * cutoutRadius;
if (isWindowLargeBinding) {
r1 = value;
} else {
value += r1.size;
r1 = value;
}
object.size = r1;
return object;
}
}
function _fun113001() { // fn#113001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2555, offset: 0x023e569e, size: 48 bytes, params: 1, frame: 13
if (env0_2 != null) {
return navigation.addListener('tabPress', _fun113002);
}
function _fun113002() { // fn#113002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2604, offset: 0x023e56ce, size: 51 bytes, params: 1, frame: 13
var r1;
var r2;
var current;
const value = environment.__proto__;
const value2 = env1_1 == null;
const value3 = undefined;
if (value2) {
r1 = value2;
r2 = value3;
} else {
current = env1_1.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.play();
}
return value3;
}
}
}
object = [<View style={styles.container} ref={value11}><View style={styles.avatarCutoutWrapper}>{view}</View></View>];
const MobileTrialUserSettingsAvatarBadge = (require(14943) /* metro dependency 14943: MobileTrialUserSettingsAvatarBadge */).MobileTrialUserSettingsAvatarBadge;
object[1] = <MobileTrialUserSettingsAvatarBadge />;
object[2] = value5 && currentUser != null && value6 != null && <View style={styles2.usernameTablet}>{((Component) => <Component userId={currentUser.id} userName={value6} defaultColor="interactive-text-active" variant="text-md/semibold" lineClamp={1} maxFontSizeMultiplier={2} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}</View>;
return (
<View style={containerTablet}>
{object}
</View>
);
}
function BadgableTabBarIconUseIconContentStyle({iconSize, offset, adjustForYouTab}) { // fn#112997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:1921, owner: BadgableTabBarIcon.useIconContentStyle, offset: 0x023e546b, size: 94 bytes, params: 2, frame: 16
var environment;
offset = offset === undefined ? 0 : offset;
adjustForYouTab = !(adjustForYouTab === undefined) && adjustForYouTab;
const value = environment.__proto__;
return env1_3.useMemo(function() {
var r3;
var adjustForYouTabBinding = adjustForYouTab;
var iconSizeBinding = iconSize;
r3 = adjustForYouTabBinding ? 0.55 * iconSizeBinding : iconSizeBinding / 3;
adjustForYouTabBinding = adjustForYouTab;
iconSizeBinding = iconSize;
return {borderRadius: 8, top: r3 + offset,
left: (adjustForYouTabBinding ? 0.65 * iconSizeBinding : 0.625 * iconSizeBinding) + offset};
}, [iconSize, offset, adjustForYouTab]);
}
function YouIcon({focused, tintColor, navigation}) { // fn#113003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:3112, offset: 0x023e5701, size: 2000 bytes, params: 2, frame: 48
var view;
var View2;
var Avatar;
var items5;
let env0_3 = undefined;
const value3 = (UseTabBarStylesModule).useTabletIconYouWidth();
const value4 = (MobileVisualRefreshExperiment)('YouIcon');
const value5 = (UseIsWindowLarge)();
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let r23 = value5 ? AvatarSizes.NORMAL : value4 ? AvatarSizes.XSMALL : AvatarSizes.TABS_22;
const styles = useStyles();
const styles2 = useStyles(value3);
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value6 = (UserUtils).useName(currentUser);
const status = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelfPresenceStore],
function() {
return SelfPresenceStore.getStatus();
});
let r21 = status != null && status !== StatusTypes.UNKNOWN;
const value10 = currentUser?.avatar == null;
const guildId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
let binding = env0_3;
const value11 = binding.useRef(null);
(require(14940) /* metro dependency 14940: useGuildTagCoachmark */).useGuildTagAvailableCoachmark(value11,
guildId ?? null);
(require(14940) /* metro dependency 14940: useGuildTagCoachmark */).useGuildTagUpdatedCoachmark(value11,
currentUser ?? null);
(UsePrivateProfileCoachmark)(value11);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
env0_3 = useReducedMotion;
const r31 = value5 || focused ? 1 : 0.5;
binding = env0_3;
const value14 = binding.useRef(null);
const value15 = (ReanimatedRexportModule).useSharedValue(1);
const value16 = (ReanimatedRexportModule).useSharedValue(0);
const value17 = (ReanimatedRexportModule).useSharedValue(1);
const value18 = (ReanimatedRexportModule).useSharedValue(1);
const value22 = binding.useCallback(_fun113011, [useReducedMotion, binding.useCallback(_fun113008, [value15]),
binding.useCallback(_fun113009, [value16]), binding.useCallback(_fun113010, [value17, value18])]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const YouIconX2 = YouIconX;
YouIconX2.__closure = {scaleDownAnimation: value15, rotationAnimation: value16, wobbleAnimationX: value17,
wobbleAnimationY: value18};
YouIconX2.__workletHash = 3024112617373;
YouIconX2.__initData = env0_16;
const value23 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [YouIconX2]);
binding.useEffect(function() {
return navigation.addListener('tabPress', _fun113014);
}, [navigation, value22]);
const StatusSizes = (require(1305) /* metro dependency 1305: native */).StatusSizes;
const REFRESH_MEDIUM_10 = StatusSizes.REFRESH_MEDIUM_10;
const value24 = REFRESH_MEDIUM_10 / 2 + 3;
const value25 = binding.useMemo(_fun113015, [status, r23, value24, REFRESH_MEDIUM_10]);
const r34 = value5 ? 'lg' : 'md';
const ICON_SIZE = (IconSizeModule).ICON_SIZE;
const value28 = env0_3.useMemo(_fun113016, [ICON_SIZE[r34], value24, REFRESH_MEDIUM_10]);
object = {opacity: r31};
const containerTablet = value5 ? styles2.containerTablet : undefined;
if (value10) {
items5 = [
((Component) => <Component cutouts={r21 ? [value28] : []}>{((YouTabLottie) => <YouTabLottie ref={value14} size={r34} color={tintColor} opacity={r31} />)((require(12771) /* metro dependency 12771: YouTabLottie */).YouTabLottie)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */),
];
r21 = r21 && <View style={[styles.content, {bottom: -2, right: -2 - REFRESH_MEDIUM_10 + 4},
object]}>{((Status) => <Status size={REFRESH_MEDIUM_10 ?? (require(1305) /* metro dependency 1305: native */).StatusSizes.MEDIUM} status={status} />)((require(1305) /* metro dependency 1305: native */).Status)}</View>;
items5[1] = r21;
view = (
<View>
{items5}
</View>
);
} else {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [value23]};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var avatarProps = {user: currentUser, guildId: undefined, style: value5 ? styles.avatarTablet : undefined,
size: r23, animate: false, needsOffscreenAlphaCompositing: true,
avatarDecoration: currentUser?.avatarDecoration};
r23 = r21 ? status : undefined;
avatarProps.status = r23;
r23 = value5 ? undefined : REFRESH_MEDIUM_10;
avatarProps.statusSizeOverride = r23;
r23 = value5 ? undefined : [{bottom: -REFRESH_MEDIUM_10 / 2, right: 1 - REFRESH_MEDIUM_10}, object];
avatarProps.statusStyle = r23;
r23 = value5 ? undefined : value25;
avatarProps.cutout = r23;
r23 = value5 ? !!value5 : undefined;
avatarProps.autoStatusCutout = r23;
view = (
<View2 {...view2Props}>
<Avatar {...avatarProps} />
</View2>
);
}
object = [
<View style={styles.container} ref={value11}>
<View style={styles.avatarCutoutWrapper}>
{view}
</View>
</View>,
];
const MobileTrialUserSettingsAvatarBadge = (MobileTrialUserSettingsAvatarBadgeModule).MobileTrialUserSettingsAvatarBadge;
object[1] = <MobileTrialUserSettingsAvatarBadge />;
object[2] = value5 && currentUser != null && value6 != null && <View style={styles2.usernameTablet}>{((Component) => <Component userId={currentUser.id} userName={value6} defaultColor="interactive-text-active" variant="text-md/semibold" lineClamp={1} maxFontSizeMultiplier={2} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}</View>;
return (
<View style={containerTablet}>
{object}
</View>
);
function _fun113008() { // fn#113008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:3963, offset: 0x023e5ee4, size: 129 bytes, params: 1, frame: 21
const object = {mass: 0.13};
const binding = env0_5;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withSequence = value.withSequence;
const value2 = SpringModule.withSpring(0.7, object);
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, SpringModule.withSpring(1, object)])]);
}
function BadgableTabBarIconUseIconBadgeCutout({iconSize, offset, cutoutRadius, badgeCount, isWindowLarge}) { // fn#112999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2152, owner: BadgableTabBarIcon.useIconBadgeCutout, offset: 0x023e553a, size: 114 bytes, params: 2, frame: 18
var environment;
offset = offset === undefined ? 0 : offset;
const value = environment.__proto__;
return env1_3.useMemo(_fun113000, [iconSize, offset, cutoutRadius, badgeCount, isWindowLarge]);
}
function _fun113009() { // fn#113009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:4090, offset: 0x023e5f65, size: 250 bytes, params: 1, frame: 28
const binding = env0_6;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withSequence = reanimatedRexportModule.withSequence;
const withSpring = SpringModule.withSpring;
const springStandard = (SpringPresetsModule).springStandard;
const value2 = Reflect.apply(withSpring, SpringModule, [-4, springStandard]);
const value3 = SpringModule.withSpring(3, springStandard);
const value4 = SpringModule.withSpring(-2, springStandard);
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [30, Reflect.apply(withSequence,
reanimatedRexportModule, [value2, value3, value4, SpringModule.withSpring(0, springStandard)])])]);
}
function _fun113010() { // fn#113010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:4362, offset: 0x023e605f, size: 759 bytes, params: 1, frame: 38
var value;
let binding = env0_7;
let set = binding.set;
let withDelay = ReanimatedRexportModule.withDelay;
let withSequence = ReanimatedRexportModule.withSequence;
const withSpring = SpringModule.withSpring;
const springStandard = (SpringPresetsModule).springStandard;
const value3 = Reflect.apply(withSpring, SpringModule, [1.09, springStandard]);
const value4 = SpringModule.withSpring(0.9, springStandard);
const value5 = SpringModule.withSpring(1.04, springStandard);
const value6 = SpringModule.withSpring(0.96, springStandard);
const value7 = SpringModule.withSpring(1.02, springStandard);
const value8 = SpringModule.withSpring(0.99, springStandard);
Reflect.apply(set, binding, [Reflect.apply(withDelay, ReanimatedRexportModule, [8, Reflect.apply(withSequence,
ReanimatedRexportModule, [value3, value4, value5, value6, value7, value8, SpringModule.withSpring(1, springStandard)])])]);
binding = env0_8;
set = binding.set;
withDelay = ReanimatedRexportModule.withDelay;
withSequence = ReanimatedRexportModule.withSequence;
const value10 = SpringModule.withSpring(0.87, springStandard);
const value11 = SpringModule.withSpring(1.06, springStandard);
const value12 = SpringModule.withSpring(0.95, springStandard);
const value13 = SpringModule.withSpring(1.04, springStandard);
const value14 = SpringModule.withSpring(0.97, springStandard);
const value15 = SpringModule.withSpring(1.01, springStandard);
value = Reflect.apply(withDelay, value, [8, Reflect.apply(withSequence, ReanimatedRexportModule, [value10, value11, value12,
value13, value14, value15, SpringModule.withSpring(1, springStandard)])]);
Reflect.apply(set, binding, [value]);
}
function _fun113011() { // fn#113011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5184, offset: 0x023e6356, size: 40 bytes, params: 1, frame: 10
if (!useReducedMotion) {
(0, ConstantsModule.StatusTypes)();
(0, JsxRuntimeModule.jsx)();
(0, JsxRuntimeModule.jsxs)();
}
}
function YouIconX() { // fn#113012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5251, owner: YouIcon.x, offset: 0x023e637e, size: 140 bytes, params: 1, frame: 17
const object2 = {};
object2.scale = env0_5.get();
const items2 = [object2];
const object3 = {};
object3.rotate = '' + env0_6.get() + 'deg';
items2[1] = object3;
const object4 = {};
object4.scaleX = env0_7.get();
items2[2] = object4;
const object5 = {};
object5.scaleY = env0_8.get();
items2[3] = object5;
return {transform: items2};
}
function _fun113013() { // fn#113013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5500, offset: 0x023e640a, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('tabPress', _fun113014);
function _fun113014() { // fn#113014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5530, offset: 0x023e642c, size: 59 bytes, params: 1, frame: 13
var r2;
var r3;
var current;
const value2 = env1_4 == null;
const value3 = undefined;
if (value2) {
r2 = value2;
r3 = value3;
} else {
current = env1_4.current;
r2 = current == null;
r3 = current;
}
if (!r2) {
r3.play();
}
env1_12();
return value3;
}
}
function _fun113015() { // fn#113015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5660, offset: 0x023e6467, size: 178 bytes, params: 1, frame: 16
var property;
var object2;
const statusBinding = status;
const UNKNOWN = StatusTypes.UNKNOWN;
const value3 = null;
if (value3 != (statusBinding === UNKNOWN ? value3 : status)) {
property = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[env0_1];
object2 = {};
object2.shape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape.Circle;
object2.x = property - REFRESH_MEDIUM_10 / 2 - 1;
object2.y = property - REFRESH_MEDIUM_10 - 1;
object2.size = 2 * env0_14;
return {nativeCutouts: [object2]};
}
}
function _fun113016() { // fn#113016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5881, offset: 0x023e6519, size: 106 bytes, params: 1, frame: 13
const CutoutShape = (ClipViewModule).CutoutShape;
const Circle = CutoutShape.Circle;
return {shape: Circle, x: env0_15 - 3 - 4, y: env0_15 - REFRESH_MEDIUM_10 - 3, size: 2 * env0_14};
}
function _fun113001() { // fn#113001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2555, offset: 0x023e569e, size: 48 bytes, params: 1, frame: 13
if (env0_2 != null) {
return navigation.addListener('tabPress', _fun113002);
}
}
function _fun113008() { // fn#113008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:3963, offset: 0x023e5ee4, size: 129 bytes, params: 1, frame: 21
const object2 = {mass: 0.13};
const binding = env0_5;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withSequence = value.withSequence;
const springModule = require(4577) /* metro dependency 4577: spring */;
const value2 = springModule.withSpring(0.7, object2);
const moduleValue2 = springModule;
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, moduleValue2.withSpring(1, object2)])]);
}
function _fun113009() { // fn#113009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:4090, offset: 0x023e5f65, size: 250 bytes, params: 1, frame: 28
const binding = env0_6;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withSequence = reanimatedRexportModule.withSequence;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const value2 = Reflect.apply(withSpring, springModule, [-4, springStandard]);
const value3 = springModule.withSpring(3, springStandard);
const value4 = springModule.withSpring(-2, springStandard);
const moduleValue5 = springModule;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [30, Reflect.apply(withSequence,
reanimatedRexportModule, [value2, value3, value4, moduleValue5.withSpring(0, springStandard)])])]);
}
function _fun113010() { // fn#113010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:4362, offset: 0x023e605f, size: 759 bytes, params: 1, frame: 38
var value;
let binding = env0_7;
let set = binding.set;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let withDelay = reanimatedRexportModule.withDelay;
const moduleValue2 = reanimatedRexportModule;
let withSequence = moduleValue2.withSequence;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const value3 = Reflect.apply(withSpring, springModule, [1.09, springStandard]);
const value4 = springModule.withSpring(0.9, springStandard);
const value5 = springModule.withSpring(1.04, springStandard);
const value6 = springModule.withSpring(0.96, springStandard);
const value7 = springModule.withSpring(1.02, springStandard);
const value8 = springModule.withSpring(0.99, springStandard);
const moduleValue9 = springModule;
Reflect.apply(set, binding, [Reflect.apply(withDelay, reanimatedRexportModule, [8, Reflect.apply(withSequence,
moduleValue2, [value3, value4, value5, value6, value7, value8, moduleValue9.withSpring(1, springStandard)])])]);
binding = env0_8;
set = binding.set;
withDelay = reanimatedRexportModule.withDelay;
const moduleValue10 = reanimatedRexportModule;
withSequence = moduleValue10.withSequence;
const value10 = springModule.withSpring(0.87, springStandard);
const value11 = springModule.withSpring(1.06, springStandard);
const value12 = springModule.withSpring(0.95, springStandard);
const value13 = springModule.withSpring(1.04, springStandard);
const value14 = springModule.withSpring(0.97, springStandard);
const value15 = springModule.withSpring(1.01, springStandard);
const moduleValue17 = springModule;
value = Reflect.apply(withDelay, value, [8, Reflect.apply(withSequence, moduleValue10, [value10, value11, value12,
value13, value14, value15, moduleValue17.withSpring(1, springStandard)])]);
Reflect.apply(set, binding, [value]);
}
function _fun113011() { // fn#113011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5184, offset: 0x023e6356, size: 40 bytes, params: 1, frame: 10
if (!useReducedMotion) {
env0_9();
env0_10();
env0_11();
}
}
function YouIconX() { // fn#113012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5251, owner: YouIcon.x, offset: 0x023e637e, size: 140 bytes, params: 1, frame: 17
const object = {};
object.scale = env0_5.get();
const items2 = [object];
const object6 = {};
object6.rotate = '' + env0_6.get() + 'deg';
items2[1] = object6;
const object7 = {};
object7.scaleX = env0_7.get();
items2[2] = object7;
const object8 = {};
object8.scaleY = env0_8.get();
items2[3] = object8;
return {transform: items2};
}
function _fun113013() { // fn#113013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5500, offset: 0x023e640a, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('tabPress', _fun113014);
}
function _fun113015() { // fn#113015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5660, offset: 0x023e6467, size: 178 bytes, params: 1, frame: 16
var property;
var object;
const statusBinding = status;
const UNKNOWN = StatusTypes.UNKNOWN;
const value3 = null;
if (value3 != (statusBinding === UNKNOWN ? value3 : status)) {
property = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[env0_1];
object = {};
object.shape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape.Circle;
object.x = property - REFRESH_MEDIUM_10 / 2 - 1;
object.y = property - REFRESH_MEDIUM_10 - 1;
object.size = 2 * env0_14;
return {nativeCutouts: [object]};
}
}
function _fun113016() { // fn#113016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5881, offset: 0x023e6519, size: 106 bytes, params: 1, frame: 13
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const Circle = CutoutShape.Circle;
return {shape: Circle, x: env0_15 - 3 - 4, y: env0_15 - REFRESH_MEDIUM_10 - 3, size: 2 * env0_14};
}
function _fun113000() { // fn#113000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2267, offset: 0x023e55ac, size: 242 bytes, params: 1, frame: 14
let r1 = badgeCount > 0 ? {'x': 0, 'y': 0, 'size': 0} : {'x': 2, 'y': 2, 'size': -4};
const object2 = {};
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const Circle = CutoutShape.Circle;
object2.shape = Circle;
let isWindowLargeBinding = isWindowLarge;
let iconSizeBinding = iconSize;
object2.x = (isWindowLargeBinding ? 0.67 * iconSizeBinding : 0.625 * iconSizeBinding + r1.x) + offset;
isWindowLargeBinding = isWindowLarge;
iconSizeBinding = iconSize;
object2.y = (isWindowLargeBinding ? 0.57 * iconSizeBinding : iconSizeBinding / 3 + r1.y) + offset;
isWindowLargeBinding = isWindowLarge;
let value = 2 * cutoutRadius;
if (isWindowLargeBinding) {
r1 = value;
} else {
value += r1.size;
r1 = value;
}
object2.size = r1;
return object2;
}
function _fun113002() { // fn#113002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2604, offset: 0x023e56ce, size: 51 bytes, params: 1, frame: 13
var r1;
var r2;
var current;
const value = environment.__proto__;
const value2 = env1_1 == null;
const value3 = undefined;
if (value2) {
r1 = value2;
r2 = value3;
} else {
current = env1_1.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.play();
}
return value3;
}
function _fun113014() { // fn#113014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5530, offset: 0x023e642c, size: 59 bytes, params: 1, frame: 13
var r2;
var r3;
var current;
const value2 = env1_4 == null;
const value3 = undefined;
if (value2) {
r2 = value2;
r3 = value3;
} else {
current = env1_4.current;
r2 = current == null;
r3 = current;
}
if (!r2) {
r3.play();
}
env1_12();
return value3;
}
global.__d(_fun112992, 14939, [31, 27, 4502, 3969, 6876, 1878, 482, 33, 1305, 697, 4501, 1244, 9609, 7599, 1357,
7556, 6817, 3859, 14937, 632, 3995, 14940, 14743, 4017, 4577, 4581, 12771, 14943, 8696,
2]) /* metro module 14939, dependencies: [31, 27, 4502, 3969, 6876, 1878, 482, 33, 1305, 697, 4501, 1244, 9609, 7599, 1357, 7556, 6817, 3859, 14937, 632, 3995, 14940, 14743, 4017, 4577, 4581, 12771, 14943, 8696, 2] */;
@@ -1,44 +1,49 @@
/* Metro module 9609; source: modules/main_tabs_v2/native/shared_components/Badge.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun75298(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9795:6, offset: 0x01da912d, size: 293 bytes, params: 8, frame: 23
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.badge = {backgroundColor: BACKGROUND_BRAND};
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.badgeClassic = {backgroundColor: INTERACTIVE_TEXT_ACTIVE};
object2.mask = {'alignItems': 'center', 'justifyContent': 'center'};
const env0_2 = Reflect.apply(createStyles, createStylesModule, [object2]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
object.badge = {backgroundColor: BACKGROUND_BRAND};
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
object.badgeClassic = {backgroundColor: INTERACTIVE_TEXT_ACTIVE};
object.mask = {'alignItems': 'center', 'justifyContent': 'center'};
const env0_2 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(Badge);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/Badge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/Badge.tsx');
exports.default = value;
exports.DEFAULT_BADGE_SIZE = 12;
exports.CHANNEL_BADGE_SIZE = 8;
exports.DEFAULT_BADGE_MASK_SIZE = 4;
}
function Badge({size, maskSize, classic, maskColor, style, badgeStyle}) { // fn#75299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9795:352, offset: 0x01da9252, size: 228 bytes, params: 2, frame: 22
size = size === undefined ? 12 : size;
maskSize = maskSize === undefined ? 4 : maskSize;
classic = !(classic === undefined) && classic;
const styles = useStyles();
const value6 = size + 2 * maskSize;
return (
<View
style={[styles.mask, maskColor != null ? {backgroundColor: maskColor, height: value6, width: value6,
borderRadius: value6 / 2} : undefined, style]}
>
function Badge({size, maskSize, classic, maskColor, style, badgeStyle}) { // fn#75299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9795:352, offset: 0x01da9252, size: 228 bytes, params: 2, frame: 22
size = size === undefined ? 12 : size;
maskSize = maskSize === undefined ? 4 : maskSize;
classic = !(classic === undefined) && classic;
const styles = useStyles();
const value6 = size + 2 * maskSize;
return (
<View
style={[classic ? styles.badgeClassic : styles.badge, {height: size, width: size,
borderRadius: size / 2}, badgeStyle]}
/>
</View>
);
style={[styles.mask, maskColor != null ? {backgroundColor: maskColor, height: value6, width: value6,
borderRadius: value6 / 2} : undefined, style]}
>
<View
style={[classic ? styles.badgeClassic : styles.badge, {height: size, width: size,
borderRadius: size / 2}, badgeStyle]}
/>
</View>
);
}
}
global.__d(_fun75298, 9609, [31, 27, 33, 4501, 697,
2]) /* metro module 9609, dependencies: [31, 27, 33, 4501, 697, 2] */;
@@ -1,171 +1,241 @@
/* Metro module 10975; source: modules/main_tabs_v2/native/shared_components/ChannelRowPreview.tsx; dependencies: [31, 27, 3793, 33, 6697, 9759, 8841, 9786, 4056, 10976, 8850, 9616, 4584, 10978, 1357, 10919, 10981, 8518, 4573, 1244, 4048, 4501, 697, 3829, 8177, 9773, 8368, 566, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ChatItem from '../../../../components_native/chat/ChatItem.tsx'; /* Metro dependency 9773 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as RowGeneratorTypesModule from '../../../messages/native/renderer/RowGeneratorTypes.tsx'; /* Metro dependency 8368 */
import * as UseScaledTextLineHeightAndroidModule from '../../../screen/native/useScaledTextLineHeight.android.tsx'; /* Metro dependency 8518 */
import * as UseFormattedMessagePreviewModule from '../../../message_previews/useFormattedMessagePreview.tsx'; /* Metro dependency 10919 */
import * as MessagePreviewMarkupModule from '../../../message_previews/native/MessagePreviewMarkup.tsx'; /* Metro dependency 10978 */
import * as ChannelListLayoutModule from './guild_channels/layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
function _fun84032(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:6, offset: 0x01f34fd7, size: 274 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = ChannelRowPreview;
const closure2 = NativeChannelRowPreview;
const ChannelRowPreview2 = ChannelRowPreview;
const NativeChannelRowPreview2 = NativeChannelRowPreview;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const env0_8 = value2.Fragment;
let value = ReactModule;
const env0_9 = value.memo(_fun84038);
value = value.memo(_fun84039);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/ChannelRowPreview.tsx');
exports.ChannelRowPreview = closure;
exports.NativeChannelRowPreview = closure2;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/ChannelRowPreview.tsx');
exports.ChannelRowPreview = ChannelRowPreview2;
exports.NativeChannelRowPreview = NativeChannelRowPreview2;
exports.NativeMessageChannelRowPreview = value;
function PreviewIcon(a0) { // fn#84033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:171, offset: 0x01f350e9, size: 561 bytes, params: 2, frame: 16
const icon = a0.icon;
const value = Object.create(null);
value.icon = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
if (icon === 'image') {
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
return <ImageIcon {...value2} />;
}
if (icon === 'video') {
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
return <VideoIcon {...value2} />;
}
if (icon === 'audio') {
const MusicIcon = (require(8841) /* metro dependency 8841: MusicIcon */).MusicIcon;
return <MusicIcon {...value2} />;
}
if (icon === 'attachment') {
const AttachmentIcon = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
return <AttachmentIcon {...value2} />;
}
if (icon === 'link') {
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return <LinkIcon {...value2} />;
}
if (icon === 'sticker') {
const StickerIcon = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
return <StickerIcon {...value2} />;
}
if (icon === 'call-active') {
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
return <PhoneCallIcon {...value2} />;
}
if (icon === 'call-ended') {
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
return <PhoneHangUpIcon {...value2} />;
}
}
function ChannelRowPreview({message, channel, layout, lineClamp, muted, variant, color, hasReplyNudge}) { // fn#84034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:859, offset: 0x01f3531a, size: 852 bytes, params: 2, frame: 32
var r6;
var jsxRuntimeEnv0_8Binding;
var items3;
var intl;
lineClamp = lineClamp === undefined ? 1 : lineClamp;
const value4 = (MobileVisualRefreshExperiment)('ChannelRowPreview');
const value5 = (UseFontScaleModule).useFontScale();
const value6 = (UseFormattedMessagePreviewModule).useFormattedMessagePreview(message,
channel);
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(layout);
const value8 = UseScaledTextLineHeightAndroidModule.scaleTextLineHeight(layoutStyles.messagePreview.text.variant,
value5);
if (value6 == null) {
return null;
}
const authorLabel = value6.authorLabel;
const color2 = value6.color;
const trailingIcon = value6.trailingIcon;
const r13 = color ?? color2;
const type = value6.type;
const r10 = (
type === 'text'
? value6.text
: (
type === 'markup'
? ((Component) => <Component markup={value6.type === 'markup' ? value6.markup : value6.message.content} channelId={message.channel_id} guildId={channel.guild_id} muted={muted} layout={layout} color={r13} />)(env0_9)
: (
type !== 'message'
? undefined
: ((Component) => <Component markup={value6.type === 'markup' ? value6.markup : value6.message.content} channelId={message.channel_id} guildId={channel.guild_id} muted={muted} layout={layout} color={r13} />)(env0_9)
)
)
);
const object2 = {'flexDirection': 'row', 'alignItems': 'center'};
object2.minHeight = value8;
const Text = (TextModule).Text;
const text = (
<Text
lineClamp={lineClamp}
variant={variant ?? (value4 ? 'text-sm/normal' : layoutStyles.messagePreview.text.variant)}
maxFontSizeMultiplier={1.75}
color={r13}
style={{'paddingBottom': 2, 'flexShrink': 1}}
>
{authorLabel != null && '' + authorLabel + ': '}
{r10}
</Text>
);
const r7 = trailingIcon != null && <PreviewIcon icon={trailingIcon} size={layoutStyles.messagePreview.messageTypeIconSizeNew} color={r13} style={{marginLeft: 4}} />;
if (hasReplyNudge) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items3 = [
<Text
variant="text-xs/semibold"
color="text-muted"
maxFontSizeMultiplier={1.75}
style={{'paddingBottom': 2, 'marginHorizontal': 4}}
>
{'·'}
</Text>,
];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text
variant="text-xs/semibold"
color="text-brand"
maxFontSizeMultiplier={1.75}
style={{paddingBottom: 2}}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VaKgGF)}
</Text>
);
r6 = (
<>
{items3}
</>
);
} else {
r6 = hasReplyNudge;
}
return (
<View style={object2}>
{text}
{r7}
{r6}
</View>
);
}
function NativeChannelRowPreview({message, lineClamp, messageSizeCacheRef, maxHeight, backgroundColor, gifAutoPlay, gradientStyles}) { // fn#84035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:2183, offset: 0x01f3566e, size: 380 bytes, params: 2, frame: 26
gifAutoPlay = !(gifAutoPlay === undefined) && gifAutoPlay;
const value2 = (UseTheme)();
const createNativeStyleProperties = CreateStylesModule.createNativeStyleProperties;
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
const env0_2 = Reflect.apply(createNativeStyleProperties, CreateStylesModule,
[{seeMoreLabelColor: TEXT_DEFAULT}])(value2);
const RenderEmbeds = (UserSettingsModule).RenderEmbeds;
const setting = RenderEmbeds.getSetting();
const setting3 = setting;
const InlineEmbedMedia = (UserSettingsModule).InlineEmbedMedia;
const setting2 = InlineEmbedMedia.getSetting();
const InlineAttachmentMedia = (UserSettingsModule).InlineAttachmentMedia;
return ((Component) => <Component pointerEvents="none" horizontalOffset={0} modifyRow={modifyRow_84037} message={message} rowGenerator={setting3.useMemo(_fun84036,
[setting, setting2, InlineAttachmentMedia.getSetting(),
gifAutoPlay])} messageSizeCacheRef={messageSizeCacheRef} maxHeight={maxHeight} backgroundColor={backgroundColor} gradientStyles={gradientStyles} />)(ChatItem);
function _fun84036() { // fn#84036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:2573, offset: 0x01f357ea, size: 163 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
value = new value();
value.setOptions({renderEmbeds: env0_3, inlineEmbedMedia: ReactNativeModule.View, inlineAttachmentMedia: env0_5,
renderReactions: false, animateEmoji: false, gifAutoPlay: gifAutoPlay, renderReplies: false,
renderCodedLinks: false, renderGiftCode: false, renderActivityInviteEmbed: false, renderThreadEmbeds: false,
renderForumPostActions: false, ignoreMentioned: true, enableSwipeActions: false, renderExecutedCommands: false,
useAlternateEmbedColors: true});
return value;
}
function NativeChannelRowPreviewModifyRow(a0) { // fn#84037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3038, owner: NativeChannelRowPreview.modifyRow, offset: 0x01f3588d, size: 106 bytes, params: 2, frame: 13
const MessageContextType = (RowGeneratorTypesModule).MessageContextType;
const SEARCH = MessageContextType.SEARCH;
a0.contextType = SEARCH;
if (lineClamp != null) {
a0.truncation = {'numberOfLines': null, 'expandable': false, 'seeMoreLabel': '...', numberOfLines: lineClamp,
seeMoreLabelColor: env0_2.seeMoreLabelColor};
}
}
}
function _fun84038({markup, channelId, guildId, muted, layout, color}) { // fn#84038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:643, offset: 0x01f358f7, size: 129 bytes, params: 2, frame: 19
let value = UseFontScaleModule;
value = value.useFontScale();
return MessagePreviewMarkupModule.renderMessagePreviewMarkup({content: markup, muted: muted, guildId: guildId,
channelId: channelId, layout: layout, color: color, fontScale: value});
}
function _fun84039(a0) { // fn#84039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3325, offset: 0x01f35978, size: 179 bytes, params: 2, frame: 21
const env0_0 = a0;
const value2 = (FluxModule).useStateFromStores([RelationshipStore], _fun84040,
[a0.message.author.id]);
return (
UseFormattedMessagePreviewModule.isMessageContentPreviewable(a0.message)
? (
value2
? (
<ChannelRowPreview {...a0} />
)
: (
<NativeChannelRowPreview {...a0} />
)
)
: (
<ChannelRowPreview {...a0} />
)
);
function _fun84040() { // fn#84040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3376, offset: 0x01f35a2b, size: 43 bytes, params: 1, frame: 11
const relationshipStoreBinding = RelationshipStore;
return relationshipStoreBinding.isBlockedOrIgnored(env0_0.message.author.id);
}
}
}
function PreviewIcon(a0) { // fn#84033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:171, offset: 0x01f350e9, size: 561 bytes, params: 2, frame: 16
const icon = a0.icon;
const value = Object.create(null);
value.icon = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
if (icon === 'image') {
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
return <ImageIcon {...value2} />;
}
if (icon === 'video') {
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
return <VideoIcon {...value2} />;
}
if (icon === 'audio') {
const MusicIcon = (require(8841) /* metro dependency 8841: MusicIcon */).MusicIcon;
return <MusicIcon {...value2} />;
}
if (icon === 'attachment') {
const AttachmentIcon = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
return <AttachmentIcon {...value2} />;
}
if (icon === 'link') {
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return <LinkIcon {...value2} />;
}
if (icon === 'sticker') {
const StickerIcon = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
return <StickerIcon {...value2} />;
}
if (icon === 'call-active') {
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
return <PhoneCallIcon {...value2} />;
}
if (icon === 'call-ended') {
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
return <PhoneHangUpIcon {...value2} />;
}
}
function ChannelRowPreview({message, channel, layout, lineClamp, muted, variant, color, hasReplyNudge}) { // fn#84034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:859, offset: 0x01f3531a, size: 852 bytes, params: 2, frame: 32
var r6;
var jsxRuntimeEnv0_8Binding;
var items3;
var intl;
lineClamp = lineClamp === undefined ? 1 : lineClamp;
const value4 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelRowPreview');
const value5 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const value6 = (require(10919) /* metro dependency 10919: useFormattedMessagePreview */).useFormattedMessagePreview(message,
channel);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
const useScaledTextLineHeightAndroidModule = require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */;
const value8 = useScaledTextLineHeightAndroidModule.scaleTextLineHeight(layoutStyles.messagePreview.text.variant,
value5);
if (value6 == null) {
return null;
}
const authorLabel = value6.authorLabel;
const color2 = value6.color;
const trailingIcon = value6.trailingIcon;
const r13 = color ?? color2;
const type = value6.type;
const r10 = type === 'text' ? value6.text : type === 'markup' ? ((Component) => <Component markup={value6.type === 'markup' ? value6.markup : value6.message.content} channelId={message.channel_id} guildId={channel.guild_id} muted={muted} layout={layout} color={r13} />)(env0_9) : type !== 'message' ? undefined : ((Component) => <Component markup={value6.type === 'markup' ? value6.markup : value6.message.content} channelId={message.channel_id} guildId={channel.guild_id} muted={muted} layout={layout} color={r13} />)(env0_9);
const object = {'flexDirection': 'row', 'alignItems': 'center'};
object.minHeight = value8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text lineClamp={lineClamp} variant={variant ?? (value4 ? 'text-sm/normal' : layoutStyles.messagePreview.text.variant)} maxFontSizeMultiplier={1.75} color={r13} style={{'paddingBottom': 2,
'flexShrink': 1}}>{authorLabel != null && '' + authorLabel + ': '}{r10}</Text>;
const r7 = trailingIcon != null && <PreviewIcon icon={trailingIcon} size={layoutStyles.messagePreview.messageTypeIconSizeNew} color={r13} style={{marginLeft: 4}} />;
if (hasReplyNudge) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items3 = [<Text variant="text-xs/semibold" color="text-muted" maxFontSizeMultiplier={1.75} style={{'paddingBottom': 2,
'marginHorizontal': 4}}>{'·'}</Text>];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text variant="text-xs/semibold" color="text-brand" maxFontSizeMultiplier={1.75} style={{paddingBottom: 2}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VaKgGF)}</Text>;
r6 = <>{items3}</>;
} else {
r6 = hasReplyNudge;
}
return (
<View style={object}>
{text}
{r7}
{r6}
</View>
);
}
function NativeChannelRowPreview({message, lineClamp, messageSizeCacheRef, maxHeight, backgroundColor, gifAutoPlay, gradientStyles}) { // fn#84035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:2183, offset: 0x01f3566e, size: 380 bytes, params: 2, frame: 26
gifAutoPlay = !(gifAutoPlay === undefined) && gifAutoPlay;
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const env0_2 = Reflect.apply(createNativeStyleProperties, createStylesModule,
[{seeMoreLabelColor: TEXT_DEFAULT}])(value2);
const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds;
const setting = RenderEmbeds.getSetting();
const env0_3 = setting;
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
const setting2 = InlineEmbedMedia.getSetting();
const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia;
return ((Component) => <Component pointerEvents="none" horizontalOffset={0} modifyRow={modifyRow} message={message} rowGenerator={env0_3.useMemo(_fun84036,
[setting, setting2, InlineAttachmentMedia.getSetting(),
gifAutoPlay])} messageSizeCacheRef={messageSizeCacheRef} maxHeight={maxHeight} backgroundColor={backgroundColor} gradientStyles={gradientStyles} />)(importDefault(9773) /* metro dependency 9773: ChatItem */);
}
function _fun84038({markup, channelId, guildId, muted, layout, color}) { // fn#84038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:643, offset: 0x01f358f7, size: 129 bytes, params: 2, frame: 19
let value = require(4584) /* metro dependency 4584: useFontScale */;
value = value.useFontScale();
const messagePreviewMarkupModule = require(10978) /* metro dependency 10978: MessagePreviewMarkup */;
return messagePreviewMarkupModule.renderMessagePreviewMarkup({content: markup, muted: muted, guildId: guildId,
channelId: channelId, layout: layout, color: color, fontScale: value});
}
function _fun84039(a0) { // fn#84039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3325, offset: 0x01f35978, size: 179 bytes, params: 2, frame: 21
const env0_0 = a0;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun84040,
[a0.message.author.id]);
const useFormattedMessagePreviewModule = require(10919) /* metro dependency 10919: useFormattedMessagePreview */;
return useFormattedMessagePreviewModule.isMessageContentPreviewable(a0.message) ? value2 ? <ChannelRowPreview {...a0} /> : <NativeChannelRowPreview {...a0} /> : <ChannelRowPreview {...a0} />;
}
function _fun84036() { // fn#84036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:2573, offset: 0x01f357ea, size: 163 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
value = new value();
value.setOptions({renderEmbeds: env0_3, inlineEmbedMedia: env0_4, inlineAttachmentMedia: env0_5,
renderReactions: false, animateEmoji: false, gifAutoPlay: gifAutoPlay, renderReplies: false,
renderCodedLinks: false, renderGiftCode: false, renderActivityInviteEmbed: false, renderThreadEmbeds: false,
renderForumPostActions: false, ignoreMentioned: true, enableSwipeActions: false, renderExecutedCommands: false,
useAlternateEmbedColors: true});
return value;
}
function NativeChannelRowPreviewModifyRow(a0) { // fn#84037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3038, owner: NativeChannelRowPreview.modifyRow, offset: 0x01f3588d, size: 106 bytes, params: 2, frame: 13
const MessageContextType = (require(8368) /* metro dependency 8368: RowGeneratorTypes */).MessageContextType;
const SEARCH = MessageContextType.SEARCH;
a0.contextType = SEARCH;
if (lineClamp != null) {
a0.truncation = {'numberOfLines': null, 'expandable': false, 'seeMoreLabel': '...', numberOfLines: lineClamp,
seeMoreLabelColor: env0_2.seeMoreLabelColor};
}
}
function _fun84040() { // fn#84040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3376, offset: 0x01f35a2b, size: 43 bytes, params: 1, frame: 11
return RelationshipStore.isBlockedOrIgnored(env0_0.message.author.id);
}
global.__d(_fun84032, 10975, [31, 27, 3793, 33, 6697, 9759, 8841, 9786, 4056, 10976, 8850, 9616, 4584, 10978, 1357,
10919, 10981, 8518, 4573, 1244, 4048, 4501, 697, 3829, 8177, 9773, 8368, 566,
2]) /* metro module 10975, dependencies: [31, 27, 3793, 33, 6697, 9759, 8841, 9786, 4056, 10976, 8850, 9616, 4584, 10978, 1357, 10919, 10981, 8518, 4573, 1244, 4048, 4501, 697, 3829, 8177, 9773, 8368, 566, 2] */;
@@ -1,18 +1,24 @@
/* Metro module 10275; source: modules/main_tabs_v2/native/shared_components/GroupAvatar.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 6235, 1357, 4002, 6619, 632, 4017, 4504, 4577, 4573, 5475, 2] */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseRefValue from '../../../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SharedModule from '../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun79722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:6, offset: 0x01e5f545, size: 645 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(31) /* metro dependency 31 */).createElement;
const env0_9 = {'damping': 30, 'stiffness': 400};
const env0_10 = {'damping': 30, 'stiffness': 400};
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun79730);
const env0_11 = (CreateStylesModule).createStyles(_fun79730);
const items2 = [[{'translateY': 0, 'translateX': 0, 'scale': 1}, {'translateY': 0, 'translateX': 0, 'scale': 0},
{'translateY': 0, 'translateX': 0, 'scale': 0}, {'translateY': 0, 'translateX': 0, 'scale': 0}]];
items2[1] = [{'translateY': -14, 'translateX': -14, 'scale': 0.75}, {'translateY': 12, 'translateX': 12,
@@ -24,244 +30,252 @@ function _fun79722(global, require, importDefault, importAll, module, exports, d
'scale': 0.875}, {'translateY': -18, 'translateX': 18, 'scale': 0.625}, {'translateY': 18, 'translateX': -18,
'scale': 0.625}];
object = {code: 'function GroupAvatarTsx1(){const{withTiming,opacityAnimation,useReducedMotion,translateXAnimation,withSpring,SPRING_OPTIONS_POSITION,translateYAnimation,scaleAnimation,SPRING_OPTIONS_SCALE}=this.__closure;return{opacity:withTiming(opacityAnimation.get()),transform:[{translateX:useReducedMotion?translateXAnimation.get():withSpring(translateXAnimation.get(),SPRING_OPTIONS_POSITION)},{translateY:useReducedMotion?translateYAnimation.get():withSpring(translateYAnimation.get(),SPRING_OPTIONS_POSITION)},{scale:useReducedMotion?scaleAnimation.get():withSpring(scaleAnimation.get(),SPRING_OPTIONS_SCALE)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/GroupAvatar.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/GroupAvatar.tsx');
exports.default = GroupAvatar;
}
function AnimatedContainer({scale, translateX, shadow, translateY, animateOnMount, children}) { // fn#79723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3379, offset: 0x01e5f7ca, size: 616 bytes, params: 2, frame: 28
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const env0_3 = useReducedMotion;
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : 1);
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : translateY);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : translateX);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? scale / 2 : scale);
env0_3.useEffect(_fun79725, [value6, value11, value8, value9, scale, translateY, translateX]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = AnimatedContainerT;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
opacityAnimation: value6, useReducedMotion: useReducedMotion, translateXAnimation: value9,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, SPRING_OPTIONS_POSITION: env0_10,
translateYAnimation: value8, scaleAnimation: value11, SPRING_OPTIONS_SCALE: env0_9};
closure.__workletHash = 8800301056148;
closure.__initData = env0_13;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
shadow = shadow ? styles.shadow : undefined;
return (
<View style={[styles.avatarContainer, value12, shadow]}>
{children}
</View>
);
}
function GroupMemberCount({count}) { // fn#79727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4402, offset: 0x01e5fbb6, size: 176 bytes, params: 2, frame: 21
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.avatarWrapper}>
<View style={styles.overflowCount}>
<Text variant="text-sm/semibold">
{'+'}
{count}
</Text>
function AnimatedContainer({scale, translateX, shadow, translateY, animateOnMount, children}) { // fn#79723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3379, offset: 0x01e5f7ca, size: 616 bytes, params: 2, frame: 28
const styles = useStyles((MobileVisualRefreshExperiment)('GroupAvatar'));
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useReducedMotion2 = useReducedMotion;
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : 1);
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : translateY);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : translateX);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? scale / 2 : scale);
useReducedMotion2.useEffect(_fun79725, [value6, value11, value8, value9, scale, translateY, translateX]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const AnimatedContainerT2 = AnimatedContainerT;
AnimatedContainerT2.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
opacityAnimation: value6, useReducedMotion: useReducedMotion, translateXAnimation: value9,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, SPRING_OPTIONS_POSITION: env0_10,
translateYAnimation: value8, scaleAnimation: value11, SPRING_OPTIONS_SCALE: env0_9};
AnimatedContainerT2.__workletHash = 8800301056148;
AnimatedContainerT2.__initData = env0_13;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [AnimatedContainerT2]);
const View = (ReanimatedRexport).View;
shadow = shadow ? styles.shadow : undefined;
return (
<View style={[styles.avatarContainer, value12, shadow]}>
{children}
</View>
</View>
);
}
);
function _fun79725() { // fn#79725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3723, offset: 0x01e5fa32, size: 78 bytes, params: 1, frame: 12
let binding = ReactNativeModule.View;
binding.set(1);
binding = JsxRuntimeModule.jsxs;
binding.set(scale);
binding = env0_5;
binding.set(translateY);
binding = JsxRuntimeModule.jsx;
binding.set(translateX);
}
function AnimatedContainerT() { // fn#79726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3821, owner: AnimatedContainer.T, offset: 0x01e5fa80, size: 310 bytes, params: 1, frame: 19
var r1;
var r5;
var r3;
var moduleValue2;
var moduleValue3;
var moduleValue4;
const object = {};
const value = environment.__proto__;
const withTiming = TimingModule.withTiming;
const get = ReactNativeModule.View.get;
object.opacity = Reflect.apply(withTiming, TimingModule, [Reflect.apply(get, ReactNativeModule.View, [])]);
if (useReducedMotion) {
r1 = JsxRuntimeModule.jsx.get();
} else {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
r1 = moduleValue2.withSpring(JsxRuntimeModule.jsx.get(), env1_10);
}
const items2 = [{translateX: r1}];
if (useReducedMotion) {
r5 = env0_5.get();
} else {
moduleValue3 = require(4577) /* metro dependency 4577: spring */;
r5 = moduleValue3.withSpring(env0_5.get(), env1_10);
}
items2[1] = {translateY: r5};
if (useReducedMotion) {
r3 = JsxRuntimeModule.jsxs.get();
} else {
moduleValue4 = require(4577) /* metro dependency 4577: spring */;
r3 = moduleValue4.withSpring(JsxRuntimeModule.jsxs.get(), env1_9);
}
items2[2] = {scale: r3};
object.transform = items2;
return object;
}
function GroupMemberAvatar({guildId, user}) { // fn#79728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4621, offset: 0x01e5fc66, size: 189 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
const value3 = env0_3.useMemo(_fun79729, [guildId, user]);
if (value3 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.avatarWrapper};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = <View {...viewBindingProps}>{((Component) => <Component style={styles.avatar} source={value3} />)(value)}</View>;
r0 = value;
}
return r0;
}
function _fun79730(a0) { // fn#79730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:269, offset: 0x01e5fd51, size: 972 bytes, params: 2, frame: 18
const object2 = {};
object2.groupContainer = {position: 'relative'};
const object4 = {};
const value2 = 5;
const value3 = undefined;
object4.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
let BLACK = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BLACK;
object4.shadowColor = BLACK;
object4.shadowOffset = a0 ? value3 : {'width': 0, 'height': 0};
object4.shadowRadius = a0 ? value3 : value2;
object4.shadowOpacity = a0 ? value3 : 0.2;
object4.elevation = a0 ? value3 : 10;
object2.shadowContainer = object4;
let CARD_BACKGROUND_DEFAULT = a0 ? value3 : importDefault(dependencyMap[value2]).colors.CARD_BACKGROUND_DEFAULT;
object2.shadowContainerBackground = {backgroundColor: CARD_BACKGROUND_DEFAULT};
let WHITE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.WHITE;
object2.shadowContainerBackgroundLight = {backgroundColor: WHITE, opacity: 0.4};
WHITE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.WHITE;
object2.shadowContainerBackgroundDark = {backgroundColor: WHITE, opacity: 0.15};
const object5 = {};
let GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object5.width = GROUP_AVATAR_SIZE;
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object5.height = GROUP_AVATAR_SIZE;
object5.overflow = 'hidden';
object5.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
CARD_BACKGROUND_DEFAULT = a0 ? value3 : importDefault(dependencyMap[value2]).colors.CARD_BACKGROUND_DEFAULT;
object5.backgroundColor = CARD_BACKGROUND_DEFAULT;
object2.gradientContainer = object5;
const BACKGROUND_MOD_SUBTLE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BACKGROUND_MOD_SUBTLE;
object2.gradientDimOverlay = {'position': 'absolute', 'left': 0, 'top': 0, 'right': 0, 'bottom': 0,
backgroundColor: BACKGROUND_MOD_SUBTLE};
const object6 = {};
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object6.width = GROUP_AVATAR_SIZE;
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object6.height = GROUP_AVATAR_SIZE;
object6.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
object6.borderWidth = a0 ? value3 : 1;
const BORDER_SUBTLE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BORDER_SUBTLE;
object6.borderColor = BORDER_SUBTLE;
object6.position = 'absolute';
object2.gradientImageBorder = object6;
object2.avatarContainer = {'position': 'absolute', 'top': '50%', 'left': '50%', 'width': 38, 'height': 38,
'marginTop': -19, 'marginLeft': -19};
const object7 = {};
BLACK = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BLACK;
object7.shadowColor = BLACK;
const DARK_03_LIGHT_02 = a0 ? value3 : (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_03_LIGHT_02;
object7.shadowOpacity = DARK_03_LIGHT_02;
object7.shadowOffset = a0 ? value3 : {'width': 0, 'height': 3};
object7.shadowRadius = a0 ? value3 : 2;
object2.shadow = object7;
object2.avatar = {'width': 32, 'height': 32, 'position': 'absolute', 'borderRadius': 16};
const BACKGROUND_BASE_LOWER = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BACKGROUND_BASE_LOWER;
object2.avatarWrapper = {'position': 'absolute', 'width': 38, 'height': 38, 'justifyContent': 'center',
'alignItems': 'center', 'borderRadius': 19, backgroundColor: BACKGROUND_BASE_LOWER};
const colors = importDefault(dependencyMap[value2]).colors;
object2.overflowCount = {'width': 38, 'height': 38, 'position': 'absolute', 'borderRadius': 19,
'backgroundColor': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: a0 ? colors.BACKGROUND_MOD_SUBTLE : colors.BACKGROUND_BASE_LOWER};
return object2;
}
function GroupAvatar({users, guildId}) { // fn#79731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4973, offset: 0x01e6011d, size: 571 bytes, params: 2, frame: 27
let env0_3 = undefined;
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
const {theme, primaryColor} = (require(4002) /* metro dependency 4002: shared */).useThemeContext();
const sharedModule = require(4002) /* metro dependency 4002: shared */;
let r10 = sharedModule.isThemeLight(theme) ? styles.shadowContainerBackgroundLight : styles.shadowContainerBackgroundDark;
let binding = env0_3;
const value4 = binding.useRef(false);
env0_3.useEffect(_fun79732, []);
let Math = global.Math;
const min = Math.min;
binding = env0_12;
const value7 = Reflect.apply(min, Math, [binding.length - 1, users.length - 1]);
Math = global.Math;
const property = binding[Math.max(0, value7)];
env0_3 = users.length > 4;
const env0_5 = users.length - 3 >= 10 ? 1 : 2;
const env0_6 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4);
const value10 = property.map(_fun79733);
r10 = primaryColor == null ? styles.shadowContainerBackground : r10;
return (
<View style={styles.groupContainer}>
<View style={[styles.shadowContainer, r10]}>
<View style={styles.gradientContainer}>
{primaryColor == null && <View style={styles.gradientDimOverlay} />}
function GroupMemberCount({count}) { // fn#79727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4402, offset: 0x01e5fbb6, size: 176 bytes, params: 2, frame: 21
const styles = useStyles((MobileVisualRefreshExperiment)('GroupAvatar'));
const Text = (TextModule).Text;
return (
<View style={styles.avatarWrapper}>
<View style={styles.overflowCount}>
<Text variant="text-sm/semibold">
{'+'}
{count}
</Text>
</View>
<View style={styles.gradientImageBorder} />
</View>
{value10}
</View>
);
}
function _fun79725() { // fn#79725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3723, offset: 0x01e5fa32, size: 78 bytes, params: 1, frame: 12
let binding = env0_4;
binding.set(1);
binding = env0_7;
binding.set(scale);
binding = env0_5;
binding.set(translateY);
binding = env0_6;
binding.set(translateX);
}
function AnimatedContainerT() { // fn#79726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3821, owner: AnimatedContainer.T, offset: 0x01e5fa80, size: 310 bytes, params: 1, frame: 19
var r1;
var r5;
var r3;
var moduleValue2;
var moduleValue3;
var moduleValue4;
const object2 = {};
const value = environment.__proto__;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding = env0_4;
const get = binding.get;
object2.opacity = Reflect.apply(withTiming, timingModule, [Reflect.apply(get, binding, [])]);
if (useReducedMotion) {
r1 = env0_6.get();
} else {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
r1 = moduleValue2.withSpring(env0_6.get(), env1_10);
);
}
const items2 = [{translateX: r1}];
if (useReducedMotion) {
r5 = env0_5.get();
} else {
moduleValue3 = require(4577) /* metro dependency 4577: spring */;
r5 = moduleValue3.withSpring(env0_5.get(), env1_10);
function GroupMemberAvatar({guildId, user}) { // fn#79728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4621, offset: 0x01e5fc66, size: 189 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles((MobileVisualRefreshExperiment)('GroupAvatar'));
const value3 = ReactModule.useMemo(_fun79729, [guildId, user]);
if (value3 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.avatarWrapper};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component style={styles.avatar} source={value3} />)(value)}
</View>
);
r0 = value;
}
return r0;
function _fun79729() { // fn#79729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4717, offset: 0x01e5fd23, size: 46 bytes, params: 1, frame: 16
return user?.getAvatarSource(guildId, false, 32);
}
}
items2[1] = {translateY: r5};
if (useReducedMotion) {
r3 = env0_7.get();
} else {
moduleValue4 = require(4577) /* metro dependency 4577: spring */;
r3 = moduleValue4.withSpring(env0_7.get(), env1_9);
function _fun79730(a0) { // fn#79730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:269, offset: 0x01e5fd51, size: 972 bytes, params: 2, frame: 18
const object = {};
object.groupContainer = {position: 'relative'};
const object3 = {};
const value2 = 5;
const value3 = undefined;
object3.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
let BLACK = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BLACK;
object3.shadowColor = BLACK;
object3.shadowOffset = a0 ? value3 : {'width': 0, 'height': 0};
object3.shadowRadius = a0 ? value3 : value2;
object3.shadowOpacity = a0 ? value3 : 0.2;
object3.elevation = a0 ? value3 : 10;
object.shadowContainer = object3;
let CARD_BACKGROUND_DEFAULT = a0 ? value3 : importDefault(dependencyMap[value2]).colors.CARD_BACKGROUND_DEFAULT;
object.shadowContainerBackground = {backgroundColor: CARD_BACKGROUND_DEFAULT};
let WHITE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.WHITE;
object.shadowContainerBackgroundLight = {backgroundColor: WHITE, opacity: 0.4};
WHITE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.WHITE;
object.shadowContainerBackgroundDark = {backgroundColor: WHITE, opacity: 0.15};
const object8 = {};
let GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object8.width = GROUP_AVATAR_SIZE;
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object8.height = GROUP_AVATAR_SIZE;
object8.overflow = 'hidden';
object8.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
CARD_BACKGROUND_DEFAULT = a0 ? value3 : importDefault(dependencyMap[value2]).colors.CARD_BACKGROUND_DEFAULT;
object8.backgroundColor = CARD_BACKGROUND_DEFAULT;
object.gradientContainer = object8;
const BACKGROUND_MOD_SUBTLE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BACKGROUND_MOD_SUBTLE;
object.gradientDimOverlay = {'position': 'absolute', 'left': 0, 'top': 0, 'right': 0, 'bottom': 0,
backgroundColor: BACKGROUND_MOD_SUBTLE};
const object9 = {};
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object9.width = GROUP_AVATAR_SIZE;
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
object9.height = GROUP_AVATAR_SIZE;
object9.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
object9.borderWidth = a0 ? value3 : 1;
const BORDER_SUBTLE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BORDER_SUBTLE;
object9.borderColor = BORDER_SUBTLE;
object9.position = 'absolute';
object.gradientImageBorder = object9;
object.avatarContainer = {'position': 'absolute', 'top': '50%', 'left': '50%', 'width': 38, 'height': 38,
'marginTop': -19, 'marginLeft': -19};
const object10 = {};
BLACK = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BLACK;
object10.shadowColor = BLACK;
const DARK_03_LIGHT_02 = a0 ? value3 : (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_03_LIGHT_02;
object10.shadowOpacity = DARK_03_LIGHT_02;
object10.shadowOffset = a0 ? value3 : {'width': 0, 'height': 3};
object10.shadowRadius = a0 ? value3 : 2;
object.shadow = object10;
object.avatar = {'width': 32, 'height': 32, 'position': 'absolute', 'borderRadius': 16};
const BACKGROUND_BASE_LOWER = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BACKGROUND_BASE_LOWER;
object.avatarWrapper = {'position': 'absolute', 'width': 38, 'height': 38, 'justifyContent': 'center',
'alignItems': 'center', 'borderRadius': 19, backgroundColor: BACKGROUND_BASE_LOWER};
const colors = importDefault(dependencyMap[value2]).colors;
object.overflowCount = {'width': 38, 'height': 38, 'position': 'absolute', 'borderRadius': 19,
'backgroundColor': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: a0 ? colors.BACKGROUND_MOD_SUBTLE : colors.BACKGROUND_BASE_LOWER};
return object;
}
items2[2] = {scale: r3};
object2.transform = items2;
return object2;
}
function _fun79729() { // fn#79729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4717, offset: 0x01e5fd23, size: 46 bytes, params: 1, frame: 16
return user?.getAvatarSource(guildId, false, 32);
}
function GroupAvatar({users, guildId}) { // fn#79731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4973, offset: 0x01e6011d, size: 571 bytes, params: 2, frame: 27
let env0_3 = undefined;
const styles = useStyles((MobileVisualRefreshExperiment)('GroupAvatar'));
const {theme, primaryColor} = (SharedModule).useThemeContext();
let r10 = SharedModule.isThemeLight(theme) ? styles.shadowContainerBackgroundLight : styles.shadowContainerBackgroundDark;
let binding = env0_3;
const value4 = binding.useRef(false);
env0_3.useEffect(_fun79732, []);
let Math = global.Math;
const min = Math.min;
binding = env0_12;
const value7 = Reflect.apply(min, Math, [binding.length - 1, users.length - 1]);
Math = global.Math;
const property = binding[Math.max(0, value7)];
env0_3 = users.length > 4;
const env0_5 = users.length - 3 >= 10 ? 1 : 2;
const env0_6 = (UseRefValue)(value4);
const value10 = property.map(_fun79733);
r10 = primaryColor == null ? styles.shadowContainerBackground : r10;
return (
<View style={styles.groupContainer}>
<View style={[styles.shadowContainer, r10]}>
<View style={styles.gradientContainer}>
{primaryColor == null && <View style={styles.gradientDimOverlay} />}
</View>
<View style={styles.gradientImageBorder} />
</View>
{value10}
</View>
);
function _fun79732() { // fn#79732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:5225, offset: 0x01e60358, size: 19 bytes, params: 1, frame: 2
env0_2.current = true;
}
function _fun79733(a0, a1) { // fn#79733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:5366, offset: 0x01e6036b, size: 185 bytes, params: 3, frame: 21
var r0;
var value3;
var createElementBinding;
var object;
const property = users[a1];
const value2 = null;
if (value2 == property) {
r0 = value2;
} else {
value3 = environment.__proto__;
createElementBinding = createElement;
object = {};
copyDataProperties(object, a0, undefined);
object['key'] = property.id;
object['animateOnMount'] = env0_6;
object['shadow'] = users.length >= 2;
r0 = createElementBinding(AnimatedContainer, object,
env0_3 && a1 === env0_5 ? <GroupMemberCount count={ReactNativeModule.View} /> : <GroupMemberAvatar guildId={guildId} user={property} />);
}
return r0;
}
function _fun79733(a0, a1) { // fn#79733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:5366, offset: 0x01e6036b, size: 185 bytes, params: 3, frame: 21
var r0;
var value3;
var createElementBinding;
var object2;
const property = users[a1];
const value2 = null;
if (value2 == property) {
r0 = value2;
} else {
value3 = environment.__proto__;
createElementBinding = createElement;
object2 = {};
copyDataProperties(object2, a0, undefined);
object2['key'] = property.id;
object2['animateOnMount'] = env0_6;
object2['shadow'] = users.length >= 2;
r0 = createElementBinding(AnimatedContainer, object2,
env0_3 && a1 === env0_5 ? <GroupMemberCount count={env0_4} /> : <GroupMemberAvatar guildId={guildId} user={property} />);
}
return r0;
}
global.__d(_fun79722, 10275, [31, 27, 4502, 33, 4501, 697, 6235, 1357, 4002, 6619, 632, 4017, 4504, 4577, 4573,
5475,
2]) /* metro module 10275, dependencies: [31, 27, 4502, 33, 4501, 697, 6235, 1357, 4002, 6619, 632, 4017, 4504, 4577, 4573, 5475, 2] */;
@@ -1,60 +1,74 @@
/* Metro module 9603; source: modules/main_tabs_v2/native/shared_components/HeaderShared.tsx; dependencies: [31, 27, 9604, 33, 4501, 697, 4573, 3860, 5283, 5287, 9605, 477, 9610, 1585, 1485, 7701, 5465, 628, 9612, 9709, 5278, 1305, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import HeaderDebugOverlayNative from '../../../devtools/design_toggles/HeaderDebugOverlay.native.tsx'; /* Metro dependency 5283 */
import PressableNavigatorModalIcon from './navigator/PressableNavigatorModalIcon.tsx'; /* Metro dependency 9610 */
import ChannelActions from '../channel/ChannelActions.tsx'; /* Metro dependency 9612 */
import ChannelHeader from '../channel/header/ChannelHeader.tsx'; /* Metro dependency 9709 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Module01485Module from '../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as Module05287Module from '../../../../by-id/module-05287.js'; /* Metro dependency 5287 */
import * as DeprecatedLayoutAnimationModule from '../../../animations/native/DeprecatedLayoutAnimation.tsx'; /* Metro dependency 5465 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as MainTabsV2ConstantsModule from './MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
import * as PressableNavigatorBackIconModule from './navigator/PressableNavigatorBackIcon.tsx'; /* Metro dependency 9605 */
function _fun75258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:6, offset: 0x01da7a2e, size: 699 bytes, params: 8, frame: 28
var object2;
let env0_0 = require;
const closure = GenericHeaderTitle;
const closure2 = renderGenericTitle;
const closure3 = HeaderTextButton_75262;
const GenericHeaderTitle2 = GenericHeaderTitle;
const renderGenericTitle2 = renderGenericTitle;
const HeaderTextButton_752622 = HeaderTextButton_75262;
const closure4 = function(a0) {
var env0_0 = a0;
return _fun75265;
};
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.View;
value2.Platform;
const env0_5 = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIN_HEADER_HEIGHT;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.headerRightContainer = {marginRight: 16};
const object4 = {'backgroundColor': null, 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 0,
let value = ReactModule;
ReactNativeModule.Platform;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.headerRightContainer = {marginRight: 16};
const object3 = {'backgroundColor': null, 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 0,
'flexGrow': 1, 'borderColor': null, 'borderBottomWidth': 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderColor = BORDER_SUBTLE;
object2.headerWrapper = object4;
object2.actionButtonPressable = {'padding': 8, 'zIndex': 100, 'width': 40, 'height': 40, 'borderRadius': 20};
const MOBILE_HEADER_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_HEADER_ICON_DEFAULT;
object2.actionButtonIcon = {tintColor: MOBILE_HEADER_ICON_DEFAULT};
object2.headerText = {'textAlign': 'center', 'fontSize': 18};
object2.subtitleText = {textAlign: 'center'};
const object5 = {};
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
copyDataProperties(object5, TextStyleSheet['text-md/semibold'], undefined);
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object5['color'] = TEXT_BRAND;
object2.backButtonLabel = object5;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object.headerWrapper = object3;
object.actionButtonPressable = {'padding': 8, 'zIndex': 100, 'width': 40, 'height': 40, 'borderRadius': 20};
const MOBILE_HEADER_ICON_DEFAULT = (Native).colors.MOBILE_HEADER_ICON_DEFAULT;
object.actionButtonIcon = {tintColor: MOBILE_HEADER_ICON_DEFAULT};
object.headerText = {'textAlign': 'center', 'fontSize': 18};
object.subtitleText = {textAlign: 'center'};
const object6 = {};
const TextStyleSheet = (TextModule).TextStyleSheet;
copyDataProperties(object6, TextStyleSheet['text-md/semibold'], undefined);
const TEXT_BRAND = (Native).colors.TEXT_BRAND;
object6['color'] = TEXT_BRAND;
object.backButtonLabel = object6;
const PX_8 = (Native).space.PX_8;
object.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(HeaderInner, _fun75270);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/HeaderShared.tsx');
exports.GenericHeaderTitle = closure;
exports.renderGenericTitle = closure2;
exports.HeaderTextButton = closure3;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/HeaderShared.tsx');
exports.GenericHeaderTitle = GenericHeaderTitle2;
exports.renderGenericTitle = renderGenericTitle2;
exports.HeaderTextButton = HeaderTextButton_752622;
exports.getRenderHeaderTextButton = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return _fun75272;
};
exports.renderHeader = renderHeader;
exports.renderHeader = renderHeader_75273;
exports.getRenderBackImage = closure4;
exports.getRenderModalBackImage = getRenderModalBackImage;
exports.getRenderModalCloseImage = getRenderModalCloseImage;
@@ -68,278 +82,297 @@ function _fun75258(global, require, importDefault, importAll, module, exports, d
};
exports.getDefaultChannelStackHeaderProps = getDefaultChannelStackHeaderProps;
exports.HeaderIconButton = HeaderIconButton;
}
function GenericHeaderTitle(a0) { // fn#75259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:860, offset: 0x01da7ce9, size: 433 bytes, params: 2, frame: 26
var r0;
var items2;
const env0_0 = a0.title;
const subtitle = a0.subtitle;
const color = a0.color;
let value = undefined;
if (color !== value) {
}
let subtitleColor = a0.subtitleColor;
subtitleColor = subtitleColor === value ? 'text-default' : subtitleColor;
const env0_2 = a0.icon;
let maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
maxFontSizeMultiplier = maxFontSizeMultiplier === value ? 2 : maxFontSizeMultiplier;
const object = {'title': 0, 'subtitle': 0, 'color': 0, 'subtitleColor': 0, 'icon': 0, 'maxFontSizeMultiplier': 0};
const value5 = null;
silentSetPrototypeOf(object, value5, undefined);
const value6 = copyDataProperties({}, a0, object, undefined);
const useToken = UseTokenModule.useToken;
const HEADER_TITLE_TEXT_STYLE = (Native).modules.mobile.HEADER_TITLE_TEXT_STYLE;
const value8 = Reflect.apply(useToken, UseTokenModule, [HEADER_TITLE_TEXT_STYLE]);
const variant = value6.variant;
const env0_4 = value5 == variant ? value8 : variant;
const styles = useStyles();
const value9 = (HeaderDebugOverlayNative)('os-drawn');
const renderTitleContainer2 = renderTitleContainer;
if (value5 != subtitle) {
items2 = [renderTitleContainer2(value5 != subtitle ? value : 'header')];
items2[1] = (
value5 != subtitle
? ((Text) => <Text lineClamp={1} variant="text-xs/medium" color={subtitleColor} style={styles.subtitleText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{subtitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: value5
);
items2[2] = value9;
value = (
<View accessible accessibilityRole="header">
{items2}
</View>
);
r0 = value;
} else if (value5 == value9) {
r0 = renderTitleContainer2('header');
} else {
items2 = [renderTitleContainer2(value5 != subtitle ? value : 'header')];
items2[1] = (
value5 != subtitle
? ((Text) => <Text lineClamp={1} variant="text-xs/medium" color={subtitleColor} style={styles.subtitleText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{subtitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: value5
);
items2[2] = value9;
value = (
<View accessible accessibilityRole="header">
{items2}
</View>
);
r0 = value;
}
return r0;
function renderTitleContainer(a0) { // fn#75260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1166, owner: GenericHeaderTitle.renderTitleContainer, offset: 0x01da7e9a, size: 281 bytes, params: 2, frame: 20
if (icon != null) {
return (
<View
accessible
accessibilityRole={a0}
style={styles.titleContainer}
>
{icon}
{((Text) => <Text lineClamp={1} variant={env0_4} color={color} style={styles.headerText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
accessibilityRole={a0}
lineClamp={1}
variant={env0_4}
color={color}
style={styles.headerText}
maxFontSizeMultiplier={maxFontSizeMultiplier}
>
{title}
</Text>
);
}
}
function GenericHeaderTitle(a0) { // fn#75259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:860, offset: 0x01da7ce9, size: 433 bytes, params: 2, frame: 26
var r0;
var items2;
const env0_0 = a0.title;
const subtitle = a0.subtitle;
const color = a0.color;
let value = undefined;
if (color !== value) {
}
let subtitleColor = a0.subtitleColor;
subtitleColor = subtitleColor === value ? 'text-default' : subtitleColor;
const env0_2 = a0.icon;
let maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
maxFontSizeMultiplier = maxFontSizeMultiplier === value ? 2 : maxFontSizeMultiplier;
const object2 = {'title': 0, 'subtitle': 0, 'color': 0, 'subtitleColor': 0, 'icon': 0, 'maxFontSizeMultiplier': 0};
const value5 = null;
silentSetPrototypeOf(object2, value5, undefined);
const value6 = copyDataProperties({}, a0, object2, undefined);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const HEADER_TITLE_TEXT_STYLE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.HEADER_TITLE_TEXT_STYLE;
const value8 = Reflect.apply(useToken, useTokenModule, [HEADER_TITLE_TEXT_STYLE]);
const variant = value6.variant;
const env0_4 = value5 == variant ? value8 : variant;
const styles = useStyles();
const value9 = (importDefault(5283) /* metro dependency 5283: HeaderDebugOverlayNative */)('os-drawn');
const closure = renderTitleContainer;
if (value5 != subtitle) {
items2 = [closure(value5 != subtitle ? value : 'header')];
items2[1] = value5 != subtitle ? ((Text) => <Text lineClamp={1} variant="text-xs/medium" color={subtitleColor} style={styles.subtitleText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{subtitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : value5;
items2[2] = value9;
value = <View accessible accessibilityRole="header">{items2}</View>;
r0 = value;
} else if (value5 == value9) {
r0 = closure('header');
} else {
items2 = [closure(value5 != subtitle ? value : 'header')];
items2[1] = value5 != subtitle ? ((Text) => <Text lineClamp={1} variant="text-xs/medium" color={subtitleColor} style={styles.subtitleText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{subtitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : value5;
items2[2] = value9;
value = <View accessible accessibilityRole="header">{items2}</View>;
r0 = value;
function renderGenericTitle({children}) { // fn#75261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1775, offset: 0x01da7fb3, size: 35 bytes, params: 2, frame: 13
return <GenericHeaderTitle title={children} />;
}
return r0;
}
function renderGenericTitle({children}) { // fn#75261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1775, offset: 0x01da7fb3, size: 35 bytes, params: 2, frame: 13
return <GenericHeaderTitle title={children} />;
}
function HeaderTextButton_75262(a0) { // fn#75262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1856, offset: 0x01da7fd6, size: 159 bytes, params: 2, frame: 18
const labelStyle = a0.labelStyle;
const value = Object.create(null);
value.labelStyle = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
return (
<HeaderBackButton
labelStyle={[styles.backButtonLabel, labelStyle]}
labelVisible
backImage={function() {
return null;
}}
truncatedLabel={value2.label}
accessibilityLabel={value2.label}
{...value2}
/>
);
}
function getRenderBackImage(a0) { // fn#75264, offset: 0x01da8075, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun75265;
}
function HeaderChannelActions({route, screenIndex}) { // fn#75266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3063, offset: 0x01da80ce, size: 95 bytes, params: 2, frame: 17
const styles = useStyles();
return ((Component) => <Component containerStyle={styles.headerRightContainer} {...route.params} {...{['screenIndex']: screenIndex}} />)(importDefault(9612) /* metro dependency 9612: ChannelActions */);
}
function HeaderInner({navigation, options, back, route, shouldHandleSafeArea}) { // fn#75267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2189, offset: 0x01da812d, size: 518 bytes, params: 2, frame: 28
var r6;
var object;
shouldHandleSafeArea = shouldHandleSafeArea === undefined || shouldHandleSafeArea;
const styles = useStyles();
const r15 = shouldHandleSafeArea ? (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top : 0;
const headerLeft = options.headerLeft;
const r7 = headerLeft !== undefined ? headerLeft : getRenderBackImage(navigation);
const headerTitle = options.headerTitle;
const headerRight = options.headerRight;
const moduleValue = require(1485) /* metro dependency 1485 */;
const useTheme = moduleValue.useTheme;
const text = Reflect.apply(useTheme, moduleValue, []).colors.text;
const value7 = env0_3.useMemo(_fun75268, [r15,
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop(), styles]);
const value8 = typeof headerTitle === 'string';
const r10 = value8 ? renderGenericTitle : headerTitle ?? renderGenericTitle;
const value9 = (importDefault(5283) /* metro dependency 5283: HeaderDebugOverlayNative */)('custom-drawn');
env0_3.useLayoutEffect(_fun75269);
const object3 = {};
object3.label = back?.title;
object3.canGoBack = navigation.isFocused() && navigation.canGoBack();
object3.tintColor = text;
const items2 = [r7(object3)];
items2[1] = r10({children: value8 ? headerTitle : options.title ?? route.name, tintColor: text});
if (headerRight == null) {
r6 = undefined;
} else {
object = {};
object.canGoBack = navigation.isFocused() && navigation.canGoBack();
object.tintColor = text;
r6 = headerRight(object);
}
items2[2] = r6;
items2[3] = value9;
return (
<View style={value7}>
{items2}
</View>
);
}
function _fun75270(a0, a1) { // fn#75270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2958, offset: 0x01da83a3, size: 108 bytes, params: 3, frame: 17
var r2;
var r0;
var back;
var value;
const value2 = (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1, ['back']);
if (value2) {
value = importDefault(628) /* metro dependency 628: shallowEqual */;
back = a0.back;
r2 = back ?? ({});
back = a1.back;
value = value(r2, back ?? ({}));
r0 = value;
} else {
r0 = !!value2;
}
return r0;
}
function getRenderHeaderTextButton(a0, a1) { // fn#75271, offset: 0x01da840f, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun75272;
}
function getRenderModalBackImage(a0) { // fn#75274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3694, offset: 0x01da847d, size: 58 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
return undefined;
}
return _fun75275;
}
function getRenderModalCloseImage(a0) { // fn#75276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3821, offset: 0x01da84ea, size: 58 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
return undefined;
}
return _fun75277;
}
function getDefaultChannelStackHeaderProps(a0, a1) { // fn#75279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4144, offset: 0x01da8589, size: 139 bytes, params: 3, frame: 15
var r0;
const env0_0 = a1;
if (a1.name === 'channel') {
r0 = a0.getState().routes.findIndex(function({key}) {
return key === require.key;
}) ?? 'none';
}
const object2 = {};
object2.headerLeft = getRenderBackImage(a0);
object2.headerTitle = headerTitle_75281;
object2.headerRight = headerRight_75282;
object2.headerBackVisible = false;
return object2;
}
function HeaderIconButton({accessibilityLabel, onPress, source, resizeMode, color}) { // fn#75283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4543, offset: 0x01da8693, size: 170 bytes, params: 2, frame: 23
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
style={styles.actionButtonPressable}
onPress={onPress}
>
<Icon
color={color ?? styles.actionButtonIcon.tintColor}
source={source}
resizeMode={resizeMode}
/>
</PressableOpacity>
);
}
function renderTitleContainer(a0) { // fn#75260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1166, owner: GenericHeaderTitle.renderTitleContainer, offset: 0x01da7e9a, size: 281 bytes, params: 2, frame: 20
if (icon != null) {
function HeaderTextButton_75262(a0) { // fn#75262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1856, offset: 0x01da7fd6, size: 159 bytes, params: 2, frame: 18
const labelStyle = a0.labelStyle;
const value = Object.create(null);
value.labelStyle = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const HeaderBackButton = (Module05287Module).HeaderBackButton;
return (
<View
accessible
accessibilityRole={a0}
style={styles.titleContainer}
>
{icon}
{((Text) => <Text lineClamp={1} variant={env0_4} color={color} style={styles.headerText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
<HeaderBackButton
labelStyle={[styles.backButtonLabel, labelStyle]}
labelVisible
backImage={function() {
return null;
}}
truncatedLabel={value2.label}
accessibilityLabel={value2.label}
{...value2}
/>
);
}
function getRenderBackImage(a0) { // fn#75264, offset: 0x01da8075, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun75265;
function _fun75265(a0) { // fn#75265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2112, offset: 0x01da8087, size: 71 bytes, params: 2, frame: 15
const PressableNavigatorBackIcon = (PressableNavigatorBackIconModule).PressableNavigatorBackIcon;
return <PressableNavigatorBackIcon {...a0} {...{['navigation']: env0_0}} />;
}
}
function HeaderChannelActions({route, screenIndex}) { // fn#75266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3063, offset: 0x01da80ce, size: 95 bytes, params: 2, frame: 17
const styles = useStyles();
return ((Component) => <Component containerStyle={styles.headerRightContainer} {...route.params} {...{['screenIndex']: screenIndex}} />)(ChannelActions);
}
function HeaderInner({navigation, options, back, route, shouldHandleSafeArea}) { // fn#75267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2189, offset: 0x01da812d, size: 518 bytes, params: 2, frame: 28
var r6;
var object2;
shouldHandleSafeArea = shouldHandleSafeArea === undefined || shouldHandleSafeArea;
const styles = useStyles();
const r15 = shouldHandleSafeArea ? (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top : 0;
const headerLeft = options.headerLeft;
const r7 = headerLeft !== undefined ? headerLeft : getRenderBackImage(navigation);
const headerTitle = options.headerTitle;
const headerRight = options.headerRight;
const useTheme = Module01485Module.useTheme;
const text = Reflect.apply(useTheme, Module01485Module, []).colors.text;
const value7 = env0_3.useMemo(_fun75268, [r15,
(ClientThemesOverridesModule).useGradientTop(), styles]);
const value8 = typeof headerTitle === 'string';
const r10 = value8 ? renderGenericTitle : headerTitle ?? renderGenericTitle;
const value9 = (HeaderDebugOverlayNative)('custom-drawn');
env0_3.useLayoutEffect(_fun75269);
const object4 = {};
object4.label = back?.title;
object4.canGoBack = navigation.isFocused() && navigation.canGoBack();
object4.tintColor = text;
const items2 = [r7(object4)];
items2[1] = r10({children: value8 ? headerTitle : options.title ?? route.name, tintColor: text});
if (headerRight == null) {
r6 = undefined;
} else {
object2 = {};
object2.canGoBack = navigation.isFocused() && navigation.canGoBack();
object2.tintColor = text;
r6 = headerRight(object2);
}
items2[2] = r6;
items2[3] = value9;
return (
<View style={value7}>
{items2}
</View>
);
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
function _fun75268() { // fn#75268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2475, offset: 0x01da8333, size: 66 bytes, params: 1, frame: 4
return [styles.headerWrapper, env0_2, {paddingTop: env0_1, minHeight: env0_1 + MIN_HEADER_HEIGHT}];
}
function _fun75269() { // fn#75269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2641, offset: 0x01da8375, size: 46 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (DeprecatedLayoutAnimationModule).DeprecatedLayoutAnimation({duration: 0});
}
}
function _fun75270(a0, a1) { // fn#75270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2958, offset: 0x01da83a3, size: 108 bytes, params: 3, frame: 17
var r2;
var r0;
var back;
var value;
const value2 = (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1, ['back']);
if (value2) {
value = importDefault(628) /* metro dependency 628: shallowEqual */;
back = a0.back;
r2 = back ?? ({});
back = a1.back;
value = value(r2, back ?? ({}));
r0 = value;
} else {
r0 = !!value2;
}
return r0;
}
function getRenderHeaderTextButton(a0, a1) { // fn#75271, offset: 0x01da840f, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun75272;
function _fun75272(a0) { // fn#75272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3502, offset: 0x01da8428, size: 52 bytes, params: 2, frame: 14
return (
<HeaderTextButton_75262
label={env0_0}
onPress={require}
{...a0}
/>
);
}
}
function renderHeader_75273(a0) { // fn#75273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3583, offset: 0x01da845c, size: 33 bytes, params: 2, frame: 13
return ((Component) => <Component {...a0} />)(env0_9);
}
function getRenderModalBackImage(a0) { // fn#75274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3694, offset: 0x01da847d, size: 58 bytes, params: 2, frame: 12
const env0_0 = a0;
if (PlatformUtilsModule.isAndroid()) {
return undefined;
}
return _fun75275;
function _fun75275() { // fn#75275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3762, offset: 0x01da84b7, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component navigation={env0_0} />)(PressableNavigatorModalIcon);
}
}
function getRenderModalCloseImage(a0) { // fn#75276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3821, offset: 0x01da84ea, size: 58 bytes, params: 2, frame: 12
const env0_0 = a0;
if (PlatformUtilsModule.isAndroid()) {
return undefined;
}
return _fun75277;
function _fun75277() { // fn#75277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3890, offset: 0x01da8524, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component navigation={env0_0} type="close" />)(PressableNavigatorModalIcon);
}
}
function getDefaultChannelStackHeaderProps(a0, a1) { // fn#75279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4144, offset: 0x01da8589, size: 139 bytes, params: 3, frame: 15
var r0;
const env0_0 = a1;
if (a1.name === 'channel') {
r0 = a0.getState().routes.findIndex(function({key}) {
return key === require.key;
}) ?? 'none';
}
const object = {};
object.headerLeft = getRenderBackImage(a0);
object.headerTitle = headerTitle_75281;
object.headerRight = headerRight_75282;
object.headerBackVisible = false;
return object;
function getDefaultChannelStackHeaderPropsHeaderTitle() { // fn#75281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4341, owner: getDefaultChannelStackHeaderProps.headerTitle, offset: 0x01da8614, size: 83 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...require.params} {...{['isNavigationScreen']: true}} {...{['screenIndex']: env0_1}} />)(ChannelHeader);
}
function getDefaultChannelStackHeaderPropsHeaderRight() { // fn#75282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4434, owner: getDefaultChannelStackHeaderProps.headerRight, offset: 0x01da8667, size: 44 bytes, params: 1, frame: 14
return <HeaderChannelActions route={require} screenIndex={env0_1} />;
}
}
function HeaderIconButton({accessibilityLabel, onPress, source, resizeMode, color}) { // fn#75283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4543, offset: 0x01da8693, size: 170 bytes, params: 2, frame: 23
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const Icon = (NativeModule).Icon;
return (
<Text
accessibilityRole={a0}
lineClamp={1}
variant={env0_4}
color={color}
style={styles.headerText}
maxFontSizeMultiplier={maxFontSizeMultiplier}
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
style={styles.actionButtonPressable}
onPress={onPress}
>
{title}
</Text>
<Icon
color={color ?? styles.actionButtonIcon.tintColor}
source={source}
resizeMode={resizeMode}
/>
</PressableOpacity>
);
}
}
function _fun75265(a0) { // fn#75265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2112, offset: 0x01da8087, size: 71 bytes, params: 2, frame: 15
const PressableNavigatorBackIcon = (require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon;
return <PressableNavigatorBackIcon {...a0} {...{['navigation']: env0_0}} />;
}
function _fun75268() { // fn#75268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2475, offset: 0x01da8333, size: 66 bytes, params: 1, frame: 4
return [styles.headerWrapper, env0_2, {paddingTop: env0_1, minHeight: env0_1 + MIN_HEADER_HEIGHT}];
}
function _fun75269() { // fn#75269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2641, offset: 0x01da8375, size: 46 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation({duration: 0});
}
function _fun75272(a0) { // fn#75272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3502, offset: 0x01da8428, size: 52 bytes, params: 2, frame: 14
return (
<HeaderTextButton_75262
label={env0_0}
onPress={require}
{...a0}
/>
);
}
function _fun75275() { // fn#75275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3762, offset: 0x01da84b7, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component navigation={env0_0} />)(importDefault(9610) /* metro dependency 9610: PressableNavigatorModalIcon */);
}
function _fun75277() { // fn#75277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3890, offset: 0x01da8524, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component navigation={env0_0} type="close" />)(importDefault(9610) /* metro dependency 9610: PressableNavigatorModalIcon */);
}
function getDefaultChannelStackHeaderPropsHeaderTitle() { // fn#75281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4341, owner: getDefaultChannelStackHeaderProps.headerTitle, offset: 0x01da8614, size: 83 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...require.params} {...{['isNavigationScreen']: true}} {...{['screenIndex']: env0_1}} />)(importDefault(9709) /* metro dependency 9709: ChannelHeader */);
}
function getDefaultChannelStackHeaderPropsHeaderRight() { // fn#75282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4434, owner: getDefaultChannelStackHeaderProps.headerRight, offset: 0x01da8667, size: 44 bytes, params: 1, frame: 14
return <HeaderChannelActions route={require} screenIndex={env0_1} />;
}
global.__d(_fun75258, 9603, [31, 27, 9604, 33, 4501, 697, 4573, 3860, 5283, 5287, 9605, 477, 9610, 1585, 1485, 7701,
5465, 628, 9612, 9709, 5278, 1305,
2]) /* metro module 9603, dependencies: [31, 27, 9604, 33, 4501, 697, 4573, 3860, 5283, 5287, 9605, 477, 9610, 1585, 1485, 7701, 5465, 628, 9612, 9709, 5278, 1305, 2] */;
@@ -1,119 +1,138 @@
/* Metro module 9697; source: modules/main_tabs_v2/native/shared_components/IconActionButton.tsx; dependencies: [31, 33, 4501, 697, 477, 1305, 1357, 4584, 5278, 4573, 9609, 2] */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import Badge from './Badge.tsx'; /* Metro dependency 9609 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as BadgeModule from './Badge.tsx'; /* Metro dependency 9609 */
function _fun76217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:6, offset: 0x01dc6ae6, size: 231 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = ButtonBadge;
const ButtonBadge2 = ButtonBadge;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const 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(_fun76219);
const env0_7 = value.memo(_fun76220);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/IconActionButton.tsx');
const env0_6 = (CreateStylesModule).createStyles(_fun76219);
const env0_7 = ReactModule.memo(_fun76220);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/IconActionButton.tsx');
exports.default = IconActionButton;
exports.ICON_ACTION_BUTTON_SIZE = 32;
exports.ButtonBadge = closure;
}
exports.ButtonBadge = ButtonBadge2;
function ButtonBadge({badgePosition}) { // fn#76218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1339, offset: 0x01dc6bcd, size: 140 bytes, params: 2, frame: 18
badgePosition = badgePosition === undefined ? 'left' : badgePosition;
const styles = useStyles(false);
const CHANNEL_BADGE_SIZE = (BadgeModule).CHANNEL_BADGE_SIZE;
return (
<Badge
size={CHANNEL_BADGE_SIZE}
maskSize={2}
style={badgePosition === 'left' ? styles.unreadBadgeLeft : styles.unreadBadgeRight}
maskColor={styles.unreadBadgeMask.color}
/>
);
}
function ButtonBadge({badgePosition}) { // fn#76218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1339, offset: 0x01dc6bcd, size: 140 bytes, params: 2, frame: 18
badgePosition = badgePosition === undefined ? 'left' : badgePosition;
const styles = useStyles(false);
const Badge = importDefault(9609) /* metro dependency 9609: Badge */;
const CHANNEL_BADGE_SIZE = (require(9609) /* metro dependency 9609: Badge */).CHANNEL_BADGE_SIZE;
return (
<Badge
size={CHANNEL_BADGE_SIZE}
maskSize={2}
style={badgePosition === 'left' ? styles.unreadBadgeLeft : styles.unreadBadgeRight}
maskColor={styles.unreadBadgeMask.color}
/>
);
}
function _fun76219(a0) { // fn#76219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:157, offset: 0x01dc6c59, size: 441 bytes, params: 2, frame: 19
const object = {actionIconButtonPressable: {'minWidth': 32, 'minHeight': 32, 'borderRadius': 20, 'marginEnd': 12,
'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'flexDirection': 'row',
'paddingRight': 12, 'paddingLeft': 12}};
const value = 0;
object.withoutMargin = {marginEnd: value};
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = a0 ? undefined : (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object.filled = {backgroundColor: REDESIGN_BUTTON_TERTIARY_BACKGROUND};
const object4 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.borderWidth = 1;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object4.borderColor = INPUT_BACKGROUND_DEFAULT;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object4, SHADOW_LOW, INPUT_BACKGROUND_DEFAULT);
object.outlined = object4;
object.roundButton = {'maxWidth': 32, 'maxHeight': 32};
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
object.actionIcon = {tintColor: a0 ? colors.ICON_SUBTLE : colors.INTERACTIVE_TEXT_DEFAULT};
object.actionText = {marginLeft: 4, marginTop: PlatformUtilsModule.isAndroid() ? -2 : value};
object.unreadBadgeLeft = {'position': 'absolute', 'left': -2, 'top': -1};
object.unreadBadgeRight = {'position': 'absolute', 'right': -2, 'top': -1};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.unreadBadgeMask = {color: BACKGROUND_BASE_LOW};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.countStyle = {position: 'relative', marginLeft: PX_8};
return object;
}
function _fun76219(a0) { // fn#76219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:157, offset: 0x01dc6c59, size: 441 bytes, params: 2, frame: 19
const object2 = {actionIconButtonPressable: {'minWidth': 32, 'minHeight': 32, 'borderRadius': 20, 'marginEnd': 12,
'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'flexDirection': 'row',
'paddingRight': 12, 'paddingLeft': 12}};
const value = 0;
object2.withoutMargin = {marginEnd: value};
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = a0 ? undefined : (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object2.filled = {backgroundColor: REDESIGN_BUTTON_TERTIARY_BACKGROUND};
const object3 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.borderWidth = 1;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object3.borderColor = INPUT_BACKGROUND_DEFAULT;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object3, SHADOW_LOW, INPUT_BACKGROUND_DEFAULT);
object2.outlined = object3;
object2.roundButton = {'maxWidth': 32, 'maxHeight': 32};
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.actionIcon = {tintColor: a0 ? colors.ICON_SUBTLE : colors.INTERACTIVE_TEXT_DEFAULT};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object2.actionText = {marginLeft: 4, marginTop: platformUtilsModule.isAndroid() ? -2 : value};
object2.unreadBadgeLeft = {'position': 'absolute', 'left': -2, 'top': -1};
object2.unreadBadgeRight = {'position': 'absolute', 'right': -2, 'top': -1};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.unreadBadgeMask = {color: BACKGROUND_BASE_LOW};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.countStyle = {position: 'relative', marginLeft: PX_8};
return object2;
}
function _fun76220({IconComponent, source, color, isRefreshEnabled}) { // fn#76220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1061, offset: 0x01dc6e12, size: 162 bytes, params: 2, frame: 20
const styles = useStyles(isRefreshEnabled);
const binding = env0_3;
const useCallback = binding.useCallback;
return (
IconComponent != null
? (
<IconComponent
size="sm"
color={isRefreshEnabled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE : color}
/>
)
: Reflect.apply(useCallback, binding, [_fun76221, [styles, color, source]])()
);
function _fun76221() { // fn#76221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1153, offset: 0x01dc6eb4, size: 121 bytes, params: 1, frame: 16
const Icon = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
return (
<Icon
size={SMALL}
source={source}
color={color ?? styles.actionIcon.tintColor}
/>
);
}
function _fun76220({IconComponent, source, color, isRefreshEnabled}) { // fn#76220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1061, offset: 0x01dc6e12, size: 162 bytes, params: 2, frame: 20
const styles = useStyles(isRefreshEnabled);
const binding = env0_3;
const useCallback = binding.useCallback;
return IconComponent != null ? <IconComponent size="sm" color={isRefreshEnabled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE : color} /> : Reflect.apply(useCallback,
binding, [_fun76221, [styles, color, source]])();
}
}
function IconActionButton({source, IconComponent, variant, color, buttonText, accessibilityLabel, style, badge, badgePosition, count, noMargin, hitSlop, disabled, onPress, onLongPress}) { // fn#76222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1662, offset: 0x01dc6f2d, size: 559 bytes, params: 2, frame: 34
variant = variant === undefined ? 'filled' : variant;
badgePosition = badgePosition === undefined ? 'left' : badgePosition;
count = count === undefined ? 0 : count;
const value6 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('IconActionButton');
const styles = useStyles(value6);
let r8 = buttonText != null && !((require(4584) /* metro dependency 4584: useFontScale */).useFontScale() > 1.2);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.actionIconButtonPressable];
items2[1] = variant === 'outlined' ? styles.outlined : styles.filled;
items2[2] = r8 ? undefined : styles.roundButton;
items2[3] = noMargin ? styles.withoutMargin : undefined;
items2[4] = style;
const env0_72 = ((Component) => <Component IconComponent={IconComponent} color={color} source={source} isRefreshEnabled={value6} />)(env0_7);
r8 = r8 && ((Text) => <Text variant="text-sm/bold" style={styles.actionText}>{buttonText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<PressableOpacity
hitSlop={hitSlop}
onPress={onPress}
onLongPress={onLongPress}
disabled={disabled}
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
style={items2}
>
{env0_72}
{r8}
{count > 0 ? ((Badge) => <Badge style={styles.countStyle} value={count} />)((require(1305) /* metro dependency 1305: native */).Badge) : null}
{badge && <ButtonBadge badgePosition={badgePosition} />}
</PressableOpacity>
);
}
function IconActionButton({source, IconComponent, variant, color, buttonText, accessibilityLabel, style, badge, badgePosition, count, noMargin, hitSlop, disabled, onPress, onLongPress}) { // fn#76222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1662, offset: 0x01dc6f2d, size: 559 bytes, params: 2, frame: 34
variant = variant === undefined ? 'filled' : variant;
badgePosition = badgePosition === undefined ? 'left' : badgePosition;
count = count === undefined ? 0 : count;
const value6 = (MobileVisualRefreshExperiment)('IconActionButton');
const styles = useStyles(value6);
let r8 = buttonText != null && !((require(4584) /* metro dependency 4584: useFontScale */).useFontScale() > 1.2);
const PressableOpacity = (PressablesModule).PressableOpacity;
const items2 = [styles.actionIconButtonPressable];
items2[1] = variant === 'outlined' ? styles.outlined : styles.filled;
items2[2] = r8 ? undefined : styles.roundButton;
items2[3] = noMargin ? styles.withoutMargin : undefined;
items2[4] = style;
const env0_73 = ((Component) => <Component IconComponent={IconComponent} color={color} source={source} isRefreshEnabled={value6} />)(env0_7);
r8 = r8 && ((Text) => <Text variant="text-sm/bold" style={styles.actionText}>{buttonText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<PressableOpacity
hitSlop={hitSlop}
onPress={onPress}
onLongPress={onLongPress}
disabled={disabled}
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
style={items2}
>
{env0_73}
{r8}
{
count > 0
? ((Badge) => <Badge style={styles.countStyle} value={count} />)((require(1305) /* metro dependency 1305: native */).Badge)
: null
}
{badge && <ButtonBadge badgePosition={badgePosition} />}
</PressableOpacity>
);
}
function _fun76221() { // fn#76221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1153, offset: 0x01dc6eb4, size: 121 bytes, params: 1, frame: 16
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
return (
<Icon
size={SMALL}
source={source}
color={color ?? styles.actionIcon.tintColor}
/>
);
}
global.__d(_fun76217, 9697, [31, 33, 4501, 697, 477, 1305, 1357, 4584, 5278, 4573, 9609,
2]) /* metro module 9697, dependencies: [31, 33, 4501, 697, 477, 1305, 1357, 4584, 5278, 4573, 9609, 2] */;
@@ -1,20 +1,25 @@
/* Metro module 9604; source: modules/main_tabs_v2/native/shared_components/MainTabsV2Constants.tsx; dependencies: [27, 1357, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
function _fun75284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9790:6, offset: 0x01da873d, size: 147 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const StyleSheet = (ReactNativeModule).StyleSheet;
const value = 2 * StyleSheet.hairlineWidth;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MainTabsV2Constants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MainTabsV2Constants.tsx');
exports.MIN_HEADER_HEIGHT = 56;
exports.HEADER_CORNER_RADIUS = 8;
exports.getMinHeaderHeight = getMinHeaderHeight;
exports.MIDNIGHT_BORDER_WIDTH = value;
function getMinHeaderHeight(a0) { // fn#75285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9790:313, offset: 0x01da87d0, size: 50 bytes, params: 2, frame: 11
let value = MobileVisualRefreshExperimentModule;
value = value.isMobileVisualRefreshEnabled(a0);
return value ? 64 : 56;
}
}
function getMinHeaderHeight(a0) { // fn#75285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9790:313, offset: 0x01da87d0, size: 50 bytes, params: 2, frame: 11
let value = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
value = value.isMobileVisualRefreshEnabled(a0);
return value ? 64 : 56;
}
global.__d(_fun75284, 9604, [27, 1357, 2]) /* metro module 9604, dependencies: [27, 1357, 2] */;
@@ -1,44 +1,55 @@
/* Metro module 9608; source: modules/main_tabs_v2/native/shared_components/MaskedBadge.tsx; dependencies: [31, 33, 4501, 697, 1305, 9609, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun75295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9794:6, offset: 0x01da8efc, size: 272 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{maskStyle: {position: 'relative',
const createStyles = CreateStylesModule.createStyles;
const PRIMARY_400 = (Native).unsafe_rawColors.PRIMARY_400;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{maskStyle: {position: 'relative',
right: undefined}, unreadDot: {'width': 0, 'height': 0}, badgeStyle: {'flexGrow': 1, 'flexShrink': 0},
unreadBadge: {'position': 'relative', 'bottom': -3}, lowPriorityBadge: {backgroundColor: PRIMARY_400}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MaskedBadge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MaskedBadge.tsx');
exports.default = MaskedBadge;
}
function MaskedBadge({backgroundColor, unread, value, maxValue, lowPriority, size, style}) { // fn#75296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9794:478, offset: 0x01da900c, size: 274 bytes, params: 2, frame: 24
var r0;
var MaskedBadge;
const styles = useStyles();
const binding = env0_3;
const useMemo = binding.useMemo;
const items = [backgroundColor];
if (value > 0) {
MaskedBadge = (require(1305) /* metro dependency 1305: native */).MaskedBadge;
value = <MaskedBadge maskStyle={[Reflect.apply(useMemo, binding, [function() {
return {backgroundColor: backgroundColor};
}, items]), styles.maskStyle]} dotStyle={styles.unreadDot} style={[styles.badgeStyle,
lowPriority ? styles.lowPriorityBadge : null, style]} value={value} maxValue={maxValue} />;
r0 = value;
} else {
value = null;
if (unread) {
value = importDefault(9609) /* metro dependency 9609: Badge */;
value = ((Component) => <Component size={size} maskColor={backgroundColor} style={styles.unreadBadge} />)(value);
function MaskedBadge({backgroundColor, unread, value, maxValue, lowPriority, size, style}) { // fn#75296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9794:478, offset: 0x01da900c, size: 274 bytes, params: 2, frame: 24
var r0;
var MaskedBadge;
const styles = useStyles();
const useMemo = ReactModule.useMemo;
const items = [backgroundColor];
if (value > 0) {
MaskedBadge = (require(1305) /* metro dependency 1305: native */).MaskedBadge;
value = (
<MaskedBadge
maskStyle={[Reflect.apply(useMemo, ReactModule, [function() {
return {backgroundColor: backgroundColor};
}, items]), styles.maskStyle]}
dotStyle={styles.unreadDot}
style={[styles.badgeStyle, lowPriority ? styles.lowPriorityBadge : null, style]}
value={value}
maxValue={maxValue}
/>
);
r0 = value;
} else {
r0 = value;
value = null;
if (unread) {
value = importDefault(9609) /* metro dependency 9609: Badge */;
value = ((Component) => <Component size={size} maskColor={backgroundColor} style={styles.unreadBadge} />)(value);
r0 = value;
} else {
r0 = value;
}
}
return r0;
}
return r0;
}
global.__d(_fun75295, 9608, [31, 33, 4501, 697, 1305, 9609,
2]) /* metro module 9608, dependencies: [31, 33, 4501, 697, 1305, 9609, 2] */;
@@ -1,4 +1,14 @@
/* Metro module 14463; source: modules/main_tabs_v2/native/shared_components/MessageRequestsButton.tsx; dependencies: [31, 27, 4621, 4622, 33, 4501, 566, 14464, 4578, 1244, 8341, 9697, 9197, 2] */
import MessageRequestStore from '../../../message_request/MessageRequestStore.tsx'; /* Metro dependency 4621 */
import SpamMessageRequestStore from '../../../message_request/SpamMessageRequestStore.tsx'; /* Metro dependency 4622 */
import IconActionButton from './IconActionButton.tsx'; /* Metro dependency 9697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as GeneratedModule from '../../../../design/components/LottieIcon/native/generated/index.tsx'; /* Metro dependency 14464 */
function _fun109455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:6, offset: 0x0234c8da, size: 269 bytes, params: 8, frame: 20
const env0_0 = require;
const useMessageRequestCounts = function() {
@@ -9,116 +19,135 @@ function _fun109455(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const messageRequestStore = importDefault(4621) /* metro dependency 4621: MessageRequestStore */;
const spamMessageRequestStore = importDefault(4622) /* metro dependency 4622: SpamMessageRequestStore */;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonContainer: {position: 'relative'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MessageRequestsButton.tsx');
const env0_9 = (CreateStylesModule).createStyles({buttonContainer: {position: 'relative'}});
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MessageRequestsButton.tsx');
exports.default = MessageRequestsButton;
}
function useMessageRequestCounts() { // fn#109456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:232, offset: 0x0234c9e7, size: 110 bytes, params: 1, frame: 20
const object2 = {};
object2.requestCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageRequestStore],
function() {
return MessageRequestStore.getMessageRequestsCount();
});
object2.spamCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([SpamMessageRequestStore],
function() {
return SpamMessageRequestStore.getSpamChannelsCount();
});
return object2;
}
function MessageRequestAnimation({color}) { // fn#109459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:427, offset: 0x0234ca7b, size: 146 bytes, params: 2, frame: 18
const value2 = env0_3.useRef(null);
env0_3.useEffect(_fun109460, [useMessageRequestCounts().requestCount]);
const MessageRequestLottie = (require(14464) /* metro dependency 14464: generated */).MessageRequestLottie;
return (
<MessageRequestLottie
ref={value2}
color={color}
size="sm"
autoPlay
/>
);
}
function MessageRequestsButton(a0) { // fn#109461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:803, offset: 0x0234cb4a, size: 659 bytes, params: 2, frame: 29
var r9;
var r13;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var IconButton;
var Button;
var items2;
let alternateVariant = a0.alternateVariant;
const value = undefined;
alternateVariant = !(alternateVariant === value) && alternateVariant;
const value3 = Object.create(null);
value3.alternateVariant = 0;
const value4 = copyDataProperties({}, a0, value3, undefined);
const styles = useStyles();
const value6 = useMessageRequestCounts();
const requestCount = value6.requestCount;
if (requestCount === 0) {
if (value6.spamCount === 0) {
return null;
function useMessageRequestCounts() { // fn#109456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:232, offset: 0x0234c9e7, size: 110 bytes, params: 1, frame: 20
const object = {};
object.requestCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageRequestStore],
function() {
return MessageRequestStore.getMessageRequestsCount();
});
object.spamCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([SpamMessageRequestStore],
function() {
return SpamMessageRequestStore.getSpamChannelsCount();
});
return object;
function _fun109457() { // fn#109457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:319, offset: 0x0234ca55, size: 19 bytes, params: 1, frame: 9
return MessageRequestStore.getMessageRequestsCount();
}
function _fun109458() { // fn#109458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:395, offset: 0x0234ca68, size: 19 bytes, params: 1, frame: 9
return SpamMessageRequestStore.getSpamChannelsCount();
}
}
if (alternateVariant) {
r13 = requestCount > 0 ? requestCount.toString() : value;
var viewBindingProps = {style: styles.buttonContainer, collapsable: false};
if (r13 != null) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r9 = <Button icon={<MessageRequestAnimation />} variant="secondary" text={r13} size="sm" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)} {...value4} />;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
r9 = <IconButton variant="secondary" size="sm" icon={<MessageRequestAnimation />} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)} {...value4} />;
}
items2 = [r9];
items2[1] = requestCount > 0 && ((ButtonBadge) => <ButtonBadge badgePosition="right" />)((require(9697) /* metro dependency 9697: IconActionButton */).ButtonBadge);
function MessageRequestAnimation({color}) { // fn#109459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:427, offset: 0x0234ca7b, size: 146 bytes, params: 2, frame: 18
const value2 = ReactModule.useRef(null);
ReactModule.useEffect(_fun109460, [useMessageRequestCounts().requestCount]);
const MessageRequestLottie = (GeneratedModule).MessageRequestLottie;
return (
<View {...viewBindingProps}>
{items2}
</View>
<MessageRequestLottie
ref={value2}
color={color}
size="sm"
autoPlay
/>
);
function _fun109460() { // fn#109460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:553, offset: 0x0234cb0d, size: 61 bytes, params: 1, frame: 12
var r0;
var r1;
var value2;
var current;
if (requestCount > 0) {
value2 = env0_0 == null;
if (value2) {
r0 = value2;
r1 = undefined;
} else {
current = env0_0.current;
r0 = current == null;
r1 = current;
}
if (!r0) {
r1.play();
}
}
}
}
function MessageRequestsButton(a0) { // fn#109461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:803, offset: 0x0234cb4a, size: 659 bytes, params: 2, frame: 29
var r9;
var r13;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var IconButton;
var Button;
var items2;
let alternateVariant = a0.alternateVariant;
const value = undefined;
alternateVariant = !(alternateVariant === value) && alternateVariant;
const value3 = Object.create(null);
value3.alternateVariant = 0;
const value4 = copyDataProperties({}, a0, value3, undefined);
const styles = useStyles();
const value6 = useMessageRequestCounts();
const requestCount = value6.requestCount;
if (requestCount === 0) {
if (value6.spamCount === 0) {
return null;
}
}
if (alternateVariant) {
r13 = requestCount > 0 ? requestCount.toString() : value;
var viewBindingProps = {style: styles.buttonContainer, collapsable: false};
if (r13 != null) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r9 = (
<Button
icon={<MessageRequestAnimation />}
variant="secondary"
text={r13}
size="sm"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)}
{...value4}
/>
);
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
r9 = (
<IconButton
variant="secondary"
size="sm"
icon={<MessageRequestAnimation />}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)}
{...value4}
/>
);
}
items2 = [r9];
items2[1] = requestCount > 0 && ((ButtonBadge) => <ButtonBadge badgePosition="right" />)((require(9697) /* metro dependency 9697: IconActionButton */).ButtonBadge);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
return (
<IconActionButton
source={importDefault(9197) /* metro dependency 9197 */}
IconComponent={MessageRequestAnimation}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)}
buttonText={requestCount > 0 ? requestCount.toString() : value}
badge={requestCount > 0}
badgePosition="right"
{...value4}
/>
);
}
const IconActionButton = importDefault(9697) /* metro dependency 9697: IconActionButton */;
return (
<IconActionButton
source={importDefault(9197) /* metro dependency 9197 */}
IconComponent={MessageRequestAnimation}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)}
buttonText={requestCount > 0 ? requestCount.toString() : value}
badge={requestCount > 0}
badgePosition="right"
{...value4}
/>
);
}
function _fun109460() { // fn#109460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:553, offset: 0x0234cb0d, size: 61 bytes, params: 1, frame: 12
var r0;
var r1;
var value2;
var current;
if (requestCount > 0) {
value2 = env0_0 == null;
if (value2) {
r0 = value2;
r1 = undefined;
} else {
current = env0_0.current;
r0 = current == null;
r1 = current;
}
if (!r0) {
r1.play();
}
}
}
global.__d(_fun109455, 14463, [31, 27, 4621, 4622, 33, 4501, 566, 14464, 4578, 1244, 8341, 9697, 9197,
2]) /* metro module 14463, dependencies: [31, 27, 4621, 4622, 33, 4501, 566, 14464, 4578, 1244, 8341, 9697, 9197, 2] */;
@@ -1,66 +1,87 @@
/* Metro module 6983; source: modules/main_tabs_v2/native/shared_components/SearchBarNav.tsx; dependencies: [31, 27, 33, 4501, 5314, 697, 5278, 1244, 477, 5284, 4573, 6984, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
function _fun55372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7161:6, offset: 0x013a4b77, size: 405 bytes, params: 8, frame: 25
var object3;
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_2 = value2.View;
const StyleSheet = value2.StyleSheet;
const value3 = require(33) /* metro dependency 33 */;
const env0_3 = value3.jsx;
const env0_4 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object4.height = NAV_BAR_HEIGHT;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'flexDirection': 'row', 'alignItems': 'center'};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.height = NAV_BAR_HEIGHT;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.borderBottomWidth = StyleSheet.hairlineWidth;
object2.backgroundColor = BACKGROUND_BASE_LOW;
object2.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object4.borderColor = BORDER_STRONG;
object3.container = object4;
object2.borderColor = BORDER_STRONG;
object.container = object2;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.cancelText = {paddingLeft: PX_16};
object.cancelText = {paddingLeft: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.cancelIcon = {marginRight: PX_16};
object3.flex = {flex: 1};
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object3]);
object.cancelIcon = {marginRight: PX_16};
object.flex = {flex: 1};
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.forwardRef(_fun55373);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/SearchBarNav.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/SearchBarNav.tsx');
exports.default = value;
function _fun55373(a0, a1) { // fn#55373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7161:559, offset: 0x013a4d0c, size: 555 bytes, params: 3, frame: 28
const onClose = a0.onClose;
const value = null;
const value2 = Object.create(value);
value2.onClose = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const object = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
object.onPress = onClose;
object.hitSlop = {'top': 8, 'right': 8, 'bottom': 8, 'left': 8};
const pressableOpacity = (
<PressableOpacity {...object}>
{
PlatformUtilsModule.isAndroid()
? ((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon style={styles.cancelIcon} />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon)
: ((Text) => <Text style={styles.cancelText} maxFontSizeMultiplier={2} variant="text-md/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
</PressableOpacity>
);
const items2 = [PlatformUtilsModule.isAndroid() ? pressableOpacity : value];
const SearchField = (SearchFieldNativeModule).SearchField;
items2[1] = (
<View style={styles.flex}>
<View>
<SearchField
size="md"
isRound
ref={a1}
{...value3}
/>
</View>
</View>
);
items2[2] = PlatformUtilsModule.isAndroid() ? value : pressableOpacity;
return (
<View style={styles.container}>
{items2}
</View>
);
}
}
function _fun55373(a0, a1) { // fn#55373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7161:559, offset: 0x013a4d0c, size: 555 bytes, params: 3, frame: 28
const onClose = a0.onClose;
const value = null;
const value2 = Object.create(value);
value2.onClose = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object2 = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
object2.onPress = onClose;
object2.hitSlop = {'top': 8, 'right': 8, 'bottom': 8, 'left': 8};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const pressableOpacity = <PressableOpacity {...object2}>{platformUtilsModule.isAndroid() ? ((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon style={styles.cancelIcon} />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon) : ((Text) => <Text style={styles.cancelText} maxFontSizeMultiplier={2} variant="text-md/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
const moduleValue2 = platformUtilsModule;
const items2 = [moduleValue2.isAndroid() ? pressableOpacity : value];
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[1] = <View style={styles.flex}><View><SearchField size="md" isRound ref={a1} {...value3} /></View></View>;
const moduleValue3 = platformUtilsModule;
items2[2] = moduleValue3.isAndroid() ? value : pressableOpacity;
return (
<View style={styles.container}>
{items2}
</View>
);
}
global.__d(_fun55372, 6983, [31, 27, 33, 4501, 5314, 697, 5278, 1244, 477, 5284, 4573, 6984,
2]) /* metro module 6983, dependencies: [31, 27, 33, 4501, 5314, 697, 5278, 1244, 477, 5284, 4573, 6984, 2] */;
@@ -1,56 +1,64 @@
/* Metro module 11837; source: modules/main_tabs_v2/native/shared_components/SearchButton.tsx; dependencies: [31, 27, 33, 4501, 697, 6998, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as MagnifyingGlassIconModule from '../../../../design/components/Icon/native/redesign/generated/MagnifyingGlassIcon.tsx'; /* Metro dependency 6998 */
function _fun90737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12023:6, offset: 0x02043901, size: 305 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).Pressable;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object2.searchButton = {'backgroundColor': null, 'height': 40, 'alignItems': 'center', 'flexDirection': 'row',
object.searchButton = {'backgroundColor': null, 'height': 40, 'alignItems': 'center', 'flexDirection': 'row',
'paddingHorizontal': 12, backgroundColor: INPUT_BACKGROUND_DEFAULT};
object2.roundedCorners = {borderRadius: 20};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.roundedCornersAlt = object3;
object2.text = {marginLeft: 8};
const env0_5 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/SearchButton.tsx');
object.roundedCorners = {borderRadius: 20};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.roundedCornersAlt = object4;
object.text = {marginLeft: 8};
const env0_5 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/SearchButton.tsx');
exports.SEARCH_BAR_HEIGHT = 40;
exports.SearchButtonContent = SearchButtonContent;
function SearchButtonContent(a0) { // fn#90738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12023:566, offset: 0x02043a32, size: 293 bytes, params: 2, frame: 23
const panelVariant = a0.panelVariant;
let value = Object.create(null);
value.panelVariant = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const pressableBindingProps = {...value2};
pressableBindingProps['style'] = [styles.searchButton,
panelVariant ? styles.roundedCornersAlt : styles.roundedCorners, value2.style];
const MagnifyingGlassIcon = (MagnifyingGlassIconModule).MagnifyingGlassIcon;
value = <MagnifyingGlassIcon size="xs" />;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Pressable {...pressableBindingProps}>
{value}
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.text}
maxFontSizeMultiplier={2}
>
{intl.string((IndexNativeModule).t['5h0QOP'])}
</Text>
</Pressable>
);
}
}
function SearchButtonContent(a0) { // fn#90738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12023:566, offset: 0x02043a32, size: 293 bytes, params: 2, frame: 23
const panelVariant = a0.panelVariant;
let value = Object.create(null);
value.panelVariant = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const pressableBindingProps = {...value2};
pressableBindingProps['style'] = [styles.searchButton,
panelVariant ? styles.roundedCornersAlt : styles.roundedCorners, value2.style];
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
value = <MagnifyingGlassIcon size="xs" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Pressable {...pressableBindingProps}>
{value}
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.text}
maxFontSizeMultiplier={2}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}
</Text>
</Pressable>
);
}
global.__d(_fun90737, 11837, [31, 27, 33, 4501, 697, 6998, 4573, 1244,
2]) /* metro module 11837, dependencies: [31, 27, 33, 4501, 697, 6998, 4573, 1244, 2] */;
@@ -1,44 +1,45 @@
/* Metro module 10253; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelAnimationConstants.tsx; dependencies: [4577, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SpringModule from '../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
function _fun79625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:6, offset: 0x01e5b7a5, size: 279 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {'damping': 35, 'stiffness': 275, 'mass': 1, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
object = {'damping': 35, 'stiffness': 275, 'mass': 1, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
'restDisplacementThreshold': 0.001};
const closure = TYPING_ENTERING;
const withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
closure.__closure = {withSpring: withSpring, CHANNEL_SPRING_CONFIG: object2};
closure.__workletHash = 5885186288311;
closure.__initData = {code: 'function ChannelAnimationConstantsTsx1(){const{withSpring,CHANNEL_SPRING_CONFIG}=this.__closure;return{initialValues:{transform:[{scale:0}],opacity:0},animations:{transform:[{scale:withSpring(1,CHANNEL_SPRING_CONFIG)}],opacity:withSpring(1,CHANNEL_SPRING_CONFIG)}};}'};
const closure2 = TYPING_EXITING;
closure2.__closure = {withSpring: withSpring, CHANNEL_SPRING_CONFIG: object2};
closure2.__workletHash = 1746051409364;
closure2.__initData = {code: 'function ChannelAnimationConstantsTsx2(){const{withSpring,CHANNEL_SPRING_CONFIG}=this.__closure;return{initialValues:{transform:[{scale:1}],opacity:1},animations:{transform:[{scale:withSpring(0,CHANNEL_SPRING_CONFIG)}],opacity:withSpring(0,CHANNEL_SPRING_CONFIG)}};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelAnimationConstants.tsx');
const TYPING_ENTERING2 = TYPING_ENTERING;
const withSpring = (SpringModule).withSpring;
TYPING_ENTERING2.__closure = {withSpring: withSpring, CHANNEL_SPRING_CONFIG: object};
TYPING_ENTERING2.__workletHash = 5885186288311;
TYPING_ENTERING2.__initData = {code: 'function ChannelAnimationConstantsTsx1(){const{withSpring,CHANNEL_SPRING_CONFIG}=this.__closure;return{initialValues:{transform:[{scale:0}],opacity:0},animations:{transform:[{scale:withSpring(1,CHANNEL_SPRING_CONFIG)}],opacity:withSpring(1,CHANNEL_SPRING_CONFIG)}};}'};
const TYPING_EXITING2 = TYPING_EXITING;
TYPING_EXITING2.__closure = {withSpring: withSpring, CHANNEL_SPRING_CONFIG: object};
TYPING_EXITING2.__workletHash = 1746051409364;
TYPING_EXITING2.__initData = {code: 'function ChannelAnimationConstantsTsx2(){const{withSpring,CHANNEL_SPRING_CONFIG}=this.__closure;return{initialValues:{transform:[{scale:1}],opacity:1},animations:{transform:[{scale:withSpring(0,CHANNEL_SPRING_CONFIG)}],opacity:withSpring(0,CHANNEL_SPRING_CONFIG)}};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelAnimationConstants.tsx');
exports.MESSAGE_PREVIEW_DELAY = 350;
exports.CHANNEL_SPRING_CONFIG = object2;
exports.TYPING_ENTERING = closure;
exports.TYPING_EXITING = closure2;
}
exports.CHANNEL_SPRING_CONFIG = object;
exports.TYPING_ENTERING = TYPING_ENTERING2;
exports.TYPING_EXITING = TYPING_EXITING2;
function TYPING_ENTERING() { // fn#79626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:496, offset: 0x01e5b8bc, size: 126 bytes, params: 1, frame: 20
const object2 = {};
const withSpring = SpringModule.withSpring;
const binding = env0_2;
object2.transform = [{scale: Reflect.apply(withSpring, SpringModule, [1, binding])}];
object2.opacity = SpringModule.withSpring(1, binding);
return {initialValues: {transform: [{scale: 0}], opacity: 0}, animations: object2};
}
function TYPING_ENTERING() { // fn#79626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:496, offset: 0x01e5b8bc, size: 126 bytes, params: 1, frame: 20
const object = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_2;
object.transform = [{scale: Reflect.apply(withSpring, springModule, [1, binding])}];
object.opacity = springModule.withSpring(1, binding);
return {initialValues: {transform: [{scale: 0}], opacity: 0}, animations: object};
}
function TYPING_EXITING() { // fn#79627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:1052, offset: 0x01e5b93a, size: 126 bytes, params: 1, frame: 19
const object2 = {};
const withSpring = SpringModule.withSpring;
const binding = env0_2;
object2.transform = [{scale: Reflect.apply(withSpring, SpringModule, [0, binding])}];
object2.opacity = SpringModule.withSpring(0, binding);
return {initialValues: {transform: [{scale: 1}], opacity: 1}, animations: object2};
}
function TYPING_EXITING() { // fn#79627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:1052, offset: 0x01e5b93a, size: 126 bytes, params: 1, frame: 19
const object = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_2;
object.transform = [{scale: Reflect.apply(withSpring, springModule, [0, binding])}];
object.opacity = springModule.withSpring(0, binding);
return {initialValues: {transform: [{scale: 1}], opacity: 1}, animations: object};
}
global.__d(_fun79625, 10253, [4577, 2]) /* metro module 10253, dependencies: [4577, 2] */;
@@ -1,81 +1,115 @@
/* Metro module 15054; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelContent.tsx; dependencies: [31, 27, 10980, 4865, 33, 4501, 477, 10981, 5107, 15055, 6705, 8129, 14538, 4573, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ReadStateConstantsModule from '../../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as ChannelListLayoutModule from './layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
function _fun113917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15251:6, offset: 0x0240b9ef, size: 442 bytes, params: 8, frame: 26
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
const env0_3 = importAll(dependencyMap[value]);
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value2 = 2;
const SUBTITLE_OPACITY_NORMAL = require(dependencyMap[value2]).SUBTITLE_OPACITY_NORMAL;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {flex: 1};
object5.marginTop = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? value2 : -1;
object4.channelContent = object5;
object4.channelContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {flex: 1};
object2.marginTop = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? value2 : -1;
object.channelContent = object2;
object.channelContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
object4.leftBox = {'flexDirection': 'column', 'alignItems': 'flex-start', 'flexShrink': 1};
object4.rightBox = {'flexDirection': 'column', 'alignItems': 'flex-end'};
object4.rightContentAbsolute = {'position': 'absolute', 'right': 0, 'top': 0};
object4.channelTraits = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
const object6 = {opacity: SUBTITLE_OPACITY_NORMAL, marginRight: 4};
object.leftBox = {'flexDirection': 'column', 'alignItems': 'flex-start', 'flexShrink': 1};
object.rightBox = {'flexDirection': 'column', 'alignItems': 'flex-end'};
object.rightContentAbsolute = {'position': 'absolute', 'right': 0, 'top': 0};
object.channelTraits = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
const object3 = {opacity: SUBTITLE_OPACITY_NORMAL, marginRight: 4};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object6.marginTop = platformUtilsModule.isAndroid() ? value2 : value;
object4.channelTraitIcon = object6;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelContent.tsx');
object3.marginTop = platformUtilsModule.isAndroid() ? value2 : value;
object.channelTraitIcon = object3;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelContent.tsx');
exports.renderChannelContent = renderChannelContent;
}
function ChannelContentComponent({name, subtitle, unread, resolvedUnreadSetting, locked, muted, lastMessageTimestampString, channel, connected, layout, mentionCount, mentionBadge, isSubscriptionGated, needSubscriptionToAccess}) { // fn#113918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15251:723, offset: 0x0240bba9, size: 1108 bytes, params: 2, frame: 48
var object8;
var items4;
const styles = useStyles();
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
let r33 = channel != null && (locked || (importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel));
let r32 = channel?.isNSFW();
const isValidElement2 = env0_3.isValidElement(subtitle);
const value7 = lastMessageTimestampString != null;
let r12 = value7 && mentionBadge == null;
const items2 = [styles.leftBox];
items2[1] = {justifyContent: isValidElement2 ? 'space-between' : 'center'};
const object = {'flexDirection': 'row', 'paddingRight': null, 'alignItems': 'center'};
object.paddingRight = r12 ? 30 : 0;
const value13 = ((Component) => <Component title={name} muted={muted} unread={unread} resolvedUnreadSetting={resolvedUnreadSetting ?? UnreadSetting.ONLY_MENTIONS} connected={connected} layout={layout} />)(importDefault(15055) /* metro dependency 15055: ChannelTitle */);
let r23 = r33 || r32;
if (r23) {
var viewProps = {style: [styles.channelTraits, {maxWidth: 14 * (r33 && r32 ? 2 : 1)}]};
r33 = r33 && ((LockIcon) => <LockIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon);
items4 = [r33];
r32 = r32 && ((WarningIcon) => <WarningIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon);
items4[1] = r32;
items4[2] = isSubscriptionGated && ((Component) => <Component locked={needSubscriptionToAccess} isInMainTabsExperiment />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
r23 = <View {...viewProps}>{items4}</View>;
}
const view = <View style={items2}><View style={object}>{value13}{r23}</View>{isValidElement2 ? <View style={[{paddingRight: (mentionCount ?? 0) > 0 ? 20 : 0},
{marginTop: layoutStyles.messagePreview.margin.marginTop}]}>{subtitle}</View> : null}</View>;
const r11 = r12 ? styles.rightContentAbsolute : styles.rightBox;
const items8 = [value7 && ((Text) => <Text variant="text-xs/medium" color="text-muted" style={{marginLeft: 'auto'}} maxFontSizeMultiplier={1.75}>{lastMessageTimestampString}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
items8[1] = <View style={[{'alignItems': 'center', 'paddingLeft': 4},
value7 && ({marginTop: 5})]}>{mentionBadge}</View>;
r12 = r12 && <View style={{flex: 1}} />;
items8[2] = r12;
return (
<View style={styles.channelContent}>
<View style={styles.channelContainer}>
{view}
<View style={r11}>
{items8}
function ChannelContentComponent({name, subtitle, unread, resolvedUnreadSetting, locked, muted, lastMessageTimestampString, channel, connected, layout, mentionCount, mentionBadge, isSubscriptionGated, needSubscriptionToAccess}) { // fn#113918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15251:723, offset: 0x0240bba9, size: 1108 bytes, params: 2, frame: 48
var object;
var items4;
const styles = useStyles();
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(layout);
let r33 = channel != null && (locked || (importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel));
let r32 = channel?.isNSFW();
const isValidElement2 = env0_3.isValidElement(subtitle);
const value7 = lastMessageTimestampString != null;
let r12 = value7 && mentionBadge == null;
const items2 = [styles.leftBox];
items2[1] = {justifyContent: isValidElement2 ? 'space-between' : 'center'};
const object3 = {'flexDirection': 'row', 'paddingRight': null, 'alignItems': 'center'};
object3.paddingRight = r12 ? 30 : 0;
const value13 = ((Component) => <Component title={name} muted={muted} unread={unread} resolvedUnreadSetting={resolvedUnreadSetting ?? UnreadSetting.ONLY_MENTIONS} connected={connected} layout={layout} />)(importDefault(15055) /* metro dependency 15055: ChannelTitle */);
let r23 = r33 || r32;
if (r23) {
var viewProps = {style: [styles.channelTraits, {maxWidth: 14 * (r33 && r32 ? 2 : 1)}]};
r33 = r33 && ((LockIcon) => <LockIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon);
items4 = [r33];
r32 = r32 && ((WarningIcon) => <WarningIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon);
items4[1] = r32;
items4[2] = isSubscriptionGated && ((Component) => <Component locked={needSubscriptionToAccess} isInMainTabsExperiment />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
r23 = (
<View {...viewProps}>
{items4}
</View>
);
}
const view = (
<View style={items2}>
<View style={object3}>
{value13}
{r23}
</View>
{
isValidElement2
? (
<View
style={[{paddingRight: (mentionCount ?? 0) > 0 ? 20 : 0},
{marginTop: layoutStyles.messagePreview.margin.marginTop}]}
>
{subtitle}
</View>
)
: null
}
</View>
);
const r11 = r12 ? styles.rightContentAbsolute : styles.rightBox;
const items8 = [
value7 && ((Text) => <Text variant="text-xs/medium" color="text-muted" style={{marginLeft: 'auto'}} maxFontSizeMultiplier={1.75}>{lastMessageTimestampString}</Text>)((require(4573) /* metro dependency 4573: Text */).Text),
];
items8[1] = (
<View style={[{'alignItems': 'center', 'paddingLeft': 4}, value7 && ({marginTop: 5})]}>
{mentionBadge}
</View>
);
r12 = r12 && <View style={{flex: 1}} />;
items8[2] = r12;
return (
<View style={styles.channelContent}>
<View style={styles.channelContainer}>
{view}
<View style={r11}>
{items8}
</View>
</View>
</View>
</View>
);
);
}
function renderChannelContent(a0) { // fn#113919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15251:2305, offset: 0x01da845c, size: 33 bytes, params: 2, frame: 13
return <ChannelContentComponent {...a0} />;
}
}
global.__d(_fun113917, 15054, [31, 27, 10980, 4865, 33, 4501, 477, 10981, 5107, 15055, 6705, 8129, 14538, 4573,
2]) /* metro module 15054, dependencies: [31, 27, 10980, 4865, 33, 4501, 477, 10981, 5107, 15055, 6705, 8129, 14538, 4573, 2] */;
@@ -1,132 +1,162 @@
/* Metro module 15056; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelItem.tsx; dependencies: [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 1244, 4501, 697, 10981, 566, 6819, 11727, 4788, 14804, 9719, 15054, 4805, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildIcon from '../../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ReadStateConstantsModule from '../../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as ChannelListLayoutModule from './layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
import * as AppLauncherChannelListActionSheetModule from '../../../../app_launcher/native/options/channel/AppLauncherChannelListActionSheet.tsx'; /* Metro dependency 11727 */
import * as ChannelWrapperModule from './ChannelWrapper.tsx'; /* Metro dependency 14804 */
import * as ChannelContentModule from './ChannelContent.tsx'; /* Metro dependency 15054 */
function _fun113923(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:6, offset: 0x0240c267, size: 307 bytes, params: 8, frame: 19
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun113926);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelItem.tsx');
ReactModule;
const env0_11 = (CreateStylesModule).createStyles(_fun113926);
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelItem.tsx');
exports.getChannelAccessibilityProps = getChannelAccessibilityProps;
exports.renderChannelItem = renderChannelItem;
}
function LaunchpadChannelIcon({channel, layout}) { // fn#113924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:419, offset: 0x0240c39a, size: 329 bytes, params: 2, frame: 27
const styles = useStyles(layout);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const view = <View style={styles.guildBadgeIcon}>{((Component) => <Component guild={guild} size={layoutStyles.icon.guildBadgeIconSize} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View>;
const ChannelIcon = (require(11727) /* metro dependency 11727: AppLauncherChannelListActionSheet */).ChannelIcon;
const r9 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCozy(layout) ? 'md' : 'sm';
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
value = value.isLayoutCozy(layout);
return (
<>
{view}
<ChannelIcon
channel={channel}
size={r9}
wrapperSize={value ? 48 : 32}
/>
</>
);
}
function _fun113926(a0) { // fn#113926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:241, offset: 0x0240c4e3, size: 108 bytes, params: 2, frame: 15
const object = {'position': 'absolute', 'zIndex': 1, 'bottom': -4, 'right': -4, 'borderColor': null,
'borderWidth': 2};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.borderColor = BACKGROUND_BASE_LOW;
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
value = value.isLayoutCozy(a0);
object.borderRadius = value ? 9 : 6;
return {guildBadgeIcon: object};
}
function getChannelAccessibilityProps({channel, unread, mentionCount, voiceStates, embeddedActivitiesCount}) { // fn#113927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:954, offset: 0x0240c54f, size: 211 bytes, params: 2, frame: 20
var r1;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const object4 = {'accessible': true, 'accessibilityRole': 'button'};
object4.accessibilityLabel = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel,
unread: unread, mentionCount: mentionCount, voiceStates: voiceStates,
embeddedActivitiesCount: embeddedActivitiesCount});
if (channel.isGuildVoice()) {
object2 = {};
object2.accessibilityHint = intl.string(t['9C444m']);
r1 = object2;
} else if (channel.isGuildStageVoice()) {
object2 = {};
object2.accessibilityHint = intl.string(t['9C444m']);
r1 = object2;
} else {
r1 = undefined;
function LaunchpadChannelIcon({channel, layout}) { // fn#113924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:419, offset: 0x0240c39a, size: 329 bytes, params: 2, frame: 27
const styles = useStyles(layout);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const view = (
<View style={styles.guildBadgeIcon}>
{((Component) => <Component guild={guild} size={layoutStyles.icon.guildBadgeIconSize} />)(GuildIcon)}
</View>
);
const ChannelIcon = (AppLauncherChannelListActionSheetModule).ChannelIcon;
const r9 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCozy(layout) ? 'md' : 'sm';
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
value = value.isLayoutCozy(layout);
return (
<>
{view}
<ChannelIcon
channel={channel}
size={r9}
wrapperSize={value ? 48 : 32}
/>
</>
);
}
copyDataProperties(object4, r1, undefined);
return object4;
}
function renderChannelItem({channel, subtitle, unreadBadge, mentionBadge, locked, unread, resolvedUnreadSetting = UnreadSetting.ONLY_MENTIONS, live, muted, latestMessageTimestamp, layout, end, connected, mentionCount, launchpad, channelName, fontScale, isSubscriptionGated, needSubscriptionToAccess, panelVariant}) { // fn#113928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:1354, offset: 0x0240c622, size: 770 bytes, params: 2, frame: 48
var r30;
var moduleValue6;
locked = !(locked === undefined) && locked;
unread = !(unread === undefined) && unread;
live = !(live === undefined) && live;
muted = !(muted === undefined) && muted;
isSubscriptionGated = !(isSubscriptionGated === undefined) && isSubscriptionGated;
needSubscriptionToAccess = !(needSubscriptionToAccess === undefined) && needSubscriptionToAccess;
panelVariant = !(panelVariant === undefined) && panelVariant;
const r25 = latestMessageTimestamp == null || muted ? null : (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(latestMessageTimestamp);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
const channelWrapperModule = require(14804) /* metro dependency 14804: ChannelWrapper */;
const renderChannelWrapper = channelWrapperModule.renderChannelWrapper;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const items2 = [unreadBadge];
const object = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
copyDataProperties(object, channelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size), undefined);
copyDataProperties(object, layoutStyles.icon.margin, undefined);
items2[1] = <View style={object}>{channel.isGroupDM() ? ((Component) => <Component channel={channel} size={layoutStyles.icon.avatarSize} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */) : <LaunchpadChannelIcon channel={channel} layout={layout} />}</View>;
const channelContentModule = require(15054) /* metro dependency 15054: ChannelContent */;
const renderChannelContent = channelContentModule.renderChannelContent;
const object2 = {layout: layout};
if (channelName != null) {
r30 = channelName;
} else {
moduleValue6 = require(4805) /* metro dependency 4805: useChannelName */;
r30 = moduleValue6.computeChannelName(channel, UserStore, RelationshipStore);
function _fun113926(a0) { // fn#113926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:241, offset: 0x0240c4e3, size: 108 bytes, params: 2, frame: 15
const object2 = {'position': 'absolute', 'zIndex': 1, 'bottom': -4, 'right': -4, 'borderColor': null,
'borderWidth': 2};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.borderColor = BACKGROUND_BASE_LOW;
let value = ChannelListLayoutModule;
value = value.isLayoutCozy(a0);
object2.borderRadius = value ? 9 : 6;
return {guildBadgeIcon: object2};
}
object2.name = r30;
object2.subtitle = subtitle;
object2.unread = unread;
object2.resolvedUnreadSetting = resolvedUnreadSetting;
object2.muted = muted;
object2.lastMessageTimestampString = r25;
object2.channel = channel;
object2.locked = locked;
object2.connected = connected;
object2.live = live;
object2.mentionCount = mentionCount;
object2.mentionBadge = mentionBadge;
object2.isSubscriptionGated = isSubscriptionGated;
object2.needSubscriptionToAccess = needSubscriptionToAccess;
items2[2] = Reflect.apply(renderChannelContent, channelContentModule, [object2]);
items2[3] = end != null ? <View style={{paddingLeft: 8}}>{end}</View> : null;
return Reflect.apply(renderChannelWrapper, channelWrapperModule, [<>{items2}</>, {channel: channel, layout: layout,
launchpad: launchpad, fontScale: fontScale, panelVariant: panelVariant}]);
function getChannelAccessibilityProps({channel, unread, mentionCount, voiceStates, embeddedActivitiesCount}) { // fn#113927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:954, offset: 0x0240c54f, size: 211 bytes, params: 2, frame: 20
var r1;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const object3 = {'accessible': true, 'accessibilityRole': 'button'};
object3.accessibilityLabel = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel,
unread: unread, mentionCount: mentionCount, voiceStates: voiceStates,
embeddedActivitiesCount: embeddedActivitiesCount});
if (channel.isGuildVoice()) {
object = {};
object.accessibilityHint = intl.string(t['9C444m']);
r1 = object;
} else if (channel.isGuildStageVoice()) {
object = {};
object.accessibilityHint = intl.string(t['9C444m']);
r1 = object;
} else {
r1 = undefined;
}
copyDataProperties(object3, r1, undefined);
return object3;
}
function renderChannelItem({channel, subtitle, unreadBadge, mentionBadge, locked, unread, resolvedUnreadSetting = UnreadSetting.ONLY_MENTIONS, live, muted, latestMessageTimestamp, layout, end, connected, mentionCount, launchpad, channelName, fontScale, isSubscriptionGated, needSubscriptionToAccess, panelVariant}) { // fn#113928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:1354, offset: 0x0240c622, size: 770 bytes, params: 2, frame: 48
var r30;
var moduleValue6;
locked = !(locked === undefined) && locked;
unread = !(unread === undefined) && unread;
live = !(live === undefined) && live;
muted = !(muted === undefined) && muted;
isSubscriptionGated = !(isSubscriptionGated === undefined) && isSubscriptionGated;
needSubscriptionToAccess = !(needSubscriptionToAccess === undefined) && needSubscriptionToAccess;
panelVariant = !(panelVariant === undefined) && panelVariant;
const r25 = latestMessageTimestamp == null || muted ? null : (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(latestMessageTimestamp);
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(layout);
const renderChannelWrapper = ChannelWrapperModule.renderChannelWrapper;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const items2 = [unreadBadge];
const object3 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
copyDataProperties(object3, ChannelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size), undefined);
copyDataProperties(object3, layoutStyles.icon.margin, undefined);
items2[1] = (
<View style={object3}>
{
channel.isGroupDM()
? ((Component) => <Component channel={channel} size={layoutStyles.icon.avatarSize} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */)
: (
<LaunchpadChannelIcon channel={channel} layout={layout} />
)
}
</View>
);
const renderChannelContent = ChannelContentModule.renderChannelContent;
const object4 = {layout: layout};
if (channelName != null) {
r30 = channelName;
} else {
moduleValue6 = require(4805) /* metro dependency 4805: useChannelName */;
r30 = moduleValue6.computeChannelName(channel, UserStore, RelationshipStore);
}
object4.name = r30;
object4.subtitle = subtitle;
object4.unread = unread;
object4.resolvedUnreadSetting = resolvedUnreadSetting;
object4.muted = muted;
object4.lastMessageTimestampString = r25;
object4.channel = channel;
object4.locked = locked;
object4.connected = connected;
object4.live = live;
object4.mentionCount = mentionCount;
object4.mentionBadge = mentionBadge;
object4.isSubscriptionGated = isSubscriptionGated;
object4.needSubscriptionToAccess = needSubscriptionToAccess;
items2[2] = Reflect.apply(renderChannelContent, ChannelContentModule, [object4]);
items2[3] = (
end != null
? (
<View style={{paddingLeft: 8}}>
{end}
</View>
)
: null
);
return Reflect.apply(renderChannelWrapper, ChannelWrapperModule, [<>{items2}</>, {channel: channel, layout: layout,
launchpad: launchpad, fontScale: fontScale, panelVariant: panelVariant}]);
}
}
global.__d(_fun113923, 15056, [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 1244, 4501, 697, 10981, 566, 6819, 11727,
4788, 14804, 9719, 15054, 4805,
2]) /* metro module 15056, dependencies: [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 1244, 4501, 697, 10981, 566, 6819, 11727, 4788, 14804, 9719, 15054, 4805, 2] */;
@@ -1,25 +1,29 @@
/* Metro module 14803; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx; dependencies: [31, 27, 33, 10981, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun111736(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15000:6, offset: 0x023af619, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx');
exports.renderChannelPressableWrapper = renderChannelPressableWrapper;
function renderChannelPressableWrapper(a0, {layout, launchpad, isThread, panelVariant}) { // fn#111737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15000:287, offset: 0x023af6b1, size: 159 bytes, params: 3, frame: 18
panelVariant = !(panelVariant === undefined) && panelVariant;
layout = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout, launchpad).layout;
return (
<View
style={[isThread ? layout.marginThread : panelVariant ? layout.marginPanels : layout.margin, {'flex': 1,
'flexDirection': 'row', 'alignItems': 'center'}]}
>
{a0}
</View>
);
}
}
function renderChannelPressableWrapper(a0, {layout, launchpad, isThread, panelVariant}) { // fn#111737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15000:287, offset: 0x023af6b1, size: 159 bytes, params: 3, frame: 18
panelVariant = !(panelVariant === undefined) && panelVariant;
layout = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout, launchpad).layout;
return (
<View
style={[isThread ? layout.marginThread : panelVariant ? layout.marginPanels : layout.margin, {'flex': 1,
'flexDirection': 'row', 'alignItems': 'center'}]}
>
{a0}
</View>
);
}
global.__d(_fun111736, 14803, [31, 27, 33, 10981, 2]) /* metro module 14803, dependencies: [31, 27, 33, 10981, 2] */;
@@ -1,63 +1,70 @@
/* Metro module 15050; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelSubtitle.tsx; dependencies: [31, 33, 10981, 4573, 14694, 10978, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ChannelListLayoutModule from './layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
import * as GetChannelSubtitleDataModule from '../../../../channel/native/getChannelSubtitleData.tsx'; /* Metro dependency 14694 */
function _fun113906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:6, offset: 0x0240ae4d, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelSubtitle.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelSubtitle.tsx');
exports.renderChannelSubtitle = renderChannelSubtitle;
}
function ChannelSubtitle({muted, connected, channelId, guildId, layout, subtitle, textProps}) { // fn#113907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:118, offset: 0x0240aedb, size: 248 bytes, params: 2, frame: 24
let value = environment;
const channelSubtitleData = (require(14694) /* metro dependency 14694: getChannelSubtitleData */).getChannelSubtitleData(subtitle);
if (channelSubtitleData == null) {
return null;
}
const r8 = channelSubtitleData.type === 'voice' && connected;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const textProps2 = {...textProps};
value = Reflect.apply((require(10978) /* metro dependency 10978: MessagePreviewMarkup */).renderMessagePreviewMarkup,
value, [{content: channelSubtitleData.subtitle, muted: muted != null && muted, channelId: channelId,
guildId: guildId, layout: layout, color: 'text-muted', disableAnimatedEmoji: !r8}]);
return (
<Text {...textProps2}>
{value}
</Text>
);
}
function renderChannelSubtitle({subtitle, muted, layout, channelId, guildId, connected}) { // fn#113908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:634, offset: 0x0240afd3, size: 240 bytes, params: 2, frame: 22
if (subtitle == null) {
return null;
}
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
const getLayoutStyles = channelListLayoutModule.getLayoutStyles;
if (typeof subtitle === 'string') {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
function ChannelSubtitle({muted, connected, channelId, guildId, layout, subtitle, textProps}) { // fn#113907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:118, offset: 0x0240aedb, size: 248 bytes, params: 2, frame: 24
let value = environment;
const channelSubtitleData = (GetChannelSubtitleDataModule).getChannelSubtitleData(subtitle);
if (channelSubtitleData == null) {
return null;
}
const r8 = channelSubtitleData.type === 'voice' && connected;
const Text = (TextModule).Text;
const textProps2 = {...textProps};
value = Reflect.apply((require(10978) /* metro dependency 10978: MessagePreviewMarkup */).renderMessagePreviewMarkup,
value, [{content: channelSubtitleData.subtitle, muted: muted != null && muted, channelId: channelId,
guildId: guildId, layout: layout, color: 'text-muted', disableAnimatedEmoji: !r8}]);
return (
<Text
variant={Reflect.apply(getLayoutStyles, channelListLayoutModule, [layout]).messagePreview.text.variant}
color="text-muted"
lineClamp={1}
maxFontSizeMultiplier={1.75}
>
{subtitle}
<Text {...textProps2}>
{value}
</Text>
);
} else {
return (
<ChannelSubtitle
channelId={channelId}
guildId={guildId}
layout={layout}
subtitle={subtitle}
muted={muted}
connected={connected}
textProps={object}
/>
);
}
function renderChannelSubtitle({subtitle, muted, layout, channelId, guildId, connected}) { // fn#113908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:634, offset: 0x0240afd3, size: 240 bytes, params: 2, frame: 22
if (subtitle == null) {
return null;
}
const getLayoutStyles = ChannelListLayoutModule.getLayoutStyles;
if (typeof subtitle === 'string') {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={Reflect.apply(getLayoutStyles, ChannelListLayoutModule, [layout]).messagePreview.text.variant}
color="text-muted"
lineClamp={1}
maxFontSizeMultiplier={1.75}
>
{subtitle}
</Text>
);
} else {
return (
<ChannelSubtitle
channelId={channelId}
guildId={guildId}
layout={layout}
subtitle={subtitle}
muted={muted}
connected={connected}
textProps={object}
/>
);
}
}
}
global.__d(_fun113906, 15050, [31, 33, 10981, 4573, 14694, 10978,
2]) /* metro module 15050, dependencies: [31, 33, 10981, 4573, 14694, 10978, 2] */;
@@ -1,54 +1,62 @@
/* Metro module 15055; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelTitle.tsx; dependencies: [31, 4865, 33, 4501, 697, 10981, 4573, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ReadStateConstantsModule from '../../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as ChannelListLayoutModule from './layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
function _fun113920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:6, offset: 0x0240bffd, size: 277 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyleProperties = createStylesModule.createStyleProperties;
object2 = {};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.muted = TEXT_MUTED;
const REDESIGN_CHANNEL_NAME_MUTED_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHANNEL_NAME_MUTED_TEXT;
object2.normal = REDESIGN_CHANNEL_NAME_MUTED_TEXT;
const REDESIGN_CHANNEL_NAME_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHANNEL_NAME_TEXT;
object2.unreadOrConnected = REDESIGN_CHANNEL_NAME_TEXT;
const env0_5 = Reflect.apply(createStyleProperties, createStylesModule, [object2]);
let value = ReactModule;
const createStyleProperties = CreateStylesModule.createStyleProperties;
object = {};
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
object.muted = TEXT_MUTED;
const REDESIGN_CHANNEL_NAME_MUTED_TEXT = (Native).colors.REDESIGN_CHANNEL_NAME_MUTED_TEXT;
object.normal = REDESIGN_CHANNEL_NAME_MUTED_TEXT;
const REDESIGN_CHANNEL_NAME_TEXT = (Native).colors.REDESIGN_CHANNEL_NAME_TEXT;
object.unreadOrConnected = REDESIGN_CHANNEL_NAME_TEXT;
const env0_5 = Reflect.apply(createStyleProperties, CreateStylesModule, [object]);
value = value.memo(ChannelTitle_113921);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelTitle.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelTitle.tsx');
exports.default = value;
}
function ChannelTitle_113921({title, muted, unread, resolvedUnreadSetting, connected, layout}) { // fn#113921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:340, offset: 0x0240c112, size: 239 bytes, params: 2, frame: 24
const resolvedUnreadSetting2 = resolvedUnreadSetting;
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(layout);
const value4 = resolvedUnreadSetting2.useMemo(_fun113922, [unread, env0_5(), connected, muted,
resolvedUnreadSetting]);
const Text = (TextModule).Text;
return (
<Text
variant={layoutStyles.channelName.text.variant}
lineClamp={1}
maxFontSizeMultiplier={1.75}
style={value4}
>
{title ?? ''}
</Text>
);
function _fun113922() { // fn#113922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:487, offset: 0x0240c201, size: 102 bytes, params: 1, frame: 5
var r2;
var r1;
if (muted) {
r1 = JsxRuntimeModule.jsx.muted;
} else {
r2 = unread && resolvedUnreadSetting === UnreadSetting.ALL_MESSAGES;
r2 = !r2 ? connected : r2;
r1 = r2 ? JsxRuntimeModule.jsx.unreadOrConnected : JsxRuntimeModule.jsx.normal;
}
return {'color': null, 'paddingRight': 4, 'flexShrink': 1, color: r1};
}
function ChannelTitle_113921({title, muted, unread, resolvedUnreadSetting, connected, layout}) { // fn#113921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:340, offset: 0x0240c112, size: 239 bytes, params: 2, frame: 24
const env0_2 = resolvedUnreadSetting;
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
const value4 = env0_2.useMemo(_fun113922, [unread, env0_5(), connected, muted, resolvedUnreadSetting]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={layoutStyles.channelName.text.variant}
lineClamp={1}
maxFontSizeMultiplier={1.75}
style={value4}
>
{title ?? ''}
</Text>
);
}
function _fun113922() { // fn#113922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:487, offset: 0x0240c201, size: 102 bytes, params: 1, frame: 5
var r2;
var r1;
if (muted) {
r1 = env0_4.muted;
} else {
r2 = unread && resolvedUnreadSetting === UnreadSetting.ALL_MESSAGES;
r2 = !r2 ? connected : r2;
r1 = r2 ? env0_4.unreadOrConnected : env0_4.normal;
}
return {'color': null, 'paddingRight': 4, 'flexShrink': 1, color: r1};
}
global.__d(_fun113920, 15055, [31, 4865, 33, 4501, 697, 10981, 4573,
2]) /* metro module 15055, dependencies: [31, 4865, 33, 4501, 697, 10981, 4573, 2] */;
@@ -1,64 +1,74 @@
/* Metro module 14468; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelUnreadBadge.tsx; dependencies: [31, 27, 10980, 4865, 33, 4501, 10981, 4584, 9609, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ReadStateConstantsModule from '../../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as RedesignChannelListConstantsModule from '../../../../channel_list_v2/native/RedesignChannelListConstants.tsx'; /* Metro dependency 10980 */
function _fun109486(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14665:6, offset: 0x0234e218, size: 278 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).MUTED_OPACITY_CONTENT;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({unreadBadge: {'flexGrow': 0,
let value = ReactModule;
const env0_7 = (CreateStylesModule).createStyles({unreadBadge: {'flexGrow': 0,
'flexShrink': 0, 'position': 'absolute'}, unreadBadgePanel: {marginLeft: -16}});
value = value.memo(ChannelUnreadBadge);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelUnreadBadge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelUnreadBadge.tsx');
exports.default = value;
}
function ChannelUnreadBadge({unread, resolvedUnreadSetting, muted, isThread, layout, launchpad, panelVariant}) { // fn#109487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14665:323, offset: 0x0234e32e, size: 368 bytes, params: 2, frame: 26
var r0;
var object3;
var unreadBadge;
var items2;
var moduleValue3;
var makeSizeStyle;
var Badge;
var object4;
var CHANNEL_BADGE_SIZE;
var Math;
var max;
var value7;
let value = undefined;
panelVariant = !(panelVariant === value) && panelVariant;
const styles = useStyles();
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout,
launchpad);
if (unread) {
object3 = {};
unreadBadge = styles.unreadBadge;
items2 = [unreadBadge];
items2[1] = panelVariant ? styles.unreadBadgePanel : value;
unreadBadge = layoutStyles.unreadBadge;
items2[2] = isThread ? unreadBadge.positionThread : unreadBadge.position;
moduleValue3 = require(10981) /* metro dependency 10981: ChannelListLayout */;
makeSizeStyle = moduleValue3.makeSizeStyle;
unreadBadge = layoutStyles.unreadBadge;
items2[3] = Reflect.apply(makeSizeStyle, moduleValue3, [unreadBadge.size]);
object3.style = items2;
Badge = importDefault(9609) /* metro dependency 9609: Badge */;
object4 = {classic: panelVariant};
CHANNEL_BADGE_SIZE = (require(9609) /* metro dependency 9609: Badge */).CHANNEL_BADGE_SIZE;
Math = global.Math;
max = Math.max;
value7 = 1;
object4.size = CHANNEL_BADGE_SIZE * Reflect.apply(max, Math,
[(require(4584) /* metro dependency 4584: useFontScale */).useFontScale(), value7]);
object4.badgeStyle = [{opacity: resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES || muted ? MUTED_OPACITY_CONTENT : value7}];
value = <View {...object3}><Badge {...object4} /></View>;
r0 = value;
} else {
r0 = null;
function ChannelUnreadBadge({unread, resolvedUnreadSetting, muted, isThread, layout, launchpad, panelVariant}) { // fn#109487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14665:323, offset: 0x0234e32e, size: 368 bytes, params: 2, frame: 26
var r0;
var object;
var unreadBadge;
var items2;
var moduleValue3;
var makeSizeStyle;
var Badge;
var object2;
var CHANNEL_BADGE_SIZE;
var Math;
var max;
var value7;
let value = undefined;
panelVariant = !(panelVariant === value) && panelVariant;
const styles = useStyles();
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout,
launchpad);
if (unread) {
object = {};
unreadBadge = styles.unreadBadge;
items2 = [unreadBadge];
items2[1] = panelVariant ? styles.unreadBadgePanel : value;
unreadBadge = layoutStyles.unreadBadge;
items2[2] = isThread ? unreadBadge.positionThread : unreadBadge.position;
moduleValue3 = require(10981) /* metro dependency 10981: ChannelListLayout */;
makeSizeStyle = moduleValue3.makeSizeStyle;
unreadBadge = layoutStyles.unreadBadge;
items2[3] = Reflect.apply(makeSizeStyle, moduleValue3, [unreadBadge.size]);
object.style = items2;
Badge = importDefault(9609) /* metro dependency 9609: Badge */;
object2 = {classic: panelVariant};
CHANNEL_BADGE_SIZE = (require(9609) /* metro dependency 9609: Badge */).CHANNEL_BADGE_SIZE;
Math = global.Math;
max = Math.max;
value7 = 1;
object2.size = CHANNEL_BADGE_SIZE * Reflect.apply(max, Math,
[(require(4584) /* metro dependency 4584: useFontScale */).useFontScale(), value7]);
object2.badgeStyle = [{opacity: resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES || muted ? MUTED_OPACITY_CONTENT : value7}];
value = (
<View {...object}>
<Badge {...object2} />
</View>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
return r0;
}
global.__d(_fun109486, 14468, [31, 27, 10980, 4865, 33, 4501, 10981, 4584, 9609,
2]) /* metro module 14468, dependencies: [31, 27, 10980, 4865, 33, 4501, 10981, 4584, 9609, 2] */;
@@ -1,29 +1,33 @@
/* Metro module 14804; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelWrapper.tsx; dependencies: [31, 27, 33, 10981, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun111738(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15001:6, offset: 0x023af750, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelWrapper.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelWrapper.tsx');
exports.renderChannelWrapper = renderChannelWrapper;
function renderChannelWrapper(a0, {channel, layout, fontScale, launchpad, panelVariant}) { // fn#111739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15001:269, offset: 0x023af7e8, size: 322 bytes, params: 3, frame: 24
panelVariant = !(panelVariant === undefined) && panelVariant;
const scaledChannelRowHeight = (require(10981) /* metro dependency 10981: ChannelListLayout */).getScaledChannelRowHeight(fontScale,
layout, channel?.isThread() && !launchpad);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout,
launchpad);
return (
<View
style={[{'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'position': 'relative'},
{minHeight: scaledChannelRowHeight - (channel == null ? 2 * layoutStyles.layout.margin.marginVertical : channel.isThread() ? 2 * layoutStyles.layout.marginThread.marginVertical : 2 * layoutStyles.layout.margin.marginVertical)},
channel == null ? panelVariant ? layoutStyles.container.paddingPanels : layoutStyles.container.padding : channel.isThread() ? layoutStyles.container.paddingThread : panelVariant ? layoutStyles.container.paddingPanels : layoutStyles.container.padding]}
>
{a0}
</View>
);
}
}
function renderChannelWrapper(a0, {channel, layout, fontScale, launchpad, panelVariant}) { // fn#111739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15001:269, offset: 0x023af7e8, size: 322 bytes, params: 3, frame: 24
panelVariant = !(panelVariant === undefined) && panelVariant;
const scaledChannelRowHeight = (require(10981) /* metro dependency 10981: ChannelListLayout */).getScaledChannelRowHeight(fontScale,
layout, channel?.isThread() && !launchpad);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout,
launchpad);
return (
<View
style={[{'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'position': 'relative'},
{minHeight: scaledChannelRowHeight - (channel == null ? 2 * layoutStyles.layout.margin.marginVertical : channel.isThread() ? 2 * layoutStyles.layout.marginThread.marginVertical : 2 * layoutStyles.layout.margin.marginVertical)},
channel == null ? panelVariant ? layoutStyles.container.paddingPanels : layoutStyles.container.padding : channel.isThread() ? layoutStyles.container.paddingThread : panelVariant ? layoutStyles.container.paddingPanels : layoutStyles.container.padding]}
>
{a0}
</View>
);
}
global.__d(_fun111738, 14804, [31, 27, 33, 10981, 2]) /* metro module 14804, dependencies: [31, 27, 33, 10981, 2] */;
@@ -1,46 +1,135 @@
/* Metro module 15051; source: modules/main_tabs_v2/native/shared_components/guild_channels/VoiceOrStageSummaryRow.tsx; dependencies: [31, 27, 33, 4501, 697, 10981, 4573, 1305, 15052, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ChannelListLayoutModule from './layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
function _fun113909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15248:6, offset: 0x0240b0c3, size: 211 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 env0_3 = (require(27) /* metro dependency 27 */).View;
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(_fun113910);
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles(_fun113910);
value = value.memo(VoiceOrStageSummaryRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/VoiceOrStageSummaryRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/VoiceOrStageSummaryRow.tsx');
exports.default = value;
}
function VoiceOrStageSummaryRow({users, max, guildId, layout, audienceCount}) { // fn#113911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15248:809, offset: 0x0240b2b3, size: 547 bytes, params: 2, frame: 30
var object3;
var object5;
max = max === undefined ? 5 : max;
var value;
const size = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout).voiceOrStageSummaryRow.size;
const Math = global.Math;
const env0_3 = Math.max(users.length - max, 0);
const styles = useStyles(size);
const items2 = [styles.container];
items2[1] = {height: size + 4};
const value3 = users.map(_fun113912);
let r5 = audienceCount != null && audienceCount > 0;
if (r5) {
var viewProps = {style: [styles.wrapper, users.length > 0 && ({marginLeft: -12})]};
var viewProps2 = {style: [styles.badge, styles.audienceBadge]};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
value = <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM} style={{'height': 14,
'width': 14}} source={importDefault(15052) /* metro dependency 15052 */} />;
value = <View {...viewProps}><View {...viewProps2}>{value}{((Text) => <Text variant="text-sm/bold" style={{marginLeft: 4}}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
r5 = value;
function _fun113910(a0) { // fn#113910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15248:172, offset: 0x0240b196, size: 285 bytes, params: 2, frame: 16
const object = {container: {'flexDirection': 'row', 'alignItems': 'center', 'marginLeft': -2}};
const object2 = {'backgroundColor': null, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'center'};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.backgroundColor = BACKGROUND_MOD_STRONG;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.height = a0;
object2.width = a0;
object.overflowCircle = object2;
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.borderColor = BACKGROUND_BASE_LOW;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.borderWidth = 2;
object.wrapper = object3;
const object4 = {'borderRadius': null, 'paddingHorizontal': 8, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.height = a0;
object.badge = object4;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.audienceBadge = {backgroundColor: BACKGROUND_BASE_LOWER};
return object;
}
return (
<View style={items2}>
{value3}
{r5}
</View>
);
function VoiceOrStageSummaryRow({users, max, guildId, layout, audienceCount}) { // fn#113911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15248:809, offset: 0x0240b2b3, size: 547 bytes, params: 2, frame: 30
var object;
var object2;
max = max === undefined ? 5 : max;
var value;
const size = (ChannelListLayoutModule).getLayoutStyles(layout).voiceOrStageSummaryRow.size;
const Math = global.Math;
const env0_3 = Math.max(users.length - max, 0);
const styles = useStyles(size);
const items2 = [styles.container];
items2[1] = {height: size + 4};
const value3 = users.map(_fun113912);
let r5 = audienceCount != null && audienceCount > 0;
if (r5) {
var viewProps = {style: [styles.wrapper, users.length > 0 && ({marginLeft: -12})]};
var viewProps2 = {style: [styles.badge, styles.audienceBadge]};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
value = (
<Icon
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM}
style={{'height': 14, 'width': 14}}
source={importDefault(15052) /* metro dependency 15052 */}
/>
);
value = (
<View {...viewProps}>
<View {...viewProps2}>
{value}
{((Text) => <Text variant="text-sm/bold" style={{marginLeft: 4}}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</View>
);
r5 = value;
}
return (
<View style={items2}>
{value3}
{r5}
</View>
);
function _fun113912(a0, a1) { // fn#113912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15248:1054, offset: 0x0240b4d6, size: 398 bytes, params: 3, frame: 23
var r0;
var value2;
var object2;
var value4;
var Text;
var value;
if (a1 >= max) {
return undefined;
}
if (a1 !== max - 1) {
value2 = environment.__proto__;
r0 = (
<View style={[styles.wrapper, a1 !== 0 && ({marginLeft: -12})]} key={a1}>
{((Avatar) => <Avatar user={a0} guildId={guildId} size={env0_2.voiceOrStageSummaryRow.avatarSize} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
</View>
);
} else if (env0_3 > 0) {
value4 = environment.__proto__;
var viewProps = {style: [styles.wrapper, a1 !== 0 && ({marginLeft: -12})]};
var viewBinding2Props = {style: styles.overflowCircle};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = env0_3 + 1;
value = (
<View {...viewProps} key="overflow">
<View {...viewBinding2Props}>
<Text variant="text-xs/medium">
{'+' + value}
</Text>
</View>
</View>
);
r0 = value;
} else {
value2 = environment.__proto__;
r0 = (
<View style={[styles.wrapper, a1 !== 0 && ({marginLeft: -12})]} key={a1}>
{((Avatar) => <Avatar user={a0} guildId={guildId} size={env0_2.voiceOrStageSummaryRow.avatarSize} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
</View>
);
}
return r0;
}
}
}
global.__d(_fun113909, 15051, [31, 27, 33, 4501, 697, 10981, 4573, 1305, 15052,
2]) /* metro module 15051, dependencies: [31, 27, 33, 4501, 697, 10981, 4573, 1305, 15052, 2] */;
@@ -1,15 +1,19 @@
/* Metro module 10981; source: modules/main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx; dependencies: [3834, 10982, 10984, 10985, 3829, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserSettingsModule from '../../../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ChannelListLayoutTypesModule from '../../../../ChannelListLayoutTypes.tsx'; /* Metro dependency 3834 */
function _fun84070(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:6, offset: 0x01f37130, size: 169 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getLayoutStyles;
const getLayoutStyles2 = getLayoutStyles;
const closure2 = function(a0) {
var COMPACT = require(dependencyMap[0]).ChannelListLayoutTypes.COMPACT;
return a0 === COMPACT;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx');
exports.getLayoutStyles = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx');
exports.getLayoutStyles = getLayoutStyles2;
exports.makeSizeStyle = function(a0) {
return {width: a0, height: a0};
};
@@ -17,62 +21,64 @@ function _fun84070(global, require, importDefault, importAll, module, exports, d
exports.isLayoutCozy = isLayoutCozy;
exports.useMessagesTabLayout = useMessagesTabLayout;
exports.getScaledChannelRowHeight = getScaledChannelRowHeight_84076;
}
function getLayoutStyles(a0) { // fn#84071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:43, offset: 0x01f371d9, size: 320 bytes, params: 2, frame: 15
let value = a1;
let r1 = value !== undefined ? value : false;
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COZY_DRAWER = ChannelListLayoutTypes.COZY_DRAWER;
if (COZY_DRAWER === a0) {
return (require(10982) /* metro dependency 10982: CozyDrawer */).CHANNEL_LIST_STYLES_COZY_DRAWER;
function getLayoutStyles(a0) { // fn#84071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:43, offset: 0x01f371d9, size: 320 bytes, params: 2, frame: 15
let value = a1;
let r1 = value !== undefined ? value : false;
const ChannelListLayoutTypes = (ChannelListLayoutTypesModule).ChannelListLayoutTypes;
const COZY_DRAWER = ChannelListLayoutTypes.COZY_DRAWER;
if (COZY_DRAWER === a0) {
return (require(10982) /* metro dependency 10982: CozyDrawer */).CHANNEL_LIST_STYLES_COZY_DRAWER;
}
const COZY_DRAWER_SMOL = ChannelListLayoutTypes.COZY_DRAWER_SMOL;
if (COZY_DRAWER_SMOL === a0) {
return (require(10982) /* metro dependency 10982: CozyDrawer */).CHANNEL_LIST_STYLES_COZY_DRAWER_SMOL;
}
const COMPACT = ChannelListLayoutTypes.COMPACT;
if (COMPACT === a0) {
value = require(10984) /* metro dependency 10984: Compact */;
r1 = r1 ? value.CHANNEL_LIST_STYLES_COMPACT_LAUNCHPAD : value.CHANNEL_LIST_STYLES_COMPACT;
return r1;
}
const MINIMAL = ChannelListLayoutTypes.MINIMAL;
if (MINIMAL !== a0) {
ChannelListLayoutTypes.COZY;
}
value = require(10985) /* metro dependency 10985: Cozy */;
return r1 ? value.CHANNEL_LIST_STYLES_COZY_LAUNCHPAD : value.CHANNEL_LIST_STYLES_COZY;
}
const COZY_DRAWER_SMOL = ChannelListLayoutTypes.COZY_DRAWER_SMOL;
if (COZY_DRAWER_SMOL === a0) {
return (require(10982) /* metro dependency 10982: CozyDrawer */).CHANNEL_LIST_STYLES_COZY_DRAWER_SMOL;
function isLayoutCozy(a0) { // fn#84074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:1002, offset: 0x01f37355, size: 117 bytes, params: 2, frame: 15
const ChannelListLayoutTypes = (ChannelListLayoutTypesModule).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
let r0 = a0 === COZY || a0 === ChannelListLayoutTypes.COZY_DRAWER;
r0 = !r0 ? a0 === ChannelListLayoutTypes.COZY_DRAWER_SMOL : r0;
return r0;
}
const COMPACT = ChannelListLayoutTypes.COMPACT;
if (COMPACT === a0) {
value = require(10984) /* metro dependency 10984: Compact */;
r1 = r1 ? value.CHANNEL_LIST_STYLES_COMPACT_LAUNCHPAD : value.CHANNEL_LIST_STYLES_COMPACT;
return r1;
function useMessagesTabLayout(a0) { // fn#84075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:1199, offset: 0x01f373ca, size: 152 bytes, params: 2, frame: 14
const ChannelListLayoutSetting = (UserSettingsModule).ChannelListLayoutSetting;
const value2 = ChannelListLayoutSetting.useSetting();
const ChannelListLayoutTypes = (ChannelListLayoutTypesModule).ChannelListLayoutTypes;
return a0 ? ChannelListLayoutTypes.COZY_DRAWER_SMOL : value2 === ChannelListLayoutTypes.COMPACT ? ChannelListLayoutTypes.COMPACT : ChannelListLayoutTypes.COZY;
}
const MINIMAL = ChannelListLayoutTypes.MINIMAL;
if (MINIMAL !== a0) {
ChannelListLayoutTypes.COZY;
function getScaledChannelRowHeight_84076(a0, a1) { // fn#84076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:1488, offset: 0x01f37462, size: 245 bytes, params: 3, frame: 20
const value = a2;
const r0 = value !== undefined ? value : false;
const layoutStyles = getLayoutStyles(a1);
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value5 = Reflect.apply(max, Math, [Math2.max(a0,
1) * (layoutStyles.channelName.height + (layoutStyles.messagePreview.margin.marginTop + layoutStyles.messagePreview.height)),
layoutStyles.icon.wrapper.size]);
const container = layoutStyles.container;
const value6 = value5 + 2 * (r0 ? container.paddingThread.paddingVertical : container.padding.paddingVertical);
const layout = layoutStyles.layout;
return value6 + 2 * (r0 ? layout.marginThread.marginVertical : layout.margin.marginVertical) + (isLayoutCompact(a1) ? 4 : 0);
}
value = require(10985) /* metro dependency 10985: Cozy */;
return r1 ? value.CHANNEL_LIST_STYLES_COZY_LAUNCHPAD : value.CHANNEL_LIST_STYLES_COZY;
}
function isLayoutCozy(a0) { // fn#84074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:1002, offset: 0x01f37355, size: 117 bytes, params: 2, frame: 15
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
let r0 = a0 === COZY || a0 === ChannelListLayoutTypes.COZY_DRAWER;
r0 = !r0 ? a0 === ChannelListLayoutTypes.COZY_DRAWER_SMOL : r0;
return r0;
}
function useMessagesTabLayout(a0) { // fn#84075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:1199, offset: 0x01f373ca, size: 152 bytes, params: 2, frame: 14
const ChannelListLayoutSetting = (require(3829) /* metro dependency 3829: UserSettings */).ChannelListLayoutSetting;
const value2 = ChannelListLayoutSetting.useSetting();
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
return a0 ? ChannelListLayoutTypes.COZY_DRAWER_SMOL : value2 === ChannelListLayoutTypes.COMPACT ? ChannelListLayoutTypes.COMPACT : ChannelListLayoutTypes.COZY;
}
function getScaledChannelRowHeight_84076(a0, a1) { // fn#84076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11167:1488, offset: 0x01f37462, size: 245 bytes, params: 3, frame: 20
const value = a2;
const r0 = value !== undefined ? value : false;
const layoutStyles = getLayoutStyles(a1);
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value5 = Reflect.apply(max, Math, [Math2.max(a0,
1) * (layoutStyles.channelName.height + (layoutStyles.messagePreview.margin.marginTop + layoutStyles.messagePreview.height)),
layoutStyles.icon.wrapper.size]);
const container = layoutStyles.container;
const value6 = value5 + 2 * (r0 ? container.paddingThread.paddingVertical : container.padding.paddingVertical);
const layout = layoutStyles.layout;
return value6 + 2 * (r0 ? layout.marginThread.marginVertical : layout.margin.marginVertical) + (isLayoutCompact(a1) ? 4 : 0);
}
global.__d(_fun84070, 10981, [3834, 10982, 10984, 10985, 3829,
2]) /* metro module 10981, dependencies: [3834, 10982, 10984, 10985, 3829, 2] */;
@@ -1,73 +1,80 @@
/* Metro module 10984; source: modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/Compact.tsx; dependencies: [697, 1305, 6819, 6780, 10983, 2] */
import Deepmerge from '../utils/deepmerge.tsx'; /* Metro dependency 10983 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NativeModule from '../../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GameIconModule from '../../../../../../game_detection/native/GameIcon.tsx'; /* Metro dependency 6780 */
import * as GuildIconModule from '../../../../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
function _fun84084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11170:6, offset: 0x01f37bc4, size: 1152 bytes, params: 8, frame: 28
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
object2.layout = {margin: {'marginLeft': 4, 'marginRight': 4, 'marginVertical': 0}, marginPanels: {'marginLeft': 8,
object = {};
object.layout = {margin: {'marginLeft': 4, 'marginRight': 4, 'marginVertical': 0}, marginPanels: {'marginLeft': 8,
'marginRight': 8, 'marginVertical': 0}, marginThread: {'marginLeft': 56, 'marginRight': 4, 'marginVertical': 0}};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.padding = {'paddingVertical': 4, 'paddingLeft': 20, 'paddingRight': 12};
object4.paddingPanels = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 8};
object4.paddingThread = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 12};
object2.container = object4;
object2.voiceUsers = {height: 36, margin: {marginLeft: 60}};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.padding = {'paddingVertical': 4, 'paddingLeft': 20, 'paddingRight': 12};
object3.paddingPanels = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 8};
object3.paddingThread = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 12};
object.container = object3;
object.voiceUsers = {height: 36, margin: {marginLeft: 60}};
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
object2.voiceOrStageSummaryRow = {size: 24, avatarSize: XSMALL};
object2.channelName = {height: 20, text: {variant: 'redesign/channel-title/semibold'}};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
object.voiceOrStageSummaryRow = {size: 24, avatarSize: XSMALL};
object.channelName = {height: 20, text: {variant: 'redesign/channel-title/semibold'}};
const IconSizes = (NativeModule).IconSizes;
let EXTRA_SMALL = IconSizes.EXTRA_SMALL;
object2.messagePreview = {'messageTypeIconSize': null, 'messageTypeIconSizeNew': 'xxs', 'height': 16,
object.messagePreview = {'messageTypeIconSize': null, 'messageTypeIconSizeNew': 'xxs', 'height': 16,
messageTypeIconSize: EXTRA_SMALL, text: {variant: 'text-xs/medium'}, margin: {marginTop: 0}};
object2.timestamp = {text: {variant: 'text-xs/medium'}};
object2.inviteRow = {text: {variant: 'text-sm/semibold'}};
const object5 = {};
object.timestamp = {text: {variant: 'text-xs/medium'}};
object.inviteRow = {text: {variant: 'text-sm/semibold'}};
const object7 = {};
let REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object5.avatarSize = REFRESH_MEDIUM_32;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
object7.avatarSize = REFRESH_MEDIUM_32;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const SMALL_32 = GuildIconSizes.SMALL_32;
object5.guildIconSize = SMALL_32;
object7.guildIconSize = SMALL_32;
const XXSMALL_12 = GuildIconSizes.XXSMALL_12;
object5.guildBadgeIconSize = XXSMALL_12;
object5.wrapper = {size: 32};
object5.channelIcon = {size: 16};
object5.margin = {marginRight: 8};
object5.emoji = {'size': 16, 'lineHeight': 24};
object2.icon = object5;
object2.unreadBadge = {size: 8, position: {left: 4}, positionThread: {left: -48}};
object2.mentionBadge = {position: {top: 28}, positionThread: {top: 20}};
object2.category = {height: 30, margin: {marginTop: 16}, text: {size: 14}};
object7.guildBadgeIconSize = XXSMALL_12;
object7.wrapper = {size: 32};
object7.channelIcon = {size: 16};
object7.margin = {marginRight: 8};
object7.emoji = {'size': 16, 'lineHeight': 24};
object.icon = object7;
object.unreadBadge = {size: 8, position: {left: 4}, positionThread: {left: -48}};
object.mentionBadge = {position: {top: 28}, positionThread: {top: 20}};
object.category = {height: 30, margin: {marginTop: 16}, text: {size: 14}};
REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object2.typing = {position: {'top': 3, 'left': 3}, positionThread: {'top': -5, 'left': -16},
object.typing = {position: {'top': 3, 'left': 3}, positionThread: {'top': -5, 'left': -16},
typingIndicator: {position: {'top': 20, 'left': 10}}, avatarSize: REFRESH_MEDIUM_32};
object2.activeThreadCount = {text: {variant: 'text-xs/bold'}};
const object6 = {};
object.activeThreadCount = {text: {variant: 'text-xs/bold'}};
const object8 = {};
EXTRA_SMALL = IconSizes.EXTRA_SMALL;
object6.size = EXTRA_SMALL;
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
object8.size = EXTRA_SMALL;
const GameIconSizes = (GameIconModule).GameIconSizes;
const SIZE_24 = GameIconSizes.SIZE_24;
object6.gameSize = SIZE_24;
object2.joinVoiceButton = {text: {variant: 'text-xs/bold'}, layout: {'paddingVertical': 4, 'paddingRight': 8,
'paddingLeft': 8, 'height': 24}, icon: object6};
object2.threadSpine = {'left': 38, 'startAndEndHeight': 15, 'transform': null, 'topOffset': -2,
object8.gameSize = SIZE_24;
object.joinVoiceButton = {text: {variant: 'text-xs/bold'}, layout: {'paddingVertical': 4, 'paddingRight': 8,
'paddingLeft': 8, 'height': 24}, icon: object8};
object.threadSpine = {'left': 38, 'startAndEndHeight': 15, 'transform': null, 'topOffset': -2,
transform: [{translateY: 10}]};
object2.happeningNow = {margin: {'marginTop': 16, 'marginBottom': 16}};
object2.separator = {margin: {marginVertical: 12}};
object2.searchButton = {margin: {marginHorizontal: 16}, marginPanels: {marginHorizontal: 12}};
let value = importDefault(10983) /* metro dependency 10983: deepmerge */;
value = value(object2, {layout: {marginThread: {marginLeft: 4}}, container: {paddingThread: {paddingLeft: 8}},
object.happeningNow = {margin: {'marginTop': 16, 'marginBottom': 16}};
object.separator = {margin: {marginVertical: 12}};
object.searchButton = {margin: {marginHorizontal: 16}, marginPanels: {marginHorizontal: 12}};
let value = Deepmerge;
value = value(object, {layout: {marginThread: {marginLeft: 4}}, container: {paddingThread: {paddingLeft: 8}},
unreadBadge: {positionThread: {left: 4}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/Compact.tsx');
exports.CHANNEL_LIST_STYLES_COMPACT = object2;
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/Compact.tsx');
exports.CHANNEL_LIST_STYLES_COMPACT = object;
exports.getCompactStyles = getCompactStyles;
exports.CHANNEL_LIST_STYLES_COMPACT_LAUNCHPAD = value;
function getCompactStyles(a0) { // fn#84085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11170:2343, offset: 0x01f38044, size: 99 bytes, params: 2, frame: 17
return a0 ? (importDefault(10983) /* metro dependency 10983: deepmerge */)(env0_2,
{messagePreview: {text: {'variant': 'text-sm/medium', 'color': 'text-muted'}},
timestamp: {text: {variant: 'text-xs/semibold'}}}) : env0_2;
}
}
function getCompactStyles(a0) { // fn#84085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11170:2343, offset: 0x01f38044, size: 99 bytes, params: 2, frame: 17
return a0 ? (importDefault(10983) /* metro dependency 10983: deepmerge */)(env0_2,
{messagePreview: {text: {'variant': 'text-sm/medium', 'color': 'text-muted'}},
timestamp: {text: {variant: 'text-xs/semibold'}}}) : env0_2;
}
global.__d(_fun84084, 10984, [697, 1305, 6819, 6780, 10983,
2]) /* metro module 10984, dependencies: [697, 1305, 6819, 6780, 10983, 2] */;
@@ -1,64 +1,72 @@
/* Metro module 10985; source: modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/Cozy.tsx; dependencies: [10983, 10984, 697, 1305, 6819, 6780, 2] */
import Deepmerge from '../utils/deepmerge.tsx'; /* Metro dependency 10983 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NativeModule from '../../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GameIconModule from '../../../../../../game_detection/native/GameIcon.tsx'; /* Metro dependency 6780 */
import * as GuildIconModule from '../../../../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as CompactModule from './Compact.tsx'; /* Metro dependency 10984 */
function _fun84086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11171:6, offset: 0x01f380a7, size: 991 bytes, params: 8, frame: 26
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(10983) /* metro dependency 10983: deepmerge */;
const CHANNEL_LIST_STYLES_COMPACT = (require(10984) /* metro dependency 10984: Compact */).CHANNEL_LIST_STYLES_COMPACT;
object2 = {};
object2.layout = {margin: {marginVertical: 2}, marginPanels: {marginVertical: 2},
marginThread: {'marginVertical': 2, 'marginLeft': 76}};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.padding = {paddingVertical: 8};
object3.paddingPanels = {paddingVertical: 8};
object3.paddingThread = {'paddingVertical': 6, 'paddingLeft': 8};
object2.container = object3;
object2.category = {margin: {marginTop: 24}};
object2.voiceUsers = {height: 40, margin: {'marginTop': -4, 'marginLeft': 80}};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let value = Deepmerge;
const CHANNEL_LIST_STYLES_COMPACT = (CompactModule).CHANNEL_LIST_STYLES_COMPACT;
object = {};
object.layout = {margin: {marginVertical: 2}, marginPanels: {marginVertical: 2}, marginThread: {'marginVertical': 2,
'marginLeft': 76}};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.padding = {paddingVertical: 8};
object5.paddingPanels = {paddingVertical: 8};
object5.paddingThread = {'paddingVertical': 6, 'paddingLeft': 8};
object.container = object5;
object.category = {margin: {marginTop: 24}};
object.voiceUsers = {height: 40, margin: {'marginTop': -4, 'marginLeft': 80}};
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object2.voiceOrStageSummaryRow = {size: 32, avatarSize: REFRESH_MEDIUM_32};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
object.voiceOrStageSummaryRow = {size: 32, avatarSize: REFRESH_MEDIUM_32};
const IconSizes = (NativeModule).IconSizes;
let REFRESH_SMALL_16 = IconSizes.REFRESH_SMALL_16;
object2.messagePreview = {text: {variant: 'redesign/message-preview/medium'}, messageTypeIconSize: REFRESH_SMALL_16,
object.messagePreview = {text: {variant: 'redesign/message-preview/medium'}, messageTypeIconSize: REFRESH_SMALL_16,
messageTypeIconSizeNew: 'xs', height: 18, margin: {marginTop: 2}};
object2.inviteRow = {text: {variant: 'text-md/semibold'}};
const object4 = {};
object.inviteRow = {text: {variant: 'text-md/semibold'}};
const object7 = {};
const LARGE_48 = AvatarSizes.LARGE_48;
object4.avatarSize = LARGE_48;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
object7.avatarSize = LARGE_48;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
object4.guildIconSize = LARGE;
object7.guildIconSize = LARGE;
const XSMALL_20 = GuildIconSizes.XSMALL_20;
object4.guildBadgeIconSize = XSMALL_20;
object4.wrapper = {size: 48};
object4.channelIcon = {size: 24};
object4.margin = {marginRight: 12};
object4.emoji = {'size': 24, 'lineHeight': 32};
object2.icon = object4;
object2.unreadBadge = {positionThread: {left: -68}};
object2.mentionBadge = {position: {top: 34}, positionThread: {top: 27}};
const object6 = {};
object7.guildBadgeIconSize = XSMALL_20;
object7.wrapper = {size: 48};
object7.channelIcon = {size: 24};
object7.margin = {marginRight: 12};
object7.emoji = {'size': 24, 'lineHeight': 32};
object.icon = object7;
object.unreadBadge = {positionThread: {left: -68}};
object.mentionBadge = {position: {top: 34}, positionThread: {top: 27}};
const object8 = {};
REFRESH_SMALL_16 = IconSizes.REFRESH_SMALL_16;
object6.size = REFRESH_SMALL_16;
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
object8.size = REFRESH_SMALL_16;
const GameIconSizes = (GameIconModule).GameIconSizes;
const SMALL = GameIconSizes.SMALL;
object6.gameSize = SMALL;
object2.joinVoiceButton = {text: {variant: 'text-sm/bold'}, layout: {'paddingVertical': 6, 'paddingRight': 12,
'paddingLeft': 12, 'height': 32}, icon: object6};
object2.threadSpine = {'left': 48, 'startAndEndHeight': 16, 'transform': null, 'topOffset': -6,
object8.gameSize = SMALL;
object.joinVoiceButton = {text: {variant: 'text-sm/bold'}, layout: {'paddingVertical': 6, 'paddingRight': 12,
'paddingLeft': 12, 'height': 32}, icon: object8};
object.threadSpine = {'left': 48, 'startAndEndHeight': 16, 'transform': null, 'topOffset': -6,
transform: [{translateY: 0}]};
object2.happeningNow = {margin: {marginBottom: 20}};
object2.typing = {position: {'top': 12, 'left': 12}, positionThread: {'top': 3, 'left': -17},
object.happeningNow = {margin: {marginBottom: 20}};
object.typing = {position: {'top': 12, 'left': 12}, positionThread: {'top': 3, 'left': -17},
typingIndicator: {position: {'top': 25, 'left': 11}}};
object2.separator = {margin: {marginVertical: 20}};
value = value(CHANNEL_LIST_STYLES_COMPACT, object2);
const value3 = (importDefault(10983) /* metro dependency 10983: deepmerge */)(value,
object.separator = {margin: {marginVertical: 20}};
value = value(CHANNEL_LIST_STYLES_COMPACT, object);
const value3 = (Deepmerge)(value,
{layout: {marginThread: {marginLeft: 0}}, container: {paddingThread: {paddingLeft: 20}},
unreadBadge: {positionThread: {left: 4}}, mentionBadge: {positionThread: {top: 34}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/Cozy.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/Cozy.tsx');
exports.CHANNEL_LIST_STYLES_COZY = value;
exports.CHANNEL_LIST_STYLES_COZY_LAUNCHPAD = value3;
}
global.__d(_fun84086, 10985, [10983, 10984, 697, 1305, 6819, 6780,
2]) /* metro module 10985, dependencies: [10983, 10984, 697, 1305, 6819, 6780, 2] */;
@@ -1,60 +1,67 @@
/* Metro module 10982; source: modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/CozyDrawer.tsx; dependencies: [10983, 10984, 697, 1305, 6819, 6780, 2] */
import Deepmerge from '../utils/deepmerge.tsx'; /* Metro dependency 10983 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NativeModule from '../../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GameIconModule from '../../../../../../game_detection/native/GameIcon.tsx'; /* Metro dependency 6780 */
import * as GuildIconModule from '../../../../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as CompactModule from './Compact.tsx'; /* Metro dependency 10984 */
function _fun84077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11168:6, offset: 0x01f37557, size: 872 bytes, params: 8, frame: 29
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(10983) /* metro dependency 10983: deepmerge */;
const CHANNEL_LIST_STYLES_COMPACT = (require(10984) /* metro dependency 10984: Compact */).CHANNEL_LIST_STYLES_COMPACT;
object3 = {};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.padding = {'paddingVertical': 4, 'paddingLeft': 20, 'paddingRight': 12};
object4.paddingPanels = {'paddingVertical': 6, 'paddingLeft': 8, 'paddingRight': 8};
object4.paddingThread = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 12};
object3.container = object4;
object3.channelName = {height: 20, text: {variant: 'text-md/semibold'}};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
let value = Deepmerge;
const CHANNEL_LIST_STYLES_COMPACT = (CompactModule).CHANNEL_LIST_STYLES_COMPACT;
object = {};
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.padding = {'paddingVertical': 4, 'paddingLeft': 20, 'paddingRight': 12};
object2.paddingPanels = {'paddingVertical': 6, 'paddingLeft': 8, 'paddingRight': 8};
object2.paddingThread = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 12};
object.container = object2;
object.channelName = {height: 20, text: {variant: 'text-md/semibold'}};
const IconSizes = (NativeModule).IconSizes;
const EXTRA_SMALL = IconSizes.EXTRA_SMALL;
object3.messagePreview = {text: {variant: 'text-xs/medium'}, messageTypeIconSize: EXTRA_SMALL,
object.messagePreview = {text: {variant: 'text-xs/medium'}, messageTypeIconSize: EXTRA_SMALL,
messageTypeIconSizeNew: 'xs', height: 18, margin: {marginTop: 0}};
object3.inviteRow = {text: {variant: 'text-md/semibold'}};
const object5 = {};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
object.inviteRow = {text: {variant: 'text-md/semibold'}};
const object7 = {};
const AvatarSizes = (NativeModule).AvatarSizes;
let NORMAL = AvatarSizes.NORMAL;
object5.avatarSize = NORMAL;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
object7.avatarSize = NORMAL;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
NORMAL = GuildIconSizes.NORMAL;
object5.guildIconSize = NORMAL;
object7.guildIconSize = NORMAL;
const XXSMALL = GuildIconSizes.XXSMALL;
object5.guildBadgeIconSize = XXSMALL;
object5.wrapper = {size: 40};
object5.channelIcon = {size: 40};
object5.margin = {marginRight: 8};
object5.emoji = {'size': 24, 'lineHeight': 32};
object3.icon = object5;
object3.unreadBadge = {positionThread: {left: -68}};
object3.mentionBadge = {position: {top: 34}, positionThread: {top: 27}};
const object6 = {};
object7.guildBadgeIconSize = XXSMALL;
object7.wrapper = {size: 40};
object7.channelIcon = {size: 40};
object7.margin = {marginRight: 8};
object7.emoji = {'size': 24, 'lineHeight': 32};
object.icon = object7;
object.unreadBadge = {positionThread: {left: -68}};
object.mentionBadge = {position: {top: 34}, positionThread: {top: 27}};
const object8 = {};
const REFRESH_SMALL_16 = IconSizes.REFRESH_SMALL_16;
object6.size = REFRESH_SMALL_16;
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
object8.size = REFRESH_SMALL_16;
const GameIconSizes = (GameIconModule).GameIconSizes;
const SMALL = GameIconSizes.SMALL;
object6.gameSize = SMALL;
object3.joinVoiceButton = {text: {variant: 'text-sm/bold'}, layout: {'paddingVertical': 6, 'paddingRight': 12,
'paddingLeft': 12, 'height': 32}, icon: object6};
object3.threadSpine = {'left': 48, 'startAndEndHeight': 16, 'transform': null, 'topOffset': -6,
object8.gameSize = SMALL;
object.joinVoiceButton = {text: {variant: 'text-sm/bold'}, layout: {'paddingVertical': 6, 'paddingRight': 12,
'paddingLeft': 12, 'height': 32}, icon: object8};
object.threadSpine = {'left': 48, 'startAndEndHeight': 16, 'transform': null, 'topOffset': -6,
transform: [{translateY: 0}]};
object3.happeningNow = {margin: {marginBottom: 20}};
object3.typing = {position: {'top': 12, 'left': 12}, positionThread: {'top': 3, 'left': -17},
object.happeningNow = {margin: {marginBottom: 20}};
object.typing = {position: {'top': 12, 'left': 12}, positionThread: {'top': 3, 'left': -17},
typingIndicator: {position: {'top': 25, 'left': 11}}};
object3.separator = {margin: {marginVertical: 20}};
value = value(CHANNEL_LIST_STYLES_COMPACT, object3);
const deepmerge = importDefault(10983) /* metro dependency 10983: deepmerge */;
object.separator = {margin: {marginVertical: 20}};
value = value(CHANNEL_LIST_STYLES_COMPACT, object);
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const value3 = deepmerge(CHANNEL_LIST_STYLES_COMPACT, {container: {paddingPanels: {paddingVertical: 8}},
const value3 = Deepmerge(CHANNEL_LIST_STYLES_COMPACT, {container: {paddingPanels: {paddingVertical: 8}},
icon: {avatarSize: REFRESH_MEDIUM_32}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/CozyDrawer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/layouts/layout/CozyDrawer.tsx');
exports.CHANNEL_LIST_STYLES_COZY_DRAWER = value;
exports.CHANNEL_LIST_STYLES_COZY_DRAWER_SMOL = value3;
}
global.__d(_fun84077, 10982, [10983, 10984, 697, 1305, 6819, 6780,
2]) /* metro module 10982, dependencies: [10983, 10984, 697, 1305, 6819, 6780, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more