/* Metro module 6508; source: unknown; dependencies: [57, 31, 33, 6509, 1610, 6282, 5321, 6510] */ function _fun51210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:6, offset: 0x0122bae3, size: 259 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; let value = require(31) /* metro dependency 31 */; const memo = value.memo; const env0_4 = value.useCallback; const env0_5 = value.useEffect; const env0_6 = value.useMemo; const env0_7 = value.useRef; const env0_8 = value.useState; importDefault(31) /* metro dependency 31 */; const env0_9 = (require(33) /* metro dependency 33 */).jsx; object = {code: 'function pnpm_BottomSheetBackdropTsx1(){const{runOnJS,handleOnPress}=this.__closure;runOnJS(handleOnPress)();}'}; object = {code: 'function pnpm_BottomSheetBackdropTsx2(){const{interpolate,animatedIndex,disappearsOnIndex,appearsOnIndex,opacity,Extrapolation}=this.__closure;return{opacity:interpolate(animatedIndex.value,[-1,disappearsOnIndex,appearsOnIndex],[0,0,opacity],Extrapolation.CLAMP)};}'}; object = {code: 'function pnpm_BottomSheetBackdropTsx3(){const{animatedIndex,disappearsOnIndex}=this.__closure;return animatedIndex.value<=disappearsOnIndex;}'}; object = {code: 'function pnpm_BottomSheetBackdropTsx4(shouldDisableTouchability,previous){const{runOnJS,handleContainerTouchability}=this.__closure;if(shouldDisableTouchability===previous){return;}runOnJS(handleContainerTouchability)(shouldDisableTouchability);}'}; value = memo(BottomSheetBackdropComponent); value.displayName = 'BottomSheetBackdrop'; exports.BottomSheetBackdrop = value; } function BottomSheetBackdropComponent({animatedIndex, opacity, appearsOnIndex, disappearsOnIndex, enableTouchThrough, pressBehavior, onPress, style, children, ViewComponent, accessible, accessibilityRole, accessibilityLabel, accessibilityHint}) { // fn#51211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:1030, offset: 0x0122bbe6, size: 1169 bytes, params: 2, frame: 38 var object2; const r3 = pressBehavior !== undefined ? pressBehavior : (require(6509) /* metro dependency 6509 */).DEFAULT_PRESS_BEHAVIOR; const env0_3 = style; const r5 = ViewComponent !== undefined ? ViewComponent : (importDefault(1610) /* metro dependency 1610 */).View; const r13 = accessible !== undefined ? accessible : (require(6509) /* metro dependency 6509 */).DEFAULT_ACCESSIBLE; const r12 = accessibilityRole !== undefined ? accessibilityRole : (require(6509) /* metro dependency 6509 */).DEFAULT_ACCESSIBILITY_ROLE; const r10 = accessibilityLabel !== undefined ? accessibilityLabel : (require(6509) /* metro dependency 6509 */).DEFAULT_ACCESSIBILITY_LABEL; let r8 = accessibilityHint !== undefined ? accessibilityHint : (require(6509) /* metro dependency 6509 */).DEFAULT_ACCESSIBILITY_HINT; const {snapToIndex, close} = (require(6282) /* metro dependency 6282 */).useBottomSheet(); const env0_6 = useRef(false); const r25 = opacity ?? (require(6509) /* metro dependency 6509 */).DEFAULT_OPACITY; const r26 = appearsOnIndex ?? (require(6509) /* metro dependency 6509 */).DEFAULT_APPEARS_ON_INDEX; const r19 = disappearsOnIndex ?? (require(6509) /* metro dependency 6509 */).DEFAULT_DISAPPEARS_ON_INDEX; const [property, env0_10] = env0_3(useState(enableTouchThrough ?? (require(6509) /* metro dependency 6509 */).DEFAULT_ENABLE_TOUCH_THROUGH ? 'none' : 'auto'), 2); const value14 = useCallback(_fun51212, [snapToIndex, close, r19, r3, onPress]); const env0_11 = value14; let closure = _fun51213; const value15 = useCallback(closure, []); const env0_12 = value15; const value16 = useMemo(_fun51214, [value14]); const moduleValue2 = require(1610) /* metro dependency 1610 */; const useAnimatedStyle = moduleValue2.useAnimatedStyle; closure = pnpm_BottomSheetBackdropTsx2; object2 = {interpolate: moduleValue2.interpolate, animatedIndex: animatedIndex, disappearsOnIndex: r19, appearsOnIndex: r26, opacity: r25}; const Extrapolation = moduleValue2.Extrapolation; object2.Extrapolation = Extrapolation; closure.__closure = object2; closure.__workletHash = 7085425846204; closure.__initData = env0_11; const value17 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure, [animatedIndex, r26, r19, r25]]); const env0_13 = value17; const value18 = useMemo(_fun51217, [style, value17]); const moduleValue3 = moduleValue2; const useAnimatedReaction = moduleValue3.useAnimatedReaction; closure = pnpm_BottomSheetBackdropTsx3; closure.__closure = {animatedIndex: animatedIndex, disappearsOnIndex: r19}; closure.__workletHash = 8948110613973; closure.__initData = env0_12; const closure2 = pnpm_BottomSheetBackdropTsx4; closure2.__closure = {runOnJS: moduleValue2.runOnJS, handleContainerTouchability: value15}; closure2.__workletHash = 17426135168622; closure2.__initData = env0_13; Reflect.apply(useAnimatedReaction, moduleValue3, [closure, closure2, [r19]]); useEffect(_fun51220, []); r8 = !r8 ? 'Tap to ' + (typeof r3 !== 'string' ? 'move' : r3) + ' the Bottom Sheet' : r8; const value21 = ((Component) => {children})(r5); if (r3 === 'none') { return value21; } else { const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector; return ( {value21} ); } } function _fun51212() { // fn#51212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:1884, offset: 0x0122c077, size: 110 bytes, params: 1, frame: 12 if (onPress != null) { onPress(); } if (env0_1 === 'close') { close(); } else if (env0_1 === 'collapse') { snapToIndex(env0_9); } else if (typeof env0_1 === 'number') { snapToIndex(env0_1); } } function _fun51213(a0) { // fn#51213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:1990, offset: 0x0122c0e5, size: 44 bytes, params: 2, frame: 11 if (env0_6.current) { env0_10(a0 ? 'none' : 'auto'); } } function _fun51214() { // fn#51214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:2044, offset: 0x0122c111, size: 128 bytes, params: 1, frame: 17 const Gesture = (require(5321) /* metro dependency 5321 */).Gesture; const value2 = Gesture.Tap(); const onEnd = value2.onEnd; const closure = pnpm_BottomSheetBackdropTsx1; const object2 = {}; object2.runOnJS = (require(1610) /* metro dependency 1610 */).runOnJS; object2.handleOnPress = env0_11; closure.__closure = object2; closure.__workletHash = 10704059633145; closure.__initData = env1_10; return Reflect.apply(onEnd, value2, [closure]); } function pnpm_BottomSheetBackdropTsx2() { // fn#51216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:2306, owner: BottomSheetBackdropComponent.pnpm_BottomSheetBackdropTsx2, offset: 0x0122c1c1, size: 136 bytes, params: 1, frame: 22 let value = environment.__proto__; value = require(1610) /* metro dependency 1610 */; const interpolate = value.interpolate; const value3 = animatedIndex.value; const items3 = [-1, env0_9, env0_8]; const binding = env0_7; const items2 = [0, 0]; items2[2] = binding; const Extrapolation = (require(1610) /* metro dependency 1610 */).Extrapolation; const CLAMP = Extrapolation.CLAMP; return {opacity: Reflect.apply(interpolate, value, [value3, items3, items2, CLAMP])}; } function _fun51217() { // fn#51217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:2646, offset: 0x0122c249, size: 66 bytes, params: 1, frame: 11 const styles = (require(6510) /* metro dependency 6510 */).styles; return [styles.backdrop, style, env0_13]; } function pnpm_BottomSheetBackdropTsx3() { // fn#51218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:2736, owner: BottomSheetBackdropComponent.pnpm_BottomSheetBackdropTsx3, offset: 0x0122c28b, size: 22 bytes, params: 1, frame: 2 return animatedIndex.value <= env0_9; } function pnpm_BottomSheetBackdropTsx4(a0, a1) { // fn#51219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:2896, owner: BottomSheetBackdropComponent.pnpm_BottomSheetBackdropTsx4, offset: 0x0122c2a1, size: 61 bytes, params: 3, frame: 13 var value; if (a0 !== a1) { value = environment.__proto__; value = require(1610) /* metro dependency 1610 */; value.runOnJS(env0_12)(a0); } } function _fun51220() { // fn#51220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:3094, offset: 0x0122c2de, size: 24 bytes, params: 1, frame: 2 env0_6.current = true; return _fun51221; } function pnpm_BottomSheetBackdropTsx1() { // fn#51215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:2100, offset: 0x0122c191, size: 48 bytes, params: 1, frame: 12 let value = environment.__proto__.__proto__; value = require(1610) /* metro dependency 1610 */; value.runOnJS(env1_11)(); } function _fun51221() { // fn#51221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6686:3125, offset: 0x0122c2f6, size: 19 bytes, params: 1, frame: 2 env1_6.current = false; }