/* Metro module 11575; source: modules/app_launcher/native/AppLauncherKeyboard.tsx; dependencies: [31, 27, 661, 1376, 11576, 33, 4501, 697, 8775, 8774, 11577, 4559, 11578, 4017, 11587, 4508, 6277, 11588, 477, 4863, 1581, 1482, 1583, 4570, 11620, 8048, 11622, 2] */ import UseKeyboardActionSheetHeight from '../../action_sheet/native/useKeyboardActionSheetHeight.tsx'; /* Metro dependency 11577 */ import UseAppLauncherOnboardingContent from './onboarding/hooks/useAppLauncherOnboardingContent.tsx'; /* Metro dependency 11578 */ import CompleteAppLauncherOnboarding from './onboarding/utils/completeAppLauncherOnboarding.tsx'; /* Metro dependency 11587 */ import PortalKeyboardBottomSheet from '../../keyboard/native/PortalKeyboardBottomSheet.tsx'; /* Metro dependency 11620 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */ import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as UseIsScreenReaderEnabledNativeModule from '../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */ import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */ import * as AppLauncherContextModule from './AppLauncherContext.tsx'; /* Metro dependency 8774 */ import * as UseDefaultAppLauncherWidthModule from './hooks/useDefaultAppLauncherWidth.tsx'; /* Metro dependency 8775 */ import * as PortalKeyboardConstantsModule from '../../keyboard/native/PortalKeyboardConstants.tsx'; /* Metro dependency 11576 */ function _fun88634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:6, offset: 0x01feca61, size: 579 bytes, params: 8, frame: 24 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const createStyles = CreateStylesModule.createStyles; object = {}; const object2 = {}; object2.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object2.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object.onboardingRoundingView = object2; const object3 = {'borderWidth': 2, 'borderBottomWidth': 0, 'borderColor': null, 'borderBottomColor': 'transparent'}; let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND; object3.borderColor = BACKGROUND_BRAND; object3.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object3.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object.onboardingHeader = object3; const object4 = {borderWidth: 2}; BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND; object4.borderColor = BACKGROUND_BRAND; object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object.onboardingNavigatorContent = object4; const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object]); object = {code: 'function AppLauncherKeyboardTsx1(){const{bottomSheetIndex}=this.__closure;return bottomSheetIndex.get();}'}; object = {code: 'function AppLauncherKeyboardTsx2(i,prev){const{runOnJS,handleOnboardingParamChange,showOnboarding}=this.__closure;if(i===prev)return;runOnJS(handleOnboardingParamChange)(i,showOnboarding);}'}; value = value.memo(AppLauncherKeyboard); (FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/AppLauncherKeyboard.tsx'); exports.default = value; exports.setAppLauncherA11yFocusReturnRef = function(a0) { env0_12 = a0; }; function AppLauncherKeyboard({context, chatInputRef, onClose, transitionState, entrypoint}) { // fn#88635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:1101, offset: 0x01fecca4, size: 1139 bytes, params: 2, frame: 41 const transitionState2 = transitionState; const value2 = (UseDefaultAppLauncherWidthModule).useDefaultAppLauncherWidth(entrypoint); const binding = transitionState2; let useRef = binding.useRef; const AppLauncherKeyboardCloseReason = (AppLauncherContextModule).AppLauncherKeyboardCloseReason; const DISMISSED = AppLauncherKeyboardCloseReason.DISMISSED; const value3 = Reflect.apply(useRef, binding, [DISMISSED]); const value4 = binding.useRef(undefined); const styles = useStyles(); const {maximum, minimum} = (UseKeyboardActionSheetHeight)(); useRef = binding.useRef; const Date = global.Date; const env0_7 = Reflect.apply(useRef, binding, [Date.now()]); const env0_8 = binding.useRef(false); const value6 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled(); const visibleContent = (UseAppLauncherOnboardingContent)({channelId: context.channel.id}).visibleContent; const value7 = visibleContent != null; const value8 = (ReanimatedRexportModule).useSharedValue(-1); const value9 = (ReanimatedRexportModule).useSharedValue(0); const value10 = binding.useRef(null); const env0_13 = value10; const value11 = binding.useCallback(_fun88636, [value10]); let closure = _fun88637; const value12 = binding.useCallback(closure, []); const env0_14 = value12; binding.useEffect(_fun88638, [value7, value8, value12]); const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; closure = AppLauncherKeyboardO; closure.__closure = {bottomSheetIndex: value8}; closure.__workletHash = 15587451723262; closure.__initData = env0_13; const AppLauncherKeyboard_2 = AppLauncherKeyboard_; AppLauncherKeyboard_2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, handleOnboardingParamChange: value12, showOnboarding: value7}; AppLauncherKeyboard_2.__workletHash = 14003176039781; AppLauncherKeyboard_2.__initData = env0_14; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, AppLauncherKeyboard_2]); binding.useLayoutEffect(function() { if (transitionState === require(dependencyMap[15]).TransitionStates.YEETED) { importDefault(dependencyMap[14])(ContentDismissActionType.USER_DISMISS); } }, [transitionState]); const value13 = binding.useCallback(_fun88642, [visibleContent, context, minimum, value7]); const value14 = binding.useCallback(_fun88643, [value4]); const value15 = binding.useCallback(_fun88644, [chatInputRef, value6, value3, onClose]); const defaultImport2Props = {ref: value10, animationConfigs: KEYBOARD_ANIMATION_CONFIG, animatedIndex: value8, animatedPosition: value9, chatInputRef: chatInputRef, forceMaxHeight: value6 || (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest(), enablePanDownToClose: (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest(), onAnimate: value14, onClose: value15, transitionState: transitionState, backdropComponent: value13, disableHeaderRoundingAnimation: value7 || entrypoint === (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint.VOICE, roundingViewStyle: value7 && styles.onboardingRoundingView, headerStyle: value7 && styles.onboardingHeader, isAppsKeyboard: true}; const AppLauncherEntrypoint = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint; const VOICE = AppLauncherEntrypoint.VOICE; defaultImport2Props.rendersHandle = entrypoint !== VOICE; defaultImport2Props.width = value2; return ( {((Component) => )(importDefault(11622) /* metro dependency 11622: AppLauncherNavigator */)} ); function _fun88636() { // fn#88636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:1603, offset: 0x01fed117, size: 51 bytes, params: 1, frame: 13 var r1; var r2; var current; const value2 = env0_13 == null; const value3 = undefined; if (value2) { r1 = value2; r2 = value3; } else { current = env0_13.current; r1 = current == null; r2 = current; } if (!r1) { r2.expandActionSheet(); } return value3; } function _fun88637(a0, a1) { // fn#88637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:1690, offset: 0x01fed14a, size: 63 bytes, params: 3, frame: 12 let value = a1; if (value && a0 === 1) { value = environment.__proto__; (importDefault(11587) /* metro dependency 11587: completeAppLauncherOnboarding */)(ContentDismissActionType.TAKE_ACTION); } } function _fun88638() { // fn#88638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:1752, offset: 0x01fed189, size: 34 bytes, params: 1, frame: 13 env0_14(env0_12.get(), result); } function AppLauncherKeyboardO() { // fn#88639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:1814, owner: AppLauncherKeyboard.O, offset: 0x01d3a4dc, size: 18 bytes, params: 1, frame: 9 return env0_12.get(); } function AppLauncherKeyboard_(a0, a1) { // fn#88640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:1910, owner: AppLauncherKeyboard._, offset: 0x01fed1ab, size: 66 bytes, params: 3, frame: 15 var value; if (a0 !== a1) { value = environment.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(env0_14); value(a0, result); } } function _fun88642(a0) { // fn#88642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:2207, offset: 0x01fed242, size: 199 bytes, params: 2, frame: 22 var r5; var AppLauncherOnboardingLayer; let value = environment.__proto__; const jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9; const BottomSheetBackdrop = (Module06277Module).BottomSheetBackdrop; const bottomSheetBackdrop = ; const resultBinding = result; if (resultBinding) { AppLauncherOnboardingLayer = importDefault(11588) /* metro dependency 11588: AppLauncherOnboardingLayer */; var defaultImportProps = {context: context, visibleContent: visibleContent}; value = require(477) /* metro dependency 477: PlatformUtils */; value = value.isAndroid(); defaultImportProps.bottomOffset = value ? 0 : minimum; value = ; r5 = value; } else { r5 = resultBinding; } return ( <> {bottomSheetBackdrop} {r5} ); } function _fun88643(a0, a1, a2) { // fn#88643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:2404, offset: 0x01fed309, size: 316 bytes, params: 4, frame: 15 var r5; var value; const ANIMATION_SOURCE = (Module06277Module).ANIMATION_SOURCE; const AppLauncherBottomSheetExpandReason = (AppLauncherContextModule).AppLauncherBottomSheetExpandReason; var moduleValue; if (a0 !== 1) { if (a1 === 1) { value = environment.__proto__; r5 = a2 === ANIMATION_SOURCE.KEYBOARD ? AppLauncherBottomSheetExpandReason.KEYBOARD : a2 === ANIMATION_SOURCE.GESTURE ? AppLauncherBottomSheetExpandReason.GESTURE : a2 !== ANIMATION_SOURCE.USER ? AppLauncherBottomSheetExpandReason.OTHER : ConstantsModule.AnalyticEvents.current; moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */; moduleValue.trackWithMetadata(AnalyticEvents.APP_LAUNCHER_EXPANDED, {reason: r5}); ConstantsModule.AnalyticEvents.current = undefined; } } } function _fun88644() { // fn#88644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11761:2816, offset: 0x01fed445, size: 379 bytes, params: 1, frame: 18 var value2; var moduleValue; var trackWithMetadata; var APP_LAUNCHER_CLOSED; var object; var value3; var setKeyboardType; var binding; var value; let current = env0_8.current; if (!current) { value2 = environment.__proto__; moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */; trackWithMetadata = moduleValue.trackWithMetadata; APP_LAUNCHER_CLOSED = AnalyticEvents.APP_LAUNCHER_CLOSED; object = {}; value3 = global.Date.now(); current = env0_7.current; object.time_spent = value3 - current; current = ReactNativeModule.View.current; object.reason = current; Reflect.apply(trackWithMetadata, moduleValue, [APP_LAUNCHER_CLOSED, object]); } env0_8.current = true; const value5 = undefined; const defaultImport = CompleteAppLauncherOnboarding; const USER_DISMISS = ContentDismissActionType.USER_DISMISS; defaultImport(USER_DISMISS); if (onClose != null) { onClose(); } if (MetaQuestUtilsAndroidModule.isMetaQuest()) { current = chatInputRef.current; if (current != null) { current.closeCustomKeyboard(); } } if (JsxRuntimeModule.Fragment) { value = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */; setKeyboardType = value.setKeyboardType; object = {}; object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM; Reflect.apply(setKeyboardType, value, [object]); binding = env1_12; if ((binding == null ? value5 : binding.current) != null) { value = require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */; value.setAccessibilityFocus({ref: env1_12}); } } return value5; } } } global.__d(_fun88634, 11575, [31, 27, 661, 1376, 11576, 33, 4501, 697, 8775, 8774, 11577, 4559, 11578, 4017, 11587, 4508, 6277, 11588, 477, 4863, 1581, 1482, 1583, 4570, 11620, 8048, 11622, 2]) /* metro module 11575, dependencies: [31, 27, 661, 1376, 11576, 33, 4501, 697, 8775, 8774, 11577, 4559, 11578, 4017, 11587, 4508, 6277, 11588, 477, 4863, 1581, 1482, 1583, 4570, 11620, 8048, 11622, 2] */;