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

88 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 16008
// Function ID: 123592
// Dependencies: [3823, 9484, 566, 4098, 16009, 1934, 9482, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 16008
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { CAPTCHA_MODAL_KEY } from "CAPTCHA_SERVE_VOLUME_DISTRIBUTION_AGGREGATION_WINDOW_MS";
const require = arg1;
const result = require("initialize").fileFinishedImporting("modules/captcha/CaptchaUtils.native.tsx");
2026-07-20 16:05:17 +00:00
export default {
showCaptcha(options) {
let captchaService;
let sitekey;
let obj = arg2;
2026-07-23 10:11:24 +00:00
const _require = arg1;
2026-07-20 16:05:17 +00:00
if (arg2 === undefined) {
obj = {};
}
({ sitekey, captchaService } = options);
obj = {
sitekey,
captchaService,
onCaptchaVerify(captcha_key, captcha_rqtoken) {
2026-07-23 10:11:24 +00:00
return callback({ captcha_key, captcha_rqtoken });
2026-07-20 16:05:17 +00:00
},
close() {
2026-07-23 10:11:24 +00:00
return outer1_1(outer1_2[3]).hideActionSheet(outer1_4);
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
const obj2 = importDefault(4098);
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj);
const merged1 = Object.assign(options.options);
2026-07-24 07:16:23 +00:00
obj2.openLazy(_require(1934)(16009, dependencyMap.paths), CAPTCHA_MODAL_KEY, obj);
2026-07-20 16:05:17 +00:00
},
showCaptchaAsync(nextResult1) {
2026-07-23 10:11:24 +00:00
let c1;
let c2;
let c3;
let c4;
2026-07-20 16:05:17 +00:00
let obj = arg1;
if (arg1 === undefined) {
obj = {};
}
2026-07-23 10:11:24 +00:00
c1 = undefined;
c2 = undefined;
c3 = undefined;
c4 = undefined;
({ sitekey: c1, captchaService: c2, captchaSessionId: c3, options: c4 } = nextResult1);
2026-07-20 16:05:17 +00:00
return new Promise((arg0, arg1) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let closure_1 = arg1;
let obj = _undefined(_undefined2[3]);
2026-07-20 16:05:17 +00:00
obj = {
2026-07-23 10:11:24 +00:00
sitekey: closure_1,
captchaService: _undefined2,
2026-07-20 16:05:17 +00:00
onCaptchaVerify(captcha_key, captcha_rqtoken) {
2026-07-23 10:11:24 +00:00
return callback({ captcha_key, captcha_rqtoken, captcha_session_id: outer1_3 });
2026-07-20 16:05:17 +00:00
},
onReject(arg0) {
2026-07-24 07:16:23 +00:00
if (arg0 === obj(9482).CaptchaError.CANCEL) {
const CaptchaCancelError = obj(9482).CaptchaCancelError;
2026-07-20 16:05:17 +00:00
const prototype2 = CaptchaCancelError.prototype;
const captchaCancelError = new CaptchaCancelError();
2026-07-23 10:11:24 +00:00
callback2(captchaCancelError);
2026-07-20 16:05:17 +00:00
} else {
const _Error = Error;
const _HermesInternal = HermesInternal;
2026-07-23 10:11:24 +00:00
const error = new Error("Failed to display captcha for service " + outer1_2 + ".");
callback2(error);
2026-07-20 16:05:17 +00:00
}
},
close() {
2026-07-23 10:11:24 +00:00
return callback2(4098).hideActionSheet(c4);
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(closure_0);
const merged1 = Object.assign(c4);
obj.openLazy(obj(_undefined2[5])(_undefined2[4], _undefined2.paths), c4, obj, "stack");
2026-07-20 16:05:17 +00:00
});
},
useIsCaptchaModalOpen() {
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct];
return require(566) /* initialize */.useStateFromStores(items, () => outer1_3.getKey() === outer1_4);
2026-07-20 16:05:17 +00:00
}
};