decord/source/modules/parent_tools/native/RestrictedHoursModal.tsx

260 lines
11 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 16507
// Function ID: 16508
2026-07-20 16:05:17 +00:00
// Name: RestrictedHoursLogoutBlockingLayer
2026-08-15 05:55:55 +00:00
// Dependencies: [32, 19, 17, 1922, 21, 4661, 712, 5446, 1629, 16508, 589, 4115, 4664, 1236, 2335, 5440, 16509, 4104, 4734, 6312, 16510, 5256, 16506, 4732, 11115, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 16507 (RestrictedHoursLogoutBlockingLayer)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import NavigationStack from "NavigationStack";
import get_ActivityIndicator from "ManaContext";
import mergeGuildAvatar from "mergeGuildAvatar";
import jsxProd from "handleLogout";
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
let StyleSheet;
2026-07-29 08:29:29 +00:00
let c5;
let error;
let metroImportAll;
const require = arg1;
2026-07-20 16:05:17 +00:00
function RestrictedHoursLogoutBlockingLayer(visible) {
let tmp2 = null;
if (visible.visible) {
2026-07-29 08:29:29 +00:00
const obj = { style: null, pointerEvents: "auto", accessibilityLiveRegion: "polite", children: null };
obj[0] = tmp.logoutBlockingLayer;
2026-08-15 05:55:55 +00:00
obj[3] = callback2(require(5446) /* ActivityIndicator */.ActivityIndicator, { size: "large" });
2026-07-20 16:05:17 +00:00
tmp2 = callback2(closure_5, obj);
}
return tmp2;
}
function RestrictedHoursScreen(visible) {
let bottom;
let top;
2026-07-23 10:11:24 +00:00
const onLogin = visible.onLogin;
2026-07-29 08:29:29 +00:00
let sharedValue;
let sharedValue1;
let sharedValue2;
let sharedValue3;
const tmp = createCacheKey();
2026-07-23 10:11:24 +00:00
({ top, bottom } = sharedValue(sharedValue1[8])());
2026-07-29 08:29:29 +00:00
const tmp5 = sharedValue(sharedValue1[9])();
2026-07-23 10:11:24 +00:00
let obj = onLogin(sharedValue1[10]);
2026-07-29 08:29:29 +00:00
let items = [mergeGuildAvatar];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
currentUser = currentUser.getCurrentUser();
let str;
if (currentUser != null) {
str = currentUser.username;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
return str;
});
2026-07-23 10:11:24 +00:00
let obj1 = onLogin(sharedValue1[11]);
sharedValue = obj1.useSharedValue(0);
let obj2 = onLogin(sharedValue1[11]);
sharedValue1 = obj2.useSharedValue(0);
let obj3 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
sharedValue2 = obj3.useSharedValue(0);
2026-07-23 10:11:24 +00:00
let obj4 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
sharedValue3 = obj4.useSharedValue(0.9);
2026-07-20 16:05:17 +00:00
const items1 = [sharedValue, sharedValue1, sharedValue2, sharedValue3];
2026-07-23 10:11:24 +00:00
const effect = sharedValue3.useEffect(() => {
2026-07-20 16:05:17 +00:00
let obj = onLogin(sharedValue1[12]);
2026-07-29 08:29:29 +00:00
obj = { duration: 3000, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.bezier(0.24, 0.27, 0.58, 1);
2026-07-20 16:05:17 +00:00
const result = sharedValue.set(obj.withTiming(1, obj));
let obj2 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
obj = { duration: 1500, easing: null };
2026-07-20 16:05:17 +00:00
const Easing2 = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing2.bezier(0, 0, 1, 1);
2026-07-20 16:05:17 +00:00
const result1 = sharedValue1.set(obj2.withDelay(1500, onLogin(sharedValue1[12]).withTiming(1, obj)));
const obj4 = onLogin(sharedValue1[12]);
const obj6 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
const obj1 = { duration: 1000, easing: null };
2026-07-20 16:05:17 +00:00
const Easing3 = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj1[1] = Easing3.bezier(0.1, 0.24, 0.32, 1);
2026-07-20 16:05:17 +00:00
const result2 = sharedValue2.set(obj6.withDelay(2000, onLogin(sharedValue1[12]).withTiming(1, obj1)));
const obj7 = onLogin(sharedValue1[12]);
const obj9 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
obj2 = { duration: 1000, easing: null };
2026-07-20 16:05:17 +00:00
const Easing4 = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj2[1] = Easing4.bezier(0.1, 0.24, 0.32, 1);
2026-07-20 16:05:17 +00:00
const result3 = sharedValue3.set(obj9.withDelay(2000, onLogin(sharedValue1[12]).withTiming(1, obj2)));
}, items1);
2026-07-23 10:11:24 +00:00
let obj5 = onLogin(sharedValue1[11]);
2026-07-20 16:05:17 +00:00
class M {
constructor() {
2026-07-29 08:29:29 +00:00
obj = { opacity: c1.get() };
2026-07-20 16:05:17 +00:00
return obj;
}
}
M.__closure = { backgroundOpacity: sharedValue };
M.__workletHash = 17073775693336;
2026-07-29 08:29:29 +00:00
M.__initData = closure_13;
2026-07-20 16:05:17 +00:00
const animatedStyle = obj5.useAnimatedStyle(M);
2026-07-23 10:11:24 +00:00
let obj6 = onLogin(sharedValue1[11]);
2026-07-20 16:05:17 +00:00
class O {
constructor() {
2026-07-29 08:29:29 +00:00
obj = { opacity: c2.get() };
2026-07-20 16:05:17 +00:00
return obj;
}
}
O.__closure = { gradientOpacity: sharedValue1 };
O.__workletHash = 16592270370139;
2026-07-29 08:29:29 +00:00
O.__initData = closure_14;
2026-07-20 16:05:17 +00:00
const animatedStyle1 = obj6.useAnimatedStyle(O);
2026-07-23 10:11:24 +00:00
let obj7 = onLogin(sharedValue1[11]);
2026-07-20 16:05:17 +00:00
const fn = function z() {
2026-07-29 08:29:29 +00:00
let obj = { opacity: sharedValue2.get(), transform: null };
2026-07-20 16:05:17 +00:00
obj = { scale: sharedValue3.get() };
const items = [obj];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return obj;
};
fn.__closure = { contentOpacity: sharedValue2, contentScale: sharedValue3 };
fn.__workletHash = 15616799997783;
2026-07-29 08:29:29 +00:00
fn.__initData = closure_15;
2026-07-20 16:05:17 +00:00
const animatedStyle2 = obj7.useAnimatedStyle(fn);
2026-07-29 08:29:29 +00:00
if (null != tmp5) {
const intl2 = tmp6(tmp3[13]).intl;
obj = { endTime: null };
obj[0] = tmp5;
let formatResult = intl2.format(tmp2(tmp3[14]).VfqJvY, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp6(tmp3[13]).intl;
formatResult = intl.string(tmp2(tmp3[14]).abikhN);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { backgroundColor: c9, children: null };
obj1 = { style: items2, children: null };
2026-07-23 10:11:24 +00:00
items2 = [tmp.container, { paddingTop: top, paddingBottom: bottom }, animatedStyle];
2026-07-20 16:05:17 +00:00
obj2 = { style: tmp.backgroundFill, pointerEvents: "none" };
const items3 = [callback2(closure_5, obj2), , , ];
2026-07-29 08:29:29 +00:00
obj3 = { style: items4, pointerEvents: "none", children: null };
2026-07-23 10:11:24 +00:00
items4 = [tmp.assetLayers, animatedStyle1];
2026-07-29 08:29:29 +00:00
obj4 = { source: null, resizeMode: "cover", style: null };
obj4[0] = onLogin(sharedValue1[16]);
obj4[2] = tmp.sunbeamGradient;
obj3[2] = callback2(sharedValue(sharedValue1[11]).Image, obj4);
2026-07-23 10:11:24 +00:00
items3[1] = callback2(sharedValue(sharedValue1[11]).View, obj3);
2026-07-29 08:29:29 +00:00
obj5 = { style: items5, children: null };
2026-07-23 10:11:24 +00:00
items5 = [tmp.content, animatedStyle2];
2026-07-29 08:29:29 +00:00
obj6 = { style: tmp.riveContainer, children: null };
obj6[1] = callback2(onLogin(sharedValue1[17]).TeenScreenTimeRive, { artboard: "Teen Screen Time Illo", stateMachine: "State Machine 1" });
2026-07-20 16:05:17 +00:00
const items6 = [callback2(closure_5, obj6), ];
2026-07-23 10:11:24 +00:00
obj7 = { variant: "text-lg/medium", color: "text-overlay-light", style: tmp.description, children: formatResult };
items6[1] = callback2(onLogin(sharedValue1[18]).Text, obj7);
2026-07-29 08:29:29 +00:00
obj5[1] = items6;
2026-07-23 10:11:24 +00:00
items3[2] = callback3(sharedValue(sharedValue1[11]).View, obj5);
2026-07-29 08:29:29 +00:00
const obj8 = { style: tmp.footer, children: null };
let obj9 = { variant: "text-sm/medium", color: "text-subtle", style: tmp.description, children: null };
const intl3 = tmp6(tmp3[13]).intl;
obj9[3] = intl3.format(sharedValue(sharedValue1[14]).iqeKDz, {
2026-07-20 16:05:17 +00:00
username: stateFromStores,
loginHook(children) {
2026-07-29 08:29:29 +00:00
return outer1_7(onLogin(sharedValue1[18]).Text, { variant: "text-sm/normal", color: "text-link", onPress: onLogin, children }, arg1);
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
obj8[1] = callback2(onLogin(sharedValue1[18]).Text, obj9);
2026-07-20 16:05:17 +00:00
items3[3] = callback2(closure_5, obj8);
2026-07-29 08:29:29 +00:00
obj1[1] = items3;
2026-07-23 10:11:24 +00:00
const items7 = [callback3(sharedValue(sharedValue1[11]).View, obj1), callback2(RestrictedHoursLogoutBlockingLayer, { visible: visible.logoutRequestInFlight })];
2026-07-29 08:29:29 +00:00
obj[1] = items7;
2026-07-23 10:11:24 +00:00
return callback3(onLogin(sharedValue1[15]).ModalScreen, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ StyleSheet, View: c5 } = get_ActivityIndicator);
({ jsx: error, jsxs: metroImportAll } = jsxProd);
2026-07-23 10:11:24 +00:00
let c9 = "rgb(0, 3, 40)";
2026-07-29 08:29:29 +00:00
createCacheKey = { container: null, backgroundFill: null, assetLayers: null, sunbeamGradient: null, riveContainer: null, content: null, description: null, footer: null, logoutBlockingLayer: null };
createCacheKey = { flex: 1, justifyContent: "center", alignItems: "center", paddingHorizontal: require("Themes").space.PX_24 };
createCacheKey[0] = createCacheKey;
2026-07-23 10:11:24 +00:00
let obj1 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj1.zIndex = 0;
obj1.backgroundColor = "rgb(0, 3, 40)";
createCacheKey[1] = obj1;
2026-07-23 10:11:24 +00:00
let obj2 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj2.zIndex = 1;
createCacheKey[2] = obj2;
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
createCacheKey[3] = {};
createCacheKey[4] = { width: "100%", maxWidth: 523, height: 300 };
createCacheKey[5] = { alignItems: "center", width: "100%", gap: require("Themes").space.PX_16, zIndex: 2 };
createCacheKey[6] = { textAlign: "center" };
let obj3 = {};
let obj4 = { alignItems: "center", width: "100%", gap: require("Themes").space.PX_16, zIndex: 2 };
createCacheKey[7] = { position: "absolute", bottom: require("Themes").space.PX_32, alignSelf: "center", zIndex: 2 };
2026-07-23 10:11:24 +00:00
let obj6 = {};
2026-07-20 16:05:17 +00:00
const merged3 = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj6.zIndex = 10;
obj6.justifyContent = "center";
obj6.alignItems = "center";
obj6.backgroundColor = "rgb(0, 3, 40)";
createCacheKey[8] = obj6;
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-20 16:05:17 +00:00
let closure_11 = { MAIN: "main" };
2026-07-29 08:29:29 +00:00
let closure_13 = { code: "function RestrictedHoursModalTsx1(){const{backgroundOpacity}=this.__closure;return{opacity:backgroundOpacity.get()};}" };
let closure_14 = { code: "function RestrictedHoursModalTsx2(){const{gradientOpacity}=this.__closure;return{opacity:gradientOpacity.get()};}" };
let closure_15 = { code: "function RestrictedHoursModalTsx3(){const{contentOpacity,contentScale}=this.__closure;return{opacity:contentOpacity.get(),transform:[{scale:contentScale.get()}]};}" };
let obj5 = { position: "absolute", bottom: require("Themes").space.PX_32, alignSelf: "center", zIndex: 2 };
2026-07-23 10:11:24 +00:00
let result = require("get ActivityIndicator").fileFinishedImporting("modules/parent_tools/native/RestrictedHoursModal.tsx");
2026-07-20 16:05:17 +00:00
export default function RestrictedHoursModal() {
2026-07-29 08:29:29 +00:00
let _slicedToArray;
let tmp4;
2026-08-15 05:55:55 +00:00
const tmp = importDefault(16510)();
2026-07-29 08:29:29 +00:00
let callback = tmp;
2026-07-23 10:11:24 +00:00
importDefault = React.useRef(false);
const dependencyMap = React.useRef(true);
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
closure_2.current = true;
return () => {
2026-07-29 08:29:29 +00:00
closure_2.current = false;
2026-07-20 16:05:17 +00:00
};
}, []);
2026-07-29 08:29:29 +00:00
[tmp4, _slicedToArray] = callback(React.useState(false), 2);
callback = React.useCallback(() => {
if (!tmp4.current) {
tmp.current = true;
2026-07-20 16:05:17 +00:00
callback(true);
2026-08-15 05:55:55 +00:00
const obj = tmp4(5256);
tmp4(5256).logout("restricted_hours").finally(() => {
2026-07-29 08:29:29 +00:00
if (ref.current) {
closure_1.current = false;
callback(false);
2026-07-20 16:05:17 +00:00
}
});
2026-08-15 05:55:55 +00:00
const logoutResult = tmp4(5256).logout("restricted_hours");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}, []);
importDefault = tmp4;
2026-08-15 05:55:55 +00:00
let obj = callback(6312);
2026-07-29 08:29:29 +00:00
const items = [callback, tmp4];
const items1 = [tmp];
const navigatorScreens = obj.useNavigatorScreens(() => ({
[outer1_11.MAIN]: {
headerShown: false,
gestureEnabled: false,
render() {
return outer1_7(outer1_16, { onLogin: closure_0, logoutRequestInFlight: closure_1 });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
}), items);
const effect1 = React.useEffect(() => {
let current = callback;
if (!callback) {
current = tmp4.current;
}
if (!current) {
2026-08-15 05:55:55 +00:00
const result = callback(16506).closeRestrictedHoursModal();
const obj = callback(16506);
2026-07-29 08:29:29 +00:00
}
}, items1);
2026-08-15 05:55:55 +00:00
importDefault(4732)(() => true);
2026-07-29 08:29:29 +00:00
obj = { screens: navigatorScreens, initialRouteName: constants.MAIN };
2026-08-15 05:55:55 +00:00
return callback2(callback(11115).Modal, obj);
2026-07-20 16:05:17 +00:00
};