433 lines
27 KiB
TypeScript
433 lines
27 KiB
TypeScript
/* Metro module 12800; source: design/components/ContextMenu/native/ContextMenuPopout.native.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 8813, 4017, 4508, 5463, 1478, 477, 4577, 8812, 5321, 4573, 12798, 4559, 4562, 1244, 2] */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import UseWindowDimensionsNative from '../../../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../modules/safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
|
|
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 PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as TransitionGroupModule from '../../TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
|
|
import * as BackdropNativeModule from '../../Backdrop/native/Backdrop.native.tsx'; /* Metro dependency 4562 */
|
|
import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
|
|
import * as ContextMenuConstantsNativeModule from './ContextMenuConstants.native.tsx'; /* Metro dependency 8813 */
|
|
import * as ContextMenuItemNativeModule from './ContextMenuItem.native.tsx'; /* Metro dependency 12798 */
|
|
|
|
function _fun97641(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:6, offset: 0x0218b393, size: 659 bytes, params: 8, frame: 25
|
|
let env0_0 = require;
|
|
const renderMenuItems = function(a0) {
|
|
var items = a0.items;
|
|
var env0_0 = items;
|
|
var env0_1 = a0.title;
|
|
var env0_2 = a0.state;
|
|
var env0_3 = a0.onPress;
|
|
var env0_4 = a0.dividerIndexes;
|
|
return items.map(_fun97644);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_3 = Module00057;
|
|
let env0_4 = ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_5 = value.View;
|
|
const StyleSheet = value.StyleSheet;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.Fragment;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
let createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {'position': 'absolute', 'backgroundColor': null, 'borderWidth': 1};
|
|
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
|
|
object2.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
|
|
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object2.borderColor = BORDER_SUBTLE;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
const CONTEXT_MENU_MIN_WIDTH = (ContextMenuConstantsNativeModule).CONTEXT_MENU_MIN_WIDTH;
|
|
object2.minWidth = CONTEXT_MENU_MIN_WIDTH;
|
|
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
|
copyDataProperties(object2, SHADOW_HIGH, undefined);
|
|
object.container = object2;
|
|
const CONTEXT_MENU_ITEM_PADDING = (ContextMenuConstantsNativeModule).CONTEXT_MENU_ITEM_PADDING;
|
|
object.titleContainer = {padding: CONTEXT_MENU_ITEM_PADDING};
|
|
const object4 = {};
|
|
const CONTEXT_MENU_DIVIDER_HEIGHT = (ContextMenuConstantsNativeModule).CONTEXT_MENU_DIVIDER_HEIGHT;
|
|
object4.borderBottomWidth = CONTEXT_MENU_DIVIDER_HEIGHT;
|
|
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object4.borderBottomColor = BORDER_SUBTLE;
|
|
object.divider = object4;
|
|
const env0_9 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: "function ContextMenuPopoutNativeTsx1(){const{maxHeight,height,CONTEXT_MENU_MIN_WIDTH,positionY,positionX,CONTEXT_MENU_MIN_SCALE,withSpring,interpolate,visible,CONTEXT_MENU_SPRING,transitionState,TransitionStates,runOnJS,cleanUp,onClose}=this.__closure;const visibleHeight=Math.min(maxHeight,height);const halfHeight=visibleHeight/2;const halfWidth=CONTEXT_MENU_MIN_WIDTH/2;const translateYDirection=positionY==='below'?-1:1;const translateXDirection=positionX==='left'?-1:1;const translateY=translateYDirection*halfHeight+CONTEXT_MENU_MIN_SCALE*-translateYDirection*halfHeight;const translateX=translateXDirection*halfWidth+CONTEXT_MENU_MIN_SCALE*-translateXDirection*halfWidth;return{opacity:withSpring(interpolate(visible.get(),[0,1],[0,1]),CONTEXT_MENU_SPRING,'respect-motion-settings',function(finished){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();runOnJS(onClose)();}}),transform:[{translateX:withSpring(interpolate(visible.get(),[0,1],[translateX,0]),CONTEXT_MENU_SPRING)},{translateY:withSpring(interpolate(visible.get(),[0,1],[translateY,0]),CONTEXT_MENU_SPRING)},{scale:withSpring(interpolate(visible.get(),[0,1],[CONTEXT_MENU_MIN_SCALE,1]),CONTEXT_MENU_SPRING)}]};}"};
|
|
object = {code: 'function ContextMenuPopoutNativeTsx2(finished){const{transitionState,TransitionStates,runOnJS,cleanUp,onClose}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();runOnJS(onClose)();}}'};
|
|
object = {code: 'function update_ContextMenuPopoutNativeTsx3(e){const{updateContextMenuState,state}=this.__closure;updateContextMenuState(e.absoluteX,e.absoluteY,state);}'};
|
|
object = {code: 'function ContextMenuPopoutNativeTsx4(){const{state,runOnJS,requestClose}=this.__closure;const{activeIndex:activeIndex}=state;const isDismiss=activeIndex.get()===-1;runOnJS(requestClose)(isDismiss);}'};
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
createStyles = value.createStyles;
|
|
object = {};
|
|
const CONTEXT_MENU_BACKDROP_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTEXT_MENU_BACKDROP_BACKGROUND;
|
|
object.backdrop = {backgroundColor: CONTEXT_MENU_BACKDROP_BACKGROUND};
|
|
const object6 = {};
|
|
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
|
object6['height'] = 'auto';
|
|
object.accessibleDismiss = object6;
|
|
const env0_14 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: 'function ContextMenuPopoutNativeTsx5(){const{withSpring,visible,CONTEXT_MENU_SPRING}=this.__closure;return{opacity:withSpring(visible.get(),CONTEXT_MENU_SPRING)};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuPopout.native.tsx');
|
|
exports.ContextMenuPopout = ContextMenuPopout;
|
|
function ContextMenuDivider() { // fn#97642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:2461, offset: 0x0218b626, size: 41 bytes, params: 1, frame: 14
|
|
const styles = useStyles();
|
|
return <View style={styles.divider} />;
|
|
}
|
|
|
|
function renderMenuItems({items, title, state, onPress, dividerIndexes}) { // fn#97643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:2531, offset: 0x0218b64f, size: 71 bytes, params: 2, frame: 12
|
|
return items.map(_fun97644);
|
|
function _fun97644({label, action, iconSource, IconComponent, trailingIndicator, variant, accessibilityRole}, a1) { // fn#97644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:2624, offset: 0x0218b696, size: 332 bytes, params: 3, frame: 29
|
|
var r0;
|
|
const value2 = items.length - 1;
|
|
const ContextMenuItem = (ContextMenuItemNativeModule).ContextMenuItem;
|
|
const r16 = a1 === 0 && title == null;
|
|
const dividerIndexesBinding = dividerIndexes;
|
|
let value = (
|
|
<ContextMenuItem
|
|
index={a1}
|
|
label={label}
|
|
start={r16}
|
|
end={a1 === value2}
|
|
lastInSection={dividerIndexesBinding.includes(a1 + 1)}
|
|
iconSource={iconSource}
|
|
IconComponent={IconComponent}
|
|
trailingIndicator={trailingIndicator}
|
|
state={state}
|
|
onPress={onPress_97645}
|
|
variant={variant}
|
|
accessibilityRole={accessibilityRole}
|
|
key={'' + label + '-' + a1}
|
|
/>
|
|
);
|
|
if (dividerIndexesBinding.includes(a1)) {
|
|
value = (
|
|
<>
|
|
<ContextMenuDivider key={'divider-' + a1} />
|
|
{value}
|
|
</>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function onPress_97645(a0) { // fn#97645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:2917, offset: 0x0218b7e2, size: 109 bytes, params: 2, frame: 13
|
|
var r1;
|
|
let value = environment.__proto__.__proto__;
|
|
const isAndroid2 = (PlatformUtilsModule).isAndroid();
|
|
if (isAndroid2) {
|
|
value = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
|
|
value = value.getIsScreenReaderEnabled();
|
|
r1 = value;
|
|
} else {
|
|
r1 = isAndroid2;
|
|
}
|
|
if (r1) {
|
|
action();
|
|
}
|
|
value = environment.__proto__;
|
|
if (onPress != null) {
|
|
onPress(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function ContextMenuBackdrop({onPress, visible}) { // fn#97646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:3467, offset: 0x0218b84f, size: 334 bytes, params: 2, frame: 21
|
|
const styles = useStyles();
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const ContextMenuBackdropN2 = ContextMenuBackdropN;
|
|
const object = {};
|
|
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object.visible = visible;
|
|
const CONTEXT_MENU_SPRING = (ContextMenuConstantsNativeModule).CONTEXT_MENU_SPRING;
|
|
object.CONTEXT_MENU_SPRING = CONTEXT_MENU_SPRING;
|
|
ContextMenuBackdropN2.__closure = object;
|
|
ContextMenuBackdropN2.__workletHash = 6862317967896;
|
|
ContextMenuBackdropN2.__initData = env0_15;
|
|
const value2 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ContextMenuBackdropN2]);
|
|
const Backdrop = (BackdropNativeModule).Backdrop;
|
|
const items2 = [styles.backdrop, value2];
|
|
const isAndroid2 = (PlatformUtilsModule).isAndroid();
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
return (
|
|
<Backdrop
|
|
blur="none"
|
|
style={items2}
|
|
accessibleDismissStyle={styles.accessibleDismiss}
|
|
onDismiss={onPress}
|
|
accessibilityLabel={isAndroid2 ? Reflect.apply(string, intl, [t.hPBScv]) : Reflect.apply(string, intl,
|
|
[t.xs0juG])}
|
|
/>
|
|
);
|
|
function ContextMenuBackdropN() { // fn#97647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:3562, owner: ContextMenuBackdrop.n, offset: 0x0218b99d, size: 78 bytes, params: 1, frame: 17
|
|
let value = environment.__proto__;
|
|
value = require(4577) /* metro dependency 4577: spring */;
|
|
const withSpring = value.withSpring;
|
|
const value3 = visible.get();
|
|
const CONTEXT_MENU_SPRING = (ContextMenuConstantsNativeModule).CONTEXT_MENU_SPRING;
|
|
return {opacity: Reflect.apply(withSpring, value, [value3, CONTEXT_MENU_SPRING])};
|
|
}
|
|
|
|
}
|
|
|
|
function ContextMenuPopout({menu, transitionState, cleanUp}) { // fn#97648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:4157, offset: 0x0218b9eb, size: 1316 bytes, params: 2, frame: 39
|
|
const x = menu.x;
|
|
const positionX = menu.positionX;
|
|
const positionY = menu.positionY;
|
|
const positionY2 = positionY;
|
|
const height = menu.height;
|
|
const height3 = height;
|
|
const items2 = menu.items;
|
|
const state = menu.state;
|
|
const requestClose = menu.requestClose;
|
|
const onClose = menu.onClose;
|
|
const title = menu.title;
|
|
const keyboardShouldPersistTaps = menu.keyboardShouldPersistTaps;
|
|
const r11 = keyboardShouldPersistTaps === undefined ? 'handled' : keyboardShouldPersistTaps;
|
|
const dividerIndexes = menu.dividerIndexes;
|
|
const y = menu.y;
|
|
const useSharedValue = ReanimatedRexportModule.useSharedValue;
|
|
const TransitionStates = (TransitionGroupModule).TransitionStates;
|
|
const MOUNTED = TransitionStates.MOUNTED;
|
|
const value4 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [transitionState !== MOUNTED ? 0 : 1]);
|
|
let binding = height3;
|
|
binding.useEffect(_fun97649, [transitionState, value4]);
|
|
const styles = useStyles();
|
|
const {top,
|
|
bottom} = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
|
|
const value5 = (UseWindowDimensionsNative)({ignoreKeyboard: (PlatformUtilsModule).isAndroid()});
|
|
const width = value5.width;
|
|
const height2 = value5.height;
|
|
const value6 = positionY === 'below';
|
|
const value7 = height2 - y;
|
|
const r1 = value6 ? value7 - bottom - (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_EDGE_OFFSET : value7 - top - (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_EDGE_OFFSET;
|
|
const value13 = positionY2(height3.useState(height >= r1), 2);
|
|
const property = value13[0];
|
|
const property2 = property;
|
|
const env0_11 = value13[1];
|
|
object = {};
|
|
object[value6 ? 'top' : 'bottom'] = y;
|
|
object[positionX] = x;
|
|
object['maxHeight'] = r1;
|
|
const CONTEXT_MENU_EDGE_OFFSET = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_EDGE_OFFSET;
|
|
object['maxWidth'] = width - CONTEXT_MENU_EDGE_OFFSET - x;
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const ContextMenuPopoutW2 = ContextMenuPopoutW;
|
|
const object2 = {maxHeight: r1, height: height};
|
|
const CONTEXT_MENU_MIN_WIDTH = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_MIN_WIDTH;
|
|
object2.CONTEXT_MENU_MIN_WIDTH = CONTEXT_MENU_MIN_WIDTH;
|
|
object2.positionY = positionY;
|
|
object2.positionX = positionX;
|
|
const CONTEXT_MENU_MIN_SCALE = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_MIN_SCALE;
|
|
object2.CONTEXT_MENU_MIN_SCALE = CONTEXT_MENU_MIN_SCALE;
|
|
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object2.interpolate = ReanimatedRexportModule.interpolate;
|
|
object2.visible = value4;
|
|
const CONTEXT_MENU_SPRING = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_SPRING;
|
|
object2.CONTEXT_MENU_SPRING = CONTEXT_MENU_SPRING;
|
|
object2.transitionState = transitionState;
|
|
object2.TransitionStates = TransitionStates;
|
|
object2.runOnJS = ReanimatedRexportModule.runOnJS;
|
|
object2.cleanUp = cleanUp;
|
|
object2.onClose = onClose;
|
|
ContextMenuPopoutW2.__closure = object2;
|
|
ContextMenuPopoutW2.__workletHash = 16778623591634;
|
|
ContextMenuPopoutW2.__initData = property2;
|
|
const value16 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ContextMenuPopoutW2]);
|
|
binding = height3;
|
|
const value17 = binding.useMemo(_fun97652, [state, requestClose, property]);
|
|
const value18 = binding.useCallback(_fun97656, [r1]);
|
|
const value19 = binding.useCallback(function() {
|
|
requestClose(true);
|
|
}, [requestClose]);
|
|
const value20 = binding.useCallback(function() {
|
|
requestClose(false);
|
|
}, [requestClose]);
|
|
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
|
const contextMenuBackdrop = <ContextMenuBackdrop onPress={value19} visible={value4} />;
|
|
const GestureDetector = (Module05321Module).GestureDetector;
|
|
const ScrollView = (ReanimatedRexport).ScrollView;
|
|
const items7 = [styles.container, object, value16];
|
|
object = [
|
|
title != null
|
|
? (
|
|
<>
|
|
<View style={styles.titleContainer}>
|
|
{((Text) => <Text variant="text-md/bold" color="mobile-text-heading-primary" accessibilityRole="header">{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
|
</View>
|
|
<ContextMenuDivider />
|
|
</>
|
|
)
|
|
: null,
|
|
];
|
|
object[1] = renderMenuItems({items: items2, title: title, state: state, onPress: value20,
|
|
dividerIndexes: dividerIndexes});
|
|
return (
|
|
<>
|
|
{contextMenuBackdrop}
|
|
<GestureDetector gesture={value17}>
|
|
<ScrollView
|
|
onLayout={value18}
|
|
bounces={false}
|
|
style={items7}
|
|
keyboardShouldPersistTaps={r11}
|
|
accessibilityRole="list"
|
|
>
|
|
{object}
|
|
</ScrollView>
|
|
</GestureDetector>
|
|
</>
|
|
);
|
|
function _fun97649() { // fn#97649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:4490, offset: 0x0218bf0f, size: 85 bytes, params: 1, frame: 13
|
|
const transitionStateBinding = transitionState;
|
|
const TransitionStates = (TransitionGroupModule).TransitionStates;
|
|
const YEETED = TransitionStates.YEETED;
|
|
if (transitionStateBinding === YEETED) {
|
|
env0_8.set(0);
|
|
} else {
|
|
env0_8.set(1);
|
|
}
|
|
}
|
|
|
|
function ContextMenuPopoutW() { // fn#97650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:4969, owner: ContextMenuPopout.w, offset: 0x0218bf64, size: 755 bytes, params: 1, frame: 32
|
|
const Math = global.Math;
|
|
const min = Math.min;
|
|
const value3 = Reflect.apply(min, Math, [env0_9, height]) / 2;
|
|
const CONTEXT_MENU_MIN_WIDTH = (ContextMenuConstantsNativeModule).CONTEXT_MENU_MIN_WIDTH;
|
|
const value5 = CONTEXT_MENU_MIN_WIDTH / 2;
|
|
const positionYBinding = positionY;
|
|
const value6 = 1;
|
|
const r19 = positionYBinding !== 'below' ? value6 : -1;
|
|
const r6 = positionX !== 'left' ? value6 : -1;
|
|
const object = {};
|
|
let withSpring = SpringModule.withSpring;
|
|
let interpolate = ReanimatedRexportModule.interpolate;
|
|
const value10 = Reflect.apply(interpolate, ReanimatedRexportModule, [env0_8.get(), [0, 1], [0, 1]]);
|
|
const CONTEXT_MENU_SPRING = (ContextMenuConstantsNativeModule).CONTEXT_MENU_SPRING;
|
|
const wT2 = wT;
|
|
const object2 = {};
|
|
object2.transitionState = transitionState;
|
|
const TransitionStates = (TransitionGroupModule).TransitionStates;
|
|
object2.TransitionStates = TransitionStates;
|
|
object2.runOnJS = ReanimatedRexportModule.runOnJS;
|
|
object2.cleanUp = cleanUp;
|
|
object2.onClose = onClose;
|
|
wT2.__closure = object2;
|
|
wT2.__workletHash = 4025068986009;
|
|
wT2.__initData = env1_11;
|
|
object.opacity = Reflect.apply(withSpring, SpringModule, [value10, CONTEXT_MENU_SPRING, 'respect-motion-settings',
|
|
wT2]);
|
|
withSpring = SpringModule.withSpring;
|
|
interpolate = ReanimatedRexportModule.interpolate;
|
|
const value11 = env0_8.get();
|
|
const CONTEXT_MENU_MIN_SCALE = (ContextMenuConstantsNativeModule).CONTEXT_MENU_MIN_SCALE;
|
|
const items3 = [{translateX: Reflect.apply(withSpring, SpringModule, [Reflect.apply(interpolate, ReanimatedRexportModule,
|
|
[value11, [0, 1], [r6 * value5 + CONTEXT_MENU_MIN_SCALE * -r6 * value5, 0]]), CONTEXT_MENU_SPRING])}];
|
|
withSpring = SpringModule.withSpring;
|
|
items3[1] = {translateY: Reflect.apply(withSpring, SpringModule, [ReanimatedRexportModule.interpolate(env0_8.get(), [0, 1],
|
|
[r19 * value3 + CONTEXT_MENU_MIN_SCALE * -r19 * value3, 0]), CONTEXT_MENU_SPRING])};
|
|
withSpring = SpringModule.withSpring;
|
|
interpolate = ReanimatedRexportModule.interpolate;
|
|
let value = env0_8.get();
|
|
value = Reflect.apply(interpolate, ReanimatedRexportModule, [value, [0, 1], [CONTEXT_MENU_MIN_SCALE, value6]]);
|
|
items3[2] = {scale: Reflect.apply(withSpring, SpringModule, [value, CONTEXT_MENU_SPRING])};
|
|
object.transform = items3;
|
|
return object;
|
|
function wT(a0) { // fn#97651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:5209, owner: ContextMenuPopout.w.t, offset: 0x0218c257, size: 134 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var transitionStateBinding;
|
|
var runOnJS;
|
|
var value2;
|
|
let value = a0;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
transitionStateBinding = transitionState;
|
|
value = environment.__proto__.__proto__;
|
|
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
runOnJS = value.runOnJS;
|
|
value2 = environment.__proto__;
|
|
Reflect.apply(runOnJS, value, [cleanUp])();
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
runOnJS = value.runOnJS;
|
|
Reflect.apply(runOnJS, value, [onClose])();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun97652() { // fn#97652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:6349, offset: 0x0218c2dd, size: 188 bytes, params: 1, frame: 18
|
|
let value = _fun97653();
|
|
const Gesture = (Module05321Module).Gesture;
|
|
value = Gesture.Pan().enabled(!env0_10).onStart(value).onUpdate(value);
|
|
const onEnd = value.onEnd;
|
|
const t_976552 = t_97655;
|
|
const object = {};
|
|
object.state = state;
|
|
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
|
object.requestClose = requestClose;
|
|
t_976552.__closure = object;
|
|
t_976552.__workletHash = 14495067009140;
|
|
t_976552.__initData = env1_13;
|
|
return Reflect.apply(onEnd, value, [t_976552]);
|
|
function _fun97653() { // fn#97653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:6362, offset: 0x0218c399, size: 92 bytes, params: 1, frame: 14
|
|
const update_976542 = update_97654;
|
|
const object = {};
|
|
object.updateContextMenuState = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).updateContextMenuState;
|
|
object.state = state;
|
|
update_976542.__closure = object;
|
|
update_976542.__workletHash = 4218299258082;
|
|
update_976542.__initData = env2_12;
|
|
return update_976542;
|
|
function update_97654({absoluteX, absoluteY}) { // fn#97654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:6384, offset: 0x0218c3f5, size: 62 bytes, params: 2, frame: 16
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = require(8812) /* metro dependency 8812: ContextMenuStateNative */;
|
|
value.updateContextMenuState(absoluteX, absoluteY, state);
|
|
}
|
|
|
|
}
|
|
|
|
function t_97655() { // fn#97655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:6685, offset: 0x0218c433, size: 78 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
const value2 = state.activeIndex.get();
|
|
ReanimatedRexportModule.runOnJS(requestClose)(value2 === -1);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun97656({nativeEvent}) { // fn#97656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12990:6887, offset: 0x0218c481, size: 78 bytes, params: 2, frame: 14
|
|
const binding = env0_11;
|
|
let Math = global.Math;
|
|
const value2 = Math.round(nativeEvent.layout.height);
|
|
Math = global.Math;
|
|
binding(value2 >= Math.round(env0_9));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun97641, 12800, [57, 31, 27, 33, 4501, 697, 8813, 4017, 4508, 5463, 1478, 477, 4577, 8812, 5321, 4573,
|
|
12798, 4559, 4562, 1244,
|
|
2]) /* metro module 12800, dependencies: [57, 31, 27, 33, 4501, 697, 8813, 4017, 4508, 5463, 1478, 477, 4577, 8812, 5321, 4573, 12798, 4559, 4562, 1244, 2] */;
|