Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,8 @@
/* Metro module 15747; source: modules/interaction_components/native/InteractionIframeConstants.tsx; dependencies: [2] */
function _fun120931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15955:6, offset: 0x0253aa71, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/InteractionIframeConstants.tsx');
exports.INTERACTION_IFRAME_MODAL_KEY = 'interaction_iframe_modal';
}
@@ -0,0 +1,102 @@
/* Metro module 15748; source: modules/interaction_components/native/InteractionIframeModal.tsx; dependencies: [57, 31, 27, 4238, 33, 4501, 697, 15736, 5463, 7717, 15749, 4571, 3857, 1244, 10709, 10716, 5278, 4066, 4573, 8706, 2] */
function _fun120932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:6, offset: 0x0253aac5, size: 378 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(4238) /* metro dependency 4238: ApplicationConstants */).BotTagTypes;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, value, [{wrapper: {backgroundColor: BACKGROUND_SURFACE_HIGH, flex: 1},
header: {'flexDirection': 'row', 'padding': 16, 'justifyContent': 'space-between', 'alignItems': 'center'},
headerCenterContainer: {'flexDirection': 'column', 'alignItems': 'center'},
headerTitleContainer: {'flexDirection': 'row', 'marginBottom': 2}, closeButton: {marginEnd: 8},
spacerView: {'marginStart': 8, 'width': 32}, botTag: {marginStart: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/InteractionIframeModal.tsx');
exports.default = InteractionIframeModal;
}
function InteractionIframeModal(a0) { // fn#120933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:688, offset: 0x0253ac3f, size: 944 bytes, params: 2, frame: 29
const value2 = undefined;
const styles = useStyles();
const application = a0.application;
const title = a0.title;
const id = application.id;
const {queryParams,
iframeUrl} = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useIframeModalState(a0);
const binding = env0_4;
const [property, env0_1] = env0_3(binding.useState(false), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
binding.useLayoutEffect(_fun120934, []);
let useCallback = binding.useCallback;
const value6 = Reflect.apply(useCallback, binding, [_fun120936, [id]]);
useCallback = binding.useCallback;
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(Reflect.apply(useCallback, binding,
[_fun120937, [value6]]));
const value8 = null;
const r5 = property ? value8 : ((Component) => <Component onActivityCrash={onActivityCrash} applicationId={application.id} channelId={queryParams.channel_id} guildId={queryParams.guild_id} activityUrl={iframeUrl} activitySessionId={queryParams.instance_id} queryParams={queryParams} onLoadError={onLoadError} allowPopups={(require(10716) /* metro dependency 10716: allowPopups */).allowPopups(application)} referrerPolicy="origin" isPipOrGridMode={false} webViewKey={value2} ignoreSilentHardwareSwitch={false} />)(importDefault(10709) /* metro dependency 10709: EmbeddedActivityWebView */);
const items3 = [styles.wrapper];
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const XLargeIcon = (require(4066) /* metro dependency 4066: XLargeIcon */).XLargeIcon;
const items2 = [<PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
[cpT0Cq])} onPress={value6} style={styles.closeButton}><XLargeIcon /></PressableOpacity>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-sm/bold" color="mobile-text-heading-primary">{application.name}</Text>;
const BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
const BOT = BotTagTypes.BOT;
const bot = application.bot;
items2[1] = <View style={styles.headerCenterContainer}><View style={styles.headerTitleContainer}>{text}<BotTag type={BOT} verified={value8 == bot ? value2 : bot.verified} style={styles.botTag} /></View><Text variant="text-xs/medium" color="interactive-text-default">{title}</Text></View>;
items2[2] = <View style={styles.spacerView} />;
return (
<View style={items3}>
<View style={styles.header}>
{items2}
</View>
{r5}
</View>
);
}
function _fun120934() { // fn#120934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:935, offset: 0x0253afef, size: 51 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT');
return _fun120935;
}
function _fun120936() { // fn#120936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1045, offset: 0x0253b047, size: 40 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(15749) /* metro dependency 15749: closeIFrameModalNative */)(id, undefined);
}
function InteractionIframeModalOnActivityCrash() { // fn#120938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1176, owner: InteractionIframeModal.onActivityCrash, offset: 0x0253b06f, size: 43 bytes, params: 1, frame: 13
env0_1(true);
global.setTimeout(_fun120939, 0);
}
function onLoadError() { // fn#120940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1347, owner: InteractionIframeModal.onLoadError, offset: 0x0253b09a, size: 118 bytes, params: 1, frame: 17
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HehpFW = (require(1244) /* metro dependency 1244: indexNative */).t.HehpFW;
Reflect.apply(open, defaultImport, [{key: 'interaction_iframe_modal', content: Reflect.apply(string, intl,
[HehpFW])}]);
env0_2();
}
function _fun120935() { // fn#120935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:976, offset: 0x0253b022, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
@@ -0,0 +1,112 @@
/* Metro module 15735; source: modules/interaction_components/native/InteractionModal.tsx; dependencies: [31, 27, 12952, 33, 4501, 697, 5080, 15736, 5463, 1305, 1423, 4573, 5278, 1244, 5312, 8357, 15737, 4578, 2] */
function _fun120822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:6, offset: 0x02536740, size: 574 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = InteractionModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
const env0_5 = (require(12952) /* metro dependency 12952: InteractionModalStore */).InteractionModalState;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.modal = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object2.scroll = {flex: 1};
const object3 = {flexGrow: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.gap = PX_16;
object2.modalContent = object3;
const object6 = {flexDirection: 'row'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
object2.header = object6;
object2.titleView = {flex: 1};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.icon = {marginRight: PX_8};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.footer = {marginTop: 'auto', marginBottom: PX_16};
object2.closeButton = {marginLeft: 'auto'};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.closeIcon = {color: TEXT_MUTED};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.error = {marginBottom: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/InteractionModal.tsx');
exports.default = closure;
exports.openInteractionModal = function(a0) {
importDefault(dependencyMap[6]).push(InteractionModal, a0, 'interaction_modal');
};
}
function InteractionModal(a0) { // fn#120823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:782, offset: 0x0253697e, size: 1138 bytes, params: 2, frame: 42
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
const styles = useStyles();
const title = a0.title;
const {components, applicationIconURL, applicationName, submissionState, error, validators, validationErrors,
setValidationErrors,
onSubmit} = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useModalState(a0,
onClose_120824);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const items3 = [styles.modal];
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {style: styles.icon,
source: (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(applicationIconURL)};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
avatarProps.size = SMALL;
const items2 = [<Avatar {...avatarProps} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.titleView}><Text variant="heading-xl/semibold" color="mobile-text-heading-primary">{title}</Text></View>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
onClose_120824Binding = onClose_120824;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
items2[2] = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
[cpT0Cq])} onPress={onClose_120824Binding} style={styles.closeButton}><XSmallIcon color={styles.closeIcon.color} /></PressableOpacity>;
const view = <View style={styles.header}>{items2}</View>;
const value5 = null;
const r18 = value5 != error ? error === '' ? value5 : <View style={styles.error}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.ERROR}>{error}</HelpMessage></View> : value5;
const HelpMessageTypes = (require(1305) /* metro dependency 1305: native */).HelpMessageTypes;
const WARNING = HelpMessageTypes.WARNING;
const items5 = [<View>{r18}<HelpMessage messageType={WARNING}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['dSTy/w'],
{applicationName: applicationName})}</HelpMessage></View>];
const ComponentStateContextProvider = (require(8357) /* metro dependency 8357: ComponentStateContext */).ComponentStateContextProvider;
items5[1] = <ComponentStateContextProvider modal={a0} validators={validators} validationErrors={validationErrors} setValidationErrors={setValidationErrors}>{(require(15737) /* metro dependency 15737: renderComponents */).renderComponents(components)}</ComponentStateContextProvider>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const geKm7t = (require(1244) /* metro dependency 1244: indexNative */).t.geKm7t;
const IN_FLIGHT = InteractionModalState.IN_FLIGHT;
items5[2] = <View style={styles.footer}><Button text={Reflect.apply(string, intl,
[geKm7t])} loading={submissionState === IN_FLIGHT} size="lg" onPress={onSubmit} /></View>;
return (
<View style={items3}>
{view}
<ScrollView
style={styles.scroll}
contentContainerStyle={styles.modalContent}
keyboardShouldPersistTaps="handled"
>
{items5}
</ScrollView>
</View>
);
}
function onClose_120824() { // fn#120824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:756, offset: 0x02536df0, size: 44 bytes, params: 1, frame: 11
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('interaction_modal');
}
@@ -0,0 +1,156 @@
/* Metro module 8364; source: modules/interaction_components/native/NativeSearchableSelectActionComponentUtils.tsx; dependencies: [1379, 1938, 1867, 1878, 661, 4633, 1360, 1426, 6794, 8365, 673, 697, 8366, 6647, 2] */
function _fun66601(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:6, offset: 0x01c02405, size: 215 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = getChannelIconData;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.ChannelTypes;
const env0_8 = constantsModule.DEFAULT_ROLE_COLOR;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/NativeSearchableSelectActionComponentUtils.tsx');
exports.transformSearchableSelectOptions = function(a0, a1) {
var env0_0 = a1;
var env0_1 = GuildStore.getGuild(a1);
return a0.map(_fun66604).filter(require(dependencyMap[6]).isNotNullish);
};
exports.getChannelIconData = closure;
}
function getChannelIconData(a0, a1) { // fn#66602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:186, offset: 0x01c024dc, size: 88 bytes, params: 3, frame: 14
var r0;
const type = a0.type;
var value;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (type === GUILD_CATEGORY) {
r0 = importDefault(8366) /* metro dependency 8366 */;
} else {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
value = value.getChannelIconWithGuild(a0, a1);
r0 = value;
}
return r0;
}
function transformSearchableSelectOptions(a0, a1) { // fn#66603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:453, offset: 0x01c02534, size: 91 bytes, params: 3, frame: 14
const env0_0 = a1;
const env0_1 = GuildStore.getGuild(a1);
const value2 = a0.map(_fun66604);
return value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun66604(a0) { // fn#66604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:534, offset: 0x01c0258f, size: 835 bytes, params: 2, frame: 23
var r0;
var r6;
var r1;
var r8;
var binding;
var value5;
var object2;
var value7;
var moduleValue;
var customIconSrc;
var unicodeEmoji;
var value13;
let value = a0;
const type = value.type;
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
const USER = SelectOptionType.USER;
if (USER === type) {
value13 = UserStore.getUser(value.value);
if (value13 == null) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
value = require(1426) /* metro dependency 1426: AvatarUtils */;
object2['iconSrc'] = value.ensureAvatarSource(value13.getAvatarSource(require, false)).uri;
r0 = object2;
}
return r0;
}
const ROLE = SelectOptionType.ROLE;
if (ROLE === type) {
binding = env0_1;
value7 = null;
r6 = value7 != binding ? GuildRoleStore.getRole(binding.id, value.value) : value7;
if (value7 == r6) {
r0 = value;
} else if (value7 == binding) {
r0 = value;
} else {
moduleValue = require(6794) /* metro dependency 6794: RoleIconUtils */;
r1 = moduleValue.canGuildUseRoleIcons(binding,
r6) ? (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(r6) : value7;
if (value7 == r1) {
object2 = {};
copyDataProperties(object2, value, undefined);
value = require(1426) /* metro dependency 1426: AvatarUtils */;
object2['iconSrc'] = value.ensureAvatarSource(importDefault(8365) /* metro dependency 8365 */).uri;
if (value7 != r6.colorString) {
value = require(673) /* metro dependency 673: ColorUtils */;
value = value.hex2int(r6.colorString);
r8 = value;
} else {
r8 = DEFAULT_ROLE_COLOR;
}
object2['iconColor'] = 4278190080 | r8;
r0 = object2;
} else {
customIconSrc = r1.customIconSrc;
unicodeEmoji = r1.unicodeEmoji;
if (value7 != unicodeEmoji) {
object2 = {};
copyDataProperties(object2, value, undefined);
object2['iconEmoji'] = {id: unicodeEmoji.id, name: unicodeEmoji.name,
animated: unicodeEmoji.animated,
src: unicodeEmoji.url, surrogates: unicodeEmoji.surrogates};
r0 = object2;
} else if (value7 != customIconSrc) {
object2 = {};
copyDataProperties(object2, value, undefined);
object2['iconSrc'] = customIconSrc;
r0 = object2;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
value = require(1426) /* metro dependency 1426: AvatarUtils */;
object2['iconSrc'] = value.ensureAvatarSource(importDefault(8365) /* metro dependency 8365 */).uri;
if (value7 != r6.colorString) {
value = require(673) /* metro dependency 673: ColorUtils */;
value = value.hex2int(r6.colorString);
r8 = value;
} else {
r8 = DEFAULT_ROLE_COLOR;
}
object2['iconColor'] = 4278190080 | r8;
r0 = object2;
}
}
}
return r0;
}
const CHANNEL = SelectOptionType.CHANNEL;
if (CHANNEL === type) {
binding = env0_1;
value5 = ChannelStore.getChannel(value.value);
if (value5 == null) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
value = require(1426) /* metro dependency 1426: AvatarUtils */;
object2['iconSrc'] = value.ensureAvatarSource(getChannelIconData(value5, binding)).uri;
value = require(673) /* metro dependency 673: ColorUtils */;
value = value.hex2int((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_330);
object2['iconColor'] = 4278190080 | value;
r0 = object2;
}
return r0;
}
return null;
}
@@ -0,0 +1,21 @@
/* Metro module 14255; source: modules/interaction_components/native/SelectMenuNativeComponent.tsx; dependencies: [31, 27, 33, 4020, 14256, 2] */
function _fun107843(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14452:6, offset: 0x0230ac9a, size: 198 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const env0_0 = (require(33) /* metro dependency 33 */).jsx;
let value = require(4020) /* metro dependency 4020: FabricUtils */;
if (value.isFabric()) {
value = importDefault(14256) /* metro dependency 14256: SelectActionComponentViewNativeComponent */;
} else {
value = requireNativeComponent('DCDSelectActionComponentView');
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/SelectMenuNativeComponent.tsx');
exports.default = SelectMenuNativeComponent;
}
function SelectMenuNativeComponent(a0) { // fn#107844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14452:325, offset: 0x0230ad60, size: 54 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} {...{['style']: {width: '100%'}}} />)(env0_1);
}
@@ -0,0 +1,46 @@
/* Metro module 15745; source: modules/interaction_components/native/actions/CheckboxActionComponent.tsx; dependencies: [31, 33, 8357, 44, 1909, 9402, 2] */
function _fun120922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:6, offset: 0x0253a6ef, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun120923);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxActionComponent.tsx');
exports.default = value;
}
function _fun120923(a0) { // fn#120923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:130, offset: 0x0253a787, size: 360 bytes, params: 2, frame: 22
let type = a0.type;
const property = a0.default;
const value2 = undefined;
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
(importDefault(44) /* metro dependency 44 */)(value3 != null,
'CheckboxActionComponent must be rendered inside a ComponentStateContext');
const value4 = value3.useComponentState(a0, property != null ? {type: type, value: property} : value2);
const state = value4.state;
const env0_2 = value4.executeStateUpdate;
const value5 = env0_3.useMemo(function() {
return state?.type === type && state.value;
}, [state, type]);
const parents = value3.getParents(a0);
const r7 = parents == null ? value2 : parents[0];
type = r7 == null ? value2 : r7.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const LABEL = ComponentType.LABEL;
const r6 = type !== LABEL ? value2 : r7;
(importDefault(44) /* metro dependency 44 */)(r6 != null,
'CheckboxActionComponent must be a child of a Label component');
const Checkbox = (require(9402) /* metro dependency 9402: CheckboxNative */).Checkbox;
return (
<Checkbox
label={r6.label}
description={r6.description}
checked={value5}
onToggle={function(a0) {
executeStateUpdate({type: type, value: a0});
}}
/>
);
}
@@ -0,0 +1,78 @@
/* Metro module 15744; source: modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx; dependencies: [31, 33, 8357, 6231, 8950, 2] */
function _fun120913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:6, offset: 0x0253a407, size: 145 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun120914);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx');
exports.default = value;
}
function _fun120914(a0) { // fn#120914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:130, offset: 0x0253a498, size: 254 bytes, params: 2, frame: 21
const type = a0.type;
const options = a0.options;
const env0_2 = a0.maxValues;
const value2 = env0_2.useMemo(_fun120915, [options]);
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value2.length > 0 ? {type: type, values: value2} : undefined);
const state = value4.state;
const env0_4 = value4.executeStateUpdate;
const env0_5 = env0_2.useMemo(function() {
return state?.type === type ? state.values : [];
}, [state, type]);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{options.map(_fun120919)}
</TableRowGroup>
);
}
function _fun120915() { // fn#120915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:194, offset: 0x0253a596, size: 45 bytes, params: 1, frame: 12
return options.filter(function(a0) {
return a0.default;
}).map(function(a0) {
return a0.value;
});
}
function _fun120919(a0) { // fn#120919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:472, offset: 0x0253a5f7, size: 149 bytes, params: 2, frame: 19
const binding = env0_5;
const value3 = binding.includes(a0.value);
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
const label = a0.label;
const description = a0.description;
const env0_0 = a0.value;
return (
<TableCheckboxRow
label={label}
subLabel={description}
checked={value3}
onPress={onPress_120920}
disabled={env0_5.length >= maxValues && !value3}
key={a0.value}
/>
);
}
function onPress_120920(a0) { // fn#120920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:605, offset: 0x0253a68c, size: 99 bytes, params: 2, frame: 15
var r0;
var items;
var value4;
const binding = env1_5;
if (a0) {
items = [];
value4 = arraySpread(items, binding, 0, binding);
items[value4] = value;
value4 + 1;
r0 = items;
} else {
r0 = binding.filter(function(a0) {
return a0 !== value;
});
}
executeStateUpdate({type: type, values: r0});
}
@@ -0,0 +1,502 @@
/* Metro module 15741; source: modules/interaction_components/native/actions/FileUploadActionComponent.tsx; dependencies: [5, 31, 27, 1379, 4645, 661, 33, 4501, 4136, 6238, 13164, 1244, 4073, 11143, 8341, 5312, 8357, 44, 566, 4697, 4655, 15742, 1909, 4647, 4660, 11543, 4627, 7879, 11096, 1848, 11095, 4658, 4572, 697, 6231, 2] */
function _fun120866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:6, offset: 0x02538a33, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_120869 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
let value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({defaultAttachmentIconWrapper: {'width': 32,
'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/FileUploadActionComponent.tsx');
exports.default = FileUploadActionComponent;
}
function _createForOfIteratorHelperLoose_120867(a0, a1) { // fn#120867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:212, offset: 0x02538b91, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun120868;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_120869(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_120869(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_120869(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun120868;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function MainAreaCanUpload({openFilePicker, minValues, maxValues, maxSizeBytes}) { // fn#120870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1213, offset: 0x02538d05, size: 499 bytes, params: 2, frame: 25
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
const formatSize = fileSizeUtilsModule.formatSize;
const BYTE_IN_KB = fileSizeUtilsModule.BYTE_IN_KB;
const value3 = Reflect.apply(formatSize, fileSizeUtilsModule,
[maxSizeBytes / BYTE_IN_KB, {'useKibibytes': true, 'useSpace': true}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {onPress: openFilePicker};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
const FileUpIcon = (require(13164) /* metro dependency 13164: FileUpIcon */).FileUpIcon;
object2.icon = <Icon IconComponent={FileUpIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['/2JwTv'],
{maxValues: maxValues});
object2.subLabel = minValues > 1 ? minValues === maxValues ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.SAr31z,
{minValues: minValues,
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['ZG+3Ck'],
{minValues: minValues, maxValues: maxValues,
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.tyxwW1,
{maxValues: maxValues, maxSize: value3});
object2.start = true;
object2.end = true;
object2.arrow = true;
return <TableRow {...object2} />;
}
function MainAreaLimitReached() { // fn#120871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1808, offset: 0x02538ef8, size: 224 bytes, params: 1, frame: 19
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {'icon': null, 'label': null, 'subLabel': null, 'disabled': true, 'start': true, 'end': true};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
object2.icon = <Icon IconComponent={CircleCheckIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['0PhgpK']]);
string = intl.string;
const HYg2Hn = (require(1244) /* metro dependency 1244: indexNative */).t.HYg2Hn;
object2.subLabel = Reflect.apply(string, intl, [HYg2Hn]);
return <TableRow {...object2} />;
}
function File({upload, handleRemoveFile}) { // fn#120872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2073, offset: 0x02538fd8, size: 472 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const AttachmentPreview = importDefault(11143) /* metro dependency 11143: AttachmentPreview */;
const uri = upload.item.uri;
const isImage = upload.isImage;
const isVideo = upload.isVideo;
const AttachmentIcon = (require(11143) /* metro dependency 11143: AttachmentPreview */).AttachmentIcon;
object2.icon = <AttachmentPreview uri={uri} isImage={isImage} isVideo={isVideo} width={32} height={32} defaultPreview={<View style={styles.defaultAttachmentIconWrapper}><AttachmentIcon fileName={upload.filename} /></View>} />;
object2.label = upload.filename ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZMirp0);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const object3 = {'variant': 'tertiary', 'size': 'sm'};
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object3.icon = <XSmallIcon size="sm" />;
object3.onPress = function() {
return handleRemoveFile(upload.id);
};
const string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object3.accessibilityLabel = Reflect.apply(string, intl, [N86XcP]);
object2.trailing = <IconButton {...object3} />;
object2.start = true;
object2.end = true;
return <TableRow {...object2} />;
}
function FileUploadActionComponent(a0) { // fn#120874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2762, offset: 0x025391b0, size: 938 bytes, params: 2, frame: 29
var r8;
var length;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var items2;
const minValues = a0.minValues;
const maxValues = a0.maxValues;
const value2 = undefined;
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
(importDefault(44) /* metro dependency 44 */)(value3 != null,
'FileUploadActionComponent must be used within a ComponentStateContextProvider');
const channelId = value3.channelId;
(importDefault(44) /* metro dependency 44 */)(channelId != null,
'FileUploadActionComponent must be used inside a channel');
const modal = value3.modal;
const customId = modal == null ? value2 : modal.customId;
(importDefault(44) /* metro dependency 44 */)(customId != null,
'FileUploadActionComponent requires modalCustomId from context');
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null, 'FileUploadActionComponent requires a valid channel');
const kestrelConfig = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.FileUploadActionComponent'});
const kestrelExperimentModule = require(4697) /* metro dependency 4697: KestrelExperiment */;
const getEffectiveKestrelLimit = kestrelExperimentModule.getEffectiveKestrelLimit;
const fileUtilsModule = require(4655) /* metro dependency 4655: FileUtils */;
const value5 = Reflect.apply(getEffectiveKestrelLimit, kestrelExperimentModule, [kestrelConfig,
fileUtilsModule.maxFileSize(channel.guild_id)]);
const env0_4 = value5;
const {uploadIds, setUploadIds,
currentUploads} = (require(15742) /* metro dependency 15742: useFileUploadComponentState */).useFileUploadComponentState(a0);
const parents = value3.getParents(a0);
const r5 = parents == null ? value2 : parents[0];
const type = r5 == null ? value2 : r5.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const LABEL = ComponentType.LABEL;
let r0 = type !== LABEL ? value2 : r5;
(importDefault(44) /* metro dependency 44 */)(r0 != null,
'FileUploadActionComponent must be used within a label Component');
const binding = env0_4;
const value9 = binding.useCallback(_fun120876(), [uploadIds, maxValues, setUploadIds, value5, customId, channelId]);
const value10 = binding.useCallback(_fun120881, [channelId, uploadIds, setUploadIds]);
const value11 = binding.useCallback(_fun120883, [channel, maxValues, value9, uploadIds, currentUploads, value10]);
if (maxValues !== 1) {
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
length = uploadIds.length;
r8 = length >= maxValues ? <MainAreaLimitReached /> : <MainAreaCanUpload openFilePicker={value11} minValues={minValues} maxValues={maxValues} maxSizeBytes={value5} />;
items2 = [r8];
length = currentUploads.length;
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
items2[1] = r8;
r0 = <Stack {...stackProps}>{items2}</Stack>;
} else {
length = currentUploads.length;
if (length === 1) {
r0 = <File upload={currentUploads[0]} handleRemoveFile={value10} />;
} else {
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
length = uploadIds.length;
r8 = length >= maxValues ? <MainAreaLimitReached /> : <MainAreaCanUpload openFilePicker={value11} minValues={minValues} maxValues={maxValues} maxSizeBytes={value5} />;
items2 = [r8];
length = currentUploads.length;
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
items2[1] = r8;
r0 = <Stack {...stackProps}>{items2}</Stack>;
}
}
return r0;
}
function _fun120876() { // fn#120876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3782, offset: 0x0253955a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun120878);
return _fun120880;
}
function _fun120881(a0) { // fn#120881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4448, offset: 0x025397ab, size: 96 bytes, params: 2, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
const remove = defaultImport.remove;
const channelIdBinding = channelId;
const InteractionModal = DraftType.InteractionModal;
Reflect.apply(remove, defaultImport, [channelIdBinding, a0, InteractionModal]);
setUploadIds(uploadIds.filter(_fun120882));
}
function _fun120883() { // fn#120883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4552, offset: 0x0253980b, size: 271 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const InteractionModal = DraftType.InteractionModal;
let object2 = {};
object2.channel = channel;
const maxValuesBinding = maxValues;
object2.uploadLimit = maxValuesBinding;
object2.onDismissKeyboard = onDismissKeyboard;
object2.onRestoreKeyboard = NOOP;
object2.onSelectFiles = onSelectFiles_120885;
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
value = require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */;
const showMediaKeyboardActionSheet = value.showMediaKeyboardActionSheet;
object2 = {};
object2.channel = channel;
object2.draftType = InteractionModal;
object2.uploadLimit = maxValuesBinding;
object2.disableWhenReachedLimit = true;
object2.includedUploadIds = uploadIds;
object2.onAttachPress = onAttachPress_120886;
object2.onPressCamera = onPressCamera_120887;
object2.onPressItem = onPressItem_120888;
object2.onViewAll = onViewAll_120890;
object2.onManageLimited = function() {
var moduleValue = require(dependencyMap[30]);
var object = {onDismissKeyboard: require(dependencyMap[28]).hideMediaKeyboardActionSheet};
object.onRestoreKeyboard = NOOP;
moduleValue.handleLimitedPickerDialog(object);
};
const hideMediaKeyboardActionSheet = (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet;
object2.onClose = hideMediaKeyboardActionSheet;
object2.onBack = hideMediaKeyboardActionSheet;
Reflect.apply(showMediaKeyboardActionSheet, value, [object2]);
}
function _fun120892(a0) { // fn#120892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5869, offset: 0x02539b2f, size: 49 bytes, params: 2, frame: 15
return (
<File
upload={a0}
handleRemoveFile={env0_9}
key={a0.id}
/>
);
}
function* _fun120878(a0) { // fn#120878, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3802, offset: 0x02539589, size: 412 bytes, params: 2, frame: 21
var environment;
var r6;
var value4;
var value5;
var value6;
var done;
var value7;
var binding;
var value8;
var getFileSize;
var uri;
var value9;
var value10;
var value11;
var value12;
var map;
var value13;
var concat;
var value14;
var binding2;
var value15;
var show;
var object2;
var intl;
var string;
var t;
var formatToPlainString;
if (true) {
if (a0.length !== 0) {
value = environment.__proto__.__proto__;
if (View.length + a0.length > require) {
value14 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
binding2 = env3_2;
value15 = binding(binding2[23]);
show = value15.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[11]).intl;
string = intl.string;
t = binding(binding2[11]).t;
object2.title = Reflect.apply(string, intl, [t.wOr6hB]);
intl = binding(binding2[11]).intl;
formatToPlainString = intl.formatToPlainString;
t = binding(binding2[11]).t;
object2.body = Reflect.apply(formatToPlainString, intl, [t.dy6viJ, {maxValues: require}]);
return Reflect.apply(show, value15, [object2]);
}
value4 = environment.__proto__.__proto__.__proto__;
value5 = env3_12(a0);
value6 = value5();
done = value6.done;
reducibleJoin11: while (true) {
reducibleJoin10: while (true) {
if (done) {
break reducibleJoin10;
}
r6 = value6;
reducibleLoop4: while (true) {
value7 = r6.value;
binding = env3_0;
value8 = binding(env3_2[24]);
getFileSize = value8.getFileSize;
uri = value7.uri;
yield Reflect.apply(getFileSize, value8, [uri]);
value9 = undefined;
value10 = false;
if (value10) {
return value9;
}
if (value9 > env2_4) {
value12 = env3_0(env3_2[25]);
return value12.showFileSizeExceededAlert(env2_4, value9);
}
value11 = value5();
done = value11.done;
if (done) {
break reducibleJoin10;
}
r6 = value11;
continue reducibleLoop4;
}
}
map = a0.map;
value13 = Reflect.apply(map, a0, [_fun120879]);
concat = View.concat;
ChannelStore(Reflect.apply(concat, View, [value13]));
break reducibleJoin11;
}
}
}
}
function onDismissKeyboard() { // fn#120884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4627, offset: 0x0253991a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet();
}
function onAttachPress_120886() { // fn#120886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4888, offset: 0x0253993f, size: 54 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleAttachFile = value.handleAttachFile;
const object2 = {};
copyDataProperties(object2, env0_1, environment);
Reflect.apply(handleAttachFile, value, [object2]);
}
function onPressCamera_120887(a0) { // fn#120887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4943, offset: 0x02539975, size: 68 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleCameraDialog = value.handleCameraDialog;
const object2 = {};
copyDataProperties(object2, env0_1, undefined);
object2['previewType'] = a0;
Reflect.apply(handleCameraDialog, value, [object2]);
}
function onPressItem_120888({item, isIncluded}) { // fn#120888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5011, offset: 0x025399b9, size: 158 bytes, params: 2, frame: 15
var environment;
var value2;
var value3;
let value = environment.__proto__.__proto__;
(require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet();
if (isIncluded) {
value = environment.__proto__;
value3 = currentUploads.find(_fun120889);
if (value3 != null) {
env1_9(value3.id);
}
} else {
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value = value.mediaNodeToUploadItem(item);
value2 = environment.__proto__;
env1_8([value]);
}
}
function onViewAll_120890() { // fn#120890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5232, offset: 0x02539a94, size: 83 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleViewAllDialog = value.handleViewAllDialog;
const object2 = {};
copyDataProperties(object2, env0_1, undefined);
object2['draftType'] = InteractionModal;
object2['includedUploadIds'] = uploadIds;
Reflect.apply(handleViewAllDialog, value, [object2]);
}
function _fun120879(a0) { // fn#120879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4183, offset: 0x02539725, size: 134 bytes, params: 2, frame: 16
const binding = env4_0;
const binding2 = env4_2;
const componentUploadId = binding(binding2[26]).makeComponentUploadId(dependencyMap);
const value4 = env4_1(binding2[27]);
const setFile = value4.setFile;
const object3 = {};
object3.channelId = importDefault;
object3.id = componentUploadId;
const object4 = {};
copyDataProperties(object4, a0, binding2);
object4['id'] = componentUploadId;
object3.file = object4;
const InteractionModal = env4_7.InteractionModal;
object3.draftType = InteractionModal;
object3.allowOptimization = false;
Reflect.apply(setFile, value4, [object3]);
return componentUploadId;
}
function _fun120889(a0) { // fn#120889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5098, offset: 0x02539a57, size: 61 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = require(4658) /* metro dependency 4658: UploadUtils */;
return value.doesImageMatchUpload(item.node.image, a0);
}
@@ -0,0 +1,136 @@
/* Metro module 15743; source: modules/interaction_components/native/actions/RadioGroupActionComponent.tsx; dependencies: [31, 33, 8357, 4017, 4577, 4581, 7988, 7987, 6238, 5312, 1244, 2] */
function _fun120904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:6, offset: 0x02539e8e, size: 187 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.Fragment;
const env0_6 = value2.jsxs;
object = {code: 'function RadioGroupActionComponentTsx1(){const{withSpring,hasValue,SUBTLE_SPRING}=this.__closure;return{maxHeight:withSpring(hasValue?60:0,SUBTLE_SPRING),marginTop:withSpring(hasValue?8:0,SUBTLE_SPRING),opacity:withSpring(hasValue?1:0,SUBTLE_SPRING)};}'};
value = value.memo(_fun120905);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/RadioGroupActionComponent.tsx');
exports.default = value;
}
function _fun120905(a0) { // fn#120905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:420, offset: 0x02539f49, size: 699 bytes, params: 2, frame: 28
var object2;
var r5;
var View;
var TableRow;
var intl;
const type = a0.type;
const options = a0.options;
const required = a0.required;
const binding = env0_3;
let value2 = binding.useRef(null);
var env0_3 = value2;
const value3 = binding.useMemo(_fun120906, [options]);
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value3 != null ? {type: type, value: value3} : undefined);
const state = value5.state;
const env0_5 = value5.executeStateUpdate;
const value6 = env0_3.useMemo(function() {
var stateBinding = state;
var value2 = null;
return (value2 == stateBinding ? undefined : state.type) !== type ? value2 : state.value;
}, [state, type]);
const value7 = value6 != null;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = p_120909;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, hasValue: value7};
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 1287549755250;
closure.__initData = env0_7;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
closure = onChange_120910;
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const tableRadioGroup = <TableRadioGroup hasIcons={false} defaultValue={value6 ?? ''} onChange={closure} groupRef={value2}>{options.map(_fun120911)}</TableRadioGroup>;
if (required) {
r5 = !required;
} else {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var viewProps = {style: value8, accessibilityElementsHidden: !value7,
importantForAccessibility: value7 ? 'auto' : 'no-hide-descendants'};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Icon) => <Icon IconComponent={(require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uAtZN']);
tableRowProps.onPress = function() {
return onChange_120910(null);
};
tableRowProps.start = true;
tableRowProps.end = true;
r5 = <View {...viewProps}><TableRow {...tableRowProps} /></View>;
}
return (
<>
{tableRadioGroup}
{r5}
</>
);
}
function _fun120906() { // fn#120906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:502, offset: 0x0253a204, size: 45 bytes, params: 1, frame: 11
return options.find(function(a0) {
return a0.default;
})?.value;
}
function p_120909() { // fn#120909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:778, offset: 0x0253a261, size: 204 bytes, params: 1, frame: 22
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const resultBinding = result;
const value3 = 0;
const r10 = resultBinding ? 60 : value3;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.maxHeight = Reflect.apply(withSpring, springModule, [r10, SUBTLE_SPRING]);
const moduleValue2 = springModule;
object2.marginTop = moduleValue2.withSpring(result ? 8 : value3, SUBTLE_SPRING);
const moduleValue3 = springModule;
object2.opacity = moduleValue3.withSpring(result ? 1 : value3, SUBTLE_SPRING);
return object2;
}
function onChange_120910(a0) { // fn#120910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1107, offset: 0x0253a32d, size: 118 bytes, params: 2, frame: 14
var current;
if (a0 !== '') {
if (a0 == null) {
executeStateUpdate({type: type, value: null});
current = env0_3.current;
if (current != null) {
current.setValue('');
}
} else if (env0_6 !== a0) {
executeStateUpdate({type: type, value: a0});
} else if (required) {
executeStateUpdate({type: type, value: a0});
} else {
executeStateUpdate({type: type, value: null});
current = env0_3.current;
if (current != null) {
current.setValue('');
}
}
}
}
function _fun120911(a0) { // fn#120911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1360, offset: 0x0253a3a3, size: 82 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
subLabel={a0.description}
value={a0.value}
key={a0.value}
/>
);
}
@@ -0,0 +1,112 @@
/* Metro module 14257; source: modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx; dependencies: [31, 1379, 33, 4627, 8357, 44, 8362, 1909, 14255, 8364, 4080, 11443, 1962, 11439, 2] */
function _fun107847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:6, offset: 0x0230ae65, size: 158 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx');
exports.default = SearchableSelectActionComponent;
}
function SearchableSelectActionComponent(a0) { // fn#107848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:256, offset: 0x0230af03, size: 790 bytes, params: 2, frame: 28
var require2;
var r8;
var require3;
const env0_0 = a0;
let type = a0.type;
const value2 = undefined;
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
const defaultImport = importDefault(44) /* metro dependency 44 */;
const value5 = null;
defaultImport(value5 != (value5 == value4 ? value2 : value4.modal),
'SearchableSelectActionComponent must be rendered inside a modal ComponentStateContext');
defaultImport(value5 != (value5 == value4 ? value2 : value4.channelId),
'SearchableSelectActionComponent must be used inside a channel');
const channel = ChannelStore.getChannel(value4.channelId);
const guild_id = value5 == channel ? value2 : channel.guild_id;
const r9 = value5 != guild_id ? guild_id : value5;
const value7 = env0_3.useMemo(_fun107849, [a0.defaultValues, r9]);
const {state, visualState, executeStateUpdate} = value4.useComponentState(a0, value7.length > 0 ? {type: type,
selectedOptions: value7} : value2);
const customId = value4.modal.customId;
type = value5 == state ? value2 : state.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const USER_SELECT = ComponentType.USER_SELECT;
if (type === USER_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.ROLE_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.MENTIONABLE_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) !== (require(1909) /* metro dependency 1909: Server */).ComponentType.CHANNEL_SELECT) {
r8 = value7;
require3 = require;
} else {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
}
const parents = value4.getParents(a0);
const r1 = value5 == parents ? value2 : parents[0];
type = value5 == r1 ? value2 : r1.type;
const LABEL = ComponentType.LABEL;
({channelId: value4.channelId, guildId: r9, containerId: customId, onSubmit: executeStateUpdate,
labelComponent: type !== LABEL ? value2 : r1}).allowEmpty = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).canSelectBeEmpty(a0,
'modal');
const SelectMenuNativeComponent = importDefault(14255) /* metro dependency 14255: SelectMenuNativeComponent */;
const object = {};
copyDataProperties(object, a0, require3);
object['placeholder'] = selectPlaceholder;
object['state'] = visualState;
object['selectedOptions'] = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).transformSearchableSelectOptions(r8,
r9);
return <SelectMenuNativeComponent model={object} onTap={onTap} />;
}
function _fun107849() { // fn#107849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:718, offset: 0x0230b219, size: 66 bytes, params: 1, frame: 13
let value = environment.__proto__;
const getSnowflakeSelectDefaultValues = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).getSnowflakeSelectDefaultValues;
value = Reflect.apply(getSnowflakeSelectDefaultValues, value, [env0_0.defaultValues, env0_1]);
return value ?? [];
}
function SearchableSelectActionComponentOnTap() { // fn#107850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:1601, owner: SearchableSelectActionComponent.onTap, offset: 0x0230b25b, size: 291 bytes, params: 1, frame: 19
var defaultImport;
var openLazy;
var value3;
var value4;
var object2;
var defaultImport2;
var value5;
var value6;
const type = env0_0.type;
const ComponentType = require(dependencyMap[7]).ComponentType;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
if (type === CHANNEL_SELECT) {
defaultImport2 = importDefault(dependencyMap[10]);
openLazy = defaultImport2.openLazy;
value5 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
value6 = 'ChannelSelectComponentActionSheet:' + customId;
object2 = {selectionActionComponent: env0_0};
copyDataProperties(object2, env0_3, undefined);
Reflect.apply(openLazy, defaultImport2, [value5, value6, object2]);
} else {
defaultImport = importDefault(dependencyMap[10]);
openLazy = defaultImport.openLazy;
value3 = require(dependencyMap[12])(dependencyMap[13], dependencyMap.paths);
value4 = 'MentionableSelectComponentActionSheet:' + customId;
object2 = {selectionActionComponent: env0_0};
copyDataProperties(object2, env0_3, undefined);
Reflect.apply(openLazy, defaultImport, [value3, value4, object2]);
}
}
@@ -0,0 +1,83 @@
/* Metro module 14254; source: modules/interaction_components/native/actions/StringSelectActionComponent.tsx; dependencies: [31, 33, 4627, 8357, 44, 1909, 14255, 4080, 11437, 1962, 2] */
function _fun107833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:6, offset: 0x0230a8d9, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/StringSelectActionComponent.tsx');
exports.default = StringSelectActionComponent;
}
function StringSelectActionComponent(a0) { // fn#107834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:242, offset: 0x0230a967, size: 461 bytes, params: 2, frame: 24
const env0_0 = a0;
let type = a0.type;
const options = a0.options;
const value2 = undefined;
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
const value4 = env0_3.useMemo(_fun107835, [options]);
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
var env0_3 = value5;
(importDefault(44) /* metro dependency 44 */)((value5 == null ? value2 : value5.modal) != null,
'StringSelectActionComponent must be rendered inside a modal ComponentStateContext');
const value6 = value5.useComponentState(a0, value4.length > 0 ? {type: type, values: value4} : value2);
const state = value6.state;
const visualState = value6.visualState;
const env0_5 = value6.executeStateUpdate;
const value7 = env0_3.useMemo(_fun107838, [options, type, state]);
const env0_6 = value5.modal.customId;
const parents = value5.getParents(a0);
const r2 = parents == null ? value2 : parents[0];
type = r2 == null ? value2 : r2.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const LABEL = ComponentType.LABEL;
const env0_7 = type !== LABEL ? value2 : r2;
const SelectMenuNativeComponent = importDefault(14255) /* metro dependency 14255: SelectMenuNativeComponent */;
const object = {};
copyDataProperties(object, a0, options);
object['placeholder'] = selectPlaceholder;
object['state'] = visualState;
object['selectedOptions'] = value7;
return <SelectMenuNativeComponent model={object} onTap={onTap} />;
}
function _fun107835() { // fn#107835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:356, offset: 0x0230ab34, size: 45 bytes, params: 1, frame: 12
return options.filter(function(a0) {
return a0.default;
}).map(function(a0) {
return a0.value;
});
}
function _fun107838() { // fn#107838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:697, offset: 0x0230ab61, size: 88 bytes, params: 1, frame: 12
return (state?.type === type ? state.values : []).map(function(a0) {
var env0_0 = a0;
return options.findIndex(_fun107840);
}).filter(function(a0) {
return a0 !== -1;
});
}
function StringSelectActionComponentOnTap() { // fn#107842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:1014, owner: StringSelectActionComponent.onTap, offset: 0x0230abdd, size: 189 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[7]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[9]);
value = value(dependencyMap[8], dependencyMap.paths);
const value3 = 'StringSelectComponentActionSheet:' + customId;
const object2 = {};
const binding = env0_0;
object2.selectionActionComponent = binding;
object2.labelComponent = env0_7;
object2.channelId = env0_3.channelId;
object2.containerId = customId;
object2.onSubmit = executeStateUpdate;
object2.allowEmpty = require(dependencyMap[2]).canSelectBeEmpty(binding, 'modal');
Reflect.apply(openLazy, defaultImport, [value, value3, object2]);
}
function _fun107839(a0) { // fn#107839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:748, offset: 0x0230abb9, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return options.findIndex(_fun107840);
}
@@ -0,0 +1,55 @@
/* Metro module 15739; source: modules/interaction_components/native/actions/TextInputActionComponent.tsx; dependencies: [57, 31, 33, 8357, 15736, 1909, 6985, 7687, 7682, 2] */
function _fun120860(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:6, offset: 0x025385af, size: 164 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun120861);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/TextInputActionComponent.tsx');
exports.default = value;
}
function _fun120861(a0) { // fn#120861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:140, offset: 0x02538653, size: 533 bytes, params: 2, frame: 26
const type = a0.type;
const style = a0.style;
const label = a0.label;
const placeholder = a0.placeholder;
const required = a0.required;
const maxLength = a0.maxLength;
let value = a0.value;
const value3 = undefined;
value = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value != null ? {type: type, value: value} : value3);
const env0_2 = value.state;
const executeStateUpdate = value.executeStateUpdate;
const env0_3 = executeStateUpdate;
const error = value.error;
const useIsFirstTextInputInModal = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useIsFirstTextInputInModal;
value = Reflect.apply(useIsFirstTextInputInModal, value, [a0.id]);
const textAreaFieldProps = {placeholder: placeholder, maxLength: maxLength,
status: error != null ? 'error' : 'default', defaultValue: env0_2(env0_3.useState(function() {
return state?.type === type ? state.value : value;
}), 1)[0], onChange: env0_3.useCallback(function(a0) {
return executeStateUpdate({type: type, value: a0});
}, [type, executeStateUpdate]), autoFocus: value, isClearable: true};
const TextInputComponentStyle = (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle;
const SMALL = TextInputComponentStyle.SMALL;
const r5 = SMALL === style ? ((TextField) => <TextField {...textAreaFieldProps} />)((require(6985) /* metro dependency 6985: TextFieldNative */).TextField) : (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle.PARAGRAPH !== style ? value3 : ((TextAreaField) => <TextAreaField {...textAreaFieldProps} />)((require(7687) /* metro dependency 7687: TextAreaFieldNative */).TextAreaField);
if (label == null) {
return r5;
} else {
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
return (
<Input
label={label}
required={required}
errorMessage={error}
>
{r5}
</Input>
);
}
}
@@ -0,0 +1,52 @@
/* Metro module 11443; source: modules/interaction_components/native/components/ChannelSelectComponentActionSheet.tsx; dependencies: [31, 1379, 1867, 33, 8362, 11440, 11438, 8364, 1305, 9122, 2] */
function _fun87594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:6, offset: 0x01fc4bf2, size: 174 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/ChannelSelectComponentActionSheet.tsx');
exports.default = _default_87595;
}
function _default_87595({selectionActionComponent, labelComponent, channelId, guildId, containerId, onSubmit, allowEmpty}) { // fn#87595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:149, offset: 0x01fc4ca0, size: 307 bytes, params: 2, frame: 25
const value3 = (importDefault(11440) /* metro dependency 11440: useSearchableSelectComponent */)({selectActionComponent: selectionActionComponent,
containerId: containerId, guildId: guildId, queryOptions: env0_3.useCallback(_fun87596, [channelId,
selectionActionComponent.channelTypes]), onSubmit: onSubmit});
const options = value3.options;
const selectedOptions = value3.selectedOptions;
const isSelected = value3.isSelected;
const onPressOptionItem = value3.onPressOptionItem;
var env0_3 = value3.submitSelection;
return ((Component) => <Component onPressOptionItem={onPressOptionItem} renderIcon={renderIcon} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={options} selectedCount={selectedOptions.length} selectedOptions={selectedOptions} isSelected={isSelected} submitSelection={function() {
return submitSelection();
}} onQueryChange={value3.setQuery} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
}
function _fun87596(a0) { // fn#87596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:297, offset: 0x01fc4dd3, size: 54 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */;
return value.queryChannels(a0, channelId, channelTypes);
}
function _default_87595RenderIcon(a0) { // fn#87597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:575, owner: _default_87595.renderIcon, offset: 0x01fc4e09, size: 139 bytes, params: 2, frame: 17
const value = environment.__proto__;
const channel = ChannelStore.getChannel(a0.value);
if (channel == null) {
return null;
}
const getGuild = GuildStore.getGuild;
const channelIconData = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).getChannelIconData(channel,
Reflect.apply(getGuild, GuildStore, [guildId]));
return channelIconData != null && ((Icon) => <Icon source={channelIconData} />)((require(1305) /* metro dependency 1305: native */).Icon);
}
function _default_87595ItemAccessibilityLabel({value}) { // fn#87599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:899, owner: _default_87595.itemAccessibilityLabel, offset: 0x01fc4e94, size: 70 bytes, params: 2, frame: 12
const channel = ChannelStore.getChannel(environment.__proto__);
if (channel != null) {
return (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel});
}
}
@@ -0,0 +1,151 @@
/* Metro module 13237; source: modules/interaction_components/native/components/GuildSelectComponentActionSheet.tsx; dependencies: [57, 31, 27, 1867, 4896, 33, 4501, 4633, 1244, 4080, 11438, 6819, 4617, 1305, 4573, 6526, 2] */
function _fun100949(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:6, offset: 0x02201d0b, size: 291 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({guildIdentity: {'flexDirection': 'row',
'alignItems': 'center'}, iconContainer: {marginRight: 16}, avatar: {marginRight: 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/GuildSelectComponentActionSheet.tsx');
exports.default = _default_100950;
}
function _default_100950({selectedGuild, onSelectGuild, user}) { // fn#100950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:327, offset: 0x02201e2e, size: 536 bytes, params: 2, frame: 25
var object2;
const styles = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
const GUILD = SelectOptionType.GUILD;
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [{type: GUILD, value: selectedGuild.id,
label: selectedGuild.name, guild: selectedGuild}]), 2);
const property3 = value4[0];
var env0_4 = property3;
const env0_5 = value4[1];
const r7 = property3 != null ? [property3] : [];
object2 = {'maxValues': 1, 'minValues': 1};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ZImm/x']);
binding = env0_4;
return ((Component) => <Component onPressOptionItem={onPressOptionItem} onRemoveOptionItem={onRemoveOptionItem} renderIcon={renderIcon} renderHeaderIcon={renderHeaderIcon} iconContainerStyle={styles.iconContainer} renderDescription={renderDescription_100962} selectionActionComponent={object2} options={binding.useMemo(_fun100956,
[property, binding.useCallback(function(a0) {
return _fun100952(a0);
},
[])])} selectedCount={r7.length} selectedOptions={r7} isSelected={isSelected} submitSelection={submitSelection} onQueryChange={property2} itemAccessibilityLabel={function(a0) {
return a0.label;
}} allowEmpty={false} expanded />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
}
function _fun100951(a0) { // fn#100951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:648, offset: 0x02202046, size: 21 bytes, params: 2, frame: 11
return queryGuilds_100952(a0);
}
function _default_100950SubmitSelection() { // fn#100957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1121, owner: _default_100950.submitSelection, offset: 0x0220218d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _default_100950OnPressOptionItem(a0, a1) { // fn#100958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1188, owner: _default_100950.onPressOptionItem, offset: 0x022021b2, size: 41 bytes, params: 3, frame: 13
onSelectGuild(a1.guild);
env0_5(a1);
submitSelection();
}
function _default_100950RenderIcon(a0) { // fn#100960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1275, owner: _default_100950.renderIcon, offset: 0x022021db, size: 51 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component guild={a0.guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
function _default_100950RenderHeaderIcon(a0) { // fn#100961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1323, owner: _default_100950.renderHeaderIcon, offset: 0x0220220e, size: 80 bytes, params: 2, frame: 16
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const XSMALL = GuildIconSizes.XSMALL;
return <GuildIcon size={XSMALL} guild={a0.guild} />;
}
function _default_100950RenderDescription(a0) { // fn#100962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1443, owner: _default_100950.renderDescription, offset: 0x0220225e, size: 319 bytes, params: 2, frame: 25
var items2;
const userBinding = user;
const hasAvatarForGuild2 = userBinding.hasAvatarForGuild(a0.guild.id);
const nickname = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getNickname(a0.guild.id,
undefined, userBinding);
if (hasAvatarForGuild2) {
var viewBindingProps = {style: styles.guildIdentity};
items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.avatar} user={user} guildId={a0.guild.id} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)];
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{nickname ?? user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (nickname != null) {
var viewBindingProps = {style: styles.guildIdentity};
items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.avatar} user={user} guildId={a0.guild.id} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)];
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{nickname ?? user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
}
function _default_100950IsSelected({value}) { // fn#100963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1885, owner: _default_100950.isSelected, offset: 0x0220239d, size: 41 bytes, params: 2, frame: 4
return value === env0_4?.value;
}
function queryGuilds_100952(a0) { // fn#100952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:651, offset: 0x0220205b, size: 155 bytes, params: 2, frame: 14
var environment;
var value;
var reduce;
var Array;
var value2;
var array;
const queryGuilds_100952GuildRecordToGuildSearchableSelectOption = function(a0) {
var object = {};
object.type = require(dependencyMap[7]).SelectOptionType.GUILD;
object.value = a0.id;
object.label = a0.name;
object.guild = a0;
return object;
};
if (a0.length === 0) {
value = environment.__proto__.__proto__;
value = SortedGuildStore.getFlattenedGuildIds();
reduce = value.reduce;
Array = global.Array;
value2 = Object.create(Array.prototype, {constructor: {value: Array}});
array = new Array();
return Reflect.apply(reduce, value, [_fun100954, array instanceof Object ? array : value2]);
}
value = environment.__proto__.__proto__;
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryGuilds({query: a0});
return value.map(function({record}) {
return queryGuilds_100952GuildRecordToGuildSearchableSelectOption(record);
});
}
function _fun100954(a0, a1) { // fn#100954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:851, offset: 0x0220213c, size: 56 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = GuildStore.getGuild(a1);
if (value != null) {
a0.push(queryGuilds_100952GuildRecordToGuildSearchableSelectOption(value));
}
return a0;
}
@@ -0,0 +1,209 @@
/* Metro module 11439; source: modules/interaction_components/native/components/MentionableSelectComponentActionSheet.tsx; dependencies: [31, 27, 1938, 1867, 4396, 1878, 661, 33, 4501, 697, 6736, 8362, 11440, 4633, 1305, 6794, 6795, 9097, 11438, 9210, 4573, 11441, 1244, 2] */
function _fun87574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:6, offset: 0x01fc3e41, size: 430 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const Fonts = value.Fonts;
const env0_9 = value.DEFAULT_ROLE_COLOR_HEX;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
let PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
object2.name = {color: INTERACTIVE_TEXT_DEFAULT, fontFamily: PRIMARY_MEDIUM, fontSize: 12, lineHeight: 16};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
object2.discriminator = {color: TEXT_MUTED, fontFamily: PRIMARY_MEDIUM, fontSize: 12};
object2.roleCountContainer = {'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'alignItems': 'center',
'justifyContent': 'flex-end', 'marginRight': 12};
object2.roleCountText = {paddingRight: 4};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/MentionableSelectComponentActionSheet.tsx');
exports.default = _default_87575;
}
function _default_87575({selectionActionComponent, labelComponent, channelId, guildId, containerId, onSubmit, allowEmpty}) { // fn#87575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:624, offset: 0x01fc3fef, size: 440 bytes, params: 2, frame: 29
const env0_3 = useStyles();
const guild = GuildStore.getGuild(guildId);
const defaultImport = importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */;
const id = guild?.id;
const MIN_REREQUEST_TIME = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).MIN_REREQUEST_TIME;
const env0_5 = defaultImport(id, MIN_REREQUEST_TIME);
const binding = env0_3;
const {options, selectedOptions, isSelected, onPressOptionItem, submitSelection,
setQuery} = (importDefault(11440) /* metro dependency 11440: useSearchableSelectComponent */)({selectActionComponent: selectionActionComponent,
containerId: containerId, guildId: guildId, queryOptions: binding.useCallback(_fun87576,
[selectionActionComponent, channelId]), onSubmit: onSubmit});
return ((Component) => <Component onPressOptionItem={onPressOptionItem} renderIcon={binding.useCallback(_fun87577,
[guild,
guildId])} renderDescription={renderDescription_87578} renderOptionSuffix={renderOptionSuffix} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={options} selectedCount={selectedOptions.length} selectedOptions={selectedOptions} isSelected={isSelected} submitSelection={submitSelection} onQueryChange={setQuery} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
}
function _fun87576(a0) { // fn#87576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:837, offset: 0x01fc41a7, size: 59 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */;
return value.queryMentionables(selectionActionComponent.type, a0, channelId);
}
function _fun87577(a0) { // fn#87577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:1094, offset: 0x01fc41e2, size: 595 bytes, params: 2, frame: 21
var r7;
var r2;
var r9;
var id;
var moduleValue;
var customIconSrc;
var unicodeEmoji;
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
var value8;
var isMobileOnline;
var isMobileOnline2;
var isVROnline;
var isVROnline2;
var getStatus;
let type = a0.type;
const value = environment.__proto__;
const value2 = undefined;
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
const USER = SelectOptionType.USER;
if (type === USER) {
value8 = UserStore.getUser(a0.value);
if (value8 == null) {
return null;
}
isMobileOnline = PresenceStore.isMobileOnline;
id = value8.id;
isMobileOnline2 = Reflect.apply(isMobileOnline, PresenceStore, [id]);
isVROnline = PresenceStore.isVROnline;
id = value8.id;
isVROnline2 = Reflect.apply(isVROnline, PresenceStore, [id]);
getStatus = PresenceStore.getStatus;
id = value8.id;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
return (
<Avatar
user={value8}
isMobileOnline={isMobileOnline2}
isVROnline={isVROnline2}
status={Reflect.apply(getStatus, PresenceStore, [id])}
guildId={guildId ?? value2}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL}
/>
);
}
type = a0.type;
const ROLE = SelectOptionType.ROLE;
if (type === ROLE) {
r7 = env0_4 != null ? GuildRoleStore.getRole(env0_4.id, a0.value) : value2;
if (env0_4 == null) {
return null;
}
if (r7 == null) {
return null;
}
moduleValue = require(6794) /* metro dependency 6794: RoleIconUtils */;
if (moduleValue.canGuildUseRoleIcons(env0_4, r7)) {
r2 = (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(r7) ?? ({});
customIconSrc = r2.customIconSrc;
unicodeEmoji = r2.unicodeEmoji;
r9 = customIconSrc != null ? {uri: customIconSrc} : value2;
if (r9 != null) {
return ((Component) => <Component source={r9} unicodeEmoji={unicodeEmoji} size={24} name={r7.name} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */);
}
if (unicodeEmoji != null) {
return ((Component) => <Component source={r9} unicodeEmoji={unicodeEmoji} size={24} name={r7.name} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */);
}
return <ShieldUserIcon color={(r7 == null ? value2 : r7.colorString) ?? DEFAULT_ROLE_COLOR_HEX} />;
}
return <ShieldUserIcon color={(r7 == null ? value2 : r7.colorString) ?? DEFAULT_ROLE_COLOR_HEX} />;
}
return value2;
}
function _default_87575RenderDescription(a0) { // fn#87578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:1915, owner: _default_87575.renderDescription, offset: 0x01fc4435, size: 147 bytes, params: 2, frame: 15
var value3;
var object2;
var stylesBinding;
var name;
const type = a0.type;
let value = environment.__proto__;
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
const USER = SelectOptionType.USER;
if (type === USER) {
value3 = UserStore.getUser(a0.value);
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
object2 = {user: value3};
stylesBinding = styles;
name = stylesBinding.name;
object2.usernameStyle = name;
object2.discriminatorStyle = stylesBinding.discriminator;
name = stylesBinding.name;
object2.nicknameStyle = name;
return ((Component) => <Component {...object2} />)(value);
}
}
function renderOptionSuffix(a0) { // fn#87579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:2114, owner: _default_87575.renderOptionSuffix, offset: 0x01fc44c8, size: 293 bytes, params: 2, frame: 20
var r3;
var r9;
var value4;
var stylesBinding;
const type = a0.type;
const value = environment.__proto__;
const value2 = undefined;
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
const ROLE = SelectOptionType.ROLE;
if (type === ROLE) {
value4 = null;
r3 = value4 != env0_4 ? GuildRoleStore.getRole(env0_4.id, a0.value) : value2;
r9 = value4 == r3 ? value4 : value4 == env0_5 ? value2 : env0_5[r3.id];
if (value4 == r9) {
return value2;
}
stylesBinding = styles;
return (
<View style={stylesBinding.roleCountContainer}>
{((Text) => <Text style={stylesBinding.roleCountText} variant="text-sm/medium" color="interactive-text-default">{r9}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
{((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon)}
</View>
);
}
return value2;
}
function _default_87575ItemAccessibilityLabel(a0) { // fn#87580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:2625, owner: _default_87575.itemAccessibilityLabel, offset: 0x01fc45ed, size: 380 bytes, params: 2, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value4;
let type = a0.type;
const value = environment.__proto__;
const value2 = undefined;
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
const USER = SelectOptionType.USER;
if (type === USER) {
value4 = UserStore.getUser(a0.value);
return value4 == null ? intl.formatToPlainString(t.AydQ7a, {username: a0.label,
discriminator: value4 == null ? value2 : value4.discriminator}) : value4.bot ? intl.formatToPlainString(t['zogo/8'],
{username: a0.label,
discriminator: value4 == null ? value2 : value4.discriminator}) : intl.formatToPlainString(t.AydQ7a,
{username: a0.label, discriminator: value4 == null ? value2 : value4.discriminator});
}
type = a0.type;
const ROLE = SelectOptionType.ROLE;
if (type === ROLE) {
return intl.formatToPlainString(t.F6ejkk, {roleName: a0.label});
}
return value2;
}
@@ -0,0 +1,248 @@
/* Metro module 11438; source: modules/interaction_components/native/components/SelectComponentActionSheet.tsx; dependencies: [31, 27, 1379, 1934, 6276, 33, 4501, 697, 6758, 1244, 4578, 9100, 3874, 6238, 7974, 8707, 5463, 3869, 1585, 1478, 5314, 566, 4080, 6275, 6277, 2] */
function _fun87558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:6, offset: 0x01fc3050, size: 549 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_START_HEIGHT_RATIO;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.selectionOptionItemIconWrapper = {width: PX_32, alignItems: 'center'};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.width = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.height = PX_16;
object2.tagListIconWrapper = object5;
const object7 = {};
object7.transform = [{scale: 0.75}];
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.top = -PX_4;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.left = -PX_4;
object2.tagListIcon = object7;
const object8 = {};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.paddingHorizontal = PX_4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.marginHorizontal = PX_16;
object2.textInputWrapper = object8;
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/SelectComponentActionSheet.tsx');
exports.default = SelectComponentActionSheet;
}
function SelectionHeader({renderIcon, selectionActionComponent, labelComponent, selectButtonDisabled, selectedOptions, submitSelection, onPressOptionItem, onRemoveOptionItem, onQueryChange}) { // fn#87559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:612, offset: 0x01fc3275, size: 698 bytes, params: 2, frame: 32
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Button;
const styles = useStyles();
const value3 = selectionActionComponent.maxValues > 1;
const env0_6 = onRemoveOptionItem.useRef(null);
const value5 = onRemoveOptionItem.useMemo(_fun87560, [selectedOptions, styles, renderIcon]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object = {};
let r14 = labelComponent?.label ?? selectionActionComponent.placeholder;
r14 = r14 ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Otr6W2);
object.title = r14;
object.subtitle = value3 && selectionActionComponent.minValues > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Jmwzdx,
{count: selectionActionComponent.minValues}) : undefined;
if (value3) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r14 = <Button size="sm" variant={selectButtonDisabled ? 'secondary' : 'primary'} disabled={selectButtonDisabled} onPress={submitSelection} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N)} />;
} else {
r14 = undefined;
}
object.trailing = r14;
return (
<>
<BottomSheetTitleHeader {...object} />
{onQueryChange != null && value5 != null ? ((Component) => <Component inActionSheet style={styles.textInputWrapper} icon={value3 ? value5.length === 0 ? undefined : <View /> : undefined} tags={value5} onRemove={function(a0) {
var r2;
var selectedOptionsBinding = selectedOptions;
var value2 = undefined;
r2 = selectedOptionsBinding == null ? value2 : selectedOptions[a0];
if (r2 != null) {
(onRemoveOptionItem ?? onPressOptionItem)(a0, r2);
}
return value2;
}} onChangeText={onChangeText} />)(importDefault(9100) /* metro dependency 9100: TagListInputNative */) : null}
</>
);
}
function SelectionOptionItem({item, onPressOptionItem, clearable, selected, disabled, index, start, end, iconContainerStyle, itemAccessibilityLabel, skipIcon, multi, renderDescription, renderIcon, renderOptionSuffix}) { // fn#87564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:1745, offset: 0x01fc3644, size: 596 bytes, params: 2, frame: 33
var r8;
var FormCheckbox;
const styles = useStyles();
const value5 = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: selected != null && selected,
disabled: disabled});
const useA11yRolesNativeModule = require(3874) /* metro dependency 3874: useA11yRolesNative */;
const useRadioA11yNative = useA11yRolesNativeModule.useRadioA11yNative;
const r19 = multi ? value5 : Reflect.apply(useRadioA11yNative, useA11yRolesNativeModule,
[{selected: selected != null && selected, disabled: disabled}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const accessibilityRole = r19.accessibilityRole;
const r20 = itemAccessibilityLabel?.(item);
const accessibilityState = r19.accessibilityState;
const r5 = skipIcon ? null : <View style={[styles.selectionOptionItemIconWrapper,
iconContainerStyle]}>{renderIcon(item)}</View>;
const label = item.label;
const r6 = renderDescription?.(item);
const r11 = renderOptionSuffix?.(item);
if (clearable) {
FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
selected = !!selected && selected;
r8 = <FormCheckbox checked={selected} />;
} else if (selected !== true) {
r8 = null;
} else {
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
r8 = <CheckmarkSmallBoldIcon color="text-brand" />;
}
return (
<TableRow
accessibilityRole={accessibilityRole}
accessibilityLabel={r20}
accessibilityState={accessibilityState}
start={start}
end={end}
disabled={disabled}
icon={r5}
label={label}
labelLineClamp={1}
subLabel={r6}
subLabelLineClamp={1}
onPress={function() {
return onPressOptionItem(index, item);
}}
trailing={<View style={{flexDirection: 'row'}}>{r11}{r8}</View>}
/>
);
}
function SelectComponentActionSheet({selectionActionComponent, labelComponent, onPressOptionItem, selectedOptions, selectedCount, renderIcon, renderHeaderIcon, iconContainerStyle, skipIcon, renderDescription, renderOptionSuffix, onQueryChange, options, itemStyle, isSelected, submitSelection, itemAccessibilityLabel, channelId, expanded, onRemoveOptionItem, allowEmpty}) { // fn#87566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:2666, offset: 0x01fc3898, size: 852 bytes, params: 2, frame: 42
const env0_3 = renderIcon;
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
env0_3.useEffect(function() {
var AccessibilityAnnouncer = require(dependencyMap[17]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t['7gxe9o']));
}, []);
const value2 = env0_3.useMemo(function() {
return ACTION_SHEET_START_HEIGHT_RATIO * (require(dependencyMap[19]).getWindowDimensions().height - require(dependencyMap[20]).NAV_BAR_HEIGHT_MULTILINE - require(dependencyMap[18]).getSafeAreaInsets().top);
}, []);
env0_3.useEffect(_fun87570,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore], function() {
return SelectedChannelStore.getChannelId();
}), channelId, ChannelStore.getChannel(channelId)]);
const value4 = env0_3.useMemo(function() {
return selectionActionComponent.maxValues > 1;
}, [selectionActionComponent]);
const value5 = env0_3.useCallback(_fun87572, [isSelected, value4, allowEmpty, selectionActionComponent.maxValues,
itemStyle, selectedCount, options.length, onPressOptionItem, renderIcon, iconContainerStyle, skipIcon,
renderDescription, renderOptionSuffix, itemAccessibilityLabel]);
const value6 = env0_3.useRef(null);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {scrollable: true, ref: value6, startHeight: value2, startExpanded: expanded,
header: <SelectionHeader selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} selectButtonDisabled={selectedCount > selectionActionComponent.maxValues || (selectedCount === 0 ? !allowEmpty : selectedCount < selectionActionComponent.minValues)} selectedOptions={selectedOptions} submitSelection={submitSelection} onQueryChange={onQueryChange} onPressOptionItem={onPressOptionItem} onRemoveOptionItem={onRemoveOptionItem} renderIcon={renderHeaderIcon ?? renderIcon} />};
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = PX_16 + insets.bottom;
return (
<BottomSheet {...bottomSheetProps}>
<BottomSheetFlatList
keyExtractor={function(a0, a1) {
return '' + a1;
}}
data={options}
renderItem={value5}
contentContainerStyle={object}
keyboardShouldPersistTaps="always"
accessibilityRole={value4 ? 'none' : 'radiogroup'}
/>
</BottomSheet>
);
}
function _fun87560() { // fn#87560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:873, offset: 0x01fc352f, size: 51 bytes, params: 1, frame: 13
let r0 = selectedOptions?.map(_fun87561);
r0 = r0 ?? [];
return r0;
}
function SelectionHeaderOnChangeText(a0) { // fn#87563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:1668, owner: SelectionHeader.onChangeText, offset: 0x01fc360d, size: 55 bytes, params: 2, frame: 12
const current = env0_6.current;
if (current != null) {
current.scrollTo({'y': 0, 'animated': false});
}
onQueryChange(a0);
}
function _fun87570() { // fn#87570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:3462, offset: 0x01fc3cc3, size: 98 bytes, params: 1, frame: 13
var value;
let r0 = env0_15 != null && env0_15.isGuildVoice();
r0 = !r0 ? channelId == null : r0;
r0 = !r0 ? channelId === channelId : r0;
if (!r0) {
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
function _fun87572({item, index}) { // fn#87572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:3606, offset: 0x01fc3d25, size: 257 bytes, params: 2, frame: 18
var r6;
const isSelected2 = isSelected(item, index);
let r5 = env0_16 && selectedCount >= selectionActionComponent.maxValues && !isSelected2;
if (!r5) {
r6 = !env0_16 && isSelected2;
r6 = r6 && !allowEmpty;
r5 = r6;
}
return (
<SelectionOptionItem
itemStyle={itemStyle}
item={item}
index={index}
start={index === 0}
end={index === options.length - 1}
clearable={env0_16 || allowEmpty}
selected={isSelected2}
disabled={r5}
onPressOptionItem={onPressOptionItem}
iconContainerStyle={iconContainerStyle}
skipIcon={skipIcon}
renderDescription={renderDescription}
renderIcon={renderIcon}
renderOptionSuffix={renderOptionSuffix}
itemAccessibilityLabel={itemAccessibilityLabel}
multi={env0_16}
/>
);
}
function _fun87561(a0) { // fn#87561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:922, offset: 0x01fc3562, size: 110 bytes, params: 2, frame: 19
const object2 = {};
object2.id = a0.value;
object2.text = a0.label;
value = environment.__proto__.__proto__;
const stylesBinding = styles;
object2.icon = <View style={stylesBinding.tagListIconWrapper}><View style={stylesBinding.tagListIcon}>{renderIcon(a0)}</View></View>;
return object2;
}
@@ -0,0 +1,151 @@
/* Metro module 11437; source: modules/interaction_components/native/components/StringSelectComponentActionSheet.tsx; dependencies: [57, 31, 33, 4501, 697, 8361, 1909, 4080, 11438, 6739, 4573, 1244, 2] */
function _fun87543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:6, offset: 0x01fc29ed, size: 298 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'flexShrink': 0, 'borderRadius': null, 'overflow': 'hidden'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_6 = Reflect.apply(createStyles, createStylesModule,
[{selectionOptionItemWithDescription: {minHeight: 64}, selectionOptionItemDescription: {marginTop: 2},
emojiWrapper: object, textEmoji: {'fontSize': 16, 'color': '#000000'}, fastImageEmoji: {'width': 24,
'height': 24}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/StringSelectComponentActionSheet.tsx');
exports.default = _default_87544;
}
function _default_87544({selectionActionComponent, labelComponent, channelId, containerId, onSubmit, allowEmpty}) { // fn#87544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:412, offset: 0x01fc2b17, size: 486 bytes, params: 2, frame: 25
const styles = useStyles();
const initialStringSelectOptions = (require(8361) /* metro dependency 8361: StringSelectActionComponentUtils */).getInitialStringSelectOptions(selectionActionComponent,
containerId);
const binding = env0_4;
const useState = binding.useState;
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(initialStringSelectOptions);
const value6 = env0_3(Reflect.apply(useState, binding, [set instanceof Object ? set : value3]), 2);
const property = value6[0];
var env0_4 = value6[1];
return ((Component) => <Component onPressOptionItem={binding.useCallback(_fun87547, [property,
binding.useMemo(function() {
return selectionActionComponent.maxValues > 1;
}, [selectionActionComponent]), selectionActionComponent, binding.useCallback(_fun87546,
[onSubmit])])} renderIcon={renderIcon} skipIcon={!binding.useMemo(function() {
return selectionActionComponent.options.some(_fun87552);
},
[selectionActionComponent])} renderDescription={renderDescription_87554} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={selectionActionComponent.options} itemStyle={[binding.useMemo(function() {
return selectionActionComponent.options.some(_fun87550);
},
[selectionActionComponent]) && styles.selectionOptionItemWithDescription]} selectedCount={property.size} isSelected={isSelected} submitSelection={submitSelection} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
}
function _fun87546(a0) { // fn#87546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:669, offset: 0x01fc2d13, size: 90 bytes, params: 2, frame: 14
const value = environment.__proto__;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
onSubmit({type: STRING_SELECT, values: a0});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun87547(a0, a1) { // fn#87547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:786, offset: 0x01fc2d6d, size: 134 bytes, params: 3, frame: 15
const env0_0 = a1;
const binding = env0_3;
const value3 = binding.has(a1.value);
if (env0_5) {
if (!(!value3 && env0_3.size >= selectionActionComponent.maxValues)) {
env0_4(function(a0) {
var Set = global.Set;
var value2 = new Set(a0);
if (result) {
value2.add(require.value);
} else {
value2.delete(require.value);
}
return value2;
});
}
} else {
env0_6(value3 ? [] : [a1.value]);
}
}
function _fun87549() { // fn#87549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:957, offset: 0x01fc2e46, size: 34 bytes, params: 1, frame: 11
return selectionActionComponent.options.some(function(a0) {
return a0.description != null;
});
}
function _fun87551() { // fn#87551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1021, offset: 0x01fc2e78, size: 34 bytes, params: 1, frame: 11
return selectionActionComponent.options.some(function(a0) {
return a0.emoji != null;
});
}
function _default_87544RenderIcon(a0) { // fn#87553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1115, owner: _default_87544.renderIcon, offset: 0x01fc2eab, size: 128 bytes, params: 2, frame: 16
var r0;
var src;
var name;
var stylesBinding;
let emoji = a0.emoji;
let value = null;
if (value != emoji) {
value = environment.__proto__;
value = importDefault(6739) /* metro dependency 6739: Emoji */;
emoji = a0.emoji;
src = emoji.src;
emoji = a0.emoji;
name = emoji.name;
stylesBinding = styles;
value = ((Component) => <Component src={src} name={name} style={stylesBinding.emojiWrapper} textEmojiStyle={stylesBinding.textEmoji} fastImageStyle={stylesBinding.fastImageEmoji} />)(value);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _default_87544RenderDescription(a0) { // fn#87554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1294, owner: _default_87544.renderDescription, offset: 0x01fc2f2b, size: 118 bytes, params: 2, frame: 16
var r0;
const description = a0.description;
let value = null;
if (value != description) {
if (a0.description === '') {
r0 = value;
} else {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={styles.selectionOptionItemDescription} variant="text-xs/medium" color="text-default">{a0.description}</Text>;
r0 = value;
}
} else {
r0 = value;
}
return r0;
}
function _default_87544IsSelected({value}) { // fn#87555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1615, owner: _default_87544.isSelected, offset: 0x01fc2fa1, size: 27 bytes, params: 2, frame: 11
return env0_3.has(value);
}
function _default_87544SubmitSelection() { // fn#87556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1649, owner: _default_87544.submitSelection, offset: 0x01fc2fbc, size: 33 bytes, params: 1, frame: 14
const binding = env0_6;
const binding2 = env0_3;
const items2 = [];
arraySpread(items2, binding2, 0, undefined);
return binding(items2);
}
function _default_87544ItemAccessibilityLabel({emoji, label, description}) { // fn#87557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1686, owner: _default_87544.itemAccessibilityLabel, offset: 0x01fc2fdd, size: 115 bytes, params: 2, frame: 17
let value = environment.__proto__;
value = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const ZbrH2f = (require(1244) /* metro dependency 1244: indexNative */).t.ZbrH2f;
return Reflect.apply(formatToPlainString, intl, [ZbrH2f, {emojiName: emoji == null ? value : emoji.name,
optionName: label, optionDescription: description}]);
}
@@ -0,0 +1,102 @@
/* Metro module 11440; source: modules/interaction_components/native/components/useSearchableSelectComponent.tsx; dependencies: [57, 31, 8362, 4080, 2] */
function _fun87581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:6, offset: 0x01fc4769, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/useSearchableSelectComponent.tsx');
exports.default = useSearchableSelectComponent;
}
function useSearchableSelectComponent({selectActionComponent, containerId, guildId, queryOptions, onSubmit}) { // fn#87582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:122, offset: 0x01fc47f2, size: 303 bytes, params: 2, frame: 25
var object2;
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
var env0_4 = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).getInitialSnowflakeSelectOptions(selectActionComponent,
containerId, guildId);
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [_fun87583]), 2);
const property3 = value[0];
const env0_6 = value[1];
value = binding.useMemo(_fun87585, [property, queryOptions]);
const result = selectActionComponent.maxValues > 1;
object2 = {options: value};
value = property3.values();
const items2 = [];
arraySpread(items2, value, 0, containerId);
object2.selectedOptions = items2;
object2.isSelected = isSelected;
object2.onPressOptionItem = onPressOptionItem;
object2.submitSelection = submitSelection;
object2.setQuery = property2;
return object2;
}
function _fun87583() { // fn#87583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:345, offset: 0x01fc4921, size: 56 bytes, params: 1, frame: 12
const Map = global.Map;
const binding = env0_4;
let map = binding.map;
const value = Reflect.apply(map, binding, [function(a0) {
return [a0.value, a0];
}]);
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
return map instanceof Object ? map : value2;
}
function _fun87585() { // fn#87585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:420, offset: 0x01fc496f, size: 20 bytes, params: 1, frame: 11
return queryOptions(env0_3);
}
function useSearchableSelectComponentSubmitSelection(a0) { // fn#87586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:469, owner: useSearchableSelectComponent.submitSelection, offset: 0x01fc4983, size: 94 bytes, params: 2, frame: 15
const object2 = {};
object2.type = selectActionComponent.type;
const value2 = a0.values();
const items2 = [];
arraySpread(items2, value2, 0, undefined);
object2.selectedOptions = items2;
onSubmit(object2);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function useSearchableSelectComponentIsSelected({value}) { // fn#87587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:617, owner: useSearchableSelectComponent.isSelected, offset: 0x01fc49e1, size: 27 bytes, params: 2, frame: 11
return env0_5.has(value);
}
function useSearchableSelectComponentOnPressOptionItem(a0, a1) { // fn#87588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:653, owner: useSearchableSelectComponent.onPressOptionItem, offset: 0x01fc49fc, size: 190 bytes, params: 3, frame: 16
var Map;
const env0_0 = a1;
const binding = env0_5;
const value3 = binding.has(a1.value);
if (result) {
if (!(!value3 && env0_5.size >= selectActionComponent.maxValues)) {
env0_6(_fun87589);
}
} else {
Map = global.Map;
useSearchableSelectComponentSubmitSelection(value3 ? new Map() : new Map());
}
}
function useSearchableSelectComponentSubmitSelection_87590() { // fn#87590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:849, owner: useSearchableSelectComponent.submitSelection, offset: 0x01fc4b0e, size: 20 bytes, params: 1, frame: 11
useSearchableSelectComponentSubmitSelection(env0_5);
}
function _fun87589(a0) { // fn#87589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:712, offset: 0x01fc4aba, size: 84 bytes, params: 2, frame: 14
const Map = global.Map;
const map = new Map(a0);
if (env0_1) {
map.delete(require.value);
} else {
map.set(require.value, require);
}
return map;
}
@@ -0,0 +1,63 @@
/* Metro module 14258; source: modules/interaction_components/native/display/TextDisplayComponent.tsx; dependencies: [57, 31, 27, 4502, 1934, 8356, 33, 477, 4020, 14259, 8357, 44, 6622, 8349, 566, 3829, 9874, 11380, 2] */
function _fun107851(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14455:6, offset: 0x0230b37e, size: 305 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_6 = (require(8356) /* metro dependency 8356: InteractionComponentConstants */).TEXT_DISPLAY_COMPONENT_MARKDOWN_RENDER_OPTIONS;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
value = importDefault(14259) /* metro dependency 14259: TextDisplayComponentViewNativeComponent */;
} else {
value = require(4020) /* metro dependency 4020: FabricUtils */;
if (value.isFabric()) {
value = importDefault(14259) /* metro dependency 14259: TextDisplayComponentViewNativeComponent */;
} else {
value = requireNativeComponent('DCDTextDisplayComponentView');
}
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/display/TextDisplayComponent.tsx');
exports.default = TextDisplayComponent;
}
function TextDisplayComponent(a0) { // fn#107852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14455:438, offset: 0x0230b4af, size: 562 bytes, params: 2, frame: 24
const value2 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentContainerId();
const channelId = SelectedChannelStore.getChannelId();
(importDefault(44) /* metro dependency 44 */)(channelId, 'channelId not available in TextDisplayComponent');
const defaultImport2 = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
const parseToAST = defaultImport2.parseToAST;
const content = a0.content;
const renderMessageMarkupModule = require(8349) /* metro dependency 8349: renderMessageMarkup */;
const getInitialParserState = renderMessageMarkupModule.getInitialParserState;
const toAST = Reflect.apply(parseToAST, defaultImport2, [content, true, Reflect.apply(getInitialParserState,
renderMessageMarkupModule, [{channelId: channelId,
renderOptions: TEXT_DISPLAY_COMPONENT_MARKDOWN_RENDER_OPTIONS}])]);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[AccessibilityStore], function() {
return [AccessibilityStore.roleStyle, AccessibilityStore.alwaysShowLinkDecorations];
}]), 2);
const property = value6[0];
const property2 = value6[1];
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
const value7 = AnimateEmoji.useSetting();
const binding = env0_8;
const object = {};
copyDataProperties(object, a0, undefined);
object['content'] = toAST;
return ((Component) => <Component model={object} markdownTextRenderOptions={{containerId: value2,
shouldAnimateEmoji: value7, shouldShowLinkDecorations: property2, shouldShowRoleDot: property === 'dot',
shouldShowRoleOnName: property === 'username'}} onTapLink={onTapLink} onLongPressLink={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onLongPressLink} onTapAttachmentLink={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapAttachmentLink} onLongPressAttachmentLink={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onLongPressAttachmentLink} onTapMention={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapMention} onTapTimestamp={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapTimestamp} onTapInlineCode={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapInlineCode} onTapEmoji={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapEmoji} style={{width: '100%'}} />)(binding);
}
function TextDisplayComponentOnTapLink({nativeEvent}) { // fn#107854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14455:1043, owner: TextDisplayComponent.onTapLink, offset: 0x0230b702, size: 60 bytes, params: 2, frame: 14
const data = nativeEvent.data;
const value = environment.__proto__;
(require(9874) /* metro dependency 9874: handleMessagesTapLink */).handleMessagesTapURLLink(data, env0_0);
}
@@ -0,0 +1,16 @@
/* Metro module 15738; source: modules/interaction_components/native/layouts/ActionRowLayoutComponent.tsx; dependencies: [31, 27, 33, 2] */
function _fun120858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15946:6, offset: 0x025384d8, size: 144 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/layouts/ActionRowLayoutComponent.tsx');
exports.default = ActionRowLayoutComponent;
}
function ActionRowLayoutComponent({components, renderComponents}) { // fn#120859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15946:251, offset: 0x02538568, size: 71 bytes, params: 2, frame: 16
const value = null;
return value == components || components.length === 0 ? value : <View>{renderComponents(components)}</View>;
}
@@ -0,0 +1,36 @@
/* Metro module 15740; source: modules/interaction_components/native/layouts/LabelLayoutComponent.tsx; dependencies: [31, 27, 33, 8357, 1909, 7682, 2] */
function _fun120864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15948:6, offset: 0x025388bd, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/layouts/LabelLayoutComponent.tsx');
exports.default = LabelLayoutComponent;
}
function LabelLayoutComponent({label, description, component, renderComponent}) { // fn#120865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15948:247, offset: 0x02538955, size: 222 bytes, params: 2, frame: 20
const value2 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentError(component);
const type = component.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const CHECKBOX = ComponentType.CHECKBOX;
if (type === CHECKBOX) {
return renderComponent(component, 'label-child');
} else {
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
return (
<Input
label={label}
description={description}
required={component.required}
errorMessage={value2}
>
<View style={{width: '100%'}}>
{renderComponent(component, 'label-child')}
</View>
</Input>
);
}
}
@@ -0,0 +1,80 @@
/* Metro module 15737; source: modules/interaction_components/native/renderComponents.tsx; dependencies: [31, 33, 1909, 15738, 14254, 15739, 14257, 14258, 15740, 15741, 15743, 15744, 15745, 2] */
function _fun120854(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:6, offset: 0x02538046, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function(a0) {
return a0.map(_fun120856);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/renderComponents.tsx');
exports.renderComponents = closure;
}
function renderComponents(a0) { // fn#120855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:119, offset: 0x025380df, size: 24 bytes, params: 2, frame: 11
return a0.map(_fun120856);
}
function renderComponent(a0, a1) { // fn#120857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:203, offset: 0x02538117, size: 961 bytes, params: 3, frame: 19
const type = a0.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const ACTION_ROW = ComponentType.ACTION_ROW;
if (ACTION_ROW === type) {
return ((Component) => <Component {...a0} {...{['renderComponents']: renderComponents}} key={a1} />)(importDefault(15738) /* metro dependency 15738: ActionRowLayoutComponent */);
}
const STRING_SELECT = ComponentType.STRING_SELECT;
if (STRING_SELECT === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14254) /* metro dependency 14254: StringSelectActionComponent */);
}
const TEXT_INPUT = ComponentType.TEXT_INPUT;
if (TEXT_INPUT === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15739) /* metro dependency 15739: TextInputActionComponent */);
}
const USER_SELECT = ComponentType.USER_SELECT;
if (USER_SELECT === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
}
const ROLE_SELECT = ComponentType.ROLE_SELECT;
if (ROLE_SELECT === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
}
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
if (MENTIONABLE_SELECT === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
}
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
if (CHANNEL_SELECT === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
}
const TEXT_DISPLAY = ComponentType.TEXT_DISPLAY;
if (TEXT_DISPLAY === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14258) /* metro dependency 14258: TextDisplayComponent */);
}
const LABEL = ComponentType.LABEL;
if (LABEL === type) {
return ((Component) => <Component {...a0} {...{['renderComponent']: renderComponent}} key={a1} />)(importDefault(15740) /* metro dependency 15740: LabelLayoutComponent */);
}
const FILE_UPLOAD = ComponentType.FILE_UPLOAD;
if (FILE_UPLOAD === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15741) /* metro dependency 15741: FileUploadActionComponent */);
}
const RADIO_GROUP = ComponentType.RADIO_GROUP;
if (RADIO_GROUP === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15743) /* metro dependency 15743: RadioGroupActionComponent */);
}
const CHECKBOX_GROUP = ComponentType.CHECKBOX_GROUP;
if (CHECKBOX_GROUP === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15744) /* metro dependency 15744: CheckboxGroupActionComponent */);
}
const CHECKBOX = ComponentType.CHECKBOX;
if (CHECKBOX === type) {
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15745) /* metro dependency 15745: CheckboxActionComponent */);
}
}
function _fun120856(a0, a1) { // fn#120856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:162, offset: 0x025380f7, size: 32 bytes, params: 3, frame: 13
const value = environment.__proto__;
return renderComponent(a0, a1.toString());
}