// Module ID: 16014 // Function ID: 16015 // Name: Auth // Dependencies: [32, 19, 17, 12508, 1074, 21, 16015, 16016, 5676, 16025, 7076, 7023, 4607, 576, 16066, 7016, 1625, 7047, 16067, 7045, 7074, 1116, 1114, 16068, 7549, 16072, 2] // Module 16014 (Auth) import nativeDefault from "native" /* 576 */; import KeyboardChatScrollView from "KeyboardChatScrollView" /* 1625 */; import useWideAuthViewDefault from "useWideAuthView" /* 7016 */; import BackgroundImageDefault from "BackgroundImage" /* 7047 */; import StackNavigator from "StackNavigator" /* 7076 */; import RegistrationHandoff from "RegistrationHandoff" /* 16015 */; import RegistrationUtils from "RegistrationUtils" /* 16025 */; import useIsHCaptchaModalOpenTracking from "useIsHCaptchaModalOpenTracking" /* 16066 */; import _mod16067 from "module_16067" /* 16067 */; import AuthManagerDefault from "AuthManager" /* 16068 */; import useOrientationLockDefault from "useOrientationLock" /* 16072 */; import _slicedToArray from "module_32" /* 32 */; import noop from "module_19" /* 19 */; import MultiAccountStore from "MultiAccountStore" /* 12508 */; require = fn; function getInitialAuthRouteStack() { if (!obj.hasRegistrationHandoff()) { const obj3 = { name: AuthStates.WELCOME }; const items = [obj3]; let items1 = items; } else { const obj4 = { name: AuthStates.WELCOME }; items1 = [obj4, ]; const obj5 = { name: AuthStates.LOGIN }; items1[1] = obj5; } return items1; } function NavigatorWithCaptchaHook() { obj = useIsHCaptchaModalOpenTracking; const isHCaptchaModalOpenTracking = obj.useIsHCaptchaModalOpenTracking(); const tmp6 = closure_16(); const first = _slicedToArray(noop.useState(getInitialAuthRouteStack), 1)[0]; const tmp5 = useWideAuthViewDefault(); [tmp8, require] = noop.useState(first[first.length - 1].name); const effect = noop.useEffect(() => { const result = RegistrationHandoff.clearRegistrationHandoff(); }, []); const tmp10 = _slicedToArray(noop.useState(false), 2); importDefault = tmp11; const tmp7 = _slicedToArray(noop.useState(first[first.length - 1].name), 2); const keyboardState = KeyboardChatScrollView.useKeyboardState((height) => height.height); const callback = noop.useCallback((arg0) => { let name; if (arg0 != null) { if (arg0.routes[arg0.index] != null) { name = tmp3.name; } } if (name == null) { name = null; } require(name); closure_1(false); }, []); const obj3 = { backgroundImageSource: null, backgroundImageCover: true }; const tmp15 = closure_11; const tmp16 = closure_10; obj3.backgroundImageSource = _mod16067; const children = [closure_9(BackgroundImageDefault, obj3), ]; if (tmp5) { const obj5 = { value: tmp11, children: null }; const items1 = [tmp6.wideOuterContainer, ]; let tmp24 = null; if (tmp13) { const obj6 = { paddingBottom: keyboardState }; tmp24 = obj6; } const obj7 = { style: null, children: null }; items1[1] = tmp24; obj7.style = items1; const items2 = [tmp6.wideCard, , ]; let tmp25 = null; if (null != tmp8) { let num = obj[tmp8]; if (num == null) { num = 520; } const obj8 = { height: num }; tmp25 = obj8; } items2[1] = tmp25; let obj9 = null; if (tmp13) { obj9 = { maxHeight: "100%", height: "100%", marginTop: 32, borderBottomLeftRadius: 0, borderBottomRightRadius: 0 }; } const obj10 = { style: null, children: null }; items2[2] = obj9; obj10.style = items2; const obj11 = { screens, containerStyle: tmp6.cardContainer, viewStyle: null, headerStatusBarHeight: 0, cardOverlayEnabled: false, cardShadowEnabled: false, initialRouteStack: null, onWillFocus: null, onStateChange: null, headerStyle: null, headerLeftContainerStyle: null, disableHeaderAnimation: true }; let transparent = null; if (tmp8 === AuthStates.WELCOME) { transparent = tmp6.transparent; } obj11.viewStyle = transparent; obj11.initialRouteStack = first; obj11.onWillFocus = closure_5.dismiss; obj11.onStateChange = callback; obj11.headerStyle = tmp10[0] ? tmp6.wideHeader : tmp6.wideHeaderFlat; let num2 = 20; if (tmpResult.isAndroid()) { num2 = tmp4(576).space.PX_12; } const obj12 = { paddingLeft: num2, paddingTop: tmp4(576).space.PX_24, paddingBottom: tmp4(576).space.PX_16 }; obj11.headerLeftContainerStyle = obj12; obj10.children = tmp17(tmp(7074).Navigator, obj11); obj7.children = tmp17(closure_6, obj10); obj5.children = tmp17(closure_6, obj7); let tmp17Result = tmp17(tmp(7045).WideAuthScrollContext.Provider, obj5); tmpResult = tmp(1116); } else { const obj13 = { screens: RegistrationStepsUtils, viewStyle: null, containerStyle: null, headerBackTitle: null, initialRouteStack: null, onWillFocus: null, headerStyle: null }; ({ transparent: obj4.viewStyle, transparent: obj4.containerStyle } = tmp6); const intl = tmp(1114).intl; obj13.headerBackTitle = intl.string(tmp(1114).t["13/7kX"]); obj13.initialRouteStack = first; obj13.onWillFocus = closure_5.dismiss; obj13.headerStyle = { borderBottomWidth: 0 }; tmp17Result = tmp17(tmp(7074).Navigator, obj13); } children[1] = tmp17Result; return tmp15(tmp16, { children }); } get_ActivityIndicator = fn(17); ({ Keyboard: hasOwnProperty, View: metroRequire, StyleSheet } = get_ActivityIndicator); const AuthStates = fn(1074).AuthStates; const jsxProd = fn(21); ({ jsx: closure_9, Fragment: c10, jsxs: closure_11 } = jsxProd); let RegistrationStepsUtils = fn(16016); RegistrationStepsUtils = RegistrationStepsUtils.getAllAuthScreens(); RegistrationStepsUtils = Object.entries(RegistrationStepsUtils); const screens = Object.fromEntries(RegistrationStepsUtils.map((item) => { [tmp, tmp2] = item; const items = [tmp, ]; obj = {}; let merged = Object.assign(tmp2); obj.headerMode = "screen"; let obj2 = null; if (tmp2.fullscreen) { obj2 = { fullscreen: false, headerTransparent: false }; } let merged1 = Object.assign(obj2); let tmp6 = null; if (tmp !== AuthStates.MFA) { tmp6 = null; if (tmp !== tmp5.WELCOME) { let obj3 = { headerLeft(arg0) { function backImage() { return closure_1_9(headerLeft(closure_1_2[8]).HeaderBackImage, {}); } if (null != headerLeft.headerLeft) { const obj2 = {}; const merged = Object.assign(arg0); obj2.backImage = backImage; let headerLeftResult = headerLeft.headerLeft(obj2); } else { const obj3 = {}; const merged1 = Object.assign(arg0); obj3.backImage = backImage; headerLeftResult = React7(RegistrationUtils.BackButtonWithTracking, obj3); } return headerLeftResult; } }; tmp6 = obj3; } } const merged2 = Object.assign(tmp6); const items1 = [, , ]; ({ REGISTER_IDENTITY: arr2[0], LOGIN: arr2[1], AGE_GATE_UNDERAGE: arr2[2] } = AuthStates); let tmp8 = null; if (set.has(tmp)) { const obj4 = { cardStyleInterpolator: StackNavigator.CardStyleInterpolators.forFadeFromCenter }; tmp8 = obj4; } const merged3 = Object.assign(tmp8); items[1] = obj; return items; })); let num = 540; if (fn(7023).hasWebAuthn) { num = 600; } let obj = {}; obj[AuthStates.LOGIN] = num; obj[AuthStates.MFA] = 600; const createStyles = fn(4607); let obj3 = { transparent: { backgroundColor: "transparent" }, cardContainer: { flex: 1, position: "relative", backgroundColor: "transparent" }, wideOuterContainer: { flex: 1, justifyContent: "center" }, wideCard: null, wideHeaderFlat: null, wideHeader: null }; let size = { backgroundColor: "transparent", borderRadius: nativeDefault.radii.lg, maxWidth: 600, alignSelf: "center", width: "100%", maxHeight: "90%", overflow: "hidden", height: 520 }; obj3.wideCard = size; obj3.wideHeaderFlat = { borderBottomWidth: 0, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW }; let obj5 = { borderBottomWidth: 0, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW }; obj3.wideHeader = { borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: nativeDefault.colors.BORDER_SUBTLE, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW }; let closure_16 = createStyles.createStyles(obj3); const context = noop.createContext(() => { }); let obj6 = { borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: nativeDefault.colors.BORDER_SUBTLE, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW }; size = fn(2); let result = size.fileFinishedImporting("modules/auth/native/components/Auth.tsx"); export default noop.memo(function Auth() { const effect = noop.useEffect(() => { AuthManagerDefault.initialize(); return () => closure_1_1(dependencyMap[23]).terminate(); }, []); const layoutEffect = noop.useLayoutEffect(() => closure_0(7549).trackAppUIViewed(), []); useOrientationLockDefault(); closure_0 = noop.useRef(undefined); return closure_9(context.Provider, { value: noop.useCallback(() => RegistrationUtils.getTrackRegTransition(closure_0), [])(), children: closure_9(NavigatorWithCaptchaHook, {}) }); }); export const TrackRegistrationContext = context;