/* Metro module 11926; source: components_native/chat/ChatBeginningRow.tsx; dependencies: [57, 5, 31, 27, 4502, 1378, 6865, 9113, 5189, 1383, 1422, 5109, 1379, 1935, 1945, 1867, 3784, 3793, 4864, 1878, 661, 1386, 11927, 11899, 8781, 33, 4501, 697, 6682, 1244, 6684, 6689, 6691, 4559, 4573, 3853, 3860, 5278, 11392, 1305, 11928, 8148, 9646, 566, 3995, 8206, 4020, 4805, 9088, 6863, 11089, 4048, 6622, 11929, 11930, 44, 21, 11932, 3856, 9112, 4660, 11936, 5586, 9151, 5930, 1948, 11937, 11940, 8153, 4603, 4578, 11944, 4497, 11945, 6779, 8092, 683, 10630, 8194, 6613, 6610, 3857, 4080, 11947, 1962, 6771, 11948, 8491, 8743, 6797, 8822, 8515, 6947, 5080, 8863, 6819, 8783, 8800, 8796, 8794, 10348, 7975, 4007, 8879, 3968, 1365, 11388, 5225, 9719, 10859, 4056, 11949, 11953, 2] */ function _fun91451(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6, offset: 0x02064c66, size: 1569 bytes, params: 8, frame: 28 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 = importDefault(5) /* metro dependency 5 */; const env0_5 = importAll(31) /* metro dependency 31 */; let value = require(27) /* metro dependency 27 */; const env0_6 = value.ActivityIndicator; const env0_7 = value.View; const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */; const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */; const forumPostMessagesStore = importDefault(6865) /* metro dependency 6865: ForumPostMessagesStore */; const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */; const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */; const env0_13 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES; const env0_14 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner; const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */; const env0_16 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).FetchState; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */; const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; value = require(661) /* metro dependency 661: Constants */; const env0_25 = value.AnalyticEvents; const env0_26 = value.AnalyticsPages; const env0_27 = value.AnalyticsSections; const env0_28 = value.ChannelSettingsSections; const env0_29 = value.EMPTY_STRING_SNOWFLAKE_ID; const env0_30 = value.GuildSettingsSections; const env0_31 = value.HelpdeskArticles; const env0_32 = value.InstantInviteSources; const env0_33 = value.Permissions; const env0_34 = value.RelationshipTypes; const env0_35 = value.UPLOAD_MEDIUM_SIZE; const env0_36 = value.WELCOME_OLD_GUILD_AGE_THRESHOLD; const env0_37 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags; value = require(11927) /* metro dependency 11927: GuildProgressConstants */; const env0_38 = value.AnalyticsActions; const env0_39 = value.AnalyticsSetupTypes; const env0_40 = (require(11899) /* metro dependency 11899: MessageRequestConstants */).MOBILE_MESSAGE_REQUESTS_MODAL_KEY; const env0_41 = (require(8781) /* metro dependency 8781: RestrictionConfirmationConstants */).BLOCK_CONFIRMATION_ACTION_SHEET_KEY; value = require(33) /* metro dependency 33 */; const env0_42 = value.jsx; const env0_43 = value.Fragment; const env0_44 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object2 = {container: {'position': 'absolute', 'paddingVertical': 8, 'paddingHorizontal': 12, 'width': '100%'}}; object2.title = {marginTop: 16}; object2.subtitle = {'marginBottom': 16, 'lineHeight': 20}; const object5 = {'borderRadius': null, 'marginTop': 16, 'width': '100%'}; object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg; object2.gdmInviteFriends = object5; const object6 = {'borderRadius': null, 'marginTop': 8, 'width': '100%'}; object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg; object2.gdmShareInviteLink = object6; object2.gdmShareInviteLinkNoRelationships = {marginTop: 16}; object2.ctaLabel = {marginLeft: 8}; object2.ctaContainer = {'flexDirection': 'row', 'flexWrap': 'wrap'}; object2.ctaButton = {'flexDirection': 'row', 'alignItems': 'center'}; object2.ctaAddRoles = {paddingRight: 24}; object2.avatar = {marginBottom: 16}; object2.avatarRedesign = {marginBottom: 16}; object2.centerHeader = {'paddingHorizontal': 8, 'alignItems': 'center'}; object2.gdmText = {textAlign: 'center'}; object2.dmTitle = {'marginBottom': 8, 'textAlign': 'center'}; object2.dmBeginningMessage = {marginTop: 8}; object2.provisionalAccountExplainer = {marginTop: 12}; object2.mutualGuildsLabel = {'marginTop': 8, 'marginLeft': 8, 'height': 26}; object2.mutualGuildsContainer = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 6}; const object7 = {'width': 64, 'height': 64, 'borderRadius': null, 'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center'}; object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl; const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED; object7.backgroundColor = BACKGROUND_MOD_MUTED; object2.iconContainer = object7; object2.threadDetails = {lineHeight: 20}; object2.threadCreatorRoleDot = {'paddingRight': 4, 'paddingTop': 2}; object2.tagContainer = {'marginTop': 8, 'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'}; const object8 = {'borderRadius': null, 'backgroundColor': null, 'height': 24, 'width': 24, 'padding': 4, 'alignContent': 'center'}; object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; const STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE; object8.backgroundColor = STATUS_POSITIVE; object2.unmutedNotificationContainer = object8; object2.unmutedNotification = {'width': 16, 'height': 16}; object2.dmButtonRow = {'marginTop': 16, 'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'gap': 8}; object2.pendingIncoming = {'flexDirection': 'column', 'gap': 8}; object2.pendingIncomingButtons = {'flexDirection': 'row', 'flexWrap': 'wrap', 'gap': 8}; object2.appDMButtonIcon = {marginRight: 2}; object2.formCtaIcon = {'width': 32, 'height': 32}; const env0_45 = Reflect.apply(createStyles, value, [object2]); (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/ChatBeginningRow.tsx'); exports.default = ChatBeginningRow; } function ChatBeginningRowIcon(a0) { // fn#91452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:2625, offset: 0x02065287, size: 383 bytes, params: 2, frame: 20 const isPrivate = a0.isPrivate; const isThread = a0.isThread; a0.isNSFW; const isForumPost = a0.isForumPost; const styles = useStyles(); const object2 = {}; if (isForumPost) { object2.IconComponent = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon; object2.label = (require(1244) /* metro dependency 1244: indexNative */).t.Y4REmB; } else if (isThread) { object2.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon; object2.label = (require(1244) /* metro dependency 1244: indexNative */).t['7Xm5QI']; } else if (isPrivate) { object2.IconComponent = (require(6689) /* metro dependency 6689: TextLockIcon */).TextLockIcon; object2.label = (require(1244) /* metro dependency 1244: indexNative */).t.GK18KJ; } else { object2.IconComponent = (require(6691) /* metro dependency 6691: TextIcon */).TextIcon; object2.label = (require(1244) /* metro dependency 1244: indexNative */).t.GK18KJ; } const IconComponent = object2.IconComponent; return ( ); } function ChatBeginningRowHeader({title, subtitle, isPrivate, isThread, isNSFW, isForumPost, subtitleLink}) { // fn#91453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:3116, offset: 0x02065406, size: 371 bytes, params: 2, frame: 29 var r11; var r5; var object; const styles = useStyles(); const r13 = subtitleLink != null && (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled(); const jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43; const items2 = []; const Text = (require(4573) /* metro dependency 4573: Text */).Text; items2[1] = {title}; const value8 = subtitle != null; if (value8) { object = {}; r11 = r13 ? 'link' : undefined; object.accessibilityRole = r11; r11 = r13 ? _fun91454 : undefined; object.onPress = r11; object.style = styles.subtitle; object.variant = 'text-md/medium'; object.color = 'text-default'; r5 = {subtitle}; } else { r5 = value8; } items2[2] = r5; return ( <> {items2} ); } function LinkManageButtons({canManageRoles, canEdit, isPrivate, channel, theme}) { // fn#91455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:3727, offset: 0x020655a6, size: 730 bytes, params: 2, frame: 31 var r5; const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; var object2; var items2; const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var object5; var items6; const styles = useStyles(); const useTokenModule = require(3860) /* metro dependency 3860: useToken */; const useToken = useTokenModule.useToken; const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK; const value2 = Reflect.apply(useToken, useTokenModule, [TEXT_LINK, theme]); let r6 = isPrivate && canManageRoles; if (r6) { var pressableOpacityProps = {accessibilityRole: 'button', onPress: onPress_91456, style: [styles.ctaButton, styles.subtitle]}; items2 = [((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon)]; items2[1] = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)}; r6 = {items2}; } if (canEdit) { var pressableOpacityProps = {accessibilityRole: 'button', onPress: onPress_91457, style: [styles.ctaButton, styles.subtitle]}; items6 = [((PencilIcon) => )((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)]; items6[1] = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GE1Tlo)}; r5 = {items6}; } else { r5 = canEdit; } return ( {r6} {r5} ); } function ThreadOwner({userId, guildId}) { // fn#91458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:4645, offset: 0x020658fd, size: 667 bytes, params: 2, frame: 28 const Text = (require(4573) /* metro dependency 4573: Text */).Text; var value; const styles = useStyles(); const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getUser(userId); }); const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun91460); const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.roleStyle; }); let r2 = value3?.nick ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user); const r4 = r2 ?? '???'; r2 = value3?.colorString ?? null; let r5 = value3?.colorStrings ?? null; const value7 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(r5); const enhancedRoleColorUtilsModule = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */; const useIsRoleStyleAndRoleColorsEligibleForERC = enhancedRoleColorUtilsModule.useIsRoleStyleAndRoleColorsEligibleForERC; if (roleStyle === 'username') { r5 = r2 != null ? {color: r2} : undefined; value = require(4020) /* metro dependency 4020: FabricUtils */; return ( {r4} ); } return ( <> {roleStyle === 'dot' && r2 != null && ((RoleDot) => )((require(1305) /* metro dependency 1305: native */).RoleDot)} {r4} ); } function ChatBeginningRowThread({channel}) { // fn#91462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:5595, offset: 0x02065bef, size: 635 bytes, params: 2, frame: 30 var r6; var r0; var jsxRuntimeEnv0_43Binding; var isForumPost; var items2; const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const styles = useStyles(); const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel); const isPrivateGuildChannel2 = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).isPrivateGuildChannel(channel); const value3 = (require(6863) /* metro dependency 6863: ForumTagHooks */).useAppliedTags(channel); const fluxModule = require(566) /* metro dependency 566: flux */; const useStateFromStoresObject = fluxModule.useStateFromStoresObject; if (channel.threadMetadata == null) { r0 = null; } else { jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43; items2 = []; isForumPost = channel.isForumPost; r6 = Reflect.apply(isForumPost, channel, []) && value3.length > 0 ? {value3.map(_fun91464)} : null; items2[1] = r6; r6 = !channel.isForumPost() && {intl.format((require(1244) /* metro dependency 1244: indexNative */).t.imPXd5, {usernameHook: usernameHook_91465})}; items2[2] = r6; isForumPost = channel.isForumPost; r6 = Reflect.apply(isForumPost, channel, []) && Reflect.apply(useStateFromStoresObject, fluxModule, [[ForumPostMessagesStore], function() { return ForumPostMessagesStore.getMessage(channel.id); }]).firstMessage == null ? {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN)} : null; items2[3] = r6; r0 = <>{items2}; } return r0; } function ChatBeginningRowGuildNonDefaultChannel({guild, channel}) { // fn#91466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6491, offset: 0x02065ef9, size: 571 bytes, params: 2, frame: 29 var r5; var value; const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true); const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, false); let can = PermissionStore.can; const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS; const value4 = Reflect.apply(can, PermissionStore, [MANAGE_CHANNELS, channel]); can = PermissionStore.can; const MANAGE_ROLES = Permissions.MANAGE_ROLES; const value5 = Reflect.apply(can, PermissionStore, [MANAGE_ROLES, channel]); can = PermissionStore.can; const READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY; const value6 = Reflect.apply(can, PermissionStore, [READ_MESSAGE_HISTORY, channel]); const isPrivateGuildChannel2 = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).isPrivateGuildChannel(channel); const value7 = (importDefault(4048) /* metro dependency 4048: useTheme */)(); const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const value8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.q0tgLe, {channelName: value2}); const r12 = isPrivateGuildChannel2 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.QuwqjG, {channelName: value2, topicHook: topicHook}) : value6 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.JHKUGB, {channelName: value2}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.hPVEQG, {channelName: value3}); const jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43; const items2 = []; items2[1] = ; if (isPrivateGuildChannel2) { if (value4) { value = importDefault(11929) /* metro dependency 11929: ChannelAccessInfo */; value = ((Component) => )(value); r5 = value; } else { r5 = null; } } else { r5 = null; } items2[2] = r5; return ( <> {items2} ); } function ChatBeginningRowGuild({guild, channel}) { // fn#91468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:7263, offset: 0x02066176, size: 180 bytes, params: 2, frame: 18 const defaultChannel = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore], function() { return GuildChannelStore.getDefaultChannel(guild.id); }); const can = PermissionStore.can; const READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY; return Reflect.apply(can, PermissionStore, [READ_MESSAGE_HISTORY, channel]) && defaultChannel?.id === channel.id ? : ; } function DMSpamButton({channel, user, showingSpamBanner}) { // fn#91470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:9802, offset: 0x0206624a, size: 247 bytes, params: 2, frame: 22 const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const value2 = (require(11940) /* metro dependency 11940: useDMMessageToReport */).useDMMessageToReport(channel, user.id, user.bot === true); const message = value2.message; if (!showingSpamBanner) { if (value2.isReportable) { if (message != null) { return (