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

File diff suppressed because it is too large. Load diff
@@ -1,65 +1,72 @@
/* Metro module 13474; source: modules/connections/native/ConnectionPlatformUtils.native.tsx; dependencies: [661, 697, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun102429(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13664:6, offset: 0x0223b2c0, size: 675 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PlatformTypes = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
object2 = {};
const PlatformTypes = (ConstantsModule).PlatformTypes;
object = {};
const CRUNCHYROLL = PlatformTypes.CRUNCHYROLL;
const PLATFORM_CRUNCHYROLL = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_CRUNCHYROLL;
object2[CRUNCHYROLL] = PLATFORM_CRUNCHYROLL;
object[CRUNCHYROLL] = PLATFORM_CRUNCHYROLL;
const PLAYSTATION_STAGING = PlatformTypes.PLAYSTATION_STAGING;
let PLATFORM_PLAYSTATION = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
object2[PLAYSTATION_STAGING] = PLATFORM_PLAYSTATION;
object[PLAYSTATION_STAGING] = PLATFORM_PLAYSTATION;
const PLAYSTATION = PlatformTypes.PLAYSTATION;
PLATFORM_PLAYSTATION = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
object2[PLAYSTATION] = PLATFORM_PLAYSTATION;
object[PLAYSTATION] = PLATFORM_PLAYSTATION;
const GITHUB = PlatformTypes.GITHUB;
const PLATFORM_GITHUB = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_GITHUB;
object2[GITHUB] = PLATFORM_GITHUB;
object[GITHUB] = PLATFORM_GITHUB;
const SAMSUNG = PlatformTypes.SAMSUNG;
const PLATFORM_SAMSUNG = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_SAMSUNG;
object2[SAMSUNG] = PLATFORM_SAMSUNG;
object[SAMSUNG] = PLATFORM_SAMSUNG;
const XBOX = PlatformTypes.XBOX;
const PLATFORM_XBOX = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_XBOX;
object2[XBOX] = PLATFORM_XBOX;
object[XBOX] = PLATFORM_XBOX;
const SPOTIFY = PlatformTypes.SPOTIFY;
const PLATFORM_SPOTIFY = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_SPOTIFY;
object2[SPOTIFY] = PLATFORM_SPOTIFY;
object[SPOTIFY] = PLATFORM_SPOTIFY;
const TWITTER_LEGACY = PlatformTypes.TWITTER_LEGACY;
let PLATFORM_TWITTER = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_TWITTER;
object2[TWITTER_LEGACY] = PLATFORM_TWITTER;
object[TWITTER_LEGACY] = PLATFORM_TWITTER;
const TWITTER = PlatformTypes.TWITTER;
PLATFORM_TWITTER = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_TWITTER;
object2[TWITTER] = PLATFORM_TWITTER;
object[TWITTER] = PLATFORM_TWITTER;
const FACEBOOK = PlatformTypes.FACEBOOK;
const PLATFORM_FACEBOOK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_FACEBOOK;
object2[FACEBOOK] = PLATFORM_FACEBOOK;
object[FACEBOOK] = PLATFORM_FACEBOOK;
const REDDIT = PlatformTypes.REDDIT;
const PLATFORM_REDDIT = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_REDDIT;
object2[REDDIT] = PLATFORM_REDDIT;
object[REDDIT] = PLATFORM_REDDIT;
const STEAM = PlatformTypes.STEAM;
const PLATFORM_STEAM = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_STEAM;
object2[STEAM] = PLATFORM_STEAM;
object[STEAM] = PLATFORM_STEAM;
const LEAGUE_OF_LEGENDS = PlatformTypes.LEAGUE_OF_LEGENDS;
const PLATFORM_LOL = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_LOL;
object2[LEAGUE_OF_LEGENDS] = PLATFORM_LOL;
object[LEAGUE_OF_LEGENDS] = PLATFORM_LOL;
const SKYPE = PlatformTypes.SKYPE;
const PLATFORM_SKYPE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_SKYPE;
object2[SKYPE] = PLATFORM_SKYPE;
object[SKYPE] = PLATFORM_SKYPE;
const BUNGIE = PlatformTypes.BUNGIE;
const PLATFORM_BUNGIE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_BUNGIE;
object2[BUNGIE] = PLATFORM_BUNGIE;
object[BUNGIE] = PLATFORM_BUNGIE;
const BATTLENET = PlatformTypes.BATTLENET;
const PLATFORM_BATTLENET = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_BATTLENET;
object2[BATTLENET] = PLATFORM_BATTLENET;
object[BATTLENET] = PLATFORM_BATTLENET;
const YOUTUBE = PlatformTypes.YOUTUBE;
const PLATFORM_YOUTUBE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_YOUTUBE;
object2[YOUTUBE] = PLATFORM_YOUTUBE;
object[YOUTUBE] = PLATFORM_YOUTUBE;
const TWITCH = PlatformTypes.TWITCH;
const PLATFORM_TWITCH = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_TWITCH;
object2[TWITCH] = PLATFORM_TWITCH;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/ConnectionPlatformUtils.native.tsx');
object[TWITCH] = PLATFORM_TWITCH;
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/ConnectionPlatformUtils.native.tsx');
exports.getConnectionBackgroundColor = getConnectionBackgroundColor;
function getConnectionBackgroundColor(a0) { // fn#102430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13664:1251, offset: 0x00c3fbaf, size: 16 bytes, params: 2, frame: 2
return env0_0[a0];
}
}
global.__d(_fun102429, 13474, [661, 697, 2]) /* metro module 13474, dependencies: [661, 697, 2] */;
@@ -1,22 +1,40 @@
/* Metro module 11435; source: modules/connections/native/ConnectionsRoleMessageBadgeActionSheet.tsx; dependencies: [57, 31, 27, 1885, 1226, 1945, 1938, 1867, 11436, 5044, 661, 33, 4501, 697, 1244, 5043, 4064, 4573, 4048, 22, 3860, 4915, 11367, 8706, 1305, 1423, 4002, 44, 6771, 6789, 566, 683, 4863, 6593, 6275, 6812, 4578, 4080, 11370, 8743, 2] */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserRecord from '../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import Platforms from '../../../lib/Platforms.tsx'; /* Metro dependency 4915 */
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 GuildRoleConnectionEligibilityStore from '../GuildRoleConnectionEligibilityStore.tsx'; /* Metro dependency 11436 */
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 UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
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 ConnectionsUtilsModule from '../ConnectionsUtils.tsx'; /* Metro dependency 5043 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 5044 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as GuildRoleConnectionsModalActionCreatorsModule from './GuildRoleConnectionsModalActionCreators.tsx'; /* Metro dependency 11370 */
function _fun87515(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:6, offset: 0x01fc1553, size: 743 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const closure = PopoutChecks;
const PopoutChecks2 = PopoutChecks;
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 userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildRoleConnectionEligibilityStore = importDefault(11436) /* metro dependency 11436: GuildRoleConnectionEligibilityStore */;
const env0_13 = (require(5044) /* metro dependency 5044: Constants */).OperatorTypes;
value = require(661) /* metro dependency 661: Constants */;
const env0_14 = value.AnalyticEvents;
const env0_15 = value.EMPTY_STRING_SNOWFLAKE_ID;
@@ -26,312 +44,379 @@ function _fun87515(global, require, importDefault, importAll, module, exports, d
const env0_18 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {container: {'flexDirection': 'column', 'alignItems': 'center', 'padding': 16}};
const object4 = {'width': '100%', 'flexDirection': 'row', 'alignItems': 'center', 'paddingBottom': 16,
object = {container: {'flexDirection': 'column', 'alignItems': 'center', 'padding': 16}};
const object2 = {'width': '100%', 'flexDirection': 'row', 'alignItems': 'center', 'paddingBottom': 16,
'borderBottomWidth': 1};
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderBottomColor = BORDER_SUBTLE;
object2.borderBottomColor = BORDER_SUBTLE;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object3.header = object4;
object3.verifiedContainer = {'marginRight': 8, 'height': 24, 'width': 24};
object3.headerTextContainer = {'flexShrink': 1, 'flexDirection': 'column'};
object3.verifiedCheck = {'position': 'absolute', 'left': 0, 'top': 0};
object3.loadingSpinner = {marginVertical: 40};
object3.popoutCheck = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 8, 'marginLeft': 32,
object2.marginBottom = PX_24;
object.header = object2;
object.verifiedContainer = {'marginRight': 8, 'height': 24, 'width': 24};
object.headerTextContainer = {'flexShrink': 1, 'flexDirection': 'column'};
object.verifiedCheck = {'position': 'absolute', 'left': 0, 'top': 0};
object.loadingSpinner = {marginVertical: 40};
object.popoutCheck = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 8, 'marginLeft': 32,
'paddingRight': 20};
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object3.popoutCheckIcon = {marginRight: 8, tintColor: TEXT_FEEDBACK_POSITIVE};
object3.popoutChecksGroup = {'width': '100%', 'marginBottom': 24};
object.popoutCheckIcon = {marginRight: 8, tintColor: TEXT_FEEDBACK_POSITIVE};
object.popoutChecksGroup = {'width': '100%', 'marginBottom': 24};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.popoutChecksGroupBottomMargin = {'paddingBottom': 12, 'borderBottomWidth': 1, 'borderBottomColor': null,
object.popoutChecksGroupBottomMargin = {'paddingBottom': 12, 'borderBottomWidth': 1, 'borderBottomColor': null,
'marginBottom': 12, borderBottomColor: BORDER_SUBTLE};
object3.popoutCheckGroupName = {'flexDirection': 'row', 'alignItems': 'center'};
object3.popoutCheckGroupPlatformIcon = {marginRight: 8};
object3.button = {marginBottom: 8};
object3.botTag = {marginLeft: 4};
const env0_19 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/ConnectionsRoleMessageBadgeActionSheet.tsx');
object.popoutCheckGroupName = {'flexDirection': 'row', 'alignItems': 'center'};
object.popoutCheckGroupPlatformIcon = {marginRight: 8};
object.button = {marginBottom: 8};
object.botTag = {marginLeft: 4};
const env0_19 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/ConnectionsRoleMessageBadgeActionSheet.tsx');
exports.default = ConnectionsRoleMessageBadgeActionSheet;
exports.PopoutChecks = closure;
}
function PopoutCheck({connectionType, connectionMetadataField, operator, value, description}) { // fn#87516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:1324, offset: 0x01fc183a, size: 513 bytes, params: 2, frame: 24
var r9;
var r0;
var moduleValue;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var property;
var Math;
var max;
const styles = useStyles();
if (description != null) {
if (OperatorTypes.LESS_THAN === operator) {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2p7dA3'];
object2 = {description: description};
Math = global.Math;
max = Math.max;
value = global.Number(value);
object2.count = Reflect.apply(max, Math, [0, value - 1]);
value = Reflect.apply(format, intl, [property, object2]);
r9 = value;
} else if (OperatorTypes.GREATER_THAN !== operator) {
r9 = description;
exports.PopoutChecks = PopoutChecks2;
function PopoutCheck({connectionType, connectionMetadataField, operator, value, description}) { // fn#87516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:1324, offset: 0x01fc183a, size: 513 bytes, params: 2, frame: 24
var r9;
var r0;
var moduleValue;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var property;
var Math;
var max;
const styles = useStyles();
if (description != null) {
if (OperatorTypes.LESS_THAN === operator) {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2p7dA3'];
object = {description: description};
Math = global.Math;
max = Math.max;
value = global.Number(value);
object.count = Reflect.apply(max, Math, [0, value - 1]);
value = Reflect.apply(format, intl, [property, object]);
r9 = value;
} else if (OperatorTypes.GREATER_THAN !== operator) {
r9 = description;
} else {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2p7dA3'];
object = {description: description};
Math = global.Math;
max = Math.max;
value = global.Number(value);
object.count = Reflect.apply(max, Math, [0, value + 1]);
value = Reflect.apply(format, intl, [property, object]);
r9 = value;
}
} else {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2p7dA3'];
object2 = {description: description};
Math = global.Math;
max = Math.max;
value = global.Number(value);
object2.count = Reflect.apply(max, Math, [0, value + 1]);
value = Reflect.apply(format, intl, [property, object2]);
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, value: value});
r9 = value;
}
} else {
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
value = moduleValue.getConnectionsCheckText({connectionType: connectionType,
connectionMetadataField: connectionMetadataField, operator: operator, value: value});
r9 = value;
}
if (r9 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.popoutCheck};
const CheckmarkLargeIcon = (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
value = <CheckmarkLargeIcon size="sm" style={styles.popoutCheckIcon} />;
value = <View {...viewBindingProps}>{value}{((Text) => <Text variant="text-xs/medium" color="mobile-text-heading-primary">{r9}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
r0 = value;
}
return r0;
}
function PopoutChecks({eligibilityStates, guildId}) { // fn#87517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:2021, offset: 0x01fc1a3b, size: 227 bytes, params: 2, frame: 18
const env0_1 = useStyles();
const env0_2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value2 = (importDefault(22) /* metro dependency 22 */).groupBy(eligibilityStates, function(a0) {
var connection_type = a0.connection_type;
var value = '';
return value + connection_type + (a0.application_id != null ? ':' + a0.application_id : value);
});
const Object = global.Object;
const value3 = Object.keys(value2);
const env0_4 = value3.length - 1;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const GREEN_330 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_330;
const env0_5 = Reflect.apply(useToken, useTokenModule, [GREEN_330]);
return (
<>
{value3.map(_fun87519)}
</>
);
}
function ConnectionsRoleMessageBadgeActionSheet({userId, roleId, channelId, guildId}) { // fn#87523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:3763, offset: 0x01fc1f66, size: 1622 bytes, params: 2, frame: 42
var r18;
var r16;
var r11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_18Binding;
var items4;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object14;
var object16;
const env0_3 = guildId;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const CONNECTIONS_ROLE_POPOUT = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CONNECTIONS_ROLE_POPOUT;
const analyticsLocations = defaultImport(CONNECTIONS_ROLE_POPOUT).analyticsLocations;
const env0_4 = analyticsLocations;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guildId, id);
});
const guildRoleConnectionEligibility = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleConnectionEligibilityStore],
function() {
return GuildRoleConnectionEligibilityStore.getGuildRoleConnectionEligibility(roleId);
});
let binding = env0_4;
const [property, env0_9] = env0_3(binding.useState(guildRoleConnectionEligibility == null), 2);
const r19 = member == null ? undefined : member.roles.includes(roleId);
binding = env0_4;
binding.useEffect(_fun87528, [userId, roleId, channelId, guildId]);
binding.useEffect(_fun87529, [guildId, roleId, property, guildRoleConnectionEligibility]);
const r17 = guildRoleConnectionEligibility == null ? undefined : guildRoleConnectionEligibility.flat().some(function(a0) {
return a0.application_id === undefined;
});
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun87532);
const r29 = guildRoleConnectionEligibility == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jDym4E) : guildRoleConnectionEligibility.length !== 1 ? guildRoleConnectionEligibility.length === 1 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0eBj3x'],
{}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.D7uftB,
{}) : guildRoleConnectionEligibility[0].length === 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jDym4E) : guildRoleConnectionEligibility.length === 1 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0eBj3x'],
{}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.D7uftB, {});
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const view = <View style={styles.verifiedContainer}>{((Component) => <Component style={styles.verifiedCheck} guildId={guild?.id ?? EMPTY_STRING_SNOWFLAKE_ID} role={value9 ?? undefined} size={24} />)(importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */)}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view2 = <View style={styles.header}>{view}<View style={styles.headerTextContainer}><Text variant="text-lg/semibold" color="mobile-text-heading-primary">{value9?.name}</Text><Text variant="text-xs/normal" color="text-default">{r29}</Text></View></View>;
if (guildRoleConnectionEligibility == null) {
r11 = <ActivityIndicator style={styles.loadingSpinner} size="large" />;
} else if (guildRoleConnectionEligibility.flat() != null) {
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
items4 = [<PopoutChecks eligibilityStates={guildRoleConnectionEligibility.flat()} guildId={guildId} />];
if (r19) {
r18 = null;
if (r9 == null) {
r0 = null;
} else {
r18 = <View style={styles.button}><Button onPress={onPress_87533} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.T1t1WV)} variant="primary" grow /></View>;
}
items4[1] = r18;
if (r17) {
r16 = <View style={styles.button}><Button onPress={onPress_87534} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hgKDnG)} variant="secondary" grow /></View>;
} else {
r16 = null;
}
items4[2] = r16;
r11 = <>{items4}</>;
} else {
r11 = <ActivityIndicator style={styles.loadingSpinner} size="large" />;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet>
<View style={styles.container}>
{view2}
{r11}
var viewBindingProps = {style: styles.popoutCheck};
const CheckmarkLargeIcon = (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
value = <CheckmarkLargeIcon size="sm" style={styles.popoutCheckIcon} />;
value = (
<View {...viewBindingProps}>
{value}
{((Text) => <Text variant="text-xs/medium" color="mobile-text-heading-primary">{r9}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function _fun87519(a0, a1) { // fn#87519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:2315, offset: 0x01fc1b1e, size: 884 bytes, params: 3, frame: 37
var r23;
var r13;
var userRecord;
var Icon;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
const property = env0_3[a0];
const value2 = property.filter(function(a0) {
return a0.operator != null;
});
const value3 = property.find(function(a0) {
return a0.application != null;
});
const value5 = undefined;
const value6 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
const value7 = null;
const application = value7 == value3 ? value5 : value3.application;
if (value7 != (value7 == application ? value5 : application.bot)) {
userRecord = new UserRecord(application.bot);
} else {
r23 = value7;
);
r0 = value;
}
return r0;
}
const officialApplicationIds = (require(5043) /* metro dependency 5043: ConnectionsUtils */).officialApplicationIds;
const includes = officialApplicationIds.includes;
const id = value7 == application ? value5 : application.id;
const r11 = Reflect.apply(includes, officialApplicationIds,
[value7 != id ? id : '']) ? ((Component) => <Component style={styles.botTag} guildId={guildId} roleColor={env0_5} size={16} />)(importDefault(11367) /* metro dependency 11367: OfficialConnectionIcon */) : value7 != r23 ? ((Component) => <Component style={styles.botTag} verified={false} />)(importDefault(8706) /* metro dependency 8706: BotTag */) : value5;
const items4 = [styles.popoutChecksGroup];
items4[1] = a1 < env0_4 ? styles.popoutChecksGroupBottomMargin : value7;
if (value7 != value6) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.popoutCheckGroupPlatformIcon};
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_2);
icon = value6.icon;
iconProps.source = Reflect.apply(makeSource, moduleValue, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
iconProps.disableColor = true;
iconProps.size = (require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM;
r13 = <Icon {...iconProps} />;
} else {
r13 = value7;
function PopoutChecks({eligibilityStates, guildId}) { // fn#87517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:2021, offset: 0x01fc1a3b, size: 227 bytes, params: 2, frame: 18
const env0_1 = useStyles();
const env0_2 = (UseTheme)();
const value2 = (importDefault(22) /* metro dependency 22 */).groupBy(eligibilityStates, function(a0) {
var connection_type = a0.connection_type;
var value = '';
return value + connection_type + (a0.application_id != null ? ':' + a0.application_id : value);
});
const Object = global.Object;
const value3 = Object.keys(value2);
const env0_4 = value3.length - 1;
const useToken = UseTokenModule.useToken;
const GREEN_330 = (Native).unsafe_rawColors.GREEN_330;
const env0_5 = Reflect.apply(useToken, UseTokenModule, [GREEN_330]);
return (
<>
{value3.map(_fun87519)}
</>
);
function _fun87519(a0, a1) { // fn#87519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:2315, offset: 0x01fc1b1e, size: 884 bytes, params: 3, frame: 37
var r23;
var r13;
var userRecord2;
var Icon;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
const property = Module00057[a0];
const value2 = property.filter(function(a0) {
return a0.operator != null;
});
const value3 = property.find(function(a0) {
return a0.application != null;
});
const value5 = undefined;
const value6 = (Platforms).get(a0);
const value7 = null;
const application = value7 == value3 ? value5 : value3.application;
if (value7 != (value7 == application ? value5 : application.bot)) {
userRecord2 = new UserRecord(application.bot);
} else {
r23 = value7;
}
const officialApplicationIds = (ConnectionsUtilsModule).officialApplicationIds;
const includes = officialApplicationIds.includes;
const id = value7 == application ? value5 : application.id;
const r11 = (
Reflect.apply(includes, officialApplicationIds, [value7 != id ? id : ''])
? ((Component) => <Component style={styles.botTag} guildId={guildId} roleColor={env0_5} size={16} />)(importDefault(11367) /* metro dependency 11367: OfficialConnectionIcon */)
: (
value7 != r23
? ((Component) => <Component style={styles.botTag} verified={false} />)(importDefault(8706) /* metro dependency 8706: BotTag */)
: value5
)
);
const items4 = [styles.popoutChecksGroup];
items4[1] = a1 < env0_4 ? styles.popoutChecksGroupBottomMargin : value7;
if (value7 != value6) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.popoutCheckGroupPlatformIcon};
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_2);
icon = value6.icon;
iconProps.source = Reflect.apply(makeSource, moduleValue, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
iconProps.disableColor = true;
iconProps.size = (require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM;
r13 = <Icon {...iconProps} />;
} else {
r13 = value7;
}
const items2 = [r13];
items2[1] = (
value7 != r23
? ((Avatar) => <Avatar style={styles.popoutCheckGroupPlatformIcon} user={r23} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value5} />)((require(1305) /* metro dependency 1305: native */).Avatar)
: value7
);
const Text = (TextModule).Text;
const name = value7 == value6 ? value5 : value6.name;
items2[2] = (
<Text variant="text-sm/medium" color="interactive-text-active">
{value7 != name ? name : value7 == application ? value5 : application.name}
</Text>
);
items2[3] = r11;
const items3 = [
<View style={styles.popoutCheckGroupName}>
{items2}
</View>,
];
items3[1] = value2.map(_fun87522);
return (
<View style={items4} key={a0}>
{items3}
</View>
);
function _fun87522({connection_type, connection_metadata_field, operator, value, description}) { // fn#87522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:3313, offset: 0x01fc1e92, size: 212 bytes, params: 2, frame: 28
(Module00044)(connection_metadata_field != null, 'connectionMetadataField is null');
(Module00044)(operator != null, 'operator is null');
(Module00044)(value != null, 'value is null');
return (
<PopoutCheck
connectionType={connection_type}
connectionMetadataField={connection_metadata_field}
operator={operator}
value={value}
description={description}
key={'' + connection_type + ':' + connection_metadata_field + ':' + operator + ':' + value}
/>
);
}
}
}
const items2 = [r13];
items2[1] = value7 != r23 ? ((Avatar) => <Avatar style={styles.popoutCheckGroupPlatformIcon} user={r23} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value5} />)((require(1305) /* metro dependency 1305: native */).Avatar) : value7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const name = value7 == value6 ? value5 : value6.name;
items2[2] = <Text variant="text-sm/medium" color="interactive-text-active">{value7 != name ? name : value7 == application ? value5 : application.name}</Text>;
items2[3] = r11;
const items3 = [<View style={styles.popoutCheckGroupName}>{items2}</View>];
items3[1] = value2.map(_fun87522);
return (
<View style={items4} key={a0}>
{items3}
</View>
);
}
function _fun87528() { // fn#87528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4269, offset: 0x01fc25f9, size: 140 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PASSPORT_ROLE_POPOUT_VIEWED = AnalyticEvents.PASSPORT_ROLE_POPOUT_VIEWED;
const object2 = {};
object2.other_user_id = userId;
object2.role_id = roleId;
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, value.collectChannelAnalyticsMetadataFromId(channelId), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), value);
Reflect.apply(track, defaultImport, [PASSPORT_ROLE_POPOUT_VIEWED, object2]);
}
function ConnectionsRoleMessageBadgeActionSheet({userId, roleId, channelId, guildId}) { // fn#87523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:3763, offset: 0x01fc1f66, size: 1622 bytes, params: 2, frame: 42
var r18;
var r16;
var r11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_18Binding;
var items4;
const Button = (ButtonNativeModule).Button;
var object;
var object2;
const guildId2 = guildId;
const styles = useStyles();
const defaultImport = UseAnalyticsLocations;
const CONNECTIONS_ROLE_POPOUT = (AnalyticsLocation).CONNECTIONS_ROLE_POPOUT;
const analyticsLocations = defaultImport(CONNECTIONS_ROLE_POPOUT).analyticsLocations;
const analyticsLocations2 = analyticsLocations;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guildId, id);
});
const guildRoleConnectionEligibility = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleConnectionEligibilityStore],
function() {
return GuildRoleConnectionEligibilityStore.getGuildRoleConnectionEligibility(roleId);
});
let binding = analyticsLocations2;
const [property, env0_9] = guildId2(binding.useState(guildRoleConnectionEligibility == null), 2);
const r19 = member == null ? undefined : member.roles.includes(roleId);
binding = analyticsLocations2;
binding.useEffect(_fun87528, [userId, roleId, channelId, guildId]);
binding.useEffect(_fun87529, [guildId, roleId, property, guildRoleConnectionEligibility]);
const r17 = guildRoleConnectionEligibility == null ? undefined : guildRoleConnectionEligibility.flat().some(function(a0) {
return a0.application_id === undefined;
});
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun87532);
const r29 = guildRoleConnectionEligibility == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jDym4E) : guildRoleConnectionEligibility.length !== 1 ? guildRoleConnectionEligibility.length === 1 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0eBj3x'],
{}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.D7uftB,
{}) : guildRoleConnectionEligibility[0].length === 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jDym4E) : guildRoleConnectionEligibility.length === 1 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0eBj3x'],
{}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.D7uftB, {});
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const view = (
<View style={styles.verifiedContainer}>
{((Component) => <Component style={styles.verifiedCheck} guildId={guild?.id ?? EMPTY_STRING_SNOWFLAKE_ID} role={value9 ?? undefined} size={24} />)(importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */)}
</View>
);
const Text = (TextModule).Text;
const view2 = (
<View style={styles.header}>
{view}
<View style={styles.headerTextContainer}>
<Text variant="text-lg/semibold" color="mobile-text-heading-primary">
{value9?.name}
</Text>
<Text variant="text-xs/normal" color="text-default">
{r29}
</Text>
</View>
</View>
);
if (guildRoleConnectionEligibility == null) {
r11 = <ActivityIndicator style={styles.loadingSpinner} size="large" />;
} else if (guildRoleConnectionEligibility.flat() != null) {
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
items4 = [
<PopoutChecks eligibilityStates={guildRoleConnectionEligibility.flat()} guildId={guildId} />,
];
if (r19) {
r18 = null;
} else {
r18 = (
<View style={styles.button}>
<Button
onPress={onPress_87533}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.T1t1WV)}
variant="primary"
grow
/>
</View>
);
}
items4[1] = r18;
if (r17) {
r16 = (
<View style={styles.button}>
<Button
onPress={onPress_87534}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hgKDnG)}
variant="secondary"
grow
/>
</View>
);
} else {
r16 = null;
}
items4[2] = r16;
r11 = (
<>
{items4}
</>
);
} else {
r11 = <ActivityIndicator style={styles.loadingSpinner} size="large" />;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet>
<View style={styles.container}>
{view2}
{r11}
</View>
</BottomSheet>
</AnalyticsLocationProvider>
);
function _fun87528() { // fn#87528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4269, offset: 0x01fc25f9, size: 140 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const PASSPORT_ROLE_POPOUT_VIEWED = AnalyticEvents.PASSPORT_ROLE_POPOUT_VIEWED;
const object = {};
object.other_user_id = userId;
object.role_id = roleId;
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.collectChannelAnalyticsMetadataFromId(channelId), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), value);
Reflect.apply(track, defaultImport, [PASSPORT_ROLE_POPOUT_VIEWED, object]);
}
function _fun87529() { // fn#87529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4472, offset: 0x01fc2685, size: 91 bytes, params: 1, frame: 13
var environment;
var value3;
var defaultImport;
if (env0_8 && guildRoleConnectionEligibility == null) {
value3 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.fetchGuildRoleConnectionsEligibility(guildId, roleId).then(_fun87530);
}
function _fun87530() { // fn#87530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4546, offset: 0x01fc26e0, size: 18 bytes, params: 1, frame: 11
return env1_9(false);
}
}
function _fun87532() { // fn#87532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4675, offset: 0x01fc2703, size: 52 bytes, params: 1, frame: 14
return guild != null ? GuildRoleStore.getRole(guild.id, roleId) : undefined;
}
function ConnectionsRoleMessageBadgeActionSheetOnPress() { // fn#87533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:5600, owner: ConnectionsRoleMessageBadgeActionSheet.onPress, offset: 0x01fc2737, size: 84 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet('ConnectionsRoleMessageBadgeActionSheet');
(GuildRoleConnectionsModalActionCreatorsModule).openGuildRoleConnectionsModal({guildId: guildId});
}
function ConnectionsRoleMessageBadgeActionSheetOnPress_87534() { // fn#87534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:5864, owner: ConnectionsRoleMessageBadgeActionSheet.onPress, offset: 0x01fc278b, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: userId, channelId: channelId,
roleId: roleId, sourceAnalyticsLocations: analyticsLocations});
}
function _fun87529() { // fn#87529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4472, offset: 0x01fc2685, size: 91 bytes, params: 1, frame: 13
var environment;
var value3;
var defaultImport;
if (env0_8 && guildRoleConnectionEligibility == null) {
value3 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.fetchGuildRoleConnectionsEligibility(guildId, roleId).then(_fun87530);
}
}
function _fun87532() { // fn#87532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4675, offset: 0x01fc2703, size: 52 bytes, params: 1, frame: 14
return guild != null ? GuildRoleStore.getRole(guild.id, roleId) : undefined;
}
function ConnectionsRoleMessageBadgeActionSheetOnPress() { // fn#87533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:5600, owner: ConnectionsRoleMessageBadgeActionSheet.onPress, offset: 0x01fc2737, size: 84 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('ConnectionsRoleMessageBadgeActionSheet');
(require(11370) /* metro dependency 11370: GuildRoleConnectionsModalActionCreators */).openGuildRoleConnectionsModal({guildId: guildId});
}
function ConnectionsRoleMessageBadgeActionSheetOnPress_87534() { // fn#87534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:5864, owner: ConnectionsRoleMessageBadgeActionSheet.onPress, offset: 0x01fc278b, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: userId, channelId: channelId,
roleId: roleId, sourceAnalyticsLocations: analyticsLocations});
}
function _fun87522({connection_type, connection_metadata_field, operator, value, description}) { // fn#87522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:3313, offset: 0x01fc1e92, size: 212 bytes, params: 2, frame: 28
(importDefault(44) /* metro dependency 44 */)(connection_metadata_field != null, 'connectionMetadataField is null');
(importDefault(44) /* metro dependency 44 */)(operator != null, 'operator is null');
(importDefault(44) /* metro dependency 44 */)(value != null, 'value is null');
return (
<PopoutCheck
connectionType={connection_type}
connectionMetadataField={connection_metadata_field}
operator={operator}
value={value}
description={description}
key={'' + connection_type + ':' + connection_metadata_field + ':' + operator + ':' + value}
/>
);
}
function _fun87530() { // fn#87530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11621:4546, offset: 0x01fc26e0, size: 18 bytes, params: 1, frame: 11
return env1_9(false);
}
global.__d(_fun87515, 11435, [57, 31, 27, 1885, 1226, 1945, 1938, 1867, 11436, 5044, 661, 33, 4501, 697, 1244, 5043,
4064, 4573, 4048, 22, 3860, 4915, 11367, 8706, 1305, 1423, 4002, 44, 6771, 6789, 566, 683, 4863, 6593, 6275,
6812, 4578, 4080, 11370, 8743,
2]) /* metro module 11435, dependencies: [57, 31, 27, 1885, 1226, 1945, 1938, 1867, 11436, 5044, 661, 33, 4501, 697, 1244, 5043, 4064, 4573, 4048, 22, 3860, 4915, 11367, 8706, 1305, 1423, 4002, 44, 6771, 6789, 566, 683, 4863, 6593, 6275, 6812, 4578, 4080, 11370, 8743, 2] */;
@@ -1,12 +1,25 @@
/* Metro module 9385; source: modules/connections/native/DomainVerifyModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 1484, 507, 6618, 4573, 1244, 8967, 9386, 4578, 5080, 5282, 5280, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import FreeFormInputGroup from '../../../design/void/Form/native/FreeFormInputGroup.tsx'; /* Metro dependency 8967 */
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 HTTPUtilsModule from '../../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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 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 NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as DomainVerifyUtilsModule from '../DomainVerifyUtils.tsx'; /* Metro dependency 9386 */
function _fun73200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:6, offset: 0x01d622a5, size: 471 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 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_6 = value.Endpoints;
const env0_7 = value.PlatformTypes;
value = require(33) /* metro dependency 33 */;
@@ -14,312 +27,439 @@ function _fun73200(global, require, importDefault, importAll, module, exports, d
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {};
const object3 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.padding = 8;
object2.marginTop = 16;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.padding = 8;
object3.marginTop = 16;
const env0_10 = Reflect.apply(createStyles, value, [{container: {padding: 16}, description: {textAlign: 'center'},
input: {'paddingHorizontal': 0, 'paddingVertical': 0, 'marginVertical': 16}, dns: object2,
input: {'paddingHorizontal': 0, 'paddingVertical': 0, 'marginVertical': 16}, dns: object3,
error: {marginTop: 16}, code: {'fontFamily': 'monospace', 'marginBottom': 4}, button: {marginTop: 16}}]);
object = {DOMAIN: 'DOMAIN', PROOF_DNS: 'PROOF_DNS', PROOF_HTTP: 'PROOF_HTTP'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/DomainVerifyModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/DomainVerifyModal.tsx');
exports.default = DomainVerifyModal;
}
function DomainScreen({onClose}) { // fn#73201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:648, offset: 0x01d6247c, size: 596 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_1 = (UseNavigationNativeModule).useNavigation();
const [property, property2] = env0_3Binding(env0_4Binding.useState(''), 2);
var [property3, env0_3] = env0_3Binding(env0_4Binding.useState(null), 2);
var [property4, env0_4] = env0_3Binding(env0_4Binding.useState(false), 2);
const onSubmitEditing2 = onSubmitEditing;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const NxPUqY = (IndexNativeModule).t.NxPUqY;
const items2 = [
<Text
variant="text-md/normal"
color="text-default"
style={styles.description}
>
{Reflect.apply(string, intl, [NxPUqY])}
</Text>,
];
const freeFormInputGroupProps = {autoFocus: true, style: styles.input,
label: intl.string((IndexNativeModule).t['4jIAa+'])};
const EXAMPLE_DOMAIN = (DomainVerifyUtilsModule).EXAMPLE_DOMAIN;
freeFormInputGroupProps.placeholder = EXAMPLE_DOMAIN;
freeFormInputGroupProps.error = property3;
freeFormInputGroupProps.returnKeyType = 'done';
freeFormInputGroupProps.onChangeText = property2;
freeFormInputGroupProps.onSubmitEditing = onSubmitEditing2;
items2[1] = <FreeFormInputGroup {...freeFormInputGroupProps} />;
const Button = (ButtonNativeModule).Button;
string = intl.string;
const PDTjLN = (IndexNativeModule).t.PDTjLN;
items2[2] = (
<Button
loading={property4}
disabled={property === ''}
text={Reflect.apply(string, intl, [PDTjLN])}
onPress={onSubmitEditing2}
/>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
);
function DomainScreenOnPress() { // fn#73202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:848, owner: DomainScreen.onPress, offset: 0x01d626d0, size: 171 bytes, params: 1, frame: 18
env0_4(true);
env0_3(null);
const HTTP = (HTTPUtilsModule).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, env0_2]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73204);
value.finally(_fun73205);
function _fun73204(a0) { // fn#73204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:969, offset: 0x01d6277b, size: 216 bytes, params: 2, frame: 16
var r0;
var value;
var binding;
var push;
var value2;
let body = a0.body;
if (body == null) {
value = environment.__proto__;
binding = env1_3;
body = a0.body;
value = undefined;
r0 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r0 = !r0 ? a0.message : r0;
binding(r0);
} else if (body.proof) {
value = environment.__proto__;
binding = env1_1;
push = binding.push;
value2 = environment.__proto__.__proto__;
Reflect.apply(push, binding, [env2_11.PROOF_DNS, {proof: a0.body.proof, domain: env1_2}]);
} else {
value = environment.__proto__;
binding = env1_3;
body = a0.body;
value = undefined;
r0 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r0 = !r0 ? a0.message : r0;
binding(r0);
}
}
function DomainScreen({onClose}) { // fn#73201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:648, offset: 0x01d6247c, size: 596 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const [property, property2] = env0_3Binding(env0_4Binding.useState(''), 2);
var [property3, env0_3] = env0_3Binding(env0_4Binding.useState(null), 2);
var [property4, env0_4] = env0_3Binding(env0_4Binding.useState(false), 2);
const closure = onSubmitEditing_73202;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const NxPUqY = (require(1244) /* metro dependency 1244: indexNative */).t.NxPUqY;
const items2 = [<Text variant="text-md/normal" color="text-default" style={styles.description}>{Reflect.apply(string,
intl, [NxPUqY])}</Text>];
const FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
const freeFormInputGroupProps = {autoFocus: true, style: styles.input,
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4jIAa+'])};
const EXAMPLE_DOMAIN = (require(9386) /* metro dependency 9386: DomainVerifyUtils */).EXAMPLE_DOMAIN;
freeFormInputGroupProps.placeholder = EXAMPLE_DOMAIN;
freeFormInputGroupProps.error = property3;
freeFormInputGroupProps.returnKeyType = 'done';
freeFormInputGroupProps.onChangeText = property2;
freeFormInputGroupProps.onSubmitEditing = closure;
items2[1] = <FreeFormInputGroup {...freeFormInputGroupProps} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items2[2] = <Button loading={property4} disabled={property === ''} text={Reflect.apply(string, intl,
[PDTjLN])} onPress={closure} />;
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
);
}
function _fun73205() { // fn#73205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:1235, offset: 0x0101b7c8, size: 18 bytes, params: 1, frame: 11
env1_4(false);
}
function DNSProofScreen({onClose, domain, proof}) { // fn#73206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:1763, offset: 0x01d62853, size: 1123 bytes, params: 2, frame: 36
const styles = useStyles();
const env0_3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const [property, env0_4] = env0_3(env0_4Binding.useState(null), 2);
const [property2, env0_5] = env0_3(env0_4Binding.useState(false), 2);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [<Text variant="text-md/normal">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.cSURbq])}</Text>];
string = intl.string;
const GL3q7k = (require(1244) /* metro dependency 1244: indexNative */).t.GL3q7k;
const items2 = [<Text variant="text-md/normal">{Reflect.apply(string, intl, [GL3q7k])}</Text>];
items2[1] = <Text variant="text-md/normal" selectable style={styles.code}>{(require(9386) /* metro dependency 9386: DomainVerifyUtils */).getDnsName(domain)}</Text>;
string = intl.string;
const Ccmixu = (require(1244) /* metro dependency 1244: indexNative */).t.Ccmixu;
items2[2] = <Text variant="text-md/normal">{Reflect.apply(string, intl, [Ccmixu])}</Text>;
items2[3] = <Text variant="text-md/normal" selectable style={styles.code}>{'TXT'}</Text>;
string = intl.string;
const PVLriT = (require(1244) /* metro dependency 1244: indexNative */).t.PVLriT;
items2[4] = <Text variant="text-md/normal">{Reflect.apply(string, intl, [PVLriT])}</Text>;
items2[5] = <Text variant="text-md/normal" selectable style={styles.code}>{proof}</Text>;
items3[1] = <View style={styles.dns}>{items2}</View>;
items3[2] = property != null && <Text variant="text-md/normal" color="text-feedback-critical" style={styles.error}>{property}</Text>;
let button = styles.button;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[3] = <View style={button}><Button loading={property2} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13ofGu'])} onPress={onPress_73207} /></View>;
button = styles.button;
string = intl.string;
const CkfdNx = (require(1244) /* metro dependency 1244: indexNative */).t.CkfdNx;
items3[4] = <View style={button}><Button variant="secondary" text={Reflect.apply(string, intl,
[CkfdNx])} onPress={onPress_73211} /></View>;
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items3}
</SafeAreaPaddingView>
);
}
}
function HTTPProofScreen({onClose, domain, proof}) { // fn#73212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3409, offset: 0x01d62e2f, size: 982 bytes, params: 2, frame: 36
const styles = useStyles();
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const [property, env0_3] = env0_3Binding(env0_4Binding.useState(null), 2);
var [property2, env0_4] = env0_3Binding(env0_4Binding.useState(false), 2);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [<Text variant="text-md/normal">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.p4ql7y])}</Text>];
string = intl.string;
const GL3q7k = (require(1244) /* metro dependency 1244: indexNative */).t.GL3q7k;
const items2 = [<Text variant="text-md/normal">{Reflect.apply(string, intl, [GL3q7k])}</Text>];
items2[1] = <Text variant="text-md/normal" selectable style={styles.code}>{(require(9386) /* metro dependency 9386: DomainVerifyUtils */).getHttpName(domain)}</Text>;
string = intl.string;
const PVLriT = (require(1244) /* metro dependency 1244: indexNative */).t.PVLriT;
items2[2] = <Text variant="text-md/normal">{Reflect.apply(string, intl, [PVLriT])}</Text>;
items2[3] = <Text variant="text-md/normal" selectable style={styles.code}>{proof}</Text>;
items3[1] = <View style={styles.dns}>{items2}</View>;
items3[2] = property != null && <Text variant="text-md/normal" color="text-feedback-critical" style={styles.error}>{property}</Text>;
let button = styles.button;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[3] = <View style={button}><Button loading={property2} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13ofGu'])} onPress={onPress_73213} /></View>;
button = styles.button;
string = intl.string;
const RhJMVQ = (require(1244) /* metro dependency 1244: indexNative */).t.RhJMVQ;
items3[4] = <View style={button}><Button variant="secondary" text={Reflect.apply(string, intl,
[RhJMVQ])} onPress={onPress_73217} /></View>;
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items3}
</SafeAreaPaddingView>
);
}
function DomainVerifyModal(a0) { // fn#73218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4940, offset: 0x01d6334a, size: 473 bytes, params: 2, frame: 24
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const closure = DomainVerifyModalOnClose;
const object5 = {};
let DOMAIN = env0_11.DOMAIN;
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object6.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(closure);
object6.render = render_73220;
object5[DOMAIN] = object6;
const PROOF_DNS = env0_11.PROOF_DNS;
const object7 = {};
object7.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object7.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(closure);
object7.render = render_73221;
object5[PROOF_DNS] = object7;
const PROOF_HTTP = env0_11.PROOF_HTTP;
const object8 = {};
object8.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object8.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(closure);
object8.render = render_73222;
object5[PROOF_HTTP] = object8;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
DOMAIN = env0_11.DOMAIN;
return (
<Navigator
screens={object5}
initialRouteName={DOMAIN}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function DomainScreenOnPress() { // fn#73202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:848, owner: DomainScreen.onPress, offset: 0x01d626d0, size: 171 bytes, params: 1, frame: 18
env0_4(true);
env0_3(null);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, env0_2]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73204);
value.finally(_fun73205);
}
function DNSProofScreen({onClose, domain, proof}) { // fn#73206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:1763, offset: 0x01d62853, size: 1123 bytes, params: 2, frame: 36
const styles = useStyles();
const env0_3 = (UseNavigationNativeModule).useNavigation();
const [property, env0_4] = env0_3(env0_4Binding.useState(null), 2);
const [property2, env0_5] = env0_3(env0_4Binding.useState(false), 2);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.cSURbq])}
</Text>,
];
string = intl.string;
const GL3q7k = (require(1244) /* metro dependency 1244: indexNative */).t.GL3q7k;
const items2 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [GL3q7k])}
</Text>,
];
items2[1] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{(require(9386) /* metro dependency 9386: DomainVerifyUtils */).getDnsName(domain)}
</Text>
);
string = intl.string;
const Ccmixu = (require(1244) /* metro dependency 1244: indexNative */).t.Ccmixu;
items2[2] = (
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [Ccmixu])}
</Text>
);
items2[3] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{'TXT'}
</Text>
);
string = intl.string;
const PVLriT = (require(1244) /* metro dependency 1244: indexNative */).t.PVLriT;
items2[4] = (
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [PVLriT])}
</Text>
);
items2[5] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{proof}
</Text>
);
items3[1] = (
<View style={styles.dns}>
{items2}
</View>
);
items3[2] = property != null && <Text variant="text-md/normal" color="text-feedback-critical" style={styles.error}>{property}</Text>;
let button = styles.button;
const Button = (ButtonNativeModule).Button;
items3[3] = (
<View style={button}>
<Button
loading={property2}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13ofGu'])}
onPress={onPress_73207}
/>
</View>
);
button = styles.button;
string = intl.string;
const CkfdNx = (require(1244) /* metro dependency 1244: indexNative */).t.CkfdNx;
items3[4] = (
<View style={button}>
<Button
variant="secondary"
text={Reflect.apply(string, intl, [CkfdNx])}
onPress={onPress_73211}
/>
</View>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items3}
</SafeAreaPaddingView>
);
function DNSProofScreenOnPress() { // fn#73207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:2907, owner: DNSProofScreen.onPress, offset: 0x01d62cb6, size: 171 bytes, params: 1, frame: 18
env0_5(true);
env0_4(null);
const HTTP = (HTTPUtilsModule).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, domain]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73209);
value.finally(_fun73210);
function _fun73209(a0) { // fn#73209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3028, offset: 0x01d62d61, size: 133 bytes, params: 2, frame: 15
let value = environment.__proto__;
const binding = env1_4;
const body = a0.body;
value = undefined;
let r1 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r1 = !r1 ? a0.message : r1;
binding(r1);
return value;
}
function DNSProofScreenOnPress() { // fn#73207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:2907, owner: DNSProofScreen.onPress, offset: 0x01d62cb6, size: 171 bytes, params: 1, frame: 18
env0_5(true);
env0_4(null);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, domain]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73209);
value.finally(_fun73210);
}
function _fun73210() { // fn#73210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3216, offset: 0x01d62de6, size: 18 bytes, params: 1, frame: 11
env1_5(false);
}
function DNSProofScreenOnPress_73211() { // fn#73211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3356, owner: DNSProofScreen.onPress, offset: 0x01d62df8, size: 55 bytes, params: 1, frame: 15
const binding = env0_3;
const push = binding.push;
const PROOF_HTTP = env1_11.PROOF_HTTP;
Reflect.apply(push, binding, [PROOF_HTTP, {proof: proof, domain: domain}]);
}
}
function HTTPProofScreenOnPress() { // fn#73213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4376, owner: HTTPProofScreen.onPress, offset: 0x01d63205, size: 171 bytes, params: 1, frame: 18
env0_4(true);
env0_3(null);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, domain]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73215);
value.finally(_fun73216);
}
function DNSProofScreenOnPress_73211() { // fn#73211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3356, owner: DNSProofScreen.onPress, offset: 0x01d62df8, size: 55 bytes, params: 1, frame: 15
const binding = env0_3;
const push = binding.push;
const PROOF_HTTP = env1_11.PROOF_HTTP;
Reflect.apply(push, binding, [PROOF_HTTP, {proof: proof, domain: domain}]);
}
function HTTPProofScreenOnPress_73217() { // fn#73217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4825, owner: HTTPProofScreen.onPress, offset: 0x01d63335, size: 21 bytes, params: 1, frame: 9
env0_2.pop();
}
function DomainVerifyModalOnClose() { // fn#73219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4983, owner: DomainVerifyModal.onClose, offset: 0x01d63523, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function DomainVerifyModalRender() { // fn#73220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5128, owner: DomainVerifyModal.render, offset: 0x01d63548, size: 35 bytes, params: 1, frame: 13
return <DomainScreen onClose={DomainVerifyModalOnClose} />;
}
function DomainVerifyModalRender_73221({domain, proof}) { // fn#73221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5293, owner: DomainVerifyModal.render, offset: 0x01d6356b, size: 60 bytes, params: 2, frame: 14
return (
<DNSProofScreen
domain={domain}
proof={proof}
onClose={DomainVerifyModalOnClose}
/>
);
}
function DomainVerifyModalRender_73222({domain, proof}) { // fn#73222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5496, owner: DomainVerifyModal.render, offset: 0x01d635a7, size: 60 bytes, params: 2, frame: 14
return (
<HTTPProofScreen
domain={domain}
proof={proof}
onClose={DomainVerifyModalOnClose}
/>
);
}
function _fun73204(a0) { // fn#73204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:969, offset: 0x01d6277b, size: 216 bytes, params: 2, frame: 16
var r0;
var value;
var binding;
var push;
var value2;
let body = a0.body;
if (body == null) {
value = environment.__proto__;
binding = env1_3;
body = a0.body;
value = undefined;
r0 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r0 = !r0 ? a0.message : r0;
binding(r0);
} else if (body.proof) {
value = environment.__proto__;
binding = env1_1;
push = binding.push;
value2 = environment.__proto__.__proto__;
Reflect.apply(push, binding, [env2_11.PROOF_DNS, {proof: a0.body.proof, domain: env1_2}]);
} else {
value = environment.__proto__;
binding = env1_3;
body = a0.body;
value = undefined;
r0 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r0 = !r0 ? a0.message : r0;
binding(r0);
}
function HTTPProofScreen({onClose, domain, proof}) { // fn#73212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3409, offset: 0x01d62e2f, size: 982 bytes, params: 2, frame: 36
const styles = useStyles();
const env0_2 = (UseNavigationNativeModule).useNavigation();
const [property, env0_3] = env0_3Binding(env0_4Binding.useState(null), 2);
var [property2, env0_4] = env0_3Binding(env0_4Binding.useState(false), 2);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.p4ql7y])}
</Text>,
];
string = intl.string;
const GL3q7k = (require(1244) /* metro dependency 1244: indexNative */).t.GL3q7k;
const items2 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [GL3q7k])}
</Text>,
];
items2[1] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{(require(9386) /* metro dependency 9386: DomainVerifyUtils */).getHttpName(domain)}
</Text>
);
string = intl.string;
const PVLriT = (require(1244) /* metro dependency 1244: indexNative */).t.PVLriT;
items2[2] = (
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [PVLriT])}
</Text>
);
items2[3] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{proof}
</Text>
);
items3[1] = (
<View style={styles.dns}>
{items2}
</View>
);
items3[2] = property != null && <Text variant="text-md/normal" color="text-feedback-critical" style={styles.error}>{property}</Text>;
let button = styles.button;
const Button = (ButtonNativeModule).Button;
items3[3] = (
<View style={button}>
<Button
loading={property2}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13ofGu'])}
onPress={onPress_73213}
/>
</View>
);
button = styles.button;
string = intl.string;
const RhJMVQ = (require(1244) /* metro dependency 1244: indexNative */).t.RhJMVQ;
items3[4] = (
<View style={button}>
<Button
variant="secondary"
text={Reflect.apply(string, intl, [RhJMVQ])}
onPress={onPress_73217}
/>
</View>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items3}
</SafeAreaPaddingView>
);
function HTTPProofScreenOnPress() { // fn#73213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4376, owner: HTTPProofScreen.onPress, offset: 0x01d63205, size: 171 bytes, params: 1, frame: 18
env0_4(true);
env0_3(null);
const HTTP = (HTTPUtilsModule).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, domain]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73215);
value.finally(_fun73216);
function _fun73215(a0) { // fn#73215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4497, offset: 0x01d632b0, size: 133 bytes, params: 2, frame: 15
let value = environment.__proto__;
const binding = env1_3;
const body = a0.body;
value = undefined;
let r1 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r1 = !r1 ? a0.message : r1;
binding(r1);
return value;
}
function _fun73216() { // fn#73216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4685, offset: 0x0101b7c8, size: 18 bytes, params: 1, frame: 11
env1_4(false);
}
}
function HTTPProofScreenOnPress_73217() { // fn#73217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4825, owner: HTTPProofScreen.onPress, offset: 0x01d63335, size: 21 bytes, params: 1, frame: 9
env0_2.pop();
}
}
function DomainVerifyModal(a0) { // fn#73218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4940, offset: 0x01d6334a, size: 473 bytes, params: 2, frame: 24
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const DomainVerifyModalOnClose2 = DomainVerifyModalOnClose;
const object = {};
let DOMAIN = env0_11.DOMAIN;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(DomainVerifyModalOnClose2);
object2.render = render_73220;
object[DOMAIN] = object2;
const PROOF_DNS = env0_11.PROOF_DNS;
const object3 = {};
object3.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(DomainVerifyModalOnClose2);
object3.render = render_73221;
object[PROOF_DNS] = object3;
const PROOF_HTTP = env0_11.PROOF_HTTP;
const object4 = {};
object4.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(DomainVerifyModalOnClose2);
object4.render = render_73222;
object[PROOF_HTTP] = object4;
const Navigator = (NavigatorNativeModule).Navigator;
DOMAIN = env0_11.DOMAIN;
return (
<Navigator
screens={object}
initialRouteName={DOMAIN}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
function DomainVerifyModalOnClose() { // fn#73219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4983, owner: DomainVerifyModal.onClose, offset: 0x01d63523, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ModalActionCreators).pop();
}
function DomainVerifyModalRender() { // fn#73220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5128, owner: DomainVerifyModal.render, offset: 0x01d63548, size: 35 bytes, params: 1, frame: 13
return <DomainScreen onClose={DomainVerifyModalOnClose} />;
}
function DomainVerifyModalRender_73221({domain, proof}) { // fn#73221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5293, owner: DomainVerifyModal.render, offset: 0x01d6356b, size: 60 bytes, params: 2, frame: 14
return (
<DNSProofScreen
domain={domain}
proof={proof}
onClose={DomainVerifyModalOnClose}
/>
);
}
function DomainVerifyModalRender_73222({domain, proof}) { // fn#73222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5496, owner: DomainVerifyModal.render, offset: 0x01d635a7, size: 60 bytes, params: 2, frame: 14
return (
<HTTPProofScreen
domain={domain}
proof={proof}
onClose={DomainVerifyModalOnClose}
/>
);
}
}
}
function _fun73209(a0) { // fn#73209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3028, offset: 0x01d62d61, size: 133 bytes, params: 2, frame: 15
let value = environment.__proto__;
const binding = env1_4;
const body = a0.body;
value = undefined;
let r1 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r1 = !r1 ? a0.message : r1;
binding(r1);
return value;
}
function _fun73210() { // fn#73210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3216, offset: 0x01d62de6, size: 18 bytes, params: 1, frame: 11
env1_5(false);
}
function _fun73215(a0) { // fn#73215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4497, offset: 0x01d632b0, size: 133 bytes, params: 2, frame: 15
let value = environment.__proto__;
const binding = env1_3;
const body = a0.body;
value = undefined;
let r1 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r1 = !r1 ? a0.message : r1;
binding(r1);
return value;
}
global.__d(_fun73200, 9385, [57, 31, 27, 661, 33, 4501, 697, 1484, 507, 6618, 4573, 1244, 8967, 9386, 4578, 5080,
5282, 5280,
2]) /* metro module 9385, dependencies: [57, 31, 27, 661, 33, 4501, 697, 1484, 507, 6618, 4573, 1244, 8967, 9386, 4578, 5080, 5282, 5280, 2] */;
@@ -1,342 +1,371 @@
/* Metro module 9387; source: modules/connections/native/FederatedSocialModal.tsx; dependencies: [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578, 5282, 5280, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Platforms from '../../../lib/Platforms.tsx'; /* Metro dependency 4915 */
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 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 ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as FederatedSocialUtilsModule from '../FederatedSocialUtils.tsx'; /* Metro dependency 9388 */
function _fun73226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:6, offset: 0x01d63694, size: 279 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).WebBrowserType;
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({container: {padding: 16},
const env0_9 = (CreateStylesModule).createStyles({container: {padding: 16},
description: {textAlign: 'center'}, input: {'paddingHorizontal': 0, 'paddingVertical': 0,
'marginVertical': 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/FederatedSocialModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/FederatedSocialModal.tsx');
exports.default = FederatedSocialModal;
}
function FederatedSocialModal(a0) { // fn#73227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:423, offset: 0x01d637ab, size: 296 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_0 = a0;
const value2 = undefined;
const value3 = (Platforms).get(a0.platformType);
const r12 = (value3 == null ? value2 : value3.name) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
const object = {};
const object2 = {};
object2.headerTitle = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ImMhq+'],
{serviceName: r12});
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(a0.onClose);
object2.render = render_73228;
object.root = object2;
const Navigator = (NavigatorNativeModule).Navigator;
return <Navigator initialRouteName="root" screens={object} />;
function FederatedSocialModalRender() { // fn#73228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:720, owner: FederatedSocialModal.render, offset: 0x01d638d3, size: 25 bytes, params: 1, frame: 11
return FederatedSocialModalScreen(env0_0);
function FederatedSocialModalScreen({location, successRedirect, platformType, onClose}) { // fn#73229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:724, owner: FederatedSocialModal.render.FederatedSocialModalScreen, offset: 0x01d638ec, size: 767 bytes, params: 2, frame: 34
var environment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = environment.__proto__.__proto__;
const styles = useStyles();
const binding = env2_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env2_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value5[0];
const env0_5 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value6[0];
const env0_6 = value6[1];
const r24 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
const value9 = _fun73230();
const exampleHandle = (FederatedSocialUtilsModule).getExampleHandle(platformType);
const value11 = (FederatedSocialUtilsModule).validateHandle(property,
platformType);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const items2 = [
<Text
variant="text-md/normal"
color="text-default"
style={styles.description}
>
{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7TByKh'],
{serviceName: r24})}
</Text>,
];
value = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
let string = intl.string;
const tZ9QFR = (require(1244) /* metro dependency 1244: indexNative */).t.tZ9QFR;
const ClearButtonVisibility = (NativeModule).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
items2[1] = ((Component) => <Component autoFocus style={styles.input} label={Reflect.apply(string, intl,
[tZ9QFR])} placeholder={exampleHandle} error={property3} returnKeyType="done" onChangeText={property2} onSubmitEditing={value9} clearButtonVisibility={WITH_CONTENT} autoCapitalize="none" autoComplete="off" autoCorrect={false} />)(value);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items2[2] = (
<Button
loading={property4}
disabled={!value11}
text={Reflect.apply(string, intl, [PDTjLN])}
onPress={value9}
/>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
);
function _fun73230() { // fn#73230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1049, offset: 0x01d63beb, size: 36 bytes, params: 1, frame: 12
const env0_0 = env3_3(_fun73232);
return _fun73233;
function* _fun73232() { // fn#73232, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1069, offset: 0x01d63c1a, size: 323 bytes, params: 1, frame: 20
var url;
var binding;
var binding2;
var property;
var value5;
var authorize;
var object;
var binding3;
var binding4;
var binding5;
var value6;
var value7;
var value8;
var body;
var value9;
var value10;
var binding6;
var value11;
var openURLExternally;
var SAFARI;
var Error;
var prototype;
var error;
var value13;
var binding7;
var binding8;
var intl;
var string;
var t;
if (false) {
return undefined;
}
value = undefined;
env2_6(true);
env2_5(null);
reducibleJoin4: while (true) {
reduciblePort50: while (true) {
exceptionLanding49: while (true) {
try {
binding = env5_1;
} catch (error) {
break exceptionLanding49;
}
break reducibleJoin4;
}
binding = env2_5;
binding7 = env5_0;
binding8 = env5_2;
intl = binding7(binding8[7]).intl;
string = intl.string;
t = binding7(binding8[7]).t;
binding(Reflect.apply(string, intl, [t['7wbPNl']]));
env2_6(false);
break reduciblePort50;
}
return value;
}
try {
binding2 = env5_2;
} catch (error) {
break exceptionLanding49;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding49;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding49;
}
try {
authorize = value5.authorize;
} catch (error) {
break exceptionLanding49;
}
try {
binding = env2_2;
} catch (error) {
break exceptionLanding49;
}
try {
object = {};
} catch (error) {
break exceptionLanding49;
}
try {
binding3 = env2_0;
} catch (error) {
break exceptionLanding49;
}
try {
object.location = binding3;
} catch (error) {
break exceptionLanding49;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding49;
}
try {
object.successRedirect = binding4;
} catch (error) {
break exceptionLanding49;
}
try {
binding5 = env2_4;
} catch (error) {
break exceptionLanding49;
}
try {
object.handle = binding5;
} catch (error) {
break exceptionLanding49;
}
try {
value6 = Reflect.apply(authorize, value5, [binding, object]);
} catch (error) {
break exceptionLanding49;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding49;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
break exceptionLanding49;
}
try {
value9 = body == null;
} catch (error) {
break exceptionLanding49;
}
reducibleJoin27: while (true) {
if (value9) {
url = value;
break reducibleJoin27;
}
try {
url = body.url;
} catch (error) {
break exceptionLanding49;
}
break reducibleJoin27;
}
try {
value10 = url == null;
} catch (error) {
break exceptionLanding49;
}
if (!value10) {
try {
binding = env5_1;
} catch (error) {
break exceptionLanding49;
}
try {
binding6 = env5_2;
} catch (error) {
break exceptionLanding49;
}
try {
property = binding6[9];
} catch (error) {
break exceptionLanding49;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding49;
}
try {
openURLExternally = value11.openURLExternally;
} catch (error) {
break exceptionLanding49;
}
try {
url = body.url;
} catch (error) {
break exceptionLanding49;
}
try {
binding = env5_6;
} catch (error) {
break exceptionLanding49;
}
try {
SAFARI = binding.SAFARI;
} catch (error) {
break exceptionLanding49;
}
try {
Reflect.apply(openURLExternally, value11, [url, SAFARI]);
} catch (error) {
break exceptionLanding49;
}
try {
binding = env2_3;
} catch (error) {
break exceptionLanding49;
}
try {
binding();
} catch (error) {
break exceptionLanding49;
}
return value;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding49;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding49;
}
try {
} catch (error) {
break exceptionLanding49;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding49;
}
try {
value13 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding49;
}
try {
throw value13;
} catch (error) {
break exceptionLanding49;
}
}
function FederatedSocialModal(a0) { // fn#73227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:423, offset: 0x01d637ab, size: 296 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_0 = a0;
const value2 = undefined;
const value3 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0.platformType);
const r12 = (value3 == null ? value2 : value3.name) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
const object3 = {};
const object4 = {};
object4.headerTitle = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ImMhq+'],
{serviceName: r12});
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(a0.onClose);
object4.render = render_73228;
object3.root = object4;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator initialRouteName="root" screens={object3} />;
}
function _fun73233() { // fn#73233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1343, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function FederatedSocialModalRender() { // fn#73228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:720, owner: FederatedSocialModal.render, offset: 0x01d638d3, size: 25 bytes, params: 1, frame: 11
return FederatedSocialModalScreen(env0_0);
}
function FederatedSocialModalScreen({location, successRedirect, platformType, onClose}) { // fn#73229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:724, owner: FederatedSocialModal.render.FederatedSocialModalScreen, offset: 0x01d638ec, size: 767 bytes, params: 2, frame: 34
var environment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = environment.__proto__.__proto__;
const styles = useStyles();
const binding = env2_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env2_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value5[0];
const env0_5 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value6[0];
const env0_6 = value6[1];
const r24 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
const value9 = _fun73230();
const exampleHandle = (require(9388) /* metro dependency 9388: FederatedSocialUtils */).getExampleHandle(platformType);
const value11 = (require(9388) /* metro dependency 9388: FederatedSocialUtils */).validateHandle(property,
platformType);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="text-md/normal" color="text-default" style={styles.description}>{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7TByKh'],
{serviceName: r24})}</Text>];
value = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
let string = intl.string;
const tZ9QFR = (require(1244) /* metro dependency 1244: indexNative */).t.tZ9QFR;
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
items2[1] = ((Component) => <Component autoFocus style={styles.input} label={Reflect.apply(string, intl,
[tZ9QFR])} placeholder={exampleHandle} error={property3} returnKeyType="done" onChangeText={property2} onSubmitEditing={value9} clearButtonVisibility={WITH_CONTENT} autoCapitalize="none" autoComplete="off" autoCorrect={false} />)(value);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items2[2] = <Button loading={property4} disabled={!value11} text={Reflect.apply(string, intl,
[PDTjLN])} onPress={value9} />;
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
);
}
function _fun73230() { // fn#73230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1049, offset: 0x01d63beb, size: 36 bytes, params: 1, frame: 12
const env0_0 = env3_3(_fun73232);
return _fun73233;
}
function* _fun73232() { // fn#73232, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1069, offset: 0x01d63c1a, size: 323 bytes, params: 1, frame: 20
var url;
var binding;
var binding2;
var property;
var value5;
var authorize;
var object2;
var binding3;
var binding4;
var binding5;
var value6;
var value7;
var value8;
var body;
var value9;
var value10;
var binding6;
var value11;
var openURLExternally;
var SAFARI;
var Error;
var prototype;
var error;
var value13;
var binding7;
var binding8;
var intl;
var string;
var t;
if (false) {
return undefined;
}
value = undefined;
env2_6(true);
env2_5(null);
reducibleJoin4: while (true) {
reduciblePort50: while (true) {
exceptionLanding49: while (true) {
try {
binding = env5_1;
} catch (error) {
break exceptionLanding49;
}
break reducibleJoin4;
}
binding = env2_5;
binding7 = env5_0;
binding8 = env5_2;
intl = binding7(binding8[7]).intl;
string = intl.string;
t = binding7(binding8[7]).t;
binding(Reflect.apply(string, intl, [t['7wbPNl']]));
env2_6(false);
break reduciblePort50;
}
return value;
}
try {
binding2 = env5_2;
} catch (error) {
break exceptionLanding49;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding49;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding49;
}
try {
authorize = value5.authorize;
} catch (error) {
break exceptionLanding49;
}
try {
binding = env2_2;
} catch (error) {
break exceptionLanding49;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding49;
}
try {
binding3 = env2_0;
} catch (error) {
break exceptionLanding49;
}
try {
object2.location = binding3;
} catch (error) {
break exceptionLanding49;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding49;
}
try {
object2.successRedirect = binding4;
} catch (error) {
break exceptionLanding49;
}
try {
binding5 = env2_4;
} catch (error) {
break exceptionLanding49;
}
try {
object2.handle = binding5;
} catch (error) {
break exceptionLanding49;
}
try {
value6 = Reflect.apply(authorize, value5, [binding, object2]);
} catch (error) {
break exceptionLanding49;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding49;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
break exceptionLanding49;
}
try {
value9 = body == null;
} catch (error) {
break exceptionLanding49;
}
reducibleJoin27: while (true) {
if (value9) {
url = value;
break reducibleJoin27;
}
try {
url = body.url;
} catch (error) {
break exceptionLanding49;
}
break reducibleJoin27;
}
try {
value10 = url == null;
} catch (error) {
break exceptionLanding49;
}
if (!value10) {
try {
binding = env5_1;
} catch (error) {
break exceptionLanding49;
}
try {
binding6 = env5_2;
} catch (error) {
break exceptionLanding49;
}
try {
property = binding6[9];
} catch (error) {
break exceptionLanding49;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding49;
}
try {
openURLExternally = value11.openURLExternally;
} catch (error) {
break exceptionLanding49;
}
try {
url = body.url;
} catch (error) {
break exceptionLanding49;
}
try {
binding = env5_6;
} catch (error) {
break exceptionLanding49;
}
try {
SAFARI = binding.SAFARI;
} catch (error) {
break exceptionLanding49;
}
try {
Reflect.apply(openURLExternally, value11, [url, SAFARI]);
} catch (error) {
break exceptionLanding49;
}
try {
binding = env2_3;
} catch (error) {
break exceptionLanding49;
}
try {
binding();
} catch (error) {
break exceptionLanding49;
}
return value;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding49;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding49;
}
try {
} catch (error) {
break exceptionLanding49;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding49;
}
try {
value13 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding49;
}
try {
throw value13;
} catch (error) {
break exceptionLanding49;
}
}
global.__d(_fun73226, 9387, [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578,
5282, 5280,
2]) /* metro module 9387, dependencies: [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578, 5282, 5280, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,51 +1,60 @@
/* Metro module 11371; source: modules/connections/native/GuildRoleConnectionsModal.tsx; dependencies: [31, 33, 1244, 5277, 8160, 11372, 5280, 2] */
import Module08160 from '../../../by-id/module-08160.js'; /* Metro dependency 8160 */
import GuildRoleConnectionsScreen from './GuildRoleConnectionsScreen.tsx'; /* Metro dependency 11372 */
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 HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
function _fun87156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:6, offset: 0x01fb17b1, size: 152 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 env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun87157);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsModal.tsx');
exports.default = value;
function _fun87157({guildId, onClose}) { // fn#87157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:168, offset: 0x01fb1849, size: 119 bytes, params: 2, frame: 16
const value2 = env0_3.useMemo(function() {
return _fun87159(guildId, onClose);
}, [guildId, onClose]);
const Navigator = (NavigatorNativeModule).Navigator;
return <Navigator screens={value2} initialRouteName="GUILD_ROLE_CONNECTIONS_SCREEN" />;
function _fun87158() { // fn#87158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:217, offset: 0x01fb18c0, size: 30 bytes, params: 1, frame: 13
return getScreens_87159(guildId, onClose);
function getScreens_87159(a0, a1) { // fn#87159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:221, offset: 0x01fb18de, size: 133 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ghtnss);
object2.headerLeft = function() {
return null;
};
object2.headerRight = headerRight_87161;
object2.render = render_87162;
return {['GUILD_ROLE_CONNECTIONS_SCREEN']: object2};
function getScreens_87159HeaderRight() { // fn#87161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:334, owner: getScreens_87159.headerRight, offset: 0x01fb1963, size: 127 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {source: Module08160, onPress: require};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
return <HeaderActionButton {...headerActionButtonProps} />;
}
function getScreens_87159Render() { // fn#87162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:459, owner: getScreens_87159.render, offset: 0x01fb19e2, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} onCloseModal={require} />)(GuildRoleConnectionsScreen);
}
}
}
}
}
function _fun87157({guildId, onClose}) { // fn#87157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:168, offset: 0x01fb1849, size: 119 bytes, params: 2, frame: 16
const value2 = env0_3.useMemo(function() {
return _fun87159(guildId, onClose);
}, [guildId, onClose]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator screens={value2} initialRouteName="GUILD_ROLE_CONNECTIONS_SCREEN" />;
}
function _fun87158() { // fn#87158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:217, offset: 0x01fb18c0, size: 30 bytes, params: 1, frame: 13
return getScreens_87159(guildId, onClose);
}
function getScreens_87159(a0, a1) { // fn#87159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:221, offset: 0x01fb18de, size: 133 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ghtnss);
object.headerLeft = function() {
return null;
};
object.headerRight = headerRight_87161;
object.render = render_87162;
return {['GUILD_ROLE_CONNECTIONS_SCREEN']: object};
}
function getScreens_87159HeaderRight() { // fn#87161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:334, owner: getScreens_87159.headerRight, offset: 0x01fb1963, size: 127 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {source: importDefault(8160) /* metro dependency 8160 */, onPress: require};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
return <HeaderActionButton {...headerActionButtonProps} />;
}
function getScreens_87159Render() { // fn#87162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11557:459, owner: getScreens_87159.render, offset: 0x01fb19e2, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} onCloseModal={require} />)(importDefault(11372) /* metro dependency 11372: GuildRoleConnectionsScreen */);
}
global.__d(_fun87156, 11371, [31, 33, 1244, 5277, 8160, 11372, 5280,
2]) /* metro module 11371, dependencies: [31, 33, 1244, 5277, 8160, 11372, 5280, 2] */;
@@ -1,4 +1,7 @@
/* Metro module 11370; source: modules/connections/native/GuildRoleConnectionsModalActionCreators.tsx; dependencies: [5080, 11371, 1962, 4080, 11363, 2] */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun87151(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:6, offset: 0x01fb15f1, size: 133 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function(a0) {
@@ -6,32 +9,34 @@ function _fun87151(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsModalActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsModalActionCreators.tsx');
exports.openGuildRoleConnectionsModal = openGuildRoleConnectionsModal;
exports.makeGuildRoleConnectionsConnectAccountsActionSheetKey = closure;
exports.openGuildRoleConnectionsConnectAccountModal = openGuildRoleConnectionsConnectAccountModal;
}
function openGuildRoleConnectionsModal({guildId, onClose}) { // fn#87153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:389, offset: 0x01fb1693, size: 117 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {guildId: guildId, onClose: onClose_87154},
'ROLE_CONNECTIONS_MODAL_KEY']);
function openGuildRoleConnectionsModalOnClose() { // fn#87154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:509, owner: openGuildRoleConnectionsModal.onClose, offset: 0x01fb1708, size: 64 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ModalActionCreators).popWithKey('ROLE_CONNECTIONS_MODAL_KEY');
if (onClose != null) {
onClose();
}
}
function openGuildRoleConnectionsModal({guildId, onClose}) { // fn#87153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:389, offset: 0x01fb1693, size: 117 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {guildId: guildId, onClose: onClose_87154},
'ROLE_CONNECTIONS_MODAL_KEY']);
}
function openGuildRoleConnectionsConnectAccountModal(a0, a1) { // fn#87155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:711, offset: 0x01fb1748, size: 105 bytes, params: 3, frame: 18
const defaultImport = importDefault(dependencyMap[3]);
defaultImport.openLazy(require(dependencyMap[2])(dependencyMap[4], dependencyMap.paths),
makeGuildRoleConnectionsConnectAccountsActionSheetKey(a0.id), {role: a0, guildId: a1});
}
function openGuildRoleConnectionsModalOnClose() { // fn#87154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:509, owner: openGuildRoleConnectionsModal.onClose, offset: 0x01fb1708, size: 64 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('ROLE_CONNECTIONS_MODAL_KEY');
if (onClose != null) {
onClose();
}
function openGuildRoleConnectionsConnectAccountModal(a0, a1) { // fn#87155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11556:711, offset: 0x01fb1748, size: 105 bytes, params: 3, frame: 18
const defaultImport = importDefault(dependencyMap[3]);
defaultImport.openLazy(require(dependencyMap[2])(dependencyMap[4], dependencyMap.paths),
makeGuildRoleConnectionsConnectAccountsActionSheetKey(a0.id), {role: a0, guildId: a1});
}
}
global.__d(_fun87151, 11370, [5080, 11371, 1962, 4080, 11363,
2]) /* metro module 11370, dependencies: [5080, 11371, 1962, 4080, 11363, 2] */;
@@ -1,19 +1,30 @@
/* Metro module 11372; source: modules/connections/native/GuildRoleConnectionsScreen.tsx; dependencies: [57, 31, 27, 1885, 1226, 1945, 1938, 661, 33, 4501, 697, 1305, 4048, 566, 683, 4863, 6593, 4080, 11373, 1962, 11363, 11370, 4915, 1423, 4002, 6766, 1244, 1948, 11369, 6812, 4573, 10881, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserRecord from '../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import HelpdeskUtils from '../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GuildActionCreators from '../../../actions/GuildActionCreators.tsx'; /* Metro dependency 6593 */
import VerifiedRoleIcon from './VerifiedRoleIcon.tsx'; /* Metro dependency 6812 */
import UserSummaryItem from '../../../components_native/common/UserSummaryItem.tsx'; /* Metro dependency 10881 */
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
function _fun87163(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:6, offset: 0x01fb1a1d, size: 731 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 */;
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.Pressable;
const env0_7 = value.ScrollView;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.AnalyticEvents;
const env0_13 = value.HelpdeskArticles;
@@ -22,293 +33,332 @@ function _fun87163(global, require, importDefault, importAll, module, exports, d
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
object2.content = {'flexDirection': 'column', 'alignItems': 'center', 'padding': 16};
object2.infoText = {marginTop: 24};
object2.verifiedRoles = {'marginTop': 24, 'flexDirection': 'column', 'width': '100%'};
const object3 = {'flexDirection': 'row', 'borderColor': null, 'borderWidth': 2, 'borderRadius': null,
object.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
object.content = {'flexDirection': 'column', 'alignItems': 'center', 'padding': 16};
object.infoText = {marginTop: 24};
object.verifiedRoles = {'marginTop': 24, 'flexDirection': 'column', 'width': '100%'};
const object4 = {'flexDirection': 'row', 'borderColor': null, 'borderWidth': 2, 'borderRadius': null,
'paddingHorizontal': 16, 'paddingVertical': 20, 'marginBottom': 16, 'width': '100%', 'alignItems': 'center',
'position': 'relative'};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.verifiedRole = object3;
const object6 = {};
object4.borderColor = BORDER_SUBTLE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.verifiedRole = object4;
const object5 = {};
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.borderColor = BACKGROUND_BASE_LOWEST;
object5.borderColor = BACKGROUND_BASE_LOWEST;
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.verifiedRoleHasRole = object6;
object5.backgroundColor = BACKGROUND_BASE_LOWEST;
object.verifiedRoleHasRole = object5;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object2.verifiedRolePressed = {borderColor: BORDER_MUTED};
object2.verifiedRoleIcon = {marginRight: 12};
object.verifiedRolePressed = {borderColor: BORDER_MUTED};
object.verifiedRoleIcon = {marginRight: 12};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.roleCheckmark = {'width': 20, 'height': 20, 'borderRadius': 10, 'backgroundColor': null,
object.roleCheckmark = {'width': 20, 'height': 20, 'borderRadius': 10, 'backgroundColor': null,
'position': 'absolute', 'right': -8, 'top': -8, backgroundColor: BACKGROUND_BRAND};
object2.verifiedRoleName = {'flex': 1, 'overflow': 'hidden', 'marginRight': 32};
object2.platformIconContainer = {flexDirection: 'row'};
object2.cutout = {marginRight: -6};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
object2 = {};
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
object.verifiedRoleName = {'flex': 1, 'overflow': 'hidden', 'marginRight': 32};
object.platformIconContainer = {flexDirection: 'row'};
object.cutout = {marginRight: -6};
const env0_16 = Reflect.apply(createStyles, value, [object]);
object = {};
const CutoutDirection = (NativeModule).CutoutDirection;
const RIGHT = CutoutDirection.RIGHT;
object2.direction = RIGHT;
object2.radius = 8;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsScreen.tsx');
object.direction = RIGHT;
object.radius = 8;
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsScreen.tsx');
exports.default = GuildRoleConnectionsScreen;
}
function GuildRoleConnectionsScreen({guildId, onCloseModal}) { // fn#87164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1312, offset: 0x01fb1cf8, size: 605 bytes, params: 2, frame: 30
const styles = useStyles();
const env0_3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guildId);
});
const env0_4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.getId();
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guildId, id);
});
const binding = env0_4;
let [property, env0_7] = env0_3(binding.useState([]), 2);
binding.useEffect(_fun87168, [guildId, property]);
binding.useEffect(_fun87170, [guildId]);
if (member == null) {
return null;
}
const value4 = sortedRoles.filter(function(a0) {
return a0.tags.guild_connections === null;
});
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['Y+TsEV'];
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const CONNECTION_DETAILS = HelpdeskArticles.CONNECTION_DETAILS;
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={styles.content}>
<TextWithIOSLinkWorkaround
style={styles.infoText}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{Reflect.apply(format, intl, [property, {helpdeskArticleUrl: Reflect.apply(getArticleURL,
defaultImport, [CONNECTION_DETAILS])}])}
</TextWithIOSLinkWorkaround>
<View style={styles.verifiedRoles}>
{value4.map(_fun87173)}
</View>
</ScrollView>
</View>
);
}
function _fun87168() { // fn#87168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1625, offset: 0x01fb1fa3, size: 136 bytes, params: 1, frame: 20
var environment;
var value2;
var defaultImport;
var track;
var PASSPORT_ENTRY_VIEWED;
var object2;
var binding;
var moduleValue;
if (env0_6.length !== 0) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
PASSPORT_ENTRY_VIEWED = AnalyticEvents.PASSPORT_ENTRY_VIEWED;
object2 = {};
binding = env0_6;
object2.role_ids = binding.map(function(a0) {
return a0.role_id;
function GuildRoleConnectionsScreen({guildId, onCloseModal}) { // fn#87164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1312, offset: 0x01fb1cf8, size: 605 bytes, params: 2, frame: 30
const styles = useStyles();
const env0_3 = (UseTheme)();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guildId);
});
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), binding);
Reflect.apply(track, defaultImport, [PASSPORT_ENTRY_VIEWED, object2]);
}
}
function _fun87170() { // fn#87170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1788, offset: 0x01fb2036, size: 64 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__;
const getGuildRoleConnectionsConfigurations = (importDefault(6593) /* metro dependency 6593: GuildActionCreators */).getGuildRoleConnectionsConfigurations;
value = Reflect.apply(getGuildRoleConnectionsConfigurations, value, [guildId]);
value.then(_fun87171);
}
function _fun87173(a0) { // fn#87173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2309, offset: 0x01fb2076, size: 513 bytes, params: 2, frame: 27
var r7;
var Icon;
const env0_0 = a0;
const roles = member.roles;
const value2 = roles.includes(a0.id);
const iconsForConnectionRole = getIconsForConnectionRole(a0.id);
const object2 = {accessibilityRole: 'button', style: style_87178, onPress: onPress_87179};
if (value2) {
var viewBindingProps = {style: styles.roleCheckmark};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
r7 = <View {...viewBindingProps}><Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} source={importDefault(11369) /* metro dependency 11369 */} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} /></View>;
} else {
r7 = null;
}
const items2 = [r7];
const VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
const stylesBinding = styles;
items2[1] = <VerifiedRoleIcon style={stylesBinding.verifiedRoleIcon} guildId={guildId} role={a0} size={24} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <Text variant="text-md/medium" color="mobile-text-heading-primary" lineClamp={1} style={stylesBinding.verifiedRoleName}>{a0.name}</Text>;
const UserSummaryItem = importDefault(10881) /* metro dependency 10881: UserSummaryItem */;
const platformIconContainer = stylesBinding.platformIconContainer;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
items2[3] = <UserSummaryItem style={platformIconContainer} users={[]} renderedUsers={iconsForConnectionRole} max={3} withNames={false} avatarSize={XSMALL} withPlusCount />;
return (
<Pressable {...object2} key={a0.id}>
{items2}
</Pressable>
);
}
function getIconsForConnectionRole(a0) { // fn#87174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2344, offset: 0x01fb2277, size: 154 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = env1_6.find(_fun87175);
if (value != null) {
var Set = global.Set;
var set = new Set();
value = value.rules.flat();
value.forEach(_fun87176);
var Array = global.Array;
value = Array.from(set);
value.forEach(_fun87177);
}
return [];
}
function style_87178({pressed}) { // fn#87178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3144, offset: 0x01fb2554, size: 77 bytes, params: 2, frame: 6
return [styles.verifiedRole, env0_1 ? styles.verifiedRoleHasRole : null,
pressed ? styles.verifiedRolePressed : null];
}
function onPress_87179() { // fn#87179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3242, offset: 0x01fb25a1, size: 167 bytes, params: 1, frame: 21
var environment;
var value2;
var defaultImport;
var openLazy;
var value3;
var moduleValue2;
const binding = env0_1;
const binding2 = env0_0;
const guildIdBinding = guildId;
if (binding) {
renderLeaveRoleActionSheet(binding2, guildIdBinding);
} else {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[17]);
openLazy = defaultImport.openLazy;
value3 = require(dependencyMap[19])(dependencyMap[20], dependencyMap.paths);
moduleValue2 = require(dependencyMap[21]);
Reflect.apply(openLazy, defaultImport, [value3,
moduleValue2.makeGuildRoleConnectionsConnectAccountsActionSheetKey(binding2.id), {role: binding2,
guildId: guildIdBinding, onCloseModal: onCloseModal}]);
}
}
function _fun87175({role_id}) { // fn#87175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2401, offset: 0x01fb2311, size: 22 bytes, params: 2, frame: 2
return role_id === env0_0;
}
function _fun87176(a0) { // fn#87176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2489, offset: 0x01fb2327, size: 65 bytes, params: 2, frame: 13
var binding;
if (a0.application_id === undefined) {
binding = env0_3;
binding.add(a0.connection_type);
} else {
binding = env0_3;
binding.add(a0.application_id);
}
}
function _fun87177(a0, a1) { // fn#87177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2594, offset: 0x01fb2368, size: 492 bytes, params: 3, frame: 25
var binding;
var property;
var push;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
var userRecord;
var value5;
var value6;
var defaultImport2;
var makeSource;
var moduleValue;
var isThemeDark;
var value7;
var isThemeDark2;
var value8;
var value;
const size = env0_3.size;
const value2 = null;
const r7 = a1 === size - 1 ? value2 : env3_17;
const isNaN = global.isNaN;
const parseInt = global.parseInt;
const value4 = undefined;
if (isNaN(parseInt(a0))) {
value5 = environment.__proto__.__proto__.__proto__;
value6 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport2.makeSource;
moduleValue = require(4002) /* metro dependency 4002: shared */;
isThemeDark = moduleValue.isThemeDark;
value7 = environment.__proto__.__proto__;
isThemeDark2 = Reflect.apply(isThemeDark, moduleValue, [env2_3]);
value8 = value2 == value6;
env0_1.push(<CutoutableAvatarImage size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} source={Reflect.apply(makeSource,
defaultImport2,
[isThemeDark2 ? value8 ? value4 : value6.icon.darkPNG : value8 ? value4 : value6.icon.lightPNG])} style={styles.cutout} cutout={r7} key={a0} />);
} else {
property = env0_2.applications[a0];
if (value4 !== (value2 == property ? value4 : property.bot)) {
binding = env0_1;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
var cutoutableAvatarImageProps = {size: (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL};
userRecord = new UserRecord();
cutoutableAvatarImageProps.user = userRecord;
userRecord = environment.__proto__.__proto__;
cutoutableAvatarImageProps.guildId = guildId;
cutoutableAvatarImageProps.style = styles.cutout;
cutoutableAvatarImageProps.cutout = r7;
Reflect.apply(push, binding, [<CutoutableAvatarImage {...cutoutableAvatarImageProps} key={a0} />]);
const env0_4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.getId();
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guildId, id);
});
const binding = env0_4;
let [property, env0_7] = env0_3(binding.useState([]), 2);
binding.useEffect(_fun87168, [guildId, property]);
binding.useEffect(_fun87170, [guildId]);
if (member == null) {
return null;
}
const value4 = sortedRoles.filter(function(a0) {
return a0.tags.guild_connections === null;
});
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['Y+TsEV'];
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const CONNECTION_DETAILS = HelpdeskArticles.CONNECTION_DETAILS;
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={styles.content}>
<TextWithIOSLinkWorkaround
style={styles.infoText}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{Reflect.apply(format, intl, [property, {helpdeskArticleUrl: Reflect.apply(getArticleURL,
defaultImport, [CONNECTION_DETAILS])}])}
</TextWithIOSLinkWorkaround>
<View style={styles.verifiedRoles}>
{value4.map(_fun87173)}
</View>
</ScrollView>
</View>
);
function _fun87168() { // fn#87168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1625, offset: 0x01fb1fa3, size: 136 bytes, params: 1, frame: 20
var environment;
var value2;
var defaultImport;
var track;
var PASSPORT_ENTRY_VIEWED;
var object;
var binding;
var moduleValue;
if (env0_6.length !== 0) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
PASSPORT_ENTRY_VIEWED = AnalyticEvents.PASSPORT_ENTRY_VIEWED;
object = {};
binding = env0_6;
object.role_ids = binding.map(function(a0) {
return a0.role_id;
});
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue.collectGuildAnalyticsMetadata(guildId), binding);
Reflect.apply(track, defaultImport, [PASSPORT_ENTRY_VIEWED, object]);
}
}
function _fun87170() { // fn#87170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1788, offset: 0x01fb2036, size: 64 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__;
const getGuildRoleConnectionsConfigurations = (GuildActionCreators).getGuildRoleConnectionsConfigurations;
value = Reflect.apply(getGuildRoleConnectionsConfigurations, value, [guildId]);
value.then(_fun87171);
function _fun87171(a0) { // fn#87171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:1849, offset: 0x00eab16a, size: 19 bytes, params: 2, frame: 11
return env1_7(a0);
}
}
function _fun87173(a0) { // fn#87173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2309, offset: 0x01fb2076, size: 513 bytes, params: 2, frame: 27
var r7;
var Icon;
const env0_0 = a0;
const roles = member.roles;
const value2 = roles.includes(a0.id);
const iconsForConnectionRole = getIconsForConnectionRole(a0.id);
const object = {accessibilityRole: 'button', style: style_87178, onPress: onPress_87179};
if (value2) {
var viewBindingProps = {style: styles.roleCheckmark};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
r7 = (
<View {...viewBindingProps}>
<Icon
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20}
source={importDefault(11369) /* metro dependency 11369 */}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE}
/>
</View>
);
} else {
r7 = null;
}
const items2 = [r7];
const stylesBinding = styles;
items2[1] = (
<VerifiedRoleIcon
style={stylesBinding.verifiedRoleIcon}
guildId={guildId}
role={a0}
size={24}
/>
);
const Text = (TextModule).Text;
items2[2] = (
<Text
variant="text-md/medium"
color="mobile-text-heading-primary"
lineClamp={1}
style={stylesBinding.verifiedRoleName}
>
{a0.name}
</Text>
);
const platformIconContainer = stylesBinding.platformIconContainer;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
items2[3] = (
<UserSummaryItem
style={platformIconContainer}
users={[]}
renderedUsers={iconsForConnectionRole}
max={3}
withNames={false}
avatarSize={XSMALL}
withPlusCount
/>
);
return (
<Pressable {...object} key={a0.id}>
{items2}
</Pressable>
);
function getIconsForConnectionRole(a0) { // fn#87174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2344, offset: 0x01fb2277, size: 154 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = env1_6.find(_fun87175);
if (value != null) {
var Set = global.Set;
var set = new Set();
value = value.rules.flat();
value.forEach(_fun87176);
var Array = global.Array;
value = Array.from(set);
value.forEach(_fun87177);
}
return [];
function _fun87175({role_id}) { // fn#87175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2401, offset: 0x01fb2311, size: 22 bytes, params: 2, frame: 2
return role_id === env0_0;
}
function _fun87176(a0) { // fn#87176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2489, offset: 0x01fb2327, size: 65 bytes, params: 2, frame: 13
var binding;
if (a0.application_id === undefined) {
binding = env0_3;
binding.add(a0.connection_type);
} else {
binding = env0_3;
binding.add(a0.application_id);
}
}
function _fun87177(a0, a1) { // fn#87177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:2594, offset: 0x01fb2368, size: 492 bytes, params: 3, frame: 25
var binding;
var property;
var push;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
var userRecord2;
var value5;
var value6;
var defaultImport2;
var makeSource;
var moduleValue;
var isThemeDark;
var value7;
var isThemeDark2;
var value8;
var value;
const size = env0_3.size;
const value2 = null;
const r7 = a1 === size - 1 ? value2 : env3_17;
const isNaN = global.isNaN;
const parseInt = global.parseInt;
const value4 = undefined;
if (isNaN(parseInt(a0))) {
value5 = environment.__proto__.__proto__.__proto__;
value6 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport2.makeSource;
moduleValue = require(4002) /* metro dependency 4002: shared */;
isThemeDark = moduleValue.isThemeDark;
value7 = environment.__proto__.__proto__;
isThemeDark2 = Reflect.apply(isThemeDark, moduleValue, [env2_3]);
value8 = value2 == value6;
env0_1.push(<CutoutableAvatarImage size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} source={Reflect.apply(makeSource,
defaultImport2,
[isThemeDark2 ? value8 ? value4 : value6.icon.darkPNG : value8 ? value4 : value6.icon.lightPNG])} style={styles.cutout} cutout={r7} key={a0} />);
} else {
property = env0_2.applications[a0];
if (value4 !== (value2 == property ? value4 : property.bot)) {
binding = env0_1;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
var cutoutableAvatarImageProps = {size: (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL};
userRecord2 = new UserRecord();
cutoutableAvatarImageProps.user = userRecord2;
userRecord2 = environment.__proto__.__proto__;
cutoutableAvatarImageProps.guildId = guildId;
cutoutableAvatarImageProps.style = styles.cutout;
cutoutableAvatarImageProps.cutout = r7;
Reflect.apply(push, binding, [<CutoutableAvatarImage {...cutoutableAvatarImageProps} key={a0} />]);
}
}
return value4;
}
}
function style_87178({pressed}) { // fn#87178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3144, offset: 0x01fb2554, size: 77 bytes, params: 2, frame: 6
return [styles.verifiedRole, env0_1 ? styles.verifiedRoleHasRole : null,
pressed ? styles.verifiedRolePressed : null];
}
function onPress_87179() { // fn#87179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3242, offset: 0x01fb25a1, size: 167 bytes, params: 1, frame: 21
var environment;
var value2;
var defaultImport;
var openLazy;
var value3;
var moduleValue2;
const binding = env0_1;
const binding2 = env0_0;
const guildIdBinding = guildId;
if (binding) {
renderLeaveRoleActionSheet(binding2, guildIdBinding);
} else {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[17]);
openLazy = defaultImport.openLazy;
value3 = require(dependencyMap[19])(dependencyMap[20], dependencyMap.paths);
moduleValue2 = require(dependencyMap[21]);
Reflect.apply(openLazy, defaultImport, [value3,
moduleValue2.makeGuildRoleConnectionsConnectAccountsActionSheetKey(binding2.id), {role: binding2,
guildId: guildIdBinding, onCloseModal: onCloseModal}]);
}
function renderLeaveRoleActionSheet(a0, a1) { // fn#87180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3248, owner: onPress_87179.renderLeaveRoleActionSheet, offset: 0x01fb2648, size: 133 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'LeaveConnectionRoleActionSheet-' + a0.id,
{onLeaveRolePressed: onLeaveRolePressed}]);
function onLeaveRolePressed() { // fn#87181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3392, owner: onPress_87179.renderLeaveRoleActionSheet.onLeaveRolePressed, offset: 0x01fb26cd, size: 77 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.unassignGuildRoleConnection(require, env0_0.id);
}
}
}
}
}
return value4;
}
function renderLeaveRoleActionSheet(a0, a1) { // fn#87180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3248, owner: onPress_87179.renderLeaveRoleActionSheet, offset: 0x01fb2648, size: 133 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'LeaveConnectionRoleActionSheet-' + a0.id,
{onLeaveRolePressed: onLeaveRolePressed}]);
}
function onLeaveRolePressed() { // fn#87181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11558:3392, owner: onPress_87179.renderLeaveRoleActionSheet.onLeaveRolePressed, offset: 0x01fb26cd, size: 77 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.unassignGuildRoleConnection(require, env0_0.id);
}
global.__d(_fun87163, 11372, [57, 31, 27, 1885, 1226, 1945, 1938, 661, 33, 4501, 697, 1305, 4048, 566, 683, 4863,
6593, 4080, 11373, 1962, 11363, 11370, 4915, 1423, 4002, 6766, 1244, 1948, 11369, 6812, 4573, 10881,
2]) /* metro module 11372, dependencies: [57, 31, 27, 1885, 1226, 1945, 1938, 661, 33, 4501, 697, 1305, 4048, 566, 683, 4863, 6593, 4080, 11373, 1962, 11363, 11370, 4915, 1423, 4002, 6766, 1244, 1948, 11369, 6812, 4573, 10881, 2] */;
@@ -1,34 +1,62 @@
/* Metro module 11373; source: modules/connections/native/LeaveConnectionRoleActionSheet.tsx; dependencies: [31, 27, 33, 4501, 6275, 4573, 1244, 4578, 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 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 BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
function _fun87182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11559:6, offset: 0x01fb271a, size: 231 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;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {padding: 12},
ReactModule;
const env0_5 = (CreateStylesModule).createStyles({container: {padding: 12},
marginTop: {marginTop: 8}, button: {'marginTop': 8, 'marginBottom': 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/LeaveConnectionRoleActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/LeaveConnectionRoleActionSheet.tsx');
exports.default = LeaveConnectionRoleActionSheet;
}
function LeaveConnectionRoleActionSheet({onLeaveRolePressed}) { // fn#87183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11559:361, offset: 0x01fb2801, size: 414 bytes, params: 2, frame: 27
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<Text variant="heading-lg/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vytvJF)}</Text>];
items2[1] = <Text style={styles.marginTop} variant="text-md/normal" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.caJwb5)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.button}><Button variant="destructive" onPress={onLeaveRolePressed} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+Oi4XF'])} grow /></View>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
function LeaveConnectionRoleActionSheet({onLeaveRolePressed}) { // fn#87183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11559:361, offset: 0x01fb2801, size: 414 bytes, params: 2, frame: 27
const styles = useStyles();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [
<Text variant="heading-lg/extrabold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vytvJF)}
</Text>,
];
items2[1] = (
<Text
style={styles.marginTop}
variant="text-md/normal"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.caJwb5)}
</Text>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={styles.button}>
<Button
variant="destructive"
onPress={onLeaveRolePressed}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+Oi4XF'])}
grow
/>
</View>
</BottomSheet>
);
);
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
}
global.__d(_fun87182, 11373, [31, 27, 33, 4501, 6275, 4573, 1244, 4578,
2]) /* metro module 11373, dependencies: [31, 27, 33, 4501, 6275, 4573, 1244, 4578, 2] */;
@@ -1,98 +1,114 @@
/* Metro module 11367; source: modules/connections/native/OfficialConnectionIcon.tsx; dependencies: [31, 27, 661, 33, 4501, 6793, 697, 673, 1305, 11368, 11369, 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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as RoleIconUtilsModule from '../../guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
function _fun87147(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11553:6, offset: 0x01fb1213, size: 247 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;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_4 = value.DEFAULT_ROLE_COLOR_HEX;
const env0_5 = value.EMPTY_STRING_SNOWFLAKE_ID;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({verifiedCheck: {'position': 'absolute',
const env0_8 = (CreateStylesModule).createStyles({verifiedCheck: {'position': 'absolute',
'left': 0, 'top': 0}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/OfficialConnectionIcon.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/OfficialConnectionIcon.tsx');
exports.default = OfficialConnectionIcon;
}
function OfficialConnectionIcon({guildId, role, roleId, roleColor, size, style, displayRoleIcon}) { // fn#87148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11553:386, offset: 0x01fb130a, size: 603 bytes, params: 2, frame: 28
var r8;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var object2;
var verifiedCheck;
var Sizes;
var CUSTOM;
var items3;
var object3;
const styles = useStyles();
const object6 = {width: size, height: size};
const roleIconUtilsModule = require(6793) /* metro dependency 6793: RoleIconUtils */;
const useRoleIcon = roleIconUtilsModule.useRoleIcon;
let r12 = roleId ?? role?.id;
r12 = r12 ?? EMPTY_STRING_SNOWFLAKE_ID;
const value3 = Reflect.apply(useRoleIcon, roleIconUtilsModule, [{guildId: guildId, roleId: r12, size: size}]);
if (displayRoleIcon === false) {
function OfficialConnectionIcon({guildId, role, roleId, roleColor, size, style, displayRoleIcon}) { // fn#87148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11553:386, offset: 0x01fb130a, size: 603 bytes, params: 2, frame: 28
var r8;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var object;
var verifiedCheck;
var Sizes;
var CUSTOM;
var items3;
var object4;
const styles = useStyles();
const object5 = {width: size, height: size};
const useRoleIcon = RoleIconUtilsModule.useRoleIcon;
let r12 = roleId ?? role?.id;
r12 = r12 ?? EMPTY_STRING_SNOWFLAKE_ID;
const value3 = Reflect.apply(useRoleIcon, RoleIconUtilsModule, [{guildId: guildId, roleId: r12, size: size}]);
if (displayRoleIcon === false) {
r8 = roleColor ?? role?.colorString;
r8 = r8 ?? DEFAULT_ROLE_COLOR_HEX;
r12 = (require(673) /* metro dependency 673: ColorUtils */).getDarkness((require(673) /* metro dependency 673: ColorUtils */).hex2int(r8)) < 0.3 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630 : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
var viewBindingProps = {style: [style, object5]};
object = {};
verifiedCheck = styles.verifiedCheck;
object.style = [verifiedCheck, object5];
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
CUSTOM = Sizes.CUSTOM;
object.size = CUSTOM;
object.source = importDefault(11368) /* metro dependency 11368 */;
object.color = r8;
items3 = [
<Icon {...object} />,
];
object4 = {};
verifiedCheck = styles.verifiedCheck;
object4.style = [verifiedCheck, object5];
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
CUSTOM = Sizes.CUSTOM;
object4.size = CUSTOM;
object4.source = importDefault(11369) /* metro dependency 11369 */;
object4.color = r12;
items3[1] = <Icon {...object4} />;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
if (value3 != null) {
return (
<View style={[style, object5]}>
{value3}
</View>
);
}
r8 = roleColor ?? role?.colorString;
r8 = r8 ?? DEFAULT_ROLE_COLOR_HEX;
r12 = (require(673) /* metro dependency 673: ColorUtils */).getDarkness((require(673) /* metro dependency 673: ColorUtils */).hex2int(r8)) < 0.3 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630 : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
var viewBindingProps = {style: [style, object6]};
object2 = {};
verifiedCheck = styles.verifiedCheck;
object2.style = [verifiedCheck, object6];
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
r12 = (require(673) /* metro dependency 673: ColorUtils */).getDarkness((require(673) /* metro dependency 673: ColorUtils */).hex2int(r8)) < 0.3 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630 : WHITE;
const items5 = [style, object5];
const items2 = [styles.verifiedCheck, object5];
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
Sizes = Icon2.Sizes;
CUSTOM = Sizes.CUSTOM;
object2.size = CUSTOM;
object2.source = importDefault(11368) /* metro dependency 11368 */;
object2.color = r8;
items3 = [<Icon {...object2} />];
object3 = {};
verifiedCheck = styles.verifiedCheck;
object3.style = [verifiedCheck, object6];
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
CUSTOM = Sizes.CUSTOM;
object3.size = CUSTOM;
object3.source = importDefault(11369) /* metro dependency 11369 */;
object3.color = r12;
items3[1] = <Icon {...object3} />;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
if (value3 != null) {
return (
<View style={[style, object6]}>
{value3}
</View>
);
}
r8 = roleColor ?? role?.colorString;
r8 = r8 ?? DEFAULT_ROLE_COLOR_HEX;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
r12 = (require(673) /* metro dependency 673: ColorUtils */).getDarkness((require(673) /* metro dependency 673: ColorUtils */).hex2int(r8)) < 0.3 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630 : WHITE;
const items5 = [style, object6];
const items2 = [styles.verifiedCheck, object6];
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
Sizes = Icon2.Sizes;
CUSTOM = Sizes.CUSTOM;
const icon = <Icon style={items2} size={CUSTOM} source={importDefault(11368) /* metro dependency 11368 */} color={r8} />;
const items4 = [styles.verifiedCheck, object6];
const Icon3 = (require(1305) /* metro dependency 1305: native */).Icon;
Sizes = Icon3.Sizes;
CUSTOM = Sizes.CUSTOM;
return (
<View style={items5}>
{icon}
const icon = (
<Icon
style={items4}
style={items2}
size={CUSTOM}
source={importDefault(11369) /* metro dependency 11369 */}
color={r12}
source={importDefault(11368) /* metro dependency 11368 */}
color={r8}
/>
</View>
);
);
const items4 = [styles.verifiedCheck, object5];
const Icon3 = (require(1305) /* metro dependency 1305: native */).Icon;
Sizes = Icon3.Sizes;
CUSTOM = Sizes.CUSTOM;
return (
<View style={items5}>
{icon}
<Icon
style={items4}
size={CUSTOM}
source={importDefault(11369) /* metro dependency 11369 */}
color={r12}
/>
</View>
);
}
}
global.__d(_fun87147, 11367, [31, 27, 661, 33, 4501, 6793, 697, 673, 1305, 11368, 11369,
2]) /* metro module 11367, dependencies: [31, 27, 661, 33, 4501, 6793, 697, 673, 1305, 11368, 11369, 2] */;
@@ -1,44 +1,54 @@
/* Metro module 6812; source: modules/connections/native/VerifiedRoleIcon.tsx; dependencies: [31, 27, 661, 33, 697, 4501, 6813, 6793, 4056, 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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as RoleIconUtilsModule from '../../guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
import * as GetHigherContrastColorModule from '../../user_profile/utils/getHigherContrastColor.tsx'; /* Metro dependency 6813 */
function _fun53578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6990:6, offset: 0x0134fe29, size: 302 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(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_3 = value.DEFAULT_ROLE_COLOR_HEX;
const env0_4 = value.EMPTY_STRING_SNOWFLAKE_ID;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const env0_7 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'alignItems': 'center', 'justifyContent': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_8 = Reflect.apply(createStyles, value, [{iconContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/VerifiedRoleIcon.tsx');
const object2 = {'alignItems': 'center', 'justifyContent': 'center'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_8 = Reflect.apply(createStyles, value, [{iconContainer: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/VerifiedRoleIcon.tsx');
exports.default = VerifiedRoleIcon;
function VerifiedRoleIcon({guildId, role, roleId, roleColor, size, style, displayRoleIcon}) { // fn#53579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6990:482, offset: 0x0134ff57, size: 366 bytes, params: 2, frame: 27
const styles = useStyles();
let r13 = roleColor ?? role?.colorString;
r13 = r13 ?? DEFAULT_ROLE_COLOR_HEX;
const higherContrastColor = (GetHigherContrastColorModule).getHigherContrastColor({backgroundColor: r13,
colors: [WHITE, PRIMARY_630]});
const value4 = size - size / 8 * 2;
const useRoleIcon = RoleIconUtilsModule.useRoleIcon;
let r4 = roleId ?? role?.id;
r4 = r4 ?? EMPTY_STRING_SNOWFLAKE_ID;
return (
<View style={[style, styles.iconContainer, {width: size, height: size, backgroundColor: r13}]}>
{
displayRoleIcon === false
? ((LinkIcon) => <LinkIcon style={{width: value4,
height: value4}} size="custom" color={higherContrastColor} />)((require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon)
: Reflect.apply(useRoleIcon, RoleIconUtilsModule, [{guildId: guildId, roleId: r4,
size: value4}]) ?? ((LinkIcon) => <LinkIcon style={{width: value4,
height: value4}} size="custom" color={higherContrastColor} />)((require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon)
}
</View>
);
}
}
function VerifiedRoleIcon({guildId, role, roleId, roleColor, size, style, displayRoleIcon}) { // fn#53579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6990:482, offset: 0x0134ff57, size: 366 bytes, params: 2, frame: 27
const styles = useStyles();
let r13 = roleColor ?? role?.colorString;
r13 = r13 ?? DEFAULT_ROLE_COLOR_HEX;
const higherContrastColor = (require(6813) /* metro dependency 6813: getHigherContrastColor */).getHigherContrastColor({backgroundColor: r13,
colors: [WHITE, PRIMARY_630]});
const value4 = size - size / 8 * 2;
const roleIconUtilsModule = require(6793) /* metro dependency 6793: RoleIconUtils */;
const useRoleIcon = roleIconUtilsModule.useRoleIcon;
let r4 = roleId ?? role?.id;
r4 = r4 ?? EMPTY_STRING_SNOWFLAKE_ID;
return (
<View style={[style, styles.iconContainer, {width: size, height: size, backgroundColor: r13}]}>
{displayRoleIcon === false ? ((LinkIcon) => <LinkIcon style={{width: value4,
height: value4}} size="custom" color={higherContrastColor} />)((require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon) : Reflect.apply(useRoleIcon,
roleIconUtilsModule, [{guildId: guildId, roleId: r4,
size: value4}]) ?? ((LinkIcon) => <LinkIcon style={{width: value4,
height: value4}} size="custom" color={higherContrastColor} />)((require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon)}
</View>
);
}
global.__d(_fun53578, 6812, [31, 27, 661, 33, 697, 4501, 6813, 6793, 4056,
2]) /* metro module 6812, dependencies: [31, 27, 661, 33, 697, 4501, 6813, 6793, 4056, 2] */;