decord/source/modules/auth/makeAuthenticated.tsx

70 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-14 17:33:39 +00:00
// Module ID: 15913
// Function ID: 15914
2026-07-20 16:05:17 +00:00
// Name: makeAuthenticated
2026-08-14 17:33:39 +00:00
// Dependencies: [19, 1218, 676, 21, 1371, 15914, 2]
2026-07-20 16:05:17 +00:00
// Exports: makeAuthenticated
2026-08-14 17:33:39 +00:00
// Module 15913 (makeAuthenticated)
2026-07-29 08:29:29 +00:00
import "noop";
import fetchFingerprint from "fetchFingerprint";
2026-07-23 10:11:24 +00:00
import { LoginStates } from "ME";
import { jsx } from "jsxProd";
const require = arg1;
const result = require("ME").fileFinishedImporting("modules/auth/makeAuthenticated.tsx");
2026-07-20 16:05:17 +00:00
export const makeAuthenticated = function makeAuthenticated(displayName) {
2026-07-23 10:11:24 +00:00
let closure_0 = displayName;
let closure_1 = arg1;
2026-07-29 08:29:29 +00:00
let obj = arg2;
2026-07-20 16:05:17 +00:00
if (arg2 === undefined) {
2026-07-29 08:29:29 +00:00
obj = { passProps: true };
}
let str = displayName.displayName;
if (str == null) {
str = displayName.name;
}
if (str == null) {
str = "<Unknown>";
2026-07-20 16:05:17 +00:00
}
class Authenticated {
constructor(arg0) {
2026-07-29 08:29:29 +00:00
tmp = closure_2;
2026-07-23 10:11:24 +00:00
obj = closure_0(closure_2[4]);
2026-07-20 16:05:17 +00:00
if (!obj.isAuthenticated()) {
2026-07-29 08:29:29 +00:00
obj2 = outer1_3;
2026-07-23 10:11:24 +00:00
tmp2 = outer1_4;
if (outer1_3.getLoginStatus() !== outer1_4.LOGGING_IN) {
2026-07-29 08:29:29 +00:00
if (obj2.allowLogoutRedirect()) {
tmp4 = null;
2026-07-23 10:11:24 +00:00
if (null != closure_1) {
2026-07-29 08:29:29 +00:00
tmp8 = outer1_5;
obj = { renderRedirect: null };
tmp9 = closure_1;
obj[0] = outer1_5(closure_1(tmp[5]), {});
tmp10Result = outer1_5(tmp3, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp5 = outer1_5;
tmp6 = closure_1;
tmp10Result = outer1_5(closure_1(tmp[5]), {});
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp10Result;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
tmp12 = null;
tmp10 = outer1_5;
tmp11 = closure_0;
2026-07-23 10:11:24 +00:00
if (closure_2.passProps) {
2026-07-29 08:29:29 +00:00
tmp12 = displayName;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1 = {};
merged = Object.assign(tmp12);
tmp10Result = tmp10(tmp11, obj1);
2026-07-20 16:05:17 +00:00
return;
}
}
Authenticated.displayName = "Authenticated(" + str + ")";
return Authenticated;
};