159 lines
7.7 KiB
TypeScript
159 lines
7.7 KiB
TypeScript
/* Metro module 13243; source: modules/webauthn/WebAuthnStore.tsx; dependencies: [6, 7, 15, 17, 18, 1909, 566, 694, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
|
|
|
|
function _fun101003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:6, offset: 0x02204c9c, size: 371 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_8 = [];
|
|
const Store = (Flux).Store;
|
|
let value = _fun101007(Store);
|
|
value.displayName = 'WebAuthnStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
|
|
env0_8 = [];
|
|
env0_7 = false;
|
|
env0_9 = false;
|
|
}, MFA_WEBAUTHN_CREDENTIALS_LOADED: MFA_WEBAUTHN_CREDENTIALS_LOADED, AUTHENTICATOR_CREATE: AUTHENTICATOR_CREATE,
|
|
AUTHENTICATOR_UPDATE: AUTHENTICATOR_UPDATE, AUTHENTICATOR_DELETE: AUTHENTICATOR_DELETE,
|
|
WEBAUTHN_TRIGGER_REGISTER: WEBAUTHN_TRIGGER_REGISTER,
|
|
WEBAUTHN_CLEAR_REGISTER_TRIGGER: WEBAUTHN_CLEAR_REGISTER_TRIGGER});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/webauthn/WebAuthnStore.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_101004() { // fn#101004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:148, offset: 0x02204e0f, 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_101004_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun101007(a0) { // fn#101007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:366, offset: 0x02204e71, size: 149 bytes, params: 2, frame: 16
|
|
const WebAuthnStore2 = WebAuthnStore;
|
|
Inherits(WebAuthnStore2, a0);
|
|
return CreateClass(WebAuthnStore2, [{key: 'hasFetchedCredentials', value: value_101009}, {key: 'hasCredentials',
|
|
get: get_101010}, {key: 'getCredentials', value: value_101011}, {key: 'hasPendingRegisterTrigger',
|
|
value: value_101012}]);
|
|
function WebAuthnStore() { // fn#101008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:378, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, WebAuthnStore);
|
|
const value3 = env1_5(WebAuthnStore);
|
|
return env1_4(this, _isNativeReflectConstruct_101004() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_101009() { // fn#101009, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
|
|
return env1_7;
|
|
}
|
|
|
|
function get_101010() { // fn#101010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:720, offset: 0x02204f06, size: 20 bytes, params: 1, frame: 2
|
|
return env1_8.length > 0;
|
|
}
|
|
|
|
function value_101011() { // fn#101011, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_8;
|
|
}
|
|
|
|
function value_101012() { // fn#101012, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
|
|
return env1_9;
|
|
}
|
|
|
|
}
|
|
|
|
function MFA_WEBAUTHN_CREDENTIALS_LOADED({credentials}) { // fn#101014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1009, offset: 0x02204f33, size: 45 bytes, params: 2, frame: 4
|
|
let r0 = !(env0_8 === credentials) && true;
|
|
r0 = !env0_7 || r0;
|
|
return r0;
|
|
}
|
|
|
|
function AUTHENTICATOR_CREATE({credential}) { // fn#101015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1140, offset: 0x02204f60, size: 126 bytes, params: 2, frame: 17
|
|
const type = credential.type;
|
|
const AuthenticatorType = (ServerModule).AuthenticatorType;
|
|
const WEBAUTHN = AuthenticatorType.WEBAUTHN;
|
|
if (type !== WEBAUTHN) {
|
|
return false;
|
|
}
|
|
let binding = env0_8;
|
|
if (binding.find(function({id}) {
|
|
return id === credential.id;
|
|
}) !== undefined) {
|
|
return false;
|
|
}
|
|
binding = env0_8;
|
|
const items2 = [];
|
|
const value2 = arraySpread(items2, binding, 0, require);
|
|
items2[value2] = credential;
|
|
value2 + 1;
|
|
}
|
|
|
|
function AUTHENTICATOR_UPDATE({credential}) { // fn#101017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1315, offset: 0x02204fde, size: 92 bytes, params: 2, frame: 14
|
|
const type = credential.type;
|
|
const AuthenticatorType = (ServerModule).AuthenticatorType;
|
|
const WEBAUTHN = AuthenticatorType.WEBAUTHN;
|
|
if (type !== WEBAUTHN) {
|
|
return false;
|
|
}
|
|
env0_8 = env0_8.map(function(a0) {
|
|
var value = a0;
|
|
return value.id !== credential.id ? value : credential;
|
|
});
|
|
}
|
|
|
|
function AUTHENTICATOR_DELETE({credential}) { // fn#101019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1474, offset: 0x02205058, size: 92 bytes, params: 2, frame: 14
|
|
const type = credential.type;
|
|
const AuthenticatorType = (ServerModule).AuthenticatorType;
|
|
const WEBAUTHN = AuthenticatorType.WEBAUTHN;
|
|
if (type !== WEBAUTHN) {
|
|
return false;
|
|
}
|
|
env0_8 = env0_8.filter(function({id}) {
|
|
return id !== credential.id;
|
|
});
|
|
}
|
|
|
|
function WEBAUTHN_TRIGGER_REGISTER() { // fn#101021, offset: 0x022050b4, size: 24 bytes, params: 1, frame: 2
|
|
if (env0_9) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function WEBAUTHN_CLEAR_REGISTER_TRIGGER() { // fn#101022, offset: 0x022050cc, size: 22 bytes, params: 1, frame: 3
|
|
if (env0_9) {
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun101003, 13243, [6, 7, 15, 17, 18, 1909, 566, 694,
|
|
2]) /* metro module 13243, dependencies: [6, 7, 15, 17, 18, 1909, 566, 694, 2] */;
|