97 lines
5.3 KiB
TypeScript
97 lines
5.3 KiB
TypeScript
/* Metro module 9486; source: modules/captcha/SharedCaptchaUtils.tsx; dependencies: [7, 6, 15, 17, 18, 162, 9487, 9488, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Module00162 from '../../by-id/module-00162.js'; /* Metro dependency 162 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as CaptchaStoreModule from './CaptchaStore.tsx'; /* Metro dependency 9487 */
|
|
import * as CaptchaConstantsModule from './CaptchaConstants.tsx'; /* Metro dependency 9488 */
|
|
|
|
function _fun74059(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9672:6, offset: 0x01d7f684, size: 339 bytes, params: 8, frame: 20
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Module00162;
|
|
const Error = global.Error;
|
|
value = value(Error);
|
|
value = _fun74063(value);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/captcha/SharedCaptchaUtils.tsx');
|
|
exports.CaptchaError = {CANCEL: 'cancel', ERROR: 'error', EXPIRED: 'expired'};
|
|
exports.extractCaptchaPropsFromResponse = function(a0) {
|
|
var should_serve_invisible = a0.should_serve_invisible;
|
|
return {captchaService: a0.captcha_service, sitekey: a0.captcha_sitekey,
|
|
captchaSessionId: a0.captcha_session_id,
|
|
options: {rqdata: a0.captcha_rqdata, rqtoken: a0.captcha_rqtoken,
|
|
serveInvisible: should_serve_invisible != null && should_serve_invisible, userflow: a0.user_flow}};
|
|
};
|
|
exports.emitCaptchaDistributionMetric = function(a0) {
|
|
if (isCaptchaStoreVolumeEmpty()) {
|
|
global.setTimeout(_fun74067, CAPTCHA_SERVE_VOLUME_DISTRIBUTION_AGGREGATION_WINDOW_MS);
|
|
}
|
|
incrementCaptchaServeVolume(a0);
|
|
};
|
|
exports.CaptchaCancelError = value;
|
|
function _isNativeReflectConstruct_74060() { // fn#74060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9672:324, offset: 0x01d7f7d7, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_74060_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun74063(a0) { // fn#74063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9672:609, offset: 0x01d7f839, size: 42 bytes, params: 2, frame: 14
|
|
const CaptchaCancelError2 = CaptchaCancelError;
|
|
Inherits(CaptchaCancelError2, a0);
|
|
return CreateClass(CaptchaCancelError2);
|
|
function CaptchaCancelError() { // fn#74064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9672:621, offset: 0x01d7f863, size: 114 bytes, params: 1, frame: 19
|
|
const value = environment.__proto__;
|
|
env1_1(this, CaptchaCancelError);
|
|
const items2 = ['Captcha cancelled'];
|
|
const value3 = env1_3(CaptchaCancelError);
|
|
return env1_2(this, _isNativeReflectConstruct_74060() ? global.Reflect.construct(value3, items2,
|
|
env1_3(this).constructor) : value3.apply(this, items2));
|
|
}
|
|
|
|
}
|
|
|
|
function emitCaptchaDistributionMetric(a0) { // fn#74066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9672:1376, offset: 0x01d7f945, size: 57 bytes, params: 2, frame: 14
|
|
if (isCaptchaStoreVolumeEmpty()) {
|
|
global.setTimeout(function() {
|
|
return flushCaptchaServeVolume();
|
|
}, CAPTCHA_SERVE_VOLUME_DISTRIBUTION_AGGREGATION_WINDOW_MS);
|
|
}
|
|
incrementCaptchaServeVolume(a0);
|
|
function _fun74067() { // fn#74067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9672:1435, offset: 0x01d7f97e, size: 15 bytes, params: 1, frame: 9
|
|
return flushCaptchaServeVolume();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun74059, 9486, [7, 6, 15, 17, 18, 162, 9487, 9488,
|
|
2]) /* metro module 9486, dependencies: [7, 6, 15, 17, 18, 162, 9487, 9488, 2] */;
|