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

158 lines
5.4 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 16430
// Function ID: 16431
2026-07-20 16:05:17 +00:00
// Name: CaptchaModal
2026-08-12 06:57:52 +00:00
// Dependencies: [19, 17, 15149, 15150, 21, 4344, 8517, 1500, 16431, 5436, 4752, 6068, 4340, 1236, 4754, 10509, 16432, 15157, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-12 06:57:52 +00:00
// Module 16430 (CaptchaModal)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import get_ActivityIndicator from "trackRegTransition";
2026-07-23 10:11:24 +00:00
import { doesRegistrationHaveIdentityType as closure_6 } from "useRegistrationUIStore";
import RegistrationTransitionActionTypes from "RegistrationTransitionActionTypes";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c10;
let c4;
let c5;
let c9;
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ Keyboard: c4, View: c5 } = get_ActivityIndicator);
({ RegisterTransitionSteps: error, RegistrationTransitionActionTypes: metroImportAll } = RegistrationTransitionActionTypes);
({ 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-07-23 10:11:24 +00:00
let result = require("useRegistrationUIStore").fileFinishedImporting("modules/captcha/native/CaptchaModal.tsx");
2026-07-20 16:05:17 +00:00
export default function CaptchaModal(arg0) {
let bodyText;
2026-07-29 08:29:29 +00:00
let noop;
2026-07-23 10:11:24 +00:00
let closure_4;
let closure_5;
let closure_6;
let closure_7;
let dependencyMap;
2026-07-20 16:05:17 +00:00
let headerText;
let onReject;
2026-07-23 10:11:24 +00:00
let require;
({ onCaptchaVerify: require, onReject } = arg0);
2026-07-29 08:29:29 +00:00
({ close: dependencyMap, sitekey: noop, 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-12 06:57:52 +00:00
const tmp2 = callback2(onReject(8517)());
2026-08-11 06:20:06 +00:00
let obj = require(1500) /* 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-07-23 10:11:24 +00:00
if (outer1_6()) {
2026-07-20 16:05:17 +00:00
str = "User Registration Captcha";
}
}
return str;
}, items);
2026-08-12 06:57:52 +00:00
callback = onReject(16431)({ 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-12 06:57:52 +00:00
const items1 = [callback(require(6068) /* 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-12 06:57:52 +00:00
const items2 = [callback(require(4340) /* 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-06 08:05:19 +00:00
const obj1 = { startHeight: 900, startExpanded: true, children: null };
let obj2 = { children: null };
2026-07-29 08:29:29 +00:00
obj[3] = bodyText;
2026-08-12 06:57:52 +00:00
items2[1] = callback(require(4340) /* 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();
const result = outer1_0(outer1_2[15]).emitCaptchaDistributionMetric(closure_7);
let obj = outer1_0(outer1_2[15]);
2026-07-29 08:29:29 +00:00
let obj2 = onReject(outer1_2[16]);
const showCaptchaResult = onReject(outer1_2[16]).showCaptcha(closure_4, noop, closure_5);
onReject(outer1_2[16]).showCaptcha(closure_4, noop, closure_5).then((arg0) => {
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) {
tmp4 = outer1_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 };
obj[0] = outer1_7.CAPTCHA;
obj[1] = outer1_8.SUBMITTED;
outer1_0(outer1_2[17]).trackRegTransition(obj);
const obj2 = outer1_0(outer1_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) {
tmp15 = outer1_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 };
obj[0] = outer1_7.CAPTCHA;
obj[1] = outer1_8.SUCCESS;
outer1_0(outer1_2[17]).trackRegTransition(obj);
const obj4 = outer1_0(outer1_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;
obj3[2] = intl3.string(require(1236) /* getSystemLocale */.t["cY+Oob"]);
2026-08-12 06:57:52 +00:00
items1[2] = callback(require(4754) /* Button */.Button, obj3);
2026-07-29 08:29:29 +00:00
obj[2] = items1;
2026-08-12 06:57:52 +00:00
obj1[2] = closure_10(require(4752) /* Stack */.Stack, obj);
return callback(require(5436) /* Background */.BottomSheet, obj1);
2026-07-20 16:05:17 +00:00
};