decord/alpha/source/modules/captcha/SharedCaptchaUtils.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

41 lines
1.7 KiB
TypeScript

// Module ID: 5167
// Function ID: 5168
// Name: SharedCaptchaUtils
// Dependencies: [5168, 5175, 2]
// Exports: emitCaptchaDistributionMetric, extractCaptchaPropsFromResponse
// Module 5167 (SharedCaptchaUtils)
import CaptchaConstants from "CaptchaConstants" /* 5175 */;
import CaptchaStore from "CaptchaStore" /* 5168 */;
import size from "module_2" /* 2 */;
({ incrementCaptchaServeVolume: closure_0, flushCaptchaServeVolume: closure_1, isCaptchaStoreVolumeEmpty: c2 } = CaptchaStore);
let closure_3 = CaptchaConstants.CAPTCHA_SERVE_VOLUME_DISTRIBUTION_AGGREGATION_WINDOW_MS;
const prototype = function CaptchaCancelError() {
return new tmp("Captcha cancelled", new.target);
}.prototype;
class prototype extends Error {
}
const result = size.fileFinishedImporting("modules/captcha/SharedCaptchaUtils.tsx");
export const CaptchaError = { CANCEL: "cancel", ERROR: "error", EXPIRED: "expired" };
export const extractCaptchaPropsFromResponse = function extractCaptchaPropsFromResponse(body) {
const obj = { captchaService: body.captcha_service, sitekey: body.captcha_sitekey, captchaSessionId: body.captcha_session_id, options: null };
const obj2 = { rqdata: body.captcha_rqdata, rqtoken: body.captcha_rqtoken, serveInvisible: null, userflow: null };
let flag = body.should_serve_invisible;
if (flag == null) {
flag = false;
}
obj2.serveInvisible = flag;
obj2.userflow = body.user_flow;
obj.options = obj2;
return obj;
};
export const emitCaptchaDistributionMetric = function emitCaptchaDistributionMetric(arg0) {
if (React2()) {
const _setTimeout = setTimeout;
const timerId = setTimeout(() => closure_1_1(), closure_3);
}
React(arg0);
};
export const CaptchaCancelError = prototype;