This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,8 +1,10 @@
/* Metro module 8813; source: design/components/ContextMenu/native/ContextMenuConstants.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun68910(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8998:6, offset: 0x01c61657, size: 159 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuConstants.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuConstants.native.tsx');
exports.CONTEXT_MENU_ITEM_PADDING = 12;
exports.CONTEXT_MENU_ITEM_BASE_HEIGHT = 42;
exports.CONTEXT_MENU_DIVIDER_HEIGHT = 4;
@@ -14,3 +16,4 @@ function _fun68910(global, require, importDefault, importAll, module, exports, d
'restDisplacementThreshold': 0.001};
}
global.__d(_fun68910, 8813, [2]) /* metro module 8813, dependencies: [2] */;
@@ -1,4 +1,15 @@
/* Metro module 12799; source: design/components/ContextMenu/native/ContextMenuContainer.native.tsx; dependencies: [31, 27, 33, 4501, 12800, 8812, 1599, 4509, 4555, 4508, 2] */
import OverlayView from '../../../void/OverlayView/native/OverlayView.tsx'; /* Metro dependency 4509 */
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 Module01599Module from '../../../../by-id/module-01599.js'; /* Metro dependency 1599 */
import * as TransitionGroupModule from '../../TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as DialogNativeModule from '../../Dialog/native/Dialog.native.tsx'; /* Metro dependency 4555 */
import * as ContextMenuStateNativeModule from './ContextMenuState.native.tsx'; /* Metro dependency 8812 */
import * as ContextMenuPopoutNativeModule from './ContextMenuPopout.native.tsx'; /* Metro dependency 12800 */
function _fun97632(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:6, offset: 0x0218b024, size: 284 bytes, params: 8, frame: 22
const env0_0 = require;
const getItemKey_97633 = function(a0) {
@@ -6,81 +17,87 @@ function _fun97632(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
object['zIndex'] = 99999;
const env0_6 = Reflect.apply(createStyles, value, [{overlayView: object,
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['zIndex'] = 99999;
const env0_6 = Reflect.apply(createStyles, value, [{overlayView: object2,
wrapperView: StyleSheet.absoluteFillObject}]);
const env0_7 = [];
const EMPTY_CALLBACK = function() {
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuContainer.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuContainer.native.tsx');
exports.ContextMenuContainer = ContextMenuContainer;
function renderItem_97635(a0, a1, a2, a3) { // fn#97635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:342, offset: 0x0218b140, size: 73 bytes, params: 5, frame: 15
const ContextMenuPopout = (ContextMenuPopoutNativeModule).ContextMenuPopout;
return (
<ContextMenuPopout
menu={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function ContextMenuContainer() { // fn#97636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:547, offset: 0x0218b189, size: 269 bytes, params: 1, frame: 19
const value2 = undefined;
const styles = useStyles();
const value3 = (ContextMenuStateNativeModule).useActiveContextMenu();
const r5 = value3 != null ? [value3] : env0_7;
const r1 = (value3 == null ? value2 : value3.requestClose) ?? EMPTY_CALLBACK;
ReactModule.useEffect(function() {
var KeyboardEvents = require(dependencyMap[6]).KeyboardEvents;
var env0_0 = KeyboardEvents.addListener('keyboardDidHide', require(dependencyMap[5]).hideContextMenu);
return _fun97638;
}, []);
const value5 = ReactModule.useCallback(_fun97640, [ReactModule.useCallback(_fun97639, [r1]), styles.overlayView,
styles.wrapperView]);
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<TransitionGroup
wrapChildren={value5}
items={r5}
renderItem={renderItem_97635}
getItemKey={getItemKey_97633}
/>
);
function _fun97637() { // fn#97637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:712, offset: 0x0218b296, size: 82 bytes, params: 1, frame: 16
const KeyboardEvents = (Module01599Module).KeyboardEvents;
const env0_0 = KeyboardEvents.addListener('keyboardDidHide',
(ContextMenuStateNativeModule).hideContextMenu);
return _fun97638;
function _fun97638() { // fn#97638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:807, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
}
function _fun97639() { // fn#97639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:851, offset: 0x01d4f9cc, size: 18 bytes, params: 1, frame: 11
env0_1(true);
}
function _fun97640(a0, a1) { // fn#97640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:886, offset: 0x0218b2e8, size: 171 bytes, params: 3, frame: 20
const r7 = a1.length !== 0 ? 'auto' : 'none';
const Dialog = (DialogNativeModule).Dialog;
return (
<OverlayView style={styles.overlayView}>
<View pointerEvents={r7} style={styles.wrapperView}>
<Dialog onDismiss={env0_2}>
{a0}
</Dialog>
</View>
</OverlayView>
);
}
}
}
function renderItem_97635(a0, a1, a2, a3) { // fn#97635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:342, offset: 0x0218b140, size: 73 bytes, params: 5, frame: 15
const ContextMenuPopout = (require(12800) /* metro dependency 12800: ContextMenuPopoutNative */).ContextMenuPopout;
return (
<ContextMenuPopout
menu={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function ContextMenuContainer() { // fn#97636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:547, offset: 0x0218b189, size: 269 bytes, params: 1, frame: 19
const value2 = undefined;
const styles = useStyles();
const value3 = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).useActiveContextMenu();
const r5 = value3 != null ? [value3] : env0_7;
const r1 = (value3 == null ? value2 : value3.requestClose) ?? EMPTY_CALLBACK;
const binding = env0_3;
binding.useEffect(function() {
var KeyboardEvents = require(dependencyMap[6]).KeyboardEvents;
var env0_0 = KeyboardEvents.addListener('keyboardDidHide', require(dependencyMap[5]).hideContextMenu);
return _fun97638;
}, []);
const value5 = binding.useCallback(_fun97640, [binding.useCallback(_fun97639, [r1]), styles.overlayView,
styles.wrapperView]);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
wrapChildren={value5}
items={r5}
renderItem={renderItem_97635}
getItemKey={getItemKey_97633}
/>
);
}
function _fun97637() { // fn#97637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:712, offset: 0x0218b296, size: 82 bytes, params: 1, frame: 16
const KeyboardEvents = (require(1599) /* metro dependency 1599 */).KeyboardEvents;
const env0_0 = KeyboardEvents.addListener('keyboardDidHide',
(require(8812) /* metro dependency 8812: ContextMenuStateNative */).hideContextMenu);
return _fun97638;
}
function _fun97640(a0, a1) { // fn#97640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12989:886, offset: 0x0218b2e8, size: 171 bytes, params: 3, frame: 20
const OverlayView = importDefault(4509) /* metro dependency 4509: OverlayView */;
const r7 = a1.length !== 0 ? 'auto' : 'none';
const Dialog = (require(4555) /* metro dependency 4555: DialogNative */).Dialog;
return (
<OverlayView style={styles.overlayView}>
<View pointerEvents={r7} style={styles.wrapperView}>
<Dialog onDismiss={env0_2}>
{a0}
</Dialog>
</View>
</OverlayView>
);
}
global.__d(_fun97632, 12799, [31, 27, 33, 4501, 12800, 8812, 1599, 4509, 4555, 4508,
2]) /* metro module 12799, dependencies: [31, 27, 33, 4501, 12800, 8812, 1599, 4509, 4555, 4508, 2] */;
@@ -1,176 +1,210 @@
/* Metro module 12798; source: design/components/ContextMenu/native/ContextMenuItem.native.tsx; dependencies: [31, 27, 33, 4017, 4501, 8813, 697, 1357, 8812, 4577, 4581, 4580, 4573, 2] */
import MobileVisualRefreshExperiment from '../../../../modules/themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as ContextMenuStateNativeModule from './ContextMenuState.native.tsx'; /* Metro dependency 8812 */
import * as ContextMenuConstantsNativeModule from './ContextMenuConstants.native.tsx'; /* Metro dependency 8813 */
function _fun97623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:6, offset: 0x0218a63a, size: 277 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Pressable = (require(27) /* metro dependency 27 */).Pressable;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun97624);
const Pressable = (ReactNativeModule).Pressable;
const env0_6 = (ReanimatedRexport).createAnimatedComponent(Pressable);
const env0_7 = (CreateStylesModule).createStyles(_fun97624);
object = {code: 'function ContextMenuItemNativeTsx1(){const{pan}=this.__closure;return pan.get();}'};
object = {code: 'function ContextMenuItemNativeTsx2(_current,previous){const{measure,ref,index,INDEX_BOUNDS_OFFSET,itemMeasurements,INDEX_BOUNDS_PAGE_X_OFFSET,INDEX_BOUNDS_PAGE_Y_OFFSET,INDEX_BOUNDS_WIDTH_OFFSET,INDEX_BOUNDS_HEIGHT_OFFSET}=this.__closure;if(previous==null||_current===previous)return;const measurements=measure(ref);if(measurements!=null){const{pageX:pageX,pageY:pageY,width:width,height:height}=measurements;const offset=index*INDEX_BOUNDS_OFFSET;itemMeasurements.get()[offset+INDEX_BOUNDS_PAGE_X_OFFSET]=pageX;itemMeasurements.get()[offset+INDEX_BOUNDS_PAGE_Y_OFFSET]=pageY;itemMeasurements.get()[offset+INDEX_BOUNDS_WIDTH_OFFSET]=width;itemMeasurements.get()[offset+INDEX_BOUNDS_HEIGHT_OFFSET]=height;}}'};
object = {code: "function ContextMenuItemNativeTsx3(){const{activeIndex,index,pressed,withSpring,backgroundColor,SUBTLE_SPRING}=this.__closure;const isActive=activeIndex.get()===index||pressed.get()===1;return{backgroundColor:withSpring(isActive?backgroundColor:'transparent',SUBTLE_SPRING,'animate-always')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuItem.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuItem.native.tsx');
exports.ContextMenuItem = ContextMenuItem;
}
function _fun97624(a0) { // fn#97624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:214, offset: 0x0218a74f, size: 406 bytes, params: 2, frame: 17
const object = {};
const object2 = {'padding': null, 'minHeight': null, 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', 'gap': 8};
const CONTEXT_MENU_ITEM_PADDING = (ContextMenuConstantsNativeModule).CONTEXT_MENU_ITEM_PADDING;
object2.padding = CONTEXT_MENU_ITEM_PADDING;
const CONTEXT_MENU_ITEM_BASE_HEIGHT = (ContextMenuConstantsNativeModule).CONTEXT_MENU_ITEM_BASE_HEIGHT;
object2.minHeight = CONTEXT_MENU_ITEM_BASE_HEIGHT;
object.container = object2;
object.containerRefresh = {justifyContent: 'flex-start'};
const object4 = {};
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.roundedTop = object4;
const object5 = {};
object5.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.roundedBottom = object5;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.border = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object.pressed = {backgroundColor: BACKGROUND_MOD_SUBTLE};
object.icon = {'width': 20, 'height': 20,
tintColor: a0 === 'destructive' ? (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL : (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG};
object.label = {flexShrink: 1};
object.trailingIndicator = {marginLeft: 'auto'};
return object;
}
function _fun97624(a0) { // fn#97624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:214, offset: 0x0218a74f, size: 406 bytes, params: 2, frame: 17
const object3 = {};
const object6 = {'padding': null, 'minHeight': null, 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', 'gap': 8};
const CONTEXT_MENU_ITEM_PADDING = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_ITEM_PADDING;
object6.padding = CONTEXT_MENU_ITEM_PADDING;
const CONTEXT_MENU_ITEM_BASE_HEIGHT = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_ITEM_BASE_HEIGHT;
object6.minHeight = CONTEXT_MENU_ITEM_BASE_HEIGHT;
object3.container = object6;
object3.containerRefresh = {justifyContent: 'flex-start'};
const object7 = {};
object7.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object7.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.roundedTop = object7;
const object8 = {};
object8.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object8.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.roundedBottom = object8;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.border = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object3.pressed = {backgroundColor: BACKGROUND_MOD_SUBTLE};
object3.icon = {'width': 20, 'height': 20,
tintColor: a0 === 'destructive' ? (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL : (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG};
object3.label = {flexShrink: 1};
object3.trailingIndicator = {marginLeft: 'auto'};
return object3;
}
function ContextMenuItem({label, IconComponent, trailingIndicator, iconSource, start, end, lastInSection, index, state, onPress, variant, accessibilityRole}) { // fn#97625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:2183, offset: 0x0218a8e5, size: 1239 bytes, params: 2, frame: 39
var object2;
variant = variant === undefined ? 'default' : variant;
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useAnimatedRef();
const styles = useStyles(variant);
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ContextMenuItem');
const pan = state.pan;
const itemMeasurements = state.itemMeasurements;
const env0_3 = itemMeasurements;
const activeIndex = state.activeIndex;
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = function() {
return pan.get();
};
closure.__closure = {pan: pan};
closure.__workletHash = 11852115418144;
closure.__initData = env0_8;
const closure2 = ContextMenuItemP;
object2 = {measure: reanimatedRexportModule.measure, ref: value2, index: index};
const INDEX_BOUNDS_OFFSET = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_OFFSET;
object2.INDEX_BOUNDS_OFFSET = INDEX_BOUNDS_OFFSET;
object2.itemMeasurements = itemMeasurements;
const INDEX_BOUNDS_PAGE_X_OFFSET = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_PAGE_X_OFFSET;
object2.INDEX_BOUNDS_PAGE_X_OFFSET = INDEX_BOUNDS_PAGE_X_OFFSET;
const INDEX_BOUNDS_PAGE_Y_OFFSET = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_PAGE_Y_OFFSET;
object2.INDEX_BOUNDS_PAGE_Y_OFFSET = INDEX_BOUNDS_PAGE_Y_OFFSET;
const INDEX_BOUNDS_WIDTH_OFFSET = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_WIDTH_OFFSET;
object2.INDEX_BOUNDS_WIDTH_OFFSET = INDEX_BOUNDS_WIDTH_OFFSET;
const INDEX_BOUNDS_HEIGHT_OFFSET = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_HEIGHT_OFFSET;
object2.INDEX_BOUNDS_HEIGHT_OFFSET = INDEX_BOUNDS_HEIGHT_OFFSET;
closure2.__closure = object2;
closure2.__workletHash = 9571959267234;
closure2.__initData = env0_9;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const backgroundColor = styles.pressed.backgroundColor;
const env0_6 = backgroundColor;
const moduleValue4 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = ContextMenuItemR;
object2 = {activeIndex: activeIndex, index: index, pressed: value4};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.backgroundColor = backgroundColor;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 624481847983;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const r14 = IconComponent != null ? <IconComponent size="sm" color={styles.icon.tintColor} /> : iconSource != null ? ((Component) => <Component source={iconSource} style={styles.icon} />)(importDefault(4580) /* metro dependency 4580: Icon */) : null;
const r9 = trailingIndicator != null ? ((Component) => <Component size="sm" color={styles.icon.tintColor} />)(trailingIndicator) : null;
let binding = env0_3;
const value10 = binding.useCallback(_fun97629, [index, itemMeasurements]);
const value11 = binding.useCallback(function() {
activeIndex.set(index);
}, [activeIndex, index]);
const value12 = binding.useCallback(function() {
activeIndex.set(-1);
}, [activeIndex]);
binding = env0_6;
const items3 = [styles.container];
items3[1] = value3 && styles.containerRefresh;
items3[2] = !end && !lastInSection && styles.border;
items3[3] = start && styles.roundedTop;
items3[4] = end && styles.roundedBottom;
items3[5] = value5;
const items2 = [value3 && ((View) => <View>{r14}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text animated variant="text-md/medium" style={styles.label} color={variant !== 'destructive' ? 'text-strong' : 'text-feedback-critical'}>{label}</Text>;
items2[2] = !value3 && ((View) => <View>{r14}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
items2[3] = r9 != null && ((View) => <View style={styles.trailingIndicator}>{r9}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
return ((Component) => <Component ref={value2} style={items3} onLayout={value10} onPressIn={value11} onPressOut={value12} onPress={onPress} accessibilityRole={accessibilityRole}>{items2}</Component>)(binding);
}
function ContextMenuItemP(a0, a1) { // fn#97627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:2632, owner: ContextMenuItem.p, offset: 0x0218adbc, size: 276 bytes, params: 3, frame: 20
var value;
var value3;
var pageX;
var pageY;
var width;
var height;
if (a1 != null) {
if (a0 !== a1) {
value = environment.__proto__;
value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).measure(env0_1);
if (value3 != null) {
pageX = value3.pageX;
pageY = value3.pageY;
width = value3.width;
height = value3.height;
value = index * (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_OFFSET;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_PAGE_X_OFFSET] = pageX;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_PAGE_Y_OFFSET] = pageY;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_WIDTH_OFFSET] = width;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_HEIGHT_OFFSET] = height;
function ContextMenuItem({label, IconComponent, trailingIndicator, iconSource, start, end, lastInSection, index, state, onPress, variant, accessibilityRole}) { // fn#97625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:2183, offset: 0x0218a8e5, size: 1239 bytes, params: 2, frame: 39
variant = variant === undefined ? 'default' : variant;
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const value2 = (ReanimatedRexportModule).useAnimatedRef();
const styles = useStyles(variant);
const value3 = (MobileVisualRefreshExperiment)('ContextMenuItem');
const pan = state.pan;
const itemMeasurements = state.itemMeasurements;
const itemMeasurements2 = itemMeasurements;
const activeIndex = state.activeIndex;
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
let closure = function() {
return pan.get();
};
closure.__closure = {pan: pan};
closure.__workletHash = 11852115418144;
closure.__initData = env0_8;
const ContextMenuItemP2 = ContextMenuItemP;
object = {measure: ReanimatedRexportModule.measure, ref: value2, index: index};
const INDEX_BOUNDS_OFFSET = (ContextMenuStateNativeModule).INDEX_BOUNDS_OFFSET;
object.INDEX_BOUNDS_OFFSET = INDEX_BOUNDS_OFFSET;
object.itemMeasurements = itemMeasurements;
const INDEX_BOUNDS_PAGE_X_OFFSET = (ContextMenuStateNativeModule).INDEX_BOUNDS_PAGE_X_OFFSET;
object.INDEX_BOUNDS_PAGE_X_OFFSET = INDEX_BOUNDS_PAGE_X_OFFSET;
const INDEX_BOUNDS_PAGE_Y_OFFSET = (ContextMenuStateNativeModule).INDEX_BOUNDS_PAGE_Y_OFFSET;
object.INDEX_BOUNDS_PAGE_Y_OFFSET = INDEX_BOUNDS_PAGE_Y_OFFSET;
const INDEX_BOUNDS_WIDTH_OFFSET = (ContextMenuStateNativeModule).INDEX_BOUNDS_WIDTH_OFFSET;
object.INDEX_BOUNDS_WIDTH_OFFSET = INDEX_BOUNDS_WIDTH_OFFSET;
const INDEX_BOUNDS_HEIGHT_OFFSET = (ContextMenuStateNativeModule).INDEX_BOUNDS_HEIGHT_OFFSET;
object.INDEX_BOUNDS_HEIGHT_OFFSET = INDEX_BOUNDS_HEIGHT_OFFSET;
ContextMenuItemP2.__closure = object;
ContextMenuItemP2.__workletHash = 9571959267234;
ContextMenuItemP2.__initData = env0_9;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, ContextMenuItemP2]);
const backgroundColor = styles.pressed.backgroundColor;
const backgroundColor2 = backgroundColor;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = ContextMenuItemR;
object = {activeIndex: activeIndex, index: index, pressed: value4};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.backgroundColor = backgroundColor;
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object;
closure.__workletHash = 624481847983;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const r14 = (
IconComponent != null
? (
<IconComponent size="sm" color={styles.icon.tintColor} />
)
: (
iconSource != null
? ((Component) => <Component source={iconSource} style={styles.icon} />)(importDefault(4580) /* metro dependency 4580: Icon */)
: null
)
);
const r9 = (
trailingIndicator != null
? ((Component) => <Component size="sm" color={styles.icon.tintColor} />)(trailingIndicator)
: null
);
let binding = itemMeasurements2;
const value10 = binding.useCallback(_fun97629, [index, itemMeasurements]);
const value11 = binding.useCallback(function() {
activeIndex.set(index);
}, [activeIndex, index]);
const value12 = binding.useCallback(function() {
activeIndex.set(-1);
}, [activeIndex]);
binding = backgroundColor2;
const items3 = [styles.container];
items3[1] = value3 && styles.containerRefresh;
items3[2] = !end && !lastInSection && styles.border;
items3[3] = start && styles.roundedTop;
items3[4] = end && styles.roundedBottom;
items3[5] = value5;
const items2 = [
value3 && ((View) => <View>{r14}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View),
];
const Text = (TextModule).Text;
items2[1] = (
<Text
animated
variant="text-md/medium"
style={styles.label}
color={variant !== 'destructive' ? 'text-strong' : 'text-feedback-critical'}
>
{label}
</Text>
);
items2[2] = !value3 && ((View) => <View>{r14}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
items2[3] = r9 != null && ((View) => <View style={styles.trailingIndicator}>{r9}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
return ((Component) => <Component ref={value2} style={items3} onLayout={value10} onPressIn={value11} onPressOut={value12} onPress={onPress} accessibilityRole={accessibilityRole}>{items2}</Component>)(binding);
function ContextMenuItemP(a0, a1) { // fn#97627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:2632, owner: ContextMenuItem.p, offset: 0x0218adbc, size: 276 bytes, params: 3, frame: 20
var value;
var value3;
var pageX;
var pageY;
var width;
var height;
if (a1 != null) {
if (a0 !== a1) {
value = environment.__proto__;
value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).measure(env0_1);
if (value3 != null) {
pageX = value3.pageX;
pageY = value3.pageY;
width = value3.width;
height = value3.height;
value = index * (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_OFFSET;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_PAGE_X_OFFSET] = pageX;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_PAGE_Y_OFFSET] = pageY;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_WIDTH_OFFSET] = width;
itemMeasurements.get()[value + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_HEIGHT_OFFSET] = height;
}
}
}
}
}
}
function ContextMenuItemR() { // fn#97628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:3451, owner: ContextMenuItem.R, offset: 0x0218aed0, size: 135 bytes, params: 1, frame: 18
const r7 = activeIndex.get() === index || env0_5.get() === 1;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const backgroundColor2 = r7 ? backgroundColor : 'transparent';
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
return {backgroundColor: Reflect.apply(withSpring, springModule, [backgroundColor2, SUBTLE_SPRING,
'animate-always'])};
}
function _fun97629({nativeEvent}) { // fn#97629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:3945, offset: 0x0218af57, size: 153 bytes, params: 2, frame: 18
var indexBinding;
var value2;
var value3;
const {height, width} = nativeEvent.layout;
if (height !== 0) {
if (width !== 0) {
indexBinding = index;
value2 = environment.__proto__;
value3 = indexBinding * (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_OFFSET;
itemMeasurements.get()[value3 + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_HEIGHT_OFFSET] = height;
itemMeasurements.get()[value3 + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_WIDTH_OFFSET] = width;
function ContextMenuItemR() { // fn#97628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:3451, owner: ContextMenuItem.R, offset: 0x0218aed0, size: 135 bytes, params: 1, frame: 18
const r7 = activeIndex.get() === index || JsxRuntimeModule.jsxs.get() === 1;
const withSpring = SpringModule.withSpring;
const backgroundColor2 = r7 ? backgroundColor : 'transparent';
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
return {backgroundColor: Reflect.apply(withSpring, SpringModule, [backgroundColor2, SUBTLE_SPRING,
'animate-always'])};
}
function _fun97629({nativeEvent}) { // fn#97629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12988:3945, offset: 0x0218af57, size: 153 bytes, params: 2, frame: 18
var indexBinding;
var value2;
var value3;
const {height, width} = nativeEvent.layout;
if (height !== 0) {
if (width !== 0) {
indexBinding = index;
value2 = environment.__proto__;
value3 = indexBinding * (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_OFFSET;
itemMeasurements.get()[value3 + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_HEIGHT_OFFSET] = height;
itemMeasurements.get()[value3 + (require(8812) /* metro dependency 8812: ContextMenuStateNative */).INDEX_BOUNDS_WIDTH_OFFSET] = width;
}
}
}
}
}
global.__d(_fun97623, 12798, [31, 27, 33, 4017, 4501, 8813, 697, 1357, 8812, 4577, 4581, 4580, 4573,
2]) /* metro module 12798, dependencies: [31, 27, 33, 4017, 4501, 8813, 697, 1357, 8812, 4577, 4581, 4580, 4573, 2] */;
@@ -1,6 +1,22 @@
/* 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
var object3;
let env0_0 = require;
const renderMenuItems = function(a0) {
var items = a0.items;
@@ -13,9 +29,9 @@ function _fun97641(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_3 = importDefault(57) /* metro dependency 57 */;
let env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
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 */;
@@ -24,370 +40,393 @@ function _fun97641(global, require, importDefault, importAll, module, exports, d
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object3 = {};
const object5 = {'position': 'absolute', 'backgroundColor': null, 'borderWidth': 1};
object = {};
const object2 = {'position': 'absolute', 'backgroundColor': null, 'borderWidth': 1};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object5.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object2.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const CONTEXT_MENU_MIN_WIDTH = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_MIN_WIDTH;
object5.minWidth = CONTEXT_MENU_MIN_WIDTH;
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(object5, SHADOW_HIGH, undefined);
object3.container = object5;
const CONTEXT_MENU_ITEM_PADDING = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_ITEM_PADDING;
object3.titleContainer = {padding: CONTEXT_MENU_ITEM_PADDING};
const object7 = {};
const CONTEXT_MENU_DIVIDER_HEIGHT = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_DIVIDER_HEIGHT;
object7.borderBottomWidth = CONTEXT_MENU_DIVIDER_HEIGHT;
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;
object7.borderBottomColor = BORDER_SUBTLE;
object3.divider = object7;
const env0_9 = Reflect.apply(createStyles, value, [object3]);
object3 = {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)}]};}"};
object3 = {code: 'function ContextMenuPopoutNativeTsx2(finished){const{transitionState,TransitionStates,runOnJS,cleanUp,onClose}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();runOnJS(onClose)();}}'};
object3 = {code: 'function update_ContextMenuPopoutNativeTsx3(e){const{updateContextMenuState,state}=this.__closure;updateContextMenuState(e.absoluteX,e.absoluteY,state);}'};
object3 = {code: 'function ContextMenuPopoutNativeTsx4(){const{state,runOnJS,requestClose}=this.__closure;const{activeIndex:activeIndex}=state;const isDismiss=activeIndex.get()===-1;runOnJS(requestClose)(isDismiss);}'};
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;
object3 = {};
const CONTEXT_MENU_BACKDROP_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTEXT_MENU_BACKDROP_BACKGROUND;
object3.backdrop = {backgroundColor: CONTEXT_MENU_BACKDROP_BACKGROUND};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['height'] = 'auto';
object3.accessibleDismiss = object8;
const env0_14 = Reflect.apply(createStyles, value, [object3]);
object3 = {code: 'function ContextMenuPopoutNativeTsx5(){const{withSpring,visible,CONTEXT_MENU_SPRING}=this.__closure;return{opacity:withSpring(visible.get(),CONTEXT_MENU_SPRING)};}'};
(require(2) /* metro dependency 2 */).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 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 reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ContextMenuBackdropN;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.visible = visible;
const CONTEXT_MENU_SPRING = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_SPRING;
object2.CONTEXT_MENU_SPRING = CONTEXT_MENU_SPRING;
closure.__closure = object2;
closure.__workletHash = 6862317967896;
closure.__initData = env0_15;
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const Backdrop = (require(4562) /* metro dependency 4562: BackdropNative */).Backdrop;
const items2 = [styles.backdrop, value2];
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).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 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 env0_3 = positionY;
const height = menu.height;
const env0_4 = 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 reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [transitionState !== MOUNTED ? 0 : 1]);
let binding = env0_4;
binding.useEffect(_fun97649, [transitionState, value4]);
const styles = useStyles();
const {top,
bottom} = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value5 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: (require(477) /* metro dependency 477: PlatformUtils */).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 = env0_3(env0_4.useState(height >= r1), 2);
const property = value13[0];
const env0_10 = 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 moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
const closure = ContextMenuPopoutW;
const object3 = {maxHeight: r1, height: height};
const CONTEXT_MENU_MIN_WIDTH = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_MIN_WIDTH;
object3.CONTEXT_MENU_MIN_WIDTH = CONTEXT_MENU_MIN_WIDTH;
object3.positionY = positionY;
object3.positionX = positionX;
const CONTEXT_MENU_MIN_SCALE = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_MIN_SCALE;
object3.CONTEXT_MENU_MIN_SCALE = CONTEXT_MENU_MIN_SCALE;
object3.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object3.interpolate = reanimatedRexportModule.interpolate;
object3.visible = value4;
const CONTEXT_MENU_SPRING = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_SPRING;
object3.CONTEXT_MENU_SPRING = CONTEXT_MENU_SPRING;
object3.transitionState = transitionState;
object3.TransitionStates = TransitionStates;
object3.runOnJS = reanimatedRexportModule.runOnJS;
object3.cleanUp = cleanUp;
object3.onClose = onClose;
closure.__closure = object3;
closure.__workletHash = 16778623591634;
closure.__initData = env0_10;
const value16 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
binding = env0_4;
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 = (require(5321) /* metro dependency 5321 */).GestureDetector;
const ScrollView = (importDefault(4017) /* metro dependency 4017: 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 _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 = (require(12798) /* metro dependency 12798: ContextMenuItemNative */).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;
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} />;
}
return r0;
}
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 = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_SPRING;
return {opacity: Reflect.apply(withSpring, value, [value3, CONTEXT_MENU_SPRING])};
}
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 _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 = (require(4508) /* metro dependency 4508: TransitionGroup */).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 = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).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 object3 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let interpolate = reanimatedRexportModule.interpolate;
const value10 = Reflect.apply(interpolate, reanimatedRexportModule, [env0_8.get(), [0, 1], [0, 1]]);
const CONTEXT_MENU_SPRING = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_SPRING;
const closure = wT;
const object4 = {};
object4.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object4.TransitionStates = TransitionStates;
object4.runOnJS = reanimatedRexportModule.runOnJS;
object4.cleanUp = cleanUp;
object4.onClose = onClose;
closure.__closure = object4;
closure.__workletHash = 4025068986009;
closure.__initData = env1_11;
object3.opacity = Reflect.apply(withSpring, springModule, [value10, CONTEXT_MENU_SPRING, 'respect-motion-settings',
closure]);
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
const moduleValue4 = reanimatedRexportModule;
interpolate = moduleValue4.interpolate;
const value11 = env0_8.get();
const CONTEXT_MENU_MIN_SCALE = (require(8813) /* metro dependency 8813: ContextMenuConstantsNative */).CONTEXT_MENU_MIN_SCALE;
const items3 = [{translateX: Reflect.apply(withSpring, moduleValue3, [Reflect.apply(interpolate, moduleValue4,
[value11, [0, 1], [r6 * value5 + CONTEXT_MENU_MIN_SCALE * -r6 * value5, 0]]), CONTEXT_MENU_SPRING])}];
const moduleValue5 = springModule;
withSpring = moduleValue5.withSpring;
const moduleValue6 = reanimatedRexportModule;
items3[1] = {translateY: Reflect.apply(withSpring, moduleValue5, [moduleValue6.interpolate(env0_8.get(), [0, 1],
[r19 * value3 + CONTEXT_MENU_MIN_SCALE * -r19 * value3, 0]), CONTEXT_MENU_SPRING])};
const moduleValue7 = springModule;
withSpring = moduleValue7.withSpring;
const moduleValue8 = reanimatedRexportModule;
interpolate = moduleValue8.interpolate;
let value = env0_8.get();
value = Reflect.apply(interpolate, moduleValue8, [value, [0, 1], [CONTEXT_MENU_MIN_SCALE, value6]]);
items3[2] = {scale: Reflect.apply(withSpring, moduleValue7, [value, CONTEXT_MENU_SPRING])};
object3.transform = items3;
return object3;
}
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 _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 = (require(5321) /* metro dependency 5321 */).Gesture;
value = Gesture.Pan().enabled(!env0_10).onStart(value).onUpdate(value);
const onEnd = value.onEnd;
const closure = t_97655;
const object2 = {};
object2.state = state;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.requestClose = requestClose;
closure.__closure = object2;
closure.__workletHash = 14495067009140;
closure.__initData = env1_13;
return Reflect.apply(onEnd, value, [closure]);
}
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));
}
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 = (require(477) /* metro dependency 477: PlatformUtils */).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 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));
}
}
}
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 _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 closure = update_97654;
const object2 = {};
object2.updateContextMenuState = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).updateContextMenuState;
object2.state = state;
closure.__closure = object2;
closure.__workletHash = 4218299258082;
closure.__initData = env2_12;
return closure;
}
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();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS(requestClose)(value2 === -1);
}
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);
}
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] */;
@@ -1,16 +1,21 @@
/* Metro module 8812; source: design/components/ContextMenu/native/ContextMenuState.native.tsx; dependencies: [31, 629, 690, 4017, 4081, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Module00629Module from '../../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun68896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:6, offset: 0x01c611b8, size: 277 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function() {
return {menu: null};
});
object = {code: 'function updateContextMenuState_ContextMenuStateNativeTsx1(absoluteX,absoluteY,state){const{INDEX_BOUNDS_WIDTH_OFFSET,INDEX_BOUNDS_HEIGHT_OFFSET,INDEX_BOUNDS_PAGE_Y_OFFSET,INDEX_BOUNDS_PAGE_X_OFFSET,INDEX_BOUNDS_OFFSET,runOnJS,triggerHapticFeedback,HapticFeedbackTypes}=this.__closure;const{pan:pan,itemMeasurements:itemMeasurements,activeIndex:activeIndex}=state;pan.set(absoluteY);const bounds=itemMeasurements.get();let offset=0;while(offset<bounds.length){const width=bounds[offset+INDEX_BOUNDS_WIDTH_OFFSET];const height=bounds[offset+INDEX_BOUNDS_HEIGHT_OFFSET];const pageY=bounds[offset+INDEX_BOUNDS_PAGE_Y_OFFSET];const pageX=bounds[offset+INDEX_BOUNDS_PAGE_X_OFFSET];const lowerY=pageY;const upperY=pageY+height;const lowerX=pageX;const upperX=pageX+width;if(absoluteY>=lowerY&&absoluteY<=upperY&&absoluteX>=lowerX&&absoluteX<=upperX){const index=offset/INDEX_BOUNDS_OFFSET;if(activeIndex.get()!==index){activeIndex.set(index);runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_LIGHT);}return;}offset+=INDEX_BOUNDS_OFFSET;}activeIndex.set(-1);}'};
const value2 = _fun68898();
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuState.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/ContextMenu/native/ContextMenuState.native.tsx');
exports.INDEX_BOUNDS_OFFSET = 4;
exports.INDEX_BOUNDS_PAGE_X_OFFSET = 0;
exports.INDEX_BOUNDS_PAGE_Y_OFFSET = 1;
@@ -29,123 +34,125 @@ function _fun68896(global, require, importDefault, importAll, module, exports, d
itemMeasurements.set([]);
}
};
}
function _fun68898() { // fn#68898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:1226, offset: 0x01c612d8, size: 134 bytes, params: 1, frame: 16
const closure = updateContextMenuState;
const object2 = {'INDEX_BOUNDS_WIDTH_OFFSET': 2, 'INDEX_BOUNDS_HEIGHT_OFFSET': 3, 'INDEX_BOUNDS_PAGE_Y_OFFSET': 1,
'INDEX_BOUNDS_PAGE_X_OFFSET': 0, 'INDEX_BOUNDS_OFFSET': 4};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object2.HapticFeedbackTypes = HapticFeedbackTypes;
closure.__closure = object2;
closure.__workletHash = 10158111154044;
closure.__initData = env0_4;
return closure;
}
function showContextMenu(a0) { // fn#68900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2296, offset: 0x01c6146f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun68901);
}
function hideContextMenu() { // fn#68902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2392, offset: 0x01c614c7, size: 47 bytes, params: 1, frame: 12
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun68903);
}
function useActiveContextMenu() { // fn#68905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2517, offset: 0x01c61530, size: 25 bytes, params: 1, frame: 11
return env0_3(function(a0) {
return a0.menu;
});
}
function useContextMenuState() { // fn#68907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2621, offset: 0x01c61554, size: 140 bytes, params: 1, frame: 20
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue([]);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
return value4.useMemo(_fun68908, [value2, value3, value4]);
}
function updateContextMenuState(a0, a1, {pan, itemMeasurements, activeIndex}) { // fn#68899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:1264, offset: 0x01c6135e, size: 273 bytes, params: 4, frame: 24
var r3;
var property;
var property2;
var property3;
var property4;
var value3;
var runOnJS;
var triggerHapticFeedback;
var HapticFeedbackTypes;
var IMPACT_LIGHT;
pan.set(a1);
let value = itemMeasurements.get();
let length = value.length;
if (0 < length) {
r3 = 0;
reducibleLoop1: while (true) {
property = value[r3 + 2];
property2 = value[r3 + 3];
property3 = value[r3 + 1];
property4 = value[r3 + 0];
if (a1 >= property3) {
reducibleJoin5: while (true) {
if (a1 <= property3 + property2) {
if (a0 >= property4) {
if (a0 <= property4 + property) {
break reducibleLoop1;
function _fun68898() { // fn#68898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:1226, offset: 0x01c612d8, size: 134 bytes, params: 1, frame: 16
const updateContextMenuState2 = updateContextMenuState;
const object = {'INDEX_BOUNDS_WIDTH_OFFSET': 2, 'INDEX_BOUNDS_HEIGHT_OFFSET': 3, 'INDEX_BOUNDS_PAGE_Y_OFFSET': 1,
'INDEX_BOUNDS_PAGE_X_OFFSET': 0, 'INDEX_BOUNDS_OFFSET': 4};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object.HapticFeedbackTypes = HapticFeedbackTypes;
updateContextMenuState2.__closure = object;
updateContextMenuState2.__workletHash = 10158111154044;
updateContextMenuState2.__initData = env0_4;
return updateContextMenuState2;
function updateContextMenuState(a0, a1, {pan, itemMeasurements, activeIndex}) { // fn#68899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:1264, offset: 0x01c6135e, size: 273 bytes, params: 4, frame: 24
var r3;
var property;
var property2;
var property3;
var property4;
var value3;
var runOnJS;
var triggerHapticFeedback;
var HapticFeedbackTypes;
var IMPACT_LIGHT;
pan.set(a1);
let value = itemMeasurements.get();
let length = value.length;
if (0 < length) {
r3 = 0;
reducibleLoop1: while (true) {
property = value[r3 + 2];
property2 = value[r3 + 3];
property3 = value[r3 + 1];
property4 = value[r3 + 0];
if (a1 >= property3) {
reducibleJoin5: while (true) {
if (a1 <= property3 + property2) {
if (a0 >= property4) {
if (a0 <= property4 + property) {
break reducibleLoop1;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
break reducibleJoin5;
value3 = r3 + 4;
length = value.length;
if (!(value3 < length)) {
activeIndex.set(-1);
return undefined;
}
r3 = value3;
continue reducibleLoop1;
}
}
value3 = r3 + 4;
length = value.length;
if (!(value3 < length)) {
value = r3 / 4;
reducibleJoin9: while (true) {
if (activeIndex.get() !== value) {
activeIndex.set(value);
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
value = Reflect.apply(runOnJS, value, [triggerHapticFeedback]);
HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
value(IMPACT_LIGHT);
break reducibleJoin9;
}
break reducibleJoin9;
}
} else {
activeIndex.set(-1);
return undefined;
}
r3 = value3;
continue reducibleLoop1;
}
value = r3 / 4;
reducibleJoin9: while (true) {
if (activeIndex.get() !== value) {
activeIndex.set(value);
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
value = Reflect.apply(runOnJS, value, [triggerHapticFeedback]);
HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
value(IMPACT_LIGHT);
break reducibleJoin9;
}
break reducibleJoin9;
}
} else {
activeIndex.set(-1);
}
function showContextMenu(a0) { // fn#68900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2296, offset: 0x01c6146f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun68901);
function _fun68901() { // fn#68901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2346, offset: 0x01c614a5, size: 34 bytes, params: 1, frame: 12
return env1_3.setState({menu: env0_0});
}
}
function hideContextMenu() { // fn#68902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2392, offset: 0x01c614c7, size: 47 bytes, params: 1, frame: 12
(ReactBatchUpdatesNativeModule).batchUpdates(_fun68903);
function _fun68903() { // fn#68903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2441, offset: 0x01c614f6, size: 31 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
env1_3.setState(function(a0) {
var value = a0;
return value.menu == null ? value : {menu: null};
});
}
}
function useActiveContextMenu() { // fn#68905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2517, offset: 0x01c61530, size: 25 bytes, params: 1, frame: 11
return env0_3(function(a0) {
return a0.menu;
});
}
function useContextMenuState() { // fn#68907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2621, offset: 0x01c61554, size: 140 bytes, params: 1, frame: 20
const value2 = (ReanimatedRexportModule).useSharedValue(-1);
const value3 = (ReanimatedRexportModule).useSharedValue([]);
const value4 = (ReanimatedRexportModule).useSharedValue(-1);
return value4.useMemo(_fun68908, [value2, value3, value4]);
function _fun68908() { // fn#68908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2761, offset: 0x01c615e0, size: 34 bytes, params: 1, frame: 3
return {pan: env0_0, itemMeasurements: env0_1, activeIndex: ReactModule};
}
}
}
function _fun68901() { // fn#68901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2346, offset: 0x01c614a5, size: 34 bytes, params: 1, frame: 12
return env1_3.setState({menu: env0_0});
}
function _fun68903() { // fn#68903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2441, offset: 0x01c614f6, size: 31 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
env1_3.setState(function(a0) {
var value = a0;
return value.menu == null ? value : {menu: null};
});
}
function _fun68908() { // fn#68908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8997:2761, offset: 0x01c615e0, size: 34 bytes, params: 1, frame: 3
return {pan: env0_0, itemMeasurements: env0_1, activeIndex: env0_2};
}
global.__d(_fun68896, 8812, [31, 629, 690, 4017, 4081,
2]) /* metro module 8812, dependencies: [31, 629, 690, 4017, 4081, 2] */;