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

+364 -355
View File
@@ -1,376 +1,385 @@
/* Metro module 12761; source: design/components/Menu/native/Menu.tsx; dependencies: [57, 31, 27, 661, 33, 12751, 4501, 697, 4017, 3875, 1585, 1478, 477, 3869, 1244, 4570, 4504, 12755, 12749, 4577, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import PassthroughTouchView from '../../../void/PassthroughTouchView/native/PassthroughTouchView.tsx'; /* Metro dependency 12749 */
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 PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AccessibilityPreferencesContextModule from '../../../../external/discord_common/js/packages/design/components/AccessibilityPreferencesContext/AccessibilityPreferencesContext.tsx'; /* Metro dependency 3875 */
import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as SetAccessibilityFocusAndroidModule from '../../../../modules/a11y/native/setAccessibilityFocus.android.tsx'; /* Metro dependency 4570 */
import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as EasingModule from '../../../void/Easing/native/Easing.tsx'; /* Metro dependency 12751 */
import * as ShadowsModule from '../../../void/Shadows/native/Shadows.tsx'; /* Metro dependency 12755 */
function _fun97523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:6, offset: 0x02187616, size: 515 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_5 = value2.ScrollView;
const NOOP = (require(661) /* metro dependency 661: Constants */).NOOP;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const NOOP = (ConstantsModule).NOOP;
const env0_8 = {'mass': 1, 'stiffness': 300, 'damping': 25, 'restSpeedThreshold': 0.01,
'restDisplacementThreshold': 0.01};
object4 = {duration: 250};
const STANDARD_EASING = (require(12751) /* metro dependency 12751: Easing */).STANDARD_EASING;
object4.easing = STANDARD_EASING;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['zIndex'] = 1;
object4.backdrop = object5;
const object6 = {position: 'absolute'};
object = {duration: 250};
const STANDARD_EASING = (EasingModule).STANDARD_EASING;
object.easing = STANDARD_EASING;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['zIndex'] = 1;
object.backdrop = object2;
const object3 = {position: 'absolute'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.width = 220;
object4.menu = object6;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object4]);
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.width = 220;
object.menu = object3;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.createContext({menuClose: NOOP, menuDismiss: NOOP});
object4 = {code: 'function measureButtonRef_MenuTsx1(ref,setDimensions){const{measure,runOnJS}=this.__closure;const measurements=measure(ref);if(measurements==null)return;runOnJS(setDimensions)(measurements);}'};
object = {code: 'function measureButtonRef_MenuTsx1(ref,setDimensions){const{measure,runOnJS}=this.__closure;const measurements=measure(ref);if(measurements==null)return;runOnJS(setDimensions)(measurements);}'};
const env0_13 = _fun97524();
object4 = {code: 'function MenuTsx2(){const{runOnJS,openMenuCallback}=this.__closure;return runOnJS(openMenuCallback)();}'};
object4 = {code: 'function MenuTsx3(){const{runOnJS,closeMenuCallback}=this.__closure;return runOnJS(closeMenuCallback)();}'};
object4 = {code: "function MenuTsx4(){const{visible,useReducedMotion,interpolate,dirX,size,offsetAnimated,dirY}=this.__closure;var _offsetAnimated,_offsetAnimated$get,_offsetAnimated2,_offsetAnimated$get2;return{opacity:visible.get(),transform:useReducedMotion?[]:[{translateX:interpolate(visible.get(),[0,1],[(dirX==='left'?-1:1)*size.get().width/4,((_offsetAnimated=offsetAnimated)===null||_offsetAnimated===void 0||(_offsetAnimated=_offsetAnimated.get())===null||_offsetAnimated===void 0?void 0:_offsetAnimated.x)!=null?(_offsetAnimated$get=offsetAnimated.get())===null||_offsetAnimated$get===void 0?void 0:_offsetAnimated$get.x:0])},{translateY:interpolate(visible.get(),[0,1],[(dirY==='top'?-1:1)*size.get().height/4,((_offsetAnimated2=offsetAnimated)===null||_offsetAnimated2===void 0||(_offsetAnimated2=_offsetAnimated2.get())===null||_offsetAnimated2===void 0?void 0:_offsetAnimated2.y)!=null?(_offsetAnimated$get2=offsetAnimated.get())===null||_offsetAnimated$get2===void 0?void 0:_offsetAnimated$get2.y:0])},{scale:visible.get()/2+0.5}]};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Menu/native/Menu.tsx');
object = {code: 'function MenuTsx2(){const{runOnJS,openMenuCallback}=this.__closure;return runOnJS(openMenuCallback)();}'};
object = {code: 'function MenuTsx3(){const{runOnJS,closeMenuCallback}=this.__closure;return runOnJS(closeMenuCallback)();}'};
object = {code: "function MenuTsx4(){const{visible,useReducedMotion,interpolate,dirX,size,offsetAnimated,dirY}=this.__closure;var _offsetAnimated,_offsetAnimated$get,_offsetAnimated2,_offsetAnimated$get2;return{opacity:visible.get(),transform:useReducedMotion?[]:[{translateX:interpolate(visible.get(),[0,1],[(dirX==='left'?-1:1)*size.get().width/4,((_offsetAnimated=offsetAnimated)===null||_offsetAnimated===void 0||(_offsetAnimated=_offsetAnimated.get())===null||_offsetAnimated===void 0?void 0:_offsetAnimated.x)!=null?(_offsetAnimated$get=offsetAnimated.get())===null||_offsetAnimated$get===void 0?void 0:_offsetAnimated$get.x:0])},{translateY:interpolate(visible.get(),[0,1],[(dirY==='top'?-1:1)*size.get().height/4,((_offsetAnimated2=offsetAnimated)===null||_offsetAnimated2===void 0||(_offsetAnimated2=_offsetAnimated2.get())===null||_offsetAnimated2===void 0?void 0:_offsetAnimated2.y)!=null?(_offsetAnimated$get2=offsetAnimated.get())===null||_offsetAnimated$get2===void 0?void 0:_offsetAnimated$get2.y:0])},{scale:visible.get()/2+0.5}]};}"};
(FileImportTrackerModule).fileFinishedImporting('design/components/Menu/native/Menu.tsx');
exports.MENU_OFFSET = 10;
exports.MenuContext = value;
exports.Menu = Menu;
}
function _fun97524() { // fn#97524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:770, offset: 0x02187819, size: 99 bytes, params: 1, frame: 16
const measureButtonRef2 = measureButtonRef;
const object = {};
object.measure = (require(4017) /* metro dependency 4017: ReanimatedRexport */).measure;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
measureButtonRef2.__closure = object;
measureButtonRef2.__workletHash = 15651320687527;
measureButtonRef2.__initData = env0_12;
return measureButtonRef2;
function measureButtonRef(a0, a1) { // fn#97525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:802, offset: 0x0218787c, size: 82 bytes, params: 3, frame: 14
let value = environment.__proto__;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).measure(a0);
if (value2 != null) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(a1)(value2);
}
}
function _fun97524() { // fn#97524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:770, offset: 0x02187819, size: 99 bytes, params: 1, frame: 16
const closure = measureButtonRef;
const object2 = {};
object2.measure = (require(4017) /* metro dependency 4017: ReanimatedRexport */).measure;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
closure.__closure = object2;
closure.__workletHash = 15651320687527;
closure.__initData = env0_12;
return closure;
}
}
function Menu({toggleButtonRef, onClose, position, align, offset, offsetAnimated, style, children}) { // fn#97526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:2440, offset: 0x021878ce, size: 878 bytes, params: 2, frame: 32
var object2;
if (position !== undefined) {
}
if (align !== undefined) {
}
const env0_4 = offsetAnimated;
const closure = menuClose;
const closure2 = onTouchDown;
const styles = useStyles();
const binding = env0_4;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const env0_6 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const env0_7 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const env0_8 = binding.useRef(null);
let [property, env0_10] = offset(binding.useState(null), 2);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_11 = value4;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'width': 0,
'height': 0});
binding.useLayoutEffect(_fun97531, [toggleButtonRef, property]);
const env0_13 = onClose ?? NOOP;
const shadowsModule = require(12755) /* metro dependency 12755: Shadows */;
const generateBoxShadowStyle = shadowsModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = shadowsModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
const value6 = Reflect.apply(generateBoxShadowStyle, shadowsModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const value8 = offset(_fun97532(), 3);
property = value8[0];
const property2 = value8[1];
const property3 = value8[2];
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure3 = MenuP;
object2 = {visible: value4, useReducedMotion: enabled};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.dirX = property2;
object2.size = value5;
object2.offsetAnimated = offsetAnimated;
object2.dirY = property3;
closure3.__closure = object2;
closure3.__workletHash = 7884133597410;
closure3.__initData = env0_16;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure3]);
const PassthroughTouchView = importDefault(12749) /* metro dependency 12749: PassthroughTouchView */;
const items2 = [styles.backdrop];
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Provider = env0_11.Provider;
const Children = env0_4.Children;
return (
<PassthroughTouchView
style={items2}
accessibilityViewIsModal
importantForAccessibility="yes"
onTouchDown={closure2}
onAccessibilityEscape={closure2}
>
<View
accessibilityRole="list"
style={[styles.menu, value6, property, value9, style]}
onLayout={onLayout_97534}
function Menu({toggleButtonRef, onClose, position, align, offset, offsetAnimated, style, children}) { // fn#97526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:2440, offset: 0x021878ce, size: 878 bytes, params: 2, frame: 32
if (position !== undefined) {
}
if (align !== undefined) {
}
const offsetAnimated2 = offsetAnimated;
const menuClose2 = menuClose;
const onTouchDown2 = onTouchDown;
const styles = useStyles();
const binding = offsetAnimated2;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (AccessibilityPreferencesContextModule).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const env0_6 = (UseSafeAreaInsetsNative)();
const env0_7 = (UseWindowDimensionsNative)();
const env0_8 = binding.useRef(null);
let [property, env0_10] = offset(binding.useState(null), 2);
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const env0_11 = value4;
const value5 = (ReanimatedRexportModule).useSharedValue({'width': 0,
'height': 0});
binding.useLayoutEffect(_fun97531, [toggleButtonRef, property]);
const env0_13 = onClose ?? NOOP;
const generateBoxShadowStyle = ShadowsModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = ShadowsModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
const value6 = Reflect.apply(generateBoxShadowStyle, ShadowsModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const value8 = offset(_fun97532(), 3);
property = value8[0];
const property2 = value8[1];
const property3 = value8[2];
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const MenuP2 = MenuP;
object = {visible: value4, useReducedMotion: enabled};
object.interpolate = ReanimatedRexportModule.interpolate;
object.dirX = property2;
object.size = value5;
object.offsetAnimated = offsetAnimated;
object.dirY = property3;
MenuP2.__closure = object;
MenuP2.__workletHash = 7884133597410;
MenuP2.__initData = env0_16;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [MenuP2]);
const items2 = [styles.backdrop];
const View = (ReanimatedRexport).View;
const Provider = env0_11.Provider;
const Children = offsetAnimated2.Children;
return (
<PassthroughTouchView
style={items2}
accessibilityViewIsModal
importantForAccessibility="yes"
onTouchDown={onTouchDown2}
onAccessibilityEscape={onTouchDown2}
>
<ScrollView>
<Provider value={{menuClose: closure, menuDismiss: closure2}}>
{Children.map(children, _fun97536)}
</Provider>
</ScrollView>
</View>
</PassthroughTouchView>
);
}
function measureButtonRef(a0, a1) { // fn#97525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:802, offset: 0x0218787c, size: 82 bytes, params: 3, frame: 14
let value = environment.__proto__;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).measure(a0);
if (value2 != null) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(a1)(value2);
}
}
function openMenuCallback() { // fn#97527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:2811, owner: Menu.openMenuCallback, offset: 0x02187c3c, size: 168 bytes, params: 1, frame: 17
var AccessibilityAnnouncer;
var announce;
var intl;
const value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZqK0uI)]);
}
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: env0_8});
}
function menuClose() { // fn#97528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3101, owner: Menu.menuClose, offset: 0x02187ce4, size: 146 bytes, params: 1, frame: 24
const binding = env0_11;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding2 = env1_9;
const closure = menuCloseT;
const object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.closeMenuCallback = env0_13;
closure.__closure = object2;
closure.__workletHash = 5879184549724;
closure.__initData = env1_15;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [0, binding2, 'respect-motion-settings',
closure])]);
}
function menuDismiss() { // fn#97530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3322, owner: Menu.menuDismiss, offset: 0x02187da6, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: toggleButtonRef});
menuClose();
}
function _fun97531() { // fn#97531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3002, offset: 0x02187de1, size: 101 bytes, params: 1, frame: 15
var value5;
const toggleButtonRefBinding = toggleButtonRef;
const value2 = undefined;
if ((toggleButtonRefBinding == null ? value2 : toggleButtonRef.current) != null && env0_9 == null) {
value5 = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnUI(env1_13)(toggleButtonRef, env0_10);
}
return value2;
}
function _fun97532() { // fn#97532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3487, offset: 0x02187e46, size: 489 bytes, params: 1, frame: 11
var r1;
var r2;
var r0;
var r5;
var pageX;
var pageY;
var value5;
var value6;
var value7;
var value8;
var value16;
var value18;
var value21;
let positionBinding = position;
const value2 = 'left';
const r8 = value2 === positionBinding ? 'column' : position !== 'right' ? 'row' : 'column';
if (env0_9 == null) {
r0 = {'x': 0, 'y': 0};
} else {
pageX = env0_9.pageX;
pageY = env0_9.pageY;
positionBinding = position;
value5 = 0;
value6 = pageX + (positionBinding !== 'right' ? value5 : env0_9.width);
value7 = pageY + (position !== 'bottom' ? value5 : env0_9.height);
if (align !== 'end') {
r1 = value7;
r2 = value6;
} else {
value8 = value6 + (r8 !== 'row' ? value5 : env0_9.width);
r1 = value7 + (r8 !== 'column' ? value5 : env0_9.height);
r2 = value8;
<View
accessibilityRole="list"
style={[styles.menu, value6, property, value9, style]}
onLayout={onLayout_97534}
>
<ScrollView>
<Provider value={{menuClose: menuClose2, menuDismiss: onTouchDown2}}>
{Children.map(children, _fun97536)}
</Provider>
</ScrollView>
</View>
</PassthroughTouchView>
);
function openMenuCallback() { // fn#97527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:2811, owner: Menu.openMenuCallback, offset: 0x02187c3c, size: 168 bytes, params: 1, frame: 17
var AccessibilityAnnouncer;
var announce;
var intl;
const value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZqK0uI)]);
}
(SetAccessibilityFocusAndroidModule).setAccessibilityFocus({ref: env0_8});
}
r0 = {x: r2, y: r1};
function menuClose() { // fn#97528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3101, owner: Menu.menuClose, offset: 0x02187ce4, size: 146 bytes, params: 1, frame: 24
const binding = env0_11;
const set = binding.set;
const withTiming = TimingModule.withTiming;
const binding2 = env1_9;
const menuCloseT2 = menuCloseT;
const object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.closeMenuCallback = env0_13;
menuCloseT2.__closure = object;
menuCloseT2.__workletHash = 5879184549724;
menuCloseT2.__initData = env1_15;
Reflect.apply(set, binding, [Reflect.apply(withTiming, TimingModule, [0, binding2, 'respect-motion-settings',
menuCloseT2])]);
function menuCloseT() { // fn#97529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3190, owner: Menu.menuClose.t, offset: 0x02187d76, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return value.runOnJS(env1_13)();
}
}
function menuDismiss() { // fn#97530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3322, owner: Menu.menuDismiss, offset: 0x02187da6, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(SetAccessibilityFocusAndroidModule).setAccessibilityFocus({ref: toggleButtonRef});
menuClose();
}
function _fun97531() { // fn#97531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3002, offset: 0x02187de1, size: 101 bytes, params: 1, frame: 15
var value5;
const toggleButtonRefBinding = toggleButtonRef;
const value2 = undefined;
if ((toggleButtonRefBinding == null ? value2 : toggleButtonRef.current) != null && env0_9 == null) {
value5 = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnUI(env1_13)(toggleButtonRef, env0_10);
}
return value2;
}
function _fun97532() { // fn#97532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3487, offset: 0x02187e46, size: 489 bytes, params: 1, frame: 11
var r1;
var r2;
var r0;
var r5;
var pageX;
var pageY;
var value5;
var value6;
var value7;
var value8;
var value16;
var value18;
var value21;
let positionBinding = position;
const value2 = 'left';
const r8 = value2 === positionBinding ? 'column' : position !== 'right' ? 'row' : 'column';
if (env0_9 == null) {
r0 = {'x': 0, 'y': 0};
} else {
pageX = env0_9.pageX;
pageY = env0_9.pageY;
positionBinding = position;
value5 = 0;
value6 = pageX + (positionBinding !== 'right' ? value5 : env0_9.width);
value7 = pageY + (position !== 'bottom' ? value5 : env0_9.height);
if (align !== 'end') {
r1 = value7;
r2 = value6;
} else {
value8 = value6 + (r8 !== 'row' ? value5 : env0_9.width);
r1 = value7 + (r8 !== 'column' ? value5 : env0_9.height);
r2 = value8;
}
r0 = {x: r2, y: r1};
}
const height = env0_7.height;
r2 = value2 === position ? 'right' : r8 !== 'row' || align !== 'end' ? value2 : 'right';
positionBinding = position;
const value11 = 'top';
r1 = value11 === positionBinding ? 'bottom' : r8 !== 'column' || align !== 'end' ? value11 : 'bottom';
const r10 = value2 === r2 ? r0.x : env0_7.width - r0.x;
const value14 = value11 === r1;
const y = r0.y;
const r9 = value14 ? y : height - y;
let offsetBinding = offset;
if (offsetBinding != null) {
offsetBinding = offset;
value21 = r10 + offsetBinding.x;
r0 = r9 + offsetBinding.y;
r5 = value21;
} else {
value16 = 0;
r5 = r8 !== 'column' ? value16 : 10;
value18 = r10 + r5;
r0 = r8 !== 'row' ? value16 : 10;
r0 = r9 + r0;
r5 = value18;
}
const value23 = height - r0;
const binding = env0_6;
return [{[r2]: r5, [r1]: r0, ['maxHeight']: value23 - (value14 ? binding.bottom : binding.top) - 12}, r2, r1];
}
function MenuP() { // fn#97533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:4104, owner: Menu.P, offset: 0x0218802f, size: 510 bytes, params: 1, frame: 28
var r4;
var x;
var r1;
var r10;
var y;
var value2;
var value3;
var moduleValue;
var interpolate;
var value4;
var value5;
var items4;
var value8;
var value9;
var value10;
var items2;
var moduleValue2;
var value11;
var items3;
var value14;
var value15;
var object;
const object4 = {};
let binding = env0_11;
object4.opacity = binding.get();
if (enabled) {
r1 = [];
} else {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue.interpolate;
binding = env0_11;
value4 = binding.get();
value5 = 1;
r4 = env0_14 !== 'left' ? value5 : -1;
binding = env0_12;
get = binding.get;
items4 = [r4 * Reflect.apply(get, binding, []).width / 4];
if (offsetAnimated == null) {
x = value3;
} else {
value8 = offsetAnimated.get();
x = value8 == null ? value3 : value8.x;
}
value9 = 0;
if (x != null) {
value10 = offsetAnimated.get();
r1 = value10 == null ? value3 : value10.x;
} else {
r1 = value9;
}
items4[1] = r1;
items2 = [{translateX: Reflect.apply(interpolate, moduleValue, [value4, [0, 1], items4])}];
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
binding = env0_11;
value11 = binding.get();
r10 = env0_15 !== 'top' ? value5 : -1;
binding = env0_12;
get = binding.get;
items3 = [r10 * Reflect.apply(get, binding, []).height / 4];
if (offsetAnimated == null) {
y = value3;
} else {
value14 = offsetAnimated.get();
y = value14 == null ? value3 : value14.y;
}
if (y != null) {
value15 = offsetAnimated.get();
r4 = value15 == null ? value3 : value15.y;
} else {
r4 = value9;
}
items3[1] = r4;
items2[1] = {translateY: Reflect.apply(interpolate, moduleValue2, [value11, [0, 1], items3])};
object = {};
binding = env0_11;
object.scale = binding.get() / 2 + 0.5;
items2[2] = object;
r1 = items2;
}
object4.transform = r1;
return object4;
}
function MenuOnLayout(a0) { // fn#97534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:4909, owner: Menu.onLayout, offset: 0x0218822d, size: 208 bytes, params: 2, frame: 24
let binding = env0_12;
let set = binding.set;
Reflect.apply(set, binding, [{width: a0.nativeEvent.layout.width, height: a0.nativeEvent.layout.height}]);
binding = env0_11;
set = binding.set;
const withSpring = SpringModule.withSpring;
const binding2 = env1_8;
const onLayoutN2 = onLayoutN;
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.openMenuCallback = openMenuCallback;
onLayoutN2.__closure = object;
onLayoutN2.__workletHash = 14966618105405;
onLayoutN2.__initData = env1_14;
Reflect.apply(set, binding, [Reflect.apply(withSpring, SpringModule, [1, binding2, 'respect-motion-settings',
onLayoutN2])]);
function onLayoutN() { // fn#97535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:5064, owner: Menu.onLayout.n, offset: 0x021882fd, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return value.runOnJS(openMenuCallback)();
}
}
function _fun97536(a0, a1) { // fn#97536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:5346, offset: 0x0218832d, size: 70 bytes, params: 3, frame: 15
const value = a0;
return a1 !== 0 ? value : env1_4.isValidElement(value) ? env1_4.cloneElement(value, {ref: env0_8}) : value;
}
}
const height = env0_7.height;
r2 = value2 === position ? 'right' : r8 !== 'row' || align !== 'end' ? value2 : 'right';
positionBinding = position;
const value11 = 'top';
r1 = value11 === positionBinding ? 'bottom' : r8 !== 'column' || align !== 'end' ? value11 : 'bottom';
const r10 = value2 === r2 ? r0.x : env0_7.width - r0.x;
const value14 = value11 === r1;
const y = r0.y;
const r9 = value14 ? y : height - y;
let offsetBinding = offset;
if (offsetBinding != null) {
offsetBinding = offset;
value21 = r10 + offsetBinding.x;
r0 = r9 + offsetBinding.y;
r5 = value21;
} else {
value16 = 0;
r5 = r8 !== 'column' ? value16 : 10;
value18 = r10 + r5;
r0 = r8 !== 'row' ? value16 : 10;
r0 = r9 + r0;
r5 = value18;
}
const value23 = height - r0;
const binding = env0_6;
return [{[r2]: r5, [r1]: r0, ['maxHeight']: value23 - (value14 ? binding.bottom : binding.top) - 12}, r2, r1];
}
function MenuP() { // fn#97533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:4104, owner: Menu.P, offset: 0x0218802f, size: 510 bytes, params: 1, frame: 28
var r4;
var x;
var r1;
var r10;
var y;
var value2;
var value3;
var moduleValue;
var interpolate;
var value4;
var value5;
var items4;
var value8;
var value9;
var value10;
var items2;
var moduleValue2;
var value11;
var items3;
var value14;
var value15;
var object2;
const object3 = {};
let binding = env0_11;
object3.opacity = binding.get();
if (enabled) {
r1 = [];
} else {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue.interpolate;
binding = env0_11;
value4 = binding.get();
value5 = 1;
r4 = env0_14 !== 'left' ? value5 : -1;
binding = env0_12;
get = binding.get;
items4 = [r4 * Reflect.apply(get, binding, []).width / 4];
if (offsetAnimated == null) {
x = value3;
} else {
value8 = offsetAnimated.get();
x = value8 == null ? value3 : value8.x;
}
value9 = 0;
if (x != null) {
value10 = offsetAnimated.get();
r1 = value10 == null ? value3 : value10.x;
} else {
r1 = value9;
}
items4[1] = r1;
items2 = [{translateX: Reflect.apply(interpolate, moduleValue, [value4, [0, 1], items4])}];
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
binding = env0_11;
value11 = binding.get();
r10 = env0_15 !== 'top' ? value5 : -1;
binding = env0_12;
get = binding.get;
items3 = [r10 * Reflect.apply(get, binding, []).height / 4];
if (offsetAnimated == null) {
y = value3;
} else {
value14 = offsetAnimated.get();
y = value14 == null ? value3 : value14.y;
}
if (y != null) {
value15 = offsetAnimated.get();
r4 = value15 == null ? value3 : value15.y;
} else {
r4 = value9;
}
items3[1] = r4;
items2[1] = {translateY: Reflect.apply(interpolate, moduleValue2, [value11, [0, 1], items3])};
object2 = {};
binding = env0_11;
object2.scale = binding.get() / 2 + 0.5;
items2[2] = object2;
r1 = items2;
}
object3.transform = r1;
return object3;
}
function MenuOnLayout(a0) { // fn#97534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:4909, owner: Menu.onLayout, offset: 0x0218822d, size: 208 bytes, params: 2, frame: 24
var object2;
let binding = env0_12;
let set = binding.set;
Reflect.apply(set, binding, [{width: a0.nativeEvent.layout.width, height: a0.nativeEvent.layout.height}]);
binding = env0_11;
set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding2 = env1_8;
const closure = onLayoutN;
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.openMenuCallback = openMenuCallback;
closure.__closure = object2;
closure.__workletHash = 14966618105405;
closure.__initData = env1_14;
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [1, binding2, 'respect-motion-settings',
closure])]);
}
function _fun97536(a0, a1) { // fn#97536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:5346, offset: 0x0218832d, size: 70 bytes, params: 3, frame: 15
const value = a0;
return a1 !== 0 ? value : env1_4.isValidElement(value) ? env1_4.cloneElement(value, {ref: env0_8}) : value;
}
function menuCloseT() { // fn#97529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:3190, owner: Menu.menuClose.t, offset: 0x02187d76, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return value.runOnJS(env1_13)();
}
function onLayoutN() { // fn#97535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12951:5064, owner: Menu.onLayout.n, offset: 0x021882fd, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return value.runOnJS(openMenuCallback)();
}
global.__d(_fun97523, 12761, [57, 31, 27, 661, 33, 12751, 4501, 697, 4017, 3875, 1585, 1478, 477, 3869, 1244, 4570,
4504, 12755, 12749, 4577,
2]) /* metro module 12761, dependencies: [57, 31, 27, 661, 33, 12751, 4501, 697, 4017, 3875, 1585, 1478, 477, 3869, 1244, 4570, 4504, 12755, 12749, 4577, 2] */;
@@ -1,42 +1,47 @@
/* Metro module 12762; source: design/components/Menu/native/MenuGroup.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun97537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12952:6, offset: 0x02188373, size: 274 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_1 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_2 = value3.jsx;
const env0_3 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {marginLeft: 0};
object.height = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.backgroundColor = BORDER_SUBTLE;
object.marginTop = -1 * StyleSheet.hairlineWidth;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{divider: object}]);
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
const object2 = {marginLeft: 0};
object2.height = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object2.backgroundColor = BORDER_SUBTLE;
object2.marginTop = -1 * StyleSheet.hairlineWidth;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{divider: object2}]);
value = value.forwardRef(_fun97538);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Menu/native/MenuGroup.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/Menu/native/MenuGroup.tsx');
exports.MenuGroup = value;
function _fun97538({style, children}, a1) { // fn#97538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12952:329, offset: 0x02188485, size: 139 bytes, params: 3, frame: 21
const env0_0 = a1;
const styles = useStyles();
const items2 = [
!(a1 !== null) && <View style={styles.divider} />,
];
const Children = env0_0.Children;
items2[1] = Children.map(children, _fun97539);
return (
<View style={style}>
{items2}
</View>
);
function _fun97539(a0, a1) { // fn#97539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12952:456, offset: 0x02188510, size: 70 bytes, params: 3, frame: 15
const value = a0;
return a1 !== 0 ? value : env1_0.isValidElement(value) ? env1_0.cloneElement(value, {ref: require}) : value;
}
}
}
function _fun97538({style, children}, a1) { // fn#97538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12952:329, offset: 0x02188485, size: 139 bytes, params: 3, frame: 21
const env0_0 = a1;
const styles = useStyles();
const items2 = [!(a1 !== null) && <View style={styles.divider} />];
const Children = env0_0.Children;
items2[1] = Children.map(children, _fun97539);
return (
<View style={style}>
{items2}
</View>
);
}
function _fun97539(a0, a1) { // fn#97539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12952:456, offset: 0x02188510, size: 70 bytes, params: 3, frame: 15
const value = a0;
return a1 !== 0 ? value : env1_0.isValidElement(value) ? env1_0.cloneElement(value, {ref: require}) : value;
}
global.__d(_fun97537, 12762, [31, 27, 33, 4501, 697,
2]) /* metro module 12762, dependencies: [31, 27, 33, 4501, 697, 2] */;
@@ -1,44 +1,61 @@
/* Metro module 12763; source: design/components/Menu/native/MenuItem.tsx; dependencies: [31, 33, 4501, 12761, 4580, 6746, 6749, 2] */
import FormRow from '../../../void/Form/native/FormRow.tsx'; /* Metro dependency 6746 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as MenuModule from './Menu.tsx'; /* Metro dependency 12761 */
function _fun97540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12953:6, offset: 0x02188556, size: 215 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({formIcon: {'width': 20,
let value = ReactModule;
const env0_5 = (CreateStylesModule).createStyles({formIcon: {'width': 20,
'height': 20}, formLabel: {'fontSize': 14, 'fontWeight': '500'}});
value = value.forwardRef(_fun97541);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Menu/native/MenuItem.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/Menu/native/MenuItem.tsx');
exports.MenuItem = value;
}
function _fun97541({label, IconComponent, iconSource, showIconFirst, style, disabled, action}, a1) { // fn#97541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12953:233, offset: 0x0218862d, size: 387 bytes, params: 3, frame: 25
showIconFirst = !(showIconFirst === undefined) && showIconFirst;
disabled = !(disabled === undefined) && disabled;
var value;
const styles = useStyles();
const binding = env0_3;
const useContext = binding.useContext;
const MenuContext = (require(12761) /* metro dependency 12761: Menu */).MenuContext;
const env0_1 = Reflect.apply(useContext, binding, [MenuContext]).menuClose;
const r7 = IconComponent != null ? <IconComponent size="sm" /> : iconSource != null ? ((Component) => <Component source={iconSource} style={styles.formIcon} />)(importDefault(4580) /* metro dependency 4580: Icon */) : null;
const FormRow = importDefault(6746) /* metro dependency 6746: FormRow */;
const defaultImport2Props = {ref: a1, style: style, accessibilityRole: 'menuitem', disabled: disabled,
leading: iconSource != null && showIconFirst ? r7 : null};
let r5 = iconSource == null || showIconFirst ? null : r7;
defaultImport2Props.trailing = r5;
if (typeof label !== 'string') {
r5 = label;
} else {
value = importDefault(6749) /* metro dependency 6749: FormLabel */;
value = ((Component) => <Component text={label} style={styles.formLabel} />)(value);
r5 = value;
function _fun97541({label, IconComponent, iconSource, showIconFirst, style, disabled, action}, a1) { // fn#97541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12953:233, offset: 0x0218862d, size: 387 bytes, params: 3, frame: 25
showIconFirst = !(showIconFirst === undefined) && showIconFirst;
disabled = !(disabled === undefined) && disabled;
var value;
const styles = useStyles();
const binding = env0_3;
const useContext = binding.useContext;
const MenuContext = (MenuModule).MenuContext;
const env0_1 = Reflect.apply(useContext, binding, [MenuContext]).menuClose;
const r7 = (
IconComponent != null
? (
<IconComponent size="sm" />
)
: (
iconSource != null
? ((Component) => <Component source={iconSource} style={styles.formIcon} />)(importDefault(4580) /* metro dependency 4580: Icon */)
: null
)
);
const defaultImport2Props = {ref: a1, style: style, accessibilityRole: 'menuitem', disabled: disabled,
leading: iconSource != null && showIconFirst ? r7 : null};
let r5 = iconSource == null || showIconFirst ? null : r7;
defaultImport2Props.trailing = r5;
if (typeof label !== 'string') {
r5 = label;
} else {
value = importDefault(6749) /* metro dependency 6749: FormLabel */;
value = ((Component) => <Component text={label} style={styles.formLabel} />)(value);
r5 = value;
}
defaultImport2Props.label = r5;
defaultImport2Props.onPress = function() {
action();
menuClose();
};
return <FormRow {...defaultImport2Props} />;
}
defaultImport2Props.label = r5;
defaultImport2Props.onPress = function() {
action();
menuClose();
};
return <FormRow {...defaultImport2Props} />;
}
global.__d(_fun97540, 12763, [31, 33, 4501, 12761, 4580, 6746, 6749,
2]) /* metro module 12763, dependencies: [31, 33, 4501, 12761, 4580, 6746, 6749, 2] */;
@@ -1,94 +1,105 @@
/* Metro module 12764; source: design/components/Menu/native/MenuPopout.tsx; dependencies: [57, 31, 33, 8814, 4017, 11110, 12761, 12762, 12763, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import NativeMenuActionCreators from '../../../../modules/native_menu/native/NativeMenuActionCreators.tsx'; /* Metro dependency 11110 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as MenuModule from './Menu.tsx'; /* Metro dependency 12761 */
import * as MenuGroupModule from './MenuGroup.tsx'; /* Metro dependency 12762 */
import * as MenuItemModule from './MenuItem.tsx'; /* Metro dependency 12763 */
function _fun97543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:6, offset: 0x021887b0, size: 168 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Menu/native/MenuPopout.tsx');
(FileImportTrackerModule).fileFinishedImporting('design/components/Menu/native/MenuPopout.tsx');
exports.MenuPopout = MenuPopout;
}
function MenuPopout({children, key, menuItems = [], onRequestOpen, onRequestClose, position, align, offset, offsetAnimated}) { // fn#97544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:238, offset: 0x02188858, size: 505 bytes, params: 2, frame: 28
const position2 = position;
const align2 = align;
const r12 = key ?? (require(8814) /* metro dependency 8814: UID */).useUID();
const value3 = (ReanimatedRexportModule).useAnimatedRef();
const binding = align2;
const [property, env0_10] = position2(binding.useState(false), 2);
const value6 = menuItems.map(function(a0) {
return {name: a0.label, label: a0.label};
});
const value7 = binding.useCallback(_fun97546, [r12, onRequestClose]);
return (
<>
{children({ref: value3, onPress: binding.useCallback(_fun97550, [property, value7,
binding.useCallback(_fun97549, [binding.useMemo(_fun97547, [value3, value7, menuItems, position, align,
offset, offsetAnimated]), r12, onRequestOpen])]), accessibilityState: {expanded: property},
accessibilityActions: value6, onAccessibilityAction: onAccessibilityAction_97551}, {isShown: property})}
</>
);
function _fun97546() { // fn#97546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:537, offset: 0x02188a51, size: 74 bytes, params: 1, frame: 13
env0_10(false);
if (onRequestClose != null) {
onRequestClose();
}
(NativeMenuActionCreators).hideNativeMenu(env0_7);
}
function MenuPopout({children, key, menuItems = [], onRequestOpen, onRequestClose, position, align, offset, offsetAnimated}) { // fn#97544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:238, offset: 0x02188858, size: 505 bytes, params: 2, frame: 28
const env0_3 = position;
const env0_4 = align;
const r12 = key ?? (require(8814) /* metro dependency 8814: UID */).useUID();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useAnimatedRef();
const binding = env0_4;
const [property, env0_10] = env0_3(binding.useState(false), 2);
const value6 = menuItems.map(function(a0) {
return {name: a0.label, label: a0.label};
});
const value7 = binding.useCallback(_fun97546, [r12, onRequestClose]);
return (
<>
{children({ref: value3, onPress: binding.useCallback(_fun97550, [property, value7,
binding.useCallback(_fun97549, [binding.useMemo(_fun97547, [value3, value7, menuItems, position, align,
offset, offsetAnimated]), r12, onRequestOpen])]), accessibilityState: {expanded: property},
accessibilityActions: value6, onAccessibilityAction: onAccessibilityAction_97551}, {isShown: property})}
</>
);
}
function _fun97547() { // fn#97547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:609, offset: 0x02188a9b, size: 128 bytes, params: 1, frame: 16
const Menu = (MenuModule).Menu;
return (
<Menu
toggleButtonRef={env0_8}
onClose={env0_11}
position={position}
align={align}
offset={offset}
offsetAnimated={offsetAnimated}
>
{env0_0.map(_fun97548)}
</Menu>
);
function _fun97548(a0, a1) { // fn#97548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:718, offset: 0x02188b1b, size: 120 bytes, params: 3, frame: 17
const MenuGroup = (MenuGroupModule).MenuGroup;
const MenuItem = (MenuItemModule).MenuItem;
return (
<MenuGroup key={'chat-context-menu-group-' + a1}>
<MenuItem showIconFirst {...a0} />
</MenuGroup>
);
}
}
function _fun97549() { // fn#97549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:871, offset: 0x02188b93, size: 79 bytes, params: 1, frame: 14
env0_10(true);
if (onRequestOpen != null) {
onRequestOpen();
}
const defaultImport = NativeMenuActionCreators;
defaultImport.showNativeMenu(env0_7, env0_12);
}
function _fun97550() { // fn#97550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:951, offset: 0x02188be2, size: 36 bytes, params: 1, frame: 10
if (env0_9) {
env0_11();
} else {
env0_13();
}
}
function MenuPopoutOnAccessibilityAction(a0) { // fn#97551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:1094, owner: MenuPopout.onAccessibilityAction, offset: 0x02188c06, size: 68 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = env0_0.find(_fun97552);
if (!(value == null || value.action == null)) {
value.action();
}
function _fun97552({label}) { // fn#97552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:1120, offset: 0x01c610f3, size: 33 bytes, params: 2, frame: 2
return label === env0_0.nativeEvent.actionName;
}
}
function _fun97546() { // fn#97546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:537, offset: 0x02188a51, size: 74 bytes, params: 1, frame: 13
env0_10(false);
if (onRequestClose != null) {
onRequestClose();
}
(importDefault(11110) /* metro dependency 11110: NativeMenuActionCreators */).hideNativeMenu(env0_7);
}
function _fun97547() { // fn#97547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:609, offset: 0x02188a9b, size: 128 bytes, params: 1, frame: 16
const Menu = (require(12761) /* metro dependency 12761: Menu */).Menu;
return (
<Menu
toggleButtonRef={env0_8}
onClose={env0_11}
position={position}
align={align}
offset={offset}
offsetAnimated={offsetAnimated}
>
{env0_0.map(_fun97548)}
</Menu>
);
}
function _fun97549() { // fn#97549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:871, offset: 0x02188b93, size: 79 bytes, params: 1, frame: 14
env0_10(true);
if (onRequestOpen != null) {
onRequestOpen();
}
const defaultImport = importDefault(11110) /* metro dependency 11110: NativeMenuActionCreators */;
defaultImport.showNativeMenu(env0_7, env0_12);
}
function _fun97550() { // fn#97550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:951, offset: 0x02188be2, size: 36 bytes, params: 1, frame: 10
if (env0_9) {
env0_11();
} else {
env0_13();
}
}
function MenuPopoutOnAccessibilityAction(a0) { // fn#97551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:1094, owner: MenuPopout.onAccessibilityAction, offset: 0x02188c06, size: 68 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = env0_0.find(_fun97552);
if (!(value == null || value.action == null)) {
value.action();
}
}
function _fun97548(a0, a1) { // fn#97548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12954:718, offset: 0x02188b1b, size: 120 bytes, params: 3, frame: 17
const MenuGroup = (require(12762) /* metro dependency 12762: MenuGroup */).MenuGroup;
const MenuItem = (require(12763) /* metro dependency 12763: MenuItem */).MenuItem;
return (
<MenuGroup key={'chat-context-menu-group-' + a1}>
<MenuItem showIconFirst {...a0} />
</MenuGroup>
);
}
global.__d(_fun97543, 12764, [57, 31, 33, 8814, 4017, 11110, 12761, 12762, 12763,
2]) /* metro module 12764, dependencies: [57, 31, 33, 8814, 4017, 11110, 12761, 12762, 12763, 2] */;