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

147 lines
5.3 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 16036
// Function ID: 123856
2026-07-20 16:05:17 +00:00
// Name: HcaptchaModal
2026-07-27 11:26:19 +00:00
// Dependencies: [29, 31, 27, 1922, 1850, 653, 33, 4131, 566, 1456, 1882, 1557, 1212, 9403, 4541, 4542, 689, 4127, 477, 16035, 4661, 4085, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 16036 (HcaptchaModal)
2026-07-23 10:11:24 +00:00
import _objectWithoutProperties from "_objectWithoutProperties";
import result from "result";
import get_ActivityIndicator from "get ActivityIndicator";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_10 from "_isNativeReflectConstruct";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_11;
let closure_12;
let closure_6;
let closure_7;
let closure_8;
const require = arg1;
2026-07-20 16:05:17 +00:00
class HcaptchaModal {
constructor(arg0) {
onMessage = global.onMessage;
2026-07-23 10:11:24 +00:00
tmp = _objectWithoutProperties(global, closure_3);
tmp2 = c13();
obj = require("initialize");
2026-07-20 16:05:17 +00:00
items = [];
2026-07-23 10:11:24 +00:00
items[0] = c10;
stateFromStores = obj.useStateFromStores(items, () => outer1_10.getCurrentUser());
obj2 = require("useNavigation");
2026-07-20 16:05:17 +00:00
navigation = obj2.useNavigation();
routes = navigation.getState().routes;
tmp4 = routes.length > 0;
if (tmp4) {
str = "auth";
tmp4 = "auth" === routes[0].name;
}
if (!tmp4) {
tmp5 = null;
prop = undefined;
if (null != stateFromStores) {
prop = stateFromStores.ageVerificationStatus;
}
2026-07-23 10:11:24 +00:00
tmp7 = onMessage;
tmp8 = closure_2;
2026-07-20 16:05:17 +00:00
num = 10;
2026-07-23 10:11:24 +00:00
tmp4 = prop === require("PermissionOverwriteType").AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmp9 = require("useSafeAreaInsets")();
intl = require("getSystemLocale").intl;
2026-07-20 16:05:17 +00:00
items1 = [];
items1[0] = onMessage;
2026-07-23 10:11:24 +00:00
stringResult = intl.string(require("getSystemLocale").t.wsoPhr);
callback = result.useCallback(() => {
2026-07-20 16:05:17 +00:00
if (null != onMessage) {
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { data: onMessage(outer1_2[13]).CaptchaError.CANCEL };
2026-07-20 16:05:17 +00:00
obj.nativeEvent = obj;
onMessage(obj);
}
}, items1);
2026-07-23 10:11:24 +00:00
closure_1 = callback;
tmp12 = require("useBackPressHandler")(() => {
2026-07-20 16:05:17 +00:00
callback();
return true;
});
obj = { style: tmp2.container };
tmp16Result = !tmp4;
tmp13 = jsxs;
tmp14 = View;
if (!tmp4) {
2026-07-23 10:11:24 +00:00
tmp17 = onMessage;
tmp18 = closure_2;
2026-07-20 16:05:17 +00:00
num2 = 15;
tmp16 = jsxs;
obj1 = {};
2026-07-23 10:11:24 +00:00
tmp19 = closure_1;
2026-07-20 16:05:17 +00:00
num3 = 16;
2026-07-23 10:11:24 +00:00
obj1.spacing = require("_createForOfIteratorHelperLoose").space.PX_16;
2026-07-20 16:05:17 +00:00
str2 = "center";
obj1.align = "center";
tmp20 = jsx;
num4 = 17;
2026-07-23 10:11:24 +00:00
obj2 = { accessibilityRole: "header", variant: "heading-lg/bold", color: "mobile-text-heading-primary" };
2026-07-20 16:05:17 +00:00
obj2.style = tmp2.title;
obj2.children = stringResult;
items2 = [, ];
2026-07-23 10:11:24 +00:00
items2[0] = jsx(require("Text").Text, obj2);
2026-07-20 16:05:17 +00:00
obj3 = {};
str3 = "small";
obj3.size = "small";
num5 = 18;
tmp21 = jsx;
tmp22 = ActivityIndicator;
2026-07-23 10:11:24 +00:00
obj8 = require("set");
2026-07-20 16:05:17 +00:00
WHITE = undefined;
if (obj8.isAndroid()) {
2026-07-23 10:11:24 +00:00
tmp24 = closure_1;
tmp25 = closure_2;
WHITE = require("_createForOfIteratorHelperLoose").unsafe_rawColors.WHITE;
2026-07-20 16:05:17 +00:00
}
obj3.color = WHITE;
items2[1] = tmp21(tmp22, obj3);
obj1.children = items2;
2026-07-23 10:11:24 +00:00
tmp16Result = tmp16(require("Stack").Stack, obj1);
2026-07-20 16:05:17 +00:00
}
items3 = [, , ];
items3[0] = tmp16Result;
obj4 = { style: StyleSheet.absoluteFillObject };
obj5 = {};
2026-07-23 10:11:24 +00:00
tmp26 = require("Hcaptcha");
2026-07-20 16:05:17 +00:00
merged = Object.assign(tmp);
2026-07-23 10:11:24 +00:00
obj5["languageCode"] = c9.locale;
2026-07-20 16:05:17 +00:00
obj5["onMessage"] = onMessage;
obj4.children = jsx(tmp26, obj5);
items3[1] = jsx(View, obj4);
obj6 = {};
items4 = [, ];
items4[0] = tmp2.closeButtonContainer;
2026-07-23 10:11:24 +00:00
obj7 = { paddingTop: top + require("_createForOfIteratorHelperLoose").space.PX_8, paddingLeft: left + require("_createForOfIteratorHelperLoose").space.PX_16 };
2026-07-20 16:05:17 +00:00
({ top, left } = tmp9);
items4[1] = obj7;
obj6.style = items4;
obj6.pointerEvents = "box-none";
obj8 = { accessibilityRole: "button" };
2026-07-23 10:11:24 +00:00
intl2 = require("getSystemLocale").intl;
obj8.accessibilityLabel = intl2.string(require("getSystemLocale").t.cpT0Cq);
2026-07-20 16:05:17 +00:00
obj8.onPress = callback;
obj8.style = tmp2.closeButtonHitArea;
obj9 = {};
2026-07-23 10:11:24 +00:00
obj9.color = require("_createForOfIteratorHelperLoose").colors.INTERACTIVE_ICON_DEFAULT;
obj8.children = jsx(require("XLargeIcon").XLargeIcon, obj9);
obj6.children = jsx(require("PressableBase").PressableOpacity, obj8);
2026-07-20 16:05:17 +00:00
items3[2] = jsx(View, obj6);
obj.children = items3;
return tmp13(tmp14, obj);
}
}
2026-07-23 10:11:24 +00:00
let closure_3 = ["onMessage", "onClose"];
({ ActivityIndicator: closure_6, View: closure_7, StyleSheet: closure_8 } = get_ActivityIndicator);
({ jsx: closure_11, jsxs: closure_12 } = jsxProd);
let closure_13 = _createForOfIteratorHelperLoose.createStyles({ container: { flex: 1, justifyContent: "center", alignItems: "center" }, title: { textAlign: "center" }, closeButtonContainer: { position: "absolute", top: 0, left: 0, zIndex: 2 }, closeButtonHitArea: { minWidth: 44, minHeight: 44, justifyContent: "center", alignItems: "center" } });
HcaptchaModal.modalConfig = { animation: require("ME").ModalAnimation.FADE };
const result = require("get ActivityIndicator").fileFinishedImporting("modules/captcha/native/HcaptchaModal.tsx");
2026-07-20 16:05:17 +00:00
export default HcaptchaModal;