decord/stable/source/modules/webauthn/native/PasskeyUpsellManager.tsx
github-actions e2bc0408ee chore: update source for stable 346.13
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-22 22:11:40 +00:00

76 lines
3.3 KiB
TypeScript

// Module ID: 14750
// Function ID: 14751
// Name: PasskeyUpsellManager
// Dependencies: [502, 1371, 14744, 1074, 7221, 7052, 4457, 1943, 4494, 6698, 14751, 2]
// Module 14750 (PasskeyUpsellManager)
import dismissible_content from "dismissible_content" /* 1943 */;
import DismissibleContentUnsafeUtils from "DismissibleContentUnsafeUtils" /* 4457 */;
import MFAUtils from "MFAUtils" /* 7052 */;
import PasskeyUpsellActionCreatorsDefault from "PasskeyUpsellActionCreators" /* 14751 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import UserStore from "UserStore" /* 1371 */;
import WebAuthnStore from "WebAuthnStore" /* 14744 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7221 */;
require = fn;
const LoginStates = fn(1074).LoginStates;
let c7 = false;
let c8 = false;
class PasskeyUpsellManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = { POST_CONNECTION_OPEN: applyArgumentsResult.handlePasskeyUpsellShow, LOGIN_RESET: applyArgumentsResult.handleLogout, LOGIN_SUCCESS: applyArgumentsResult.handleLoginSuccess, LOGOUT: applyArgumentsResult.handleLogout };
map = new Map();
result = map.set(closure_3, applyArgumentsResult.handlePasskeyUpsellShow);
result1 = result.set(closure_4, applyArgumentsResult.handlePasskeyUpsellShow);
applyArgumentsResult.stores = result1.set(closure_5, applyArgumentsResult.handlePasskeyUpsellShow);
return applyArgumentsResult;
}
}
const prototype = PasskeyUpsellManager.prototype;
prototype["handlePasskeyUpsellShow"] = function handlePasskeyUpsellShow() {
if (c8) {
if (MFAUtils.hasWebAuthn) {
if (AuthenticationStore.getLoginStatus() === LoginStates.NONE) {
if (obj.attemptedPasswordLogin()) {
if (!tmpResult.UNSAFE_isDismissibleContentDismissed(tmp(1943).DismissibleContent.PASSWORDLESS_UPSELL)) {
if (!WebAuthnStore.hasFetchedCredentials()) {
if (!tmpResult3.isModalOpen()) {
const currentUser = UserStore.getCurrentUser();
if (tmp6) {
if (obj3.hasFetchedCredentials()) {
PasskeyUpsellActionCreatorsDefault.openPasskeyUpsell();
} else if (!c7) {
c7 = true;
const webAuthnCredentials = tmp(6698).fetchWebAuthnCredentials();
const tmpResult4 = tmp(6698);
}
}
tmp6 = undefined !== currentUser && currentUser.verified;
}
tmpResult3 = tmp(4494);
}
}
tmpResult = tmp(4457);
}
}
obj = AuthenticationStore;
}
}
};
prototype["handleLoginSuccess"] = function handleLoginSuccess() {
c8 = true;
};
prototype["handleLogout"] = function handleLogout() {
c7 = false;
c8 = false;
};
prototype["markDismissed"] = function markDismissed(USER_DISMISS) {
return DismissibleContentUnsafeUtils.UNSAFE_markDismissibleContentAsDismissed(dismissible_content.DismissibleContent.PASSWORDLESS_UPSELL, { dismissAction: USER_DISMISS, forceTrack: true });
};
const passkeyUpsellManager = new PasskeyUpsellManager();
const size = fn(2);
let result = size.fileFinishedImporting("modules/webauthn/native/PasskeyUpsellManager.tsx");
export default passkeyUpsellManager;