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

No files matched your search

@@ -1,41 +1,47 @@
/* Metro module 12687; source: modules/guild_action_sheet/native/GuildActionSheetUtils.tsx; dependencies: [3784, 661, 566, 2] */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun97230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12877:6, offset: 0x0217804f, size: 136 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/GuildActionSheetUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/GuildActionSheetUtils.tsx');
exports.useGuildActionSheetPermissions = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStoresObject([PermissionStore], _fun97232, [a0]);
};
}
function useGuildActionSheetPermissions(a0) { // fn#97231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12877:254, offset: 0x021780d7, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([PermissionStore], _fun97232, [a0]);
function _fun97232() { // fn#97232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12877:295, offset: 0x02178123, size: 158 bytes, params: 1, frame: 17
var r0;
var object;
var value2;
var permissionStoreBinding;
var canAccessGuildSettings;
var binding;
if (env0_0 == null) {
r0 = {'canAccessSettings': false, 'canEditNickname': false, 'canManageChannels': false};
} else {
object = {};
value2 = environment.__proto__;
permissionStoreBinding = PermissionStore;
canAccessGuildSettings = permissionStoreBinding.canAccessGuildSettings;
binding = env0_0;
object.canAccessSettings = Reflect.apply(canAccessGuildSettings, permissionStoreBinding, [binding]);
object.canEditNickname = permissionStoreBinding.can(Permissions.CHANGE_NICKNAME,
binding) || PermissionStore.can(Permissions.MANAGE_NICKNAMES, env0_0);
object.canManageChannels = PermissionStore.can(Permissions.MANAGE_CHANNELS, env0_0);
r0 = object;
}
return r0;
}
function useGuildActionSheetPermissions(a0) { // fn#97231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12877:254, offset: 0x021780d7, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore], _fun97232, [a0]);
}
function _fun97232() { // fn#97232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12877:295, offset: 0x02178123, size: 158 bytes, params: 1, frame: 17
var r0;
var object2;
var value2;
var canAccessGuildSettings;
var binding;
if (env0_0 == null) {
r0 = {'canAccessSettings': false, 'canEditNickname': false, 'canManageChannels': false};
} else {
object2 = {};
value2 = environment.__proto__;
canAccessGuildSettings = PermissionStore.canAccessGuildSettings;
binding = env0_0;
object2.canAccessSettings = Reflect.apply(canAccessGuildSettings, PermissionStore, [binding]);
object2.canEditNickname = PermissionStore.can(Permissions.CHANGE_NICKNAME,
binding) || PermissionStore.can(Permissions.MANAGE_NICKNAMES, env0_0);
object2.canManageChannels = PermissionStore.can(Permissions.MANAGE_CHANNELS, env0_0);
r0 = object2;
}
return r0;
}
global.__d(_fun97230, 12687, [3784, 661, 566, 2]) /* metro module 12687, dependencies: [3784, 661, 566, 2] */;
@@ -1,111 +1,130 @@
/* Metro module 12697; source: modules/guild_action_sheet/native/GuildHeaderCountsStore.tsx; dependencies: [6, 7, 15, 17, 18, 6875, 1379, 4111, 1878, 4297, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberCountStore from '../../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ChannelMemberStore from '../../../stores/ChannelMemberStore.tsx'; /* Metro dependency 6875 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun97299(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:6, offset: 0x0217a6e4, size: 402 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const channelMemberStore = importDefault(6875) /* metro dependency 6875: ChannelMemberStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
object = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun97304(PersistedStore);
value.displayName = 'GuildHeaderCountsStore';
value.persistKey = 'GuildHeaderCountsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUILD_HEADER_MEMBER_COUNT: GUILD_HEADER_MEMBER_COUNT, GUILD_HEADER_ONLINE_COUNT: GUILD_HEADER_ONLINE_COUNT,
GUILD_HEADER_ACTIVE_CHANNELS_COUNT: GUILD_HEADER_ACTIVE_CHANNELS_COUNT});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/GuildHeaderCountsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/GuildHeaderCountsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_97300() { // fn#97300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:198, offset: 0x0217a876, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_97300() { // fn#97300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:198, offset: 0x0217a876, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_97300_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_97300_isNativeReflectConstruct = function() {
return !!result;
})();
}
function maybeCreateState(a0) { // fn#97303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:404, offset: 0x0217a8d8, size: 51 bytes, params: 2, frame: 5
if (env0_11[a0] == null) {
env0_11[a0] = {activeChannelsCount: undefined, onlineCount: undefined, memberCount: undefined};
function maybeCreateState(a0) { // fn#97303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:404, offset: 0x0217a8d8, size: 51 bytes, params: 2, frame: 5
if (env0_11[a0] == null) {
env0_11[a0] = {activeChannelsCount: undefined, onlineCount: undefined, memberCount: undefined};
}
}
}
function _fun97304(a0) { // fn#97304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:525, offset: 0x0217a90b, size: 174 bytes, params: 2, frame: 16
const closure = GuildHeaderCountsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_97306}, {key: 'getState', value: value_97307},
{key: 'getActiveChannelsCount', value: value_97308}, {key: 'getOnlineCount', value: value_97309},
{key: 'getMemberCount', value: value_97310}]);
}
function _fun97304(a0) { // fn#97304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:525, offset: 0x0217a90b, size: 174 bytes, params: 2, frame: 16
const GuildHeaderCountsStore2 = GuildHeaderCountsStore;
Inherits(GuildHeaderCountsStore2, a0);
return CreateClass(GuildHeaderCountsStore2, [{key: 'initialize', value: value_97306}, {key: 'getState',
value: value_97307}, {key: 'getActiveChannelsCount', value: value_97308}, {key: 'getOnlineCount',
value: value_97309}, {key: 'getMemberCount', value: value_97310}]);
function GuildHeaderCountsStore() { // fn#97305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:537, offset: 0x0118e5fe, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildHeaderCountsStore);
const value3 = env1_3(GuildHeaderCountsStore);
return env1_2(this, _isNativeReflectConstruct_97300() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function GUILD_HEADER_MEMBER_COUNT({guildId, count}) { // fn#97311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1407, offset: 0x0217aa69, size: 43 bytes, params: 2, frame: 13
maybeCreateState(guildId);
env0_11[guildId].memberCount = count;
}
function value_97306() { // fn#97306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:865, offset: 0x0217a9b9, size: 77 bytes, params: 1, frame: 23
let value = a0;
const r2 = value !== undefined ? value : env1_10;
const waitFor = this.waitFor;
value = environment.__proto__;
const guildMemberCountStoreBinding = GuildMemberCountStore;
const channelMemberStoreBinding = ChannelMemberStore;
Reflect.apply(waitFor, this, [guildMemberCountStoreBinding, channelMemberStoreBinding, UserStore, ChannelStore,
VoiceStateStore, channelMemberStoreBinding]);
if (r2 != null) {
}
}
function GUILD_HEADER_ONLINE_COUNT({guildId, count}) { // fn#97312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1521, offset: 0x0217aa94, size: 43 bytes, params: 2, frame: 13
maybeCreateState(guildId);
env0_11[guildId].onlineCount = count;
}
function value_97307() { // fn#97307, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function GUILD_HEADER_ACTIVE_CHANNELS_COUNT({guildId, count}) { // fn#97313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1644, offset: 0x0217aabf, size: 43 bytes, params: 2, frame: 13
maybeCreateState(guildId);
env0_11[guildId].activeChannelsCount = count;
}
function value_97308(a0) { // fn#97308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1001, offset: 0x0217aa06, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_11[a0]?.activeChannelsCount;
}
function value_97309(a0) { // fn#97309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1100, offset: 0x0217aa27, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_11[a0]?.onlineCount;
}
function value_97310(a0) { // fn#97310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1191, offset: 0x0217aa48, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_11[a0]?.memberCount;
}
function value_97306() { // fn#97306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:865, offset: 0x0217a9b9, size: 77 bytes, params: 1, frame: 23
let value = a0;
const r2 = value !== undefined ? value : env1_10;
const waitFor = this.waitFor;
value = environment.__proto__;
Reflect.apply(waitFor, this, [GuildMemberCountStore, ChannelMemberStore, UserStore, ChannelStore, VoiceStateStore,
ChannelMemberStore]);
if (r2 != null) {
}
function GUILD_HEADER_MEMBER_COUNT({guildId, count}) { // fn#97311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1407, offset: 0x0217aa69, size: 43 bytes, params: 2, frame: 13
maybeCreateState(guildId);
env0_11[guildId].memberCount = count;
}
function GUILD_HEADER_ONLINE_COUNT({guildId, count}) { // fn#97312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1521, offset: 0x0217aa94, size: 43 bytes, params: 2, frame: 13
maybeCreateState(guildId);
env0_11[guildId].onlineCount = count;
}
function GUILD_HEADER_ACTIVE_CHANNELS_COUNT({guildId, count}) { // fn#97313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1644, offset: 0x0217aabf, size: 43 bytes, params: 2, frame: 13
maybeCreateState(guildId);
env0_11[guildId].activeChannelsCount = count;
}
}
function value_97308(a0) { // fn#97308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1001, offset: 0x0217aa06, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_11[a0]?.activeChannelsCount;
}
function value_97309(a0) { // fn#97309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1100, offset: 0x0217aa27, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_11[a0]?.onlineCount;
}
function value_97310(a0) { // fn#97310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12887:1191, offset: 0x0217aa48, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_11[a0]?.memberCount;
}
global.__d(_fun97299, 12697, [6, 7, 15, 17, 18, 6875, 1379, 4111, 1878, 4297, 566, 694,
2]) /* metro module 12697, dependencies: [6, 7, 15, 17, 18, 6875, 1379, 4111, 1878, 4297, 566, 694, 2] */;
@@ -1,64 +1,85 @@
/* Metro module 12698; source: modules/guild_action_sheet/native/components/GuildActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 7326, 6275, 6277, 477, 12693, 12699, 12684, 12700, 12703, 6515, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildActionSheetHeader from './GuildActionSheetHeader.tsx'; /* Metro dependency 12693 */
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 BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as ActionSheetHeaderBarNativeModule from '../../../../design/components/Sheet/native/ActionSheetHeaderBar.native.tsx'; /* Metro dependency 6515 */
import * as UseBottomSheetRefModule from '../../../../design/components/Sheet/native/useBottomSheetRef.tsx'; /* Metro dependency 7326 */
import * as GuildActionSheetActionsModule from './GuildActionSheetActions.tsx'; /* Metro dependency 12684 */
function _fun97314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12888:6, offset: 0x0217aaea, size: 262 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const MOBILE_ACTIONSHEET_BACKGROUND = (Native).colors.MOBILE_ACTIONSHEET_BACKGROUND;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: {flex: 1,
backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND}, actions: {'paddingHorizontal': 16, 'gap': 24}}]);
value = value.memo(_fun97315);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheet.tsx');
exports.default = value;
}
function _fun97315({guild, expanded}) { // fn#97315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12888:302, offset: 0x0217abf0, size: 599 bytes, params: 2, frame: 31
expanded = !(expanded === undefined) && expanded;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const {bottomSheetRef,
bottomSheetClose} = (require(7326) /* metro dependency 7326: useBottomSheetRef */).useBottomSheetRef();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object = {};
object.paddingBottom = bottom + ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 16 : 0);
const items3 = [((Component) => <Component guild={guild} />)(importDefault(12693) /* metro dependency 12693: GuildActionSheetHeader */)];
items3[1] = ((Component) => <Component guild={guild} />)(importDefault(12699) /* metro dependency 12699: GuildActionSheetTabItems */);
const GuildUnreadAction = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).GuildUnreadAction;
const items2 = [<GuildUnreadAction guild={guild} />];
items2[1] = ((Component) => <Component guild={guild} />)(importDefault(12700) /* metro dependency 12700: GuildActionSheetProgress */);
const GuildActionSheetPrimaryActions = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).GuildActionSheetPrimaryActions;
items2[2] = <GuildActionSheetPrimaryActions guild={guild} />;
const GuildActionSheetSecondaryActions = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).GuildActionSheetSecondaryActions;
items2[3] = <GuildActionSheetSecondaryActions guild={guild} />;
const GuildDeveloperOptionAction = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).GuildDeveloperOptionAction;
items2[4] = <GuildDeveloperOptionAction guild={guild} />;
items2[5] = ((Component) => <Component guildId={guild.id} />)(importDefault(12703) /* metro dependency 12703: GuildActionSheetEmojiSection */);
items3[2] = <View style={styles.actions}>{items2}</View>;
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
items3[3] = <ActionSheetHeaderBar variant="floating" onPress={bottomSheetClose} />;
return (
<BottomSheet
ref={bottomSheetRef}
handleDisabled
showGradient
scrollable
startExpanded={expanded}
>
<BottomSheetScrollView
scrollsToTop={false}
style={styles.container}
contentContainerStyle={object}
function _fun97315({guild, expanded}) { // fn#97315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12888:302, offset: 0x0217abf0, size: 599 bytes, params: 2, frame: 31
expanded = !(expanded === undefined) && expanded;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const {bottomSheetRef,
bottomSheetClose} = (UseBottomSheetRefModule).useBottomSheetRef();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const object2 = {};
object2.paddingBottom = bottom + ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 16 : 0);
const items3 = [
((Component) => <Component guild={guild} />)(GuildActionSheetHeader),
];
items3[1] = ((Component) => <Component guild={guild} />)(importDefault(12699) /* metro dependency 12699: GuildActionSheetTabItems */);
const GuildUnreadAction = (GuildActionSheetActionsModule).GuildUnreadAction;
const items2 = [
<GuildUnreadAction guild={guild} />,
];
items2[1] = ((Component) => <Component guild={guild} />)(importDefault(12700) /* metro dependency 12700: GuildActionSheetProgress */);
const GuildActionSheetPrimaryActions = (GuildActionSheetActionsModule).GuildActionSheetPrimaryActions;
items2[2] = <GuildActionSheetPrimaryActions guild={guild} />;
const GuildActionSheetSecondaryActions = (GuildActionSheetActionsModule).GuildActionSheetSecondaryActions;
items2[3] = <GuildActionSheetSecondaryActions guild={guild} />;
const GuildDeveloperOptionAction = (GuildActionSheetActionsModule).GuildDeveloperOptionAction;
items2[4] = <GuildDeveloperOptionAction guild={guild} />;
items2[5] = ((Component) => <Component guildId={guild.id} />)(importDefault(12703) /* metro dependency 12703: GuildActionSheetEmojiSection */);
items3[2] = (
<View style={styles.actions}>
{items2}
</View>
);
const ActionSheetHeaderBar = (ActionSheetHeaderBarNativeModule).ActionSheetHeaderBar;
items3[3] = <ActionSheetHeaderBar variant="floating" onPress={bottomSheetClose} />;
return (
<BottomSheet
ref={bottomSheetRef}
handleDisabled
showGradient
scrollable
startExpanded={expanded}
>
{items3}
</BottomSheetScrollView>
</BottomSheet>
);
<BottomSheetScrollView
scrollsToTop={false}
style={styles.container}
contentContainerStyle={object2}
>
{items3}
</BottomSheetScrollView>
</BottomSheet>
);
}
}
global.__d(_fun97314, 12698, [31, 27, 33, 4501, 697, 1585, 7326, 6275, 6277, 477, 12693, 12699, 12684, 12700, 12703,
6515,
2]) /* metro module 12698, dependencies: [31, 27, 33, 4501, 697, 1585, 7326, 6275, 6277, 477, 12693, 12699, 12684, 12700, 12703, 6515, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,47 +1,59 @@
/* Metro module 12692; source: modules/guild_action_sheet/native/components/GuildActionSheetDirectory.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 6275, 6277, 12693, 12684, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildActionSheetHeader from './GuildActionSheetHeader.tsx'; /* Metro dependency 12693 */
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 BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as GuildActionSheetActionsModule from './GuildActionSheetActions.tsx'; /* Metro dependency 12684 */
function _fun97255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12882:6, offset: 0x02178f3e, size: 252 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_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const env0_6 = Reflect.apply(createStyles, value, [{container: {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER},
actions: {'paddingHorizontal': 16, 'gap': 24}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetDirectory.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetDirectory.tsx');
exports.default = _default_97256;
function _default_97256({guild, expanded}) { // fn#97256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12882:291, offset: 0x0217903a, size: 307 bytes, params: 2, frame: 26
expanded = !(expanded === undefined) && expanded;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const object2 = {paddingBottom: bottom};
const value2 = ((Component) => <Component guild={guild} />)(GuildActionSheetHeader);
const GuildActionSheetDirectoryActions = (GuildActionSheetActionsModule).GuildActionSheetDirectoryActions;
const guildActionSheetDirectoryActions = <GuildActionSheetDirectoryActions guild={guild} />;
const GuildDeveloperOptionAction = (GuildActionSheetActionsModule).GuildDeveloperOptionAction;
return (
<BottomSheet scrollable startExpanded={expanded}>
<BottomSheetScrollView
scrollsToTop={false}
style={styles.container}
contentContainerStyle={object2}
>
{value2}
<View style={styles.actions}>
{guildActionSheetDirectoryActions}
<GuildDeveloperOptionAction guild={guild} />
</View>
</BottomSheetScrollView>
</BottomSheet>
);
}
}
function _default_97256({guild, expanded}) { // fn#97256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12882:291, offset: 0x0217903a, size: 307 bytes, params: 2, frame: 26
expanded = !(expanded === undefined) && expanded;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object = {paddingBottom: bottom};
const value2 = ((Component) => <Component guild={guild} />)(importDefault(12693) /* metro dependency 12693: GuildActionSheetHeader */);
const GuildActionSheetDirectoryActions = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).GuildActionSheetDirectoryActions;
const guildActionSheetDirectoryActions = <GuildActionSheetDirectoryActions guild={guild} />;
const GuildDeveloperOptionAction = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).GuildDeveloperOptionAction;
return (
<BottomSheet scrollable startExpanded={expanded}>
<BottomSheetScrollView
scrollsToTop={false}
style={styles.container}
contentContainerStyle={object}
>
{value2}
<View style={styles.actions}>
{guildActionSheetDirectoryActions}
<GuildDeveloperOptionAction guild={guild} />
</View>
</BottomSheetScrollView>
</BottomSheet>
);
}
global.__d(_fun97255, 12692, [31, 27, 33, 4501, 697, 1585, 6275, 6277, 12693, 12684,
2]) /* metro module 12692, dependencies: [31, 27, 33, 4501, 697, 1585, 6275, 6277, 12693, 12684, 2] */;
@@ -1,16 +1,30 @@
/* Metro module 12703; source: modules/guild_action_sheet/native/components/GuildActionSheetEmojiSection.tsx; dependencies: [57, 31, 27, 6540, 1310, 1878, 661, 33, 4501, 697, 566, 1478, 3860, 3802, 6771, 6789, 4080, 7882, 12704, 1244, 5278, 1305, 8604, 4081, 4082, 3856, 5475, 4002, 6740, 6741, 1423, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ThemeStore from '../../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import HapticFeedbackTypes from '../../../haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import EmojiStore from '../../../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as SharedModule from '../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as HapticUtilsNativeModule from '../../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun97337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:6, offset: 0x0217bf24, size: 542 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_9 = value.UpsellTypes;
const env0_10 = value.AnalyticsSections;
const Fonts = value.Fonts;
@@ -19,198 +33,221 @@ function _fun97337(global, require, importDefault, importAll, module, exports, d
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {header: {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap'}};
const object4 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object = {header: {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap'}};
const object2 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
let TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object4.backgroundColor = TEXT_SUBTLE;
object3.dotSeparator = object4;
object2.backgroundColor = TEXT_SUBTLE;
object.dotSeparator = object2;
const PREMIUM_TIER_2_PURPLE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PREMIUM_TIER_2_PURPLE;
let PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object3.premiumTitle = {color: PREMIUM_TIER_2_PURPLE, marginLeft: 4, fontFamily: PRIMARY_BOLD, fontSize: 12};
object3.emojiContainer = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'padding': 4};
object3.emoji = {'width': 24, 'height': 24};
object.premiumTitle = {color: PREMIUM_TIER_2_PURPLE, marginLeft: 4, fontFamily: PRIMARY_BOLD, fontSize: 12};
object.emojiContainer = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'padding': 4};
object.emoji = {'width': 24, 'height': 24};
TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object3.emojiCount = {'color': null, 'fontSize': 12, 'fontFamily': null, 'textAlign': 'center',
object.emojiCount = {'color': null, 'fontSize': 12, 'fontFamily': null, 'textAlign': 'center',
'textAlignVertical': 'center', color: TEXT_SUBTLE, fontFamily: PRIMARY_BOLD};
const env0_13 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetEmojiSection.tsx');
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetEmojiSection.tsx');
exports.default = _default_97338;
}
function _default_97338({guildId}) { // fn#97338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:837, offset: 0x0217c142, size: 1278 bytes, params: 2, frame: 40
var r6;
var r0;
var r3;
var r1;
var r17;
var r5;
var r9;
var defaultImport2;
var value16;
var length;
var value18;
var value19;
var RowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var object3;
var items2;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var items3;
var object8;
const styles = useStyles();
const [property, env0_3] = env0_3Binding(env0_4.useState(false), 2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const items = [EmojiStore];
const value5 = Reflect.apply(useStateFromStoresArray, fluxModule, [items, function() {
return EmojiStore.getGuildEmoji(guildId);
}, [guildId]]);
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value6 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const value7 = fluxModule.useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []);
var env0_4 = value7;
const canUseEmojisEverywhere2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseEmojisEverywhere(value7);
if (canUseEmojisEverywhere2) {
r6 = !canUseEmojisEverywhere2;
} else {
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
r6 = !defaultImport2.isPremium(value7);
}
const value10 = width - (26 + 2 * value6);
const Math = global.Math;
const value11 = Math.floor(value10 / 32);
const value14 = (value10 - 24 * value11) / (2 * value11);
const r19 = value14 >= 4 && value14 < 12 ? value14 : 4;
if (property) {
length = value5.length;
r0 = 0;
r3 = length;
} else {
value16 = 2 * value11;
r0 = value5.length - value16;
r3 = value16;
}
if (r0 > 0) {
value18 = r3 - 1;
value19 = global.Math.min(r0 + 1, 99);
r1 = value18;
r17 = value19;
} else {
r1 = r3;
r17 = r0;
}
const value20 = value5.slice(0, r1);
const defaultImport3 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const EMOJI_PICKER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EMOJI_PICKER;
const env0_7 = env0_4.useCallback(_fun97341, [defaultImport3(EMOJI_PICKER).analyticsLocations]);
if (value20.length > 0) {
RowGroup = (require(12704) /* metro dependency 12704: RowGroupNative */).RowGroup;
var rowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Q60n1E)};
if (r6) {
object3 = {accessibilityRole: 'button', onPress: onPress_97342};
var viewBindingProps = {style: styles.header};
items2 = [<View style={styles.dotSeparator} />];
items2[1] = ((Icon) => <Icon source={importDefault(8604) /* metro dependency 8604 */} disableColor size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} />)((require(1305) /* metro dependency 1305: native */).Icon);
items2[2] = <LegacyText style={styles.premiumTitle}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.p1j56s)}</LegacyText>;
r5 = <PressableOpacity {...object3}><View {...viewBindingProps}>{items2}</View></PressableOpacity>;
function _default_97338({guildId}) { // fn#97338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:837, offset: 0x0217c142, size: 1278 bytes, params: 2, frame: 40
var r6;
var r0;
var r3;
var r1;
var r17;
var r5;
var r9;
var defaultImport2;
var value16;
var length;
var value18;
var value19;
var RowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const PressableOpacity = (PressablesModule).PressableOpacity;
var object2;
var items2;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var items3;
var object4;
const styles = useStyles();
const [property, env0_3] = env0_3Binding(env0_4.useState(false), 2);
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const items = [EmojiStore];
const value5 = Reflect.apply(useStateFromStoresArray, FluxModule, [items, function() {
return EmojiStore.getGuildEmoji(guildId);
}, [guildId]]);
const width = (UseWindowDimensionsNative)().width;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value6 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const value7 = FluxModule.useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []);
var env0_4 = value7;
const canUseEmojisEverywhere2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseEmojisEverywhere(value7);
if (canUseEmojisEverywhere2) {
r6 = !canUseEmojisEverywhere2;
} else {
r5 = null;
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
r6 = !defaultImport2.isPremium(value7);
}
rowGroupProps.trailing = r5;
var viewBindingProps2 = {style: styles.emojiContainer};
items3 = [value20.map(_fun97343)];
if (r17 > 0) {
r9 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+'])} onPress={onPress_97345} key={-1}><LegacyText style={[styles.emoji,
styles.emojiCount, {margin: r19}]}>{'+' + r17}</LegacyText></PressableOpacity>;
const value10 = width - (26 + 2 * value6);
const Math = global.Math;
const value11 = Math.floor(value10 / 32);
const value14 = (value10 - 24 * value11) / (2 * value11);
const r19 = value14 >= 4 && value14 < 12 ? value14 : 4;
if (property) {
length = value5.length;
r0 = 0;
r3 = length;
} else {
r9 = null;
value16 = 2 * value11;
r0 = value5.length - value16;
r3 = value16;
}
if (r0 > 0) {
value18 = r3 - 1;
value19 = global.Math.min(r0 + 1, 99);
r1 = value18;
r17 = value19;
} else {
r1 = r3;
r17 = r0;
}
const value20 = value5.slice(0, r1);
const defaultImport3 = UseAnalyticsLocations;
const EMOJI_PICKER = (AnalyticsLocation).EMOJI_PICKER;
const env0_7 = env0_4.useCallback(_fun97341, [defaultImport3(EMOJI_PICKER).analyticsLocations]);
if (value20.length > 0) {
RowGroup = (require(12704) /* metro dependency 12704: RowGroupNative */).RowGroup;
var rowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Q60n1E)};
if (r6) {
object2 = {accessibilityRole: 'button', onPress: onPress_97342};
var viewBindingProps = {style: styles.header};
items2 = [
<View style={styles.dotSeparator} />,
];
items2[1] = ((Icon) => <Icon source={importDefault(8604) /* metro dependency 8604 */} disableColor size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} />)((require(1305) /* metro dependency 1305: native */).Icon);
items2[2] = (
<LegacyText style={styles.premiumTitle}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.p1j56s)}
</LegacyText>
);
r5 = (
<PressableOpacity {...object2}>
<View {...viewBindingProps}>
{items2}
</View>
</PressableOpacity>
);
} else {
r5 = null;
}
rowGroupProps.trailing = r5;
var viewBindingProps2 = {style: styles.emojiContainer};
items3 = [value20.map(_fun97343)];
if (r17 > 0) {
r9 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+'])}
onPress={onPress_97345}
key={-1}
>
<LegacyText style={[styles.emoji, styles.emojiCount, {margin: r19}]}>
{'+' + r17}
</LegacyText>
</PressableOpacity>
);
} else {
r9 = null;
}
items3[1] = r9;
r0 = (
<RowGroup {...rowGroupProps}>
<View {...viewBindingProps2}>
{items3}
</View>
</RowGroup>
);
} else {
r0 = null;
}
return r0;
function _fun97341(a0, a1) { // fn#97341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:1408, offset: 0x0217c65b, size: 195 bytes, params: 3, frame: 17
var r0;
let value = a1 == null;
if (value) {
r0 = value;
} else {
value = environment.__proto__;
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
value = value.canUseEmojisEverywhere(a1);
r0 = value;
}
if (!r0) {
value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('GuildProfile:' + a0);
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.GLOBAL_EMOJI,
analyticsLocation: {section: AnalyticsSections.EMOJI_PICKER_POPOUT},
analyticsLocations: analyticsLocations});
}
}
items3[1] = r9;
r0 = <RowGroup {...rowGroupProps}><View {...viewBindingProps2}>{items3}</View></RowGroup>;
} else {
r0 = null;
}
return r0;
}
function _fun97341(a0, a1) { // fn#97341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:1408, offset: 0x0217c65b, size: 195 bytes, params: 3, frame: 17
var r0;
let value = a1 == null;
if (value) {
r0 = value;
} else {
value = environment.__proto__;
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
value = value.canUseEmojisEverywhere(a1);
r0 = value;
}
if (!r0) {
value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('GuildProfile:' + a0);
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.GLOBAL_EMOJI,
analyticsLocation: {section: AnalyticsSections.EMOJI_PICKER_POPOUT},
analyticsLocations: analyticsLocations});
}
}
function _default_97338OnPress() { // fn#97342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:1813, owner: _default_97338.onPress, offset: 0x0217c71e, size: 25 bytes, params: 1, frame: 13
return env0_7(guildId, env0_4);
}
function _default_97338OnPress() { // fn#97342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:1813, owner: _default_97338.onPress, offset: 0x0217c71e, size: 25 bytes, params: 1, frame: 13
return env0_7(guildId, env0_4);
}
function _fun97343(a0) { // fn#97343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:2132, offset: 0x0217c737, size: 309 bytes, params: 2, frame: 23
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'image', accessibilityLabel: a0.name, onPress: onPress_97344};
const items2 = [styles.emoji];
items2[1] = {margin: ReactNativeModule.View};
const r7 = SharedModule.isThemeDark(ThemeStore.theme) ? importDefault(6740) /* metro dependency 6740 */ : importDefault(6741) /* metro dependency 6741 */;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getEmojiURL = value.getEmojiURL;
return (
<PressableOpacity {...pressableOpacityProps} key={a0.id}>
<FastImage
resizeMode="contain"
style={items2}
placeholder={r7}
source={{uri: Reflect.apply(getEmojiURL, value, [{id: a0.id, animated: a0.animated, size: 48}])}}
/>
</PressableOpacity>
);
function onPress_97344() { // fn#97344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:2224, offset: 0x0217c86c, size: 111 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
(ToastUtilsModule).presentEmoji(env0_0);
value = environment.__proto__;
if (!env1_2) {
env1_3(true);
}
}
function _fun97343(a0) { // fn#97343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:2132, offset: 0x0217c737, size: 309 bytes, params: 2, frame: 23
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'image', accessibilityLabel: a0.name, onPress: onPress_97344};
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
const items2 = [styles.emoji];
items2[1] = {margin: env0_5};
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const r7 = sharedModule.isThemeDark(ThemeStore.theme) ? importDefault(6740) /* metro dependency 6740 */ : importDefault(6741) /* metro dependency 6741 */;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getEmojiURL = value.getEmojiURL;
return (
<PressableOpacity {...pressableOpacityProps} key={a0.id}>
<FastImage
resizeMode="contain"
style={items2}
placeholder={r7}
source={{uri: Reflect.apply(getEmojiURL, value, [{id: a0.id, animated: a0.animated, size: 48}])}}
/>
</PressableOpacity>
);
}
}
function _default_97338OnPress_97345() { // fn#97345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:2661, owner: _default_97338.onPress, offset: 0x0217c8db, size: 74 bytes, params: 1, frame: 14
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
env0_3(true);
}
function _default_97338OnPress_97345() { // fn#97345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:2661, owner: _default_97338.onPress, offset: 0x0217c8db, size: 74 bytes, params: 1, frame: 14
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
env0_3(true);
}
function onPress_97344() { // fn#97344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12893:2224, offset: 0x0217c86c, size: 111 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
(require(3856) /* metro dependency 3856: ToastUtils */).presentEmoji(env0_0);
value = environment.__proto__;
if (!env1_2) {
env1_3(true);
}
}
global.__d(_fun97337, 12703, [57, 31, 27, 6540, 1310, 1878, 661, 33, 4501, 697, 566, 1478, 3860, 3802, 6771, 6789,
4080, 7882, 12704, 1244, 5278, 1305, 8604, 4081, 4082, 3856, 5475, 4002, 6740, 6741, 1423,
2]) /* metro module 12703, dependencies: [57, 31, 27, 6540, 1310, 1878, 661, 33, 4501, 697, 566, 1478, 3860, 3802, 6771, 6789, 4080, 7882, 12704, 1244, 5278, 1305, 8604, 4081, 4082, 3856, 5475, 4002, 6740, 6741, 1423, 2] */;
@@ -1,243 +1,305 @@
/* Metro module 12693; source: modules/guild_action_sheet/native/components/GuildActionSheetHeader.tsx; dependencies: [31, 27, 12694, 1867, 6866, 661, 33, 4501, 697, 478, 1244, 6921, 6918, 9404, 6924, 5278, 3857, 1305, 4573, 7556, 566, 1418, 12695, 12696, 1478, 6819, 1423, 1457, 7701, 3860, 5475, 6915, 9720, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import ToastActionCreators from '../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import GuildSubscriptionsStore from '../../../../stores/GuildSubscriptionsStore.tsx'; /* Metro dependency 6866 */
import Module06921 from '../../../../by-id/module-06921.js'; /* Metro dependency 6921 */
import UseIsWindowLarge from '../../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
import GuildPopoutStore from '../../../guild_profile/GuildPopoutStore.tsx'; /* Metro dependency 12694 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GuildRecordUtilsModule from '../../../../utils/GuildRecordUtils.tsx'; /* Metro dependency 1418 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as GuildTraitsModule from '../../../guild_badge/GuildTraits.tsx'; /* Metro dependency 6918 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as UseGuildHeaderCountsModule from '../useGuildHeaderCounts.tsx'; /* Metro dependency 12696 */
function _fun97257(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:6, offset: 0x0217916d, size: 596 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.Image;
const guildPopoutStore = importDefault(12694) /* metro dependency 12694: GuildPopoutStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildSubscriptionsStore = importDefault(6866) /* metro dependency 6866: GuildSubscriptionsStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.content = {padding: 16};
object2.avatar = {'borderRadius': 14.117647058823529, 'height': 60, 'width': 60};
const createStyles = CreateStylesModule.createStyles;
object = {};
object.content = {padding: 16};
object.avatar = {'borderRadius': 14.117647058823529, 'height': 60, 'width': 60};
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.headerContainer = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.headerContainer = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.avatarBackground = {'height': 68, 'width': 68, 'marginBottom': 12, 'marginLeft': -4, 'padding': 4,
object.avatarBackground = {'height': 68, 'width': 68, 'marginBottom': 12, 'marginLeft': -4, 'padding': 4,
'borderRadius': 16, 'alignContent': 'center', 'justifyContent': 'center',
backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object2.description = {marginTop: 8};
object2.memberInfo = {'marginTop': 16, 'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap',
'gap': 16};
object2.nameRow = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 8};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'paddingTop': 4,
object.description = {marginTop: 8};
object.memberInfo = {'marginTop': 16, 'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 16};
object.nameRow = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 8};
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'paddingTop': 4,
'paddingRight': 8, 'paddingBottom': 4, 'paddingLeft': 6};
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object3.backgroundColor = INTERACTIVE_BACKGROUND_HOVER;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.communityPill = object3;
object2.communityPillIcon = {'width': 16, 'height': 16, 'marginRight': 6};
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
object2.communityPillText = {lineHeight: platformUtilsModule.isAndroid() ? 14 : value};
object2.guildBanner = {'position': 'absolute', 'left': '50%', 'top': 0};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetHeader.tsx');
object4.backgroundColor = INTERACTIVE_BACKGROUND_HOVER;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.communityPill = object4;
object.communityPillIcon = {'width': 16, 'height': 16, 'marginRight': 6};
object.communityPillText = {lineHeight: PlatformUtilsModule.isAndroid() ? 14 : value};
object.guildBanner = {'position': 'absolute', 'left': '50%', 'top': 0};
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetHeader.tsx');
exports.default = GuildActionSheetHeader;
return value;
}
function CommunityPill({guildVisibility}) { // fn#97258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1152, offset: 0x021793c1, size: 459 bytes, params: 2, frame: 23
var r10;
var env0_0;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const TME4LJ = (require(1244) /* metro dependency 1244: indexNative */).t.TME4LJ;
let env0_1 = Reflect.apply(string, intl, [TME4LJ]);
const defaultImport = importDefault(6921) /* metro dependency 6921 */;
const GuildVisibility = (require(6918) /* metro dependency 6918: GuildTraits */).GuildVisibility;
const PUBLIC = GuildVisibility.PUBLIC;
if (guildVisibility !== PUBLIC) {
r10 = defaultImport;
} else {
env0_1 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.op2cJ6);
env0_0 = (require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon;
r10 = importDefault(6924) /* metro dependency 6924 */;
}
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.communityPill, accessibilityRole: 'button', onPress: onPress_97259};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const icon = <Icon style={styles.communityPillIcon} source={r10} disableColor />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const K7iRig = (require(1244) /* metro dependency 1244: indexNative */).t.K7iRig;
return (
<PressableOpacity {...pressableOpacityProps}>
{icon}
<Text
variant="text-xs/medium"
color="text-default"
style={styles.communityPillText}
>
{Reflect.apply(string, intl, [K7iRig])}
</Text>
</PressableOpacity>
);
}
function GuildActionSheetHeader({guild}) { // fn#97260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1793, offset: 0x021795d1, size: 1649 bytes, params: 2, frame: 35
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var onlineCount;
var memberCount;
var r2;
var r21;
var r23;
var r11;
var r9;
var defaultImport;
var getGuildIconSource;
var image;
var defaultImport2;
var getGuildSplashSource;
var moduleValue6;
var features;
var value10;
var view;
let env0_3 = undefined;
const styles = useStyles();
const value3 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [GuildSubscriptionsStore];
const value4 = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return GuildSubscriptionsStore.isSubscribedToAnyGuildChannel(guild.id);
}]);
env0_3.useEffect(_fun97262, [guild, value4]);
const guild2 = fluxModule.useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guild.id);
});
const guild3 = fluxModule.useStateFromStores([GuildPopoutStore], function() {
return GuildPopoutStore.getGuild(guild.id);
});
let r1 = guild2 ?? guild3;
const r22 = r1 ?? guild;
const value6 = (require(12696) /* metro dependency 12696: useGuildHeaderCounts */).useGuildHeaderCounts(r22.id);
if (value4) {
onlineCount = value6.onlineCount;
memberCount = value6.memberCount;
} else {
onlineCount = undefined;
memberCount = undefined;
}
if (guild3 == null) {
r21 = memberCount;
r23 = onlineCount;
} else {
r2 = onlineCount ?? guild3.presenceCount;
r21 = memberCount ?? guild3.memberCount;
r23 = r2;
}
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
env0_3 = width;
const guildRecordUtilsModule = require(1418) /* metro dependency 1418: GuildRecordUtils */;
if (guildRecordUtilsModule.isGuildRecord(r22)) {
features = r22.features;
value10 = features.has(GuildFeatures.ANIMATED_BANNER);
view = <View style={styles.avatarBackground} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" accessibilityRole="none">{((Component) => <Component style={styles.avatar} guild={r22} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View>;
r1 = r22.banner == null || value3 ? null : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildBannerSource({id: r22.id,
banner: r22.banner}, value10);
r9 = view;
r11 = r1;
} else {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildIconSource = defaultImport.getGuildIconSource;
object = {};
object.id = r22.id;
object.icon = r22.icon;
object.canAnimate = true;
object.size = 68;
image = <Image style={styles.avatar} source={Reflect.apply(getGuildIconSource, defaultImport, [object])} />;
if (r22.splash == null) {
r11 = null;
} else if (value3) {
r11 = null;
function CommunityPill({guildVisibility}) { // fn#97258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1152, offset: 0x021793c1, size: 459 bytes, params: 2, frame: 23
var r10;
var env0_0;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const TME4LJ = (require(1244) /* metro dependency 1244: indexNative */).t.TME4LJ;
let env0_1 = Reflect.apply(string, intl, [TME4LJ]);
const defaultImport = Module06921;
const GuildVisibility = (GuildTraitsModule).GuildVisibility;
const PUBLIC = GuildVisibility.PUBLIC;
if (guildVisibility !== PUBLIC) {
r10 = defaultImport;
} else {
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildSplashSource = defaultImport2.getGuildSplashSource;
env0_1 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.op2cJ6);
env0_0 = (require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon;
r10 = importDefault(6924) /* metro dependency 6924 */;
}
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: styles.communityPill, accessibilityRole: 'button', onPress: onPress_97259};
const Icon = (NativeModule).Icon;
const icon = (
<Icon
style={styles.communityPillIcon}
source={r10}
disableColor
/>
);
const Text = (TextModule).Text;
string = intl.string;
const K7iRig = (require(1244) /* metro dependency 1244: indexNative */).t.K7iRig;
return (
<PressableOpacity {...pressableOpacityProps}>
{icon}
<Text
variant="text-xs/medium"
color="text-default"
style={styles.communityPillText}
>
{Reflect.apply(string, intl, [K7iRig])}
</Text>
</PressableOpacity>
);
function CommunityPillOnPress() { // fn#97259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1472, owner: CommunityPill.onPress, offset: 0x0217958c, size: 69 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ToastActionCreators).open({key: 'SERVER_BADGE_DESCRIPTION_INVITE_ONLY',
content: env0_1, IconComponent: GlobeEarthIcon});
}
}
function GuildActionSheetHeader({guild}) { // fn#97260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1793, offset: 0x021795d1, size: 1649 bytes, params: 2, frame: 35
const Text = (TextModule).Text;
var onlineCount;
var memberCount;
var r2;
var r21;
var r23;
var r11;
var r9;
var defaultImport;
var getGuildIconSource;
var image;
var defaultImport2;
var getGuildSplashSource;
var moduleValue6;
var features;
var value10;
var view;
let env0_3 = undefined;
const styles = useStyles();
const value3 = (UseIsWindowLarge)();
const useStateFromStores = FluxModule.useStateFromStores;
let object = [GuildSubscriptionsStore];
const value4 = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return GuildSubscriptionsStore.isSubscribedToAnyGuildChannel(guild.id);
}]);
env0_3.useEffect(_fun97262, [guild, value4]);
const guild2 = FluxModule.useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guild.id);
});
const guild3 = FluxModule.useStateFromStores([GuildPopoutStore], function() {
return GuildPopoutStore.getGuild(guild.id);
});
let r1 = guild2 ?? guild3;
const r22 = r1 ?? guild;
const value6 = (UseGuildHeaderCountsModule).useGuildHeaderCounts(r22.id);
if (value4) {
onlineCount = value6.onlineCount;
memberCount = value6.memberCount;
} else {
onlineCount = undefined;
memberCount = undefined;
}
if (guild3 == null) {
r21 = memberCount;
r23 = onlineCount;
} else {
r2 = onlineCount ?? guild3.presenceCount;
r21 = memberCount ?? guild3.memberCount;
r23 = r2;
}
const width = (UseWindowDimensionsNative)().width;
env0_3 = width;
if (GuildRecordUtilsModule.isGuildRecord(r22)) {
features = r22.features;
value10 = features.has(GuildFeatures.ANIMATED_BANNER);
view = (
<View
style={styles.avatarBackground}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
accessibilityRole="none"
>
{((Component) => <Component style={styles.avatar} guild={r22} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}
</View>
);
r1 = r22.banner == null || value3 ? null : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildBannerSource({id: r22.id,
banner: r22.banner}, value10);
r9 = view;
r11 = r1;
} else {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildIconSource = defaultImport.getGuildIconSource;
object = {};
object.id = r22.id;
object.splash = r22.splash;
moduleValue6 = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
object.size = width * moduleValue6.getDevicePixelRatio();
r11 = Reflect.apply(getGuildSplashSource, defaultImport2, [object]);
object.icon = r22.icon;
object.canAnimate = true;
object.size = 68;
image = <Image style={styles.avatar} source={Reflect.apply(getGuildIconSource, defaultImport, [object])} />;
if (r22.splash == null) {
r11 = null;
} else if (value3) {
r11 = null;
} else {
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildSplashSource = defaultImport2.getGuildSplashSource;
object = {};
object.id = r22.id;
object.splash = r22.splash;
moduleValue6 = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
object.size = width * moduleValue6.getDevicePixelRatio();
r11 = Reflect.apply(getGuildSplashSource, defaultImport2, [object]);
}
r9 = image;
}
r9 = image;
}
const name = r22.name;
const description = r22.description;
const guildTraits = (require(6918) /* metro dependency 6918: GuildTraits */).getGuildTraits(r22);
const value14 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const value15 = 0.56 * width;
const value16 = env0_3.useMemo(_fun97265, [styles.guildBanner, width, value15]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CHANNEL_LIST_TITLE_TEXT_STYLE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_LIST_TITLE_TEXT_STYLE;
const value17 = Reflect.apply(useToken, useTokenModule, [CHANNEL_LIST_TITLE_TEXT_STYLE]);
const items2 = [styles.headerContainer, value14];
const r5 = r11 != null && ((Component) => <Component style={value16} source={r11} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items3 = [styles.content];
r11 = r11 != null ? value15 - 48 : 0;
items3[1] = {marginTop: r11};
const items4 = [r9];
items4[1] = <View style={styles.nameRow}>{((Component) => <Component guild={r22} />)(importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */)}<Text lineClamp={2} accessibilityRole="header" variant={value17} color="mobile-text-heading-primary">{name}</Text></View>;
items4[2] = description != null ? <Text style={styles.description} variant="text-sm/medium" color="text-default">{description}</Text> : null;
items4[3] = <View style={styles.memberInfo}>{guildTraits.community ? <CommunityPill guildVisibility={guildTraits.visibility} /> : null}<View style={{'gap': 15,
'flexDirection': 'row'}}>{r23 != null && ((Component) => <Component type="online" count={r23} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */)}{r21 != null && ((Component) => <Component type="total" count={r21} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */)}</View></View>;
return (
<View style={items2}>
{r5}
<View style={items3}>
{items4}
const name = r22.name;
const description = r22.description;
const guildTraits = (GuildTraitsModule).getGuildTraits(r22);
const value14 = (ClientThemesOverridesModule).useClientThemesOverride();
const value15 = 0.56 * width;
const value16 = env0_3.useMemo(_fun97265, [styles.guildBanner, width, value15]);
const useToken = UseTokenModule.useToken;
const CHANNEL_LIST_TITLE_TEXT_STYLE = (Native).modules.mobile.CHANNEL_LIST_TITLE_TEXT_STYLE;
const value17 = Reflect.apply(useToken, UseTokenModule, [CHANNEL_LIST_TITLE_TEXT_STYLE]);
const items2 = [styles.headerContainer, value14];
const r5 = r11 != null && ((Component) => <Component style={value16} source={r11} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items3 = [styles.content];
r11 = r11 != null ? value15 - 48 : 0;
items3[1] = {marginTop: r11};
const items4 = [r9];
items4[1] = (
<View style={styles.nameRow}>
{((Component) => <Component guild={r22} />)(importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */)}
<Text
lineClamp={2}
accessibilityRole="header"
variant={value17}
color="mobile-text-heading-primary"
>
{name}
</Text>
</View>
</View>
);
}
);
items4[2] = (
description != null
? (
<Text
style={styles.description}
variant="text-sm/medium"
color="text-default"
>
{description}
</Text>
)
: null
);
items4[3] = (
<View style={styles.memberInfo}>
{
guildTraits.community
? (
<CommunityPill guildVisibility={guildTraits.visibility} />
)
: null
}
<View style={{'gap': 15, 'flexDirection': 'row'}}>
{r23 != null && ((Component) => <Component type="online" count={r23} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */)}
{r21 != null && ((Component) => <Component type="total" count={r21} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */)}
</View>
</View>
);
return (
<View style={items2}>
{r5}
<View style={items3}>
{items4}
</View>
</View>
);
function _fun97262() { // fn#97262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1953, offset: 0x02179c64, size: 105 bytes, params: 1, frame: 13
var r1;
var value3;
var moduleValue;
var value4;
var moduleValue2;
const binding = env0_2;
if (binding) {
r1 = !binding;
} else {
value3 = environment.__proto__;
moduleValue = require(1418) /* metro dependency 1418: GuildRecordUtils */;
r1 = moduleValue.isGuildRecord(guild);
}
if (r1) {
value4 = environment.__proto__;
moduleValue2 = require(12695) /* metro dependency 12695: GuildPopoutActionCreators */;
moduleValue2.fetchGuildForPopout(guild.id);
}
}
function CommunityPillOnPress() { // fn#97259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1472, owner: CommunityPill.onPress, offset: 0x0217958c, size: 69 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'SERVER_BADGE_DESCRIPTION_INVITE_ONLY',
content: env0_1, IconComponent: GlobeEarthIcon});
}
function _fun97265() { // fn#97265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:3078, offset: 0x02179d0d, size: 73 bytes, params: 1, frame: 13
const object = {};
copyDataProperties(object, styles.guildBanner, undefined);
object['width'] = width;
object['height'] = ReactNativeModule.View;
object['marginLeft'] = -width / 2;
return object;
}
function _fun97262() { // fn#97262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:1953, offset: 0x02179c64, size: 105 bytes, params: 1, frame: 13
var r1;
var value3;
var moduleValue;
var value4;
var moduleValue2;
const binding = env0_2;
if (binding) {
r1 = !binding;
} else {
value3 = environment.__proto__;
moduleValue = require(1418) /* metro dependency 1418: GuildRecordUtils */;
r1 = moduleValue.isGuildRecord(guild);
}
if (r1) {
value4 = environment.__proto__;
moduleValue2 = require(12695) /* metro dependency 12695: GuildPopoutActionCreators */;
moduleValue2.fetchGuildForPopout(guild.id);
}
}
function _fun97265() { // fn#97265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12883:3078, offset: 0x02179d0d, size: 73 bytes, params: 1, frame: 13
const object2 = {};
copyDataProperties(object2, styles.guildBanner, undefined);
object2['width'] = width;
object2['height'] = env0_4;
object2['marginLeft'] = -width / 2;
return object2;
}
global.__d(_fun97257, 12693, [31, 27, 12694, 1867, 6866, 661, 33, 4501, 697, 478, 1244, 6921, 6918, 9404, 6924,
5278, 3857, 1305, 4573, 7556, 566, 1418, 12695, 12696, 1478, 6819, 1423, 1457, 7701, 3860, 5475, 6915, 9720,
2]) /* metro module 12693, dependencies: [31, 27, 12694, 1867, 6866, 661, 33, 4501, 697, 478, 1244, 6921, 6918, 9404, 6924, 5278, 3857, 1305, 4573, 7556, 566, 1418, 12695, 12696, 1478, 6819, 1423, 1457, 7701, 3860, 5475, 6915, 9720, 2] */;
@@ -1,59 +1,61 @@
/* Metro module 9720; source: modules/guild_action_sheet/native/components/GuildActionSheetMemberCount.tsx; dependencies: [31, 27, 33, 4501, 697, 478, 1357, 1244, 4573, 2] */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun76373(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9906:6, offset: 0x01dcce82, size: 460 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const value2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value3 = require(33) /* metro dependency 33 */;
const env0_4 = value3.jsx;
const env0_5 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {wrapper: {'flexDirection': 'row', 'alignItems': 'center'}};
const object5 = {'width': 8, 'height': 8, 'borderRadius': null, 'marginRight': 4};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const createStyles = CreateStylesModule.createStyles;
object = {wrapper: {'flexDirection': 'row', 'alignItems': 'center'}};
const object2 = {'width': 8, 'height': 8, 'borderRadius': null, 'marginRight': 4};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const TEXT_STATUS_ONLINE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_ONLINE;
object5.backgroundColor = TEXT_STATUS_ONLINE;
object4.online = object5;
const object6 = {'width': 8, 'height': 8, 'borderRadius': null, 'marginRight': 4};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.backgroundColor = TEXT_STATUS_ONLINE;
object.online = object2;
const object3 = {'width': 8, 'height': 8, 'borderRadius': null, 'marginRight': 4};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const TEXT_STATUS_OFFLINE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_OFFLINE;
object6.backgroundColor = TEXT_STATUS_OFFLINE;
object4.total = object6;
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
object4.text = {textAlignVertical: 'center', lineHeight: platformUtilsModule.isAndroid() ? 12 : value};
const value7 = platformUtilsModule;
object4.refreshText = {textAlignVertical: 'center', lineHeight: value7.isAndroid() ? 14 : value};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
const value9 = value2.memo(MemberCount);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetMemberCount.tsx');
object3.backgroundColor = TEXT_STATUS_OFFLINE;
object.total = object3;
object.text = {textAlignVertical: 'center', lineHeight: PlatformUtilsModule.isAndroid() ? 12 : value};
object.refreshText = {textAlignVertical: 'center', lineHeight: PlatformUtilsModule.isAndroid() ? 14 : value};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value9 = ReactModule.memo(MemberCount);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetMemberCount.tsx');
exports.default = value9;
return value;
function MemberCount({type, count, color}) { // fn#76374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9906:635, offset: 0x01dcd04e, size: 455 bytes, params: 2, frame: 24
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = (MobileVisualRefreshExperiment)('GuildActionSheetMemberCount');
const r8 = count == null ? intl.string(type === 'online' ? (require(1244) /* metro dependency 1244: indexNative */).t['3DzP7x'] : (require(1244) /* metro dependency 1244: indexNative */).t['5SWsJX']) : intl.format(type === 'online' ? (require(1244) /* metro dependency 1244: indexNative */).t.PIikks : (require(1244) /* metro dependency 1244: indexNative */).t.etqpUG,
{count: count});
const styles = useStyles();
const view = <View style={styles[type]} />;
const Text = (TextModule).Text;
return (
<View style={styles.wrapper}>
{view}
<Text
variant={value2 ? 'text-sm/normal' : 'text-xs/medium'}
color={color ?? 'text-default'}
lineClamp={1}
style={value2 ? styles.refreshText : styles.text}
>
{r8}
</Text>
</View>
);
}
}
function MemberCount({type, count, color}) { // fn#76374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9906:635, offset: 0x01dcd04e, size: 455 bytes, params: 2, frame: 24
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildActionSheetMemberCount');
const r8 = count == null ? intl.string(type === 'online' ? (require(1244) /* metro dependency 1244: indexNative */).t['3DzP7x'] : (require(1244) /* metro dependency 1244: indexNative */).t['5SWsJX']) : intl.format(type === 'online' ? (require(1244) /* metro dependency 1244: indexNative */).t.PIikks : (require(1244) /* metro dependency 1244: indexNative */).t.etqpUG,
{count: count});
const styles = useStyles();
const view = <View style={styles[type]} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.wrapper}>
{view}
<Text
variant={value2 ? 'text-sm/normal' : 'text-xs/medium'}
color={color ?? 'text-default'}
lineClamp={1}
style={value2 ? styles.refreshText : styles.text}
>
{r8}
</Text>
</View>
);
}
global.__d(_fun76373, 9720, [31, 27, 33, 4501, 697, 478, 1357, 1244, 4573,
2]) /* metro module 9720, dependencies: [31, 27, 33, 4501, 697, 478, 1357, 1244, 4573, 2] */;
@@ -1,50 +1,59 @@
/* Metro module 12700; source: modules/guild_action_sheet/native/components/GuildActionSheetProgress.tsx; dependencies: [31, 33, 4501, 697, 11932, 6239, 12701, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun97324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12890:6, offset: 0x0217b502, size: 258 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.title = {color: TEXT_DEFAULT};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginHorizontal = PX_16;
object4.padding = 0;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object2.cardStyle = object4;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetProgress.tsx');
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
object.title = {color: TEXT_DEFAULT};
const object3 = {};
const PX_16 = (Native).space.PX_16;
object3.marginHorizontal = PX_16;
object3.padding = 0;
const PX_24 = (Native).space.PX_24;
object3.marginBottom = PX_24;
object.cardStyle = object3;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetProgress.tsx');
exports.default = GuildActionSheetProgress;
}
function GuildActionSheetProgress({guild}) { // fn#97325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12890:395, offset: 0x0217b604, size: 203 bytes, params: 2, frame: 19
var r0;
var Card;
var value;
const styles = useStyles();
const {completed,
dismissed} = (require(11932) /* metro dependency 11932: GuildProgressUtils */).useIOSCompletionStates(guild);
if ((require(11932) /* metro dependency 11932: GuildProgressUtils */).useIsEligibleForGuildProgress(guild)) {
if (completed) {
r0 = null;
} else if (dismissed) {
Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
var cardProps = {style: styles.cardStyle};
value = importDefault(12701) /* metro dependency 12701: GuildProgressOverview */;
value = <Card {...cardProps}>{((Component) => <Component guild={guild} titleStyle={styles.title} longPressDisabled resume />)(value)}</Card>;
r0 = value;
function GuildActionSheetProgress({guild}) { // fn#97325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12890:395, offset: 0x0217b604, size: 203 bytes, params: 2, frame: 19
var r0;
var Card;
var value;
const styles = useStyles();
const {completed,
dismissed} = (require(11932) /* metro dependency 11932: GuildProgressUtils */).useIOSCompletionStates(guild);
if ((require(11932) /* metro dependency 11932: GuildProgressUtils */).useIsEligibleForGuildProgress(guild)) {
if (completed) {
r0 = null;
} else if (dismissed) {
Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
var cardProps = {style: styles.cardStyle};
value = importDefault(12701) /* metro dependency 12701: GuildProgressOverview */;
value = (
<Card {...cardProps}>
{((Component) => <Component guild={guild} titleStyle={styles.title} longPressDisabled resume />)(value)}
</Card>
);
r0 = value;
} else {
r0 = null;
}
} else {
r0 = null;
}
} else {
r0 = null;
return r0;
}
return r0;
}
global.__d(_fun97324, 12700, [31, 33, 4501, 697, 11932, 6239, 12701,
2]) /* metro module 12700, dependencies: [31, 33, 4501, 697, 11932, 6239, 12701, 2] */;
@@ -1,13 +1,25 @@
/* Metro module 12699; source: modules/guild_action_sheet/native/components/GuildActionSheetTabItems.tsx; dependencies: [31, 1379, 1935, 1934, 661, 33, 12687, 8254, 566, 9154, 9151, 6261, 8341, 1244, 7958, 697, 4863, 4080, 6522, 10858, 8194, 6613, 7003, 9112, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildChannelStore from '../../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import AppAnalyticsUtils from '../../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import UseGuildPowerupsBoostCount from '../../../premium/powerups/hooks/useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ButtonGroupNativeModule from '../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BoostGemIconModule from '../../../../design/components/Icon/native/redesign/generated/BoostGemIcon.tsx'; /* Metro dependency 7958 */
import * as IconButtonNativeModule from '../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as InstantInviteUtilsModule from '../../../../utils/native/InstantInviteUtils.tsx'; /* Metro dependency 9154 */
import * as GuildActionSheetUtilsModule from '../GuildActionSheetUtils.tsx'; /* Metro dependency 12687 */
function _fun97316(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:6, offset: 0x0217ae47, size: 255 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.AnalyticsObjects;
const env0_10 = value.AnalyticsSections;
@@ -15,88 +27,104 @@ function _fun97316(global, require, importDefault, importAll, module, exports, d
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetTabItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/GuildActionSheetTabItems.tsx');
exports.default = _default_97317;
}
function _default_97317({guild}) { // fn#97317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:269, offset: 0x0217af46, size: 922 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const useGuildActionSheetPermissions = GuildActionSheetUtilsModule.useGuildActionSheetPermissions;
const canAccessSettings = Reflect.apply(useGuildActionSheetPermissions, GuildActionSheetUtilsModule,
[guild]).canAccessSettings;
const total = (UseGuildPowerupsBoostCount)(guild.id).total;
const channels = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore],
function() {
return GuildChannelStore.getChannels(guild.id);
});
const shouldRenderInvite2 = (InstantInviteUtilsModule).shouldRenderInvite(channels,
guild);
const env0_2 = ReactModule.useCallback(_fun97319, [channels, guild]);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const IconButton = (IconButtonNativeModule).IconButton;
const r10 = total > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['pob/cL'],
{subscriptions: total}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Uj0md3);
const BoostGemIcon = (BoostGemIconModule).BoostGemIcon;
const GUILD_BOOSTING_PINK = (Native).unsafe_rawColors.GUILD_BOOSTING_PINK;
const items2 = [
<IconButton
variant="secondary"
label={r10}
icon={<BoostGemIcon color={GUILD_BOOSTING_PINK} />}
grow
onPress={onPress_97320}
/>,
];
items2[1] = shouldRenderInvite2 && <IconButton variant="secondary" label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VINpSK)} icon={importDefault(10858) /* metro dependency 10858 */} grow onPress={onPress_97321} />;
const string = intl.string;
const HcoRu0 = (require(1244) /* metro dependency 1244: indexNative */).t.HcoRu0;
items2[2] = (
<IconButton
variant="secondary"
label={Reflect.apply(string, intl, [HcoRu0])}
icon={importDefault(8194) /* metro dependency 8194 */}
grow
onPress={onPress_97322}
/>
);
items2[3] = canAccessSettings && <IconButton variant="secondary" label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/'])} icon={importDefault(7003) /* metro dependency 7003 */} grow onPress={onPress_97323} />;
return (
<ButtonGroup direction="horizontal" style={{flexWrap: 'wrap'}}>
{items2}
</ButtonGroup>
);
function _fun97319() { // fn#97319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:482, offset: 0x0217b300, size: 174 bytes, params: 1, frame: 19
var moduleValue2;
const channelId = SelectedChannelStore.getChannelId(guild.id);
const getInviteChannelId = InstantInviteUtilsModule.getInviteChannelId;
const r3 = ChannelStore.getChannel(Reflect.apply(getInviteChannelId, InstantInviteUtilsModule, [channelId,
channels])) ?? GuildChannelStore.getDefaultChannel(guild.id);
if (r3 != null) {
moduleValue2 = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue2.handleOpenInviteActionsheet(guild, r3.id, channels, InstantInviteSources.SERVER_PROFILE);
}
}
function _default_97317({guild}) { // fn#97317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:269, offset: 0x0217af46, size: 922 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const guildActionSheetUtilsModule = require(12687) /* metro dependency 12687: GuildActionSheetUtils */;
const useGuildActionSheetPermissions = guildActionSheetUtilsModule.useGuildActionSheetPermissions;
const canAccessSettings = Reflect.apply(useGuildActionSheetPermissions, guildActionSheetUtilsModule,
[guild]).canAccessSettings;
const total = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild.id).total;
const channels = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore],
function() {
return GuildChannelStore.getChannels(guild.id);
});
const shouldRenderInvite2 = (require(9154) /* metro dependency 9154: InstantInviteUtils */).shouldRenderInvite(channels,
guild);
const env0_2 = env0_4.useCallback(_fun97319, [channels, guild]);
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const r10 = total > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['pob/cL'],
{subscriptions: total}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Uj0md3);
const BoostGemIcon = (require(7958) /* metro dependency 7958: BoostGemIcon */).BoostGemIcon;
const GUILD_BOOSTING_PINK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GUILD_BOOSTING_PINK;
const items2 = [<IconButton variant="secondary" label={r10} icon={<BoostGemIcon color={GUILD_BOOSTING_PINK} />} grow onPress={onPress_97320} />];
items2[1] = shouldRenderInvite2 && <IconButton variant="secondary" label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VINpSK)} icon={importDefault(10858) /* metro dependency 10858 */} grow onPress={onPress_97321} />;
const string = intl.string;
const HcoRu0 = (require(1244) /* metro dependency 1244: indexNative */).t.HcoRu0;
items2[2] = <IconButton variant="secondary" label={Reflect.apply(string, intl,
[HcoRu0])} icon={importDefault(8194) /* metro dependency 8194 */} grow onPress={onPress_97322} />;
items2[3] = canAccessSettings && <IconButton variant="secondary" label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/'])} icon={importDefault(7003) /* metro dependency 7003 */} grow onPress={onPress_97323} />;
return (
<ButtonGroup direction="horizontal" style={{flexWrap: 'wrap'}}>
{items2}
</ButtonGroup>
);
}
function _default_97317OnPress() { // fn#97320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1044, owner: _default_97317.onPress, offset: 0x0217b3ae, size: 148 bytes, params: 1, frame: 19
let value = environment.__proto__;
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const PREMIUM_GUILD_PROMOTION_OPENED = AnalyticEvents.PREMIUM_GUILD_PROMOTION_OPENED;
const GUILD_POPOUT = AnalyticsSections.GUILD_POPOUT;
const BOOST_GEM_ICON = AnalyticsObjects.BOOST_GEM_ICON;
Reflect.apply(trackWithMetadata, defaultImport, [PREMIUM_GUILD_PROMOTION_OPENED, {location: {section: GUILD_POPOUT,
object: BOOST_GEM_ICON}}]);
(ActionSheetActionCreators).hideActionSheet();
value = importAll(6522) /* metro dependency 6522: BoostingActionCreators */;
value.openApplyBoostModal(guild.id);
}
function _default_97317OnPress_97321() { // fn#97321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1357, owner: _default_97317.onPress, offset: 0x0217b442, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
env0_2();
}
function _default_97317OnPress_97322() { // fn#97322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1515, owner: _default_97317.onPress, offset: 0x0217b472, size: 72 bytes, params: 1, frame: 13
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
value.open(guild.id);
}
function _default_97317OnPress_97323() { // fn#97323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1695, owner: _default_97317.onPress, offset: 0x0217b4ba, size: 72 bytes, params: 1, frame: 13
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.open(guild.id);
}
function _fun97319() { // fn#97319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:482, offset: 0x0217b300, size: 174 bytes, params: 1, frame: 19
var moduleValue2;
const channelId = SelectedChannelStore.getChannelId(guild.id);
const instantInviteUtilsModule = require(9154) /* metro dependency 9154: InstantInviteUtils */;
const getInviteChannelId = instantInviteUtilsModule.getInviteChannelId;
const r3 = ChannelStore.getChannel(Reflect.apply(getInviteChannelId, instantInviteUtilsModule, [channelId,
channels])) ?? GuildChannelStore.getDefaultChannel(guild.id);
if (r3 != null) {
moduleValue2 = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue2.handleOpenInviteActionsheet(guild, r3.id, channels, InstantInviteSources.SERVER_PROFILE);
}
}
function _default_97317OnPress() { // fn#97320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1044, owner: _default_97317.onPress, offset: 0x0217b3ae, size: 148 bytes, params: 1, frame: 19
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const PREMIUM_GUILD_PROMOTION_OPENED = AnalyticEvents.PREMIUM_GUILD_PROMOTION_OPENED;
const GUILD_POPOUT = AnalyticsSections.GUILD_POPOUT;
const BOOST_GEM_ICON = AnalyticsObjects.BOOST_GEM_ICON;
Reflect.apply(trackWithMetadata, defaultImport, [PREMIUM_GUILD_PROMOTION_OPENED, {location: {section: GUILD_POPOUT,
object: BOOST_GEM_ICON}}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importAll(6522) /* metro dependency 6522: BoostingActionCreators */;
value.openApplyBoostModal(guild.id);
}
function _default_97317OnPress_97321() { // fn#97321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1357, owner: _default_97317.onPress, offset: 0x0217b442, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
env0_2();
}
function _default_97317OnPress_97322() { // fn#97322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1515, owner: _default_97317.onPress, offset: 0x0217b472, size: 72 bytes, params: 1, frame: 13
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
value.open(guild.id);
}
function _default_97317OnPress_97323() { // fn#97323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12889:1695, owner: _default_97317.onPress, offset: 0x0217b4ba, size: 72 bytes, params: 1, frame: 13
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.open(guild.id);
}
global.__d(_fun97316, 12699, [31, 1379, 1935, 1934, 661, 33, 12687, 8254, 566, 9154, 9151, 6261, 8341, 1244, 7958,
697, 4863, 4080, 6522, 10858, 8194, 6613, 7003, 9112,
2]) /* metro module 12699, dependencies: [31, 1379, 1935, 1934, 661, 33, 12687, 8254, 566, 9154, 9151, 6261, 8341, 1244, 7958, 697, 4863, 4080, 6522, 10858, 8194, 6613, 7003, 9112, 2] */;
@@ -1,39 +1,56 @@
/* Metro module 12688; source: modules/guild_action_sheet/native/components/LeaveServerAlert.tsx; dependencies: [661, 33, 4500, 1244, 4500, 9112, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AlertModalNativeModule from '../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun97233(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12878:6, offset: 0x021781c1, size: 154 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/components/LeaveServerAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/components/LeaveServerAlert.tsx');
exports.default = _default_97234;
function _default_97234({guild}) { // fn#97234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12878:156, offset: 0x0217825b, size: 464 bytes, params: 2, frame: 27
const AlertModal = (AlertModalNativeModule).AlertModal;
const object = {};
const features = guild.features;
const has = features.has;
const HUB = GuildFeatures.HUB;
const value2 = Reflect.apply(has, features, [HUB]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.title = value2 ? Reflect.apply(string, intl, [t.Dv8gFT]) : Reflect.apply(string, intl, [t.J2TBi3]);
const formatToPlainString = intl.formatToPlainString;
const TB1og8 = (require(1244) /* metro dependency 1244: indexNative */).t.TB1og8;
object.content = Reflect.apply(formatToPlainString, intl, [TB1og8, {name: guild.name}]);
const AlertActions = (AlertModalNativeModule).AlertActions;
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
object.actions = (
<AlertActions>
<AlertActionButton
variant="destructive"
onPress={onPress_97235}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.p89ACt)}
key="confirm"
/>
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gm1Vej)}
key="cancel"
/>
</AlertActions>
);
return <AlertModal {...object} />;
function _default_97234OnPress() { // fn#97235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12878:469, owner: _default_97234.onPress, offset: 0x0217842b, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
return value.leaveGuild(guild.id);
}
}
}
function _default_97234({guild}) { // fn#97234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12878:156, offset: 0x0217825b, size: 464 bytes, params: 2, frame: 27
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const object2 = {};
const features = guild.features;
const has = features.has;
const HUB = GuildFeatures.HUB;
const value2 = Reflect.apply(has, features, [HUB]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = value2 ? Reflect.apply(string, intl, [t.Dv8gFT]) : Reflect.apply(string, intl, [t.J2TBi3]);
const formatToPlainString = intl.formatToPlainString;
const TB1og8 = (require(1244) /* metro dependency 1244: indexNative */).t.TB1og8;
object2.content = Reflect.apply(formatToPlainString, intl, [TB1og8, {name: guild.name}]);
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
object2.actions = <AlertActions><AlertActionButton variant="destructive" onPress={onPress_97235} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.p89ACt)} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gm1Vej)} key="cancel" /></AlertActions>;
return <AlertModal {...object2} />;
}
function _default_97234OnPress() { // fn#97235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12878:469, owner: _default_97234.onPress, offset: 0x0217842b, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
return value.leaveGuild(guild.id);
}
global.__d(_fun97233, 12688, [661, 33, 4500, 1244, 4500, 9112,
2]) /* metro module 12688, dependencies: [661, 33, 4500, 1244, 4500, 9112, 2] */;
@@ -1,62 +1,64 @@
/* Metro module 12681; source: modules/guild_action_sheet/native/openGuildActionSheet.tsx; dependencies: [661, 6892, 683, 8581, 4080, 12682, 1962, 12692, 12698, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun97162(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12871:6, offset: 0x021753af, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.AnalyticEvents;
const env0_4 = constantsModule.GuildFeatures;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/openGuildActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/openGuildActionSheet.tsx');
exports.default = openGuildActionSheet;
}
function openGuildActionSheet(a0) { // fn#97163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12871:245, offset: 0x02175435, size: 448 bytes, params: 2, frame: 22
var defaultImport;
var track;
var OPEN_POPOUT;
var moduleValue2;
var shouldNSFWGateGuild;
var features;
var value2;
var defaultImport2;
var openLazy;
var defaultImport3;
let value = a1;
const r8 = !(value !== undefined) || value;
const moduleValue = require(dependencyMap[1]);
const isFavoritesGuildId = moduleValue.isFavoritesGuildId;
let id = a0.id;
if (!Reflect.apply(isFavoritesGuildId, moduleValue, [id])) {
defaultImport = importDefault(dependencyMap[2]);
track = defaultImport.track;
OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
id = a0.id;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Guild Profile', guild_id: id}]);
moduleValue2 = require(dependencyMap[3]);
shouldNSFWGateGuild = moduleValue2.shouldNSFWGateGuild;
id = a0.id;
if (Reflect.apply(shouldNSFWGateGuild, moduleValue2, [id])) {
defaultImport3 = importDefault(dependencyMap[4]);
openLazy = defaultImport3.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport3, [value, 'NsfwGateGuildSettingsActionSheet', {guild: a0}]);
} else {
features = a0.features;
value2 = features.has(GuildFeatures.HUB);
defaultImport2 = importDefault(dependencyMap[4]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[6]);
if (value2) {
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildActionSheet:' + a0.id, {guild: a0,
expanded: r8}]);
function openGuildActionSheet(a0) { // fn#97163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12871:245, offset: 0x02175435, size: 448 bytes, params: 2, frame: 22
var defaultImport;
var track;
var OPEN_POPOUT;
var moduleValue2;
var shouldNSFWGateGuild;
var features;
var value2;
var defaultImport2;
var openLazy;
var defaultImport3;
let value = a1;
const r8 = !(value !== undefined) || value;
const moduleValue = require(dependencyMap[1]);
const isFavoritesGuildId = moduleValue.isFavoritesGuildId;
let id = a0.id;
if (!Reflect.apply(isFavoritesGuildId, moduleValue, [id])) {
defaultImport = importDefault(dependencyMap[2]);
track = defaultImport.track;
OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
id = a0.id;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Guild Profile', guild_id: id}]);
moduleValue2 = require(dependencyMap[3]);
shouldNSFWGateGuild = moduleValue2.shouldNSFWGateGuild;
id = a0.id;
if (Reflect.apply(shouldNSFWGateGuild, moduleValue2, [id])) {
defaultImport3 = importDefault(dependencyMap[4]);
openLazy = defaultImport3.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport3, [value, 'NsfwGateGuildSettingsActionSheet', {guild: a0}]);
} else {
value = value(dependencyMap[8], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildActionSheet:' + a0.id, {guild: a0,
expanded: r8}]);
features = a0.features;
value2 = features.has(GuildFeatures.HUB);
defaultImport2 = importDefault(dependencyMap[4]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[6]);
if (value2) {
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildActionSheet:' + a0.id, {guild: a0,
expanded: r8}]);
} else {
value = value(dependencyMap[8], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildActionSheet:' + a0.id, {guild: a0,
expanded: r8}]);
}
}
}
}
}
global.__d(_fun97162, 12681, [661, 6892, 683, 8581, 4080, 12682, 1962, 12692, 12698,
2]) /* metro module 12681, dependencies: [661, 6892, 683, 8581, 4080, 12682, 1962, 12692, 12698, 2] */;
@@ -1,103 +1,112 @@
/* Metro module 12696; source: modules/guild_action_sheet/native/useGuildHeaderCounts.tsx; dependencies: [31, 4111, 12697, 22, 694, 566, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import GuildMemberCountStore from '../../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import GuildHeaderCountsStore from './GuildHeaderCountsStore.tsx'; /* Metro dependency 12697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun97284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:6, offset: 0x0217a31e, size: 164 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const guildHeaderCountsStore = importDefault(12697) /* metro dependency 12697: GuildHeaderCountsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_action_sheet/native/useGuildHeaderCounts.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_action_sheet/native/useGuildHeaderCounts.tsx');
exports.useGuildHeaderCounts = useGuildHeaderCounts;
}
function useThrottledDispatch(a0, a1, a2) { // fn#97285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:126, offset: 0x0217a3c2, size: 132 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = env0_3.useMemo(_fun97286, [a0, a1]);
var env0_3 = value2;
env0_3.useEffect(function() {
return _fun97289;
}, [value2]);
env0_3.useEffect(_fun97290, [value2, a2]);
function _fun97286() { // fn#97286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:180, offset: 0x0217a446, size: 54 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (Module00022Module).throttle(_fun97287, 3000);
function _fun97287(a0) { // fn#97287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:202, offset: 0x0217a47c, size: 65 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
(Dispatcher).dispatch({type: env1_0, count: a0, guildId: require});
}
function useThrottledDispatch(a0, a1, a2) { // fn#97285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:126, offset: 0x0217a3c2, size: 132 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = env0_3.useMemo(_fun97286, [a0, a1]);
var env0_3 = value2;
env0_3.useEffect(function() {
return _fun97289;
}, [value2]);
env0_3.useEffect(_fun97290, [value2, a2]);
}
}
function useGuildHeaderCounts(a0) { // fn#97291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:456, offset: 0x0217a4fb, size: 107 bytes, params: 2, frame: 16
let env0_0 = a0;
const object2 = {memberCount: ((a0) => {
var env0_0 = a0;
useThrottledDispatch('GUILD_HEADER_MEMBER_COUNT', a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore], _fun97293));
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildHeaderCountsStore], _fun97294);
})(a0), onlineCount: ((a0) => {
var env0_0 = a0;
useThrottledDispatch('GUILD_HEADER_ONLINE_COUNT', a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore], _fun97296));
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildHeaderCountsStore], _fun97297);
})(a0)};
object2.activeChannelsCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildHeaderCountsStore],
_fun97298);
return object2;
}
function _fun97288() { // fn#97288, offset: 0x0217a4bd, size: 11 bytes, params: 1, frame: 1
return _fun97289;
function _fun97289() { // fn#97289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:283, offset: 0x0217a4c8, size: 19 bytes, params: 1, frame: 9
return env1_3.cancel();
}
function _fun97286() { // fn#97286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:180, offset: 0x0217a446, size: 54 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (require(22) /* metro dependency 22 */).throttle(_fun97287, 3000);
}
}
function _fun97288() { // fn#97288, offset: 0x0217a4bd, size: 11 bytes, params: 1, frame: 1
return _fun97289;
}
function _fun97290() { // fn#97290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:317, offset: 0x0217a4db, size: 32 bytes, params: 1, frame: 11
if (importDefault > 0) {
env0_3(importDefault);
}
}
function _fun97290() { // fn#97290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:317, offset: 0x0217a4db, size: 32 bytes, params: 1, frame: 11
if (importDefault > 0) {
env0_3(importDefault);
}
function useGuildHeaderCounts(a0) { // fn#97291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:456, offset: 0x0217a4fb, size: 107 bytes, params: 2, frame: 16
let env0_0 = a0;
const object = {memberCount: ((a0) => {
var env0_0 = a0;
useThrottledDispatch('GUILD_HEADER_MEMBER_COUNT', a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore], _fun97293));
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildHeaderCountsStore], _fun97294);
})(a0), onlineCount: ((a0) => {
var env0_0 = a0;
useThrottledDispatch('GUILD_HEADER_ONLINE_COUNT', a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore], _fun97296));
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildHeaderCountsStore], _fun97297);
})(a0)};
object.activeChannelsCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildHeaderCountsStore],
_fun97298);
return object;
function useMemberCount(a0) { // fn#97292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:495, owner: useGuildHeaderCounts.useMemberCount, offset: 0x0217a566, size: 122 bytes, params: 2, frame: 21
const env0_0 = a0;
const useStateFromStores = FluxModule.useStateFromStores;
useThrottledDispatch('GUILD_HEADER_MEMBER_COUNT', a0, Reflect.apply(useStateFromStores, FluxModule,
[[GuildMemberCountStore], _fun97293]));
return FluxModule.useStateFromStores([GuildHeaderCountsStore], _fun97294);
function _fun97293() { // fn#97293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:560, offset: 0x0217a5e0, size: 41 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return GuildMemberCountStore.getMemberCount(env0_0) ?? 0;
}
function _fun97294() { // fn#97294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:708, offset: 0x01fef381, size: 27 bytes, params: 1, frame: 11
return GuildHeaderCountsStore.getMemberCount(env0_0);
}
}
function useOnlineCount(a0) { // fn#97295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:740, owner: useGuildHeaderCounts.useOnlineCount, offset: 0x0217a609, size: 122 bytes, params: 2, frame: 21
const env0_0 = a0;
const useStateFromStores = FluxModule.useStateFromStores;
useThrottledDispatch('GUILD_HEADER_ONLINE_COUNT', a0, Reflect.apply(useStateFromStores, FluxModule,
[[GuildMemberCountStore], _fun97296]));
return FluxModule.useStateFromStores([GuildHeaderCountsStore], _fun97297);
function _fun97296() { // fn#97296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:805, offset: 0x0217a683, size: 41 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return GuildMemberCountStore.getOnlineCount(env0_0) ?? 0;
}
function _fun97297() { // fn#97297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:953, offset: 0x0217a6ac, size: 27 bytes, params: 1, frame: 11
return GuildHeaderCountsStore.getOnlineCount(env0_0);
}
}
function _fun97298() { // fn#97298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:1070, offset: 0x0217a6c7, size: 29 bytes, params: 1, frame: 11
return GuildHeaderCountsStore.getActiveChannelsCount(env0_0);
}
}
}
function useMemberCount(a0) { // fn#97292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:495, owner: useGuildHeaderCounts.useMemberCount, offset: 0x0217a566, size: 122 bytes, params: 2, frame: 21
const env0_0 = a0;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
useThrottledDispatch('GUILD_HEADER_MEMBER_COUNT', a0, Reflect.apply(useStateFromStores, fluxModule,
[[GuildMemberCountStore], _fun97293]));
return fluxModule.useStateFromStores([GuildHeaderCountsStore], _fun97294);
}
function useOnlineCount(a0) { // fn#97295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:740, owner: useGuildHeaderCounts.useOnlineCount, offset: 0x0217a609, size: 122 bytes, params: 2, frame: 21
const env0_0 = a0;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
useThrottledDispatch('GUILD_HEADER_ONLINE_COUNT', a0, Reflect.apply(useStateFromStores, fluxModule,
[[GuildMemberCountStore], _fun97296]));
return fluxModule.useStateFromStores([GuildHeaderCountsStore], _fun97297);
}
function _fun97298() { // fn#97298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:1070, offset: 0x0217a6c7, size: 29 bytes, params: 1, frame: 11
return GuildHeaderCountsStore.getActiveChannelsCount(env0_0);
}
function _fun97287(a0) { // fn#97287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:202, offset: 0x0217a47c, size: 65 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: env1_0, count: a0, guildId: require});
}
function _fun97289() { // fn#97289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:283, offset: 0x0217a4c8, size: 19 bytes, params: 1, frame: 9
return env1_3.cancel();
}
function _fun97293() { // fn#97293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:560, offset: 0x0217a5e0, size: 41 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return GuildMemberCountStore.getMemberCount(env0_0) ?? 0;
}
function _fun97296() { // fn#97296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:805, offset: 0x0217a683, size: 41 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return GuildMemberCountStore.getOnlineCount(env0_0) ?? 0;
}
function _fun97297() { // fn#97297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12886:953, offset: 0x0217a6ac, size: 27 bytes, params: 1, frame: 11
return GuildHeaderCountsStore.getOnlineCount(env0_0);
}
global.__d(_fun97284, 12696, [31, 4111, 12697, 22, 694, 566,
2]) /* metro module 12696, dependencies: [31, 4111, 12697, 22, 694, 566, 2] */;