Files
2026-07-28 01:06:53 +03:00

400 lines
22 KiB
TypeScript

/* Metro module 8793; source: modules/relationships/native/IgnoreConfirmationActionSheet.tsx; dependencies: [57, 31, 27, 1379, 1878, 8784, 8781, 661, 33, 4501, 697, 8745, 1244, 4070, 6231, 6238, 1305, 1585, 6771, 6789, 566, 683, 8061, 6275, 6277, 8748, 4573, 4617, 8747, 4080, 8794, 1962, 480, 4578, 8783, 6766, 1948, 3853, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import HelpdeskUtils from '../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import Linking from '../../../lib/native/Linking.tsx'; /* Metro dependency 3853 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import RelationshipActionCreators from '../../../actions/RelationshipActionCreators.tsx'; /* Metro dependency 8783 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as RestrictionConfirmationConstantsModule from './RestrictionConfirmationConstants.tsx'; /* Metro dependency 8781 */
import * as RelationshipConstantsModule from '../RelationshipConstants.tsx'; /* Metro dependency 8784 */
function _fun68740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:6, offset: 0x01c5ae34, size: 924 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {button: {'alignContent': 'center', 'textAlign': 'center'}};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.tableContainer = {marginBottom: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.otherOptions = {marginBottom: PX_24};
object.subTitle = {textAlign: 'center'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.title = {textAlign: 'center', marginBottom: PX_4};
const object5 = {flex: 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
object.container = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.header = {marginBottom: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.avatarContainer = {'position': 'relative', 'alignSelf': 'center', marginBottom: PX_16};
const object6 = {'position': 'absolute', 'bottom': -8, 'right': -8};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.padding = PX_4;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.avatarIconContainer = object6;
object.avatar = {alignSelf: 'center'};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object.destructiveIcon = {color: TEXT_FEEDBACK_CRITICAL};
const env0_15 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const items2 = [{icon: importDefault(8745) /* metro dependency 8745 */, text: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t.ruhGkg);
}, subtext: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t['/FWKKC']);
}, a11yLabel: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t.QAzPrp);
}}];
items2[1] = {icon: importDefault(8745) /* metro dependency 8745 */, text: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t.N9v3eq);
}, subtext: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t.ddpuJg);
}, a11yLabel: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t.PYR8jT);
}};
items2[2] = {icon: importDefault(4070) /* metro dependency 4070 */, text: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t['4ycGE0']);
}, subtext: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t['5yfN+o']);
}, a11yLabel: function() {
return require(dependencyMap[12]).intl.string(require(dependencyMap[12]).t['/XoqE6']);
}};
value = value.memo(IgnoreConfirmationActionSheet);
(FileImportTrackerModule).fileFinishedImporting('modules/relationships/native/IgnoreConfirmationActionSheet.tsx');
exports.default = value;
function IgnoredInformationTable() { // fn#68741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:1648, offset: 0x01c5b1d0, size: 79 bytes, params: 1, frame: 16
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<TableRowGroup hasIcons>
{env0_16.map(_fun68742)}
</TableRowGroup>
);
function _fun68742(a0, a1) { // fn#68742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:1744, offset: 0x01c5b21f, size: 206 bytes, params: 3, frame: 22
const TableRow = (TableRowNativeModule).TableRow;
const length = env1_16.length;
const Icon = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
<TableRow
start={a1 === 0}
end={length - 1 === a1}
icon={<Icon size={MEDIUM} source={a0.icon} />}
label={a0.text()}
subLabel={a0.subtext()}
accessible
accessibilityLabel={a0.a11yLabel()}
key={a1}
/>
);
}
}
function IgnoreConfirmationActionSheet({userId, channelId, onIgnore, onSuccess}) { // fn#68752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:1978, offset: 0x01c5b52d, size: 1935 bytes, params: 2, frame: 50
var r0;
var AnalyticsLocationProvider;
var BottomSheet;
var object2;
var value8;
var space;
var PX_24;
var value9;
var object3;
var BottomSheetScrollView;
var items3;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var Sizes;
var MEDIUM;
var items4;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var property2;
var object11;
var string;
var items5;
var TableRowGroup;
var TableRow;
var object12;
var Button;
var items6;
var TextWithIOSLinkWorkaround;
var object13;
var object14;
const styles = useStyles();
const binding = env0_4;
var [property, env0_4] = onSuccess(binding.useState(false), 2);
const bottom = (UseSafeAreaInsetsNative)().bottom;
let defaultImport = UseAnalyticsLocations;
const IGNORE_CONFIRMATION_ACTION_SHEET = (AnalyticsLocation).IGNORE_CONFIRMATION_ACTION_SHEET;
let object = [IGNORE_CONFIRMATION_ACTION_SHEET];
const analyticsLocations = defaultImport(object).analyticsLocations;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
}, [userId]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun68754,
[channelId]);
const closure = function() {
var defaultImport = importDefault(dependencyMap[21]);
var USER_REMEDIATION_ACTION = AnalyticEvents.USER_REMEDIATION_ACTION;
defaultImport.track(USER_REMEDIATION_ACTION, {action: UserRemediationAction.DISMISS_IGNORE,
location: 'user-profile-context-menu'});
};
binding.useEffect(_fun68756, [value5, userId]);
if (value5 == null) {
r0 = null;
} else {
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
object = {value: analyticsLocations};
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object2 = {onDismiss: closure, scrollable: true};
value8 = RESTRICTION_CONFIRMATION_ACTION_SHEET_HEIGHT + bottom;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_24 = space.PX_24;
value9 = value8 + PX_24;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_24 = space.PX_24;
object2.startHeight = value9 + PX_24;
object3 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object3.paddingBottom = space.PX_16 + bottom;
copyDataProperties(object3, styles.container, undefined);
object2.bodyStyles = object3;
BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
var viewBindingProps = {style: styles.header};
var viewBindingProps2 = {style: styles.avatarContainer};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
items3 = [
<Avatar
guildId={value6 ?? undefined}
user={value5}
animate={false}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XLARGE}
style={styles.avatar}
/>,
];
var viewBinding2Props = {style: styles.avatarIconContainer};
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
MEDIUM = Sizes.MEDIUM;
items3[1] = (
<View {...viewBinding2Props}>
<Icon size={MEDIUM} source={importDefault(8748) /* metro dependency 8748 */} />
</View>
);
items4 = [
<View {...viewBindingProps2}>
{items3}
</View>,
];
var textProps = {'style': null, 'variant': 'heading-xl/bold', 'color': 'mobile-text-heading-primary',
'accessibilityRole': 'header', style: styles.title};
format = intl.format;
property2 = t['WrQD/Y'];
object11 = {};
object11.username = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(value6, channelId,
value5);
items4[1] = (
<Text {...textProps}>
{Reflect.apply(format, intl, [property2, object11])}
</Text>
);
string = intl.string;
items4[2] = (
<Text
style={styles.subTitle}
variant="heading-md/medium"
color="text-default"
accessibilityRole="header"
>
{Reflect.apply(string, intl, [t.JKL1u1])}
</Text>
);
items5 = [
<View {...viewBindingProps}>
{items4}
</View>,
];
items5[1] = (
<View style={styles.tableContainer}>
<IgnoredInformationTable />
</View>
);
var viewBinding2Props2 = {style: styles.otherOptions};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var tableRowGroupProps = {title: intl.string(t['1v01gh']), hasIcons: true};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object12 = {};
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
MEDIUM = Sizes.MEDIUM;
object12.icon = (
<Icon
size={MEDIUM}
source={importDefault(8747) /* metro dependency 8747 */}
color={styles.destructiveIcon.color}
/>
);
object12.label = intl.string(t.bwxY30);
object12.variant = 'danger';
string = intl.string;
object12.subLabel = (
<Text variant="text-xs/medium" color="text-feedback-critical">
{Reflect.apply(string, intl, [t.NTnf1T])}
</Text>
);
object12.accessibilityLabel = intl.string(t['fZ+p9C']);
object12.onPress = onPress_68757;
object12.arrow = true;
items5[2] = (
<View {...viewBinding2Props2}>
<TableRowGroup {...tableRowGroupProps}>
<TableRow {...object12} />
</TableRowGroup>
</View>
);
var viewBinding2Props3 = {style: styles.button};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items6 = [
<Button
size="lg"
text={Reflect.apply(string, intl, [t.ytCpKs])}
onPress={onPress_68758}
disabled={property}
loading={property}
/>,
];
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
object13 = {onPress: closure};
object14 = {textAlign: 'center'};
space = (importDefault(697) /* metro dependency 697: native */).space;
object14.marginTop = space.PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
object14.paddingBottom = space.PX_4;
object13.style = object14;
object13.variant = 'text-sm/normal';
object13.color = 'text-default';
format = intl.format;
items6[1] = (
<TextWithIOSLinkWorkaround {...object13}>
{Reflect.apply(format, intl, [t.iX9qtL, {articleLink: articleLink}])}
</TextWithIOSLinkWorkaround>
);
items5[3] = (
<View {...viewBinding2Props3}>
{items6}
</View>
);
r0 = (
<AnalyticsLocationProvider {...object}>
<BottomSheet {...object2}>
<BottomSheetScrollView>
{items5}
</BottomSheetScrollView>
</BottomSheet>
</AnalyticsLocationProvider>
);
}
return r0;
function _fun68754() { // fn#68754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:2302, offset: 0x01c5bcd7, size: 42 bytes, params: 1, frame: 11
const value = environment.__proto__;
return ChannelStore.getChannel(channelId)?.guild_id;
}
function _fun68756() { // fn#68756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:2514, offset: 0x01c5bd4b, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (ReactNativeModule.View == null) {
value2 = environment.__proto__;
moduleValue = require(8061) /* metro dependency 8061: UserActionCreators */;
moduleValue.getUser(userId);
}
}
function IgnoreConfirmationActionSheetOnPress() { // fn#68757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:4118, owner: IgnoreConfirmationActionSheet.onPress, offset: 0x01c5bd84, size: 208 bytes, params: 1, frame: 21
const defaultImport = importDefault(dependencyMap[21]);
const track = defaultImport.track;
const USER_REMEDIATION_ACTION = AnalyticEvents.USER_REMEDIATION_ACTION;
const GOTO_BLOCK = UserRemediationAction.GOTO_BLOCK;
Reflect.apply(track, defaultImport, [USER_REMEDIATION_ACTION, {action: GOTO_BLOCK,
location: 'user-profile-context-menu'}]);
const defaultImport2 = importDefault(dependencyMap[29]);
const openLazy = defaultImport2.openLazy;
const value2 = require(dependencyMap[31])(dependencyMap[30], dependencyMap.paths);
object = {};
object.userId = userId;
object.channelId = channelId;
object.onSuccess = onSuccess;
const ImpressionNames = require(dependencyMap[32]).ImpressionNames;
const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION;
object.impressionName = BLOCK_USER_CONFIRMATION;
Reflect.apply(openLazy, defaultImport2, [value2, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object, 'replaceTopSheet']);
}
function IgnoreConfirmationActionSheetOnPress_68758() { // fn#68758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:4514, owner: IgnoreConfirmationActionSheet.onPress, offset: 0x01c5be54, size: 157 bytes, params: 1, frame: 19
env0_4(true);
const defaultImport = RelationshipActionCreators;
const ignoreUser = defaultImport.ignoreUser;
const userIdBinding = userId;
const IGNORE_CONFIRMATION_ACTION_SHEET = (AnalyticsLocation).IGNORE_CONFIRMATION_ACTION_SHEET;
Reflect.apply(ignoreUser, defaultImport, [userIdBinding, IGNORE_CONFIRMATION_ACTION_SHEET,
channelId]).then(_fun68759);
if (onIgnore != null) {
onIgnore();
}
const track = AnalyticsUtils.track;
const IGNORE_USER_CONFIRMED = AnalyticEvents.IGNORE_USER_CONFIRMED;
Reflect.apply(track, AnalyticsUtils, [IGNORE_USER_CONFIRMED]);
function _fun68759() { // fn#68759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:4598, offset: 0x01c5bef1, size: 60 bytes, params: 1, frame: 11
let value = environment.__proto__;
if (onSuccess != null) {
onSuccess();
}
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function IgnoreConfirmationActionSheetArticleLink() { // fn#68760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8978:4980, owner: IgnoreConfirmationActionSheet.articleLink, offset: 0x01c5bf2d, size: 93 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
const defaultImport2 = HelpdeskUtils;
const getArticleURL = defaultImport2.getArticleURL;
const STEALTH_REMEDIATION_FEATURE_GUIDE = HelpdeskArticles.STEALTH_REMEDIATION_FEATURE_GUIDE;
(Linking).openURL(Reflect.apply(getArticleURL, defaultImport2,
[STEALTH_REMEDIATION_FEATURE_GUIDE]));
}
}
}
global.__d(_fun68740, 8793, [57, 31, 27, 1379, 1878, 8784, 8781, 661, 33, 4501, 697, 8745, 1244, 4070, 6231, 6238,
1305, 1585, 6771, 6789, 566, 683, 8061, 6275, 6277, 8748, 4573, 4617, 8747, 4080, 8794, 1962, 480, 4578, 8783,
6766, 1948, 3853,
2]) /* metro module 8793, dependencies: [57, 31, 27, 1379, 1878, 8784, 8781, 661, 33, 4501, 697, 8745, 1244, 4070, 6231, 6238, 1305, 1585, 6771, 6789, 566, 683, 8061, 6275, 6277, 8748, 4573, 4617, 8747, 4080, 8794, 1962, 480, 4578, 8783, 6766, 1948, 3853, 2] */;