decord/source/modules/age_assurance/native/AgeVerificationModal.tsx

104 lines
3.9 KiB
TypeScript
Raw Normal View History

// Module ID: 8546
// Function ID: 8547
// Name: AgeVerificationModal
// Dependencies: [19, 8530, 21, 8536, 4494, 4849, 8416, 4636, 576, 4839, 7480, 1114, 7103, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8546 (AgeVerificationModal)
import nativeDefault from "native" /* 576 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = fn;
2026-07-29 08:29:29 +00:00
function AgeVerifyScreen(uri) {
const onComplete = uri.onComplete;
const onClose = uri.onClose;
let isSuspendedUser;
let callback;
isSuspendedUser = onComplete(isSuspendedUser[3]).useIsSuspendedUser();
2026-07-20 16:05:17 +00:00
const items = [onComplete, onClose];
2026-07-23 10:11:24 +00:00
callback = callback.useCallback(() => {
2026-07-20 16:05:17 +00:00
onComplete();
onClose();
}, items);
const items1 = [callback];
2026-07-23 10:11:24 +00:00
const callback1 = callback.useCallback(() => {
if (obj.isModalOpen(closure_4)) {
2026-07-20 16:05:17 +00:00
callback();
}
}, items1);
2026-07-29 08:29:29 +00:00
const obj = onComplete(isSuspendedUser[3]);
2026-07-23 10:11:24 +00:00
const watchAgeVerificationStatusChange = onComplete(isSuspendedUser[5]).useWatchAgeVerificationStatusChange(callback1);
2026-07-20 16:05:17 +00:00
const items2 = [callback, isSuspendedUser];
const callback2 = callback.useCallback((nativeEvent) => {
2026-07-20 16:05:17 +00:00
if (null != nativeEvent.nativeEvent.data) {
2026-07-29 08:29:29 +00:00
try {
2026-08-04 21:03:28 +00:00
if (typeof nativeEvent.nativeEvent.data === "string") {
2026-07-29 08:29:29 +00:00
const _JSON = JSON;
let data = JSON.parse(nativeEvent.nativeEvent.data);
} else {
data = nativeEvent.nativeEvent.data;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp3 = isSuspendedUser;
if (isSuspendedUser) {
let eventType;
if (data != null) {
eventType = data.eventType;
}
tmp3 = "Verification.Result" === eventType;
}
if (tmp3) {
callback();
}
} catch (err) {
2026-07-20 16:05:17 +00:00
}
}
}, items2);
return jsx(onClose(isSuspendedUser[6]), { allowsInlineMediaPlayback: true, javaScriptEnabled: true, source: { uri: uri.webviewUrl }, onMessage: callback2, injectedJavaScript: "\n window.addEventListener('message', function(event) {\n window.ReactNativeWebView.postMessage(event.data);\n }, true);\n" });
2026-07-20 16:05:17 +00:00
}
let closure_4 = fn(8530).AGE_VERIFICATION_MODAL_KEY;
const jsx = fn(21).jsx;
const constants = { VERIFY_AGE: "VERIFY_AGE" };
const createStyles = fn(4636);
const obj2 = { headerStyle: { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWER } };
let closure_8 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/age_assurance/native/AgeVerificationModal.tsx");
2026-07-20 16:05:17 +00:00
export default function AgeVerificationModal(webviewUrl) {
webviewUrl = webviewUrl.webviewUrl;
const onComplete = webviewUrl.onComplete;
const onClose = webviewUrl.onClose;
const tmp = closure_8();
noop = tmp;
2026-07-29 08:29:29 +00:00
let intl = webviewUrl(onClose[11]).intl;
2026-07-23 10:11:24 +00:00
const stringResult = intl.string(webviewUrl(onClose[11]).t.wJVyYR);
2026-07-29 08:29:29 +00:00
c4 = stringResult;
2026-07-20 16:05:17 +00:00
const items = [tmp, webviewUrl, onComplete, onClose, stringResult];
const memo = noop.useMemo(() => {
closure_2 = onClose;
2026-07-29 08:29:29 +00:00
function handleClose() {
closure_2();
onComplete(onClose[9]).pop();
2026-07-29 08:29:29 +00:00
}
return {
[closure_2_6.VERIFY_AGE]: {
headerStyle: headerStyle.headerStyle,
headerTitle,
2026-07-29 08:29:29 +00:00
headerLeft() {
const obj = { onPress: handleClose, text: null };
const intl = webviewUrl(onClose[11]).intl;
obj.text = intl.string(webviewUrl(onClose[11]).t.cpT0Cq);
return jsx(webviewUrl(onClose[10]).HeaderActionButton, { onPress: handleClose, text: null });
2026-07-29 08:29:29 +00:00
},
render() {
return <AgeVerifyScreen webviewUrl={webviewUrl} onComplete={onComplete} onClose={handleClose} />;
2026-07-29 08:29:29 +00:00
}
}
};
}, items);
let obj = { screens: memo, initialRouteName: constants.VERIFY_AGE, headerBackTitle: null };
2026-07-23 10:11:24 +00:00
const intl2 = webviewUrl(onClose[11]).intl;
obj.headerBackTitle = intl2.string(webviewUrl(onClose[11]).t["13/7kX"]);
2026-07-29 08:29:29 +00:00
return jsx(webviewUrl(onClose[12]).Navigator, { screens: memo, initialRouteName: constants.VERIFY_AGE, headerBackTitle: null });
2026-07-20 16:05:17 +00:00
};