decord/source/modules/auth/makeAuthenticated.tsx

71 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 16747
// Function ID: 16748
2026-07-20 16:05:17 +00:00
// Name: makeAuthenticated
// Dependencies: [19, 502, 1074, 21, 7668, 16748, 2]
2026-07-20 16:05:17 +00:00
// Exports: makeAuthenticated
// Module 16747 (makeAuthenticated)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import closure_3 from "fetchFingerprint" /* 502 */;
import { LoginStates } from "ME" /* 1074 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
const result = require("set").fileFinishedImporting("modules/auth/makeAuthenticated.tsx");
2026-07-20 16:05:17 +00:00
export const makeAuthenticated = function makeAuthenticated(displayName) {
2026-08-24 06:08:38 +00:00
closure_0 = displayName;
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-08-24 06:08:38 +00:00
obj2 = closure_1_3;
tmp2 = closure_1_4;
if (closure_1_3.getLoginStatus() !== closure_1_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-08-24 06:08:38 +00:00
tmp8 = closure_1_5;
2026-07-29 08:29:29 +00:00
obj = { renderRedirect: null };
tmp9 = closure_1;
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_5(closure_1(tmp[5]), {});
tmp10Result = closure_1_5(tmp3, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
tmp5 = closure_1_5;
2026-07-29 08:29:29 +00:00
tmp6 = closure_1;
2026-08-24 06:08:38 +00:00
tmp10Result = closure_1_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;
2026-08-24 06:08:38 +00:00
tmp10 = closure_1_5;
2026-07-29 08:29:29 +00:00
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;
};