Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
84 lines
2.8 KiB
TypeScript
84 lines
2.8 KiB
TypeScript
// Module ID: 17379
|
|
// Function ID: 17380
|
|
// Name: captcha/CaptchaUtils
|
|
// Dependencies: [4295, 11351, 504, 4572, 17380, 1896, 11349, 2]
|
|
|
|
// Module 17379 (captcha/CaptchaUtils)
|
|
import initialize from "initialize" /* 504 */;
|
|
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4572 */;
|
|
import SharedCaptchaUtils from "SharedCaptchaUtils" /* 11349 */;
|
|
import ActionSheetStore from "ActionSheetStore" /* 4295 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const CAPTCHA_MODAL_KEY = fn(11351).CAPTCHA_MODAL_KEY;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/captcha/CaptchaUtils.native.tsx");
|
|
|
|
export default {
|
|
showCaptcha(options, arg1) {
|
|
_require = arg1;
|
|
let obj = arg2;
|
|
if (arg2 === undefined) {
|
|
obj = {};
|
|
}
|
|
({ sitekey, captchaService } = options);
|
|
const obj2 = ActionSheetActionCreatorsDefault;
|
|
const obj3 = {
|
|
sitekey,
|
|
captchaService,
|
|
onCaptchaVerify(captcha_key, captcha_rqtoken) {
|
|
return closure_0({ captcha_key, captcha_rqtoken });
|
|
},
|
|
close() {
|
|
return ActionSheetActionCreatorsDefault.hideActionSheet(CAPTCHA_MODAL_KEY);
|
|
}
|
|
};
|
|
const merged = Object.assign(obj);
|
|
const merged1 = Object.assign(options.options);
|
|
obj2.openLazy(require("asyncRequireImpl")(17380, dependencyMap.paths), CAPTCHA_MODAL_KEY, obj3);
|
|
},
|
|
showCaptchaAsync(nextResult1) {
|
|
if (arg1 === undefined) {
|
|
let obj = {};
|
|
}
|
|
c1 = undefined;
|
|
c2 = undefined;
|
|
c3 = undefined;
|
|
c4 = undefined;
|
|
({ sitekey: c1, captchaService: c2, captchaSessionId: c3, options: c4 } = nextResult1);
|
|
return new Promise((arg0, arg1) => {
|
|
closure_0 = arg0;
|
|
sitekey = arg1;
|
|
obj = sitekey(captchaService[3]);
|
|
const merged = Object.assign(closure_0);
|
|
const merged1 = Object.assign(c4);
|
|
obj.openLazy(obj(captchaService[5])(captchaService[4], captchaService.paths), c4, {
|
|
sitekey,
|
|
captchaService,
|
|
onCaptchaVerify(captcha_key, captcha_rqtoken) {
|
|
return closure_0({ captcha_key, captcha_rqtoken, captcha_session_id });
|
|
},
|
|
onReject(dependencyMap) {
|
|
if (dependencyMap === SharedCaptchaUtils.CaptchaError.CANCEL) {
|
|
const captchaCancelError = new SharedCaptchaUtils.CaptchaCancelError();
|
|
closure_1(captchaCancelError);
|
|
} else {
|
|
const _Error = Error;
|
|
const _HermesInternal = HermesInternal;
|
|
const error = new Error("Failed to display captcha for service " + c2 + ".");
|
|
closure_1(error);
|
|
}
|
|
},
|
|
close() {
|
|
return closure_1(captchaService[3]).hideActionSheet(closure_1_4);
|
|
}
|
|
}, "stack");
|
|
});
|
|
},
|
|
useIsCaptchaModalOpen() {
|
|
const items = [ActionSheetStore];
|
|
return initialize.useStateFromStores(items, () => key.getKey() === CAPTCHA_MODAL_KEY);
|
|
}
|
|
};
|