238 lines
13 KiB
TypeScript
238 lines
13 KiB
TypeScript
/* Metro module 11487; source: modules/safety_hub/native/AutomatedUnderageAppealActionSheet.tsx; dependencies: [31, 27, 11473, 5267, 33, 4501, 697, 1244, 566, 1585, 11486, 5263, 5074, 4080, 6275, 6277, 4573, 6231, 6238, 3853, 4578, 11480, 6766, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import SafetyHubStore from '../SafetyHubStore.tsx'; /* Metro dependency 11473 */
|
|
import AutomatedUnderageAppealModalActionCreatorsNative from '../AutomatedUnderageAppealModalActionCreators.native.tsx'; /* Metro dependency 11486 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as 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 SafetyHubConstantsModule from '../SafetyHubConstants.tsx'; /* Metro dependency 5267 */
|
|
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 BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
|
|
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
|
|
|
|
function _fun88007(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:6, offset: 0x01fd0ef1, size: 871 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = SafetyHubConstantsModule;
|
|
const env0_6 = value.AGE_APPEAL_ACTION_SHEET_NAME;
|
|
const env0_7 = value.SafetyHubLinks;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {flex: 1};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.paddingHorizontal = PX_16;
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object2.paddingTop = PX_8;
|
|
object.container = object2;
|
|
object.header = {alignItems: 'center'};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.content = {flex: 1, gap: PX_16};
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.moreInfo = {gap: PX_4};
|
|
const object6 = {};
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object6.marginTop = PX_12;
|
|
object6.textAlign = 'center';
|
|
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object6.paddingBottom = PX_32;
|
|
object.learnMore = object6;
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.footer = {marginTop: PX_8};
|
|
const object8 = {'alignItems': 'center', 'justifyContent': 'center', 'width': 32, 'height': 32};
|
|
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
|
object8.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
|
object.number = object8;
|
|
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
|
object = {};
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
object.title = Reflect.apply(string, intl, [t['1+E7LP']]);
|
|
object.description = intl.string(t['BXiat/']);
|
|
const items2 = [object];
|
|
items2[1] = {title: intl.string(t.iMQXtK), description: intl.string(t.oQ0vwu)};
|
|
object = {title: intl.string(t['oY/z1Q'])};
|
|
object.description = intl.string(t.wtj02W);
|
|
items2[2] = object;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/safety_hub/native/AutomatedUnderageAppealActionSheet.tsx');
|
|
exports.default = AutomatedUnderageAppealActionSheet;
|
|
function AutomatedUnderageAppealActionSheet({onClose, classificationId}) { // fn#88008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1035, offset: 0x01fd1258, size: 1245 bytes, params: 2, frame: 34
|
|
const styles = useStyles();
|
|
const useStateFromStores = FluxModule.useStateFromStores;
|
|
const safetyHubStoreBinding = SafetyHubStore;
|
|
const ageVerificationWebviewUrl = Reflect.apply(useStateFromStores, FluxModule, [[safetyHubStoreBinding],
|
|
function() {
|
|
return SafetyHubStore.getAgeVerificationWebviewUrl();
|
|
}]);
|
|
const ageVerificationWebviewUrl2 = ageVerificationWebviewUrl;
|
|
const isLoadingAgeVerification = FluxModule.useStateFromStores([safetyHubStoreBinding], function() {
|
|
return SafetyHubStore.getIsLoadingAgeVerification();
|
|
});
|
|
const bottom = (UseSafeAreaInsetsNative)().bottom;
|
|
const binding = ageVerificationWebviewUrl2;
|
|
binding.useEffect(_fun88013, [ageVerificationWebviewUrl, binding.useCallback(_fun88012,
|
|
[binding.useCallback(_fun88011, [onClose])])]);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const value4 = 425 + bottom;
|
|
const PX_16 = (Native).space.PX_16;
|
|
const value5 = value4 + PX_16;
|
|
const PX_32 = (Native).space.PX_32;
|
|
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
|
|
const object4 = {};
|
|
copyDataProperties(object4, styles.content, undefined);
|
|
object4['paddingBottom'] = bottom;
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const items2 = [
|
|
<View style={styles.header}>
|
|
<Text variant="heading-xl/bold" color="mobile-text-heading-primary">
|
|
{Reflect.apply(string, intl, [(IndexNativeModule).t['9SDLnj']])}
|
|
</Text>
|
|
<Text variant="heading-md/medium" color="text-default">
|
|
{intl.string((IndexNativeModule).t['yvx//1'])}
|
|
</Text>
|
|
</View>,
|
|
];
|
|
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
|
|
items2[1] = (
|
|
<View>
|
|
<TableRowGroup hasIcons>
|
|
{env0_11.map(_fun88014)}
|
|
</TableRowGroup>
|
|
</View>
|
|
);
|
|
const object5 = {};
|
|
string = intl.string;
|
|
const WPwp1b = (IndexNativeModule).t.WPwp1b;
|
|
object5.title = Reflect.apply(string, intl, [WPwp1b]);
|
|
object5.hasIcons = false;
|
|
const TableRow = (TableRowNativeModule).TableRow;
|
|
const object6 = {'label': null, 'subLabel': null, 'onPress': null, 'arrow': true, 'start': true, 'end': true};
|
|
string = intl.string;
|
|
const N9WJMM = (IndexNativeModule).t.N9WJMM;
|
|
object6.label = Reflect.apply(string, intl, [N9WJMM]);
|
|
string = intl.string;
|
|
const NHq382 = (IndexNativeModule).t.NHq382;
|
|
object6.subLabel = Reflect.apply(string, intl, [NHq382]);
|
|
object6.onPress = function() {
|
|
return importDefault(dependencyMap[19]).openURL(SafetyHubLinks.AGE_VERIFICATION_LINK);
|
|
};
|
|
items2[2] = (
|
|
<View style={styles.moreInfo}>
|
|
<TableRowGroup {...object5}>
|
|
<TableRow {...object6} />
|
|
</TableRowGroup>
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
const button = (
|
|
<Button
|
|
onPress={onPress_88016}
|
|
loading={isLoadingAgeVerification}
|
|
disabled={isLoadingAgeVerification}
|
|
text={intl.string((IndexNativeModule).t['54b8V0'])}
|
|
/>
|
|
);
|
|
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
|
|
const format = intl.format;
|
|
const ZbWsOF = (IndexNativeModule).t.ZbWsOF;
|
|
const LEARN_MORE_UU_APPEAL_LINK = SafetyHubLinks.LEARN_MORE_UU_APPEAL_LINK;
|
|
items2[3] = (
|
|
<View style={styles.footer}>
|
|
{button}
|
|
<TextWithIOSLinkWorkaround
|
|
variant="heading-sm/medium"
|
|
color="text-subtle"
|
|
style={styles.learnMore}
|
|
>
|
|
{Reflect.apply(format, intl, [ZbWsOF, {learnMoreLink: LEARN_MORE_UU_APPEAL_LINK}])}
|
|
</TextWithIOSLinkWorkaround>
|
|
</View>
|
|
);
|
|
return (
|
|
<BottomSheet scrollable startHeight={value5 + PX_32}>
|
|
<BottomSheetScrollView style={styles.container}>
|
|
<View style={object4}>
|
|
{items2}
|
|
</View>
|
|
</BottomSheetScrollView>
|
|
</BottomSheet>
|
|
);
|
|
function _fun88011() { // fn#88011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1302, offset: 0x01fd175f, size: 60 bytes, params: 1, frame: 11
|
|
if (onClose != null) {
|
|
onClose();
|
|
}
|
|
const value = environment.__proto__;
|
|
(AutomatedUnderageAppealModalActionCreatorsNative).close();
|
|
}
|
|
|
|
function _fun88012() { // fn#88012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1361, offset: 0x01fd179b, size: 67 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(AutomatedUnderageAppealModalActionCreatorsNative).success();
|
|
(0, ReactNativeModule.View)();
|
|
(AutomatedUnderageAppealModalActionCreatorsNative).start_verification_check();
|
|
}
|
|
|
|
function _fun88013() { // fn#88013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1452, offset: 0x01fd17de, size: 135 bytes, params: 1, frame: 17
|
|
var value2;
|
|
var defaultImport;
|
|
var showAgeVerification;
|
|
var object;
|
|
if (ageVerificationWebviewUrl !== '') {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
|
|
showAgeVerification = defaultImport.showAgeVerification;
|
|
object = {};
|
|
object.webviewUrl = ageVerificationWebviewUrl;
|
|
object.onComplete = env0_5;
|
|
object.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.AUTOMATED_UNDERAGE_APPEALS;
|
|
Reflect.apply(showAgeVerification, defaultImport, [object]);
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(AGE_APPEAL_ACTION_SHEET_NAME);
|
|
}
|
|
}
|
|
|
|
function _fun88014({title, description}, a1) { // fn#88014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:2208, offset: 0x01fd1865, size: 156 bytes, params: 3, frame: 20
|
|
const TableRow = (TableRowNativeModule).TableRow;
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<TableRow
|
|
label={title}
|
|
subLabel={description}
|
|
icon={<View style={styles.number}>
|
|
<Text variant="heading-md/semibold" color="text-brand">
|
|
{a1 + 1}
|
|
</Text>
|
|
</View>}
|
|
key={a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function AutomatedUnderageAppealActionSheetOnPress_88016() { // fn#88016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:2780, owner: AutomatedUnderageAppealActionSheet.onPress, offset: 0x01fd1931, size: 45 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = require(11480) /* metro dependency 11480: SafetyHubActionCreators */;
|
|
return value.requestSuspendedUserAgeVerification(classificationId);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun88007, 11487, [31, 27, 11473, 5267, 33, 4501, 697, 1244, 566, 1585, 11486, 5263, 5074, 4080, 6275,
|
|
6277, 4573, 6231, 6238, 3853, 4578, 11480, 6766,
|
|
2]) /* metro module 11487, dependencies: [31, 27, 11473, 5267, 33, 4501, 697, 1244, 566, 1585, 11486, 5263, 5074, 4080, 6275, 6277, 4573, 6231, 6238, 3853, 4578, 11480, 6766, 2] */;
|