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

No files matched your search

+145 -125
View File
@@ -1,140 +1,160 @@
/* Metro module 16255; source: modules/share/native/AppShare.tsx; dependencies: [57, 31, 27, 4874, 12950, 1226, 661, 11877, 33, 566, 5076, 477, 12989, 11880, 4884, 683, 4594, 13096, 12674, 1581, 5460, 15261, 15307, 4500, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UseMountEffect from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import AppContainer from '../../../components_native/AppContainer.tsx'; /* Metro dependency 13096 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as AlertModalNativeModule from '../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
import * as AnalyticsTrackingStoreModule from '../../../stores/AnalyticsTrackingStore.tsx'; /* Metro dependency 4874 */
import * as ConstantsModule2 from '../../multi_account/Constants.tsx'; /* Metro dependency 11877 */
import * as MultiAccountActionCreatorsModule from '../../multi_account/MultiAccountActionCreators.tsx'; /* Metro dependency 11880 */
import * as ShareStoreModule from '../../../stores/native/ShareStore.tsx'; /* Metro dependency 12950 */
import * as MainSharedModule from '../../../components_native/MainShared.tsx'; /* Metro dependency 15261 */
function _fun125622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:6, offset: 0x025deaa8, size: 283 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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.BackHandler;
const env0_6 = value.NativeModules;
require(4874) /* metro dependency 4874: AnalyticsTrackingStore */;
require(12950) /* metro dependency 12950: ShareStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_9 = (require(11877) /* metro dependency 11877: Constants */).MultiAccountSwitchLocation;
AnalyticsTrackingStoreModule;
ShareStoreModule;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/AppShare.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/AppShare.tsx');
exports.default = AppShare;
}
function AppShare(a0) { // fn#125623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:371, offset: 0x025debc3, size: 414 bytes, params: 2, frame: 22
var r6;
var moduleValue;
const env0_0 = a0;
let value = useInitialization(a0);
AppShareUseAuthenticated();
env0_4.useEffect(_fun125632, [a0.attachments.length, a0.text]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun125633);
const AppContainer = importDefault(13096) /* metro dependency 13096: AppContainer */;
if (value) {
value = importDefault(12674) /* metro dependency 12674: ShareScreen */;
moduleValue = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = ((Component) => <Component appEntryKey="share" sharedContent={a0} onClose={moduleValue.isMetaQuest() ? NativeModules.ShareManager.close : BackHandler.exitApp} />)(value);
r6 = value;
} else {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r6 = <SceneLoadingIndicator />;
}
const items2 = [r6];
const ActionSheetContainer = (require(15261) /* metro dependency 15261: MainShared */).ActionSheetContainer;
items2[1] = <ActionSheetContainer appEntryKey="share" />;
items2[2] = ((Component) => <Component />)(importDefault(15307) /* metro dependency 15307: ToastContainer */);
const AlertModalContainer = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModalContainer;
items2[3] = <AlertModalContainer />;
return (
<AppContainer appEntryKey="share">
{items2}
</AppContainer>
);
}
function useInitialization({targetUserId}) { // fn#125624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:398, owner: AppShare.useInitialization, offset: 0x025ded61, size: 197 bytes, params: 2, frame: 22
let binding = env1_4;
let useState = binding.useState;
const value3 = env1_3(Reflect.apply(useState, binding, [false]), 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value7 = env1_3(Reflect.apply(useState, binding,
[targetUserId == null || AuthenticationStore.getId() === targetUserId]), 2);
const property2 = value7[0];
const env0_3 = value7[1];
binding = env1_4;
binding.useEffect(_fun125625, [property]);
binding.useEffect(_fun125626, [targetUserId]);
return property && property2;
}
function AppShareUseAuthenticated() { // fn#125629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:761, owner: AppShare.useAuthenticated, offset: 0x025deefc, size: 93 bytes, params: 1, frame: 16
env1_4.useEffect(_fun125631,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.isAuthenticated();
})]);
}
function _fun125632() { // fn#125632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:1018, offset: 0x025defdd, size: 126 bytes, params: 1, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const EXTERNAL_SHARE_OPENED = AnalyticEvents.EXTERNAL_SHARE_OPENED;
Reflect.apply(track, defaultImport, [EXTERNAL_SHARE_OPENED,
{has_content: env0_0.text != null && env0_0.text.length > 0, has_attachment: env0_0.attachments.length > 0}]);
}
function _fun125633() { // fn#125633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:1188, offset: 0x025df05b, size: 126 bytes, params: 1, frame: 15
var environment;
const object2 = {};
const binding = env0_0;
object2.numAttachments = binding.attachments.length;
object2.mimeTypes = binding.attachments.map(function({mimeType}) {
return mimeType ?? 'unknown';
});
const numAttachments = object2.numAttachments;
const mimeTypes = object2.mimeTypes;
let value = environment.__proto__;
value = require(4884) /* metro dependency 4884: TTIAnalyticsUtils */;
value.trackAppUIViewed('share', {share_num_attachments: numAttachments, share_attachment_mimetypes: mimeTypes});
}
function _fun125625() { // fn#125625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:567, offset: 0x025dee26, size: 60 bytes, params: 1, frame: 12
var value2;
if (!env0_1) {
value2 = environment.__proto__.__proto__;
(importDefault(12989) /* metro dependency 12989: AccessibilityManager */).init();
env0_2(true);
}
}
function _fun125626() { // fn#125626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:619, offset: 0x025dee62, size: 76 bytes, params: 1, frame: 13
if (targetUserId != null && AuthenticationStore.getId() !== targetUserId) {
global.setTimeout(_fun125627, 18);
}
}
function _fun125631() { // fn#125631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:866, offset: 0x025def6c, size: 113 bytes, params: 1, frame: 15
var defaultImport;
var moduleValue;
if (env0_0) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
defaultImport.startSession(AuthenticationStore.getToken());
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
NativeModules.NativePermissionManager.requestNotificationAuthorization();
function AppShare(a0) { // fn#125623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:371, offset: 0x025debc3, size: 414 bytes, params: 2, frame: 22
var r6;
var moduleValue;
const env0_0 = a0;
let value = useInitialization(a0);
AppShareUseAuthenticated();
ReactModule.useEffect(_fun125632, [a0.attachments.length, a0.text]);
(UseMountEffect)(_fun125633);
if (value) {
value = importDefault(12674) /* metro dependency 12674: ShareScreen */;
moduleValue = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = ((Component) => <Component appEntryKey="share" sharedContent={a0} onClose={moduleValue.isMetaQuest() ? NativeModules.ShareManager.close : BackHandler.exitApp} />)(value);
r6 = value;
} else {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r6 = <SceneLoadingIndicator />;
}
const items2 = [r6];
const ActionSheetContainer = (MainSharedModule).ActionSheetContainer;
items2[1] = <ActionSheetContainer appEntryKey="share" />;
items2[2] = ((Component) => <Component />)(importDefault(15307) /* metro dependency 15307: ToastContainer */);
const AlertModalContainer = (AlertModalNativeModule).AlertModalContainer;
items2[3] = <AlertModalContainer />;
return (
<AppContainer appEntryKey="share">
{items2}
</AppContainer>
);
function useInitialization({targetUserId}) { // fn#125624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:398, owner: AppShare.useInitialization, offset: 0x025ded61, size: 197 bytes, params: 2, frame: 22
let binding = env1_4;
let useState = binding.useState;
const value3 = env1_3(Reflect.apply(useState, binding, [false]), 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value7 = env1_3(Reflect.apply(useState, binding,
[targetUserId == null || AuthenticationStore.getId() === targetUserId]), 2);
const property2 = value7[0];
const env0_3 = value7[1];
binding = env1_4;
binding.useEffect(_fun125625, [property]);
binding.useEffect(_fun125626, [targetUserId]);
return property && property2;
function _fun125625() { // fn#125625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:567, offset: 0x025dee26, size: 60 bytes, params: 1, frame: 12
var value2;
if (!env0_1) {
value2 = environment.__proto__.__proto__;
(importDefault(12989) /* metro dependency 12989: AccessibilityManager */).init();
env0_2(true);
}
}
function _fun125626() { // fn#125626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:619, offset: 0x025dee62, size: 76 bytes, params: 1, frame: 13
if (targetUserId != null && AuthenticationStore.getId() !== targetUserId) {
global.setTimeout(_fun125627, 18);
}
function _fun125627() { // fn#125627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:660, offset: 0x025deeae, size: 78 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const switchAccount = MultiAccountActionCreatorsModule.switchAccount;
const targetUserIdBinding = targetUserId;
const SHARE_EXTENSION = MultiAccountSwitchLocation.SHARE_EXTENSION;
Reflect.apply(switchAccount, MultiAccountActionCreatorsModule, [targetUserIdBinding, false,
SHARE_EXTENSION]).then(_fun125628);
function _fun125628() { // fn#125628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:718, offset: 0x02011aa1, size: 18 bytes, params: 1, frame: 11
env2_3(true);
}
}
}
}
function AppShareUseAuthenticated() { // fn#125629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:761, owner: AppShare.useAuthenticated, offset: 0x025deefc, size: 93 bytes, params: 1, frame: 16
env1_4.useEffect(_fun125631,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.isAuthenticated();
})]);
function _fun125631() { // fn#125631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:866, offset: 0x025def6c, size: 113 bytes, params: 1, frame: 15
var defaultImport;
var startSession;
var authenticationStoreBinding;
var moduleValue;
if (env0_0) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
startSession = defaultImport.startSession;
authenticationStoreBinding = AuthenticationStore;
Reflect.apply(startSession, defaultImport, [authenticationStoreBinding.getToken()]);
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
NativeModules.NativePermissionManager.requestNotificationAuthorization();
}
}
}
}
function _fun125632() { // fn#125632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:1018, offset: 0x025defdd, size: 126 bytes, params: 1, frame: 18
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const EXTERNAL_SHARE_OPENED = AnalyticEvents.EXTERNAL_SHARE_OPENED;
Reflect.apply(track, defaultImport, [EXTERNAL_SHARE_OPENED,
{has_content: env0_0.text != null && env0_0.text.length > 0, has_attachment: env0_0.attachments.length > 0}]);
}
function _fun125633() { // fn#125633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:1188, offset: 0x025df05b, size: 126 bytes, params: 1, frame: 15
var environment;
const object = {};
const binding = env0_0;
object.numAttachments = binding.attachments.length;
object.mimeTypes = binding.attachments.map(function({mimeType}) {
return mimeType ?? 'unknown';
});
const numAttachments = object.numAttachments;
const mimeTypes = object.mimeTypes;
let value = environment.__proto__;
value = require(4884) /* metro dependency 4884: TTIAnalyticsUtils */;
value.trackAppUIViewed('share', {share_num_attachments: numAttachments, share_attachment_mimetypes: mimeTypes});
}
}
}
function _fun125627() { // fn#125627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16463:660, offset: 0x025deeae, size: 78 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const multiAccountActionCreatorsModule = require(11880) /* metro dependency 11880: MultiAccountActionCreators */;
const switchAccount = multiAccountActionCreatorsModule.switchAccount;
const targetUserIdBinding = targetUserId;
const SHARE_EXTENSION = MultiAccountSwitchLocation.SHARE_EXTENSION;
Reflect.apply(switchAccount, multiAccountActionCreatorsModule, [targetUserIdBinding, false,
SHARE_EXTENSION]).then(_fun125628);
}
global.__d(_fun125622, 16255, [57, 31, 27, 4874, 12950, 1226, 661, 11877, 33, 566, 5076, 477, 12989, 11880, 4884,
683, 4594, 13096, 12674, 1581, 5460, 15261, 15307, 4500,
2]) /* metro module 16255, dependencies: [57, 31, 27, 4874, 12950, 1226, 661, 11877, 33, 566, 5076, 477, 12989, 11880, 4884, 683, 4594, 13096, 12674, 1581, 5460, 15261, 15307, 4500, 2] */;
@@ -1,178 +1,272 @@
/* Metro module 9792; source: modules/share/native/DestinationFailedAlertModal.tsx; dependencies: [31, 27, 1379, 1867, 4396, 3793, 1878, 482, 33, 4501, 697, 4805, 9719, 1305, 4573, 566, 3995, 9793, 4500, 4500, 1244, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import UseChannelName from '../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import GroupDMAvatar from '../../group_dm/native/GroupDMAvatar.tsx'; /* Metro dependency 9719 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as AlertModalNativeModule from '../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as GuildIconWithChannelTypeModule from '../../guild/native/GuildIconWithChannelType.tsx'; /* Metro dependency 9793 */
function _fun76742(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:6, offset: 0x01de3419, size: 519 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(482) /* metro dependency 482: Constants */).StatusTypes;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {borderWidth: 1};
object = {};
const object2 = {borderWidth: 1};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object5.borderColor = BORDER_STRONG;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.borderColor = BORDER_STRONG;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingVertical = PX_8;
object4.container = object5;
const object6 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'height': 40};
object2.paddingVertical = PX_8;
object.container = object2;
const object3 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'height': 40};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
object3.gap = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = PX_16;
object4.row = object6;
object4.label = {flexShrink: 1};
const env0_13 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/DestinationFailedAlertModal.tsx');
object3.marginHorizontal = PX_16;
object.row = object3;
object.label = {flexShrink: 1};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/DestinationFailedAlertModal.tsx');
exports.default = DestinationFailedAlertModal;
}
function FailedGroupDMRow({channel}) { // fn#76743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:563, offset: 0x01de3620, size: 202 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (UseChannelName)(channel);
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const groupDMAvatar = <GroupDMAvatar size={REFRESH_MEDIUM_32} channel={channel} />;
const Text = (TextModule).Text;
return (
<View style={styles.row}>
{groupDMAvatar}
<Text
style={styles.label}
variant="text-md/medium"
lineClamp={1}
ellipsizeMode="tail"
>
{value2}
</Text>
</View>
);
}
function FailedGroupDMRow({channel}) { // fn#76743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:563, offset: 0x01de3620, size: 202 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const GroupDMAvatar = importDefault(9719) /* metro dependency 9719: GroupDMAvatar */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const groupDMAvatar = <GroupDMAvatar size={REFRESH_MEDIUM_32} channel={channel} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.row}>
{groupDMAvatar}
<Text
style={styles.label}
variant="text-md/medium"
lineClamp={1}
ellipsizeMode="tail"
>
{value2}
</Text>
</View>
);
}
function FailedUserRow({user}) { // fn#76744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:837, offset: 0x01de36ea, size: 409 bytes, params: 2, frame: 28
var r9;
var r0;
var items2;
var Text;
var value;
const styles = useStyles();
const nickname = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore],
function() {
return RelationshipStore.getNickname(user.id);
});
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() {
var object = {};
var userBinding = user;
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
object.status = PresenceStore.getStatus(userBinding.id);
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
return object;
});
if (user != null) {
var viewBindingProps = {style: styles.row};
items2 = [((Avatar) => <Avatar user={user} guildId={undefined} status={StatusTypes.OFFLINE === status ? null : status} isMobileOnline={isMobileOnline} isVROnline={isVROnline} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} avatarDecoration={user.avatarDecoration} autoStatusCutout />)((require(1305) /* metro dependency 1305: native */).Avatar)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'style': null, 'variant': 'text-md/medium', 'lineClamp': 1, 'ellipsizeMode': 'tail',
style: styles.label};
if (nickname != null) {
r9 = nickname;
function FailedUserRow({user}) { // fn#76744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:837, offset: 0x01de36ea, size: 409 bytes, params: 2, frame: 28
var r9;
var r0;
var items2;
var Text;
var value;
const styles = useStyles();
const nickname = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore],
function() {
return RelationshipStore.getNickname(user.id);
});
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() {
var object = {};
var presenceStoreBinding = PresenceStore;
var userBinding = user;
object.isMobileOnline = presenceStoreBinding.isMobileOnline(userBinding.id);
object.status = PresenceStore.getStatus(userBinding.id);
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
return object;
});
if (user != null) {
var viewBindingProps = {style: styles.row};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
items2 = [
<Avatar
user={user}
guildId={undefined}
status={StatusTypes.OFFLINE === status ? null : status}
isMobileOnline={isMobileOnline}
isVROnline={isVROnline}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL}
avatarDecoration={user.avatarDecoration}
autoStatusCutout
/>,
];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'style': null, 'variant': 'text-md/medium', 'lineClamp': 1, 'ellipsizeMode': 'tail',
style: styles.label};
if (nickname != null) {
r9 = nickname;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r9 = value;
}
items2[1] = (
<Text {...textProps}>
{r9}
</Text>
);
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r0 = value;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r9 = value;
r0 = null;
}
items2[1] = <Text {...textProps}>{r9}</Text>;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
} else {
r0 = null;
return r0;
}
return r0;
}
function FailedChannelRow({channel}) { // fn#76747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:1506, offset: 0x01de38fb, size: 266 bytes, params: 2, frame: 25
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel?.guild_id);
});
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const GuildIconWithChannelType = (require(9793) /* metro dependency 9793: GuildIconWithChannelType */).GuildIconWithChannelType;
const object = {};
object['aria-label'] = '';
object.guild = guild;
object.channel = channel;
const GuildIconWithChannelTypeSizes = (require(9793) /* metro dependency 9793: GuildIconWithChannelType */).GuildIconWithChannelTypeSizes;
const SMALL_32 = GuildIconWithChannelTypeSizes.SMALL_32;
object.size = SMALL_32;
const guildIconWithChannelType = <GuildIconWithChannelType {...object} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.row}>
{guildIconWithChannelType}
<Text
style={styles.label}
variant="text-md/medium"
lineClamp={1}
ellipsizeMode="tail"
>
{value2}
</Text>
</View>
);
}
function FailedDestinationRow({destination}) { // fn#76749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:1918, offset: 0x01de3a34, size: 187 bytes, params: 2, frame: 18
const {channel, user} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
UserStore], _fun76750);
return channel == null ? user != null ? <FailedUserRow user={user} /> : channel != null ? <FailedChannelRow channel={channel} /> : null : channel.isGroupDM() ? <FailedGroupDMRow channel={channel} /> : user != null ? <FailedUserRow user={user} /> : channel != null ? <FailedChannelRow channel={channel} /> : null;
}
function DestinationFailedAlertModal({title, content, failedDestinations, onRetry}) { // fn#76751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2376, offset: 0x01de3b59, size: 511 bytes, params: 2, frame: 32
var r7;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_12Binding;
var object6;
var items2;
const styles = useStyles();
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const alertModalProps = {title: title, content: content,
extraContent: <View style={styles.container}>{failedDestinations.map(_fun76752)}</View>};
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
if (onRetry != null) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [<AlertActionButton variant="primary" onPress={onRetry} text={intl.string(t['5911Lb'])} key="confirm" />];
items2[1] = <AlertActionButton variant="secondary" text={intl.string(t.WAI6xu)} key="cancel" />;
r7 = <>{items2}</>;
} else {
r7 = <AlertActionButton variant="primary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS)} key="confirm" />;
function FailedChannelRow({channel}) { // fn#76747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:1506, offset: 0x01de38fb, size: 266 bytes, params: 2, frame: 25
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel?.guild_id);
});
const value2 = (UseChannelName)(channel);
const GuildIconWithChannelType = (GuildIconWithChannelTypeModule).GuildIconWithChannelType;
const object2 = {};
object2['aria-label'] = '';
object2.guild = guild;
object2.channel = channel;
const GuildIconWithChannelTypeSizes = (GuildIconWithChannelTypeModule).GuildIconWithChannelTypeSizes;
const SMALL_32 = GuildIconWithChannelTypeSizes.SMALL_32;
object2.size = SMALL_32;
const guildIconWithChannelType = <GuildIconWithChannelType {...object2} />;
const Text = (TextModule).Text;
return (
<View style={styles.row}>
{guildIconWithChannelType}
<Text
style={styles.label}
variant="text-md/medium"
lineClamp={1}
ellipsizeMode="tail"
>
{value2}
</Text>
</View>
);
}
alertModalProps.actions = <AlertActions>{r7}</AlertActions>;
return <AlertModal {...alertModalProps} />;
}
function _fun76750() { // fn#76750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2013, offset: 0x01de3aef, size: 106 bytes, params: 1, frame: 15
const type = destination.type;
const value2 = null;
return {channel: type !== 'channel' ? value2 : ChannelStore.getChannel(destination.id),
user: destination.type !== 'user' ? value2 : UserStore.getUser(destination.id)};
}
function _fun76752(a0, a1) { // fn#76752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2576, offset: 0x01de3d58, size: 35 bytes, params: 3, frame: 15
return <FailedDestinationRow destination={a0} key={a1} />;
function FailedDestinationRow({destination}) { // fn#76749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:1918, offset: 0x01de3a34, size: 187 bytes, params: 2, frame: 18
const {channel, user} = (FluxModule).useStateFromStoresObject([ChannelStore,
UserStore], _fun76750);
return (
channel == null
? (
user != null
? (
<FailedUserRow user={user} />
)
: (
channel != null
? (
<FailedChannelRow channel={channel} />
)
: null
)
)
: (
channel.isGroupDM()
? (
<FailedGroupDMRow channel={channel} />
)
: (
user != null
? (
<FailedUserRow user={user} />
)
: (
channel != null
? (
<FailedChannelRow channel={channel} />
)
: null
)
)
)
);
function _fun76750() { // fn#76750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2013, offset: 0x01de3aef, size: 106 bytes, params: 1, frame: 15
const type = destination.type;
const value2 = null;
return {channel: type !== 'channel' ? value2 : ChannelStore.getChannel(destination.id),
user: destination.type !== 'user' ? value2 : UserStore.getUser(destination.id)};
}
}
function DestinationFailedAlertModal({title, content, failedDestinations, onRetry}) { // fn#76751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2376, offset: 0x01de3b59, size: 511 bytes, params: 2, frame: 32
var r7;
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_12Binding;
var object;
var items2;
const styles = useStyles();
const AlertModal = (AlertModalNativeModule).AlertModal;
const alertModalProps = {title: title, content: content,
extraContent: <View style={styles.container}>{failedDestinations.map(_fun76752)}</View>};
const AlertActions = (AlertModalNativeModule).AlertActions;
if (onRetry != null) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [
<AlertActionButton
variant="primary"
onPress={onRetry}
text={intl.string(t['5911Lb'])}
key="confirm"
/>,
];
items2[1] = (
<AlertActionButton
variant="secondary"
text={intl.string(t.WAI6xu)}
key="cancel"
/>
);
r7 = (
<>
{items2}
</>
);
} else {
r7 = (
<AlertActionButton
variant="primary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS)}
key="confirm"
/>
);
}
alertModalProps.actions = (
<AlertActions>
{r7}
</AlertActions>
);
return <AlertModal {...alertModalProps} />;
function _fun76752(a0, a1) { // fn#76752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9978:2576, offset: 0x01de3d58, size: 35 bytes, params: 3, frame: 15
return <FailedDestinationRow destination={a0} key={a1} />;
}
}
}
global.__d(_fun76742, 9792, [31, 27, 1379, 1867, 4396, 3793, 1878, 482, 33, 4501, 697, 4805, 9719, 1305, 4573, 566,
3995, 9793, 4500, 4500, 1244,
2]) /* metro module 9792, dependencies: [31, 27, 1379, 1867, 4396, 3793, 1878, 482, 33, 4501, 697, 4805, 9719, 1305, 4573, 566, 3995, 9793, 4500, 4500, 1244, 2] */;
@@ -1,333 +1,385 @@
/* Metro module 9761; source: modules/share/native/SearchableDestinationList.tsx; dependencies: [57, 31, 27, 661, 7690, 33, 4501, 697, 9762, 5459, 7232, 7234, 5243, 1360, 7697, 9768, 1244, 7704, 6984, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as SearchFieldNativeModule from '../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as AutocompleterModule from '../../autocompleter/index.tsx'; /* Metro dependency 7234 */
import * as UserRowConstantsModule from '../../main_tabs_v2/native/shared_components/user_list/UserRowConstants.tsx'; /* Metro dependency 7690 */
import * as UseShareSearchResultsModule from '../useShareSearchResults.tsx'; /* Metro dependency 9762 */
function _fun76592(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:6, offset: 0x01ddc64b, size: 396 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Keyboard;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const env0_8 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.Fragment;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingBottom = PX_8;
object2.paddingBottom = PX_8;
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object3.searchBarContainer = object4;
object2.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object.searchBarContainer = object2;
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object3.noResults = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const env0_12 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/SearchableDestinationList.tsx');
object.noResults = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/SearchableDestinationList.tsx');
exports.default = SearchableDestinationList;
}
function SearchableDestinationList({initialSelectedDestinations, disabledDestinations, originDestination, getRowIsUnavailable, onSelectedDestinationChange, onSearchTextChange, rowMode = UserRowModes.NONE, insetStart = importDefault(dependencyMap[7]).space.PX_8, insetEnd = importDefault(dependencyMap[7]).space.PX_12, autoFocusSearch, hideSearchOnDefaultNoResults, defaultNoResultsFound, disableGradient, disableStickySections, disableSelection, disableLongPress}) { // fn#76593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:491, offset: 0x01ddc7d7, size: 1374 bytes, params: 2, frame: 40
var r0;
var r5;
var r6;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const env0_3 = onSearchTextChange;
const env0_4 = rowMode;
autoFocusSearch = !(autoFocusSearch === undefined) && autoFocusSearch;
hideSearchOnDefaultNoResults = !(hideSearchOnDefaultNoResults === undefined) && hideSearchOnDefaultNoResults;
const styles = useStyles();
let binding = env0_4;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [initialSelectedDestinations ?? []]);
binding = env0_3;
const value5 = binding(value4, 2);
const property = value5[0];
const env0_9 = value5[1];
const {results,
updateSearchText} = (require(9762) /* metro dependency 9762: useShareSearchResults */).useShareSearchResults({selectedDestinations: property,
originDestination: originDestination, includeMissingDMs: true});
const binding2 = env0_4;
const env0_12 = binding2.useRef('');
useState = binding2.useState;
const value7 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property2 = value7[0];
const env0_13 = value7[1];
const env0_14 = binding2.useRef(null);
binding2.useEffect(function() {
return _fun76595;
}, []);
const value8 = binding2.useCallback(_fun76596, [onSearchTextChange, updateSearchText]);
binding2.useEffect(_fun76598, [property, onSelectedDestinationChange, value8]);
const value9 = binding2.useMemo(function() {
return [results.length];
}, [results.length]);
const value10 = binding2.useCallback(function() {
return {type: 'section', props: {hideTitle: true}};
}, []);
const value11 = binding2.useMemo(_fun76603, [disabledDestinations]);
const value12 = binding2.useMemo(_fun76604, [property]);
const value13 = binding2.useCallback(_fun76605, [disableSelection]);
const value16 = binding2.useCallback(_fun76610, [results, getRowIsUnavailable, value12, value11, disableSelection,
disableLongPress, rowMode, binding2.useCallback(_fun76608, [value13]), binding2.useCallback(_fun76609,
[value13])]);
const value17 = binding2.useRef(null);
const value18 = value9.some(function(a0) {
return a0 > 0;
});
if (value18) {
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r5 = <UsersFastList ref={value17} sections={value9} getItemProps={value16} getSectionProps={value10} insetStart={insetStart} insetEnd={insetEnd} disableStickySections={disableStickySections} />;
} else {
if (property2) {
object2 = {};
object2.style = styles.noResults;
object2.children = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF)} />)(importDefault(9768) /* metro dependency 9768: NoResults */);
r0 = object2;
} else if (defaultNoResultsFound == null) {
object2 = {};
object2.style = styles.noResults;
object2.children = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF)} />)(importDefault(9768) /* metro dependency 9768: NoResults */);
r0 = object2;
} else {
r0 = {style: [styles.noResults], children: defaultNoResultsFound};
}
r5 = <View {...r0} />;
}
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const r9 = !disableGradient && ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
if (hideSearchOnDefaultNoResults) {
function SearchableDestinationList({initialSelectedDestinations, disabledDestinations, originDestination, getRowIsUnavailable, onSelectedDestinationChange, onSearchTextChange, rowMode = UserRowModes.NONE, insetStart = importDefault(dependencyMap[7]).space.PX_8, insetEnd = importDefault(dependencyMap[7]).space.PX_12, autoFocusSearch, hideSearchOnDefaultNoResults, defaultNoResultsFound, disableGradient, disableStickySections, disableSelection, disableLongPress}) { // fn#76593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:491, offset: 0x01ddc7d7, size: 1374 bytes, params: 2, frame: 40
var r0;
var r5;
var r6;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const SearchField = (SearchFieldNativeModule).SearchField;
const onSearchTextChange2 = onSearchTextChange;
const rowMode2 = rowMode;
autoFocusSearch = !(autoFocusSearch === undefined) && autoFocusSearch;
hideSearchOnDefaultNoResults = !(hideSearchOnDefaultNoResults === undefined) && hideSearchOnDefaultNoResults;
const styles = useStyles();
let binding = rowMode2;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [initialSelectedDestinations ?? []]);
binding = onSearchTextChange2;
const value5 = binding(value4, 2);
const property = value5[0];
const env0_9 = value5[1];
const {results,
updateSearchText} = (UseShareSearchResultsModule).useShareSearchResults({selectedDestinations: property,
originDestination: originDestination, includeMissingDMs: true});
const binding2 = rowMode2;
const env0_12 = binding2.useRef('');
useState = binding2.useState;
const value7 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property2 = value7[0];
const env0_13 = value7[1];
const env0_14 = binding2.useRef(null);
binding2.useEffect(function() {
return _fun76595;
}, []);
const value8 = binding2.useCallback(_fun76596, [onSearchTextChange, updateSearchText]);
binding2.useEffect(_fun76598, [property, onSelectedDestinationChange, value8]);
const value9 = binding2.useMemo(function() {
return [results.length];
}, [results.length]);
const value10 = binding2.useCallback(function() {
return {type: 'section', props: {hideTitle: true}};
}, []);
const value11 = binding2.useMemo(_fun76603, [disabledDestinations]);
const value12 = binding2.useMemo(_fun76604, [property]);
const value13 = binding2.useCallback(_fun76605, [disableSelection]);
const value16 = binding2.useCallback(_fun76610, [results, getRowIsUnavailable, value12, value11, disableSelection,
disableLongPress, rowMode, binding2.useCallback(_fun76608, [value13]), binding2.useCallback(_fun76609,
[value13])]);
const value17 = binding2.useRef(null);
const value18 = value9.some(function(a0) {
return a0 > 0;
});
if (value18) {
r6 = <View style={styles.searchBarContainer}><SearchField ref={value3} size="md" onChange={value8} autoFocus={autoFocusSearch && value18} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)} /></View>;
} else if (property2) {
r6 = <View style={styles.searchBarContainer}><SearchField ref={value3} size="md" onChange={value8} autoFocus={autoFocusSearch && value18} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)} /></View>;
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
r5 = (
<UsersFastList
ref={value17}
sections={value9}
getItemProps={value16}
getSectionProps={value10}
insetStart={insetStart}
insetEnd={insetEnd}
disableStickySections={disableStickySections}
/>
);
} else {
r6 = null;
}
} else {
r6 = <View style={styles.searchBarContainer}><SearchField ref={value3} size="md" onChange={value8} autoFocus={autoFocusSearch && value18} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)} /></View>;
}
return (
<>
{r9}
{r6}
{r5}
</>
);
}
function _fun76594() { // fn#76594, offset: 0x01ddcd35, size: 11 bytes, params: 1, frame: 1
return _fun76595;
}
function _fun76596(a0) { // fn#76596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1282, offset: 0x01ddcd60, size: 185 bytes, params: 2, frame: 13
var environment;
var binding;
let value = a1;
const r2 = value !== undefined ? value : false;
let current = env0_12.current;
if (a0 !== current) {
env0_12.current = a0;
if (r2) {
current = env0_7.current;
if (current != null) {
current.setText(a0);
if (property2) {
object = {};
object.style = styles.noResults;
object.children = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF)} />)(importDefault(9768) /* metro dependency 9768: NoResults */);
r0 = object;
} else if (defaultNoResultsFound == null) {
object = {};
object.style = styles.noResults;
object.children = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF)} />)(importDefault(9768) /* metro dependency 9768: NoResults */);
r0 = object;
} else {
r0 = {style: [styles.noResults], children: defaultNoResultsFound};
}
r5 = <View {...r0} />;
}
updateSearchText(a0);
if (onSearchTextChange != null) {
onSearchTextChange(a0);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const r9 = !disableGradient && ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
if (hideSearchOnDefaultNoResults) {
if (value18) {
r6 = (
<View style={styles.searchBarContainer}>
<SearchField
ref={value3}
size="md"
onChange={value8}
autoFocus={autoFocusSearch && value18}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)}
/>
</View>
);
} else if (property2) {
r6 = (
<View style={styles.searchBarContainer}>
<SearchField
ref={value3}
size="md"
onChange={value8}
autoFocus={autoFocusSearch && value18}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)}
/>
</View>
);
} else {
r6 = null;
}
} else {
r6 = (
<View style={styles.searchBarContainer}>
<SearchField
ref={value3}
size="md"
onChange={value8}
autoFocus={autoFocusSearch && value18}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CaEER6)}
/>
</View>
);
}
binding = env0_13;
binding(a0.trim().length > 0);
binding = env0_14;
value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
binding.current = value.runAfterInteractions(_fun76597);
}
}
return (
<>
{r9}
{r6}
{r5}
</>
);
function _fun76594() { // fn#76594, offset: 0x01ddcd35, size: 11 bytes, params: 1, frame: 1
return _fun76595;
function _fun76595() { // fn#76595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1212, offset: 0x01ddcd40, size: 32 bytes, params: 1, frame: 9
const current = env1_14.current;
if (current != null) {
current.cancel();
}
}
function _fun76598() { // fn#76598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1525, offset: 0x01ddce3c, size: 67 bytes, params: 1, frame: 15
onSelectedDestinationChange(env0_8);
global.setTimeout(function() {
Keyboard.dismiss();
}, 0);
global.setTimeout(_fun76600, 50);
}
function _fun76603() { // fn#76603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1738, offset: 0x01ddceda, size: 73 bytes, params: 1, frame: 16
var r0;
var map;
var value;
let disabledDestinationsBinding = disabledDestinations;
if (disabledDestinationsBinding == null) {
r0 = undefined;
} else {
disabledDestinationsBinding = disabledDestinations;
map = disabledDestinationsBinding.map;
value = environment.__proto__;
value = Reflect.apply(map, disabledDestinationsBinding,
[(require(7232) /* metro dependency 7232: formatResults */).destinationKey]);
r0 = value;
}
r0 = r0 ?? [];
return r0;
}
function _fun76604() { // fn#76604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1837, offset: 0x01ddcf23, size: 73 bytes, params: 1, frame: 16
var r0;
var binding;
var map;
var value;
if (env0_8 == null) {
r0 = undefined;
} else {
binding = env0_8;
map = binding.map;
value = environment.__proto__;
value = Reflect.apply(map, binding,
[(require(7232) /* metro dependency 7232: formatResults */).destinationKey]);
r0 = value;
}
r0 = r0 ?? [];
return r0;
}
function _fun76605(a0) { // fn#76605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1941, offset: 0x01ddcf6c, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_9(_fun76606);
}
function _fun76608({id}) { // fn#76608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2096, offset: 0x01ddcffb, size: 38 bytes, params: 2, frame: 11
return env0_18({type: 'user', id: id});
}
function _fun76609({id}) { // fn#76609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2150, offset: 0x01ddd021, size: 38 bytes, params: 2, frame: 11
return env0_18({type: 'channel', id: id});
}
function _fun76610(a0, a1) { // fn#76610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2207, offset: 0x01ddd047, size: 825 bytes, params: 3, frame: 24
var r13;
var r10;
var r12;
var USER;
var object2;
var binding;
var value8;
var value9;
var object4;
var object6;
var object8;
var moduleValue3;
const {type, record} = results[a1];
const value2 = results.length - 1;
const value4 = undefined;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const HEADER = AutocompleterResultTypes.HEADER;
if (type !== HEADER) {
USER = AutocompleterResultTypes.USER;
r13 = type === USER ? (require(7232) /* metro dependency 7232: formatResults */).destinationKey({type: 'user',
id: record.id}) : (require(7232) /* metro dependency 7232: formatResults */).destinationKey({type: 'channel',
id: record.id});
r10 = getRowIsUnavailable == null ? value4 : getRowIsUnavailable(record);
binding = env0_17;
value8 = binding.includes(r13);
binding = env0_16;
value9 = binding.includes(r13);
object2 = {};
r12 = disableSelection && !value8;
r12 = !r12 ? value9 : r12;
r12 = !r12 ? r10 != null : r12;
object2.disabled = r12;
object2.selected = value8;
object2.mode = r10 != null ? UserRowModes.NONE : env0_4;
object2.subLabel = r10 != null ? r10.label : value4;
object2.start = a1 === 0;
object2.end = a1 === value2;
USER = AutocompleterResultTypes.USER;
if (USER === type) {
object8 = {};
copyDataProperties(object8, object2, undefined);
object8['user'] = record;
moduleValue3 = require(5243) /* metro dependency 5243: UserSearchUtils */;
object8['type'] = moduleValue3.getRelationshipType(record.id);
object8['onPress'] = env0_19;
copyDataProperties(object8, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'user', props: object8};
}
if (AutocompleterResultTypes.GROUP_DM === type) {
object6 = {};
copyDataProperties(object6, object2, undefined);
object6['channel'] = record;
object6['onPress'] = env0_20;
copyDataProperties(object6, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'gdm', props: object6};
function _fun76596(a0) { // fn#76596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1282, offset: 0x01ddcd60, size: 185 bytes, params: 2, frame: 13
var environment;
var binding;
let value = a1;
const r2 = value !== undefined ? value : false;
let current = env0_12.current;
if (a0 !== current) {
env0_12.current = a0;
if (r2) {
current = ConstantsModule.NOOP.current;
if (current != null) {
current.setText(a0);
}
}
updateSearchText(a0);
if (onSearchTextChange != null) {
onSearchTextChange(a0);
}
binding = env0_13;
binding(a0.trim().length > 0);
binding = env0_14;
value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
binding.current = value.runAfterInteractions(_fun76597);
}
function _fun76597() { // fn#76597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1448, offset: 0x01ddce19, size: 35 bytes, params: 1, frame: 11
const current = env1_21.current;
if (current != null) {
current.scrollToTop(false);
}
}
}
if (AutocompleterResultTypes.TEXT_CHANNEL === type) {
object4 = {};
copyDataProperties(object4, object2, undefined);
object4['channel'] = record;
object4['onPress'] = env0_20;
copyDataProperties(object4, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'channel', props: object4};
function _fun76598() { // fn#76598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1525, offset: 0x01ddce3c, size: 67 bytes, params: 1, frame: 15
onSelectedDestinationChange(UserRowConstantsModule.UserRowModes);
global.setTimeout(function() {
Keyboard.dismiss();
}, 0);
global.setTimeout(_fun76600, 50);
function _fun76600() { // fn#76600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1581, offset: 0x01ddce94, size: 23 bytes, params: 1, frame: 13
env1_15('', true);
}
}
if (AutocompleterResultTypes.VOICE_CHANNEL === type) {
object4 = {};
copyDataProperties(object4, object2, undefined);
object4['channel'] = record;
object4['onPress'] = env0_20;
copyDataProperties(object4, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'channel', props: object4};
function _fun76603() { // fn#76603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1738, offset: 0x01ddceda, size: 73 bytes, params: 1, frame: 16
var r0;
var map;
var value;
let disabledDestinationsBinding = disabledDestinations;
if (disabledDestinationsBinding == null) {
r0 = undefined;
} else {
disabledDestinationsBinding = disabledDestinations;
map = disabledDestinationsBinding.map;
value = environment.__proto__;
value = Reflect.apply(map, disabledDestinationsBinding,
[(require(7232) /* metro dependency 7232: formatResults */).destinationKey]);
r0 = value;
}
r0 = r0 ?? [];
return r0;
}
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(type);
}
return value4;
}
function _fun76595() { // fn#76595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1212, offset: 0x01ddcd40, size: 32 bytes, params: 1, frame: 9
const current = env1_14.current;
if (current != null) {
current.cancel();
}
}
function _fun76597() { // fn#76597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1448, offset: 0x01ddce19, size: 35 bytes, params: 1, frame: 11
const current = env1_21.current;
if (current != null) {
current.scrollToTop(false);
}
}
function _fun76600() { // fn#76600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1581, offset: 0x01ddce94, size: 23 bytes, params: 1, frame: 13
env1_15('', true);
}
function _fun76606(a0) { // fn#76606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1948, offset: 0x01ddcf8c, size: 111 bytes, params: 2, frame: 15
var environment;
var items2;
var value;
const index = a0.findIndex(_fun76607);
if (index === -1) {
value = environment.__proto__;
if (disableSelection) {
return a0;
function _fun76604() { // fn#76604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1837, offset: 0x01ddcf23, size: 73 bytes, params: 1, frame: 16
var r0;
var binding;
var map;
var value;
if (UserRowConstantsModule.UserRowModes == null) {
r0 = undefined;
} else {
binding = UserRowConstantsModule.UserRowModes;
map = binding.map;
value = environment.__proto__;
value = Reflect.apply(map, binding,
[(require(7232) /* metro dependency 7232: formatResults */).destinationKey]);
r0 = value;
}
r0 = r0 ?? [];
return r0;
}
arraySpread([env0_0], a0, 1, index);
} else {
items2 = [];
arraySpread(items2, a0, 0, index);
items2.splice(index, 1);
function _fun76605(a0) { // fn#76605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1941, offset: 0x01ddcf6c, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_9(_fun76606);
function _fun76606(a0) { // fn#76606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1948, offset: 0x01ddcf8c, size: 111 bytes, params: 2, frame: 15
var environment;
var items2;
var value;
const index = a0.findIndex(_fun76607);
if (index === -1) {
value = environment.__proto__;
if (disableSelection) {
return a0;
}
arraySpread([env0_0], a0, 1, index);
} else {
items2 = [];
arraySpread(items2, a0, 0, index);
items2.splice(index, 1);
}
return items2;
function _fun76607({id}) { // fn#76607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:1975, offset: 0x010ed33f, size: 26 bytes, params: 2, frame: 2
return id === env1_0.id;
}
}
}
function _fun76608({id}) { // fn#76608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2096, offset: 0x01ddcffb, size: 38 bytes, params: 2, frame: 11
return env0_18({type: 'user', id: id});
}
function _fun76609({id}) { // fn#76609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2150, offset: 0x01ddd021, size: 38 bytes, params: 2, frame: 11
return env0_18({type: 'channel', id: id});
}
function _fun76610(a0, a1) { // fn#76610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9947:2207, offset: 0x01ddd047, size: 825 bytes, params: 3, frame: 24
var r13;
var r10;
var r12;
var USER;
var object;
var binding;
var value8;
var value9;
var object3;
var object5;
var object7;
var moduleValue3;
const {type, record} = results[a1];
const value2 = results.length - 1;
const value4 = undefined;
const AutocompleterResultTypes = (AutocompleterModule).AutocompleterResultTypes;
const HEADER = AutocompleterResultTypes.HEADER;
if (type !== HEADER) {
USER = AutocompleterResultTypes.USER;
r13 = type === USER ? (require(7232) /* metro dependency 7232: formatResults */).destinationKey({type: 'user',
id: record.id}) : (require(7232) /* metro dependency 7232: formatResults */).destinationKey({type: 'channel',
id: record.id});
r10 = getRowIsUnavailable == null ? value4 : getRowIsUnavailable(record);
binding = env0_17;
value8 = binding.includes(r13);
binding = env0_16;
value9 = binding.includes(r13);
object = {};
r12 = disableSelection && !value8;
r12 = !r12 ? value9 : r12;
r12 = !r12 ? r10 != null : r12;
object.disabled = r12;
object.selected = value8;
object.mode = r10 != null ? UserRowModes.NONE : ReactModule;
object.subLabel = r10 != null ? r10.label : value4;
object.start = a1 === 0;
object.end = a1 === value2;
USER = AutocompleterResultTypes.USER;
if (USER === type) {
object7 = {};
copyDataProperties(object7, object, undefined);
object7['user'] = record;
moduleValue3 = require(5243) /* metro dependency 5243: UserSearchUtils */;
object7['type'] = moduleValue3.getRelationshipType(record.id);
object7['onPress'] = env0_19;
copyDataProperties(object7, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'user', props: object7};
}
if (AutocompleterResultTypes.GROUP_DM === type) {
object5 = {};
copyDataProperties(object5, object, undefined);
object5['channel'] = record;
object5['onPress'] = env0_20;
copyDataProperties(object5, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'gdm', props: object5};
}
if (AutocompleterResultTypes.TEXT_CHANNEL === type) {
object3 = {};
copyDataProperties(object3, object, undefined);
object3['channel'] = record;
object3['onPress'] = env0_20;
copyDataProperties(object3, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'channel', props: object3};
}
if (AutocompleterResultTypes.VOICE_CHANNEL === type) {
object3 = {};
copyDataProperties(object3, object, undefined);
object3['channel'] = record;
object3['onPress'] = env0_20;
copyDataProperties(object3, disableLongPress ? {onLongPress: NOOP} : value4, undefined);
return {type: 'channel', props: object3};
}
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(type);
}
return value4;
}
}
return items2;
}
global.__d(_fun76592, 9761, [57, 31, 27, 661, 7690, 33, 4501, 697, 9762, 5459, 7232, 7234, 5243, 1360, 7697, 9768,
1244, 7704, 6984,
2]) /* metro module 9761, dependencies: [57, 31, 27, 661, 7690, 33, 4501, 697, 9762, 5459, 7232, 7234, 5243, 1360, 7697, 9768, 1244, 7704, 6984, 2] */;
+174 -156
View File
@@ -1,176 +1,194 @@
/* Metro module 12677; source: modules/share/native/ShareAttachments.tsx; dependencies: [31, 27, 33, 4017, 4589, 1305, 4501, 697, 4504, 4000, 1244, 11143, 4660, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import AttachmentPreview from '../../media/native/AttachmentPreview.tsx'; /* Metro dependency 11143 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun97136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:6, offset: 0x02173f68, size: 569 bytes, params: 8, frame: 22
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;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4589) /* metro dependency 4589 */);
object2 = {duration: 300};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.easing = STANDARD_EASING;
const env0_7 = (ReanimatedRexport).createAnimatedComponent(LinearGradient);
object = {duration: 300};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.easing = STANDARD_EASING;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.containerRevamp = {marginHorizontal: -PX_16};
object.containerRevamp = {marginHorizontal: -PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.attachmentPreviewContentContainer = {flexDirection: 'row', gap: PX_8};
object.attachmentPreviewContentContainer = {flexDirection: 'row', gap: PX_8};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.attachmentPreviewContentContainerRevamp = {paddingHorizontal: PX_16};
const object3 = {'height': 60, 'backgroundColor': null, 'overflow': 'hidden'};
object.attachmentPreviewContentContainerRevamp = {paddingHorizontal: PX_16};
const object4 = {'height': 60, 'backgroundColor': null, 'overflow': 'hidden'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.attachmentPreview = object3;
object2.leftGradient = {'width': 50, 'position': 'absolute', 'left': 0, 'top': 0, 'bottom': 0, 'zIndex': 100};
object2.rightGradient = {'width': 50, 'position': 'absolute', 'right': 0, 'top': 0, 'bottom': 0, 'zIndex': 100};
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.attachmentPreview = object4;
object.leftGradient = {'width': 50, 'position': 'absolute', 'left': 0, 'top': 0, 'bottom': 0, 'zIndex': 100};
object.rightGradient = {'width': 50, 'position': 'absolute', 'right': 0, 'top': 0, 'bottom': 0, 'zIndex': 100};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.gradient = {color: BACKGROUND_SURFACE_HIGH};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function ShareAttachmentsTsx1(){const{withTiming,contentOffset,GRADIENT_EASING_CONFIG}=this.__closure;return{opacity:withTiming(contentOffset.get()<=0?0:1,GRADIENT_EASING_CONFIG)};}'};
object2 = {code: 'function ShareAttachmentsTsx2(){const{withTiming,contentOffset,layoutWidth,contentWidth,GRADIENT_EASING_CONFIG}=this.__closure;return{opacity:withTiming(contentOffset.get()+layoutWidth.get()>=contentWidth.get()?0:1,GRADIENT_EASING_CONFIG)};}'};
object2 = {code: 'function ShareAttachmentsTsx3(event){const{contentOffset,contentWidth,layoutWidth}=this.__closure;contentOffset.set(event.contentOffset.x);contentWidth.set(event.contentSize.width);layoutWidth.set(event.layoutMeasurement.width);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareAttachments.tsx');
object.gradient = {color: BACKGROUND_SURFACE_HIGH};
const env0_9 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function ShareAttachmentsTsx1(){const{withTiming,contentOffset,GRADIENT_EASING_CONFIG}=this.__closure;return{opacity:withTiming(contentOffset.get()<=0?0:1,GRADIENT_EASING_CONFIG)};}'};
object = {code: 'function ShareAttachmentsTsx2(){const{withTiming,contentOffset,layoutWidth,contentWidth,GRADIENT_EASING_CONFIG}=this.__closure;return{opacity:withTiming(contentOffset.get()+layoutWidth.get()>=contentWidth.get()?0:1,GRADIENT_EASING_CONFIG)};}'};
object = {code: 'function ShareAttachmentsTsx3(event){const{contentOffset,contentWidth,layoutWidth}=this.__closure;contentOffset.set(event.contentOffset.x);contentWidth.set(event.contentSize.width);layoutWidth.set(event.layoutMeasurement.width);}'};
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareAttachments.tsx');
exports.default = ShareAttachments;
}
function ShareAttachments({attachments, isRevamp}) { // fn#97137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:1597, offset: 0x021741a1, size: 956 bytes, params: 2, frame: 31
var r0;
var items3;
var ScrollView;
var object2;
var intl;
let value = undefined;
isRevamp = !(isRevamp === value) && isRevamp;
const styles = useStyles();
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const value5 = (ReanimatedRexportModule).useSharedValue(0);
const value6 = (ReanimatedRexportModule).useSharedValue(0);
const env0_3 = value6;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = ShareAttachmentsY;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.contentOffset = value4;
let binding = env0_8;
object.GRADIENT_EASING_CONFIG = binding;
closure.__closure = object;
closure.__workletHash = 3302668154466;
closure.__initData = env0_10;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = ShareAttachmentsS;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
contentOffset: value4, layoutWidth: value6, contentWidth: value5, GRADIENT_EASING_CONFIG: binding};
closure.__workletHash = 13996707009656;
closure.__initData = env0_11;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedScrollHandler = ReanimatedRexportModule.useAnimatedScrollHandler;
closure = ShareAttachmentsV;
closure.__closure = {contentOffset: value4, contentWidth: value5, layoutWidth: value6};
closure.__workletHash = 12660577105859;
closure.__initData = env0_12;
const value9 = Reflect.apply(useAnimatedScrollHandler, ReanimatedRexportModule, [closure]);
binding = env0_3;
const value10 = binding.useCallback(_fun97141, [value6]);
const value11 = binding.useCallback(_fun97142, [value5]);
const useMemo = binding.useMemo;
let gradient = styles.gradient;
let color = gradient.color;
const value12 = Reflect.apply(useMemo, binding, [_fun97143, [color]]);
if (attachments.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: isRevamp ? styles.containerRevamp : value};
binding = env0_7;
gradient = styles.gradient;
color = gradient.color;
items3 = [
((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} colors={[color,
value12]} style={[styles.leftGradient, value7]} pointerEvents="box-none" />)(binding),
];
gradient = styles.gradient;
color = gradient.color;
items3[1] = ((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} colors={[value12,
color]} style={[styles.rightGradient, value8]} pointerEvents="box-none" />)(binding);
ScrollView = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).ScrollView;
var scrollViewProps = {contentContainerStyle: [styles.attachmentPreviewContentContainer,
isRevamp ? styles.attachmentPreviewContentContainerRevamp : value], horizontal: true, onScroll: value9,
onLayout: value10, onContentSizeChange: value11, scrollEventThrottle: 16,
showsHorizontalScrollIndicator: false,
accessibilityRole: 'list'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
scrollViewProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RhtzFe);
items3[2] = (
<ScrollView {...scrollViewProps}>
{attachments.map(_fun97144)}
</ScrollView>
);
value = (
<View {...viewBindingProps}>
{items3}
</View>
);
r0 = value;
}
return r0;
function ShareAttachmentsY() { // fn#97138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:1785, owner: ShareAttachments.y, offset: 0x0217455d, size: 78 bytes, params: 1, frame: 16
const withTiming = TimingModule.withTiming;
const value3 = env0_1.get();
const value4 = 0;
return {opacity: Reflect.apply(withTiming, TimingModule, [value3 <= value4 ? value4 : 1, env1_8])};
}
function ShareAttachmentsS() { // fn#97139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2002, owner: ShareAttachments.S, offset: 0x021745ab, size: 106 bytes, params: 1, frame: 17
const withTiming = TimingModule.withTiming;
let binding = env0_1;
let get = binding.get;
const value3 = Reflect.apply(get, binding, []);
binding = env0_3;
get = binding.get;
const value4 = value3 + Reflect.apply(get, binding, []);
binding = env0_2;
get = binding.get;
return {opacity: Reflect.apply(withTiming, TimingModule, [value4 >= Reflect.apply(get, binding, []) ? 0 : 1,
env1_8])};
}
function ShareAttachmentsV({contentOffset, contentSize, layoutMeasurement}) { // fn#97140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2270, owner: ShareAttachments.v, offset: 0x02174615, size: 85 bytes, params: 2, frame: 13
let binding = env0_1;
binding.set(contentOffset.x);
binding = env0_2;
binding.set(contentSize.width);
binding = env0_3;
binding.set(layoutMeasurement.width);
}
function _fun97141({nativeEvent}) { // fn#97141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2492, offset: 0x0217466a, size: 41 bytes, params: 2, frame: 11
const binding = env0_3;
binding.set(nativeEvent.layout.width);
}
function _fun97142(a0) { // fn#97142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2554, offset: 0x010c54ad, size: 24 bytes, params: 2, frame: 11
env0_2.set(a0);
}
function _fun97143() { // fn#97143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2587, offset: 0x02174693, size: 59 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
return value.hexWithOpacity(styles.gradient.color, 0);
}
function _fun97144(a0, a1) { // fn#97144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:3307, offset: 0x021746ce, size: 200 bytes, params: 3, frame: 24
let value = environment.__proto__;
const defaultImportProps = {'uri': null, 'width': 60, 'height': 60, uri: a0.uri};
value = require(4660) /* metro dependency 4660: UploadUtils */;
defaultImportProps.isImage = value.isImage(a0.uri, a0.mimeType);
value = require(4660) /* metro dependency 4660: UploadUtils */;
defaultImportProps.isVideo = value.isVideo(a0.uri, a0.mimeType);
defaultImportProps.fileName = a0.name;
defaultImportProps.showPlayOnVideoPreview = true;
return (
<View style={styles.attachmentPreview} key={a1}>
<AttachmentPreview {...defaultImportProps} />
</View>
);
}
function ShareAttachments({attachments, isRevamp}) { // fn#97137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:1597, offset: 0x021741a1, size: 956 bytes, params: 2, frame: 31
var r0;
var items3;
var ScrollView;
var object4;
var intl;
let value = undefined;
isRevamp = !(isRevamp === value) && isRevamp;
const styles = useStyles();
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value6;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = ShareAttachmentsY;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.contentOffset = value4;
let binding = env0_8;
object2.GRADIENT_EASING_CONFIG = binding;
closure.__closure = object2;
closure.__workletHash = 3302668154466;
closure.__initData = env0_10;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = ShareAttachmentsS;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
contentOffset: value4, layoutWidth: value6, contentWidth: value5, GRADIENT_EASING_CONFIG: binding};
closure.__workletHash = 13996707009656;
closure.__initData = env0_11;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedScrollHandler = moduleValue6.useAnimatedScrollHandler;
closure = ShareAttachmentsV;
closure.__closure = {contentOffset: value4, contentWidth: value5, layoutWidth: value6};
closure.__workletHash = 12660577105859;
closure.__initData = env0_12;
const value9 = Reflect.apply(useAnimatedScrollHandler, moduleValue6, [closure]);
binding = env0_3;
const value10 = binding.useCallback(_fun97141, [value6]);
const value11 = binding.useCallback(_fun97142, [value5]);
const useMemo = binding.useMemo;
let gradient = styles.gradient;
let color = gradient.color;
const value12 = Reflect.apply(useMemo, binding, [_fun97143, [color]]);
if (attachments.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: isRevamp ? styles.containerRevamp : value};
binding = env0_7;
gradient = styles.gradient;
color = gradient.color;
items3 = [((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} colors={[color,
value12]} style={[styles.leftGradient, value7]} pointerEvents="box-none" />)(binding)];
gradient = styles.gradient;
color = gradient.color;
items3[1] = ((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} colors={[value12,
color]} style={[styles.rightGradient, value8]} pointerEvents="box-none" />)(binding);
ScrollView = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).ScrollView;
var scrollViewProps = {contentContainerStyle: [styles.attachmentPreviewContentContainer,
isRevamp ? styles.attachmentPreviewContentContainerRevamp : value], horizontal: true, onScroll: value9,
onLayout: value10, onContentSizeChange: value11, scrollEventThrottle: 16,
showsHorizontalScrollIndicator: false,
accessibilityRole: 'list'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
scrollViewProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RhtzFe);
items3[2] = <ScrollView {...scrollViewProps}>{attachments.map(_fun97144)}</ScrollView>;
value = <View {...viewBindingProps}>{items3}</View>;
r0 = value;
}
return r0;
}
function ShareAttachmentsY() { // fn#97138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:1785, owner: ShareAttachments.y, offset: 0x0217455d, size: 78 bytes, params: 1, frame: 16
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const value3 = env0_1.get();
const value4 = 0;
return {opacity: Reflect.apply(withTiming, timingModule, [value3 <= value4 ? value4 : 1, env1_8])};
}
function ShareAttachmentsS() { // fn#97139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2002, owner: ShareAttachments.S, offset: 0x021745ab, size: 106 bytes, params: 1, frame: 17
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
let binding = env0_1;
let get = binding.get;
const value3 = Reflect.apply(get, binding, []);
binding = env0_3;
get = binding.get;
const value4 = value3 + Reflect.apply(get, binding, []);
binding = env0_2;
get = binding.get;
return {opacity: Reflect.apply(withTiming, timingModule, [value4 >= Reflect.apply(get, binding, []) ? 0 : 1,
env1_8])};
}
function ShareAttachmentsV({contentOffset, contentSize, layoutMeasurement}) { // fn#97140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2270, owner: ShareAttachments.v, offset: 0x02174615, size: 85 bytes, params: 2, frame: 13
let binding = env0_1;
binding.set(contentOffset.x);
binding = env0_2;
binding.set(contentSize.width);
binding = env0_3;
binding.set(layoutMeasurement.width);
}
function _fun97141({nativeEvent}) { // fn#97141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2492, offset: 0x0217466a, size: 41 bytes, params: 2, frame: 11
const binding = env0_3;
binding.set(nativeEvent.layout.width);
}
function _fun97143() { // fn#97143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:2587, offset: 0x02174693, size: 59 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
return value.hexWithOpacity(styles.gradient.color, 0);
}
function _fun97144(a0, a1) { // fn#97144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12867:3307, offset: 0x021746ce, size: 200 bytes, params: 3, frame: 24
let value = environment.__proto__;
const AttachmentPreview = importDefault(11143) /* metro dependency 11143: AttachmentPreview */;
const defaultImportProps = {'uri': null, 'width': 60, 'height': 60, uri: a0.uri};
value = require(4660) /* metro dependency 4660: UploadUtils */;
defaultImportProps.isImage = value.isImage(a0.uri, a0.mimeType);
value = require(4660) /* metro dependency 4660: UploadUtils */;
defaultImportProps.isVideo = value.isVideo(a0.uri, a0.mimeType);
defaultImportProps.fileName = a0.name;
defaultImportProps.showPlayOnVideoPreview = true;
return (
<View style={styles.attachmentPreview} key={a1}>
<AttachmentPreview {...defaultImportProps} />
</View>
);
}
global.__d(_fun97136, 12677, [31, 27, 33, 4017, 4589, 1305, 4501, 697, 4504, 4000, 1244, 11143, 4660,
2]) /* metro module 12677, dependencies: [31, 27, 33, 4017, 4589, 1305, 4501, 697, 4504, 4000, 1244, 11143, 4660, 2] */;
+78 -74
View File
@@ -1,97 +1,101 @@
/* Metro module 9788; source: modules/share/native/ShareChatInput.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 477, 7875, 7980, 1244, 5278, 7950, 2] */
import UseMessageMaxLength from '../../messages/useMessageMaxLength.tsx'; /* Metro dependency 7875 */
import FormInput from '../../../design/void/Form/native/FormInput.tsx'; /* Metro dependency 7980 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ReactionIconModule from '../../../design/components/Icon/native/redesign/generated/ReactionIcon.tsx'; /* Metro dependency 7950 */
function _fun76730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9974:6, offset: 0x01de27d9, size: 560 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = 2;
const Fonts = require(dependencyMap[value2]).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_4 = value3.jsx;
const env0_5 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'flex': 1, 'flexDirection': 'row', 'backgroundColor': null, 'borderRadius': 20};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'flex': 1, 'flexDirection': 'row', 'backgroundColor': null, 'borderRadius': 20};
const REDESIGN_CHAT_INPUT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHAT_INPUT_BACKGROUND;
object5.backgroundColor = REDESIGN_CHAT_INPUT_BACKGROUND;
object2.backgroundColor = REDESIGN_CHAT_INPUT_BACKGROUND;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingHorizontal = PX_12;
object3.container = object5;
object2.paddingHorizontal = PX_12;
object.container = object2;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.chatInput = {'flex': 1, 'paddingVertical': 0, 'paddingHorizontal': null, 'maxHeight': 80,
object.chatInput = {'flex': 1, 'paddingVertical': 0, 'paddingHorizontal': null, 'maxHeight': 80,
paddingHorizontal: PX_4};
const object7 = {'fontSize': 16, 'lineHeight': 20};
const object4 = {'fontSize': 16, 'lineHeight': 20};
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
object7.fontFamily = PRIMARY_NORMAL;
object4.fontFamily = PRIMARY_NORMAL;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object7.color = TEXT_STRONG;
object4.color = TEXT_STRONG;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object7.paddingTop = PX_8 + (platformUtilsModule.isAndroid() ? value : value2);
object4.paddingTop = PX_8 + (PlatformUtilsModule.isAndroid() ? value : value2);
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.paddingBottom = PX_8;
object3.chatText = object7;
object4.paddingBottom = PX_8;
object.chatText = object4;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.inputPlaceholder = {color: TEXT_MUTED};
const object8 = {};
object.inputPlaceholder = {color: TEXT_MUTED};
const object6 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingTop = PX_8;
object6.paddingTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingBottom = PX_8;
object8.alignSelf = 'flex-end';
object3.emojiButton = object8;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareChatInput.tsx');
object6.paddingBottom = PX_8;
object6.alignSelf = 'flex-end';
object.emojiButton = object6;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareChatInput.tsx');
exports.default = ShareChatInput;
function ShareChatInput({text, inputRef, onChange, onSelectionChange, onFocus, onBlur, onPressEmoji, onSend, disabled}) { // fn#76731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9974:850, offset: 0x01de2a09, size: 522 bytes, params: 2, frame: 31
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = (UseMessageMaxLength)();
const object2 = {ref: inputRef, maxLength: value2};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZroO3G = (require(1244) /* metro dependency 1244: indexNative */).t.ZroO3G;
object2.placeholder = Reflect.apply(string, intl, [ZroO3G]);
object2.placeholderTextColor = styles.inputPlaceholder.color;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/+MXmw']);
object2.onSubmitEditing = onSend;
object2.onSelectionChange = onSelectionChange;
object2.style = styles.chatInput;
object2.value = text;
object2.onChange = onChange;
object2.onFocus = onFocus;
object2.onBlur = onBlur;
object2.multiline = true;
object2.showBorder = false;
object2.showTopContainer = false;
object2.textAlignVertical = 'center';
object2.inputTextStyle = styles.chatText;
object2.editable = !disabled;
const formInput = <FormInput {...object2} />;
const PressableOpacity = (PressablesModule).PressableOpacity;
string = intl.string;
const iZ7Mz9 = (require(1244) /* metro dependency 1244: indexNative */).t.iZ7Mz9;
const ReactionIcon = (ReactionIconModule).ReactionIcon;
return (
<View style={styles.container}>
{formInput}
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [iZ7Mz9])}
accessibilityRole="button"
onPress={onPressEmoji}
style={styles.emojiButton}
disabled={disabled}
>
<ReactionIcon size="md" />
</PressableOpacity>
</View>
);
}
}
function ShareChatInput({text, inputRef, onChange, onSelectionChange, onFocus, onBlur, onPressEmoji, onSend, disabled}) { // fn#76731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9974:850, offset: 0x01de2a09, size: 522 bytes, params: 2, frame: 31
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = (importDefault(7875) /* metro dependency 7875: useMessageMaxLength */)();
const FormInput = importDefault(7980) /* metro dependency 7980: FormInput */;
const object = {ref: inputRef, maxLength: value2};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZroO3G = (require(1244) /* metro dependency 1244: indexNative */).t.ZroO3G;
object.placeholder = Reflect.apply(string, intl, [ZroO3G]);
object.placeholderTextColor = styles.inputPlaceholder.color;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/+MXmw']);
object.onSubmitEditing = onSend;
object.onSelectionChange = onSelectionChange;
object.style = styles.chatInput;
object.value = text;
object.onChange = onChange;
object.onFocus = onFocus;
object.onBlur = onBlur;
object.multiline = true;
object.showBorder = false;
object.showTopContainer = false;
object.textAlignVertical = 'center';
object.inputTextStyle = styles.chatText;
object.editable = !disabled;
const formInput = <FormInput {...object} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const iZ7Mz9 = (require(1244) /* metro dependency 1244: indexNative */).t.iZ7Mz9;
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
return (
<View style={styles.container}>
{formInput}
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [iZ7Mz9])}
accessibilityRole="button"
onPress={onPressEmoji}
style={styles.emojiButton}
disabled={disabled}
>
<ReactionIcon size="md" />
</PressableOpacity>
</View>
);
}
global.__d(_fun76730, 9788, [31, 27, 661, 33, 4501, 697, 477, 7875, 7980, 1244, 5278, 7950,
2]) /* metro module 9788, dependencies: [31, 27, 661, 33, 4501, 697, 477, 7875, 7980, 1244, 5278, 7950, 2] */;
+220 -151
View File
@@ -1,11 +1,14 @@
/* Metro module 12678; source: modules/share/native/ShareEmbed.tsx; dependencies: [31, 27, 33, 4501, 697, 5461, 4573, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun97145(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:6, offset: 0x02174796, size: 435 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -14,167 +17,233 @@ function _fun97145(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'height': 80, 'backgroundColor': null, 'borderColor': null,
object = {};
const object2 = {'flexDirection': 'row', 'height': 80, 'backgroundColor': null, 'borderColor': null,
'borderWidth': 1, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object4.borderColor = BORDER_STRONG;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.container = object4;
object3.containerRevamp = {borderWidth: 0};
object3.thumbnail = {width: 80};
object3.contentContainer = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center', 'paddingLeft': 12,
object2.borderColor = BORDER_STRONG;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.container = object2;
object.containerRevamp = {borderWidth: 0};
object.thumbnail = {width: 80};
object.contentContainer = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center', 'paddingLeft': 12,
'paddingRight': 24};
object3.authorView = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 3};
const object6 = {'height': 16, 'width': 16, 'borderRadius': null, 'marginRight': 4};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.authorThumbnail = object6;
object3.loadingSpinner = {flex: 1};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareEmbed.tsx');
object.authorView = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 3};
const object5 = {'height': 16, 'width': 16, 'borderRadius': null, 'marginRight': 4};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.authorThumbnail = object5;
object.loadingSpinner = {flex: 1};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareEmbed.tsx');
exports.default = ShareEmbed;
}
function ShareEmbed({embed, isLoadingEmbed, isRevamp}) { // fn#97146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:806, offset: 0x02174949, size: 425 bytes, params: 2, frame: 30
var r5;
var r0;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const binding = styles;
const useMemo = binding.useMemo;
const items = [embed];
const value3 = Reflect.apply(useMemo, binding, [function() {
var r1;
function ShareEmbed({embed, isLoadingEmbed, isRevamp}) { // fn#97146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:806, offset: 0x02174949, size: 425 bytes, params: 2, frame: 30
var r5;
var r0;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const binding = styles;
const useMemo = binding.useMemo;
const items = [embed];
const value3 = Reflect.apply(useMemo, binding, [function() {
var r1;
if (embed != null) {
var property = embed.thumbnail;
var value2 = undefined;
r1 = property == null ? value2 : property.url;
r1 = r1 ?? (embed.image == null ? value2 : embed.image.url);
if (r1 != null) {
return {uri: r1};
}
}
}, items]);
const value4 = binding.useMemo(_fun97148, [isLoadingEmbed, styles]);
const value5 = binding.useMemo(_fun97149, [embed, styles]);
const value6 = binding.useMemo(_fun97150, [embed]);
const value7 = binding.useMemo(_fun97151, [embed, value6]);
const value8 = binding.useMemo(_fun97152, [embed]);
if (embed != null) {
var property = embed.thumbnail;
var value2 = undefined;
r1 = property == null ? value2 : property.url;
r1 = r1 ?? (embed.image == null ? value2 : embed.image.url);
if (r1 != null) {
return {uri: r1};
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [
value3 != null && <Image style={styles.thumbnail} source={value3} resizeMode="cover" />,
];
items2[1] = (
<View style={styles.contentContainer}>
{value5}
{value6}
{value7}
{value8}
</View>
);
r5 = (
<>
{items2}
</>
);
}
r0 = (
<View {...viewProps}>
{r5}
</View>
);
} else if (isLoadingEmbed) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [
value3 != null && <Image style={styles.thumbnail} source={value3} resizeMode="cover" />,
];
items2[1] = (
<View style={styles.contentContainer}>
{value5}
{value6}
{value7}
{value8}
</View>
);
r5 = (
<>
{items2}
</>
);
}
r0 = (
<View {...viewProps}>
{r5}
</View>
);
} else {
r0 = null;
}
return r0;
function _fun97148() { // fn#97148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1045, offset: 0x02174b46, size: 71 bytes, params: 1, frame: 15
if (isLoadingEmbed) {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator style={styles.loadingSpinner} />;
} else {
return null;
}
}
}, items]);
const value4 = binding.useMemo(_fun97148, [isLoadingEmbed, styles]);
const value5 = binding.useMemo(_fun97149, [embed, styles]);
const value6 = binding.useMemo(_fun97150, [embed]);
const value7 = binding.useMemo(_fun97151, [embed, value6]);
const value8 = binding.useMemo(_fun97152, [embed]);
if (embed != null) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [value3 != null && <Image style={styles.thumbnail} source={value3} resizeMode="cover" />];
items2[1] = <View style={styles.contentContainer}>{value5}{value6}{value7}{value8}</View>;
r5 = <>{items2}</>;
function _fun97149() { // fn#97149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1131, offset: 0x02174b8d, size: 219 bytes, params: 1, frame: 22
const author = embed?.author;
if (author == null) {
return null;
}
const r12 = author.proxy_icon_url ?? author.icon_url;
const r7 = r12 != null && <Image style={styles.authorThumbnail} source={{uri: r12}} resizeMode="cover" />;
const Text = (TextModule).Text;
return (
<View style={styles.authorView}>
{r7}
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
ellipsizeMode="tail"
lineClamp={1}
>
{author.name}
</Text>
</View>
);
}
r0 = <View {...viewProps}>{r5}</View>;
} else if (isLoadingEmbed) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [value3 != null && <Image style={styles.thumbnail} source={value3} resizeMode="cover" />];
items2[1] = <View style={styles.contentContainer}>{value5}{value6}{value7}{value8}</View>;
r5 = <>{items2}</>;
function _fun97150() { // fn#97150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1507, offset: 0x02174c68, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const title = value2 == embedBinding ? undefined : embed.title;
if (value2 != title) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = (
<Text
style={{marginVertical: 1}}
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
ellipsizeMode="tail"
>
{title}
</Text>
);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
r0 = <View {...viewProps}>{r5}</View>;
} else {
r0 = null;
}
return r0;
}
function _fun97148() { // fn#97148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1045, offset: 0x02174b46, size: 71 bytes, params: 1, frame: 15
if (isLoadingEmbed) {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator style={styles.loadingSpinner} />;
} else {
return null;
}
}
function _fun97149() { // fn#97149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1131, offset: 0x02174b8d, size: 219 bytes, params: 1, frame: 22
const author = embed?.author;
if (author == null) {
return null;
}
const r12 = author.proxy_icon_url ?? author.icon_url;
const r7 = r12 != null && <Image style={styles.authorThumbnail} source={{uri: r12}} resizeMode="cover" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.authorView}>
{r7}
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
ellipsizeMode="tail"
lineClamp={1}
>
{author.name}
</Text>
</View>
);
}
function _fun97150() { // fn#97150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1507, offset: 0x02174c68, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const title = value2 == embedBinding ? undefined : embed.title;
if (value2 != title) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={{marginVertical: 1}} variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} ellipsizeMode="tail">{title}</Text>;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun97151() { // fn#97151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1731, offset: 0x02174cd8, size: 125 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const description = value2 == embedBinding ? undefined : embed.description;
if (value2 == env0_3) {
if (value2 != description) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={{marginVertical: 1}} variant="text-xs/medium" color="text-default" lineClamp={1} ellipsizeMode="tail">{description}</Text>;
r0 = value;
} else {
r0 = value2;
function _fun97151() { // fn#97151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1731, offset: 0x02174cd8, size: 125 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const description = value2 == embedBinding ? undefined : embed.description;
if (value2 == env0_3) {
if (value2 != description) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = (
<Text
style={{marginVertical: 1}}
variant="text-xs/medium"
color="text-default"
lineClamp={1}
ellipsizeMode="tail"
>
{description}
</Text>
);
r0 = value;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
} else {
r0 = value2;
function _fun97152() { // fn#97152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1955, offset: 0x02174d55, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const url = value2 == embedBinding ? undefined : embed.url;
if (value2 != url) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = (
<Text
style={{marginVertical: 1}}
variant="text-xs/medium"
color="text-link"
lineClamp={1}
ellipsizeMode="tail"
>
{url}
</Text>
);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
return r0;
}
function _fun97152() { // fn#97152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1955, offset: 0x02174d55, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const url = value2 == embedBinding ? undefined : embed.url;
if (value2 != url) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={{marginVertical: 1}} variant="text-xs/medium" color="text-link" lineClamp={1} ellipsizeMode="tail">{url}</Text>;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
global.__d(_fun97145, 12678, [31, 27, 33, 4501, 697, 5461, 4573,
2]) /* metro module 12678, dependencies: [31, 27, 33, 4501, 697, 5461, 4573, 2] */;
@@ -1,83 +1,99 @@
/* Metro module 9771; source: modules/share/native/ShareFooterLayout.tsx; dependencies: [31, 27, 33, 4501, 697, 5463, 4017, 4577, 4581, 4573, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SpringPresetsModule from '../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
function _fun76683(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:6, offset: 0x01ddfd62, size: 498 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 0};
object = {};
const object2 = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 0};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingVertical = PX_12;
object2.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.gap = PX_12;
object2.gap = PX_12;
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object5.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object5.borderTopWidth = 1;
object2.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object2.borderTopWidth = 1;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderTopColor = BORDER_SUBTLE;
object4.footer = object5;
const object6 = {};
object2.borderTopColor = BORDER_SUBTLE;
object.footer = object2;
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginHorizontal = -PX_16;
object6.borderBottomWidth = 1;
object3.marginHorizontal = -PX_16;
object3.borderBottomWidth = 1;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderBottomColor = BORDER_SUBTLE;
object4.footerSeparator = object6;
object4.warningWrapper = {'display': 'flex', 'flexDirection': 'column', 'gap': 8};
object3.borderBottomColor = BORDER_SUBTLE;
object.footerSeparator = object3;
object.warningWrapper = {'display': 'flex', 'flexDirection': 'column', 'gap': 8};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.chatRow = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'alignItems': 'flex-end', gap: PX_12};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
object4 = {code: "function ShareFooterLayoutTsx1(){const{withSpring,footerPaddingBottom,ON_PRESS_SPRING}=this.__closure;return{paddingBottom:withSpring(footerPaddingBottom,ON_PRESS_SPRING,'respect-motion-settings')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareFooterLayout.tsx');
object.chatRow = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'alignItems': 'flex-end', gap: PX_12};
const env0_7 = Reflect.apply(createStyles, value, [object]);
object = {code: "function ShareFooterLayoutTsx1(){const{withSpring,footerPaddingBottom,ON_PRESS_SPRING}=this.__closure;return{paddingBottom:withSpring(footerPaddingBottom,ON_PRESS_SPRING,'respect-motion-settings')};}"};
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareFooterLayout.tsx');
exports.default = ShareFooterLayout;
}
function ShareFooterLayout({preview, chatInput, sendButton, warningText, avoidKeyboard}) { // fn#76684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:1035, offset: 0x01ddff54, size: 508 bytes, params: 2, frame: 28
var object2;
const styles = useStyles();
const value2 = styles.footer.paddingVertical + (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: avoidKeyboard,
includeCustomKeyboardHeight: false}).insets.bottom;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ShareFooterLayoutF;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, footerPaddingBottom: value2};
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
object2.ON_PRESS_SPRING = ON_PRESS_SPRING;
closure.__closure = object2;
closure.__workletHash = 2871405301293;
closure.__initData = env0_8;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[styles.footer, value3]}>
{preview != null ? <>{preview}<View style={styles.footerSeparator} /></> : null}
<View style={styles.warningWrapper}>
<View style={styles.chatRow}>
{chatInput}
{sendButton}
function ShareFooterLayout({preview, chatInput, sendButton, warningText, avoidKeyboard}) { // fn#76684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:1035, offset: 0x01ddff54, size: 508 bytes, params: 2, frame: 28
const styles = useStyles();
const value2 = styles.footer.paddingVertical + (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: avoidKeyboard,
includeCustomKeyboardHeight: false}).insets.bottom;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ShareFooterLayoutF2 = ShareFooterLayoutF;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, footerPaddingBottom: value2};
const ON_PRESS_SPRING = (SpringPresetsModule).ON_PRESS_SPRING;
object.ON_PRESS_SPRING = ON_PRESS_SPRING;
ShareFooterLayoutF2.__closure = object;
ShareFooterLayoutF2.__workletHash = 2871405301293;
ShareFooterLayoutF2.__initData = env0_8;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ShareFooterLayoutF2]);
const View2 = (ReanimatedRexport).View;
return (
<View2 style={[styles.footer, value3]}>
{
preview != null
? (
<>
{preview}
<View style={styles.footerSeparator} />
</>
)
: null
}
<View style={styles.warningWrapper}>
<View style={styles.chatRow}>
{chatInput}
{sendButton}
</View>
{warningText != null && ((Text) => <Text variant="text-sm/normal" color="text-feedback-warning">{warningText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
{warningText != null && ((Text) => <Text variant="text-sm/normal" color="text-feedback-warning">{warningText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</View2>
);
}
</View2>
);
function ShareFooterLayoutF() { // fn#76685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:1284, owner: ShareFooterLayout.f, offset: 0x01de0150, size: 77 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const binding = env0_0;
const ON_PRESS_SPRING = (SpringPresetsModule).ON_PRESS_SPRING;
return {paddingBottom: Reflect.apply(withSpring, value, [binding, ON_PRESS_SPRING, 'respect-motion-settings'])};
}
}
function ShareFooterLayoutF() { // fn#76685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9957:1284, owner: ShareFooterLayout.f, offset: 0x01de0150, size: 77 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const binding = env0_0;
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
return {paddingBottom: Reflect.apply(withSpring, value, [binding, ON_PRESS_SPRING, 'respect-motion-settings'])};
}
global.__d(_fun76683, 9771, [31, 27, 33, 4501, 697, 5463, 4017, 4577, 4581, 4573,
2]) /* metro module 9771, dependencies: [31, 27, 33, 4501, 697, 5463, 4017, 4577, 4581, 4573, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,8 +1,11 @@
/* Metro module 12612; source: modules/share/native/ShareScreenConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96750(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12802:6, offset: 0x02165165, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareScreenConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareScreenConstants.tsx');
exports.SHARE_SCREEN_MODAL_KEY = 'share_screen_modal';
}
global.__d(_fun96750, 12612, [2]) /* metro module 12612, dependencies: [2] */;
@@ -1,25 +1,41 @@
/* Metro module 12679; source: modules/share/native/ShareScreenFooter.tsx; dependencies: [31, 33, 9770, 9771, 4578, 9788, 2] */
import ShareFooterLayout from './ShareFooterLayout.tsx'; /* Metro dependency 9771 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as UseShareChatInputActionsModule from './useShareChatInputActions.tsx'; /* Metro dependency 9770 */
function _fun97153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12869:6, offset: 0x02174dc5, size: 138 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_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareScreenFooter.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareScreenFooter.tsx');
exports.default = ShareScreenFooter;
function ShareScreenFooter({text, setText, preview, sendLabel, canSend, isSending, onSend, appEntryKey, disabled}) { // fn#97154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12869:204, offset: 0x02174e4f, size: 331 bytes, params: 2, frame: 31
disabled = !(disabled === undefined) && disabled;
const {textInputRef, isInputFocused, handleSelectionChange, handleMessageFocus, handleMessageBlur,
handlePressEmoji} = (UseShareChatInputActionsModule).useShareChatInputActions(setText,
undefined, appEntryKey);
const object = {preview: preview};
const Button = (ButtonNativeModule).Button;
object.sendButton = (
<Button
variant="primary"
size="md"
text={sendLabel}
disabled={canSend ? disabled : !canSend}
onPress={isSending ? undefined : onSend}
loading={isSending}
/>
);
object.chatInput = ((Component) => <Component inputRef={textInputRef} text={text} onChange={setText} onSelectionChange={handleSelectionChange} onFocus={handleMessageFocus} onBlur={handleMessageBlur} onPressEmoji={handlePressEmoji} onSend={onSend} disabled={disabled} />)(importDefault(9788) /* metro dependency 9788: ShareChatInput */);
object.avoidKeyboard = isInputFocused;
return <ShareFooterLayout {...object} />;
}
}
function ShareScreenFooter({text, setText, preview, sendLabel, canSend, isSending, onSend, appEntryKey, disabled}) { // fn#97154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12869:204, offset: 0x02174e4f, size: 331 bytes, params: 2, frame: 31
disabled = !(disabled === undefined) && disabled;
const {textInputRef, isInputFocused, handleSelectionChange, handleMessageFocus, handleMessageBlur,
handlePressEmoji} = (require(9770) /* metro dependency 9770: useShareChatInputActions */).useShareChatInputActions(setText,
undefined, appEntryKey);
const ShareFooterLayout = importDefault(9771) /* metro dependency 9771: ShareFooterLayout */;
const object2 = {preview: preview};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
object2.sendButton = <Button variant="primary" size="md" text={sendLabel} disabled={canSend ? disabled : !canSend} onPress={isSending ? undefined : onSend} loading={isSending} />;
object2.chatInput = ((Component) => <Component inputRef={textInputRef} text={text} onChange={setText} onSelectionChange={handleSelectionChange} onFocus={handleMessageFocus} onBlur={handleMessageBlur} onPressEmoji={handlePressEmoji} onSend={onSend} disabled={disabled} />)(importDefault(9788) /* metro dependency 9788: ShareChatInput */);
object2.avoidKeyboard = isInputFocused;
return <ShareFooterLayout {...object2} />;
}
global.__d(_fun97153, 12679, [31, 33, 9770, 9771, 4578, 9788,
2]) /* metro module 12679, dependencies: [31, 33, 9770, 9771, 4578, 9788, 2] */;
+291 -277
View File
@@ -1,302 +1,316 @@
/* Metro module 12673; source: modules/share/native/ShareScreenModal.tsx; dependencies: [5, 57, 31, 27, 1379, 12612, 33, 3, 5080, 566, 4603, 677, 12674, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ShareScreenConstantsModule from './ShareScreenConstants.tsx'; /* Metro dependency 12612 */
function _fun97084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:6, offset: 0x021723cd, size: 287 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).NativeModules;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(12612) /* metro dependency 12612: ShareScreenConstants */).SHARE_SCREEN_MODAL_KEY;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('ShareScreenModal');
const onClose_97085 = function() {
importDefault(dependencyMap[8]).popWithKey(SHARE_SCREEN_MODAL_KEY);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareScreenModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareScreenModal.tsx');
exports.default = ShareScreenModal;
}
function ShareScreenModal({text, channelId, shareId, attachmentManifest}) { // fn#97086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:364, offset: 0x02172516, size: 345 bytes, params: 2, frame: 25
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const value3 = Module00057(value2, 2);
const property = value3[0];
var env0_5 = value3[1];
binding.useEffect(function() {
var env0_0 = _fun97088;
_fun97091();
}, [shareId, attachmentManifest]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
useState = binding.useState;
const value4 = Module00057(Reflect.apply(useState, binding, [null]), 2);
const property2 = value4[0];
const env0_7 = value4[1];
binding.useEffect(function() {
var env0_0 = _fun97094;
_fun97097();
}, [channelId, channel]);
return ((Component) => <Component sharedContent={env0_5.useMemo(_fun97098, [text, property, channelId,
channel ?? property2])} onClose={onClose_97085} />)(importDefault(12674) /* metro dependency 12674: ShareScreen */);
function _fun97087() { // fn#97087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:502, offset: 0x0217266f, size: 31 bytes, params: 1, frame: 9
(function() {
return _fetchAttachments.apply(this, arguments);
})();
function _fetchAttachments() { // fn#97088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:507, offset: 0x0217268e, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun97090).apply(this, arguments);
function* _fun97090() { // fn#97090, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:564, offset: 0x021726ce, size: 119 bytes, params: 1, frame: 16
var binding;
var ShareManager;
var sharedAttachments;
var value4;
var value5;
var value6;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (dependencyMap !== undefined) {
if (env3_3 === undefined) {
return undefined;
}
try {
binding = env4_6;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
ShareManager = binding.ShareManager;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
sharedAttachments = ShareManager.sharedAttachments;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
binding = env3_3;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
value4 = Reflect.apply(sharedAttachments, ShareManager, [dependencyMap, binding]);
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env3_5;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
binding(value5);
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
}
}
}
}
function ShareScreenModal({text, channelId, shareId, attachmentManifest}) { // fn#97086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:364, offset: 0x02172516, size: 345 bytes, params: 2, frame: 25
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
var env0_5 = value3[1];
binding.useEffect(function() {
var env0_0 = _fun97088;
_fun97091();
}, [shareId, attachmentManifest]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value4[0];
const env0_7 = value4[1];
binding.useEffect(function() {
var env0_0 = _fun97094;
_fun97097();
}, [channelId, channel]);
return ((Component) => <Component sharedContent={env0_5.useMemo(_fun97098, [text, property, channelId,
channel ?? property2])} onClose={onClose_97085} />)(importDefault(12674) /* metro dependency 12674: ShareScreen */);
}
}
function _fun97087() { // fn#97087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:502, offset: 0x0217266f, size: 31 bytes, params: 1, frame: 9
(function() {
return _fetchAttachments.apply(this, arguments);
})();
}
function fetchAttachments() { // fn#97091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:739, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return _fetchAttachments.apply(this, arguments);
}
function _fun97093() { // fn#97093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:941, offset: 0x02172745, size: 31 bytes, params: 1, frame: 9
(function() {
return _fetchChannel.apply(this, arguments);
})();
}
function _fun97098() { // fn#97098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:1257, offset: 0x02172822, size: 255 bytes, params: 1, frame: 15
var r3;
var binding;
var Array;
var recipient;
const object2 = {};
object2.text = text;
object2.attachments = env0_4 ?? [];
if (env0_8 != null) {
var type = env0_8.type;
var value3 = undefined;
var ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
var DM = ChannelTypes.DM;
if (type !== DM) {
object2.targetChannelId = channelId;
return object2;
}
binding = env0_8;
if (binding) {
if ('recipients' in binding) {
Array = global.Array;
if (Array.isArray(binding.recipients)) {
object2.targetUserId = env0_8.recipients[0];
function _fun97093() { // fn#97093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:941, offset: 0x02172745, size: 31 bytes, params: 1, frame: 9
(function() {
return _fetchChannel.apply(this, arguments);
})();
function _fetchChannel() { // fn#97094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:946, offset: 0x02172764, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun97096).apply(this, arguments);
function* _fun97096() { // fn#97096, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:995, offset: 0x021727a4, size: 126 bytes, params: 1, frame: 15
var binding;
var binding2;
var property;
var value4;
var fetchChannel;
var channel;
var value5;
var value6;
var channelStoreBinding;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (importDefault != null) {
if (NativeModules != null) {
return undefined;
}
try {
binding = env4_1;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
fetchChannel = value4.fetchChannel;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
channel = Reflect.apply(fetchChannel, value4, [importDefault]);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
yield channel;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
if (value6) {
return value5;
}
try {
channelStoreBinding = ChannelStore;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
channelStoreBinding(value5);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
}
}
}
}
}
function fetchChannel_97097() { // fn#97097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:1147, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return _fetchChannel.apply(this, arguments);
}
}
function _fun97098() { // fn#97098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:1257, offset: 0x02172822, size: 255 bytes, params: 1, frame: 15
var r3;
var binding;
var Array;
var recipient;
const object = {};
object.text = text;
object.attachments = Module00057 ?? [];
if (ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY != null) {
var type = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY.type;
var value3 = undefined;
var ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
var DM = ChannelTypes.DM;
if (type !== DM) {
object.targetChannelId = channelId;
return object;
}
binding = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY;
if (binding) {
if ('recipients' in binding) {
Array = global.Array;
if (Array.isArray(binding.recipients)) {
object.targetUserId = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY.recipients[0];
} else {
binding = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY.recipient;
object.targetUserId = recipient == null ? value3 : recipient.id;
}
}
} else {
binding = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY.recipient;
object.targetUserId = recipient == null ? value3 : recipient.id;
}
}
} else {
binding = env0_8;
binding = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = env0_8.recipient;
object2.targetUserId = recipient == null ? value3 : recipient.id;
recipient = ShareScreenConstantsModule.SHARE_SCREEN_MODAL_KEY.recipient;
object.targetUserId = recipient == null ? value3 : recipient.id;
}
}
} else {
binding = env0_8;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = env0_8.recipient;
object2.targetUserId = recipient == null ? value3 : recipient.id;
}
}
} else {
binding = env0_8;
r3 = binding && 'recipient' in binding;
r3 = r3 && 'id' in binding.recipient;
if (r3) {
recipient = env0_8.recipient;
object2.targetUserId = recipient == null ? value3 : recipient.id;
}
}
}
return object2;
}
function _fetchAttachments() { // fn#97088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:507, offset: 0x0217268e, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun97090).apply(this, arguments);
}
function _fetchChannel() { // fn#97094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:946, offset: 0x02172764, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun97096).apply(this, arguments);
}
function* _fun97090() { // fn#97090, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:564, offset: 0x021726ce, size: 119 bytes, params: 1, frame: 16
var binding;
var ShareManager;
var sharedAttachments;
var value4;
var value5;
var value6;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (dependencyMap !== undefined) {
if (env3_3 === undefined) {
return undefined;
}
try {
binding = env4_6;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
ShareManager = binding.ShareManager;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
sharedAttachments = ShareManager.sharedAttachments;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
binding = env3_3;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
value4 = Reflect.apply(sharedAttachments, ShareManager, [dependencyMap, binding]);
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env3_5;
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
return undefined;
}
try {
binding(value5);
} catch (error) {
binding = env4_10;
binding.error('Error fetching attachments:', error);
}
}
}
}
function* _fun97096() { // fn#97096, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12863:995, offset: 0x021727a4, size: 126 bytes, params: 1, frame: 15
var binding;
var binding2;
var property;
var value4;
var fetchChannel;
var channel;
var value5;
var value6;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (importDefault != null) {
if (NativeModules != null) {
return undefined;
}
try {
binding = env4_1;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
fetchChannel = value4.fetchChannel;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
channel = Reflect.apply(fetchChannel, value4, [importDefault]);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
yield channel;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
if (value6) {
return value5;
}
try {
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
return undefined;
}
try {
ChannelStore(value5);
} catch (error) {
binding = env4_10;
binding.error('Error fetching channel:', error);
}
return object;
}
}
}
global.__d(_fun97084, 12673, [5, 57, 31, 27, 1379, 12612, 33, 3, 5080, 566, 4603, 677, 12674,
2]) /* metro module 12673, dependencies: [5, 57, 31, 27, 1379, 12612, 33, 3, 5080, 566, 4603, 677, 12674, 2] */;
+94 -90
View File
@@ -1,107 +1,111 @@
/* Metro module 12676; source: modules/share/native/ShareUtils.tsx; dependencies: [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as MessageConstantsModule from '../../messages/MessageConstants.tsx'; /* Metro dependency 4503 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
function _fun97128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:6, offset: 0x02173b51, size: 186 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const env0_5 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareUtils.tsx');
exports.showInformationToast = showInformationToast;
exports.sendShareMessage = function() {
return _sendShareMessage.apply(this, arguments);
};
}
function _sendShareMessage() { // fn#97129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:156, offset: 0x02173c0b, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun97131).apply(this, arguments);
async function _fun97131({attachments, channel, comment}) { // fn#97131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:213, offset: 0x02173c51, size: 371 bytes, params: 2, frame: 24
var value8;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
let id = channel.id;
value = attachments.map(_fun97132);
let binding = env2_1;
const value5 = binding(env2_2[9]);
const value7 = value5.parse(channel, comment ?? '');
if (value.length > 0) {
value8 = env2_1(env2_2[5]);
value8.clearAll(id, env2_4.ChannelMessage);
}
binding = env2_0;
const binding2 = env2_2;
const Future = binding(binding2[10]).Future;
const future = new Future();
const value11 = env2_1(binding2[11]);
const sendMessage = value11.sendMessage;
id = channel.id;
const SHARE_MODAL = env2_5.SHARE_MODAL;
await Reflect.apply(sendMessage, value11, [id, value7, false, {location: SHARE_MODAL, doNotNotifyOnError: true,
attachmentsToUpload: value, onAttachmentUploadError: onAttachmentUploadError_97133}]);
if (false) {
return undefined;
}
future.resolve(undefined);
return future.promise;
function _fun97132(a0) { // fn#97132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:280, offset: 0x02173dc4, size: 160 bytes, params: 2, frame: 15
const object = {};
object.uri = a0.uri;
object.originalUri = a0.uri;
object.mimeType = a0.mimeType;
object.filename = a0.name;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
const UploadPlatform = binding(binding2[7]).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
object.platform = REACT_NATIVE;
object.width = a0.width;
object.height = a0.height;
const CloudUpload = binding(binding2[8]).CloudUpload;
const id = channel.id;
value = Object.create(CloudUpload.prototype, {constructor: {value: CloudUpload}});
const cloudUpload = new CloudUpload(object, id);
return cloudUpload instanceof Object ? cloudUpload : value;
}
function _sendShareMessage() { // fn#97129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:156, offset: 0x02173c0b, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun97131).apply(this, arguments);
}
function onAttachmentUploadError_97133() { // fn#97133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:718, offset: 0x02173e64, size: 169 bytes, params: 1, frame: 21
let binding = DraftStoreModule.DraftType;
binding.reject(undefined);
const object = {uploads: Module00005};
object.channelId = id;
object.comment = comment;
const uploads = object.uploads;
const channelId = object.channelId;
const comment2 = object.comment;
binding = env3_1;
const binding2 = env3_2;
const value2 = binding(binding2[5]);
const setUploads = value2.setUploads;
let ChannelMessage = env3_4.ChannelMessage;
Reflect.apply(setUploads, value2, [{channelId: channelId, uploads: uploads, draftType: ChannelMessage,
resetState: true}]);
const value3 = binding(binding2[6]);
const saveDraft = value3.saveDraft;
ChannelMessage = env3_4.ChannelMessage;
Reflect.apply(saveDraft, value3, [channelId, comment2, ChannelMessage]);
}
function showInformationToast(a0) { // fn#97134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:1110, offset: 0x02173f0d, size: 91 bytes, params: 2, frame: 17
const value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = value.open;
const object2 = {};
object2.key = 'INFORMATION_TOAST-' + a0;
object2.content = a0;
object2.icon = importDefault(9836) /* metro dependency 9836 */;
Reflect.apply(open, value, [object2]);
}
}
async function _fun97131({attachments, channel, comment}) { // fn#97131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:213, offset: 0x02173c51, size: 371 bytes, params: 2, frame: 24
var value8;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
function showInformationToast(a0) { // fn#97134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:1110, offset: 0x02173f0d, size: 91 bytes, params: 2, frame: 17
const open = ToastActionCreators.open;
const object = {};
object.key = 'INFORMATION_TOAST-' + a0;
object.content = a0;
object.icon = importDefault(9836) /* metro dependency 9836 */;
Reflect.apply(open, ToastActionCreators, [object]);
}
let id = channel.id;
value = attachments.map(_fun97132);
let binding = env2_1;
const value5 = binding(env2_2[9]);
const value7 = value5.parse(channel, comment ?? '');
if (value.length > 0) {
value8 = env2_1(env2_2[5]);
value8.clearAll(id, env2_4.ChannelMessage);
}
binding = env2_0;
const binding2 = env2_2;
const Future = binding(binding2[10]).Future;
const future = new Future();
const value11 = env2_1(binding2[11]);
const sendMessage = value11.sendMessage;
id = channel.id;
const SHARE_MODAL = env2_5.SHARE_MODAL;
await Reflect.apply(sendMessage, value11, [id, value7, false, {location: SHARE_MODAL, doNotNotifyOnError: true,
attachmentsToUpload: value, onAttachmentUploadError: onAttachmentUploadError_97133}]);
if (false) {
return undefined;
}
future.resolve(undefined);
return future.promise;
}
function _fun97132(a0) { // fn#97132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:280, offset: 0x02173dc4, size: 160 bytes, params: 2, frame: 15
const object2 = {};
object2.uri = a0.uri;
object2.originalUri = a0.uri;
object2.mimeType = a0.mimeType;
object2.filename = a0.name;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
const UploadPlatform = binding(binding2[7]).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
object2.platform = REACT_NATIVE;
object2.width = a0.width;
object2.height = a0.height;
const CloudUpload = binding(binding2[8]).CloudUpload;
const id = channel.id;
value = Object.create(CloudUpload.prototype, {constructor: {value: CloudUpload}});
const cloudUpload = new CloudUpload(object2, id);
return cloudUpload instanceof Object ? cloudUpload : value;
}
function onAttachmentUploadError_97133() { // fn#97133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:718, offset: 0x02173e64, size: 169 bytes, params: 1, frame: 21
let binding = env0_4;
binding.reject(undefined);
const object2 = {uploads: env0_3};
object2.channelId = id;
object2.comment = comment;
const uploads = object2.uploads;
const channelId = object2.channelId;
const comment2 = object2.comment;
binding = env3_1;
const binding2 = env3_2;
const value2 = binding(binding2[5]);
const setUploads = value2.setUploads;
let ChannelMessage = env3_4.ChannelMessage;
Reflect.apply(setUploads, value2, [{channelId: channelId, uploads: uploads, draftType: ChannelMessage,
resetState: true}]);
const value3 = binding(binding2[6]);
const saveDraft = value3.saveDraft;
ChannelMessage = env3_4.ChannelMessage;
Reflect.apply(saveDraft, value3, [channelId, comment2, ChannelMessage]);
}
global.__d(_fun97128, 12676, [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067,
2]) /* metro module 12676, dependencies: [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067, 2] */;
@@ -1,78 +1,95 @@
/* Metro module 9770; source: modules/share/native/useShareChatInputActions.tsx; dependencies: [57, 31, 1881, 8529, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as OpenEmojiPickerActionSheetModule from '../../emoji_picker/native/openEmojiPickerActionSheet.tsx'; /* Metro dependency 8529 */
function _fun76674(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:6, offset: 0x01ddf99b, size: 155 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 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/useShareChatInputActions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/share/native/useShareChatInputActions.tsx');
exports.useShareChatInputActions = useShareChatInputActions;
}
function useShareChatInputActions(a0, a1, a2) { // fn#76675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:251, offset: 0x01ddfa36, size: 308 bytes, params: 4, frame: 22
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = ReactModule.useRef(null);
const env0_4 = ReactModule.useRef({'start': 0, 'end': 0});
let value = env0_2(ReactModule.useState(false), 2);
const property = value[0];
const env0_5 = value[1];
let useCallback = ReactModule.useCallback;
value = Reflect.apply(useCallback, ReactModule, [_fun76676, []]);
const value4 = ReactModule.useCallback(_fun76677, []);
const value5 = ReactModule.useCallback(_fun76678, []);
const value6 = ReactModule.useCallback(_fun76679, [a0]);
const value7 = ReactModule.useCallback(_fun76681, []);
useCallback = ReactModule.useCallback;
return {textInputRef: value2, isInputFocused: property, handleSelectionChange: value, handleMessageFocus: value4,
handleMessageBlur: value5, handlePressEmoji: Reflect.apply(useCallback, ReactModule, [_fun76682, [value7, value6,
a1, a2]])};
function _fun76676({nativeEvent}) { // fn#76676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:398, offset: 0x01ddfb6a, size: 41 bytes, params: 2, frame: 12
const binding = env0_4;
const object = {};
copyDataProperties(object, nativeEvent.selection, nativeEvent);
binding.current = object;
}
function useShareChatInputActions(a0, a1, a2) { // fn#76675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:251, offset: 0x01ddfa36, size: 308 bytes, params: 4, frame: 22
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const binding = env0_3;
const value2 = binding.useRef(null);
const env0_4 = binding.useRef({'start': 0, 'end': 0});
let value = env0_2(binding.useState(false), 2);
const property = value[0];
const env0_5 = value[1];
let useCallback = binding.useCallback;
value = Reflect.apply(useCallback, binding, [_fun76676, []]);
const value4 = binding.useCallback(_fun76677, []);
const value5 = binding.useCallback(_fun76678, []);
const value6 = binding.useCallback(_fun76679, [a0]);
const value7 = binding.useCallback(_fun76681, []);
useCallback = binding.useCallback;
return {textInputRef: value2, isInputFocused: property, handleSelectionChange: value, handleMessageFocus: value4,
handleMessageBlur: value5, handlePressEmoji: Reflect.apply(useCallback, binding, [_fun76682, [value7, value6,
a1, a2]])};
}
function _fun76677() { // fn#76677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:464, offset: 0x01ddfb93, size: 18 bytes, params: 1, frame: 11
env0_5(true);
}
function _fun76676({nativeEvent}) { // fn#76676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:398, offset: 0x01ddfb6a, size: 41 bytes, params: 2, frame: 12
const binding = env0_4;
const object2 = {};
copyDataProperties(object2, nativeEvent.selection, nativeEvent);
binding.current = object2;
}
function _fun76678() { // fn#76678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:498, offset: 0x01ddfba5, size: 18 bytes, params: 1, frame: 11
env0_5(false);
}
function _fun76679(a0) { // fn#76679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:532, offset: 0x01ddfbb7, size: 156 bytes, params: 2, frame: 16
(a0.id != null ? ':' + (a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name) + ': ' : a0.surrogates ?? ':' + (a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name) + ': ')(_fun76680);
const current = ReactModule.current;
if (current != null) {
current.focus();
}
function _fun76680(a0) { // fn#76680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:680, offset: 0x01ddfc53, size: 70 bytes, params: 2, frame: 14
const slice = a0.slice;
let value = environment.__proto__;
const binding = env1_4;
value = Reflect.apply(slice, a0, [0, binding.current.start]);
value += surrogates;
return value + a0.slice(binding.current.end);
}
}
function _fun76681() { // fn#76681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:792, offset: 0x01ddfc99, size: 32 bytes, params: 1, frame: 9
const current = ReactModule.current;
if (current != null) {
current.focus();
}
}
function _fun76682() { // fn#76682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:857, offset: 0x01ddfcb9, size: 169 bytes, params: 1, frame: 16
const current = ReactModule.current;
if (current != null) {
current.blur();
}
const value3 = undefined;
const openEmojiPickerActionSheet = OpenEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const object = {onPressEmoji: env0_6, onClose: env0_7};
const CHAT = EmojiIntention.CHAT;
object.pickerIntention = CHAT;
object.autoFocus = false;
object.startExpanded = false;
object.channel = require;
object.appEntryKey = importDefault;
object.guildId = (require == null ? value3 : require.getGuildId()) ?? value3;
Reflect.apply(openEmojiPickerActionSheet, OpenEmojiPickerActionSheetModule, [object]);
return value3;
}
function _fun76679(a0) { // fn#76679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:532, offset: 0x01ddfbb7, size: 156 bytes, params: 2, frame: 16
(a0.id != null ? ':' + (a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name) + ': ' : a0.surrogates ?? ':' + (a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name) + ': ')(_fun76680);
const current = env0_3.current;
if (current != null) {
current.focus();
}
}
function _fun76682() { // fn#76682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:857, offset: 0x01ddfcb9, size: 169 bytes, params: 1, frame: 16
const current = env0_3.current;
if (current != null) {
current.blur();
}
const value3 = undefined;
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const object2 = {onPressEmoji: env0_6, onClose: env0_7};
const CHAT = EmojiIntention.CHAT;
object2.pickerIntention = CHAT;
object2.autoFocus = false;
object2.startExpanded = false;
object2.channel = require;
object2.appEntryKey = importDefault;
object2.guildId = (require == null ? value3 : require.getGuildId()) ?? value3;
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [object2]);
return value3;
}
function _fun76680(a0) { // fn#76680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9956:680, offset: 0x01ddfc53, size: 70 bytes, params: 2, frame: 14
const slice = a0.slice;
let value = environment.__proto__;
const binding = env1_4;
value = Reflect.apply(slice, a0, [0, binding.current.start]);
value += surrogates;
return value + a0.slice(binding.current.end);
}
global.__d(_fun76674, 9770, [57, 31, 1881, 8529, 2]) /* metro module 9770, dependencies: [57, 31, 1881, 8529, 2] */;