Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,599 @@
|
||||
/* Metro module 14860; source: modules/icymi/native/media/ICYMIMediaMosaic.tsx; dependencies: [57, 31, 27, 4502, 1379, 3793, 1878, 9569, 661, 33, 4501, 697, 4631, 676, 566, 9564, 9543, 4017, 4504, 14861, 5475, 4573, 1244, 9376, 4660, 5278, 9580, 10273, 6711, 14816, 9546, 7230, 1360, 22, 5097, 9544, 4805, 2] */
|
||||
function _fun112332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6, offset: 0x023c5e4a, size: 519 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = GravityAttachmentMediaMosaic;
|
||||
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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Pressable;
|
||||
const env0_6 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.AnalyticsObjectTypes;
|
||||
const env0_13 = value.AnalyticsObjects;
|
||||
const env0_14 = value.AnalyticsPages;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value.jsx;
|
||||
const env0_16 = value.Fragment;
|
||||
const env0_17 = value.jsxs;
|
||||
const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112358);
|
||||
object = {code: 'function ICYMIMediaMosaicTsx1(){const{withTiming,imageFinishedLoading}=this.__closure;return{opacity:withTiming(imageFinishedLoading?0:1,{duration:150})};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/media/ICYMIMediaMosaic.tsx');
|
||||
exports.default = ICYMIMediaMosaic;
|
||||
exports.GravityAttachmentMediaMosaic = closure;
|
||||
}
|
||||
|
||||
function isMediaSourceGif(a0) { // fn#112333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:1823, offset: 0x023c6051, size: 75 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var value;
|
||||
const isGIFV = a0.isGIFV;
|
||||
if (isGIFV) {
|
||||
r0 = isGIFV;
|
||||
} else {
|
||||
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
value = value.urlMatchesFileExtension(a0.sourceURI,
|
||||
(require(676) /* metro dependency 676: ConstantsIOS */).GIF_RE_IOS);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MediaMosaicVideo({source, height, width, autoplay, style}) { // fn#112334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:1935, offset: 0x023c609c, size: 273 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
|
||||
return ICYMIStore.videosMuted();
|
||||
});
|
||||
const value3 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
|
||||
const video = importDefault(9543) /* metro dependency 9543: Video */;
|
||||
let r13 = source.videoURI ?? source.sourceURI;
|
||||
r13 = r13 ?? source.uri;
|
||||
return ((Component) => <Component src={{videoURI: r13}} height={height} width={width} postponeRender={false} paused={!autoplay} muted={value2} resizeMode="cover" style={[styles.media,
|
||||
style]} videoStyle={styles.video} disableFocus={value2 || source.isGIFV} httpEngine={value3} />)(video);
|
||||
}
|
||||
|
||||
function MediaMosaicImage({source, dimensions, style, isSpoiler}) { // fn#112336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:2517, offset: 0x023c61c0, size: 478 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const [property, env0_2] = env0_3(env0_4.useState(false), 2);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = MediaMosaicImageC;
|
||||
const object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.imageFinishedLoading = property;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 7803531897566;
|
||||
closure.__initData = env0_19;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value6 = env0_4.useMemo(_fun112338, [source.height, source.placeholder, source.width]);
|
||||
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view = <View style={[value5,
|
||||
styles.thumbhashMedia]}>{((Component) => <Component source={value6} style={[style, styles.media,
|
||||
dimensions]} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
|
||||
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
<Image
|
||||
source={source}
|
||||
style={[styles.media, style, dimensions]}
|
||||
onLoadEnd={onLoadEnd}
|
||||
blurRadius={isSpoiler ? 100 : 0}
|
||||
key={source.uri}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Media({source, dimensions, initialIndex, handlePressMedia, style, visible}) { // fn#112340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:3254, offset: 0x023c6441, size: 1192 bytes, params: 2, frame: 39
|
||||
var r5;
|
||||
var Text;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
let binding = undefined;
|
||||
const value3 = binding.useRef(null);
|
||||
binding = undefined;
|
||||
const useState = binding.useState;
|
||||
const spoiler = source.spoiler;
|
||||
const value6 = undefined(Reflect.apply(useState, binding, [spoiler != null && spoiler]), 2);
|
||||
const property = value6[0];
|
||||
const value7 = value6[1].useCallback(_fun112341, [handlePressMedia, initialIndex, property]);
|
||||
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
|
||||
return ICYMIStore.videosMuted();
|
||||
});
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
if (property) {
|
||||
var viewBindingProps = {style: styles.centerContainer};
|
||||
var viewBinding2Props = {style: styles.spoilerText};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = <View {...viewBindingProps}><View {...viewBinding2Props}><Text maxFontSizeMultiplier={1} variant="heading-md/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['F+x38C']).toUpperCase()}</Text></View></View>;
|
||||
} else {
|
||||
r5 = property;
|
||||
}
|
||||
const items2 = [r5];
|
||||
items2[1] = source.videoURI != null && !property && !isMediaSourceGif(source) && useReducedMotion && <View style={styles.centerContainer}><View style={styles.videoIcon}>{((PlayIcon) => <PlayIcon color={(importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_TEXT} size="lg" />)((require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon)}</View></View>;
|
||||
const uploadUtilsModule = require(4660) /* metro dependency 4660: UploadUtils */;
|
||||
items2[2] = uploadUtilsModule.isVideo(source.uri) ? isMediaSourceGif(source) ? null : <View style={styles.absoluteContainer}>{((PressableOpacity) => <PressableOpacity style={[styles.muteIcon,
|
||||
value8 ? styles.iconBg : styles.iconBgSelected]} onPress={onPress_112344} activeOpacity={0.8}>{value8 ? ((VoiceXIcon) => <VoiceXIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} size="sm" />)((require(10273) /* metro dependency 10273: VoiceXIcon */).VoiceXIcon) : ((VoiceNormalIcon) => <VoiceNormalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.BLACK} size="sm" />)((require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : null;
|
||||
const moduleValue4 = uploadUtilsModule;
|
||||
items2[3] = (moduleValue4.isVideo(source.uri) || isMediaSourceGif(source)) && source.videoURI != null ? <MediaMosaicVideo source={source} height={dimensions.height} width={dimensions.width} style={style} autoplay={!!visible} /> : <MediaMosaicImage source={source} style={style} dimensions={dimensions} isSpoiler={property} />;
|
||||
return (
|
||||
<Pressable
|
||||
ref={value3}
|
||||
onPress={value7}
|
||||
style={dimensions}
|
||||
>
|
||||
{items2}
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function OneImageRow({source, handlePressMedia, widthOverride}) { // fn#112345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:4728, offset: 0x023c6954, size: 153 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const value2 = useMaxWidth(widthOverride);
|
||||
return (
|
||||
<View style={[styles.imageRow, styles.topRow]}>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={0}
|
||||
source={source}
|
||||
dimensions={{width: value2, height: value2 / 1.5}}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ThreeImagesRow({sources, start, end, offset, handlePressMedia, widthOverride}) { // fn#112346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:4962, offset: 0x023c69ed, size: 156 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const env0_2 = useMaxWidth(widthOverride);
|
||||
return (
|
||||
<View style={[styles.imageRow, start && styles.topRow, end && styles.bottomRow]}>
|
||||
{sources.map(_fun112347)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function TwoImagesRow({sources, handlePressMedia, end, widthOverride}) { // fn#112348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5271, offset: 0x023c6af1, size: 184 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const value2 = useMaxWidth(widthOverride);
|
||||
const env0_1 = {width: (value2 - 4) / 2, height: (value2 - 4) / 2 / 0.75};
|
||||
return (
|
||||
<View style={[styles.imageRow, styles.topRow, end && styles.bottomRow]}>
|
||||
{sources.map(_fun112349)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ThreeImages({sources, handlePressMedia, widthOverride}) { // fn#112350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5562, offset: 0x023c6be5, size: 366 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const value2 = useMaxWidth(widthOverride);
|
||||
return (
|
||||
<View style={[styles.imagesContainer, styles.imageRow]}>
|
||||
<View style={styles.leftColumn}>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={0}
|
||||
source={sources[0]}
|
||||
dimensions={{width: 2 * value2 / 3 - 4, height: 2 * value2 / 3}}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.rightColumn}>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={1}
|
||||
source={sources[1]}
|
||||
dimensions={{width: value2 / 3, height: value2 / 3}}
|
||||
/>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={2}
|
||||
source={sources[2]}
|
||||
dimensions={{width: value2 / 3, height: value2 / 3}}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function FourImages({sources, handlePressMedia, widthOverride}) { // fn#112351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6072, offset: 0x023c6d53, size: 405 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const value2 = useMaxWidth(widthOverride);
|
||||
const object2 = {width: value2 / 2 - 4, height: (value2 / 2 - 4) / 1.5};
|
||||
return (
|
||||
<View style={styles.imagesContainer}>
|
||||
<View style={[styles.imageRow, styles.topRow]}>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={0}
|
||||
source={sources[0]}
|
||||
dimensions={object2}
|
||||
/>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={1}
|
||||
source={sources[1]}
|
||||
dimensions={object2}
|
||||
/>
|
||||
</View>
|
||||
<View style={[styles.imageRow, styles.bottomRow]}>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={2}
|
||||
source={sources[2]}
|
||||
dimensions={object2}
|
||||
/>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={3}
|
||||
source={sources[3]}
|
||||
dimensions={object2}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function SingleImage({source, initialIndex, handlePressMedia, visible, widthOverride}) { // fn#112352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6626, offset: 0x023c6ee8, size: 194 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const value2 = useMaxWidth(widthOverride);
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
return (
|
||||
<View style={styles.imagesContainer}>
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={initialIndex}
|
||||
source={source}
|
||||
dimensions={Reflect.apply(useMemo, binding, [_fun112353, [source.width, source.height, value2]])}
|
||||
style={styles.singleImage}
|
||||
visible={visible}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GravityAttachmentMediaMosaic({sources, handlePressMedia, visible, widthOverride}) { // fn#112354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:7103, offset: 0x023c7047, size: 300 bytes, params: 2, frame: 23
|
||||
const length = sources.length;
|
||||
const styles = useStyles();
|
||||
return length === 0 ? null : length === 1 ? <SingleImage widthOverride={widthOverride} initialIndex={0} handlePressMedia={handlePressMedia} source={sources[0]} visible={visible} /> : length === 3 ? <ThreeImages widthOverride={widthOverride} handlePressMedia={handlePressMedia} sources={sources} /> : length === 4 ? <FourImages widthOverride={widthOverride} handlePressMedia={handlePressMedia} sources={sources} /> : <View style={styles.imagesContainer}>{env0_4.useMemo(function() {
|
||||
var value4;
|
||||
var items = [];
|
||||
var lengthBinding = length;
|
||||
var value2 = 3;
|
||||
var value3 = lengthBinding % value2;
|
||||
var r2 = value3 === 0 ? value2 : value3;
|
||||
items.push(sources.slice(0, r2));
|
||||
if (r2 < length) {
|
||||
reducibleLoop2: while (true) {
|
||||
sourcesBinding = sources;
|
||||
value4 = r2 + value2;
|
||||
items.push(sourcesBinding.slice(r2, value4));
|
||||
if (value4 < length) {
|
||||
r2 = value4;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
break reducibleLoop2;
|
||||
}
|
||||
}
|
||||
return items;
|
||||
}, [length, sources]).map(_fun112356)}</View>;
|
||||
}
|
||||
|
||||
function useMaxWidth(a0) { // fn#112357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:7983, offset: 0x023c72ef, size: 98 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0;
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const value3 = undefined;
|
||||
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
|
||||
const value4 = Reflect.apply(useContext, binding, [ICYMIContext]);
|
||||
if (value != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = (value4 == null ? value3 : value4.width) - value4.inset;
|
||||
value -= 2 * value4.margin;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun112358() { // fn#112358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:339, offset: 0x023c7351, size: 762 bytes, params: 1, frame: 17
|
||||
const object3 = {};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.media = object4;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.video = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object3.thumbhashMedia = {'position': 'absolute', 'top': 0, 'left': 0, 'zIndex': 1};
|
||||
object3.container = {gap: 4};
|
||||
object3.imagesContainer = {'justifyContent': 'center', 'gap': 4, 'width': '100%'};
|
||||
object3.imageRow = {'flexDirection': 'row', 'gap': 4};
|
||||
const object13 = {overflow: 'hidden'};
|
||||
object13.borderTopEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object13.borderTopStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.topRow = object13;
|
||||
const object14 = {overflow: 'hidden'};
|
||||
object14.borderBottomEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object14.borderBottomStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.bottomRow = object14;
|
||||
const object15 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object15.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object15.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object15.padding = 16;
|
||||
object3.videoIcon = object15;
|
||||
const object16 = {'position': 'absolute', 'borderRadius': null, 'padding': null, 'bottom': 8, 'right': 8};
|
||||
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object16.padding = PX_4;
|
||||
object3.muteIcon = object16;
|
||||
const object17 = {};
|
||||
const SPOILER_HIDDEN_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_HIDDEN_BACKGROUND;
|
||||
object17.backgroundColor = SPOILER_HIDDEN_BACKGROUND;
|
||||
object17.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object17.paddingHorizontal = PX_12;
|
||||
object17.paddingVertical = 6;
|
||||
object3.spoilerText = object17;
|
||||
const object18 = {overflow: 'hidden'};
|
||||
object18.borderTopStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object18.borderBottomStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.leftColumn = object18;
|
||||
const object19 = {overflow: 'hidden'};
|
||||
object19.borderTopEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object19.borderBottomEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object19.gap = 4;
|
||||
object3.rightColumn = object19;
|
||||
const object20 = {overflow: 'hidden'};
|
||||
object20.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.singleImage = object20;
|
||||
object3.centerContainer = {'position': 'absolute', 'width': '100%', 'height': '100%', 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'zIndex': 2};
|
||||
object3.absoluteContainer = {'position': 'absolute', 'width': '100%', 'height': '100%', 'zIndex': 2};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object3.iconBg = {backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object3.iconBgSelected = {backgroundColor: WHITE};
|
||||
return object3;
|
||||
}
|
||||
|
||||
function ICYMIMediaMosaic({message, widthOverride, visible, itemType}) { // fn#112359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8202, offset: 0x023c764b, size: 389 bytes, params: 2, frame: 26
|
||||
var r0;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(message.getChannelId());
|
||||
});
|
||||
const env0_4 = channel;
|
||||
const {allMediaSources, nonEmbedSources, embedSources} = env0_4.useMemo(_fun112361, [message]);
|
||||
const value4 = env0_4.useCallback(_fun112364, [message.channel_id, message.id, allMediaSources, channel, itemType]);
|
||||
if (nonEmbedSources.length !== 0) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
value = <GravityAttachmentMediaMosaic widthOverride={widthOverride} sources={nonEmbedSources} handlePressMedia={value4} visible={visible} />;
|
||||
items2 = [value];
|
||||
items2[1] = embedSources?.map(_fun112366);
|
||||
value = <View {...viewBindingProps} key={'message-image-' + message.id}>{items2}</View>;
|
||||
r0 = value;
|
||||
} else if (embedSources.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
value = <GravityAttachmentMediaMosaic widthOverride={widthOverride} sources={nonEmbedSources} handlePressMedia={value4} visible={visible} />;
|
||||
items2 = [value];
|
||||
items2[1] = embedSources?.map(_fun112366);
|
||||
value = <View {...viewBindingProps} key={'message-image-' + message.id}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MediaMosaicImageC() { // fn#112337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:2672, owner: MediaMosaicImage.c, offset: 0x023c639e, size: 68 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
return {opacity: value.withTiming(env0_1 ? 0 : 1, {duration: 150})};
|
||||
}
|
||||
|
||||
function _fun112338() { // fn#112338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:2871, offset: 0x023c63e2, size: 95 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var createThumbhashImageFromPlaceholder;
|
||||
if (source.placeholder != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(14861) /* metro dependency 14861: ThumbhashUtils */;
|
||||
createThumbhashImageFromPlaceholder = moduleValue.createThumbhashImageFromPlaceholder;
|
||||
sourceBinding = source;
|
||||
return {uri: Reflect.apply(createThumbhashImageFromPlaceholder, moduleValue, [sourceBinding.placeholder]),
|
||||
width: sourceBinding.width, height: sourceBinding.height};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun112341() { // fn#112341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:3452, offset: 0x023c68e9, size: 59 bytes, params: 1, frame: 12
|
||||
if (env0_3) {
|
||||
env0_4(false);
|
||||
} else {
|
||||
handlePressMedia({ref: env0_2, initialIndex: initialIndex});
|
||||
}
|
||||
}
|
||||
|
||||
function MediaOnPress() { // fn#112344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:4295, owner: Media.onPress, offset: 0x023c6924, size: 48 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).setVideosMuted(!env0_5);
|
||||
}
|
||||
|
||||
function _fun112347(a0, a1) { // fn#112347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5158, offset: 0x023c6a89, size: 104 bytes, params: 3, frame: 20
|
||||
const handlePressMediaBinding = handlePressMedia;
|
||||
const offsetBinding = offset;
|
||||
const binding = env0_2;
|
||||
return (
|
||||
<Media
|
||||
handlePressMedia={handlePressMediaBinding}
|
||||
initialIndex={offsetBinding + a1}
|
||||
source={a0}
|
||||
dimensions={{width: (binding - 8) / 3, height: (binding - 8) / 3}}
|
||||
key={offsetBinding + a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112349(a0, a1) { // fn#112349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5482, offset: 0x023c6ba9, size: 60 bytes, params: 3, frame: 16
|
||||
return (
|
||||
<Media
|
||||
handlePressMedia={handlePressMedia}
|
||||
initialIndex={a1}
|
||||
source={a0}
|
||||
dimensions={env0_1}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112353() { // fn#112353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6759, offset: 0x023c6faa, size: 157 bytes, params: 1, frame: 15
|
||||
var Math;
|
||||
var value;
|
||||
const sourceBinding = source;
|
||||
const value2 = sourceBinding.width / sourceBinding.height;
|
||||
if (value2 >= 1) {
|
||||
Math = global.Math;
|
||||
value = Math.min(source.width, env0_1);
|
||||
return {height: value / value2, width: value};
|
||||
}
|
||||
Math = global.Math;
|
||||
const value3 = Math.min(source.height, 330);
|
||||
const value4 = value3 * value2;
|
||||
return value4 > env0_1 ? {width: env0_1, height: env0_1 / value2} : {width: value4, height: value3};
|
||||
}
|
||||
|
||||
function _fun112356(a0, a1) { // fn#112356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:7642, offset: 0x023c71dc, size: 275 bytes, params: 3, frame: 20
|
||||
var value;
|
||||
if (a0.length === 1) {
|
||||
value = environment.__proto__;
|
||||
value = environment;
|
||||
return (
|
||||
<OneImageRow
|
||||
handlePressMedia={handlePressMedia}
|
||||
source={a0[0]}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (a0.length === 2) {
|
||||
value = environment.__proto__;
|
||||
value = environment;
|
||||
return (
|
||||
<TwoImagesRow
|
||||
widthOverride={widthOverride}
|
||||
sources={a0}
|
||||
handlePressMedia={handlePressMedia}
|
||||
end={a1 === env0_4.length - 1}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const value2 = a1 === 0;
|
||||
const r8 = value2 ? value : env0_4[value].length + 3 * (a1 - 1);
|
||||
value = environment.__proto__;
|
||||
return (
|
||||
<ThreeImagesRow
|
||||
widthOverride={widthOverride}
|
||||
handlePressMedia={handlePressMedia}
|
||||
offset={r8}
|
||||
sources={a0}
|
||||
start={value2}
|
||||
end={a1 === env0_4.length - 1}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112361() { // fn#112361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8373, offset: 0x023c77f4, size: 194 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
const extractMediaSourcesFromMessage = mediaSourceUtilModule.extractMediaSourcesFromMessage;
|
||||
const messageBinding = message;
|
||||
const GRAVITY_VALID_EMBED_TYPES = (require(7230) /* metro dependency 7230: ICYMITypes */).GRAVITY_VALID_EMBED_TYPES;
|
||||
const value4 = Reflect.apply(extractMediaSourcesFromMessage, mediaSourceUtilModule, [messageBinding, messageBinding,
|
||||
undefined, GRAVITY_VALID_EMBED_TYPES]).map(_fun112362);
|
||||
const value5 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
value = env1_3((require(22) /* metro dependency 22 */).partition(value5, function(a0) {
|
||||
return a0.accessoryType === 'embed';
|
||||
}), 2);
|
||||
return {allMediaSources: value5, nonEmbedSources: value[1], embedSources: value[0]};
|
||||
}
|
||||
|
||||
function _fun112364({ref, initialIndex}) { // fn#112364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8751, offset: 0x023c78f2, size: 402 bytes, params: 2, frame: 28
|
||||
var environment;
|
||||
var r5;
|
||||
var moduleValue3;
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
|
||||
const itemInteracted = defaultImport.itemInteracted;
|
||||
const messageBinding = message;
|
||||
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'message', 'press_media']);
|
||||
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: itemType,
|
||||
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'media_mosaic',
|
||||
'actionIntentType': 'open', 'actionDestinationType': null}});
|
||||
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
|
||||
const ack = readStateActionCreatorsModule.ack;
|
||||
const channel_id = messageBinding.channel_id;
|
||||
const ICYMI = AnalyticsPages.ICYMI;
|
||||
const ACK_MEDIA_VIEWED = AnalyticsObjects.ACK_MEDIA_VIEWED;
|
||||
const ACK_SEMI_AUTOMATIC = AnalyticsObjectTypes.ACK_SEMI_AUTOMATIC;
|
||||
Reflect.apply(ack, readStateActionCreatorsModule, [channel_id, {page: ICYMI, object: ACK_MEDIA_VIEWED,
|
||||
objectType: ACK_SEMI_AUTOMATIC}, true, true, messageBinding.id]);
|
||||
allMediaSources.forEach(_fun112365);
|
||||
const openMediaModalModule = require(9544) /* metro dependency 9544: openMediaModal */;
|
||||
const openMediaModal = openMediaModalModule.openMediaModal;
|
||||
const object = {disableDownload: false, initialSources: [], initialIndex: initialIndex, analyticsSource: 'Channel'};
|
||||
object.channelId = messageBinding.channel_id;
|
||||
if (channel != null) {
|
||||
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
r5 = moduleValue3.computeChannelName(channel, UserStore, RelationshipStore);
|
||||
} else {
|
||||
r5 = '';
|
||||
}
|
||||
object.contextName = r5;
|
||||
object.contextIcon = undefined;
|
||||
object.originViewOrOriginLayout = ref.current;
|
||||
Reflect.apply(openMediaModal, openMediaModalModule, [object]);
|
||||
}
|
||||
|
||||
function _fun112366(a0, a1) { // fn#112366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:9635, offset: 0x023c7aae, size: 106 bytes, params: 3, frame: 16
|
||||
const value = environment.__proto__;
|
||||
return (
|
||||
<SingleImage
|
||||
widthOverride={widthOverride}
|
||||
handlePressMedia={env0_7}
|
||||
initialIndex={a1 + nonEmbedSources.length}
|
||||
source={a0}
|
||||
visible={visible}
|
||||
key={'gif-' + a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112362(a0) { // fn#112362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8476, offset: 0x023c78b6, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(9546) /* metro dependency 9546: MediaSourceUtil */).flattenSource(a0);
|
||||
}
|
||||
|
||||
function _fun112365(a0) { // fn#112365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:9146, offset: 0x023c7a84, size: 42 bytes, params: 2, frame: 14
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['embedURI'] = undefined;
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user