/* Metro module 15445; source: modules/voice_panel/native/VoicePanelUI.tsx; dependencies: [57, 31, 27, 4606, 9559, 7710, 11795, 11793, 4299, 11796, 33, 3, 4577, 4501, 697, 4017, 1581, 11794, 1585, 5321, 7739, 11282, 15446, 4081, 15439, 3860, 11799, 10734, 15444, 15432, 11624, 10684, 4827, 8141, 12991, 6771, 6789, 690, 15447, 6517, 15448, 15449, 8088, 15450, 15452, 15483, 15511, 15513, 15562, 2] */ import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */ import VoicePanelStore from '../VoicePanelStore.tsx'; /* Metro dependency 7710 */ import ReanimatedNativeView2 from '../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */ import AppFreezeStore from '../../panels/morphable/AppFreezeStore.tsx'; /* Metro dependency 9559 */ import UpdateSharedValueIfChangedNative from '../../reanimated/utils/updateSharedValueIfChanged.native.tsx'; /* Metro dependency 11282 */ import VoicePanelStateContext from './VoicePanelStateContext.tsx'; /* Metro dependency 11794 */ import CalculateVoicePanelHeaderSpecs from './header/calculateVoicePanelHeaderSpecs.tsx'; /* Metro dependency 11799 */ import UseControlsLock from './controls/useControlsLock.tsx'; /* Metro dependency 15447 */ 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 ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */ import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */ import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */ import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */ import * as Module05321Module from '../../../by-id/module-05321.js'; /* Metro dependency 5321 */ import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */ import * as CheapWorkletShallowEqualModule from '../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */ import * as UseGlobalStatusIndicatorStateModule from '../../connectivity/native/useGlobalStatusIndicatorState.tsx'; /* Metro dependency 10734 */ import * as VoicePanelControlsConstantsModule from './controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */ import * as VoicePanelConstantsModule from '../VoicePanelConstants.tsx'; /* Metro dependency 11795 */ import * as MorphablePanelConstantsModule from '../../panels/morphable/native/MorphablePanelConstants.tsx'; /* Metro dependency 11796 */ import * as AccessibilityPreferencesSharedValueModule from '../../a11y/native/AccessibilityPreferencesSharedValue.tsx'; /* Metro dependency 12991 */ import * as PanelSizeUtilsModule from './utils/PanelSizeUtils.tsx'; /* Metro dependency 15432 */ import * as VoicePanelPIPStateContextModule from './pip/VoicePanelPIPStateContext.tsx'; /* Metro dependency 15444 */ function _fun118171(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:6, offset: 0x024ce88a, size: 1558 bytes, params: 8, frame: 29 const env0_0 = require; const NOOP_118172 = function() { }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const StyleSheet = ReactNativeModule.StyleSheet; const ScrollView = ReactNativeModule.ScrollView; const DEFAULT_BORDER_RADIUS = VoicePanelConstantsModule.DEFAULT_BORDER_RADIUS; const DRAWER_SPRING_PHYSICS = VoicePanelConstantsModule.DRAWER_SPRING_PHYSICS; const MODE_CHANGE_PHYSICS = VoicePanelConstantsModule.MODE_CHANGE_PHYSICS; const LAYOUT_PHYSICS = VoicePanelConstantsModule.LAYOUT_PHYSICS; const value7 = new (Logger)('VoicePanelUI'); object = {code: "function layoutTransition_VoicePanelUITsx1(values){const{withSpring,LAYOUT_PHYSICS}=this.__closure;return{animations:{originX:withSpring(values.targetOriginX,LAYOUT_PHYSICS,'animate-always'),originY:withSpring(values.targetOriginY,LAYOUT_PHYSICS,'animate-always'),width:withSpring(values.targetWidth,LAYOUT_PHYSICS,'animate-always'),height:withSpring(values.targetHeight,LAYOUT_PHYSICS,'animate-always')},initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight}};}"}; const env0_25 = _fun118188(); object = {}; copyDataProperties(object, LAYOUT_PHYSICS, undefined); object['damping'] = 0; object = {code: "function scrollViewLayoutTransition_VoicePanelUITsx2(values){const{withSpring,LAYOUT_PHYSICS,EMBEDDED_ACTIVITY_ORIENTATION_UPDATE_SAFE_LAYOUT_PHYSICS}=this.__closure;return{animations:{originX:withSpring(values.targetOriginX,LAYOUT_PHYSICS,'animate-always'),originY:withSpring(values.targetOriginY,LAYOUT_PHYSICS,'animate-always'),width:withSpring(values.targetWidth,EMBEDDED_ACTIVITY_ORIENTATION_UPDATE_SAFE_LAYOUT_PHYSICS,'animate-always'),height:withSpring(values.targetHeight,EMBEDDED_ACTIVITY_ORIENTATION_UPDATE_SAFE_LAYOUT_PHYSICS,'animate-always')},initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight}};}"}; const env0_28 = _fun118190(); object = {}; copyDataProperties(object, DRAWER_SPRING_PHYSICS, undefined); object['mass'] = 0.3; object['damping'] = 100; object['stiffness'] = 100; object = {}; copyDataProperties(object, MODE_CHANGE_PHYSICS, undefined); object['mass'] = 2; const env0_30 = {code: 'function computeViewableChunksFromScrollPosition_VoicePanelUITsx3(scrollPosition,windowHeight,contentHeight,extraChunks=1){const{VOICE_PANEL_CHUNK_DIVISOR}=this.__closure;const chunkSize=Math.ceil(windowHeight/VOICE_PANEL_CHUNK_DIVISOR);let start=Math.max(Math.floor(scrollPosition/chunkSize)-extraChunks,0);const end=Math.min(start+VOICE_PANEL_CHUNK_DIVISOR+extraChunks*2,Math.ceil(contentHeight/chunkSize));start=Math.max(end-VOICE_PANEL_CHUNK_DIVISOR-extraChunks*2,0);return{start:start,end:end};}'}; const env0_31 = _fun118192(); const createStyles = CreateStylesModule.createStyles; const object3 = {}; const object4 = {}; copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined); object4['overflow'] = 'hidden'; object3.accessibilityView = object4; const object5 = {}; copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined); object5['alignItems'] = 'flex-start'; object5['zIndex'] = 1; object3.wrapper = object5; const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER; object3.maskDefaultBackground = {backgroundColor: BACKGROUND_BASE_LOWER}; const object7 = {}; copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined); object7['borderTopLeftRadius'] = DEFAULT_BORDER_RADIUS; object7['borderTopRightRadius'] = DEFAULT_BORDER_RADIUS; object3.scrollView = object7; object3.scrollViewContent = {'flexGrow': 1, 'flexShrink': 0}; const MOBILE_BACKGROUND_SCRIM_OPAQUE = (Native).colors.MOBILE_BACKGROUND_SCRIM_OPAQUE; object3.shade = {backgroundColor: MOBILE_BACKGROUND_SCRIM_OPAQUE, zIndex: 0}; object3.shadePressable = {flexGrow: 1}; const env0_32 = Reflect.apply(createStyles, CreateStylesModule, [object3]); const env0_33 = (ReanimatedRexport).createAnimatedComponent(ScrollView); const env0_34 = (MetaQuestUtilsAndroidModule).isMetaQuest(); const env0_35 = {code: 'function VoicePanelUITsx4(){const{gestureState,connected,mode}=this.__closure;return{gestureActive:gestureState.get().active,connected:connected.get(),mode:mode.get()};}'}; const env0_36 = {code: 'function VoicePanelUITsx5(props,previous){const{cheapWorkletShallowEqual,VoicePanelModes,runOnJS,setPanelFullscreen,setPanelOpen,setPanelPIP}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{gestureActive:gestureActive,connected:connected,mode:mode}=props;if(!connected||gestureActive||mode!==VoicePanelModes.PANEL){runOnJS(setPanelFullscreen)(false);}else{runOnJS(setPanelFullscreen)(true);}if(mode===VoicePanelModes.PANEL){runOnJS(setPanelOpen)(true);}else{runOnJS(setPanelOpen)(false);}if(mode===VoicePanelModes.PIP){runOnJS(setPanelPIP)(true);}else{runOnJS(setPanelPIP)(false);}}'}; const env0_37 = {code: 'function VoicePanelUITsx6(){const{mode,VoicePanelModes,focused}=this.__closure;var _focused$get;return mode.get()===VoicePanelModes.PANEL?(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id:undefined;}'}; const env0_38 = {code: 'function VoicePanelUITsx7(manualId,previousManualId){const{runOnJS,handleFocusChange}=this.__closure;if(manualId!==previousManualId){runOnJS(handleFocusChange)(manualId);}}'}; const env0_39 = {code: 'function VoicePanelUITsx8(){const{connected,mode,VoicePanelModes,controlsSpecs,VoicePanelControlsModes,runOnJS,showControls,hideControls}=this.__closure;if(!connected.get())return;if(mode.get()===VoicePanelModes.PIP){}else if(controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN){runOnJS(showControls)({debounce:true});}else{runOnJS(hideControls)({debounce:true});}}'}; const env0_40 = {code: 'function VoicePanelUITsx9(){const{updateSharedValueIfChanged,gestureState}=this.__closure;updateSharedValueIfChanged(gestureState,{cancel:false,active:false});}'}; const env0_41 = {code: 'function VoicePanelUITsx10(event){const{gestureState,mode,VoicePanelModes,calculatePIPPositionFromVelocity,windowDimensions,safeArea,updateSharedValueIfChanged,wrapperDimensions,wrapperOffset,connected,runOnJS,setMode,lockScrolling,MIN_DISMISS_MOVE_PERCENTAGE,dismissPanel}=this.__closure;if(gestureState.get().cancel)return;const{velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY}=event;if(mode.get()===VoicePanelModes.PIP){const{pipX:pipX,pipY:pipY}=calculatePIPPositionFromVelocity({velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY,windowDimensions:windowDimensions.get(),safeArea:safeArea.get()});updateSharedValueIfChanged(wrapperDimensions,{pipX:pipX,pipY:pipY});updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});}else if(mode.get()===VoicePanelModes.PANEL){if(velocityY>0){if(connected.get()){if(!gestureState.get().requiresPop){runOnJS(setMode)(VoicePanelModes.PIP);updateSharedValueIfChanged(wrapperOffset,{gestureActive:false,x:0,y:0});}else{updateSharedValueIfChanged(wrapperOffset,{gestureActive:false,x:0,y:0});lockScrolling.set(false);}}else{const panelHeight=wrapperDimensions.get().drawerHeight-wrapperDimensions.get().drawerY;const dismissThreshold=panelHeight*MIN_DISMISS_MOVE_PERCENTAGE;if(wrapperOffset.get().y>dismissThreshold){updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});runOnJS(dismissPanel)();return;}else{updateSharedValueIfChanged(wrapperOffset,{gestureActive:false,x:0,y:0});lockScrolling.set(false);}}}else{updateSharedValueIfChanged(wrapperOffset,{gestureActive:false,x:0,y:0});lockScrolling.set(false);}}}'}; const env0_42 = {code: "function VoicePanelUITsx11(_e){const{lockScrolling,updateSharedValueIfChanged,gestureState,wrapperOffset}=this.__closure;lockScrolling.set(false);updateSharedValueIfChanged(gestureState,{cancel:false,active:false});updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});console.log('onTouchesCancelled');}"}; const env0_43 = {code: 'function VoicePanelUITsx12(event){const{gestureState,mode,VoicePanelModes,connected,lockScrolling,scrollPosition,POP_RESISTANCE,PIP_POP_HEIGHT,runOnJS,triggerHapticFeedback,HapticFeedbackTypes,updateSharedValueIfChanged,wrapperOffset}=this.__closure;if(gestureState.get().cancel)return;if(mode.get()!==VoicePanelModes.PIP){const minYOffset=0;let newYOffset=(gestureState.get().absoluteYStart-event.absoluteY)*-1;if(connected.get()&&!gestureState.get().requiresPop&&newYOffset<=minYOffset){gestureState.set({...gestureState.get(),requiresPop:true});}if(lockScrolling.get()&&newYOffset=Math.abs(yDiff)||yDiff>0;let startGesture=false;if(mode.get()===VoicePanelModes.PANEL){var _focused$get;const scrollPos=Math.floor(scrollPosition.get());if(yDiff<0&&scrollPos<=0){if(isQuest){startGesture=absoluteMovement>MIN_GESTURE_MOVE;}else{startGesture=true;}}else if(((_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id)!=null&&isNotPullDownGesture){manager.fail();}}else if(mode.get()===VoicePanelModes.PIP&&absoluteMovement>MIN_GESTURE_MOVE){startGesture=true;runOnJS(triggerIOSHaptic)();}if(startGesture){updateSharedValueIfChanged(wrapperOffset,{gestureActive:true});gestureState.set({absoluteXStart:absoluteX,absoluteYStart:absoluteY+scrollPosition.get(),cancel:false,active:true,requiresPop:gestureState.get().requiresPop});lockScrolling.set(true);manager.activate();}else{updateSharedValueIfChanged(gestureState,{absoluteYStart:absoluteY,absoluteXStart:absoluteX});}}'}; const env0_45 = {code: 'function VoicePanelUITsx14(event){const{gestureState,updateSharedValueIfChanged,wrapperOffset,connected,mode,VoicePanelModes}=this.__closure;if(gestureState.get().cancel)return;updateSharedValueIfChanged(wrapperOffset,{x:0,y:0});gestureState.set({absoluteXStart:event.absoluteX,absoluteYStart:event.absoluteY,active:false,cancel:false,requiresPop:connected.get()&&mode.get()===VoicePanelModes.PANEL});}'}; const env0_46 = {code: 'function VoicePanelUITsx15(event,manager){const{IS_IOS,windowDimensions,safeArea,gestureState,isFocusedVideoZoomed,mode,VoicePanelModes,controlsSpecs,VoicePanelControlsModes}=this.__closure;const touch=event.allTouches[0];if(IS_IOS&&touch!=null&&touch.absoluteY>windowDimensions.get().height-safeArea.get().bottom){gestureState.set({...gestureState.get(),cancel:true});manager.activate();return;}if(isFocusedVideoZoomed.get()||mode.get()===VoicePanelModes.PANEL&&controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER){gestureState.set({...gestureState.get(),cancel:true});manager.fail();}}'}; const env0_47 = {code: 'function onBeginDrag_VoicePanelUITsx16(event){const{scrollPosition,dragScrolling}=this.__closure;scrollPosition.set(event.contentOffset.y);dragScrolling.set(true);}'}; const env0_48 = {code: 'function onEndDrag_VoicePanelUITsx17(){const{dragScrolling}=this.__closure;dragScrolling.set(false);}'}; const env0_49 = {code: 'function onMomentumEnd_VoicePanelUITsx18(){const{dragScrolling}=this.__closure;dragScrolling.set(false);}'}; const env0_50 = {code: 'function onScroll_VoicePanelUITsx19(event){const{lockScrolling,isSnappingBack,scrollPosition,scrollTo,scrollerRef,computeViewableChunksFromScrollPosition,windowDimensions,scrollableRegionSize,updateSharedValueIfChanged,viewableChunks}=this.__closure;if(lockScrolling.get()){if(isSnappingBack.get()){return;}if(scrollPosition.get()<0){scrollPosition.set(0);}const targetScrollPosition=scrollPosition.get();if(Math.abs(event.contentOffset.y-targetScrollPosition)<0.1){return;}isSnappingBack.set(true);scrollTo(scrollerRef,0,targetScrollPosition,false);isSnappingBack.set(false);}else{let newViewableChunks;if(scrollPosition.get()!==event.contentOffset.y){newViewableChunks=computeViewableChunksFromScrollPosition(scrollPosition.get(),windowDimensions.get().height,scrollableRegionSize.get());}scrollPosition.set(event.contentOffset.y);newViewableChunks!=null&&updateSharedValueIfChanged(viewableChunks,newViewableChunks);}}'}; const env0_51 = {code: 'function VoicePanelUITsx20(){const{mode}=this.__closure;return mode.get();}'}; const env0_52 = {code: 'function VoicePanelUITsx21(mode,previous){const{VoicePanelModes,lockScrolling}=this.__closure;if(previous==null||mode===previous)return;if(mode===VoicePanelModes.PANEL&&previous===VoicePanelModes.PIP){lockScrolling.set(false);}else if(mode===VoicePanelModes.PIP){lockScrolling.set(true);}}'}; const env0_53 = {code: "function VoicePanelUITsx22(){const{mode,VoicePanelModes,focused,lockScrolling,calculateVoicePanelHeaderSpecs,safeArea,edgeGutter}=this.__closure;const isPIPMode=mode.get()===VoicePanelModes.PIP;const disableScroll=isPIPMode||focused.get()!=null;return{pointerEvents:isPIPMode?'none':'auto',scrollEnabled:!disableScroll,showsVerticalScrollIndicator:lockScrolling.get()?false:!disableScroll,scrollIndicatorInsets:{top:calculateVoicePanelHeaderSpecs(safeArea.get(),edgeGutter).height-safeArea.get().top,bottom:safeArea.get().bottom}};}"}; const env0_54 = {code: 'function VoicePanelUITsx23(){const{mode,VoicePanelModes,connected,gestureState,wrapperDimensions,wrapperOffset,windowDimensions}=this.__closure;switch(mode.get()){case VoicePanelModes.PIP:case VoicePanelModes.DISMISSED:return 0;default:{if(connected.get()&&gestureState.get().active&&gestureState.get().requiresPop){return 1;}const drawerTop=wrapperDimensions.get().drawerY+(wrapperOffset.get().gestureActive?wrapperOffset.get().y:0);const screenSize=windowDimensions.get().height;const percentage=(screenSize-drawerTop)/screenSize;return Math.min(Math.max(percentage,0),1);}}}'}; const env0_55 = {code: 'function computeBorderRadii_VoicePanelUITsx24({mode:mode,connected:connected}){const{VoicePanelModes,DEFAULT_BORDER_RADIUS_PIP,DEFAULT_BORDER_RADIUS}=this.__closure;if(mode===VoicePanelModes.PIP){return DEFAULT_BORDER_RADIUS_PIP;}return!connected?DEFAULT_BORDER_RADIUS:0;}'}; const env0_56 = _fun118194(); const env0_57 = {code: 'function VoicePanelUITsx25(){const{controlsSpecs}=this.__closure;return controlsSpecs.get().height;}'}; const env0_58 = {code: 'function VoicePanelUITsx26(){const{mode,connected,windowDimensions,safeArea,focused,pipState,controlsHeight,preJoinContentSize,globalStatusIndicatorHeight}=this.__closure;return{modeToSet:mode.get(),connected:connected.get(),windowWidth:windowDimensions.get().width,windowHeight:windowDimensions.get().height,safeArea:safeArea.get(),focused:focused.get(),pipState:pipState,controlsHeight:controlsHeight.get(),preJoinContentSize:preJoinContentSize.get(),globalStatusIndicatorHeight:globalStatusIndicatorHeight};}'}; const env0_59 = {code: 'function VoicePanelUITsx27(props,previous){const{cheapWorkletShallowEqual,VoicePanelModes,wrapperDimensions,updateSharedValueIfChanged,wrapperOffset,getMaxPanelWidth,getPanelX,roundToNearestPixel,windowDimensions}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{modeToSet:modeToSet,connected:connected,windowWidth:windowWidth,windowHeight:windowHeight,safeArea:safeArea,pipState:pipState,controlsHeight:controlsHeight,preJoinContentSize:preJoinContentSize,globalStatusIndicatorHeight:globalStatusIndicatorHeight}=props;if(modeToSet===VoicePanelModes.PIP&&pipState.id==null){return;}const animated=previous!=null?windowHeight===previous.windowHeight&&windowWidth===previous.windowWidth&&safeArea.top===previous.safeArea.top&&safeArea.bottom===previous.safeArea.bottom&&safeArea.left===previous.safeArea.left&&safeArea.right===previous.safeArea.right:true;let{drawerX:drawerX,drawerY:drawerY}=wrapperDimensions.get();const availableHeight=windowHeight-globalStatusIndicatorHeight;if(modeToSet===VoicePanelModes.PANEL){if(connected){drawerX=0;drawerY=0;updateSharedValueIfChanged(wrapperDimensions,{drawerWidth:windowWidth,drawerHeight:availableHeight,drawerX:drawerX,drawerY:drawerY,animated:animated,mode:modeToSet});updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});}else{const drawerWidth=getMaxPanelWidth({windowWidth:windowWidth,connected:connected,safeAreaLeft:safeArea.left,safeAreaRight:safeArea.right});drawerX=getPanelX(windowWidth,drawerWidth);drawerY=roundToNearestPixel(Math.max(availableHeight-preJoinContentSize-controlsHeight-safeArea.bottom,availableHeight-0.8*availableHeight));updateSharedValueIfChanged(wrapperDimensions,{drawerWidth:drawerWidth,drawerHeight:availableHeight,drawerX:drawerX,drawerY:drawerY,animated:animated,mode:modeToSet});}}else if(modeToSet===VoicePanelModes.DISMISSED){if(connected){updateSharedValueIfChanged(wrapperDimensions,{mode:modeToSet});}else{updateSharedValueIfChanged(wrapperDimensions,{drawerY:windowDimensions.get().height+60,mode:modeToSet});}}}'}; const env0_60 = {code: "function VoicePanelUITsx28(){const{useReducedMotion,wrapperDimensions,wrapperOffset,connected,mode,VoicePanelModes,runOnJS,updateSourceTrackingView,withSpring,DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE,DRAWER_SIZE_PHYSICS}=this.__closure;const animateXY=!useReducedMotion.get()&&wrapperDimensions.get().animated||wrapperOffset.get().gestureActive;let{gestureActive:gestureActive}=wrapperOffset.get();let{drawerY:y,drawerX:x}=wrapperDimensions.get();gestureActive=gestureActive&&!connected.get();if(gestureActive){y+=Math.max(wrapperOffset.get().y,0);x+=wrapperOffset.get().x;}const updateSourceTrackingViewHelper=function(finished){if(finished&&mode.get()!==VoicePanelModes.DISMISSED){runOnJS(updateSourceTrackingView)();}};return{transform:[{translateX:withSpring(x,wrapperOffset.get().gestureActive?DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE:DRAWER_SIZE_PHYSICS,animateXY?'animate-always':'animate-never',updateSourceTrackingViewHelper)},{translateY:withSpring(y,wrapperOffset.get().gestureActive?DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE:DRAWER_SIZE_PHYSICS,animateXY?'animate-always':'animate-never',updateSourceTrackingViewHelper)}]};}"}; const env0_61 = {code: 'function VoicePanelUITsx29(finished){const{mode,VoicePanelModes,runOnJS,updateSourceTrackingView}=this.__closure;if(finished&&mode.get()!==VoicePanelModes.DISMISSED){runOnJS(updateSourceTrackingView)();}}'}; const env0_62 = {code: "function VoicePanelUITsx30(){const{computeBorderRadii,mode,connected,wrapperDimensions,withSpring,BORDER_RADIUS_PHYSICS,VoicePanelModes,styles}=this.__closure;const borderRadius=computeBorderRadii({mode:mode.get(),connected:connected.get()});return{width:wrapperDimensions.get().drawerWidth,height:wrapperDimensions.get().drawerHeight,borderRadius:withSpring(borderRadius,BORDER_RADIUS_PHYSICS),pointerEvents:mode.get()===VoicePanelModes.PANEL?'auto':'none',backgroundColor:connected.get()?'transparent':styles.maskDefaultBackground.backgroundColor};}"}; const env0_63 = {code: 'function VoicePanelUITsx31(){const{windowDimensions}=this.__closure;return windowDimensions.get();}'}; const env0_64 = {code: "function VoicePanelUITsx32(value){const{runOnJS,log}=this.__closure;runOnJS(log)('Window dimensions changed:',JSON.stringify(value));}"}; const env0_65 = {code: 'function VoicePanelUITsx33(){const{wrapperDimensions}=this.__closure;return wrapperDimensions.get();}'}; const env0_66 = {code: "function VoicePanelUITsx34(value){const{runOnJS,log}=this.__closure;runOnJS(log)('Wrapper dimensions changed:',JSON.stringify(value));}"}; const env0_67 = {'mass': 0.6, 'damping': 30, 'stiffness': 400, 'overshootClamping': true}; const env0_68 = {code: "function VoicePanelUITsx35(){const{withSpring,opacity,DrawerShadeOpacityPhysics,accessibilityPreferencesSharedValue}=this.__closure;return{opacity:withSpring(opacity.get(),DrawerShadeOpacityPhysics),display:accessibilityPreferencesSharedValue.get().screenReaderEnabled&&opacity.get()===0?'none':'flex',pointerEvents:opacity.get()===0?'none':'auto'};}"}; const env0_69 = value.memo(_fun118196); value = value.memo(VoicePanelUI); (FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/VoicePanelUI.tsx'); exports.default = value; exports.REDUCED_MOTION_OPACITY_PHYSICS = object; function log_118173(a0) { // fn#118173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:635, offset: 0x024ceea0, size: 49 bytes, params: 2, frame: 15 const value = copyRestArgs(0, undefined); const binding = env0_23; const log = binding.log; const items2 = []; arraySpread(items2, value, 0, undefined); apply(log, items2, binding, undefined); } function AnimatedWrapper({wrapperOffset, children}) { // fn#118174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:21054, offset: 0x024ceed1, size: 176 bytes, params: 2, frame: 24 const {wrapperRootStyles, wrapperTransformStyles, wrapperSurfaceStyles} = AnimatedWrapperUseWrapperStyles(wrapperOffset); return ((Component) => {((Component) => {((Component) => {children})(ReanimatedNativeView2)})(ReanimatedNativeView2)})(ReanimatedNativeView2); function AnimatedWrapperUseWrapperStyles(a0) { // fn#118175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:21115, owner: AnimatedWrapper.useWrapperStyles, offset: 0x024cef81, size: 1210 bytes, params: 2, frame: 34 var moduleValue7; var useWrapperStylesY2; var log_118173Binding; var moduleValue8; var useWrapperStylesT2; const env0_0 = a0; const useGlobalStatusIndicatorState = UseGlobalStatusIndicatorStateModule.useGlobalStatusIndicatorState; const height = Reflect.apply(useGlobalStatusIndicatorState, UseGlobalStatusIndicatorStateModule, []).height; const styles = useStyles(); const {wrapperDimensions, connected, controlsSpecs, focused, mode, preJoinContentSize, safeArea, windowDimensions, useReducedMotion} = env1_4.useContext(VoicePanelStateContext); const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useDerivedValue = reanimatedRexportModule.useDerivedValue; let closure = function() { return controlsSpecs.get().height; }; closure.__closure = {controlsSpecs: controlsSpecs}; closure.__workletHash = 6243014585347; closure.__initData = env1_57; const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]); const value4 = (VoicePanelPIPStateContextModule).usePIPState(); const moduleValue4 = reanimatedRexportModule; let useAnimatedReaction = moduleValue4.useAnimatedReaction; closure = useWrapperStylesL; closure.__closure = {mode: mode, connected: connected, windowDimensions: windowDimensions, safeArea: safeArea, focused: focused, pipState: value4, controlsHeight: value3, preJoinContentSize: preJoinContentSize, globalStatusIndicatorHeight: height}; closure.__workletHash = 4592460925374; closure.__initData = env1_58; const useWrapperStylesS2 = useWrapperStylesS; object = {}; object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual; object.VoicePanelModes = VoicePanelModes; object.wrapperDimensions = wrapperDimensions; object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; object.wrapperOffset = a0; const getMaxPanelWidth = (PanelSizeUtilsModule).getMaxPanelWidth; object.getMaxPanelWidth = getMaxPanelWidth; const getPanelX = (PanelSizeUtilsModule).getPanelX; object.getPanelX = getPanelX; object.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */; object.windowDimensions = windowDimensions; useWrapperStylesS2.__closure = object; useWrapperStylesS2.__workletHash = 3683279660781; useWrapperStylesS2.__initData = env1_59; Reflect.apply(useAnimatedReaction, moduleValue4, [closure, useWrapperStylesS2]); const moduleValue5 = reanimatedRexportModule; let useAnimatedStyle = moduleValue5.useAnimatedStyle; closure = useWrapperStylesC; object = {useReducedMotion: useReducedMotion, wrapperDimensions: wrapperDimensions, wrapperOffset: a0, connected: connected, mode: mode}; object.VoicePanelModes = VoicePanelModes; const runOnJS = reanimatedRexportModule.runOnJS; object.runOnJS = runOnJS; object.updateSourceTrackingView = (importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).updateSourceTrackingView; const withSpring = (SpringModule).withSpring; object.withSpring = withSpring; object.DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE = DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE; object.DRAWER_SIZE_PHYSICS = env1_29; closure.__closure = object; closure.__workletHash = 16361132737159; closure.__initData = env1_60; const value5 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]); const moduleValue6 = reanimatedRexportModule; useAnimatedStyle = moduleValue6.useAnimatedStyle; closure = useWrapperStylesM; closure.__closure = {computeBorderRadii: env1_56, mode: mode, connected: connected, wrapperDimensions: wrapperDimensions, withSpring: withSpring, BORDER_RADIUS_PHYSICS: BORDER_RADIUS_PHYSICS, VoicePanelModes: VoicePanelModes, styles: styles}; closure.__workletHash = 1768699814221; closure.__initData = env1_62; const value6 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]); if (!(require(4827) /* metro dependency 4827: ReleaseChannelUtilsNative */).isStable) { moduleValue7 = reanimatedRexportModule; useAnimatedReaction = moduleValue7.useAnimatedReaction; closure = function() { return windowDimensions.get(); }; closure.__closure = {windowDimensions: windowDimensions}; closure.__workletHash = 14100798624471; closure.__initData = env1_63; useWrapperStylesY2 = useWrapperStylesY; log_118173Binding = log_118173; useWrapperStylesY2.__closure = {runOnJS: runOnJS, log: log_118173Binding}; useWrapperStylesY2.__workletHash = 13929796154212; useWrapperStylesY2.__initData = env1_64; Reflect.apply(useAnimatedReaction, moduleValue7, [closure, useWrapperStylesY2]); moduleValue8 = require(4017) /* metro dependency 4017: ReanimatedRexport */; useAnimatedReaction = moduleValue8.useAnimatedReaction; closure = useWrapperStylesH; closure.__closure = {wrapperDimensions: wrapperDimensions}; closure.__workletHash = 14295147321429; closure.__initData = env1_65; useWrapperStylesT2 = useWrapperStylesT; useWrapperStylesT2.__closure = {runOnJS: runOnJS, log: log_118173Binding}; useWrapperStylesT2.__workletHash = 1850762619613; useWrapperStylesT2.__initData = env1_66; Reflect.apply(useAnimatedReaction, moduleValue8, [closure, useWrapperStylesT2]); } return env1_4.useMemo(_fun118187, [styles.wrapper, value6, value5]); function useWrapperStylesL() { // fn#118177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:21575, owner: AnimatedWrapper.useWrapperStyles.l, offset: 0x024cf452, size: 175 bytes, params: 1, frame: 11 const object = {}; const modeBinding = mode; let get = modeBinding.get; object.modeToSet = Reflect.apply(get, modeBinding, []); object.connected = connected.get(); const windowDimensionsBinding = windowDimensions; get = windowDimensionsBinding.get; object.windowWidth = Reflect.apply(get, windowDimensionsBinding, []).width; get = windowDimensionsBinding.get; object.windowHeight = Reflect.apply(get, windowDimensionsBinding, []).height; object.safeArea = safeArea.get(); object.focused = focused.get(); object.pipState = VoicePanelConstantsModule.IS_IOS; object.controlsHeight = VoicePanelConstantsModule.DEFAULT_BORDER_RADIUS_PIP.get(); object.preJoinContentSize = preJoinContentSize.get(); object.globalStatusIndicatorHeight = height; return object; } function useWrapperStylesS(a0, a1) { // fn#118178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:22000, owner: AnimatedWrapper.useWrapperStyles.s, offset: 0x024cf501, size: 735 bytes, params: 3, frame: 27 var r1; var r9; var modeToSet; var connected; var windowWidth; var windowHeight; var safeArea; var pipState; var controlsHeight; var preJoinContentSize; var globalStatusIndicatorHeight; var value4; var wrapperDimensionsBinding; var value10; var value11; var defaultImport; var windowDimensionsBinding; var maxPanelWidth; var panelX; var defaultImport2; var Math; const value = a1; const value3 = undefined; if (!CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) { modeToSet = a0.modeToSet; connected = a0.connected; windowWidth = a0.windowWidth; windowHeight = a0.windowHeight; safeArea = a0.safeArea; pipState = a0.pipState; controlsHeight = a0.controlsHeight; preJoinContentSize = a0.preJoinContentSize; globalStatusIndicatorHeight = a0.globalStatusIndicatorHeight; if (modeToSet !== VoicePanelModes.PIP) { value4 = value == null; if (value4) { r9 = value4; } else { r1 = windowHeight === value.windowHeight && windowWidth === value.windowWidth; r1 = r1 && safeArea.top === value.safeArea.top; r1 = r1 && safeArea.bottom === value.safeArea.bottom; r1 = r1 && safeArea.left === value.safeArea.left; r1 = r1 && safeArea.right === value.safeArea.right; r9 = r1; } value10 = wrapperDimensions.get(); value10.drawerX; value10.drawerY; value11 = windowHeight - globalStatusIndicatorHeight; if (modeToSet === VoicePanelModes.PANEL) { if (connected) { (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperDimensions, {drawerWidth: windowWidth, drawerHeight: value11, drawerX: 0, drawerY: 0, animated: r9, mode: modeToSet}); (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_0, {gestureActive: false}); } else { maxPanelWidth = (require(15432) /* metro dependency 15432: PanelSizeUtils */).getMaxPanelWidth({windowWidth: windowWidth, connected: connected, safeAreaLeft: safeArea.left, safeAreaRight: safeArea.right}); panelX = (require(15432) /* metro dependency 15432: PanelSizeUtils */).getPanelX(windowWidth, maxPanelWidth); defaultImport2 = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */; Math = global.Math; (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperDimensions, {drawerWidth: maxPanelWidth, drawerHeight: value11, drawerX: panelX, drawerY: defaultImport2(Math.max(value11 - preJoinContentSize - controlsHeight - safeArea.bottom, value11 - 0.8 * value11)), animated: r9, mode: modeToSet}); } } else if (modeToSet === VoicePanelModes.DISMISSED) { defaultImport = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; wrapperDimensionsBinding = wrapperDimensions; if (connected) { defaultImport(wrapperDimensionsBinding, {mode: modeToSet}); } else { windowDimensionsBinding = windowDimensions; defaultImport(wrapperDimensionsBinding, {drawerY: windowDimensionsBinding.get().height + 60, mode: modeToSet}); } } } else if (pipState.id != null) { value4 = value == null; if (value4) { r9 = value4; } else { r1 = windowHeight === value.windowHeight && windowWidth === value.windowWidth; r1 = r1 && safeArea.top === value.safeArea.top; r1 = r1 && safeArea.bottom === value.safeArea.bottom; r1 = r1 && safeArea.left === value.safeArea.left; r1 = r1 && safeArea.right === value.safeArea.right; r9 = r1; } value10 = wrapperDimensions.get(); value10.drawerX; value10.drawerY; value11 = windowHeight - globalStatusIndicatorHeight; if (modeToSet === VoicePanelModes.PANEL) { if (connected) { (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperDimensions, {drawerWidth: windowWidth, drawerHeight: value11, drawerX: 0, drawerY: 0, animated: r9, mode: modeToSet}); (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_0, {gestureActive: false}); } else { maxPanelWidth = (require(15432) /* metro dependency 15432: PanelSizeUtils */).getMaxPanelWidth({windowWidth: windowWidth, connected: connected, safeAreaLeft: safeArea.left, safeAreaRight: safeArea.right}); panelX = (require(15432) /* metro dependency 15432: PanelSizeUtils */).getPanelX(windowWidth, maxPanelWidth); defaultImport2 = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */; Math = global.Math; (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperDimensions, {drawerWidth: maxPanelWidth, drawerHeight: value11, drawerX: panelX, drawerY: defaultImport2(Math.max(value11 - preJoinContentSize - controlsHeight - safeArea.bottom, value11 - 0.8 * value11)), animated: r9, mode: modeToSet}); } } else if (modeToSet === VoicePanelModes.DISMISSED) { defaultImport = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; wrapperDimensionsBinding = wrapperDimensions; if (connected) { defaultImport(wrapperDimensionsBinding, {mode: modeToSet}); } else { windowDimensionsBinding = windowDimensions; defaultImport(wrapperDimensionsBinding, {drawerY: windowDimensionsBinding.get().height + 60, mode: modeToSet}); } } } } return value3; } function useWrapperStylesC() { // fn#118179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:23342, owner: AnimatedWrapper.useWrapperStyles.C, offset: 0x024cf7e0, size: 424 bytes, params: 1, frame: 27 var r8; var r14; var Math; var max; var value6; var value7; let get = useReducedMotion.get; let r9 = !Reflect.apply(get, useReducedMotion, []) && wrapperDimensions.get().animated; r9 = !r9 ? env0_0.get().gestureActive : r9; let binding = env0_0; get = binding.get; const gestureActive = Reflect.apply(get, binding, []).gestureActive; const {drawerY, drawerX} = wrapperDimensions.get(); if (gestureActive && !connected.get()) { Math = global.Math; max = Math.max; binding = env0_0; get = binding.get; value6 = drawerY + Reflect.apply(max, Math, [Reflect.apply(get, binding, []).y, 0]); get = binding.get; value7 = drawerX + Reflect.apply(get, binding, []).x; r8 = value6; r14 = value7; } else { r8 = drawerY; r14 = drawerX; } const value8 = _fun118180(); let withSpring = SpringModule.withSpring; binding = env0_0; get = binding.get; const r4 = Reflect.apply(get, binding, []).gestureActive ? DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE : env2_29; const value10 = 'animate-never'; const items2 = [{translateX: Reflect.apply(withSpring, SpringModule, [r14, r4, r9 ? 'animate-always' : value10, value8])}]; withSpring = SpringModule.withSpring; binding = env0_0; get = binding.get; items2[1] = {translateY: Reflect.apply(withSpring, SpringModule, [r8, Reflect.apply(get, binding, []).gestureActive ? DRAWER_SPRING_PHYSICS_GESTURE_ACTIVE : env2_29, r9 ? 'animate-always' : value10, value8])}; return {transform: items2}; function _fun118180() { // fn#118180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:23530, offset: 0x024cf988, size: 126 bytes, params: 1, frame: 15 const VoicePanelUITsx292 = VoicePanelUITsx29; const object = {}; object.mode = mode; object.VoicePanelModes = VoicePanelModes; object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS; object.updateSourceTrackingView = (importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).updateSourceTrackingView; VoicePanelUITsx292.__closure = object; VoicePanelUITsx292.__workletHash = 10394717541764; VoicePanelUITsx292.__initData = env3_61; return VoicePanelUITsx292; function VoicePanelUITsx29(a0) { // fn#118181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:23565, offset: 0x024cfa06, size: 107 bytes, params: 2, frame: 14 var r0; var value2; var moduleValue; let value = a0; if (value) { value = environment.__proto__.__proto__; value = mode.get(); value2 = environment.__proto__.__proto__.__proto__.__proto__; value = value !== VoicePanelModes.DISMISSED; r0 = value; } else { r0 = value; } if (r0) { value = environment.__proto__.__proto__.__proto__.__proto__; moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue.runOnJS((importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).updateSourceTrackingView)(); } } } } function useWrapperStylesM() { // fn#118182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:24485, owner: AnimatedWrapper.useWrapperStyles.M, offset: 0x024cfa71, size: 214 bytes, params: 1, frame: 18 const value = environment.__proto__.__proto__; const binding = env2_56; let object = {}; const modeBinding = mode; let get = modeBinding.get; object.mode = Reflect.apply(get, modeBinding, []); object.connected = connected.get(); const value3 = binding(object); object = {}; const wrapperDimensionsBinding = wrapperDimensions; get = wrapperDimensionsBinding.get; object.width = Reflect.apply(get, wrapperDimensionsBinding, []).drawerWidth; get = wrapperDimensionsBinding.get; object.height = Reflect.apply(get, wrapperDimensionsBinding, []).drawerHeight; object.borderRadius = (require(4577) /* metro dependency 4577: spring */).withSpring(value3, BORDER_RADIUS_PHYSICS); const value4 = modeBinding.get(); const PANEL = VoicePanelModes.PANEL; object.pointerEvents = value4 !== PANEL ? 'none' : 'auto'; object.backgroundColor = connected.get() ? 'transparent' : styles.maskDefaultBackground.backgroundColor; return object; } function useWrapperStylesY(a0) { // fn#118184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:25127, owner: AnimatedWrapper.useWrapperStyles.y, offset: 0x024cfb47, size: 75 bytes, params: 2, frame: 14 let value = environment.__proto__.__proto__; value = ReanimatedRexportModule.runOnJS(log_118173); const JSON = global.JSON; value('Window dimensions changed:', JSON.stringify(a0)); } function useWrapperStylesH() { // fn#118185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:25339, owner: AnimatedWrapper.useWrapperStyles.H, offset: 0x010bf756, size: 18 bytes, params: 1, frame: 9 return wrapperDimensions.get(); } function useWrapperStylesT(a0) { // fn#118186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:25437, owner: AnimatedWrapper.useWrapperStyles.T, offset: 0x024cfb92, size: 75 bytes, params: 2, frame: 14 let value = environment.__proto__.__proto__; value = ReanimatedRexportModule.runOnJS(log_118173); const JSON = global.JSON; value('Wrapper dimensions changed:', JSON.stringify(a0)); } function _fun118187() { // fn#118187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:25629, offset: 0x024cfbdd, size: 40 bytes, params: 1, frame: 3 return {wrapperRootStyles: styles.wrapper, wrapperTransformStyles: VoicePanelConstantsModule.VOICE_PANEL_CHUNK_DIVISOR, wrapperSurfaceStyles: VoicePanelConstantsModule.VoicePanelModes}; } } } function _fun118188() { // fn#118188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:1221, offset: 0x024cfc05, size: 88 bytes, params: 1, frame: 14 const layoutTransition2 = layoutTransition; const object = {}; object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring; object.LAYOUT_PHYSICS = LAYOUT_PHYSICS; layoutTransition2.__closure = object; layoutTransition2.__workletHash = 16454235842679; layoutTransition2.__initData = env0_24; return layoutTransition2; function layoutTransition({targetOriginX, targetOriginY, targetWidth, targetHeight, currentOriginX, currentOriginY, currentWidth, currentHeight}) { // fn#118189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:1253, offset: 0x024cfc5d, size: 215 bytes, params: 2, frame: 22 const object2 = {}; const value = environment.__proto__; object2.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX, LAYOUT_PHYSICS, 'animate-always'); object2.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY, LAYOUT_PHYSICS, 'animate-always'); object2.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth, LAYOUT_PHYSICS, 'animate-always'); object2.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight, LAYOUT_PHYSICS, 'animate-always'); return {animations: object2, initialValues: {originX: currentOriginX, originY: currentOriginY, width: currentWidth, height: currentHeight}}; } } function _fun118190() { // fn#118190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:2547, offset: 0x024cfd34, size: 99 bytes, params: 1, frame: 14 const scrollViewLayoutTransition2 = scrollViewLayoutTransition; const object = {}; object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring; object.LAYOUT_PHYSICS = LAYOUT_PHYSICS; object.EMBEDDED_ACTIVITY_ORIENTATION_UPDATE_SAFE_LAYOUT_PHYSICS = env0_26; scrollViewLayoutTransition2.__closure = object; scrollViewLayoutTransition2.__workletHash = 11745134918460; scrollViewLayoutTransition2.__initData = env0_27; return scrollViewLayoutTransition2; function scrollViewLayoutTransition({targetOriginX, targetOriginY, targetWidth, targetHeight, currentOriginX, currentOriginY, currentWidth, currentHeight}) { // fn#118191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:2589, offset: 0x024cfd97, size: 219 bytes, params: 2, frame: 23 const object2 = {}; const value = environment.__proto__; let withSpring = SpringModule.withSpring; object2.originX = Reflect.apply(withSpring, SpringModule, [targetOriginX, LAYOUT_PHYSICS, 'animate-always']); object2.originY = SpringModule.withSpring(targetOriginY, LAYOUT_PHYSICS, 'animate-always'); withSpring = SpringModule.withSpring; const binding = env1_26; object2.width = Reflect.apply(withSpring, SpringModule, [targetWidth, binding, 'animate-always']); object2.height = SpringModule.withSpring(targetHeight, binding, 'animate-always'); return {animations: object2, initialValues: {originX: currentOriginX, originY: currentOriginY, width: currentWidth, height: currentHeight}}; } } function _fun118192() { // fn#118192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:3834, offset: 0x024cfe72, size: 57 bytes, params: 1, frame: 4 const computeViewableChunksFromScrollPosition2 = computeViewableChunksFromScrollPosition; computeViewableChunksFromScrollPosition2.__closure = {VOICE_PANEL_CHUNK_DIVISOR: VOICE_PANEL_CHUNK_DIVISOR}; computeViewableChunksFromScrollPosition2.__workletHash = 3008066799757; computeViewableChunksFromScrollPosition2.__initData = env0_30; return computeViewableChunksFromScrollPosition2; function computeViewableChunksFromScrollPosition(a0, a1, a2) { // fn#118193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:3889, offset: 0x024cfeab, size: 189 bytes, params: 4, frame: 21 let value = a3; const r7 = value !== undefined ? value : 1; let Math = global.Math; const ceil = Math.ceil; value = environment.__proto__; value = Reflect.apply(ceil, Math, [a1 / VOICE_PANEL_CHUNK_DIVISOR]); Math = global.Math; const max = Math.max; const Math2 = global.Math; const value3 = Reflect.apply(max, Math, [Math2.floor(a0 / value) - r7, 0]); Math = global.Math; const min = Math.min; const value5 = value3 + VOICE_PANEL_CHUNK_DIVISOR + 2 * r7; const Math3 = global.Math; value = Reflect.apply(min, Math, [value5, Math3.ceil(a2 / value)]); Math = global.Math; return {start: Math.max(value - VOICE_PANEL_CHUNK_DIVISOR - 2 * r7, 0), end: value}; } } function _fun118194() { // fn#118194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:15583, offset: 0x024cff68, size: 75 bytes, params: 1, frame: 4 const closure = function({mode, connected}) { return mode === VoicePanelModes.PIP ? DEFAULT_BORDER_RADIUS_PIP : connected ? 0 : DEFAULT_BORDER_RADIUS; }; closure.__closure = {VoicePanelModes: VoicePanelModes, DEFAULT_BORDER_RADIUS_PIP: DEFAULT_BORDER_RADIUS_PIP, DEFAULT_BORDER_RADIUS: DEFAULT_BORDER_RADIUS}; closure.__workletHash = 4574399878042; closure.__initData = env0_55; return closure; } function _fun118196({opacity, onPress}) { // fn#118196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:26407, offset: 0x024cffe3, size: 279 bytes, params: 2, frame: 22 const styles = useStyles(); const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const o_1181972 = o_118197; const object = {}; object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring; object.opacity = opacity; object.DrawerShadeOpacityPhysics = env0_67; object.accessibilityPreferencesSharedValue = (require(12991) /* metro dependency 12991: AccessibilityPreferencesSharedValue */).accessibilityPreferencesSharedValue; o_1181972.__closure = object; o_1181972.__workletHash = 7030735056874; o_1181972.__initData = env0_68; const value2 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [o_1181972]); const View = (ReanimatedRexport).View; return ( ); function o_118197() { // fn#118197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:26483, offset: 0x024d00fa, size: 170 bytes, params: 1, frame: 19 const object = {}; let value = environment.__proto__; const withSpring = SpringModule.withSpring; const opacityBinding = opacity; let get = opacityBinding.get; object.opacity = Reflect.apply(withSpring, SpringModule, [Reflect.apply(get, opacityBinding, []), env1_67]); const accessibilityPreferencesSharedValue = (AccessibilityPreferencesSharedValueModule).accessibilityPreferencesSharedValue; get = accessibilityPreferencesSharedValue.get; const screenReaderEnabled = Reflect.apply(get, accessibilityPreferencesSharedValue, []).screenReaderEnabled; value = 'flex'; object.display = screenReaderEnabled ? opacity.get() !== 0 ? value : 'none' : value; object.pointerEvents = opacity.get() !== 0 ? 'auto' : 'none'; return object; } } function VoicePanelUI() { // fn#118198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:27091, offset: 0x024d01a4, size: 1224 bytes, params: 1, frame: 46 var object6; var r0; var AnalyticsLocationProvider; const LayerScope = (LayerScopeNativeModule).LayerScope; var items3; var VoicePanelAccessibilityView; var items4; var object; var items5; var GestureDetector; var object5; var ReanimatedNativeView; var GestureDetector2; var value; const styles = useStyles(); const defaultImport = UseAnalyticsLocations; const VOICE_PANEL = (AnalyticsLocation).VOICE_PANEL; const analyticsLocations = defaultImport(VOICE_PANEL).analyticsLocations; let binding = env0_4; const {scrollPosition, dragScrolling, channelId, dismissPanel} = binding.useContext(VoicePanelStateContext); const [property, env0_1] = Module00057(env0_4.useState(false), 2); const env0_2 = env0_4.useRef(-1); const value5 = env0_4.useCallback(_fun118199, [channelId]); env0_4.useLayoutEffect(function() { return _fun118203; }, []); object6 = {scrollPosition: scrollPosition, dragScrolling: dragScrolling, setPanelFullscreen: value5}; object6.setPanelOpen = env0_4.useCallback(_fun118229, [channelId]); object6.setPanelPIP = env0_4.useCallback(_fun118230, [channelId]); const {gesture, gestureState, handleScroll, onContentSizeChange, scrollViewProps, scrollerRef, scrollNativeGesture, viewableChunks, wrapperOffset, opacity} = usePanelGesture(object6); env0_4.useEffect(_fun118231, [(UseControlsLock)()]); env0_4.useEffect(_fun118232, []); if (property) { AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider; object6 = {value: analyticsLocations}; items3 = [ ((Component) => )(importDefault(15448) /* metro dependency 15448: VoicePanelSystemUIManager */), ]; binding = env0_69; items3[1] = ((Component) => )(binding); VoicePanelAccessibilityView = importDefault(15449) /* metro dependency 15449: VoicePanelAccessibilityView */; var defaultImport3Props = {style: styles.accessibilityView, nativeID: 'voice-panel-ui-' + channelId, accessibilityViewIsModal: true, layout: env0_25, onAccessibilityEscape: importDefault(8088) /* metro dependency 8088: closeVoicePanels */}; items4 = [ ((Component) => )(importDefault(15450) /* metro dependency 15450: VoicePanelDismissableContent */), ]; object = {wrapperOffset: wrapperOffset}; items5 = [ {((Component) => )(importDefault(15452) /* metro dependency 15452: VoicePanelHeader */)} , ]; GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector; object5 = {gesture: gesture}; ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */; var defaultImport6Props = {style: StyleSheet.absoluteFill, layout: env0_25, collapsable: false}; GestureDetector2 = (require(5321) /* metro dependency 5321 */).GestureDetector; binding = env0_33; items5[1] = ( {((Component) => {((Component) => )(importDefault(15483) /* metro dependency 15483: VoicePanelCardView */)}{((Component) => )(importDefault(15511) /* metro dependency 15511: VoicePanelPreJoinContent */)})(binding)} ); items4[1] = ( {items5} ); items4[2] = ((Component) => )(importDefault(15513) /* metro dependency 15513: VoicePanelControls */); value = importDefault(15562) /* metro dependency 15562: VoicePanelPIP */; items4[3] = ((Component) => )(value); items3[2] = ( {items4} ); value = ( {items3} ); r0 = value; } else { r0 = null; } return r0; function _fun118199(a0) { // fn#118199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:27342, offset: 0x024d066c, size: 79 bytes, params: 2, frame: 13 var environment; const env0_0 = a0; const clearTimeout = global.clearTimeout; clearTimeout(env0_2.current); const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun118200); function _fun118200() { // fn#118200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:27393, offset: 0x024d06bb, size: 160 bytes, params: 1, frame: 15 var environment; var value2; var state; var setChannelPanelFullscreen; var value4; var channelIdBinding; var binding; var value; if (env0_0) { value = environment.__proto__; env1_2.current = global.setTimeout(_fun118201, 1000); } else { value2 = environment.__proto__.__proto__; state = VoicePanelStore.getState(); setChannelPanelFullscreen = state.setChannelPanelFullscreen; value4 = environment.__proto__; channelIdBinding = channelId; binding = env0_0; Reflect.apply(setChannelPanelFullscreen, state, [channelIdBinding, binding]); AppFreezeStore.getState().requestFreezeLock({lockEnabled: binding, key: 'voice-panel-freeze-' + channelIdBinding}); } function _fun118201() { // fn#118201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:27422, offset: 0x024d075b, size: 107 bytes, params: 1, frame: 15 const value = environment.__proto__.__proto__.__proto__; const state = VoicePanelStore.getState(); const setChannelPanelFullscreen = state.setChannelPanelFullscreen; const channelIdBinding = channelId; const binding = env1_0; Reflect.apply(setChannelPanelFullscreen, state, [channelIdBinding, binding]); AppFreezeStore.getState().requestFreezeLock({lockEnabled: binding, key: 'voice-panel-freeze-' + channelIdBinding}); } } } function _fun118202() { // fn#118202, offset: 0x024d07c6, size: 11 bytes, params: 1, frame: 1 return _fun118203; function _fun118203() { // fn#118203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:27713, offset: 0x024d07d1, size: 29 bytes, params: 1, frame: 11 global.clearTimeout(env1_2.current); } } function usePanelGesture({scrollPosition, dragScrolling, setPanelFullscreen, setPanelOpen, setPanelPIP}) { // fn#118204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:27754, owner: VoicePanelUI.usePanelGesture, offset: 0x024d07ee, size: 1776 bytes, params: 2, frame: 51 var environment; const value = environment.__proto__; let binding = env1_4; const {channelId, connected, controlsSpecs, dismissPanel, dismissToPIPGestureRef, focused, hideControls, isFocusedVideoZoomed, mode, safeArea, setMode, showControls, windowDimensions, wrapperDimensions, wrapperOffset} = binding.useContext(VoicePanelStateContext); const value3 = (UseSafeAreaInsetsNative)(); const value4 = (ReanimatedRexportModule).useSharedValue(0); const value5 = (ReanimatedRexportModule).useSharedValue(false); const value6 = (ReanimatedRexportModule).useSharedValue(false); const value7 = (ReanimatedRexportModule).useSharedValue({start: 0, end: VOICE_PANEL_CHUNK_DIVISOR}); const [property, env0_26] = env1_3(env1_4.useState(true), 2); binding = env1_4; let closure = function() { var Gesture = require(dependencyMap[19]).Gesture; return Gesture.Native(); }; const value10 = binding.useMemo(closure, []); const value11 = (ReanimatedRexportModule).useAnimatedRef(); const value12 = (ReanimatedRexportModule).useSharedValue({'absoluteXStart': 0, 'absoluteYStart': 0, 'cancel': false, 'active': false, 'requiresPop': false}); let useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; closure = usePanelGestureF; closure.__closure = {gestureState: value12, connected: connected, mode: mode}; closure.__workletHash = 5596084348360; closure.__initData = env1_35; const usePanelGestureH2 = usePanelGestureH; object = {}; object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual; object.VoicePanelModes = VoicePanelModes; const runOnJS = ReanimatedRexportModule.runOnJS; object.runOnJS = runOnJS; object.setPanelFullscreen = setPanelFullscreen; object.setPanelOpen = setPanelOpen; object.setPanelPIP = setPanelPIP; usePanelGestureH2.__closure = object; usePanelGestureH2.__workletHash = 10989484188294; usePanelGestureH2.__initData = env1_36; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, usePanelGestureH2]); const value13 = env1_4.useCallback(_fun118208, [channelId]); useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; closure = usePanelGestureMe; closure.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, focused: focused}; closure.__workletHash = 6595654888031; closure.__initData = env1_37; const we2 = we; we2.__closure = {runOnJS: runOnJS, handleFocusChange: value13}; we2.__workletHash = 15236018210415; we2.__initData = env1_38; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, we2]); const value14 = env1_4.useMemo(_fun118211, [value3, connected, controlsSpecs, dismissPanel, dismissToPIPGestureRef, focused, property, hideControls, value12, isFocusedVideoZoomed, value5, mode, safeArea, scrollPosition, value10, setMode, showControls, windowDimensions, wrapperDimensions, wrapperOffset]); const useAnimatedScrollHandler = ReanimatedRexportModule.useAnimatedScrollHandler; object = {}; closure = function(a0) { scrollPosition.set(a0.contentOffset.y); dragScrolling.set(true); }; closure.__closure = {scrollPosition: scrollPosition, dragScrolling: dragScrolling}; closure.__workletHash = 57033362164; closure.__initData = env1_47; object.onBeginDrag = closure; closure = function() { dragScrolling.set(false); }; closure.__closure = {dragScrolling: dragScrolling}; closure.__workletHash = 14366146937201; closure.__initData = env1_48; object.onEndDrag = closure; closure = function() { dragScrolling.set(false); }; closure.__closure = {dragScrolling: dragScrolling}; closure.__workletHash = 12919609750790; closure.__initData = env1_49; object.onMomentumEnd = closure; closure = onScroll_118223; const object4 = {lockScrolling: value5, isSnappingBack: value6, scrollPosition: scrollPosition}; object4.scrollTo = ReanimatedRexportModule.scrollTo; object4.scrollerRef = value11; object4.computeViewableChunksFromScrollPosition = env1_31; object4.windowDimensions = windowDimensions; object4.scrollableRegionSize = value4; object4.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; object4.viewableChunks = value7; closure.__closure = object4; closure.__workletHash = 13292683579177; closure.__initData = env1_50; object.onScroll = closure; const value15 = Reflect.apply(useAnimatedScrollHandler, ReanimatedRexportModule, [object]); useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; closure = function() { return mode.get(); }; closure.__closure = {mode: mode}; closure.__workletHash = 9335671323831; closure.__initData = env1_51; const usePanelGestureDe2 = usePanelGestureDe; usePanelGestureDe2.__closure = {VoicePanelModes: VoicePanelModes, lockScrolling: value5}; usePanelGestureDe2.__workletHash = 15902278985136; usePanelGestureDe2.__initData = env1_52; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, usePanelGestureDe2]); const useToken = UseTokenModule.useToken; const VOICE_PANEL_GUTTER = (Native).modules.mobile.VOICE_PANEL_GUTTER; const value16 = Reflect.apply(useToken, UseTokenModule, [VOICE_PANEL_GUTTER]); const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps; closure = Me; object = {mode: mode}; object.VoicePanelModes = VoicePanelModes; object.focused = focused; object.lockScrolling = value5; object.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */; object.safeArea = safeArea; object.edgeGutter = value16; closure.__closure = object; closure.__workletHash = 15030832737033; closure.__initData = env1_53; const value17 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]); const value18 = env1_4.useCallback(_fun118227, [value4]); const useDerivedValue = ReanimatedRexportModule.useDerivedValue; closure = Te; closure.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, connected: connected, gestureState: value12, wrapperDimensions: wrapperDimensions, wrapperOffset: wrapperOffset, windowDimensions: windowDimensions}; closure.__workletHash = 7328947258749; closure.__initData = env1_54; return {gesture: value14, scrollerRef: value11, scrollNativeGesture: value10, viewableChunks: value7, handleScroll: value15, scrollViewProps: value17, onContentSizeChange: value18, wrapperOffset: wrapperOffset, scrollableRegionSize: value4, gestureState: value12, opacity: Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure])}; function usePanelGestureF() { // fn#118206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:28556, owner: VoicePanelUI.usePanelGesture.f, offset: 0x024d0f09, size: 66 bytes, params: 1, frame: 11 const object = {}; const binding = env0_29; const get = binding.get; object.gestureActive = Reflect.apply(get, binding, []).active; object.connected = connected.get(); object.mode = mode.get(); return object; } function usePanelGestureH(a0, a1) { // fn#118207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:28724, owner: VoicePanelUI.usePanelGesture.h, offset: 0x024d0f4b, size: 400 bytes, params: 3, frame: 17 var gestureActive; var connected; var mode; let value = a1; const value3 = undefined; if (!CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) { gestureActive = a0.gestureActive; connected = a0.connected; mode = a0.mode; if (connected) { if (gestureActive) { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelFullscreen); value(false); } else if (mode !== VoicePanelModes.PANEL) { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelFullscreen); value(false); } else { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelFullscreen); value(true); } } else { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelFullscreen); value(false); } if (mode === VoicePanelModes.PANEL) { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelOpen); value(true); } else { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelOpen); value(false); } if (mode === VoicePanelModes.PIP) { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelPIP); value(true); } else { value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.runOnJS(setPanelPIP); value(false); } } return value3; } function _fun118208(a0) { // fn#118208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:29272, offset: 0x024d10db, size: 68 bytes, params: 2, frame: 15 var r0; var isActivityParticipantBinding; var channelRTCStoreBinding; let value = a0 != null; if (value) { value = environment.__proto__.__proto__; isActivityParticipantBinding = isActivityParticipant; channelRTCStoreBinding = ChannelRTCStore; value = channelRTCStoreBinding.getParticipant(channelId, a0); value = isActivityParticipantBinding(value); r0 = value; } else { r0 = value; } env0_26(!r0); } function usePanelGestureMe() { // fn#118209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:29364, owner: VoicePanelUI.usePanelGesture.me, offset: 0x024d111f, size: 69 bytes, params: 1, frame: 12 var r0; var value; const value2 = mode.get(); const PANEL = VoicePanelModes.PANEL; const value4 = undefined; if (value2 !== PANEL) { r0 = value4; } else { value = focused.get(); r0 = value == null ? value4 : value.id; } return r0; } function we(a0, a1) { // fn#118210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:29542, owner: VoicePanelUI.usePanelGesture.we, offset: 0x024d1164, size: 61 bytes, params: 3, frame: 13 var value; if (a0 !== a1) { value = environment.__proto__.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value.runOnJS(env0_30)(a0); } } function _fun118211() { // fn#118211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:29735, offset: 0x024d11a1, size: 1376 bytes, params: 1, frame: 34 const Gesture = (Module05321Module).Gesture; const Race = Gesture.Race; const Gesture2 = (Module05321Module).Gesture; const value2 = Gesture2.Tap(); const hitSlop = value2.hitSlop; let binding = MorphablePanelConstantsModule.POP_RESISTANCE; const value4 = Reflect.apply(hitSlop, value2, [{left: -1 * binding.left, right: -1 * binding.right}]); const enabled = value4.enabled; const binding2 = env0_25; const value6 = Reflect.apply(enabled, value4, [binding2]).maxDistance(30); const onStart = value6.onStart; let closure = h_118212; object = {}; const connectedBinding = connected; object.connected = connectedBinding; const modeBinding = mode; object.mode = modeBinding; object.VoicePanelModes = VoicePanelModes; const controlsSpecsBinding = controlsSpecs; object.controlsSpecs = controlsSpecsBinding; object.VoicePanelControlsModes = VoicePanelControlsModes; const runOnJS = (ReanimatedRexportModule).runOnJS; object.runOnJS = runOnJS; object.showControls = showControls; object.hideControls = hideControls; closure.__closure = object; closure.__workletHash = 15350003421175; closure.__initData = env2_39; const value7 = Reflect.apply(onStart, value6, [closure]); const Gesture3 = (Module05321Module).Gesture; const value12 = Gesture3.Pan().enabled(binding2).manualActivation(true).maxPointers(1).hitSlop({left: -1 * binding.left, right: -1 * binding.right}); const value14 = value12.withRef(dismissToPIPGestureRef).shouldCancelWhenOutside(false).simultaneousWithExternalGesture(env0_27); const onTouchesDown = value14.onTouchesDown; closure = S_118213; const windowDimensionsBinding = windowDimensions; const safeAreaBinding = safeArea; binding = env0_29; closure.__closure = {IS_IOS: IS_IOS, windowDimensions: windowDimensionsBinding, safeArea: safeAreaBinding, gestureState: binding, isFocusedVideoZoomed: isFocusedVideoZoomed, mode: modeBinding, VoicePanelModes: VoicePanelModes, controlsSpecs: controlsSpecsBinding, VoicePanelControlsModes: VoicePanelControlsModes}; closure.__workletHash = 13538548264193; closure.__initData = env2_46; const value15 = Reflect.apply(onTouchesDown, value14, [closure]); const onBegin = value15.onBegin; closure = u_118214; object = {gestureState: binding}; object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; const wrapperOffsetBinding = wrapperOffset; object.wrapperOffset = wrapperOffsetBinding; object.connected = connectedBinding; object.mode = modeBinding; object.VoicePanelModes = VoicePanelModes; closure.__closure = object; closure.__workletHash = 11622638269935; closure.__initData = env2_45; const value16 = Reflect.apply(onBegin, value15, [closure]); const onTouchesMove = value16.onTouchesMove; closure = c_118215; object = {}; const State = (Module05321Module).State; object.State = State; object.gestureState = binding; object.mode = modeBinding; object.VoicePanelModes = VoicePanelModes; const scrollPositionBinding = scrollPosition; object.scrollPosition = scrollPositionBinding; object.isQuest = env2_34; object.MIN_GESTURE_MOVE = 10; object.focused = focused; object.runOnJS = runOnJS; object.triggerIOSHaptic = importDefault(15446) /* metro dependency 15446: triggerIOSHaptic */; object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; object.wrapperOffset = wrapperOffsetBinding; object.lockScrolling = JsxRuntimeModule.jsxs; closure.__closure = object; closure.__workletHash = 262321069191; closure.__initData = env2_44; const value17 = Reflect.apply(onTouchesMove, value16, [closure]); const onChange = value17.onChange; closure = l_118216; object = {gestureState: binding, mode: modeBinding}; object.VoicePanelModes = VoicePanelModes; object.connected = connectedBinding; object.lockScrolling = JsxRuntimeModule.jsxs; object.scrollPosition = scrollPositionBinding; object.POP_RESISTANCE = POP_RESISTANCE; object.PIP_POP_HEIGHT = 180; object.runOnJS = runOnJS; object.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback; const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes; object.HapticFeedbackTypes = HapticFeedbackTypes; object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; object.wrapperOffset = wrapperOffsetBinding; closure.__closure = object; closure.__workletHash = 2084376677229; closure.__initData = env2_43; const value18 = Reflect.apply(onChange, value17, [closure]); const onTouchesCancelled = value18.onTouchesCancelled; closure = s_118217; closure.__closure = {lockScrolling: JsxRuntimeModule.jsxs, updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */, gestureState: binding, wrapperOffset: wrapperOffsetBinding}; closure.__workletHash = 8529626440714; closure.__initData = env2_42; const value19 = Reflect.apply(onTouchesCancelled, value18, [closure]); const onEnd = value19.onEnd; closure = n_118218; object = {gestureState: binding, mode: modeBinding}; object.VoicePanelModes = VoicePanelModes; object.calculatePIPPositionFromVelocity = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).calculatePIPPositionFromVelocity; object.windowDimensions = windowDimensionsBinding; object.safeArea = safeAreaBinding; object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; object.wrapperDimensions = wrapperDimensions; object.wrapperOffset = wrapperOffsetBinding; object.connected = connectedBinding; object.runOnJS = runOnJS; object.setMode = setMode; object.lockScrolling = JsxRuntimeModule.jsxs; object.MIN_DISMISS_MOVE_PERCENTAGE = 0.2; object.dismissPanel = dismissPanel; closure.__closure = object; closure.__workletHash = 10532794222556; closure.__initData = env2_41; const value20 = Reflect.apply(onEnd, value19, [closure]); const onFinalize = value20.onFinalize; closure = t_118219; closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */, gestureState: binding}; closure.__workletHash = 141147937726; closure.__initData = env2_40; return Reflect.apply(Race, Gesture, [value7, Reflect.apply(onFinalize, value20, [closure])]); function h_118212() { // fn#118212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:29875, offset: 0x024d1701, size: 193 bytes, params: 1, frame: 14 var value2; var value3; var controlsSpecsBinding; var moduleValue; var moduleValue2; const value = environment.__proto__; const connectedBinding = connected; const get = connectedBinding.get; if (Reflect.apply(get, connectedBinding, [])) { value2 = mode.get(); value3 = environment.__proto__.__proto__.__proto__; if (value2 !== VoicePanelModes.PIP) { controlsSpecsBinding = controlsSpecs; if (controlsSpecsBinding.get().mode === VoicePanelControlsModes.HIDDEN) { moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue2.runOnJS(showControls)({debounce: true}); } else { moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue.runOnJS(hideControls)({debounce: true}); } } } } function S_118213({allTouches}, a1) { // fn#118213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:30413, offset: 0x024d17c2, size: 291 bytes, params: 3, frame: 17 var r7; var r4; var r3; var absoluteY; var value2; var windowDimensionsBinding; var get; var height; var safeAreaBinding; var value3; var value4; var value6; var controlsSpecsBinding; var binding; var set; var object; const property = allTouches[0]; const value = environment.__proto__.__proto__.__proto__; if (IS_IOS) { if (property == null) { value3 = environment.__proto__; value4 = isFocusedVideoZoomed.get(); if (value4) { r3 = value4; } else { value6 = mode.get() === VoicePanelModes.PANEL; if (value6) { controlsSpecsBinding = controlsSpecs; r4 = controlsSpecsBinding.get().mode === VoicePanelControlsModes.DRAWER; r7 = controlsSpecsBinding; } else { r4 = value6; } r3 = r4; } if (r3) { binding = env1_29; set = binding.set; object = {}; copyDataProperties(object, binding.get(), r7); object['cancel'] = true; Reflect.apply(set, binding, [object]); a1.fail(); } return undefined; } absoluteY = property.absoluteY; value2 = environment.__proto__; windowDimensionsBinding = windowDimensions; get = windowDimensionsBinding.get; height = Reflect.apply(get, windowDimensionsBinding, []).height; safeAreaBinding = safeArea; get = safeAreaBinding.get; if (absoluteY > height - Reflect.apply(get, safeAreaBinding, []).bottom) { binding = env1_29; set = binding.set; object = {}; copyDataProperties(object, binding.get(), r7); object['cancel'] = true; Reflect.apply(set, binding, [object]); a1.activate(); return undefined; } value3 = environment.__proto__; } value4 = isFocusedVideoZoomed.get(); if (value4) { r3 = value4; } else { value6 = mode.get() === VoicePanelModes.PANEL; if (value6) { controlsSpecsBinding = controlsSpecs; r4 = controlsSpecsBinding.get().mode === VoicePanelControlsModes.DRAWER; r7 = controlsSpecsBinding; } else { r4 = value6; } r3 = r4; } if (r3) { binding = env1_29; set = binding.set; object = {}; copyDataProperties(object, binding.get(), r7); object['cancel'] = true; Reflect.apply(set, binding, [object]); a1.fail(); } } function u_118214(a0) { // fn#118214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:30882, offset: 0x024d18e5, size: 178 bytes, params: 2, frame: 16 var r3; var value2; var set; var object; var value3; let value = environment.__proto__; let binding = env1_29; const get = binding.get; if (!Reflect.apply(get, binding, []).cancel) { value2 = environment.__proto__.__proto__.__proto__; (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'x': 0, 'y': 0}); binding = env1_29; set = binding.set; object = {}; object.absoluteXStart = a0.absoluteX; object.absoluteYStart = a0.absoluteY; object.active = false; object.cancel = false; value3 = connected.get(); if (value3) { value = mode.get(); value = value === VoicePanelModes.PANEL; r3 = value; } else { r3 = value3; } object.requiresPop = r3; Reflect.apply(set, binding, [object]); } } function c_118215(a0, a1) { // fn#118215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:31245, offset: 0x024d1997, size: 681 bytes, params: 3, frame: 26 var r5; var r6; var r3; var value3; var binding; var get; var property; var absoluteY; var absoluteX; var value4; var value5; var Math; var max; var abs; var value6; var Math3; var value7; var value8; var moduleValue; var floor; var scrollPositionBinding; var value18; var value20; var object; var set; const state = a0.state; let value = environment.__proto__.__proto__.__proto__; const value2 = undefined; const State = (Module05321Module).State; const BEGAN = State.BEGAN; if (state === BEGAN) { value3 = environment.__proto__; binding = env1_29; get = binding.get; if (!Reflect.apply(get, binding, []).active) { binding = env1_29; get = binding.get; if (!Reflect.apply(get, binding, []).cancel) { property = a0.changedTouches[0]; absoluteY = property.absoluteY; absoluteX = property.absoluteX; binding = env1_29; get = binding.get; value4 = Reflect.apply(get, binding, []).absoluteYStart - absoluteY; get = binding.get; value5 = Reflect.apply(get, binding, []).absoluteXStart - absoluteX; Math = global.Math; max = Math.max; value6 = global.Math.abs(value4); Math3 = global.Math; abs = Math3.abs; value7 = Reflect.apply(max, Math, [value6, Reflect.apply(abs, Math3, [value5])]); Math = global.Math; value8 = Math.abs(value5); Math = global.Math; abs = Math.abs; r5 = value8 >= Reflect.apply(abs, Math, [value4]) || value4 > 0; if (mode.get() === VoicePanelModes.PANEL) { Math = global.Math; floor = Math.floor; scrollPositionBinding = scrollPosition; if (value4 < 0) { if (Reflect.apply(floor, Math, [scrollPositionBinding.get()]) <= 0) { binding = env3_34; r3 = binding ? value7 > 10 : !binding; } else { value18 = focused.get(); r6 = (value18 == null ? value2 : value18.id) != null && r5; value20 = false; if (r6) { a1.fail(); r3 = value20; } else { r3 = value20; } } } else { value18 = focused.get(); r6 = (value18 == null ? value2 : value18.id) != null && r5; value20 = false; if (r6) { a1.fail(); r3 = value20; } else { r3 = value20; } } } else if (mode.get() === VoicePanelModes.PIP && value7 > 10) { moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue.runOnJS(importDefault(15446) /* metro dependency 15446: triggerIOSHaptic */)(); r3 = true; } else { r3 = false; } value = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; if (r3) { value(wrapperOffset, {gestureActive: true}); binding = env1_29; set = binding.set; object = {absoluteXStart: absoluteX}; scrollPositionBinding = scrollPosition; get = scrollPositionBinding.get; object.absoluteYStart = absoluteY + Reflect.apply(get, scrollPositionBinding, []); object.cancel = false; object.active = true; get = binding.get; object.requiresPop = Reflect.apply(get, binding, []).requiresPop; Reflect.apply(set, binding, [object]); binding = env1_22; binding.set(true); a1.activate(); } else { value(env1_29, {absoluteYStart: absoluteY, absoluteXStart: absoluteX}); } } } } return value2; } function l_118216(a0) { // fn#118216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:32226, offset: 0x024d1c40, size: 648 bytes, params: 2, frame: 21 var r3; var r4; var value2; var value3; var defaultImport; var wrapperOffsetBinding; var object; var value4; var value5; var set; var value12; var moduleValue; let binding = env1_29; let get = binding.get; if (!Reflect.apply(get, binding, []).cancel) { value2 = mode.get(); value3 = environment.__proto__.__proto__.__proto__; if (value2 !== VoicePanelModes.PIP) { binding = env1_29; get = binding.get; value4 = -1 * (Reflect.apply(get, binding, []).absoluteYStart - a0.absoluteY); value5 = connected.get(); if (value5) { binding = env1_29; r3 = !binding.get().requiresPop; } else { r3 = value5; } r3 = r3 && value4 <= 0; if (r3) { binding = env1_29; set = binding.set; object = {}; copyDataProperties(object, binding.get(), undefined); object['requiresPop'] = true; Reflect.apply(set, binding, [object]); } binding = env1_22; get = binding.get; if (Reflect.apply(get, binding, [])) { if (value4 < 0) { env1_22.set(false); } else if (!env1_22.get() && scrollPosition.get() <= 0) { env1_22.set(true); } } else if (!env1_22.get() && scrollPosition.get() <= 0) { env1_22.set(true); } binding = env1_29; get = binding.get; if (Reflect.apply(get, binding, []).requiresPop) { value12 = global.Math.max(value4, 0); if (value12 <= 180) { r4 = value12 - value12 * POP_RESISTANCE; } else { binding = env1_29; set = binding.set; object = {}; copyDataProperties(object, binding.get(), undefined); object['requiresPop'] = false; Reflect.apply(set, binding, [object]); moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback)((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM); r4 = value4; } } else { r4 = value4; } (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {y: r4, x: 0}); } else { defaultImport = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */; wrapperOffsetBinding = wrapperOffset; object = {}; binding = env1_29; get = binding.get; object.x = -1 * (Reflect.apply(get, binding, []).absoluteXStart - a0.absoluteX); get = binding.get; object.y = -1 * (Reflect.apply(get, binding, []).absoluteYStart - a0.absoluteY); defaultImport(wrapperOffsetBinding, object); } } } function s_118217() { // fn#118217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:33162, offset: 0x024d1ec8, size: 92 bytes, params: 1, frame: 18 env1_22.set(false); (UpdateSharedValueIfChangedNative)(env1_29, {'cancel': false, 'active': false}); (UpdateSharedValueIfChangedNative)(wrapperOffset, {gestureActive: false}); } function n_118218(a0) { // fn#118218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:33406, offset: 0x024d1f24, size: 789 bytes, params: 2, frame: 21 var velocityX; var velocityY; var absoluteX; var absoluteY; var value2; var value3; var wrapperOffsetBinding; var connectedBinding; var wrapperDimensionsBinding; var drawerHeight; var value5; var object; var moduleValue; var moduleValue2; var moduleValue3; var calculatePIPPositionFromVelocity; var value7; let binding = env1_29; let get = binding.get; if (!Reflect.apply(get, binding, []).cancel) { velocityX = a0.velocityX; velocityY = a0.velocityY; absoluteX = a0.absoluteX; absoluteY = a0.absoluteY; value2 = mode.get(); value3 = environment.__proto__.__proto__.__proto__; if (value2 === VoicePanelModes.PIP) { moduleValue3 = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */; calculatePIPPositionFromVelocity = moduleValue3.calculatePIPPositionFromVelocity; object = {velocityX: velocityX, velocityY: velocityY, absoluteX: absoluteX, absoluteY: absoluteY}; object.windowDimensions = windowDimensions.get(); object.safeArea = safeArea.get(); value7 = Reflect.apply(calculatePIPPositionFromVelocity, moduleValue3, [object]); (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperDimensions, {pipX: value7.pipX, pipY: value7.pipY}); (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {gestureActive: false}); } else if (mode.get() === VoicePanelModes.PANEL) { if (velocityY > 0) { connectedBinding = connected; get = connectedBinding.get; if (Reflect.apply(get, connectedBinding, [])) { binding = env1_29; if (binding.get().requiresPop) { (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'gestureActive': false, 'x': 0, 'y': 0}); env1_22.set(false); } else { moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue2.runOnJS(setMode)(VoicePanelModes.PIP); (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'gestureActive': false, 'x': 0, 'y': 0}); } } else { wrapperDimensionsBinding = wrapperDimensions; get = wrapperDimensionsBinding.get; drawerHeight = Reflect.apply(get, wrapperDimensionsBinding, []).drawerHeight; get = wrapperDimensionsBinding.get; value5 = drawerHeight - Reflect.apply(get, wrapperDimensionsBinding, []).drawerY; wrapperOffsetBinding = wrapperOffset; get = wrapperOffsetBinding.get; if (Reflect.apply(get, wrapperOffsetBinding, []).y > 0.2 * value5) { (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {gestureActive: false}); moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; moduleValue.runOnJS(dismissPanel)(); } else { (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'gestureActive': false, 'x': 0, 'y': 0}); env1_22.set(false); } } } else { (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'gestureActive': false, 'x': 0, 'y': 0}); env1_22.set(false); } } } } function t_118219() { // fn#118219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:34551, offset: 0x024d2239, size: 50 bytes, params: 1, frame: 13 const value = environment.__proto__.__proto__.__proto__; (UpdateSharedValueIfChangedNative)(env1_29, {'cancel': false, 'active': false}); } } function usePanelGestureOnScroll(a0) { // fn#118223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:35235, owner: VoicePanelUI.usePanelGesture.onScroll, offset: 0x024d229e, size: 389 bytes, params: 2, frame: 20 var r4; var scrollPositionBinding; var contentOffset; var y; var value4; var value5; var windowDimensionsBinding; var height; var binding2; var set; var value7; var value9; var Math; var value11; let binding = JsxRuntimeModule.jsxs; let get = binding.get; if (Reflect.apply(get, binding, [])) { binding = env0_23; if (binding.get()) { return undefined; } if (scrollPosition.get() < 0) { scrollPosition.set(0); } value9 = scrollPosition.get(); Math = global.Math; if (Math.abs(a0.contentOffset.y - value9) < 0.1) { return undefined; } binding = env0_23; binding.set(true); value11 = environment.__proto__.__proto__; (require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_28, 0, value9, false); binding.set(false); } else { var value2 = scrollPosition.get(); contentOffset = a0.contentOffset; y = contentOffset.y; if (value2 === y) { r4 = undefined; } else { value4 = environment.__proto__.__proto__; binding = env2_31; value5 = scrollPosition.get(); windowDimensionsBinding = windowDimensions; get = windowDimensionsBinding.get; height = Reflect.apply(get, windowDimensionsBinding, []).height; binding2 = JsxRuntimeModule.jsx; get = binding2.get; r4 = binding(value5, height, Reflect.apply(get, binding2, [])); } scrollPositionBinding = scrollPosition; set = scrollPositionBinding.set; contentOffset = a0.contentOffset; y = contentOffset.y; Reflect.apply(set, scrollPositionBinding, [y]); if (r4 != null) { value7 = environment.__proto__.__proto__; (importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_24, r4); } } } function usePanelGestureDe(a0, a1) { // fn#118225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:35952, owner: VoicePanelUI.usePanelGesture.De, offset: 0x024d2423, size: 111 bytes, params: 3, frame: 12 let value = a1 != null; if (value && a0 !== a1) { value = environment.__proto__.__proto__; if (a0 !== VoicePanelModes.PANEL) { if (a0 === VoicePanelModes.PIP) { JsxRuntimeModule.jsxs.set(true); } } else if (a1 === VoicePanelModes.PIP) { JsxRuntimeModule.jsxs.set(false); } else if (a0 === VoicePanelModes.PIP) { JsxRuntimeModule.jsxs.set(true); } } } function Me() { // fn#118226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:36248, owner: VoicePanelUI.usePanelGesture.Me, offset: 0x024d2492, size: 210 bytes, params: 1, frame: 16 const modeBinding = mode; let get = modeBinding.get; const value2 = Reflect.apply(get, modeBinding, []); const PIP = VoicePanelModes.PIP; const value4 = value2 === PIP; const r1 = value4 || focused.get() != null; const object = {}; object.pointerEvents = value4 ? 'none' : 'auto'; const value9 = !r1; object.scrollEnabled = value9; object.showsVerticalScrollIndicator = !JsxRuntimeModule.jsxs.get() && value9; const object2 = {}; const defaultImport = CalculateVoicePanelHeaderSpecs; const safeAreaBinding = safeArea; const height = defaultImport(safeAreaBinding.get(), env0_31).height; get = safeAreaBinding.get; object2.top = height - Reflect.apply(get, safeAreaBinding, []).top; get = safeAreaBinding.get; object2.bottom = Reflect.apply(get, safeAreaBinding, []).bottom; object.scrollIndicatorInsets = object2; return object; } function _fun118227(a0, a1) { // fn#118227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:36688, offset: 0x024d2564, size: 24 bytes, params: 3, frame: 11 JsxRuntimeModule.jsx.set(a1); } function Te() { // fn#118228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:36745, owner: VoicePanelUI.usePanelGesture.Te, offset: 0x024d257c, size: 259 bytes, params: 1, frame: 16 var binding; var wrapperDimensionsBinding; var drawerY; var wrapperOffsetBinding; var gestureActive; var value4; var value5; var windowDimensionsBinding; var height; var Math; const modeBinding = mode; let get = modeBinding.get; const value2 = Reflect.apply(get, modeBinding, []); const PIP = VoicePanelModes.PIP; if (PIP === value2) { return 0; } const DISMISSED = VoicePanelModes.DISMISSED; if (DISMISSED === value2) { return 0; } const connectedBinding = connected; get = connectedBinding.get; if (Reflect.apply(get, connectedBinding, [])) { binding = env0_29; get = binding.get; if (Reflect.apply(get, binding, []).active) { binding = env0_29; get = binding.get; if (Reflect.apply(get, binding, []).requiresPop) { return 1; } wrapperDimensionsBinding = wrapperDimensions; get = wrapperDimensionsBinding.get; drawerY = Reflect.apply(get, wrapperDimensionsBinding, []).drawerY; wrapperOffsetBinding = wrapperOffset; get = wrapperOffsetBinding.get; gestureActive = Reflect.apply(get, wrapperOffsetBinding, []).gestureActive; value4 = 0; value5 = drawerY + (gestureActive ? wrapperOffset.get().y : value4); windowDimensionsBinding = windowDimensions; get = windowDimensionsBinding.get; height = Reflect.apply(get, windowDimensionsBinding, []).height; Math = global.Math; return Math.min(global.Math.max((height - value5) / height, value4), 1); } } wrapperDimensionsBinding = wrapperDimensions; get = wrapperDimensionsBinding.get; drawerY = Reflect.apply(get, wrapperDimensionsBinding, []).drawerY; wrapperOffsetBinding = wrapperOffset; get = wrapperOffsetBinding.get; gestureActive = Reflect.apply(get, wrapperOffsetBinding, []).gestureActive; value4 = 0; value5 = drawerY + (gestureActive ? wrapperOffset.get().y : value4); windowDimensionsBinding = windowDimensions; get = windowDimensionsBinding.get; height = Reflect.apply(get, windowDimensionsBinding, []).height; Math = global.Math; const min = Math.min; const Math2 = global.Math; return Reflect.apply(min, Math, [Math2.max((height - value5) / height, value4), 1]); } } function _fun118229(a0) { // fn#118229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:37448, offset: 0x024d267f, size: 43 bytes, params: 2, frame: 13 let value = environment.__proto__; value = VoicePanelStore.getState(); value.setChannelPanelOpen(channelId, a0); } function _fun118230(a0) { // fn#118230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:37524, offset: 0x024d26aa, size: 43 bytes, params: 2, frame: 13 let value = environment.__proto__; value = VoicePanelStore.getState(); value.setChannelPanelPIP(channelId, a0); } function _fun118231() { // fn#118231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:37792, offset: 0x024d26d5, size: 21 bytes, params: 1, frame: 9 Module00057.lock(); } function _fun118232() { // fn#118232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15642:37828, offset: 0x020f0b94, size: 18 bytes, params: 1, frame: 11 return env0_1(true); } } } global.__d(_fun118171, 15445, [57, 31, 27, 4606, 9559, 7710, 11795, 11793, 4299, 11796, 33, 3, 4577, 4501, 697, 4017, 1581, 11794, 1585, 5321, 7739, 11282, 15446, 4081, 15439, 3860, 11799, 10734, 15444, 15432, 11624, 10684, 4827, 8141, 12991, 6771, 6789, 690, 15447, 6517, 15448, 15449, 8088, 15450, 15452, 15483, 15511, 15513, 15562, 2]) /* metro module 15445, dependencies: [57, 31, 27, 4606, 9559, 7710, 11795, 11793, 4299, 11796, 33, 3, 4577, 4501, 697, 4017, 1581, 11794, 1585, 5321, 7739, 11282, 15446, 4081, 15439, 3860, 11799, 10734, 15444, 15432, 11624, 10684, 4827, 8141, 12991, 6771, 6789, 690, 15447, 6517, 15448, 15449, 8088, 15450, 15452, 15483, 15511, 15513, 15562, 2] */;