212 lines
14 KiB
TypeScript
212 lines
14 KiB
TypeScript
/* Metro module 5471; source: modules/age_assurance/native/AgeVerificationIntroScreen.tsx; dependencies: [5, 31, 27, 5262, 661, 5267, 33, 4501, 697, 1585, 4813, 5472, 5473, 4573, 6231, 6237, 1244, 5263, 1948, 5074, 4578, 6249, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
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 HelpdeskUtils from '../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
|
|
import AgeVerificationActionCreatorsNative from '../AgeVerificationActionCreators.native.tsx'; /* Metro dependency 5263 */
|
|
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 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 AgeVerificationConstantsModule from '../AgeVerificationConstants.tsx'; /* Metro dependency 5262 */
|
|
import * as SafetyHubConstantsModule from '../../safety_hub/SafetyHubConstants.tsx'; /* Metro dependency 5267 */
|
|
import * as HideManualAgeVerificationExperimentModule from '../HideManualAgeVerificationExperiment.tsx'; /* Metro dependency 5472 */
|
|
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
|
|
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
|
|
import * as LinkExternalSmallIconModule from '../../../design/components/Icon/native/redesign/generated/LinkExternalSmallIcon.tsx'; /* Metro dependency 6249 */
|
|
|
|
function _fun48080(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5649:6, offset: 0x011d9116, size: 572 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_4 = value.ScrollView;
|
|
const env0_5 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_9 = value.jsx;
|
|
const env0_10 = value.jsxs;
|
|
const env0_11 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.gap = PX_16;
|
|
object2.flex = 1;
|
|
object.getStartedContainer = object2;
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.getStartedHeaderContainer = {alignItems: 'center', gap: PX_8};
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.ageGroupLearnMoreContainer = {alignItems: 'center', marginTop: -PX_8};
|
|
object.getStartedHeaderText = {textAlign: 'center'};
|
|
object.getStartedRequestTextContainer = {alignItems: 'center'};
|
|
const object6 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.paddingHorizontal = PX_16;
|
|
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
|
object6.paddingTop = PX_48;
|
|
object.getStartedFooterContainer = object6;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.getStartedRequestText = {textAlign: 'center', marginBottom: PX_16};
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.getStartedFooterButtonsContainer = {gap: PX_8};
|
|
const env0_12 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/age_assurance/native/AgeVerificationIntroScreen.tsx');
|
|
exports.default = GetStartedScreen;
|
|
function GetStartedScreen({modalSessionId, onClose, entryPoint}) { // fn#48081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5649:983, offset: 0x011d9352, size: 1052 bytes, params: 2, frame: 36
|
|
const styles = useStyles();
|
|
const bottom = (UseSafeAreaInsetsNative)().bottom;
|
|
const value2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useInitiateAgeVerification({onComplete: onClose,
|
|
entryPoint: entryPoint});
|
|
const loading = value2.loading;
|
|
const env0_1 = value2.initiateAgeVerification;
|
|
const value3 = (HideManualAgeVerificationExperimentModule).useIsManualAgeVerificationHidden('age_verification_get_started_modal');
|
|
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
|
const ShieldSpotIllustration = (NativeModule).ShieldSpotIllustration;
|
|
const items3 = [
|
|
<ShieldSpotIllustration />,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
let getStartedHeaderText = styles.getStartedHeaderText;
|
|
items3[1] = (
|
|
<Text
|
|
variant="heading-xl/bold"
|
|
color="mobile-text-heading-primary"
|
|
style={getStartedHeaderText}
|
|
>
|
|
{(require(4813) /* metro dependency 4813: AgeVerificationUtils */).getAgeVerificationGetStartedTitle(entryPoint)}
|
|
</Text>
|
|
);
|
|
getStartedHeaderText = styles.getStartedHeaderText;
|
|
items3[2] = (
|
|
<Text
|
|
variant="heading-md/medium"
|
|
color="text-default"
|
|
style={getStartedHeaderText}
|
|
>
|
|
{(require(4813) /* metro dependency 4813: AgeVerificationUtils */).getAgeVerificationGetStartedSubtitle(entryPoint)}
|
|
</Text>
|
|
);
|
|
const items2 = [
|
|
<View style={styles.getStartedHeaderContainer}>
|
|
{items3}
|
|
</View>,
|
|
];
|
|
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
|
|
items2[1] = (
|
|
<TableRowGroup hasIcons>
|
|
{getAgeVerificationGetStartedSteps(modalSessionId).map(_fun48082)}
|
|
</TableRowGroup>
|
|
);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
items2[2] = (
|
|
<View style={styles.ageGroupLearnMoreContainer}>
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['L+FgkZ'],
|
|
{handleOnHelpUrlHook: handleOnHelpUrlHook_48083})}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const scrollView = (
|
|
<ScrollView>
|
|
<View style={styles.getStartedContainer}>
|
|
{items2}
|
|
</View>
|
|
</ScrollView>
|
|
);
|
|
const getStartedFooterContainer = styles.getStartedFooterContainer;
|
|
const items4 = [getStartedFooterContainer];
|
|
items4[1] = {paddingBottom: bottom};
|
|
const r8 = !value3 && <View style={styles.getStartedRequestTextContainer}><Text variant="text-xs/medium" color="text-muted" style={styles.getStartedRequestText}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.pJAxgQ,
|
|
{handleOnRequestHook: handleOnRequestHook})}</Text></View>;
|
|
const Button = (ButtonNativeModule).Button;
|
|
const object2 = {'variant': 'primary', 'size': 'lg'};
|
|
const string = intl.string;
|
|
const SJMnkX = (require(1244) /* metro dependency 1244: indexNative */).t.SJMnkX;
|
|
object2.text = Reflect.apply(string, intl, [SJMnkX]);
|
|
object2.onPress = Module00005(_fun48086);
|
|
const LinkExternalSmallIcon = (LinkExternalSmallIconModule).LinkExternalSmallIcon;
|
|
const WHITE = (Native).colors.WHITE;
|
|
object2.icon = <LinkExternalSmallIcon color={WHITE} />;
|
|
object2.loading = loading;
|
|
object2.iconPosition = 'end';
|
|
return (
|
|
<>
|
|
{scrollView}
|
|
<View style={items4}>
|
|
{r8}
|
|
<View style={styles.getStartedFooterButtonsContainer}>
|
|
<Button {...object2} />
|
|
</View>
|
|
</View>
|
|
</>
|
|
);
|
|
function _fun48082({title, description}, a1) { // fn#48082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5649:1816, offset: 0x011d976e, size: 176 bytes, params: 3, frame: 21
|
|
const Text = (TextModule).Text;
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component index={a1 + 1} tip={<Text variant="text-md/medium" color="mobile-text-heading-primary">{title}</Text>} description={description != null ? <Text variant="text-xs/medium" color="text-subtle">{description}</Text> : null} key={a1} />)(importDefault(6237) /* metro dependency 6237: SafetyTipsRow */);
|
|
}
|
|
|
|
function GetStartedScreenHandleOnHelpUrlHook() { // fn#48083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5649:2252, owner: GetStartedScreen.handleOnHelpUrlHook, offset: 0x011d981e, size: 149 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
const defaultImport = AgeVerificationActionCreatorsNative;
|
|
const openUrl = defaultImport.openUrl;
|
|
const defaultImport2 = HelpdeskUtils;
|
|
const getArticleURL = defaultImport2.getArticleURL;
|
|
const TIGGER_PAWTECT_LEARN_MORE = HelpdeskArticles.TIGGER_PAWTECT_LEARN_MORE;
|
|
Reflect.apply(openUrl, defaultImport, [Reflect.apply(getArticleURL, defaultImport2, [TIGGER_PAWTECT_LEARN_MORE])]);
|
|
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
|
|
const trackAgeVerificationModalClicked = value.trackAgeVerificationModalClicked;
|
|
const modalSessionIdBinding = modalSessionId;
|
|
const AgeVerificationModalVersion = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalVersion;
|
|
const PRIMARY = AgeVerificationModalVersion.PRIMARY;
|
|
const AgeVerificationModalCta = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalCta;
|
|
const LEARN_MORE = AgeVerificationModalCta.LEARN_MORE;
|
|
Reflect.apply(trackAgeVerificationModalClicked, value, [modalSessionIdBinding, PRIMARY, LEARN_MORE]);
|
|
}
|
|
|
|
function handleOnRequestHook() { // fn#48084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5649:2759, owner: GetStartedScreen.handleOnRequestHook, offset: 0x011d98b3, size: 126 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
const defaultImport = AgeVerificationActionCreatorsNative;
|
|
const openUrl = defaultImport.openUrl;
|
|
const APPEALS_LINK = SafetyHubLinks.APPEALS_LINK;
|
|
Reflect.apply(openUrl, defaultImport, [APPEALS_LINK]);
|
|
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
|
|
const trackAgeVerificationModalClicked = value.trackAgeVerificationModalClicked;
|
|
const modalSessionIdBinding = modalSessionId;
|
|
const AgeVerificationModalVersion = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalVersion;
|
|
const PRIMARY = AgeVerificationModalVersion.PRIMARY;
|
|
const AgeVerificationModalCta = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalCta;
|
|
const MANUAL_REVIEW_REQUEST = AgeVerificationModalCta.MANUAL_REVIEW_REQUEST;
|
|
Reflect.apply(trackAgeVerificationModalClicked, value, [modalSessionIdBinding, PRIMARY, MANUAL_REVIEW_REQUEST]);
|
|
}
|
|
|
|
function* _fun48086() { // fn#48086, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5649:3107, offset: 0x011d993a, size: 121 bytes, params: 1, frame: 20
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_0;
|
|
var binding2 = env2_2;
|
|
value = binding(binding2[19]);
|
|
var trackAgeVerificationModalClicked = value.trackAgeVerificationModalClicked;
|
|
var AgeVerificationModalVersion = binding(binding2[19]).AgeVerificationModalVersion;
|
|
var PRIMARY = AgeVerificationModalVersion.PRIMARY;
|
|
var AgeVerificationModalCta = binding(binding2[19]).AgeVerificationModalCta;
|
|
var GET_STARTED = AgeVerificationModalCta.GET_STARTED;
|
|
Reflect.apply(trackAgeVerificationModalClicked, value, [require, PRIMARY, GET_STARTED]);
|
|
yield importDefault();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun48080, 5471, [5, 31, 27, 5262, 661, 5267, 33, 4501, 697, 1585, 4813, 5472, 5473, 4573, 6231, 6237,
|
|
1244, 5263, 1948, 5074, 4578, 6249,
|
|
2]) /* metro module 5471, dependencies: [5, 31, 27, 5262, 661, 5267, 33, 4501, 697, 1585, 4813, 5472, 5473, 4573, 6231, 6237, 1244, 5263, 1948, 5074, 4578, 6249, 2] */;
|