/* Metro module 11363; source: modules/connections/native/GuildRoleConnectionsConnectAccountsActionSheet.tsx; dependencies: [5, 57, 31, 27, 1949, 1885, 1226, 5109, 1379, 5040, 1945, 3784, 5044, 661, 33, 4501, 697, 4048, 4915, 1423, 4002, 1305, 6647, 4805, 4573, 1244, 5043, 11364, 6774, 8706, 11365, 11366, 22, 3860, 11367, 44, 3857, 9836, 4594, 7972, 5042, 566, 5045, 6593, 683, 4863, 4080, 7007, 11370, 9354, 694, 5080, 10206, 1962, 8042, 11374, 6275, 6766, 11375, 6812, 4578, 2] */ import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserRecord from '../../../records/UserRecord.tsx'; /* Metro dependency 1885 */ import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */ import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */ import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */ import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import UseMountEffect from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */ import UseChannelName from '../../channel/useChannelName.tsx'; /* Metro dependency 4805 */ import Platforms from '../../../lib/Platforms.tsx'; /* Metro dependency 4915 */ import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */ import ConnectedAccountsActionCreators from '../../../actions/ConnectedAccountsActionCreators.tsx'; /* Metro dependency 5042 */ import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */ import AuthorizedAppsStore from '../../../stores/AuthorizedAppsStore.tsx'; /* Metro dependency 5109 */ import UseStartAuthorize from '../../application_account_linking/native/useStartAuthorize.tsx'; /* Metro dependency 6774 */ import Module09836 from '../../../by-id/module-09836.js'; /* Metro dependency 9836 */ 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 AvatarUtilsModule from '../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */ import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */ import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */ 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 BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */ import * as ChannelUtilsModule from '../../../utils/native/ChannelUtils.tsx'; /* Metro dependency 6647 */ import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */ import * as NativeModule2 from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */ import * as UseGetOrFetchApplicationBatchedModule from '../../applications/useGetOrFetchApplicationBatched.tsx'; /* Metro dependency 11364 */ import * as GuildRoleConnectionsModalActionCreatorsModule from './GuildRoleConnectionsModalActionCreators.tsx'; /* Metro dependency 11370 */ function _fun87054(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:6, offset: 0x01face57, size: 1590 bytes, params: 8, frame: 28 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_6 = value.ActivityIndicator; const env0_7 = value.Pressable; const env0_8 = value.View; value = require(5044) /* metro dependency 5044: Constants */; const env0_17 = value.MetadataFields; const env0_18 = value.OperatorTypes; const env0_19 = value.GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE; const env0_20 = value.GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE; value = require(661) /* metro dependency 661: Constants */; const env0_21 = value.PlatformTypes; const env0_22 = value.UserSettingsSections; const env0_23 = value.AnalyticEvents; const env0_24 = value.MarketingURLs; const env0_25 = value.FRIEND_SYNC_PLATFORM_TYPES; const env0_26 = value.ACTIVITY_PLATFORM_TYPES; const env0_27 = value.Permissions; const env0_28 = value.EMPTY_STRING_SNOWFLAKE_ID; value = require(33) /* metro dependency 33 */; const env0_29 = value.jsx; const env0_30 = value.jsxs; const env0_31 = value.Fragment; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; object.container = {padding: 12}; object.connectionsChecksGroups = {'marginTop': 16, 'flexDirection': 'column'}; const object3 = {'flexDirection': 'row', 'borderColor': null, 'borderWidth': 2, 'borderRadius': null, 'paddingHorizontal': 16, 'paddingVertical': 20, 'marginBottom': 16, 'width': '100%', 'alignItems': 'center', 'position': 'relative'}; let 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; object.connectionsChecksGroup = object3; const object4 = {}; let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST; object4.borderColor = BACKGROUND_BASE_LOWEST; BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST; object4.backgroundColor = BACKGROUND_BASE_LOWEST; object.connectionsChecksGroupPassed = object4; BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object.connectionsChecksGroupPlatformDisabled = {backgroundColor: BORDER_SUBTLE}; const object6 = {'paddingVertical': 4, 'paddingHorizontal': 12, 'borderRadius': null, 'backgroundColor': null, 'position': 'absolute', 'top': -8, 'right': 20}; object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md; const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL; object6.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL; object.connectionsChecksGroupRequirementsNotMet = object6; object.connectionsChecksGroupTextContainer = {flex: 1}; object.connectionsChecksGroupTextNameContainer = {'flexDirection': 'row', 'alignItems': 'center'}; const TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING; object.connectionsChecksGroupTextNameInfoIcon = {marginLeft: 4, tintColor: TEXT_FEEDBACK_WARNING}; const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE; object.connectionsChecksGroupCheckmark = {'tintColor': null, 'width': 24, 'height': 24, tintColor: TEXT_FEEDBACK_POSITIVE}; const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT; object.connectionsChecksGroupCaret = {'tintColor': null, 'width': 24, 'height': 24, tintColor: INTERACTIVE_TEXT_DEFAULT}; object.connectionsCheck = {marginTop: 4}; object.platformIcon = {'width': 24, 'height': 24, 'marginRight': 12}; object.channelName = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 4}; const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED; object.channelNameIcon = {'tintColor': null, 'marginRight': 8, 'width': 24, 'height': 24, tintColor: TEXT_MUTED}; object.channelNameText = {overflow: 'hidden'}; object.header = {'flexDirection': 'row', 'width': '100%', 'alignItems': 'center', 'marginBottom': 8}; object.content = {width: '100%'}; object.footerText = {marginBottom: 16}; object.accountConnectedContainer = {'flexDirection': 'column', 'alignItems': 'flex-start', 'marginVertical': 24}; object.accountConnectedPreview = {width: '100%'}; const object11 = {'marginTop': 8, 'borderRadius': null, 'borderWidth': 1}; object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs; BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object11.borderColor = BORDER_SUBTLE; object.accountConnectedPreviewConnectedUserAccount = object11; object.accountConnectedPrivacy = {'marginTop': 16, 'width': '100%'}; const object12 = {'marginTop': 8, 'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8, 'flexDirection': 'column'}; BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object12.borderColor = BORDER_SUBTLE; object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs; object.accountConnectedPrivacyOptionsContainer = object12; BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST; object.roleGranted = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'paddingVertical': 12, 'paddingHorizontal': 8, 'borderTopStartRadius': 4, 'borderTopEndRadius': 4, 'marginTop': 16, backgroundColor: BACKGROUND_BASE_LOWEST}; object.roleGrantedName = {'overflow': 'hidden', 'marginRight': 24}; object.verifiedIcon = {marginRight: 8}; const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL; object.channelsGranted = {'flexDirection': 'column', 'backgroundColor': null, 'padding': 16, 'borderBottomStartRadius': 4, 'borderBottomEndRadius': 4, 'marginBottom': 24, backgroundColor: BACKGROUND_MOD_NORMAL}; object.manageConnectionsButton = {marginTop: 8}; object.loading = {'marginTop': 24, 'marginBottom': 32, 'alignSelf': 'center'}; object.appIcon = {marginRight: 8}; object.botTag = {marginLeft: 4}; const env0_32 = Reflect.apply(createStyles, value, [object]); object = {CHECKS_REQUIRED: 0}; object[0] = 'CHECKS_REQUIRED'; object.ACCOUNT_CONNECTED = 1; object[1] = 'ACCOUNT_CONNECTED'; object.ROLE_GRANTED = 2; object[2] = 'ROLE_GRANTED'; (FileImportTrackerModule).fileFinishedImporting('modules/connections/native/GuildRoleConnectionsConnectAccountsActionSheet.tsx'); exports.default = GuildRoleConnectionsConnectAccountsActionSheet; function PlatformIcon({platformType}) { // fn#87055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:3387, offset: 0x01fad48d, size: 200 bytes, params: 2, frame: 19 const styles = useStyles(); const value2 = (UseTheme)(); const value3 = (Platforms).get(platformType); const makeSource = AvatarUtilsModule.makeSource; const isThemeLight2 = (SharedModule).isThemeLight(value2); const icon = value3.icon; const source = Reflect.apply(makeSource, AvatarUtilsModule, [isThemeLight2 ? icon.lightPNG : icon.darkPNG]); const Icon = (NativeModule).Icon; return ( ); } function ChannelName_87056({channel, style}) { // fn#87056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:3619, offset: 0x01fad555, size: 259 bytes, params: 2, frame: 22 const styles = useStyles(); const channelIcon = (ChannelUtilsModule).getChannelIcon(channel); const value3 = (UseChannelName)(channel); const items2 = [styles.channelName, style]; const r6 = ( channelIcon != null ? ((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon) : null ); const Text = (TextModule).Text; return ( {r6} {value3} ); } function ConnectionsCheck({connectionType, connectionMetadataField, operator, value, result, description}) { // fn#87057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:3945, offset: 0x01fad658, size: 761 bytes, params: 2, frame: 25 var r9; var r5; var r0; var property; var moduleValue; var object; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var format; var Math; var max; const Text = (TextModule).Text; const styles = useStyles(); if (connectionType !== GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE) { 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]); r5 = value; } else if (OperatorTypes.GREATER_THAN !== operator) { r5 = 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]); r5 = value; } if (r5 == null) { r0 = null; } else { value = 'text-feedback-critical'; value = ( {r5} ); r0 = value; } return r0; } var EQUAL = OperatorTypes.EQUAL; if (EQUAL === operator) { r9 = connectionType === PlatformTypes.PAYPAL && connectionMetadataField === MetadataFields.PAYPAL_VERIFIED ? (require(1244) /* metro dependency 1244: indexNative */).t.dcSDhW : (require(1244) /* metro dependency 1244: indexNative */).t['0BlpbA']; moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */; value = moduleValue.getConnectionsCheckText({connectionType: connectionType, connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value}); r5 = value; if (r5 == null) { r0 = null; } else { value = 'text-feedback-critical'; value = ( {r5} ); r0 = value; } return r0; } var NOT_EQUAL = OperatorTypes.NOT_EQUAL; if (NOT_EQUAL === operator) { r9 = (require(1244) /* metro dependency 1244: indexNative */).t.otcpTN; moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */; value = moduleValue.getConnectionsCheckText({connectionType: connectionType, connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value}); r5 = value; if (r5 == null) { r0 = null; } else { value = 'text-feedback-critical'; value = ( {r5} ); r0 = value; } return r0; } var LESS_THAN = OperatorTypes.LESS_THAN; if (LESS_THAN === operator) { r9 = (require(1244) /* metro dependency 1244: indexNative */).t.Ef35xs; moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */; value = moduleValue.getConnectionsCheckText({connectionType: connectionType, connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value}); r5 = value; if (r5 == null) { r0 = null; } else { value = 'text-feedback-critical'; value = ( {r5} ); r0 = value; } return r0; } var GREATER_THAN = OperatorTypes.GREATER_THAN; if (GREATER_THAN === operator) { r9 = (require(1244) /* metro dependency 1244: indexNative */).t['8W9OXU']; moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */; value = moduleValue.getConnectionsCheckText({connectionType: connectionType, connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value}); r5 = value; if (r5 == null) { r0 = null; } else { value = 'text-feedback-critical'; value = ( {r5} ); r0 = value; } return r0; } if (operator !== undefined) { if (operator !== null) { r9 = undefined; moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */; value = moduleValue.getConnectionsCheckText({connectionType: connectionType, connectionMetadataField: connectionMetadataField, operator: operator, operatorText: r9, value: value}); r5 = value; if (r5 == null) { r0 = null; } else { value = 'text-feedback-critical'; value = ( {r5} ); r0 = value; } return r0; } } } return null; } function IdentityConnectionsCheckGroup({eligibilityState, onAttempted, onIdentityAuthorize}) { // fn#87058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:4915, offset: 0x01fad951, size: 1199 bytes, params: 2, frame: 35 var r17; var r6; var r7; var value5; var value7; const Text = (TextModule).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var items2; var items4; let value = undefined; const styles = useStyles(); const useGetOrFetchApplicationBatched = UseGetOrFetchApplicationBatchedModule.useGetOrFetchApplicationBatched; const {canStartAuthorization, startAuthorization} = (UseStartAuthorize)(Reflect.apply(useGetOrFetchApplicationBatched, UseGetOrFetchApplicationBatchedModule, [eligibilityState.application_id])); let env0_5 = canStartAuthorization; const identity_connected_account_type = eligibilityState.identity_connected_account_type; const identity_auth_required_scopes = eligibilityState.identity_auth_required_scopes; if (canStartAuthorization) { r17 = canStartAuthorization; } else if (identity_connected_account_type == null) { r17 = canStartAuthorization; } else if (identity_auth_required_scopes == null) { r17 = canStartAuthorization; } else { value5 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(identity_connected_account_type); if (value5 != null && value5.enabled) { value7 = true; env0_5 = value7; r17 = value7; } else { r17 = canStartAuthorization; } } const application = eligibilityState.application; let binding = env0_5; const value8 = binding.useMemo(_fun87059, [application]); const result = eligibilityState.result; const r20 = ( value8 != null ? ((Component) => )(importDefault(8706) /* metro dependency 8706: BotTag */) : value ); if (result) { const Icon = (require(1305) /* metro dependency 1305: native */).Icon; r6 = ; } else if (r17) { const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon; r6 = ; } else { r6 = ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEts68)} ); } binding = env0_5; const useCallback = binding.useCallback; items = [result, r17, canStartAuthorization, startAuthorization, onAttempted, onIdentityAuthorize]; items[6] = eligibilityState.connection_type; items[7] = eligibilityState.application_id; items[8] = identity_connected_account_type; items[9] = identity_auth_required_scopes; const value14 = Reflect.apply(useCallback, binding, [_fun87060, items]); const officialApplicationIds = (ConnectionsUtilsModule).officialApplicationIds; const includes = officialApplicationIds.includes; let r0 = (application == null ? value : application.id) ?? ''; if (Reflect.apply(includes, officialApplicationIds, [r0])) { r0 = null; } else { var pressableProps = {accessibilityRole: 'button', style: [styles.connectionsChecksGroup, result ? styles.connectionsChecksGroupPassed : null, r17 ? null : styles.connectionsChecksGroupPlatformDisabled]}; r7 = result || !r17; pressableProps.disabled = r7; pressableProps.onPress = value14; if (value8 != null) { const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar; r7 = ( ); } else { r7 = null; } items2 = [r7]; var viewBindingProps = {style: styles.connectionsChecksGroupTextContainer}; items4 = [ {application == null ? value : application.name} {r20} , ]; items4[1] = ( r17 || result ? null : ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+z5dYe'])} ) ); items2[1] = ( {items4} ); items2[2] = r6; value = ( {items2} ); r0 = value; } return r0; function _fun87059() { // fn#87059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:5333, offset: 0x01fade00, size: 76 bytes, params: 1, frame: 12 const applicationBinding = application; const value2 = null; return value2 != (value2 == applicationBinding ? undefined : application.bot) ? new UserRecord() : value2; } function _fun87060() { // fn#87060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:5755, offset: 0x01fade4c, size: 248 bytes, params: 1, frame: 17 var r4; var connection_type; var r1; var identity_connected_account_typeBinding; var value2; var onAttemptedBinding; var application_id; if (!result) { if (canStartAuthorization) { identity_connected_account_typeBinding = identity_connected_account_type; value2 = null; r4 = value2 != identity_connected_account_typeBinding && ConnectedAccountsStore.getAccounts().some(function({type}) { return type === identity_connected_account_type; }); onAttemptedBinding = onAttempted; connection_type = r4 ? value2 : eligibilityState.connection_type; application_id = eligibilityState.application_id; r1 = value2 != application_id ? application_id : value2; onAttemptedBinding(connection_type, r1); if (canStartAuthorization) { startAuthorization({analyticsLocations: ['Verified Roles Connect Accounts Modal']}); } else { r1 = value2 != identity_connected_account_type && value2 != identity_auth_required_scopes; r1 = r1 && value2 != eligibilityState.application_id; if (r1) { onIdentityAuthorize({applicationId: eligibilityState.application_id, scopes: identity_auth_required_scopes, connectedAccountProvider: identity_connected_account_type, wasAlreadyConnected: r4}); } } } } } } function ConnectionsChecks({eligibilityStatesGroups, onPlatformAttempt, onPlatformConnect, onPlatformConnected, onPlatformIdentityAuthorize, initialAttemptedPlatformType, initialAttemptedApplicationId}) { // fn#87062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:6928, offset: 0x01fadf59, size: 585 bytes, params: 2, frame: 24 const env0_5 = useStyles(); let binding = env0_5; let useState = binding.useState; const value3 = onPlatformIdentityAuthorize(Reflect.apply(useState, binding, [{}]), 2); const env0_6 = value3[0]; const env0_7 = value3[1]; const [env0_8, env0_9] = onPlatformIdentityAuthorize(env0_5.useState(0), 2); binding = env0_5; useState = binding.useState; const value8 = onPlatformIdentityAuthorize(Reflect.apply(useState, binding, [initialAttemptedPlatformType ?? null]), 2); const property = value8[0]; const env0_11 = value8[1]; binding = env0_5; useState = binding.useState; const value10 = onPlatformIdentityAuthorize(Reflect.apply(useState, binding, [initialAttemptedApplicationId ?? null]), 2); const property2 = value10[0]; const env0_13 = value10[1]; const value11 = env0_5.useMemo(_fun87063, [eligibilityStatesGroups]); const value12 = env0_5.useMemo(_fun87064, [value11]); env0_5.useEffect(_fun87066, [value11]); env0_5.useEffect(_fun87067, [value12, property, property2, onPlatformConnected]); const useToken = UseTokenModule.useToken; const GREEN_330 = (Native).unsafe_rawColors.GREEN_330; const env0_16 = Reflect.apply(useToken, UseTokenModule, [GREEN_330]); const jsxRuntimeEnv0_31Binding = jsxRuntimeEnv0_31; const Object = global.Object; let value = Object.keys(value12); value = value.sort(_fun87070); return ( <> {value.map(_fun87073)} ); function _fun87063() { // fn#87063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7345, offset: 0x01fae1a2, size: 45 bytes, params: 1, frame: 11 let value = environment.__proto__; value = importDefault(22) /* metro dependency 22 */; return value.flatten(eligibilityStatesGroups); } function _fun87064() { // fn#87064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7388, offset: 0x01fae1cf, size: 55 bytes, params: 1, frame: 13 var environment; let value = environment.__proto__; value = importDefault(22) /* metro dependency 22 */; return value.groupBy(env0_14, function(a0) { var connection_type = a0.connection_type; var value = ''; return value + connection_type + (a0.application_id != null ? ':' + a0.application_id : value); }); } function _fun87066() { // fn#87066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7510, offset: 0x01fae256, size: 33 bytes, params: 1, frame: 11 const binding = env0_9; const Date = global.Date; return binding(Date.now()); } function _fun87067() { // fn#87067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7547, offset: 0x01fae277, size: 207 bytes, params: 1, frame: 19 var identity_connected_account_type; var r1; var application; var binding; var binding2; var value3; var property; var property2; var value5; var value6; const value2 = null; if (value2 != env0_10) { binding = env0_15; binding2 = env0_10; value3 = ''; property = binding[value3 + binding2 + (value2 != env0_12 ? ':' + env0_12 : value3)]; if (value2 != property) { if (property.every(function(a0) { return a0.result; })) { property2 = property[0]; value5 = undefined; identity_connected_account_type = value2 == property2 ? value5 : property2.identity_connected_account_type; r1 = value2 != identity_connected_account_type ? identity_connected_account_type : env0_10; value6 = property.find(_fun87069); application = value2 == value6 ? value5 : value6.application; onPlatformConnected(r1, value2 != application ? application : value2); } } } } function _fun87070(a0, a1) { // fn#87070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:7931, offset: 0x01fae351, size: 103 bytes, params: 3, frame: 15 const value2 = env0_15[a0].every(function(a0) { return a0.result; }); const value = env0_15[a1].every(function(a0) { return a0.result; }); return value2 !== true ? value2 !== false || value !== true ? 0 : -1 : value === false ? 1 : value2 !== false || value !== true ? 0 : -1; } function _fun87073(a0) { // fn#87073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:8050, offset: 0x01fae3b8, size: 1780 bytes, params: 2, frame: 42 var r13; var r14; var application; var bot; var r23; var id; var type; var r10; var r11; var r21; var r22; var r12; var name; var value4; var value5; var value6; var value9; var value10; var value11; var userRecordBinding; var userRecord2; const officialApplicationIds = (ConnectionsUtilsModule).officialApplicationIds; var includes; var value15; var binding; const Text = (TextModule).Text; var object; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const Icon = (require(1305) /* metro dependency 1305: native */).Icon; var stylesBinding; var items2; const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar; var object4; var connectionsChecksGroupTextContainer; var connectionsChecksGroupTextNameContainer; var items3; var items4; let property = env0_15[a0]; const startsWith = a0.startsWith; const value3 = ''; if (Reflect.apply(startsWith, a0, [value3 + GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE + ':'])) { if (property[0] != null) { property = property[0]; return ( ); } value4 = property.find(function(a0) { return a0.operator == null; }); value5 = property.filter(_fun87076); value6 = null; r13 = value6 == value4 || value4.result; r13 = r13 && value5.every(_fun87077); value9 = property.find(_fun87078); value10 = undefined; value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0); r14 = value6 == value11 || value11.enabled; application = value6 == value9 ? value10 : value9.application; bot = value6 == application ? value10 : application.bot; if (value6 != bot) { userRecordBinding = UserRecord; bot = application.bot; userRecord2 = new userRecordBinding(); } else { r23 = value6; } includes = officialApplicationIds.includes; id = value6 == application ? value10 : application.id; value15 = Reflect.apply(includes, officialApplicationIds, [value6 != id ? id : value3]); binding = env0_6; type = value6 == value11 ? value10 : value11.type; property = binding[value6 != type ? type : GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE]; r10 = !r13 && value6 != property; r10 = r10 && property <= env0_8; r11 = ( r13 ? ( ) : ( r10 ? ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5911Lb'])} ) : ( r14 ? ( ) : ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEts68)} ) ) ) ); type = value6 == value11 ? value10 : value11.type; r21 = type !== PlatformTypes.STEAM ? value10 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NcZh6K); r22 = ( value15 ? ((Component) => )(importDefault(11367) /* metro dependency 11367: OfficialConnectionIcon */) : ( value6 != r23 ? ((Component) => )(importDefault(8706) /* metro dependency 8706: BotTag */) : value10 ) ); object = {accessibilityRole: 'button'}; object.style = [styles.connectionsChecksGroup, r13 ? styles.connectionsChecksGroupPassed : value6, r14 ? value6 : styles.connectionsChecksGroupPlatformDisabled]; r12 = r13 || !r14; object.disabled = r12; object.onPress = onPress_87079; r12 = ( r13 ? value6 : ( r10 ? ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UB3hKo)} ) : value6 ) ); items2 = [r12]; r12 = ( value6 != value11 ? ( ) : value6 ); items2[1] = r12; r12 = ( value6 != r23 ? ( ) : value6 ); items2[2] = r12; object4 = {}; stylesBinding = styles; object4.style = stylesBinding.connectionsChecksGroupTextContainer; var viewBinding2Props = {style: stylesBinding.connectionsChecksGroupTextNameContainer}; name = value6 == value11 ? value10 : value11.name; items3 = [ {value6 != name ? name : value6 == application ? value10 : application.name} , r22, ]; items3[2] = ( value6 != r21 ? ( ) : value6 ); items4 = [ {items3} , ]; items4[1] = value5.map(_fun87081); items2[3] = ( {items4} ); } else { value4 = property.find(function(a0) { return a0.operator == null; }); value5 = property.filter(function(a0) { return a0.operator != null; }); value6 = null; r13 = value6 == value4 || value4.result; r13 = r13 && value5.every(function(a0) { return a0.result; }); value9 = property.find(function(a0) { return a0.application != null; }); value10 = undefined; value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0); r14 = value6 == value11 || value11.enabled; application = value6 == value9 ? value10 : value9.application; bot = value6 == application ? value10 : application.bot; if (value6 != bot) { userRecordBinding = UserRecord; bot = application.bot; userRecord2 = new userRecordBinding(); } else { r23 = value6; } includes = officialApplicationIds.includes; id = value6 == application ? value10 : application.id; value15 = Reflect.apply(includes, officialApplicationIds, [value6 != id ? id : value3]); binding = env0_6; type = value6 == value11 ? value10 : value11.type; property = binding[value6 != type ? type : GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE]; r10 = !r13 && value6 != property; r10 = r10 && property <= env0_8; r11 = ( r13 ? ( ) : ( r10 ? ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5911Lb'])} ) : ( r14 ? ( ) : ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEts68)} ) ) ) ); type = value6 == value11 ? value10 : value11.type; r21 = type !== PlatformTypes.STEAM ? value10 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NcZh6K); r22 = ( value15 ? ((Component) => )(importDefault(11367) /* metro dependency 11367: OfficialConnectionIcon */) : ( value6 != r23 ? ((Component) => )(importDefault(8706) /* metro dependency 8706: BotTag */) : value10 ) ); object = {accessibilityRole: 'button'}; object.style = [styles.connectionsChecksGroup, r13 ? styles.connectionsChecksGroupPassed : value6, r14 ? value6 : styles.connectionsChecksGroupPlatformDisabled]; r12 = r13 || !r14; object.disabled = r12; object.onPress = onPress_87079; r12 = ( r13 ? value6 : ( r10 ? ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UB3hKo)} ) : value6 ) ); items2 = [r12]; r12 = ( value6 != value11 ? ( ) : value6 ); items2[1] = r12; r12 = ( value6 != r23 ? ( ) : value6 ); items2[2] = r12; stylesBinding = styles; connectionsChecksGroupTextContainer = stylesBinding.connectionsChecksGroupTextContainer; connectionsChecksGroupTextNameContainer = stylesBinding.connectionsChecksGroupTextNameContainer; name = value6 == value11 ? value10 : value11.name; items4 = [ {value6 != name ? name : value6 == application ? value10 : application.name} {r22} { value6 != r21 ? ( ) : value6 } , ]; items4[1] = value5.map(_fun87081); items2[3] = ( {items4} ); } items2[4] = r11; return ( {items2} ); function onAttempted(a0, a1) { // fn#87074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:8191, offset: 0x01faeaac, size: 45 bytes, params: 3, frame: 13 env1_11(a0); env1_13(a1); if (a0 != null) { onPlatformAttempt(); } } function onPress_87079() { // fn#87079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:9440, offset: 0x01faeafb, size: 168 bytes, params: 1, frame: 18 const value2 = null; const value3 = undefined; const type = value2 == env0_1 ? value3 : env0_1.type; const r3 = value2 != type ? type : GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE; const application2 = value2 != application ? application : value2; let binding = env1_7; const object = {}; copyDataProperties(object, env1_6, undefined); const Date = global.Date; object[r3] = Date.now(); binding(object); env1_11(r3); binding = env1_13; const id = value2 == application2 ? value3 : application2.id; binding(value2 != id ? id : value2); onPlatformAttempt(); onPlatformConnect(r3, application2); return value3; } function onPress_87080() { // fn#87080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:10283, offset: 0x01faeba3, size: 111 bytes, params: 1, frame: 17 let value = environment.__proto__.__proto__; (Module00044)(env0_0 != null, 'tooltip is null'); value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */; value.open({key: 'CONNECTIONS_STEAM_TOOLTIP', icon: Module09836, content: env0_0}); } function _fun87081({connection_type, connection_metadata_field, operator, value, result, description}) { // fn#87081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:10540, offset: 0x01faec12, size: 177 bytes, params: 2, frame: 25 (Module00044)(connection_metadata_field != null, 'connectionMetadataField is null'); (Module00044)(operator != null, 'operator is null'); (Module00044)(value != null, 'value is null'); return ( ); } } } function ConnectedUserAccountOptions({account, setShowPreviewInvisibleIcon, setShowPreviewMetadata}) { // fn#87082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:10884, offset: 0x01faecc3, size: 853 bytes, params: 2, frame: 28 const FormSwitchRow = (NativeModule2).FormSwitchRow; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const styles = useStyles(); let binding = property32; let useState = binding.useState; const value4 = env0_4(Reflect.apply(useState, binding, [account.friendSync]), 2); const property = value4[0]; const env0_3 = value4[1]; binding = property32; useState = binding.useState; const value6 = env0_4(Reflect.apply(useState, binding, [account.showActivity]), 2); const property2 = value6[0]; var env0_4 = value6[1]; binding = property32; useState = binding.useState; const value8 = env0_4(Reflect.apply(useState, binding, [account.metadataVisibility === 1]), 2); const property3 = value8[0]; var property32 = property3; const env0_6 = value8[1]; binding = property32; useState = binding.useState; const value10 = env0_4(Reflect.apply(useState, binding, [account.visibility === 1]), 2); const property4 = value10[0]; const env0_8 = value10[1]; (UseMountEffect)(_fun87083); const value11 = (Platforms).get(account.type); return ( { value11.hasMetadata !== true ? undefined : ( ) } { ACTIVITY_PLATFORM_TYPES.has(account.type) ? ( ) : undefined } { FRIEND_SYNC_PLATFORM_TYPES.has(account.type) ? ( ) : undefined } ); function _fun87083() { // fn#87083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11227, offset: 0x01faf018, size: 36 bytes, params: 1, frame: 12 setShowPreviewInvisibleIcon(!env0_7); setShowPreviewMetadata(ReactModule); } function ConnectedUserAccountOptionsOnValueChange(a0) { // fn#87084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11401, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf03c, size: 69 bytes, params: 2, frame: 16 env0_3(a0); const defaultImport = ConnectedAccountsActionCreators; const setFriendSync = defaultImport.setFriendSync; const accountBinding = account; Reflect.apply(setFriendSync, defaultImport, [accountBinding.type, accountBinding.id, a0]); } function ConnectedUserAccountOptionsOnValueChange_87085(a0) { // fn#87085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11598, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf081, size: 69 bytes, params: 2, frame: 16 env0_4(a0); const defaultImport = ConnectedAccountsActionCreators; const setShowActivity = defaultImport.setShowActivity; const accountBinding = account; Reflect.apply(setShowActivity, defaultImport, [accountBinding.type, accountBinding.id, a0]); } function ConnectedUserAccountOptionsOnValueChange_87086(a0) { // fn#87086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:11780, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf0c6, size: 86 bytes, params: 2, frame: 17 setShowPreviewMetadata(a0); env0_6(a0); const defaultImport = ConnectedAccountsActionCreators; const setMetadataVisibility = defaultImport.setMetadataVisibility; const accountBinding = account; Reflect.apply(setMetadataVisibility, defaultImport, [accountBinding.type, accountBinding.id, a0 ? 1 : 0]); } function ConnectedUserAccountOptionsOnValueChange_87087(a0) { // fn#87087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:12005, owner: ConnectedUserAccountOptions.onValueChange, offset: 0x01faf11c, size: 89 bytes, params: 2, frame: 17 setShowPreviewInvisibleIcon(!a0); env0_8(a0); const defaultImport = ConnectedAccountsActionCreators; const setVisibility = defaultImport.setVisibility; const accountBinding = account; Reflect.apply(setVisibility, defaultImport, [accountBinding.type, accountBinding.id, a0 ? 1 : 0]); } } function GuildRoleConnectionsConnectAccountsActionSheet({guildId, role, initialAttemptedPlatformType, initialAttemptedApplicationId, onCloseModal}) { // fn#87088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:12352, offset: 0x01faf175, size: 1745 bytes, params: 2, frame: 33 var r9; const Text = (TextModule).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const handleManageConnections = function() { GuildRoleConnectionsConnectAccountsActionSheetHandleClose(true); require(dependencyMap[47]).openUserSettings({screen: UserSettingsSections.CONNECTIONS}); }; const handleManageAuthorizedApplications = function() { GuildRoleConnectionsConnectAccountsActionSheetHandleClose(true); require(dependencyMap[47]).openUserSettings({screen: UserSettingsSections.AUTHORIZED_APPS}); }; const styles = useStyles(); const styles2 = styles; const binding = styles2; const useState = binding.useState; const binding2 = env0_33; let CHECKS_REQUIRED = binding2.CHECKS_REQUIRED; const value4 = onCloseModal(Reflect.apply(useState, binding, [CHECKS_REQUIRED]), 2); const property = value4[0]; const env0_7 = value4[1]; const [env0_8, env0_9] = onCloseModal(styles2.useState(null), 2); const [env0_10, env0_11] = onCloseModal(styles2.useState(false), 2); const [env0_12, env0_13] = onCloseModal(styles2.useState(true), 2); const [property2, env0_15] = onCloseModal(styles2.useState(false), 2); const [env0_16, env0_17] = onCloseModal(styles2.useState(true), 2); const [env0_18, env0_19] = onCloseModal(styles2.useState(false), 2); const accounts = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectedAccountsStore], function() { return ConnectedAccountsStore.getAccounts(); }); const newestTokens = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore], function() { return AuthorizedAppsStore.getNewestTokens(); }); const env0_21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() { return AuthenticationStore.getId(); }); const [property3, env0_23] = onCloseModal(styles2.useState(null), 2); const [property4, env0_25] = onCloseModal(styles2.useState(null), 2); const [env0_26, env0_27] = onCloseModal(styles2.useState(function() { var initialAttemptedPlatformTypeBinding = initialAttemptedPlatformType; var value2 = null; return value2 != initialAttemptedPlatformTypeBinding ? {platformType: initialAttemptedPlatformType, applicationId: value2 != initialAttemptedApplicationId ? initialAttemptedApplicationId : value2} : value2; }), 2); const [env0_28, env0_29] = onCloseModal(styles2.useState(null), 2); const env0_30 = (UseTheme)(); const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() { return GuildMemberStore.getMember(guildId, id); }); const mutableGuildChannelsForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getMutableGuildChannelsForGuild(guildId); }); const env0_32 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() { return LocaleStore.locale; }); const Object = global.Object; const value27 = Object.values(mutableGuildChannelsForGuild).filter(_fun87113); var env0_33 = value27; styles2.useEffect(_fun87114, [guildId, role.id, accounts, newestTokens]); styles2.useEffect(_fun87119, [initialAttemptedPlatformType, role.id, guildId]); styles2.useEffect(_fun87120, [property2, value27.length, member, guildId, role.id]); const BottomSheet = (BottomSheetNativeModule).BottomSheet; CHECKS_REQUIRED = binding2.CHECKS_REQUIRED; if (CHECKS_REQUIRED === property) { r9 = ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zOZh3R)} ); } else if (env0_33.ACCOUNT_CONNECTED === property) { (importDefault(44) /* metro dependency 44 */)(property3 != null, 'lastPlatformConnected is null'); r9 = ( {intl.format((require(1244) /* metro dependency 1244: indexNative */).t.yQvgBO, {platformName: (importDefault(4915) /* metro dependency 4915: Platforms */).get(property3)?.name ?? property4?.name})} ); } else { r9 = ( env0_33.ROLE_GRANTED !== property ? null : ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.najNdz)} ) ); } return ( {[r9, GuildRoleConnectionsConnectAccountsActionSheetRenderContent(), renderFooter()]} ); function GuildRoleConnectionsConnectAccountsActionSheetHandleClose() { // fn#87089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13569, owner: GuildRoleConnectionsConnectAccountsActionSheet.handleClose, offset: 0x01faf846, size: 69 bytes, params: 1, frame: 12 true !== undefined; if (onCloseModal != null) { onCloseModal(); } const value = environment.__proto__; (ActionSheetActionCreators).hideActionSheet(); } function _handleAssignRole() { // fn#87092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13858, owner: GuildRoleConnectionsConnectAccountsActionSheet._handleAssignRole, offset: 0x01faf915, size: 53 bytes, params: 1, frame: 13 var environment; const value = environment.__proto__; return env1_3(_fun87094).apply(this, arguments); function* _fun87094() { // fn#87094, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13915, offset: 0x01faf955, size: 90 bytes, params: 1, frame: 15 if (true) { value = environment.__proto__.__proto__; GuildMemberStore(true); var value4 = env3_1(env3_2[43]); yield value4.assignGuildRoleConnection(require, importDefault.id); } } } function reopenSelf(a0, a1) { // fn#87095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14009, owner: GuildRoleConnectionsConnectAccountsActionSheet.reopenSelf, offset: 0x01faf9af, size: 179 bytes, params: 3, frame: 22 const value = a1; const value2 = a2; const r7 = value2 !== undefined ? value2 : {}; const defaultImport = ActionSheetActionCreators; const openLazy = defaultImport.openLazy; const Promise = global.Promise; const value4 = Promise.resolve({default: GuildRoleConnectionsConnectAccountsActionSheet}); const makeGuildRoleConnectionsConnectAccountsActionSheetKey = GuildRoleConnectionsModalActionCreatorsModule.makeGuildRoleConnectionsConnectAccountsActionSheetKey; const roleBinding = role; const guildRoleConnectionsConnectAccountsActionSheetKey = Reflect.apply(makeGuildRoleConnectionsConnectAccountsActionSheetKey, GuildRoleConnectionsModalActionCreatorsModule, [roleBinding.id]); const value6 = null; Reflect.apply(openLazy, defaultImport, [value4, guildRoleConnectionsConnectAccountsActionSheetKey, {role: roleBinding, guildId: guildId, initialAttemptedPlatformType: a0, initialAttemptedApplicationId: value6 != a0 ? value : value6, overrideUrl: r7.overrideUrl, onCloseModal: onCloseModal}]); } function handlePlatformAttempt() { // fn#87096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14337, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformAttempt, offset: 0x01fafa62, size: 105 bytes, params: 1, frame: 18 let value = environment.__proto__; const defaultImport = importDefault(dependencyMap[44]); const track = defaultImport.track; const PASSPORT_CHALLENGE_STARTED = AnalyticEvents.PASSPORT_CHALLENGE_STARTED; const object = {}; object.role_id = role.id; value = require(dependencyMap[45]); copyDataProperties(object, value.collectGuildAnalyticsMetadata(guildId), dependencyMap); Reflect.apply(track, defaultImport, [PASSPORT_CHALLENGE_STARTED, object]); } function handlePlatformConnect(a0, a1) { // fn#87097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14475, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformConnect, offset: 0x01fafacb, size: 99 bytes, params: 3, frame: 14 var environment; const env0_0 = a0; const env0_1 = a1; let value = environment.__proto__; value = undefined; (importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: a0, location: 'Verified Roles Connect Accounts Modal', onClose: onClose_87098, overrideUrl: a1 == null ? value : a1.role_connections_verification_url}); return value; function handlePlatformConnectOnClose() { // fn#87098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14593, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformConnect.onClose, offset: 0x01fafb2e, size: 91 bytes, params: 1, frame: 18 const reopenSelfBinding = reopenSelf; const binding = env0_0; const value2 = null; const value3 = undefined; const id = value2 == require ? value3 : require.id; reopenSelfBinding(binding, value2 != id ? id : value2, {overrideUrl: value2 == require ? value3 : require.role_connections_verification_url}); return value3; } } function handlePlatformIdentityAuthorize({applicationId, scopes, connectedAccountProvider, wasAlreadyConnected}) { // fn#87099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14786, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformIdentityAuthorize, offset: 0x01fafb89, size: 271 bytes, params: 2, frame: 23 var environment; let value = environment.__proto__; importDefault(dependencyMap[46]).hideActionSheet(); const value2 = 'OAuth2AuthorizeModal-' + applicationId; const defaultImport2 = importDefault(dependencyMap[50]); defaultImport2.subscribe('MODAL_POP', handlePlatformIdentityAuthorizeHandleModalClose); const defaultImport3 = importDefault(dependencyMap[51]); const pushLazy = defaultImport3.pushLazy; value = require(dependencyMap[53]); value = value(dependencyMap[52], dependencyMap.paths); const object = {clientId: applicationId, scopes: scopes}; const ApplicationIntegrationType = require(dependencyMap[54]).ApplicationIntegrationType; const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL; object.integrationType = USER_INSTALL; object.connectedAccountProvider = connectedAccountProvider; object.callback = function() { }; object.dismissOAuthModal = dismissOAuthModal_87102; Reflect.apply(pushLazy, defaultImport3, [value, object, value2]); function handlePlatformIdentityAuthorizeHandleModalClose({key}) { // fn#87100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:14997, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformIdentityAuthorize.handleModalClose, offset: 0x01fafc98, size: 100 bytes, params: 2, frame: 16 var value2; var defaultImport; var value3; if (key === env0_2) { value2 = environment.__proto__.__proto__; defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */; defaultImport.unsubscribe('MODAL_POP', handlePlatformIdentityAuthorizeHandleModalClose); value3 = environment.__proto__; reopenSelf(wasAlreadyConnected ? null : GUILD_ROLE_CONNECTION_APPLICATION_IDENTITY_CONNECTION_TYPE, applicationId); } } function handlePlatformIdentityAuthorizeDismissOAuthModal() { // fn#87102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15305, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformIdentityAuthorize.dismissOAuthModal, offset: 0x01fafcfc, size: 45 bytes, params: 1, frame: 11 const value = environment.__proto__.__proto__; return (ModalActionCreators).popWithKey(env0_2); } } function handlePlatformConnected(a0, a1) { // fn#87103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15336, owner: GuildRoleConnectionsConnectAccountsActionSheet.handlePlatformConnected, offset: 0x01fafd29, size: 135 bytes, params: 3, frame: 15 var value; env0_23(a0); env0_25(a1); const binding = env0_7; const ACCOUNT_CONNECTED = env1_33.ACCOUNT_CONNECTED; binding(ACCOUNT_CONNECTED); env0_27(null); if (a1 != null) { value = require(11374) /* metro dependency 11374: ConnectionsRoleActionCreators */; value = value.fetchUserApplicationRoleConnections(); value = value.then(_fun87104); value.catch(function() { }); } function _fun87104(a0) { // fn#87104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15480, offset: 0x01fafdb0, size: 19 bytes, params: 2, frame: 11 env1_29(a0); } } function _fun87113(a0) { // fn#87113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:13489, offset: 0x01fafe7d, size: 110 bytes, params: 2, frame: 15 let value = environment.__proto__; const permissionStoreBinding = PermissionStore; const can = permissionStoreBinding.can; const VIEW_CHANNEL = Permissions.VIEW_CHANNEL; let r0 = Reflect.apply(can, permissionStoreBinding, [VIEW_CHANNEL, a0]) && PermissionStore.can(Permissions.SEND_MESSAGES, a0); if (r0) { value = (importDefault(5045) /* metro dependency 5045: getConnectionsRoles */)(a0); value = value.includes(role); r0 = value; } return r0; } function _fun87114() { // fn#87114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15529, offset: 0x01fafeeb, size: 74 bytes, params: 1, frame: 14 var environment; let value = environment.__proto__; value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).fetchGuildRoleConnectionsEligibility, value, [guildId, role.id]); value.then(_fun87115); function _fun87115(a0) { // fn#87115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15594, offset: 0x01faff35, size: 53 bytes, params: 2, frame: 13 env1_9(a0); env1_11(((a0) => a0.some(_fun87117))(a0)); env1_13(false); function checkEligibility(a0) { // fn#87116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15605, offset: 0x01faff6a, size: 25 bytes, params: 2, frame: 11 return a0.some(function(a0) { return a0.every(_fun87118); }); function _fun87117(a0) { // fn#87117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15649, offset: 0x01faff83, size: 25 bytes, params: 2, frame: 11 return a0.every(function(a0) { return a0.result; }); } } } } function _fun87119() { // fn#87119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15722, offset: 0x01faff9c, size: 117 bytes, params: 1, frame: 18 var value2; var defaultImport; var track; var PASSPORT_CHALLENGE_VIEWED; var object; var moduleValue; if (initialAttemptedPlatformType == null) { value2 = environment.__proto__; defaultImport = importDefault(dependencyMap[44]); track = defaultImport.track; PASSPORT_CHALLENGE_VIEWED = AnalyticEvents.PASSPORT_CHALLENGE_VIEWED; object = {}; object.role_id = role.id; moduleValue = require(dependencyMap[45]); copyDataProperties(object, moduleValue.collectGuildAnalyticsMetadata(guildId), dependencyMap); Reflect.apply(track, defaultImport, [PASSPORT_CHALLENGE_VIEWED, object]); } } function _fun87120() { // fn#87120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:15867, offset: 0x01fb0011, size: 245 bytes, params: 1, frame: 18 var value4; var value5; var value6; var defaultImport2; var track; var PASSPORT_CHALLENGE_FINISHED; var object; var moduleValue; let binding = env0_14; if (binding && member != null && member.roles.includes(role.id)) { env0_15(false); if (env0_33.length > 0) { binding = env0_7; value5 = environment.__proto__; binding(env1_33.ROLE_GRANTED); } else { value4 = environment.__proto__; importDefault(dependencyMap[46]).hideActionSheet(); } value6 = environment.__proto__; defaultImport2 = importDefault(dependencyMap[44]); track = defaultImport2.track; PASSPORT_CHALLENGE_FINISHED = AnalyticEvents.PASSPORT_CHALLENGE_FINISHED; object = {}; object.role_id = role.id; moduleValue = require(dependencyMap[45]); copyDataProperties(object, moduleValue.collectGuildAnalyticsMetadata(guildId), dependencyMap); Reflect.apply(track, defaultImport2, [PASSPORT_CHALLENGE_FINISHED, object]); } } function GuildRoleConnectionsConnectAccountsActionSheetRenderContent() { // fn#87121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:16839, owner: GuildRoleConnectionsConnectAccountsActionSheet.renderContent, offset: 0x01fb0106, size: 2070 bytes, params: 1, frame: 41 var r22; var r14; var r9; var r10; var r15; var platformType; var applicationId; var r0; var object; var stylesBinding; var VerifiedRoleIcon; var guildIdBinding; var verifiedIcon; var roleBinding; const Text = (TextModule).Text; var value5; var defaultImport2; var value6; var value7; var jsxRuntimeEnv1_31Binding; var jsxRuntimeEnv1_31Binding2; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; var items4; var items6; var items8; const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround; var format; var value18; var value24; var items9; var handlePlatformAttemptBinding; var handlePlatformConnectBinding; var handlePlatformConnectedBinding; var handlePlatformIdentityAuthorizeBinding; const binding = env0_6; const CHECKS_REQUIRED = env1_33.CHECKS_REQUIRED; if (CHECKS_REQUIRED === binding) { value18 = null; r10 = value18 != env0_8 && env0_8.length > 1; r15 = value18 != env0_8 && env0_8.length === 1; r15 = r15 && env0_8[0].length === 1; if (env0_12) { r0 = ; } else if (value18 == env0_8) { r0 = ; } else { var viewBindingProps = {style: styles.content}; value24 = undefined; format = intl.format; r10 = r15 ? t.jHfRvZ : r10 ? t['mOQ8k+'] : t.U0olLg; items9 = [ {Reflect.apply(format, intl, [r10, {roleName: role.name}])} , ]; handlePlatformAttemptBinding = handlePlatformAttempt; handlePlatformConnectBinding = handlePlatformConnect; handlePlatformConnectedBinding = handlePlatformConnected; handlePlatformIdentityAuthorizeBinding = handlePlatformIdentityAuthorize; platformType = value18 == env0_26 ? value24 : env0_26.platformType; r15 = value18 != platformType ? platformType : value18; applicationId = value18 == env0_26 ? value24 : env0_26.applicationId; items9[1] = ( ); format = intl.format; items9[2] = ( {Reflect.apply(format, intl, [t.gsgvxh, {privacyPolicyUrl: MarketingURLs.PRIVACY, onAuthorizedApplicationsClick: handleManageAuthorizedApplications, onConnectionsClick: handleManageConnections}])} ); r0 = ( {items9} ); } return r0; } const ACCOUNT_CONNECTED = env1_33.ACCOUNT_CONNECTED; if (ACCOUNT_CONNECTED === binding) { value5 = undefined; defaultImport2 = importDefault(44) /* metro dependency 44 */; value6 = null; defaultImport2(value6 != env0_22, 'lastPlatformConnected is null'); value7 = accounts.find(_fun87122); r22 = value6 == env0_28 ? value5 : env0_28.find(_fun87123); object = {}; stylesBinding = styles; object.style = stylesBinding.content; var viewBinding4Props = {style: stylesBinding.accountConnectedContainer}; if (value6 != value7) { jsxRuntimeEnv1_31Binding = jsxRuntimeEnv1_31; if (value6 != value7) { jsxRuntimeEnv1_31Binding2 = jsxRuntimeEnv1_31; stylesBinding = styles; string = intl.string; items4 = [ {Reflect.apply(string, intl, [t.TOjkEg])} {((ConnectedUserAccount) => )((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedUserAccount)} , ]; string = intl.string; items4[1] = ( {Reflect.apply(string, intl, [t.jndPhX])} ); r14 = ( <> {items4} ); } else { r14 = value6; } items6 = [r14]; items6[1] = ( value6 != r22 ? ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TOjkEg)} {((ConnectedApplicationUserRoleAccount) => )((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedApplicationUserRoleAccount)} ) : value6 ); r9 = ( <> {items6} ); } else if (value6 == r22) { r9 = ; } else { jsxRuntimeEnv1_31Binding = jsxRuntimeEnv1_31; if (value6 != value7) { jsxRuntimeEnv1_31Binding2 = jsxRuntimeEnv1_31; stylesBinding = styles; string = intl.string; items4 = [ {Reflect.apply(string, intl, [t.TOjkEg])} {((ConnectedUserAccount) => )((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedUserAccount)} , ]; string = intl.string; items4[1] = ( {Reflect.apply(string, intl, [t.jndPhX])} ); r14 = ( <> {items4} ); } else { r14 = value6; } items6 = [r14]; items6[1] = ( value6 != r22 ? ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TOjkEg)} {((ConnectedApplicationUserRoleAccount) => )((require(11375) /* metro dependency 11375: LegacyUserProfileConnections */).ConnectedApplicationUserRoleAccount)} ) : value6 ); r9 = ( <> {items6} ); } items8 = [ {r9} , ]; items8[1] = ( {intl.format(t.gsgvxh, {privacyPolicyUrl: MarketingURLs.PRIVACY, onAuthorizedApplicationsClick: handleManageAuthorizedApplications, onConnectionsClick: handleManageConnections})} ); return ( {items8} ); } const ROLE_GRANTED = env1_33.ROLE_GRANTED; if (ROLE_GRANTED === binding) { object = {}; stylesBinding = styles; object.style = stylesBinding.content; var viewBinding2Props = {style: stylesBinding.roleGranted}; VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */; guildIdBinding = guildId; verifiedIcon = stylesBinding.verifiedIcon; roleBinding = role; return ( {roleBinding.name} {env0_33.map(_fun87124)} ); } return null; function _fun87122({type}) { // fn#87122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:18052, offset: 0x01fb091c, size: 21 bytes, params: 2, frame: 2 return env1_22 === type; } function _fun87123({application}) { // fn#87123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:18100, offset: 0x01fb0931, size: 46 bytes, params: 2, frame: 4 return application.id === env1_24?.id; } function _fun87124(a0) { // fn#87124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:19849, offset: 0x01fb095f, size: 36 bytes, params: 2, frame: 15 return ; } } function renderFooter() { // fn#87125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11549:19915, owner: GuildRoleConnectionsConnectAccountsActionSheet.renderFooter, offset: 0x01fb0983, size: 669 bytes, params: 1, frame: 30 var r8; var r5; var object2; const Button = (ButtonNativeModule).Button; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const binding = env0_6; const CHECKS_REQUIRED = env1_33.CHECKS_REQUIRED; if (CHECKS_REQUIRED === binding) { r5 = env0_12 || !env0_10; r5 = !r5 ? env0_14 : r5; return (