decord/source/modules/captcha/native/CaptchaModal.tsx

149 lines
5.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 16627
// Function ID: 16628
2026-07-20 16:05:17 +00:00
// Name: CaptchaModal
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 15306, 15307, 21, 4380, 8629, 1501, 16628, 5503, 4813, 6136, 4376, 1236, 4815, 10534, 16629, 15314, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 16627 (CaptchaModal)
2026-08-24 06:08:38 +00:00
import getSystemLocale from "getSystemLocale" /* 1236 */;
import createStandardNavigationFactories from "createStandardNavigationFactories" /* 1501 */;
2026-08-25 06:04:03 +00:00
import Text from "Text" /* 4376 */;
import Stack from "Stack" /* 4813 */;
import Button from "Button" /* 4815 */;
import Background from "Background" /* 5503 */;
import AccountAgeTier10LargeBadge from "AccountAgeTier10LargeBadge" /* 6136 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import { doesRegistrationHaveIdentityType as closure_6 } from "useRegistrationUIStore" /* 15306 */;
import RegistrationTransitionActionTypes from "RegistrationTransitionActionTypes" /* 15307 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
({ Keyboard: c4, View: c5 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ RegisterTransitionSteps: error, RegistrationTransitionActionTypes: closure_8 } = RegistrationTransitionActionTypes);
2026-07-29 08:29:29 +00:00
({ jsx: c9, jsxs: c10 } = jsxProd);
let closure_11 = createCacheKey.createStyles((arg0) => {
let paddingHorizontal = 8;
2026-07-20 16:05:17 +00:00
if (arg0) {
2026-07-29 08:29:29 +00:00
paddingHorizontal = 32;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return { contentContainer: { alignItems: "center", paddingVertical: 8, paddingHorizontal }, description: { paddingBottom: 12, paddingTop: 4 } };
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/captcha/native/CaptchaModal.tsx");
2026-07-20 16:05:17 +00:00
export default function CaptchaModal(arg0) {
2026-07-23 10:11:24 +00:00
({ onCaptchaVerify: require, onReject } = arg0);
2026-08-24 06:08:38 +00:00
({ close: dependencyMap, sitekey: closure_3, captchaService: closure_4, headerText, bodyText, rqdata: closure_5, rqtoken: closure_6, userflow: closure_7 } = arg0);
2026-08-06 08:05:19 +00:00
let navigation;
2026-07-29 08:29:29 +00:00
let callback;
2026-08-25 06:04:03 +00:00
const tmp2 = callback2(onReject(8629)());
2026-08-24 06:08:38 +00:00
let obj = createStandardNavigationFactories;
2026-08-06 08:05:19 +00:00
navigation = obj.useNavigation();
const items = [navigation];
2026-07-20 16:05:17 +00:00
const memo = React.useMemo(() => {
2026-08-06 08:05:19 +00:00
const state = navigation.getState();
2026-07-20 16:05:17 +00:00
let name;
2026-08-06 08:05:19 +00:00
if (state != null) {
const first = state.routes[0];
if (first != null) {
name = first.name;
}
2026-07-20 16:05:17 +00:00
}
let str = "Guild Join Captcha";
if ("auth" === name) {
str = "Guild Join Captcha";
2026-08-24 06:08:38 +00:00
if (closure_1_6()) {
2026-07-20 16:05:17 +00:00
str = "User Registration Captcha";
}
}
return str;
}, items);
2026-08-25 06:04:03 +00:00
callback = onReject(16628)({ onReject, analyticsType: memo });
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
closure_4.dismiss();
2026-07-20 16:05:17 +00:00
}, []);
2026-08-06 08:05:19 +00:00
obj = { style: tmp2.contentContainer, spacing: 12, children: null };
2026-08-24 06:08:38 +00:00
const items1 = [callback(AccountAgeTier10LargeBadge.DisguiseSpotIllustration, { scale: 0.5 }), , ];
2026-07-29 08:29:29 +00:00
if (headerText == null) {
2026-08-06 08:05:19 +00:00
const intl = tmp3(1236).intl;
headerText = intl.string(tmp3(1236).t.FpoiHe);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const items2 = [callback(Text.Text, { variant: "heading-xl/bold", accessibilityRole: "header", children: headerText }), ];
2026-07-29 08:29:29 +00:00
obj = { variant: "text-md/medium", color: "text-subtle", style: tmp2.description, children: null };
if (bodyText == null) {
2026-08-06 08:05:19 +00:00
const intl2 = tmp3(1236).intl;
bodyText = intl2.string(tmp3(1236).t["/CidxO"]);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = { startHeight: 900, startExpanded: true, children: null };
2026-08-06 08:05:19 +00:00
let obj2 = { children: null };
2026-07-29 08:29:29 +00:00
obj[3] = bodyText;
2026-08-24 06:08:38 +00:00
items2[1] = callback(Text.Text, obj);
2026-08-06 08:05:19 +00:00
obj2[0] = items2;
items1[1] = closure_10(closure_5, obj2);
const obj3 = {
2026-07-20 16:05:17 +00:00
grow: true,
onPress() {
callback2();
2026-07-23 10:11:24 +00:00
callback();
2026-08-24 06:08:38 +00:00
const result = closure_1_0(closure_1_2[15]).emitCaptchaDistributionMetric(closure_7);
let obj = closure_1_0(closure_1_2[15]);
let obj2 = onReject(closure_1_2[16]);
const showCaptchaResult = onReject(closure_1_2[16]).showCaptcha(closure_4, closure_3, closure_5);
onReject(closure_1_2[16]).showCaptcha(closure_4, closure_3, closure_5).then((arg0) => {
2026-07-29 08:29:29 +00:00
let obj = state;
2026-08-06 08:05:19 +00:00
state = state.getState();
let name;
if (state != null) {
const first = state.routes[0];
if (first != null) {
name = first.name;
}
}
let tmp4 = "auth" === name;
if (tmp4) {
2026-08-24 06:08:38 +00:00
tmp4 = closure_1_6();
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
if (tmp4) {
2026-07-29 08:29:29 +00:00
obj = { step: null, actionType: null };
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_7.CAPTCHA;
obj[1] = closure_1_8.SUBMITTED;
closure_1_0(closure_1_2[17]).trackRegTransition(obj);
const obj2 = closure_1_0(closure_1_2[17]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
callback(arg0, closure_6);
2026-08-06 08:05:19 +00:00
const state1 = obj.getState();
let name1;
if (state1 != null) {
const first1 = state1.routes[0];
if (first1 != null) {
name1 = first1.name;
}
}
let tmp15 = "auth" === name1;
if (tmp15) {
2026-08-24 06:08:38 +00:00
tmp15 = closure_1_6();
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
if (tmp15) {
2026-07-29 08:29:29 +00:00
obj = { step: null, actionType: null };
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_7.CAPTCHA;
obj[1] = closure_1_8.SUCCESS;
closure_1_0(closure_1_2[17]).trackRegTransition(obj);
const obj4 = closure_1_0(closure_1_2[17]);
2026-07-20 16:05:17 +00:00
}
}).catch((arg0) => {
2026-07-29 08:29:29 +00:00
if (closure_1 != null) {
tmp(arg0);
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
},
text: null
2026-07-20 16:05:17 +00:00
};
2026-08-06 08:05:19 +00:00
const intl3 = tmp3(1236).intl;
2026-08-24 06:08:38 +00:00
obj3[2] = intl3.string(getSystemLocale.t["cY+Oob"]);
items1[2] = callback(Button.Button, obj3);
2026-07-29 08:29:29 +00:00
obj[2] = items1;
2026-08-24 06:08:38 +00:00
obj1[2] = closure_10(Stack.Stack, obj);
return callback(Background.BottomSheet, obj1);
2026-07-20 16:05:17 +00:00
};