250 lines
15 KiB
TypeScript
250 lines
15 KiB
TypeScript
/* Metro module 15298; source: modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx; dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
|
|
import Announcement_sheet_framePng from '../../../external/discord_assets/assets/collectibles/frames/announcement_sheet_frame.png.js'; /* Metro dependency 15299 */
|
|
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as CollectiblesActionCreatorsModule from '../CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
|
|
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
|
|
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
|
|
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
|
|
import * as UseProfileFramesMarketingModule from '../hooks/useProfileFramesMarketing.tsx'; /* Metro dependency 15300 */
|
|
|
|
function _fun116984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:6, offset: 0x0249ebb0, size: 609 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_4 = value.Image;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_5 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_9 = value.jsx;
|
|
const env0_10 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
|
|
object2['pointerEvents'] = 'none';
|
|
object.mascotContainer = object2;
|
|
const object3 = {};
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
|
object.mascotLayer = object3;
|
|
object.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
|
|
object.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
|
|
object.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
|
|
const object4 = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.padding = PX_16;
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.paddingTop = PX_24;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.gap = PX_16;
|
|
object.container = object4;
|
|
object.headerText = {textAlign: 'center'};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
|
|
object.featureText = {flex: 1};
|
|
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object.featureRows = {gap: PX_32};
|
|
const env0_11 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
|
|
exports.default = CollectiblesMobileAnnouncementActionSheet;
|
|
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
|
|
const styles = useStyles();
|
|
const width = (UseWindowDimensionsNative)().width;
|
|
const useBottomSheet = Module06277Module.useBottomSheet;
|
|
const animatedPosition = Reflect.apply(useBottomSheet, Module06277Module, []).animatedPosition;
|
|
const top = (UseSafeAreaInsetsNative)().top;
|
|
const Math = global.Math;
|
|
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
|
|
const value3 = (width - value2) / 2;
|
|
const value4 = value2 / 1200;
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const closure = function() {
|
|
var object2 = {};
|
|
object2.translateY = animatedPosition.get() + top - 60;
|
|
return {transform: [object2]};
|
|
};
|
|
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
|
|
closure.__workletHash = 6274760278164;
|
|
closure.__initData = env0_12;
|
|
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
const View2 = (ReanimatedRexport).View;
|
|
const value6 = -(56 * value4);
|
|
return (
|
|
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
|
|
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
|
|
<Image
|
|
source={{uri: Announcement_sheet_framePng}}
|
|
style={styles.mascotImage}
|
|
accessibilityElementsHidden
|
|
importantForAccessibility="no-hide-descendants"
|
|
/>
|
|
</View>
|
|
</View2>
|
|
);
|
|
}
|
|
|
|
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
|
|
const styles = useStyles();
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={styles.featureRow}>
|
|
{icon}
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-subtle"
|
|
style={styles.featureText}
|
|
>
|
|
{text}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
|
|
const styles = useStyles();
|
|
const value2 = (UseProfileFramesMarketingModule).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
|
|
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
|
|
[t.MkVbBY]);
|
|
const showGiftingMarketing = value2.showGiftingMarketing;
|
|
showEaPremiumMarketing = value2.showEaPremiumMarketing;
|
|
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
|
|
string = intl.string;
|
|
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
|
|
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
|
|
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
|
|
intl, [t['+9vaAT']]);
|
|
const env0_1 = ReactModule.useRef(false);
|
|
const env0_2 = ReactModule.useRef(markAsDismissed);
|
|
ReactModule.useEffect(_fun116989, [markAsDismissed]);
|
|
ReactModule.useEffect(function() {
|
|
return _fun116991;
|
|
}, []);
|
|
const value9 = ReactModule.useCallback(_fun116992, [markAsDismissed]);
|
|
const value10 = ReactModule.useCallback(_fun116993, [markAsDismissed]);
|
|
const value11 = ReactModule.useMemo(_fun116994, []);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const object2 = {};
|
|
object2.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
|
|
const items3 = [
|
|
<Image
|
|
source={object2}
|
|
style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage}
|
|
accessibilityElementsHidden
|
|
importantForAccessibility="no-hide-descendants"
|
|
/>,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
items3[1] = (
|
|
<Text
|
|
variant="heading-xl/bold"
|
|
color="text-strong"
|
|
accessibilityRole="header"
|
|
style={styles.headerText}
|
|
>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}
|
|
</Text>
|
|
);
|
|
const PaintIllocon = (NativeModule).PaintIllocon;
|
|
const items2 = [
|
|
<FeatureRow
|
|
icon={<PaintIllocon size={32} />}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])}
|
|
/>,
|
|
];
|
|
const HeartIllocon = (NativeModule).HeartIllocon;
|
|
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
|
|
const ShopIllocon = (NativeModule).ShopIllocon;
|
|
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
|
|
items3[2] = (
|
|
<View style={styles.featureRows}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
|
|
items3[3] = (
|
|
<Button
|
|
size="lg"
|
|
text={Reflect.apply(string, intl, [S9hXPI])}
|
|
onPress={value9}
|
|
/>
|
|
);
|
|
return (
|
|
<BottomSheet onDismiss={value10} backdropChildren={value11}>
|
|
<View style={styles.container}>
|
|
{items3}
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
function _fun116989() { // fn#116989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2706, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
|
|
env0_2.current = markAsDismissed;
|
|
}
|
|
|
|
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
|
|
return _fun116991;
|
|
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
|
|
var binding;
|
|
let current = env1_1.current;
|
|
if (!current) {
|
|
binding = env1_2;
|
|
current = binding.current;
|
|
value = environment.__proto__.__proto__;
|
|
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
|
|
env0_1.current = true;
|
|
const markAsDismissedBinding = markAsDismissed;
|
|
const PRIMARY = ContentDismissActionType.PRIMARY;
|
|
markAsDismissedBinding(PRIMARY);
|
|
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
|
const object = {};
|
|
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
|
object.screen = FEATURED_PAGE;
|
|
object.analyticsLocations = [];
|
|
const ACTION_SHEET = (AnalyticsLocation).ACTION_SHEET;
|
|
object.analyticsSource = ACTION_SHEET;
|
|
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule, [object]);
|
|
}
|
|
|
|
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
|
|
env0_1.current = true;
|
|
const markAsDismissedBinding = markAsDismissed;
|
|
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
|
markAsDismissedBinding(USER_DISMISS);
|
|
}
|
|
|
|
function _fun116994() { // fn#116994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:3049, offset: 0x01d70d8a, size: 23 bytes, params: 1, frame: 13
|
|
return <CatEarsBackdrop />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116984, 15298, [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244,
|
|
15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578,
|
|
2]) /* metro module 15298, dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */;
|