650 lines
34 KiB
TypeScript
650 lines
34 KiB
TypeScript
/* Metro module 11472; source: modules/safety_hub/native/ClassificationDetail.tsx; dependencies: [31, 27, 1949, 11473, 5267, 661, 33, 4501, 697, 4573, 5268, 1244, 566, 6766, 8792, 3853, 8036, 4578, 11479, 11481, 683, 6618, 11482, 5266, 11486, 4826, 4831, 11488, 2] */
|
|
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
|
|
import TouchableHitBox from '../../../design/void/TouchableHitBox/native/TouchableHitBox.tsx'; /* Metro dependency 8792 */
|
|
import SafetyHubStore from '../SafetyHubStore.tsx'; /* Metro dependency 11473 */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
|
|
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
|
|
import * as ShieldIconModule from '../../../design/components/Icon/native/redesign/generated/ShieldIcon.tsx'; /* Metro dependency 8036 */
|
|
import * as UseSafetyHubClassificationsModule from '../hooks/useSafetyHubClassifications.tsx'; /* Metro dependency 11479 */
|
|
import * as UseSafetyHubAccountStandingModule from '../hooks/useSafetyHubAccountStanding.tsx'; /* Metro dependency 11481 */
|
|
|
|
function _fun87823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:6, offset: 0x01fcc742, size: 1085 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_4 = value.View;
|
|
const env0_5 = value.ActivityIndicator;
|
|
const env0_6 = value.ScrollView;
|
|
value = require(5267) /* metro dependency 5267: SafetyHubConstants */;
|
|
const env0_9 = value.SafetyHubAnalyticsActionSource;
|
|
const env0_10 = value.SafetyHubAnalyticsActions;
|
|
const env0_11 = value.SafetyHubLinks;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_13 = value.jsx;
|
|
const env0_14 = value.jsxs;
|
|
const env0_15 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object.root = {backgroundColor: BACKGROUND_BASE_LOWER};
|
|
const object3 = {'display': 'flex', 'flexDirection': 'column', 'height': '100%'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingTop = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingHorizontal = PX_16;
|
|
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object3.gap = PX_32;
|
|
object.container = object3;
|
|
const object4 = {'display': 'flex', 'textAlign': 'center', 'alignItems': 'center', 'flexDirection': 'column'};
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.gap = PX_8;
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.marginBottom = PX_8;
|
|
object.header = object4;
|
|
object.headerText = {'textAlign': 'center', 'maxWidth': 260};
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.sectionContainer = {display: 'flex', gap: PX_8};
|
|
const object6 = {'display': 'flex', 'paddingLeft': null, 'flexDirection': 'column'};
|
|
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object6.paddingLeft = PX_4;
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object6.gap = PX_8;
|
|
object.actionsTaken = object6;
|
|
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object.classificationDetailContainer = {'display': 'flex', 'flexDirection': 'column', gap: PX_32};
|
|
object.letUsKnowContainer = {'display': 'flex', 'alignItems': 'center'};
|
|
const object8 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
|
'justifyContent': 'space-between'};
|
|
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object8.gap = PX_12;
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object8.padding = PX_12;
|
|
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object8.marginTop = PX_4;
|
|
object8.flexShrink = 1;
|
|
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object8.backgroundColor = BACKGROUND_BASE_LOWEST;
|
|
object.classificationPolicyCard = object8;
|
|
const object9 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null,
|
|
'width': 32, 'height': 32};
|
|
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
|
object9.backgroundColor = BACKGROUND_MOD_STRONG;
|
|
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
|
object.classificationPolicyCardIcon = object9;
|
|
object.classificationPolicyCardContent = {flex: 1};
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.classificationActionDescription = {'display': 'flex', 'flexDirection': 'row', gap: PX_8};
|
|
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object.redirectButtonWrapper = {'width': 300, 'alignSelf': 'center', marginTop: PX_32};
|
|
const env0_16 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/safety_hub/native/ClassificationDetail.tsx');
|
|
exports.default = ConnectedClassificationDetail;
|
|
function ClassificationHeader({classificationTypeText, guildMetadata}) { // fn#87824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:1754, offset: 0x01fccb7f, size: 168 bytes, params: 2, frame: 19
|
|
const styles = useStyles();
|
|
const value2 = ReactModule.useMemo(_fun87825, [classificationTypeText, guildMetadata]);
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={styles.header}>
|
|
<Text
|
|
variant="text-lg/normal"
|
|
style={styles.headerText}
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{value2}
|
|
</Text>
|
|
</View>
|
|
);
|
|
function _fun87825() { // fn#87825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:1851, offset: 0x01fccc27, size: 377 bytes, params: 1, frame: 21
|
|
var environment;
|
|
var member_type;
|
|
var r1;
|
|
var r0;
|
|
const intl = (IndexNativeModule).intl;
|
|
var format;
|
|
const t = (IndexNativeModule).t;
|
|
var value2;
|
|
var value3;
|
|
var rmpEPD;
|
|
var object;
|
|
var X1ngSd;
|
|
var object2;
|
|
const object3 = {};
|
|
var value;
|
|
object3.classification_type = classificationTypeText;
|
|
object3.classificationHook = classificationHook;
|
|
let guildMetadataBinding = guildMetadata;
|
|
if (guildMetadataBinding != null) {
|
|
guildMetadataBinding = guildMetadata;
|
|
value2 = undefined;
|
|
member_type = guildMetadataBinding == null ? value2 : guildMetadata.member_type;
|
|
value3 = environment.__proto__;
|
|
if (member_type === (require(5268) /* metro dependency 5268: SafetyHubModels */).MemberType.OWNER) {
|
|
format = intl.format;
|
|
X1ngSd = t.X1ngSd;
|
|
object2 = {};
|
|
copyDataProperties(object2, object3, undefined);
|
|
object2['guildName'] = guildMetadata == null ? value2 : guildMetadata.name;
|
|
r1 = Reflect.apply(format, intl, [X1ngSd, object2]);
|
|
} else {
|
|
format = intl.format;
|
|
rmpEPD = t.rmpEPD;
|
|
object = {};
|
|
copyDataProperties(object, object3, undefined);
|
|
object['guildName'] = guildMetadata == null ? value2 : guildMetadata.name;
|
|
r1 = Reflect.apply(format, intl, [rmpEPD, object]);
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = intl.format(t['39jfOz'], object3);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function classificationHook(a0, a1) { // fn#87826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:1904, offset: 0x01fccda0, size: 65 bytes, params: 3, frame: 15
|
|
const Text = (TextModule).Text;
|
|
return <Text {...{variant: 'heading-xl/bold', children: a0}} key={a1} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function ClassificationActionsTaken({actions, classificationExpiration}) { // fn#87827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:2402, offset: 0x01fccde1, size: 561 bytes, params: 2, frame: 37
|
|
var r10;
|
|
var r0;
|
|
var value3;
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var items2;
|
|
var items3;
|
|
var value6;
|
|
var items4;
|
|
var format;
|
|
var TByIjT;
|
|
var object2;
|
|
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
const styles = useStyles();
|
|
const value2 = actions.filter(function(a0) {
|
|
return a0.descriptions.length > 0;
|
|
});
|
|
if (value2.length !== 0) {
|
|
var viewBindingProps = {style: styles.sectionContainer};
|
|
items2 = [
|
|
<Text variant="eyebrow" color="text-muted">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['O2nYk+'])}
|
|
</Text>,
|
|
];
|
|
var viewBinding2Props = {style: [styles.actionsTaken]};
|
|
items3 = [value2.map(_fun87830)];
|
|
value6 = null;
|
|
if (value6 != classificationExpiration) {
|
|
var viewBinding3Props = {style: styles.classificationActionDescription};
|
|
items4 = [
|
|
<Text variant="text-xs/normal">
|
|
{' '}
|
|
{'•'}
|
|
</Text>,
|
|
];
|
|
format = intl.format;
|
|
TByIjT = (require(1244) /* metro dependency 1244: indexNative */).t.TByIjT;
|
|
object2 = {};
|
|
object2.expirationDate = classificationExpiration.toLocaleDateString(locale, {dateStyle: 'medium'});
|
|
items4[1] = (
|
|
<Text variant="text-xs/normal">
|
|
{Reflect.apply(format, intl, [TByIjT, object2])}
|
|
</Text>
|
|
);
|
|
r10 = (
|
|
<View {...viewBinding3Props} key="expiration">
|
|
{items4}
|
|
</View>
|
|
);
|
|
} else {
|
|
r10 = value6;
|
|
}
|
|
items3[1] = r10;
|
|
items2[1] = (
|
|
<View {...viewBinding2Props}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
r0 = (
|
|
<View {...viewBindingProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
} else {
|
|
value3 = null;
|
|
if (value3 == classificationExpiration) {
|
|
r0 = value3;
|
|
} else {
|
|
var viewBindingProps = {style: styles.sectionContainer};
|
|
items2 = [
|
|
<Text variant="eyebrow" color="text-muted">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['O2nYk+'])}
|
|
</Text>,
|
|
];
|
|
var viewBinding2Props = {style: [styles.actionsTaken]};
|
|
items3 = [value2.map(_fun87830)];
|
|
value6 = null;
|
|
if (value6 != classificationExpiration) {
|
|
var viewBinding3Props = {style: styles.classificationActionDescription};
|
|
items4 = [
|
|
<Text variant="text-xs/normal">
|
|
{' '}
|
|
{'•'}
|
|
</Text>,
|
|
];
|
|
format = intl.format;
|
|
TByIjT = (require(1244) /* metro dependency 1244: indexNative */).t.TByIjT;
|
|
object2 = {};
|
|
object2.expirationDate = classificationExpiration.toLocaleDateString(locale, {dateStyle: 'medium'});
|
|
items4[1] = (
|
|
<Text variant="text-xs/normal">
|
|
{Reflect.apply(format, intl, [TByIjT, object2])}
|
|
</Text>
|
|
);
|
|
r10 = (
|
|
<View {...viewBinding3Props} key="expiration">
|
|
{items4}
|
|
</View>
|
|
);
|
|
} else {
|
|
r10 = value6;
|
|
}
|
|
items3[1] = r10;
|
|
items2[1] = (
|
|
<View {...viewBinding2Props}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
r0 = (
|
|
<View {...viewBindingProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
return r0;
|
|
function _fun87830(a0) { // fn#87830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:2809, offset: 0x01fcd037, size: 36 bytes, params: 2, frame: 15
|
|
return <ClassificationActionsTakenRows action={a0} key={a0.id} />;
|
|
}
|
|
|
|
}
|
|
|
|
function ClassificationActionsTakenRows({action}) { // fn#87831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:3172, offset: 0x01fcd05b, size: 72 bytes, params: 2, frame: 16
|
|
const env0_0 = useStyles();
|
|
return (
|
|
<>
|
|
{action.descriptions.map(_fun87832)}
|
|
</>
|
|
);
|
|
function _fun87832(a0, a1) { // fn#87832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:3277, offset: 0x01fcd0a3, size: 158 bytes, params: 3, frame: 23
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={styles.classificationActionDescription} key={a1}>
|
|
<Text variant="text-xs/normal">
|
|
{' '}
|
|
{'•'}
|
|
</Text>
|
|
<Text variant="text-xs/normal">
|
|
{a0}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function ClassificationGuidance({tosLink, communityGuidelinesLink, classificationTypeText, policyExplainerLink, appealComponent}) { // fn#87833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:3466, offset: 0x01fcd141, size: 329 bytes, params: 2, frame: 28
|
|
const styles = useStyles();
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
const text = (
|
|
<Text variant="eyebrow" color="text-muted">
|
|
{intl.string((IndexNativeModule).t['977iei'])}
|
|
</Text>
|
|
);
|
|
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
|
|
return (
|
|
<View style={styles.sectionContainer}>
|
|
{text}
|
|
<TextWithIOSLinkWorkaround variant="text-sm/normal">
|
|
{intl.format((IndexNativeModule).t['1Z/+aA'], {tosLink: tosLink,
|
|
communityGuidelinesLink: communityGuidelinesLink})}
|
|
</TextWithIOSLinkWorkaround>
|
|
<ClassificationPolicyCard
|
|
classificationTypeText={classificationTypeText}
|
|
policyExplainerLink={policyExplainerLink}
|
|
/>
|
|
{appealComponent}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function ClassificationPolicyCard({classificationTypeText, policyExplainerLink}) { // fn#87834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4013, offset: 0x01fcd28a, size: 366 bytes, params: 2, frame: 29
|
|
const styles = useStyles();
|
|
const defaultImportProps = {onPress: onPress_87835, style: [styles.classificationPolicyCard]};
|
|
const ShieldIcon = (ShieldIconModule).ShieldIcon;
|
|
const TEXT_LINK = (Native).colors.TEXT_LINK;
|
|
const view = (
|
|
<View style={styles.classificationPolicyCardIcon}>
|
|
<ShieldIcon size="sm" color={TEXT_LINK} />
|
|
</View>
|
|
);
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<View>
|
|
<TouchableHitBox {...defaultImportProps}>
|
|
{view}
|
|
<View style={styles.classificationPolicyCardContent}>
|
|
<Text variant="heading-md/semibold" color="mobile-text-heading-primary">
|
|
{intl.format((IndexNativeModule).t.zxUdpj,
|
|
{classificationDescription: classificationTypeText})}
|
|
</Text>
|
|
</View>
|
|
</TouchableHitBox>
|
|
</View>
|
|
);
|
|
function ClassificationPolicyCardOnPress() { // fn#87835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4152, owner: ClassificationPolicyCard.onPress, offset: 0x01fcd3f8, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(3853) /* metro dependency 3853: Linking */;
|
|
value.openURL(policyExplainerLink);
|
|
}
|
|
|
|
}
|
|
|
|
function ClassificationDetailFooter({onClose}) { // fn#87836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:5115, offset: 0x01fcd425, size: 163 bytes, params: 2, frame: 22
|
|
const styles = useStyles();
|
|
const Button = (ButtonNativeModule).Button;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<View style={styles.redirectButtonWrapper}>
|
|
<Button
|
|
size="md"
|
|
text={intl.string((IndexNativeModule).t.elrEjL)}
|
|
onPress={onClose}
|
|
grow
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function AppealStatus() { // fn#87837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4583, offset: 0x01fcd4c8, size: 109 bytes, params: 1, frame: 18
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Text variant="text-md/normal" color="text-muted">
|
|
{intl.string((IndexNativeModule).t['I2H0/E'])}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
function LetUsKnow(a0) { // fn#87838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4711, offset: 0x01fcd535, size: 135 bytes, params: 2, frame: 19
|
|
const env0_0 = a0;
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
const format = intl.format;
|
|
const IFxUaT = (IndexNativeModule).t.IFxUaT;
|
|
return (
|
|
<Text variant="text-sm/normal" color="text-muted">
|
|
{Reflect.apply(format, intl, [IFxUaT, {letUsKnowHook: letUsKnowHook}])}
|
|
</Text>
|
|
);
|
|
function letUsKnowHook(a0, a1) { // fn#87839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4837, owner: LetUsKnow.letUsKnowHook, offset: 0x01fcd5bc, size: 86 bytes, params: 3, frame: 15
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
onPress={env0_0.onPressLetUsKnow}
|
|
variant="text-sm/normal"
|
|
color="text-link"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function AppealFooter(a0) { // fn#87840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4962, offset: 0x01fcd612, size: 98 bytes, params: 2, frame: 18
|
|
const styles = useStyles();
|
|
return (
|
|
<View style={styles.letUsKnowContainer}>
|
|
{
|
|
a0.hasBeenAppealed
|
|
? (
|
|
<AppealStatus />
|
|
)
|
|
: (
|
|
<LetUsKnow onPressLetUsKnow={a0.onPressLetUsKnow} />
|
|
)
|
|
}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function ConnectedClassificationDetail({classificationId, source, onClose, onError}) { // fn#87841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:5329, offset: 0x01fcd674, size: 1008 bytes, params: 2, frame: 32
|
|
var r0;
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
var description;
|
|
var items2;
|
|
var APPEALS_LINK;
|
|
var COMMUNITY_GUIDELINES;
|
|
var TOS_LINK;
|
|
const value3 = (UseSafetyHubClassificationsModule).useSafetyHubClassification(classificationId);
|
|
const env0_3 = value3;
|
|
const classification = value3.classification;
|
|
const env0_5 = value3.isAppealEligible;
|
|
const styles = useStyles();
|
|
const appealEligibility = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
|
|
function() {
|
|
return SafetyHubStore.getAppealEligibility();
|
|
});
|
|
const r5 = classification?.flagged_content != null && (classification == null ? undefined : classification.flagged_content.length) > 0;
|
|
const value7 = (UseSafetyHubAccountStandingModule).useSafetyHubAccountStanding();
|
|
let r9 = classification == null || !classification.is_coppa;
|
|
const env0_8 = !r9 && appealEligibility.includes((require(5268) /* metro dependency 5268: SafetyHubModels */).AppealEligibility.AGE_VERIFY_ELIGIBLE);
|
|
const env0_9 = !(classification == null || !classification.is_coppa) && appealEligibility.includes((require(5268) /* metro dependency 5268: SafetyHubModels */).AppealEligibility.AGE_VERIFY_GLOBAL_ELIGIBLE);
|
|
const env0_11 = env0_3.useRef({accountStanding: value7, classificationId: classificationId,
|
|
classificationState: value3, hasFlaggedContent: r5, source: source});
|
|
env0_3.useEffect(_fun87843);
|
|
env0_3.useEffect(_fun87844, [classification]);
|
|
if (classification != null) {
|
|
var scrollViewBindingProps = {style: styles.root};
|
|
var safeAreaPaddingViewProps = {style: styles.container, bottom: true};
|
|
if (classification == null) {
|
|
r9 = <ActivityIndicator size="large" />;
|
|
} else {
|
|
var viewBindingProps = {style: [styles.classificationDetailContainer]};
|
|
description = classification.description;
|
|
items2 = [
|
|
<ClassificationHeader classificationTypeText={description} guildMetadata={classification.guild_metadata} />,
|
|
|
|
];
|
|
items2[1] = ((Component) => <Component flaggedContent={classification.flagged_content ?? []} />)(importDefault(11482) /* metro dependency 11482: ClassificationEvidence */);
|
|
items2[2] = (
|
|
<ClassificationActionsTaken
|
|
actions={classification.actions}
|
|
classificationExpiration={(require(5266) /* metro dependency 5266: SafetyHubUtils */).getClassificationExpiration(classification)}
|
|
/>
|
|
);
|
|
APPEALS_LINK = SafetyHubLinks.APPEALS_LINK;
|
|
COMMUNITY_GUIDELINES = SafetyHubLinks.COMMUNITY_GUIDELINES;
|
|
TOS_LINK = SafetyHubLinks.TOS_LINK;
|
|
description = classification.description;
|
|
items2[3] = (
|
|
<ClassificationGuidance
|
|
appealLink={APPEALS_LINK}
|
|
communityGuidelinesLink={COMMUNITY_GUIDELINES}
|
|
tosLink={TOS_LINK}
|
|
classificationTypeText={description}
|
|
policyExplainerLink={classification.explainer_link}
|
|
appealComponent={<AppealFooter hasBeenAppealed={classification.appeal_status != null} onPressLetUsKnow={onPressLetUsKnow} />}
|
|
/>
|
|
);
|
|
items2[4] = <ClassificationDetailFooter onClose={onClose} />;
|
|
r9 = (
|
|
<View {...viewBindingProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
r0 = (
|
|
<ScrollView {...scrollViewBindingProps}>
|
|
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
|
|
{r9}
|
|
</SafeAreaPaddingView>
|
|
</ScrollView>
|
|
);
|
|
} else if (value3.classificationRequestState === (require(5268) /* metro dependency 5268: SafetyHubModels */).ClassificationRequestState.FAILED) {
|
|
onError();
|
|
r0 = null;
|
|
} else {
|
|
var scrollViewBindingProps = {style: styles.root};
|
|
var safeAreaPaddingViewProps = {style: styles.container, bottom: true};
|
|
if (classification == null) {
|
|
r9 = <ActivityIndicator size="large" />;
|
|
} else {
|
|
var viewBindingProps = {style: [styles.classificationDetailContainer]};
|
|
description = classification.description;
|
|
items2 = [
|
|
<ClassificationHeader classificationTypeText={description} guildMetadata={classification.guild_metadata} />,
|
|
|
|
];
|
|
items2[1] = ((Component) => <Component flaggedContent={classification.flagged_content ?? []} />)(importDefault(11482) /* metro dependency 11482: ClassificationEvidence */);
|
|
items2[2] = (
|
|
<ClassificationActionsTaken
|
|
actions={classification.actions}
|
|
classificationExpiration={(require(5266) /* metro dependency 5266: SafetyHubUtils */).getClassificationExpiration(classification)}
|
|
/>
|
|
);
|
|
APPEALS_LINK = SafetyHubLinks.APPEALS_LINK;
|
|
COMMUNITY_GUIDELINES = SafetyHubLinks.COMMUNITY_GUIDELINES;
|
|
TOS_LINK = SafetyHubLinks.TOS_LINK;
|
|
description = classification.description;
|
|
items2[3] = (
|
|
<ClassificationGuidance
|
|
appealLink={APPEALS_LINK}
|
|
communityGuidelinesLink={COMMUNITY_GUIDELINES}
|
|
tosLink={TOS_LINK}
|
|
classificationTypeText={description}
|
|
policyExplainerLink={classification.explainer_link}
|
|
appealComponent={<AppealFooter hasBeenAppealed={classification.appeal_status != null} onPressLetUsKnow={onPressLetUsKnow} />}
|
|
/>
|
|
);
|
|
items2[4] = <ClassificationDetailFooter onClose={onClose} />;
|
|
r9 = (
|
|
<View {...viewBindingProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
r0 = (
|
|
<ScrollView {...scrollViewBindingProps}>
|
|
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
|
|
{r9}
|
|
</SafeAreaPaddingView>
|
|
</ScrollView>
|
|
);
|
|
}
|
|
return r0;
|
|
function _fun87843() { // fn#87843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:6020, offset: 0x01fcda79, size: 21 bytes, params: 1, frame: 2
|
|
env0_11.current = env0_10;
|
|
}
|
|
|
|
function _fun87844() { // fn#87844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:6053, offset: 0x01fcda8e, size: 201 bytes, params: 1, frame: 22
|
|
var current;
|
|
var accountStanding;
|
|
var classificationId;
|
|
var classificationState;
|
|
var hasFlaggedContent;
|
|
var source;
|
|
var defaultImport;
|
|
var track;
|
|
var SAFETY_HUB_ACTION;
|
|
var object;
|
|
if (classification != null) {
|
|
current = env0_11.current;
|
|
accountStanding = current.accountStanding;
|
|
classificationId = current.classificationId;
|
|
classificationState = current.classificationState;
|
|
hasFlaggedContent = current.hasFlaggedContent;
|
|
source = current.source;
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
SAFETY_HUB_ACTION = AnalyticEvents.SAFETY_HUB_ACTION;
|
|
object = {};
|
|
object.action = SafetyHubAnalyticsActions.ViewViolationDetail;
|
|
object.account_standing = accountStanding.state;
|
|
object.classification_ids = [global.Number(classificationId)];
|
|
object.source = source ?? SafetyHubAnalyticsActionSource.SystemDM;
|
|
object.is_violative_content_shown = hasFlaggedContent;
|
|
object.is_dsa_eligible = classificationState.isDsaEligible;
|
|
object.violation_type = classificationState.violationType;
|
|
Reflect.apply(track, defaultImport, [SAFETY_HUB_ACTION, object]);
|
|
}
|
|
}
|
|
|
|
function onPressLetUsKnow() { // fn#87845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:7258, owner: ConnectedClassificationDetail.onPressLetUsKnow, offset: 0x01fcdb57, size: 424 bytes, params: 1, frame: 19
|
|
var defaultImport2;
|
|
var defaultImport3;
|
|
var increment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const SAFETY_HUB_ACTION = AnalyticEvents.SAFETY_HUB_ACTION;
|
|
let object = {};
|
|
const ClickLetUsKnow = SafetyHubAnalyticsActions.ClickLetUsKnow;
|
|
object.action = ClickLetUsKnow;
|
|
object.account_standing = env0_7.state;
|
|
const Number = global.Number;
|
|
object.classification_ids = [Number(classificationId)];
|
|
object.source = source ?? SafetyHubAnalyticsActionSource.SystemDM;
|
|
object.is_violative_content_shown = env0_6;
|
|
const binding = env0_3;
|
|
object.is_dsa_eligible = binding.isDsaEligible;
|
|
object.violation_type = binding.violationType;
|
|
Reflect.apply(track, defaultImport, [SAFETY_HUB_ACTION, object]);
|
|
if (env0_9) {
|
|
value = importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */;
|
|
value.openV2(classificationId, onClose);
|
|
} else if (env0_8) {
|
|
value = importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */;
|
|
value.open(classificationId, onClose);
|
|
} else if (isAppealEligible) {
|
|
defaultImport3 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
|
increment = defaultImport3.increment;
|
|
object = {};
|
|
object.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.APPEAL_INGESTION_VIEW;
|
|
Reflect.apply(increment, defaultImport3, [object]);
|
|
(importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).open({classificationId: classificationId});
|
|
} else {
|
|
defaultImport2 = importDefault(3853) /* metro dependency 3853: Linking */;
|
|
defaultImport2.openURL(SafetyHubLinks.APPEALS_LINK);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun87823, 11472, [31, 27, 1949, 11473, 5267, 661, 33, 4501, 697, 4573, 5268, 1244, 566, 6766, 8792,
|
|
3853, 8036, 4578, 11479, 11481, 683, 6618, 11482, 5266, 11486, 4826, 4831, 11488,
|
|
2]) /* metro module 11472, dependencies: [31, 27, 1949, 11473, 5267, 661, 33, 4501, 697, 4573, 5268, 1244, 566, 6766, 8792, 3853, 8036, 4578, 11479, 11481, 683, 6618, 11482, 5266, 11486, 4826, 4831, 11488, 2] */;
|