decord/alpha/source/modules/webauthn/SignalHelpers.native.tsx

205 lines
6.4 KiB
TypeScript
Raw Normal View History

// Module ID: 6010
// Function ID: 6011
// Name: SignalHelpers
// Dependencies: [5, 3, 6011, 6012, 2]
2026-07-20 16:05:17 +00:00
// Module 6010 (SignalHelpers)
import LoggerDefault from "Logger" /* 3 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
2026-07-23 10:11:24 +00:00
const require = fn;
let closure_4 = new LoggerDefault("SignalHelpers.native");
2026-07-29 08:29:29 +00:00
const prototype = function SignalHelpers() {
return Object.create(new.target.prototype);
}.prototype;
prototype["signalAllAcceptedCredentials"] = function signalAllAcceptedCredentials(credentials, id) {
closure_0 = credentials;
2026-08-24 06:08:38 +00:00
closure_1 = id;
return (async (arg0, value) => {
if (credentials === 2) {
credentials = 3;
throw new TypeError("Generator functions may not be called on executing generators");
2026-07-29 08:29:29 +00:00
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
2026-07-29 08:29:29 +00:00
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
credentials = 2;
if (0 === v1) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
credentials = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
credentials = 3;
const obj3 = { value, done: true };
return obj3;
} else {
const result = credentials(6011).encodeUserIdForWebAuthn(closure_1);
const mapped = credentials.map((cred_id) => cred_id.cred_id);
const found = mapped.filter((item) => "" !== item);
const obj4 = { rpId, encodedId: result, allAcceptedCredentialIds: found, credentials };
logger.info("signalAllAcceptedCredentials", obj4);
const obj5 = credentials(6011);
const result1 = v1(6012).signalAllAcceptedCredentials(rpId, result, found);
v1 = 1;
credentials = 1;
const obj6 = { value: result1.catch(logger.warn), done: false };
return obj6;
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
credentials = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
credentials = 3;
const obj = { value, done: true };
2026-07-29 08:29:29 +00:00
return obj;
} else {
credentials = 3;
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp5) {
credentials = tmp;
throw tmp5;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
})();
};
prototype["signalCurrentUserDetails"] = function signalCurrentUserDetails(user) {
closure_0 = user;
return (async (arg0, value) => {
if (dependencyMap === 2) {
dependencyMap = 3;
throw new TypeError("Generator functions may not be called on executing generators");
2026-07-29 08:29:29 +00:00
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
2026-07-29 08:29:29 +00:00
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
} else {
try {
dependencyMap = 2;
if (0 === c3) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
dependencyMap = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
dependencyMap = 3;
const obj4 = { value, done: true };
return obj4;
} else {
const result = username(dependencyMap[2]).encodeUserIdForWebAuthn(username.id);
const email = username.email;
let global_name = email;
2026-07-29 08:29:29 +00:00
if (email == null) {
global_name = tmp23.global_name;
2026-07-29 08:29:29 +00:00
}
username = global_name;
2026-07-29 08:29:29 +00:00
if (global_name == null) {
username = tmp23.username;
2026-07-29 08:29:29 +00:00
}
username = tmp23.username;
const obj5 = { rpId, encodedId: result, name: username, displayName: username };
logger.info("signalCurrentUserDetails", obj5);
const obj3 = global_name(dependencyMap[3]);
const result1 = obj3.signalCurrentUserDetails(rpId, result, username, username);
c3 = 1;
dependencyMap = 1;
const obj6 = { value: result1.catch(logger.warn), done: false };
return obj6;
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
dependencyMap = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
dependencyMap = 3;
const obj = { value, done: true };
2026-07-29 08:29:29 +00:00
return obj;
} else {
dependencyMap = 3;
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp16) {
dependencyMap = tmp;
throw tmp16;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
})();
};
prototype["signalUnknownCredential"] = function signalUnknownCredential(credential) {
closure_0 = credential;
return (async (arg0, value) => {
2026-07-29 08:29:29 +00:00
if (c0 === 2) {
c0 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
2026-07-29 08:29:29 +00:00
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
2026-07-20 16:05:17 +00:00
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c0 = 2;
if (0 === v1) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
c0 = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
c0 = 3;
const obj4 = { value, done: true };
return obj4;
2026-07-29 08:29:29 +00:00
} else {
let tmp7 = closure_0;
if (typeof closure_0 === "string") {
const _JSON = JSON;
let cred_id = JSON.parse(tmp7).id;
} else {
cred_id = tmp7.cred_id;
2026-07-29 08:29:29 +00:00
}
const obj5 = { rpId: null, credentialId: null };
tmp7 = rpId;
obj5.rpId = rpId;
obj5.credentialId = cred_id;
logger.info("signalUnknownCredential", obj5);
const result = v1(dependencyMap[3]).signalUnknownCredential(rpId, cred_id);
result.catch(logger.warn);
v1 = 1;
c0 = 1;
const obj3 = v1(dependencyMap[3]);
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
c0 = 3;
throw value;
2026-07-29 08:29:29 +00:00
} else if (arg0 === 2) {
c0 = 3;
const obj = { value, done: true };
2026-07-29 08:29:29 +00:00
return obj;
} else {
c0 = 3;
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp12) {
2026-07-29 08:29:29 +00:00
c0 = tmp;
throw tmp12;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
})();
};
const size = fn(2);
let result = size.fileFinishedImporting("modules/webauthn/SignalHelpers.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default prototype;