decord/source/modules/webauthn/WebAuthnSignalManager.tsx
2026-08-25 06:04:03 +00:00

189 lines
5.3 KiB
TypeScript

// Module ID: 17172
// Function ID: 17173
// Name: handleAuthenticatorDelete
// Dependencies: [5, 1218, 5367, 5938, 2]
// Module 17172 (handleAuthenticatorDelete)
import initializeDefault from "initialize" /* 5367 */;
import closure_2 from "asyncGeneratorStep" /* 5 */;
import closure_3 from "fetchFingerprint" /* 1218 */;
initializeDefault;
class WebAuthnSignalManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = { AUTHENTICATOR_DELETE: applyArgumentsResult.handleAuthenticatorDelete, MFA_WEBAUTHN_CREDENTIALS_LOADED: applyArgumentsResult.handleWebAuthnCredentialsLoaded, CURRENT_USER_UPDATE: applyArgumentsResult.handleCurrentUserUpdate };
return applyArgumentsResult;
}
}
const prototype = WebAuthnSignalManager.prototype;
prototype["handleAuthenticatorDelete"] = function handleAuthenticatorDelete(credential) {
credential = credential.credential;
return callback(function*() {
if (v0 === 2) {
v0 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
return { value: "HermesInternal", done: "HermesInternal" };
}
} else {
try {
v0 = 2;
if (0 === table) {
if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
obj1 = v0(table[3]);
table = 1;
v0 = 1;
obj1 = { value: null, done: false };
obj1[0] = obj1.signalUnknownCredential(v0);
return obj1;
}
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
v0 = 3;
return { value: "HermesInternal", done: "HermesInternal" };
}
} catch (tmp8) {
v0 = tmp;
throw tmp8;
}
}
})();
};
prototype["handleWebAuthnCredentialsLoaded"] = function handleWebAuthnCredentialsLoaded(credentials) {
credentials = credentials.credentials;
return callback(function*() {
if (v0 === 2) {
v0 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
return { value: "HermesInternal", done: "HermesInternal" };
}
} else {
try {
v0 = 2;
if (0 === table) {
if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
const id = closure_1_3.getId();
obj1 = v0(table[3]);
table = 1;
v0 = 1;
obj1 = { value: null, done: false };
obj1[0] = obj1.signalAllAcceptedCredentials(v0, id);
return obj1;
}
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
v0 = 3;
return { value: "HermesInternal", done: "HermesInternal" };
}
} catch (tmp10) {
v0 = tmp;
throw tmp10;
}
}
})();
};
prototype["handleCurrentUserUpdate"] = function handleCurrentUserUpdate(user) {
user = user.user;
return callback(function*() {
if (v0 === 2) {
v0 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
return { value: "HermesInternal", done: "HermesInternal" };
}
} else {
try {
v0 = 2;
if (0 === table) {
if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
obj1 = v0(table[3]);
table = 1;
v0 = 1;
obj1 = { value: null, done: false };
obj1[0] = obj1.signalCurrentUserDetails(v0);
return obj1;
}
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
v0 = 3;
return { value: "HermesInternal", done: "HermesInternal" };
}
} catch (tmp8) {
v0 = tmp;
throw tmp8;
}
}
})();
};
const webAuthnSignalManager = new WebAuthnSignalManager();
const result = require("set").fileFinishedImporting("modules/webauthn/WebAuthnSignalManager.tsx");
export default webAuthnSignalManager;