Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,256 @@
|
||||
/* Metro module 11252; source: modules/forums/native/posts/AnimatedCounter.tsx; dependencies: [57, 31, 27, 33, 4501, 44, 4017, 4508, 4577, 4573, 4581, 11253, 2] */
|
||||
function _fun86002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:6, offset: 0x01f83a51, size: 459 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const getItemKey = function(a0) {
|
||||
return '' + a0;
|
||||
};
|
||||
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 env0_5 = value2.StyleSheet;
|
||||
const env0_6 = value2.View;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 0,
|
||||
'flexGrow': 0, 'flexShrink': 0, 'justifyContent': 'flex-start', 'alignItems': 'flex-start',
|
||||
'overflow': 'hidden'}, hidden: {opacity: 0}});
|
||||
object2 = {ABOVE: -1};
|
||||
object2[-1] = 'ABOVE';
|
||||
object2.NEUTRAL = 0;
|
||||
object2[0] = 'NEUTRAL';
|
||||
object2.BELOW = 1;
|
||||
object2[1] = 'BELOW';
|
||||
const ABOVE = object2.ABOVE;
|
||||
const items2 = [ABOVE];
|
||||
const NEUTRAL = object2.NEUTRAL;
|
||||
items2[1] = NEUTRAL;
|
||||
const BELOW = object2.BELOW;
|
||||
items2[2] = BELOW;
|
||||
const env0_12 = value.createContext(undefined);
|
||||
object2 = {code: "function AnimatedCounterTsx1(){const{withSpring,interpolate,animationState,ANIMATION_INPUT,animationOutput,springConfig,state,TransitionStates,runOnJS,cleanUp}=this.__closure;return{transform:[{translateY:withSpring(interpolate(animationState.get(),ANIMATION_INPUT,animationOutput),springConfig,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}})}]};}"};
|
||||
object2 = {code: 'function AnimatedCounterTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
|
||||
value = value.memo(_fun86018);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/AnimatedCounter.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function getStartPosition({current, previous}) { // fn#86003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:496, offset: 0x01f83c1c, size: 67 bytes, params: 2, frame: 3
|
||||
return current > previous ? env0_10.BELOW : current < previous ? env0_10.ABOVE : env0_10.NEUTRAL;
|
||||
}
|
||||
|
||||
function AnimatedCount({count, formatter, state, cleanUp, height, springConfig, textColor, textVariant, textStyle}) { // fn#86004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1195, offset: 0x01f83c5f, size: 605 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
const value2 = env0_4.useContext(env0_12);
|
||||
var env0_4 = value2;
|
||||
(importDefault(44) /* metro dependency 44 */)(value2 != null, '[AnimatedCount] Context should not be nullish.');
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const MOUNTED = TransitionStates.MOUNTED;
|
||||
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule,
|
||||
[state === MOUNTED ? env0_10.NEUTRAL : getStartPosition(value2)]);
|
||||
const value5 = env0_4.useMemo(_fun86005, [height]);
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
|
||||
const closure = AnimatedCountY;
|
||||
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
interpolate: reanimatedRexportModule.interpolate, animationState: value4, ANIMATION_INPUT: env0_11,
|
||||
animationOutput: value5, springConfig: springConfig, state: state};
|
||||
object2.TransitionStates = TransitionStates;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.cleanUp = cleanUp;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13513457118386;
|
||||
closure.__initData = env0_13;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
|
||||
env0_4.useEffect(_fun86009, [value4, value2, state]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [StyleSheet.absoluteFill, value6];
|
||||
items2[2] = {height: height};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text
|
||||
variant={textVariant}
|
||||
color={textColor}
|
||||
style={textStyle}
|
||||
>
|
||||
{formatter(count)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function AnimatedCounterTransitionGroup({count, formatter, textColor, textVariant, textStyle, springConfig}) { // fn#86011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2594, offset: 0x01f84101, size: 538 bytes, params: 2, frame: 31
|
||||
const env0_3 = textVariant;
|
||||
const env0_4 = textStyle;
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value3 = env0_3(Reflect.apply(useState, binding, []), 2);
|
||||
const property = value3[0];
|
||||
const env0_7 = value3[1];
|
||||
binding = env0_4;
|
||||
useState = binding.useState;
|
||||
const value5 = env0_3(Reflect.apply(useState, binding, [[count]]), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_8 = value5[1];
|
||||
const env0_9 = env0_4.useRef(property2);
|
||||
const value6 = env0_4.useRef(count);
|
||||
env0_4.useEffect(_fun86012, [count]);
|
||||
const value7 = useAnimationContext(property2, value6);
|
||||
const value8 = env0_4.useCallback(_fun86015, []);
|
||||
const value9 = env0_4.useCallback(_fun86016, [formatter, property, springConfig, textColor, textStyle, textVariant]);
|
||||
const Provider = env0_12.Provider;
|
||||
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
|
||||
const provider = <Provider value={value7}><TransitionGroup items={property2} renderItem={value9} getItemKey={getItemKey} /></Provider>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{provider}
|
||||
<View style={styles.hidden} onLayout={value8}>
|
||||
<Text
|
||||
variant={textVariant}
|
||||
color={textColor}
|
||||
style={textStyle}
|
||||
>
|
||||
{formatter(count)}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BasicCounter({count, textStyle, textColor, textVariant, formatter}) { // fn#86017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3511, offset: 0x01f84449, size: 97 bytes, params: 2, frame: 18
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant={textVariant}
|
||||
color={textColor}
|
||||
style={textStyle}
|
||||
>
|
||||
{formatter(count)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86018({count, springConfig, textStyle, animate, textColor, textVariant, formatter = require(dependencyMap[11]).defaultFormatter}) { // fn#86018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3673, offset: 0x01f844aa, size: 196 bytes, params: 2, frame: 21
|
||||
animate = animate === undefined || animate;
|
||||
textColor = textColor === undefined ? 'text-default' : textColor;
|
||||
textVariant = textVariant === undefined ? 'text-sm/normal' : textVariant;
|
||||
return animate ? <AnimatedCounterTransitionGroup count={count} formatter={formatter} springConfig={springConfig} textColor={textColor} textVariant={textVariant} textStyle={textStyle} /> : <BasicCounter count={count} formatter={formatter} textColor={textColor} textVariant={textVariant} textStyle={textStyle} />;
|
||||
}
|
||||
|
||||
function _fun86005() { // fn#86005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1521, offset: 0x01f83ebc, size: 28 bytes, params: 1, frame: 11
|
||||
return env1_11.map(_fun86006);
|
||||
}
|
||||
|
||||
function AnimatedCountY() { // fn#86007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1700, owner: AnimatedCount.y, offset: 0x01f83f36, size: 226 bytes, params: 1, frame: 26
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const value4 = reanimatedRexportModule.interpolate(env0_5.get(), env1_11, env0_6);
|
||||
const springConfigBinding = springConfig;
|
||||
const closure = yT;
|
||||
const object = {};
|
||||
object.state = state;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
object.TransitionStates = TransitionStates;
|
||||
object.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object.cleanUp = cleanUp;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 10933954976568;
|
||||
closure.__initData = env1_14;
|
||||
return {transform: [{translateY: Reflect.apply(withSpring, springModule, [value4, springConfigBinding,
|
||||
'respect-motion-settings', closure])}]};
|
||||
}
|
||||
|
||||
function _fun86009() { // fn#86009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2345, offset: 0x01f84083, size: 99 bytes, params: 1, frame: 16
|
||||
var r1;
|
||||
var value;
|
||||
const binding = env0_5;
|
||||
const set = binding.set;
|
||||
const stateBinding = state;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const YEETED = TransitionStates.YEETED;
|
||||
if (stateBinding === YEETED) {
|
||||
value = getStartPosition(env0_4);
|
||||
value = -1 * value;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = env1_10.NEUTRAL;
|
||||
}
|
||||
Reflect.apply(set, binding, [r1]);
|
||||
}
|
||||
|
||||
function _fun86012() { // fn#86012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2840, offset: 0x01f8431b, size: 67 bytes, params: 1, frame: 13
|
||||
const binding = env0_10;
|
||||
const binding2 = env0_9;
|
||||
binding.current = binding2.current[0];
|
||||
const countBinding = count;
|
||||
binding2.current = [countBinding];
|
||||
env0_8([countBinding]);
|
||||
}
|
||||
|
||||
function useAnimationContext(a0, a1) { // fn#86013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2902, owner: AnimatedCounterTransitionGroup.useAnimationContext, offset: 0x01f8435e, size: 55 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return env1_4.useMemo(_fun86014, [a0, a1]);
|
||||
}
|
||||
|
||||
function _fun86016(a0, a1, a2, a3) { // fn#86016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3083, offset: 0x01f843b8, size: 145 bytes, params: 5, frame: 17
|
||||
return (
|
||||
<AnimatedCount
|
||||
formatter={formatter}
|
||||
springConfig={springConfig ?? (require(4581) /* metro dependency 4581: springPresets */).springStandard}
|
||||
count={a1}
|
||||
state={a2}
|
||||
cleanUp={a3}
|
||||
height={env0_6}
|
||||
textColor={textColor}
|
||||
textVariant={textVariant}
|
||||
textStyle={textStyle}
|
||||
key={a0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86006(a0) { // fn#86006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1532, offset: 0x01f83ed8, size: 94 bytes, params: 2, frame: 7
|
||||
const value = environment.__proto__;
|
||||
const heightBinding = height;
|
||||
const value2 = 0;
|
||||
return heightBinding != null ? env2_10.ABOVE === a0 ? -1 * height : env2_10.BELOW === a0 ? height : env2_10.NEUTRAL !== a0 ? undefined : value2 : value2;
|
||||
}
|
||||
|
||||
function yT(a0) { // fn#86008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1818, owner: AnimatedCount.y.t, offset: 0x01f84018, size: 107 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var stateBinding;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
let value = a0;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
stateBinding = state;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
if (r0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(runOnJS, value, [cleanUp])();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86014() { // fn#86014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2954, offset: 0x01f84395, size: 35 bytes, params: 1, frame: 4
|
||||
return {current: env0_0[0], previous: require.current};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 11253; source: modules/forums/native/posts/AnimatedCounterUtils.tsx; dependencies: [2] */
|
||||
function _fun86019(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11439:6, offset: 0x01f8456e, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/AnimatedCounterUtils.tsx');
|
||||
exports.defaultFormatter = function(a0) {
|
||||
return '' + a0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/* Metro module 11559; source: modules/forums/native/posts/ForumPostAppliedTags.tsx; dependencies: [31, 27, 33, 4501, 697, 11089, 2] */
|
||||
function _fun88580(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:6, offset: 0x01fe998b, size: 333 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
const env0_5 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {pillTagsContainer: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'}};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.tag = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object2.tagsContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.dot = {'backgroundColor': null, 'height': 4, 'width': 4, 'borderRadius': 10, 'marginHorizontal': 8,
|
||||
backgroundColor: BORDER_SUBTLE};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostAppliedTags.tsx');
|
||||
exports.ForumPostAppliedTagPills = ForumPostAppliedTagPills;
|
||||
exports.ForumPostAppliedTags = ForumPostAppliedTags;
|
||||
}
|
||||
|
||||
function ForumPostAppliedTagPills({appliedTags, hasUnreads, additionalTagsCount, containerStyle}) { // fn#88581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:608, offset: 0x01fe9ad8, size: 237 bytes, params: 2, frame: 24
|
||||
additionalTagsCount = additionalTagsCount === undefined ? 0 : additionalTagsCount;
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={[containerStyle, styles.pillTagsContainer]}>
|
||||
{appliedTags.map(_fun88582)}
|
||||
{additionalTagsCount > 0 && ((AppliedForumTagPill) => <AppliedForumTagPill tag={{id: '-1',
|
||||
name: '+' + additionalTagsCount}} containerStyle={styles.tag} hasUnreads={hasUnreads} />)((require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTagPill)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostAppliedTags({appliedTags, hasUnreads, additionalTagsCount, containerStyle}) { // fn#88583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:991, offset: 0x01fe9c19, size: 288 bytes, params: 2, frame: 27
|
||||
var r5;
|
||||
var jsxRuntimeEnv0_5Binding;
|
||||
var items3;
|
||||
additionalTagsCount = additionalTagsCount === undefined ? 0 : additionalTagsCount;
|
||||
const styles = useStyles();
|
||||
const items2 = [containerStyle];
|
||||
items2[1] = styles.tagsContainer;
|
||||
const value2 = appliedTags.map(_fun88584);
|
||||
const value3 = additionalTagsCount > 0;
|
||||
if (value3) {
|
||||
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
|
||||
items3 = [<View style={styles.dot} />];
|
||||
items3[1] = ((AppliedForumTag) => <AppliedForumTag tag={{id: '-1',
|
||||
name: '+' + additionalTagsCount}} hasUnreads={hasUnreads} />)((require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTag);
|
||||
r5 = <>{items3}</>;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{value2}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun88582(a0) { // fn#88582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:782, offset: 0x01fe9bc5, size: 84 bytes, params: 2, frame: 17
|
||||
const AppliedForumTagPill = (require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTagPill;
|
||||
return (
|
||||
<AppliedForumTagPill
|
||||
tag={a0}
|
||||
containerStyle={styles.tag}
|
||||
hasUnreads={hasUnreads}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun88584(a0, a1) { // fn#88584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:1157, offset: 0x01fe9d39, size: 158 bytes, params: 3, frame: 21
|
||||
const value = environment.__proto__;
|
||||
const jsxRuntimeEnv1_5Binding = jsxRuntimeEnv1_5;
|
||||
const AppliedForumTag = (require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTag;
|
||||
return (
|
||||
<>
|
||||
<AppliedForumTag
|
||||
tag={a0}
|
||||
hasUnreads={hasUnreads}
|
||||
key={a0.id}
|
||||
/>
|
||||
{a1 !== appliedTags.length - 1 && <View style={styles.dot} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Metro module 11567; source: modules/forums/native/posts/ForumPostContainer.tsx; dependencies: [31, 27, 33, 4501, 697, 8142, 4017, 11231, 1357, 6239, 2] */
|
||||
function _fun88605(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:6, offset: 0x01feb11d, size: 361 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {marginBottom: 12};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object.overflow = 'hidden';
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{childContainer: {'position': 'relative',
|
||||
'minHeight': 110, 'padding': 12}, card: {marginBottom: 12}, disabledContainer: object}]);
|
||||
const createContext = value.createContext;
|
||||
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
|
||||
const env0_7 = Reflect.apply(createContext, value, [reanimatedHelperTypesModule.createFakeSharedValue(false)]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostContainer.tsx');
|
||||
exports.useForumPostContainerPressedIn = useForumPostContainerPressedIn;
|
||||
exports.ForumPostPressableContainer = ForumPostPressableContainer;
|
||||
exports.ForumPostDisabledContainer = ForumPostDisabledContainer;
|
||||
}
|
||||
|
||||
function useForumPostContainerPressedIn() { // fn#88606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:552, offset: 0x01feb286, size: 24 bytes, params: 1, frame: 11
|
||||
return env0_3.useContext(env0_7);
|
||||
}
|
||||
|
||||
function ForumPostPressableContainer({threadId, children, style}) { // fn#88607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:648, offset: 0x01feb29e, size: 346 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const {onPressIn, onPressOut} = env0_3.useMemo(function() {
|
||||
return {onPressIn: _fun88609, onPressOut: _fun88610};
|
||||
}, [value2]);
|
||||
const {onTapPost,
|
||||
onLongTapPost} = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: threadId});
|
||||
const r13 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ForumPostContainer') ? 'surface-high' : 'secondary';
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
const view = <View style={styles.card}><Card style={[styles.childContainer,
|
||||
style]} variant={r13} accessibilityRole="button" onPress={onTapPost} onPressIn={onPressIn} onPressOut={onPressOut} onLongPress={onLongTapPost} unstable_pressDelay={130}>{children}</Card></View>;
|
||||
const Provider = env0_7.Provider;
|
||||
return (
|
||||
<Provider value={value2}>
|
||||
{view}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostDisabledContainer({children, style}) { // fn#88611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:1246, offset: 0x01feb440, size: 79 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={[styles.disabledContainer, style]} pointerEvents="none">
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun88608() { // fn#88608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:770, offset: 0x01feb3f8, size: 30 bytes, params: 1, frame: 3
|
||||
return {onPressIn: onPressIn_88609, onPressOut: onPressOut_88610};
|
||||
}
|
||||
|
||||
function onPressIn_88609() { // fn#88609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:786, offset: 0x01feb416, size: 21 bytes, params: 1, frame: 11
|
||||
return env1_0.set(true);
|
||||
}
|
||||
|
||||
function onPressOut_88610() { // fn#88610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:811, offset: 0x01feb42b, size: 21 bytes, params: 1, frame: 11
|
||||
return env1_0.set(false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
/* Metro module 11555; source: modules/forums/native/posts/ForumPostMedia.tsx; dependencies: [57, 31, 27, 1310, 1309, 33, 4501, 697, 5475, 4564, 11556, 4821, 11557, 477, 4840, 5278, 5263, 5074, 11558, 4002, 3829, 11231, 1477, 2] */
|
||||
function _fun88553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:6, offset: 0x01fe7e21, size: 576 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const closure = ForumPostMediaSpoiler;
|
||||
const closure2 = useSharedMediaProps;
|
||||
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.View;
|
||||
const env0_6 = value.StyleSheet;
|
||||
const env0_7 = value.ImageBackground;
|
||||
const PixelRatio = value.PixelRatio;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const env0_9 = (require(1309) /* metro dependency 1309: FormConstants */).ANDROID_FOREGROUND_RIPPLE;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.Fragment;
|
||||
const env0_12 = value.jsxs;
|
||||
let Math = global.Math;
|
||||
let min = Math.min;
|
||||
let get = PixelRatio.get;
|
||||
const env0_13 = Reflect.apply(min, Math, [Reflect.apply(get, PixelRatio, []), 4]);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
get = PixelRatio.get;
|
||||
const env0_14 = Reflect.apply(min, Math, [Reflect.apply(get, PixelRatio, []), 4]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {mediaContainer: {'position': 'relative', 'overflow': 'hidden'}};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object3.thumbnailBorder = object4;
|
||||
object3.thumbnail = {'height': 80, 'width': 80};
|
||||
object3.spoilerIconContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
|
||||
'justifyContent': 'center'};
|
||||
const PRIMARY_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300;
|
||||
object3.spoilerIcon = {color: PRIMARY_300, alignSelf: 'center'};
|
||||
object3.gridMediaContainer = {'borderRadius': 2, 'overflow': 'hidden'};
|
||||
const env0_15 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostMedia.tsx');
|
||||
exports.ForumPostMediaSpoiler = closure;
|
||||
exports.useSharedMediaProps = closure2;
|
||||
exports.ForumPostMediaThumbnail = ForumPostMediaThumbnail;
|
||||
exports.ForumPostGridMedia = ForumPostGridMedia;
|
||||
}
|
||||
|
||||
function ForumPostMediaAndroid({shouldSpoiler, blurTheme, source, androidStyle}) { // fn#88554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:702, offset: 0x01fe8061, size: 108 bytes, params: 2, frame: 17
|
||||
return (
|
||||
<ImageBackground
|
||||
style={androidStyle}
|
||||
source={source}
|
||||
blurRadius={shouldSpoiler ? 10 : 0}
|
||||
resizeMode="cover"
|
||||
>
|
||||
<ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />
|
||||
</ImageBackground>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostMediaIOS({shouldSpoiler, blurTheme, source, iosStyle}) { // fn#88555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:920, offset: 0x01fe80cd, size: 139 bytes, params: 2, frame: 21
|
||||
return (
|
||||
<>
|
||||
{((Component) => <Component style={iosStyle} source={source} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
<ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostMediaSpoiler({shouldSpoiler, blurTheme}) { // fn#88556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:1127, offset: 0x01fe8158, size: 199 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_11Binding;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
if (shouldSpoiler) {
|
||||
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
items2 = [((Component) => <Component blurTheme={blurTheme} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)];
|
||||
var viewBindingProps = {style: styles.spoilerIconContainer};
|
||||
value = importDefault(11556) /* metro dependency 11556: SpoilerIcon */;
|
||||
items2[1] = <View {...viewBindingProps}>{((Component) => <Component style={styles.spoilerIcon} height={30} width={30} />)(value)}</View>;
|
||||
value = <>{items2}</>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ForumPostMedia(a0) { // fn#88557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:1375, offset: 0x01fe821f, size: 596 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var AGE_VERIFICATION_OBSCURABLE_REASONS;
|
||||
const env0_0 = a0;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_4.useRef(null);
|
||||
const value3 = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).useShouldAgeVerifyForReason(a0.obscureReason);
|
||||
const r8 = a0.isMediaPost ? ((Component) => <Component {...a0} />)(importDefault(11557) /* metro dependency 11557: MediaPostGridThumbnail */) : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? <ForumPostMediaAndroid {...a0} /> : <ForumPostMediaIOS {...a0} />;
|
||||
if (a0.obscureReason == null) {
|
||||
r0 = a0.onPress != null ? <View style={[styles.mediaContainer,
|
||||
a0.containerStyle]} ref={value2}>{((PressableOpacity) => <PressableOpacity androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} activeOpacity={0.8} onPress={onPress_88559}>{r8}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : <View style={[styles.mediaContainer,
|
||||
|
||||
a0.containerStyle]} ref={value2}>{r8}</View>;
|
||||
} else {
|
||||
AGE_VERIFICATION_OBSCURABLE_REASONS = (require(4840) /* metro dependency 4840: ObscureMediaModels */).AGE_VERIFICATION_OBSCURABLE_REASONS;
|
||||
r0 = AGE_VERIFICATION_OBSCURABLE_REASONS.has(a0.obscureReason) && value3 ? <View style={[styles.mediaContainer,
|
||||
a0.containerStyle]} ref={value2}>{((PressableOpacity) => <PressableOpacity androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} activeOpacity={0} onPress={function() {
|
||||
var defaultImport = importDefault(dependencyMap[16]);
|
||||
var object = {};
|
||||
object.entryPoint = require(dependencyMap[17]).AgeVerificationModalEntryPoint.FORUM_POST_MEDIA_PREVIEW;
|
||||
defaultImport.showAgeVerificationGetStartedModal(object);
|
||||
}}>{r8}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : a0.onPress != null ? <View style={[styles.mediaContainer,
|
||||
|
||||
a0.containerStyle]} ref={value2}>{((PressableOpacity) => <PressableOpacity androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} activeOpacity={0.8} onPress={onPress_88559}>{r8}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : <View style={[styles.mediaContainer,
|
||||
|
||||
a0.containerStyle]} ref={value2}>{r8}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useSharedMediaProps({channel, media}) { // fn#88560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:2258, offset: 0x01fe84e7, size: 199 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
const messageAttachmentUtilsModule = require(11558) /* metro dependency 11558: MessageAttachmentUtils */;
|
||||
const useShouldObscure = messageAttachmentUtilsModule.useShouldObscure;
|
||||
const value3 = env0_3(Reflect.apply(useShouldObscure, messageAttachmentUtilsModule, [{media: media,
|
||||
channel: channel}]), 2);
|
||||
object2 = {shouldObscure: value3[0], obscureReason: value3[1]};
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
object2.blurTheme = sharedModule.isThemeDark(ThemeStore.theme) ? 'dark' : 'light';
|
||||
const GifAutoPlay = (require(3829) /* metro dependency 3829: UserSettings */).GifAutoPlay;
|
||||
object2.format = GifAutoPlay.useSetting() ? null : 'png';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ForumPostMediaThumbnail({channel, isLocalDeviceMedia, firstMessageId, media, isEmbed, embedLeftBorderColor, containerStyle}) { // fn#88561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:2718, offset: 0x01fe85ae, size: 413 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const value2 = env0_4.useCallback(function(a0) {
|
||||
onTapMedia({messageId: firstMessageId, mediaItems: [media], containerRef: a0});
|
||||
}, [firstMessageId, media,
|
||||
(importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: channel.id}).onTapMedia]);
|
||||
const {shouldObscure, obscureReason, blurTheme, format} = useSharedMediaProps({channel: channel, media: media});
|
||||
var env0_4 = format;
|
||||
const value4 = env0_4.useMemo(_fun88563, [format, isLocalDeviceMedia, media.height, media.src, media.width,
|
||||
media.srcIsAnimated]);
|
||||
return (
|
||||
<ForumPostMedia
|
||||
iosStyle={styles.thumbnail}
|
||||
androidStyle={styles.thumbnail}
|
||||
containerStyle={[styles.thumbnailBorder, isEmbed && ({borderLeftWidth: 2,
|
||||
borderLeftColor: embedLeftBorderColor}), containerStyle]}
|
||||
obscureReason={obscureReason}
|
||||
shouldSpoiler={shouldObscure != null && shouldObscure}
|
||||
blurTheme={blurTheme}
|
||||
source={value4}
|
||||
onPress={value2}
|
||||
isMediaPost={channel.isMediaPost()}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostGridMedia({channel, media, targetWidth, targetHeight}) { // fn#88564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:3629, offset: 0x01fe8842, size: 298 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const {shouldObscure, obscureReason, blurTheme, format} = useSharedMediaProps({channel: channel, media: media});
|
||||
const isMediaPost2 = channel.isMediaPost();
|
||||
const binding = isMediaPost2;
|
||||
const useMemo = binding.useMemo;
|
||||
return (
|
||||
<ForumPostMedia
|
||||
containerStyle={styles.gridMediaContainer}
|
||||
iosStyle={{height: targetHeight, width: targetWidth}}
|
||||
androidStyle={{height: targetHeight, width: targetWidth}}
|
||||
shouldSpoiler={shouldObscure != null && shouldObscure}
|
||||
obscureReason={obscureReason}
|
||||
blurTheme={blurTheme}
|
||||
source={Reflect.apply(useMemo, binding, [_fun88565, [media.src, media.width, media.height, targetWidth,
|
||||
targetHeight, format, isMediaPost2]])}
|
||||
isPortrait={media.height >= media.width}
|
||||
isMediaPost={isMediaPost2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostMediaOnPress_88559() { // fn#88559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:2137, owner: ForumPostMedia.onPress, offset: 0x01fe84bc, size: 43 bytes, params: 1, frame: 12
|
||||
return env0_0.onPress?.(env0_1);
|
||||
}
|
||||
|
||||
function _fun88563() { // fn#88563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:3105, offset: 0x01fe877e, size: 196 bytes, params: 1, frame: 20
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var getSrcWithWidthAndHeight;
|
||||
var object3;
|
||||
var mediaBinding;
|
||||
var Math;
|
||||
var ceil;
|
||||
var binding;
|
||||
const isLocalDeviceMediaBinding = isLocalDeviceMedia;
|
||||
const object4 = {};
|
||||
if (isLocalDeviceMediaBinding) {
|
||||
object4.uri = media.src;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(1477) /* metro dependency 1477: ImageUtils */;
|
||||
getSrcWithWidthAndHeight = moduleValue.getSrcWithWidthAndHeight;
|
||||
object3 = {};
|
||||
mediaBinding = media;
|
||||
object3.src = mediaBinding.src;
|
||||
object3.sourceWidth = mediaBinding.width;
|
||||
object3.sourceHeight = mediaBinding.height;
|
||||
Math = global.Math;
|
||||
ceil = Math.ceil;
|
||||
binding = env1_13;
|
||||
object3.targetWidth = Reflect.apply(ceil, Math, [80 * binding]);
|
||||
Math = global.Math;
|
||||
object3.targetHeight = Math.ceil(80 * binding);
|
||||
object3.format = format;
|
||||
object3.animated = mediaBinding.srcIsAnimated;
|
||||
object4.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue, [object3]);
|
||||
}
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun88565() { // fn#88565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:3852, offset: 0x01fe896c, size: 380 bytes, params: 1, frame: 21
|
||||
var object4;
|
||||
var getSrcWithWidthAndHeight;
|
||||
var mediaBinding;
|
||||
var width;
|
||||
var height;
|
||||
var Math;
|
||||
var ceil;
|
||||
var targetWidthBinding;
|
||||
var binding;
|
||||
var min;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var moduleValue2;
|
||||
var object5;
|
||||
if (env0_4) {
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
targetWidthBinding = targetWidth;
|
||||
value3 = environment.__proto__;
|
||||
binding = env1_14;
|
||||
value4 = targetWidthBinding * binding;
|
||||
mediaBinding = media;
|
||||
width = mediaBinding.width;
|
||||
value5 = value4 / width;
|
||||
value6 = targetHeight * binding;
|
||||
height = mediaBinding.height;
|
||||
value7 = Reflect.apply(min, Math, [1, value5, value6 / height]);
|
||||
object4 = {};
|
||||
moduleValue2 = require(1477) /* metro dependency 1477: ImageUtils */;
|
||||
getSrcWithWidthAndHeight = moduleValue2.getSrcWithWidthAndHeight;
|
||||
object5 = {};
|
||||
object5.src = mediaBinding.src;
|
||||
width = mediaBinding.width;
|
||||
object5.sourceWidth = width;
|
||||
height = mediaBinding.height;
|
||||
object5.sourceHeight = height;
|
||||
Math = global.Math;
|
||||
ceil = Math.ceil;
|
||||
width = mediaBinding.width;
|
||||
object5.targetWidth = Reflect.apply(ceil, Math, [width * value7]);
|
||||
Math = global.Math;
|
||||
ceil = Math.ceil;
|
||||
height = mediaBinding.height;
|
||||
object5.targetHeight = Reflect.apply(ceil, Math, [height * value7]);
|
||||
object5.format = format;
|
||||
object4.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue2, [object5]);
|
||||
} else {
|
||||
object4 = {};
|
||||
var moduleValue = require(1477) /* metro dependency 1477: ImageUtils */;
|
||||
getSrcWithWidthAndHeight = moduleValue.getSrcWithWidthAndHeight;
|
||||
var object6 = {};
|
||||
mediaBinding = media;
|
||||
object6.src = mediaBinding.src;
|
||||
object6.sourceWidth = mediaBinding.width;
|
||||
object6.sourceHeight = mediaBinding.height;
|
||||
Math = global.Math;
|
||||
ceil = Math.ceil;
|
||||
targetWidthBinding = targetWidth;
|
||||
binding = env1_14;
|
||||
object6.targetWidth = Reflect.apply(ceil, Math, [targetWidthBinding * binding]);
|
||||
Math = global.Math;
|
||||
object6.targetHeight = Math.ceil(targetHeight * binding);
|
||||
object6.format = format;
|
||||
object4.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue, [object6]);
|
||||
}
|
||||
return object4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
/* Metro module 11570; source: modules/forums/native/posts/ForumPostMessageContent.tsx; dependencies: [57, 31, 27, 33, 4501, 11571, 4584, 8518, 4573, 2] */
|
||||
function _fun88616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:6, offset: 0x01febb0d, size: 212 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 env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0, a1) {
|
||||
return {text: {alignSelf: 'flex-start'}, container: {'flexWrap': 'wrap', 'flexDirection': 'row',
|
||||
'alignSelf': 'flex-start', 'rowGap': null, 'maxHeight': null, 'overflow': 'hidden', rowGap: a1,
|
||||
maxHeight: a0}};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostMessageContent.tsx');
|
||||
exports.default = ForumPostMessageContent;
|
||||
}
|
||||
|
||||
function ForumPostMessageContent({messageContent, message, isMessageDeleted, hasUnreads, messageLoaded, lineClamp, rowGap, senderModifier}) { // fn#88618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:421, offset: 0x01febc1a, size: 557 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var Text;
|
||||
lineClamp = lineClamp === undefined ? 2 : lineClamp;
|
||||
rowGap = rowGap === undefined ? 3 : rowGap;
|
||||
var value;
|
||||
const value2 = (importDefault(11571) /* metro dependency 11571: useNativeForumPostContent */)({message: message,
|
||||
messageLoaded: messageLoaded, messageContent: messageContent, isMessageDeleted: isMessageDeleted,
|
||||
senderModifier: senderModifier});
|
||||
const content = value2.content;
|
||||
const style = value2.style;
|
||||
const env0_3 = style;
|
||||
const variant = value2.variant;
|
||||
const env0_4 = variant;
|
||||
let binding = env0_4;
|
||||
const [property, env0_6] = env0_3(binding.useState(), 2);
|
||||
const styles = useStyles(property != null ? property * lineClamp : lineClamp * (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).scaleTextLineHeight(variant,
|
||||
(require(4584) /* metro dependency 4584: useFontScale */).useFontScale()), rowGap);
|
||||
binding = env0_4;
|
||||
if (binding.useMemo(_fun88619, [content])) {
|
||||
r0 = <View style={styles.container}>{binding.useMemo(_fun88621, [content, variant, hasUnreads, style, styles,
|
||||
lineClamp, property, binding.useCallback(_fun88620, [property])])}</View>;
|
||||
} else {
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = 'text-muted';
|
||||
value = <Text variant={variant} color={hasUnreads ? 'text-default' : value} lineClamp={lineClamp} ellipsizeMode="tail" style={[style,
|
||||
|
||||
styles.text]}>{content}</Text>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun88619() { // fn#88619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:838, offset: 0x01febe47, size: 86 bytes, params: 1, frame: 13
|
||||
return typeof content !== 'string' && content != null && (global.Array.isArray(content) || env1_4.isValidElement(content));
|
||||
}
|
||||
|
||||
function _fun88620(a0) { // fn#88620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:934, offset: 0x01febe9d, size: 71 bytes, params: 2, frame: 12
|
||||
var lines;
|
||||
var height;
|
||||
if (env0_5 == null) {
|
||||
lines = a0.nativeEvent.lines;
|
||||
if (lines != null) {
|
||||
if (lines.length > 0) {
|
||||
height = lines[0].height;
|
||||
if (height > 0) {
|
||||
env0_6(height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88621() { // fn#88621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:1050, offset: 0x01febee4, size: 58 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
const isArray2 = Array.isArray(content);
|
||||
contentBinding = content;
|
||||
return isArray2 ? contentBinding.map(_fun88622) : contentBinding;
|
||||
}
|
||||
|
||||
function _fun88622(a0, a1) { // fn#88622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:1078, offset: 0x01febf1e, size: 355 bytes, params: 3, frame: 19
|
||||
var r0;
|
||||
var object2;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var value4;
|
||||
let value = typeof a0;
|
||||
if (value === 'string') {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = undefined;
|
||||
object2 = {};
|
||||
value4 = environment.__proto__;
|
||||
object2.variant = variant;
|
||||
r0 = hasUnreads ? 'text-default' : 'text-muted';
|
||||
object2.color = r0;
|
||||
object2.style = [style, styles.text];
|
||||
object2.lineClamp = lineClamp;
|
||||
object2.ellipsizeMode = 'tail';
|
||||
r0 = env1_5 == null ? env1_8 : value;
|
||||
object2.onTextLayout = r0;
|
||||
return (
|
||||
<Text {...object2} key={'text-' + a1}>
|
||||
{global.String(a0)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
if (value === 'number') {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = undefined;
|
||||
object2 = {};
|
||||
value4 = environment.__proto__;
|
||||
object2.variant = variant;
|
||||
r0 = hasUnreads ? 'text-default' : 'text-muted';
|
||||
object2.color = r0;
|
||||
object2.style = [style, styles.text];
|
||||
object2.lineClamp = lineClamp;
|
||||
object2.ellipsizeMode = 'tail';
|
||||
r0 = env1_5 == null ? env1_8 : value;
|
||||
object2.onTextLayout = r0;
|
||||
return (
|
||||
<Text {...object2} key={'text-' + a1}>
|
||||
{global.String(a0)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
if (value === 'boolean') {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = undefined;
|
||||
object2 = {};
|
||||
value4 = environment.__proto__;
|
||||
object2.variant = variant;
|
||||
r0 = hasUnreads ? 'text-default' : 'text-muted';
|
||||
object2.color = r0;
|
||||
object2.style = [style, styles.text];
|
||||
object2.lineClamp = lineClamp;
|
||||
object2.ellipsizeMode = 'tail';
|
||||
r0 = env1_5 == null ? env1_8 : value;
|
||||
object2.onTextLayout = r0;
|
||||
return (
|
||||
<Text {...object2} key={'text-' + a1}>
|
||||
{global.String(a0)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_4;
|
||||
const r4 = binding.isValidElement(a0) && a0.key != null ? 'element-' + a0.key + '-' + a1 : 'element-' + a1;
|
||||
const Fragment = env2_4.Fragment;
|
||||
return <Fragment {...{children: a0}} key={r4} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 11564; source: modules/forums/native/posts/ForumPostMessageCount.tsx; dependencies: [31, 27, 33, 4501, 697, 477, 9619, 1244, 6682, 4573, 11252, 2] */
|
||||
function _fun88593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11750:6, offset: 0x01fea443, size: 368 bytes, params: 8, frame: 26
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = 0;
|
||||
importAll(dependencyMap[value]);
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = 2;
|
||||
const value3 = require(dependencyMap[value2]);
|
||||
const env0_4 = value3.jsx;
|
||||
const env0_5 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
|
||||
object5.tintColor = ICON_MUTED;
|
||||
object5.marginEnd = 4;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object5.marginTop = platformUtilsModule.isAndroid() ? value2 : value;
|
||||
object4.iconRead = object5;
|
||||
const object6 = {};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object6.tintColor = INTERACTIVE_TEXT_DEFAULT;
|
||||
object6.marginEnd = 4;
|
||||
const value6 = platformUtilsModule;
|
||||
object6.marginTop = value6.isAndroid() ? value2 : value;
|
||||
object4.iconUnread = object6;
|
||||
object4.messageUnreadCount = {marginStart: 4};
|
||||
object4.container = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostMessageCount.tsx');
|
||||
exports.default = ForumPostMessageCount;
|
||||
}
|
||||
|
||||
function ForumPostMessageCount({thread, hasUnreads, containerStyle}) { // fn#88594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11750:559, offset: 0x01fea5b3, size: 576 bytes, params: 2, frame: 29
|
||||
var r5;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const {messageCountText, isMaxMessageCount, messageCount,
|
||||
unreadCount} = (require(9619) /* metro dependency 9619: ForumHooks */).useMessageCount(thread);
|
||||
const r12 = hasUnreads ? 'text-default' : 'text-muted';
|
||||
const viewBindingProps = {style: [styles.container, containerStyle]};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8M0DrB'],
|
||||
{count: messageCountText});
|
||||
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
|
||||
const items2 = [<ChatIcon size="xs" style={hasUnreads ? styles.iconUnread : styles.iconRead} color={hasUnreads ? 'interactive-text-default' : 'icon-muted'} />];
|
||||
items2[1] = isMaxMessageCount ? <Text variant="text-sm/semibold" color={r12}>{messageCountText}</Text> : ((Component) => <Component count={messageCount} textVariant="text-sm/semibold" textColor={r12} animate={false} />)(importDefault(11252) /* metro dependency 11252: AnimatedCounter */);
|
||||
const value10 = unreadCount != null;
|
||||
if (value10) {
|
||||
var textProps = {'variant': 'text-sm/semibold', 'color': 'text-brand', style: styles.messageUnreadCount};
|
||||
value = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.z3PEth, {count: unreadCount});
|
||||
value = <Text {...textProps}>{'('}{value}{')'}</Text>;
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value10;
|
||||
}
|
||||
items2[2] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/* Metro module 11561; source: modules/forums/native/posts/ForumPostNewTag.tsx; dependencies: [31, 33, 4501, 697, 1305, 2] */
|
||||
function _fun88587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11747:6, offset: 0x01fe9f5a, size: 200 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BRAND_260 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_260;
|
||||
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{container: {paddingVertical: 1,
|
||||
backgroundColor: BRAND_260}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostNewTag.tsx');
|
||||
exports.default = ForumPostNewTag;
|
||||
}
|
||||
|
||||
function ForumPostNewTag({containerStyle}) { // fn#88588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11747:316, offset: 0x01fea022, size: 97 bytes, params: 2, frame: 16
|
||||
const styles = useStyles();
|
||||
const NewTag = (require(1305) /* metro dependency 1305: native */).NewTag;
|
||||
return (
|
||||
<NewTag
|
||||
containerStyle={[containerStyle, styles.container]}
|
||||
variant="text-xs/bold"
|
||||
color="button-outline-brand-border-active"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 11549; source: modules/forums/native/posts/ForumPostPinIcon.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11550, 2] */
|
||||
function _fun88526(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11735:6, offset: 0x01fe6aa1, size: 302 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'borderRadius': null, 'width': 23, 'height': 23, 'marginEnd': 4};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object4.backgroundColor = BACKGROUND_BRAND;
|
||||
object3.pin = object4;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object3.pinIcon = {'height': 14, 'width': 14, tintColor: WHITE};
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostPinIcon.tsx');
|
||||
exports.default = ForumPostPinIcon;
|
||||
}
|
||||
|
||||
function ForumPostPinIcon({containerStyle}) { // fn#88527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11735:508, offset: 0x01fe6bcf, size: 129 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.pin, containerStyle];
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Icon source={importDefault(11550) /* metro dependency 11550 */} style={styles.pinIcon} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 11560; source: modules/forums/native/posts/ForumPostTimestamp.tsx; dependencies: [31, 11547, 33, 4501, 9619, 4573, 2] */
|
||||
function _fun88585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11746:6, offset: 0x01fe9dd7, size: 199 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(11547) /* metro dependency 11547: ForumChannelStore */).useForumChannelStore;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({text: {'lineHeight': 18,
|
||||
'height': 18}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTimestamp.tsx');
|
||||
exports.default = ForumPostTimestamp;
|
||||
}
|
||||
|
||||
function ForumPostTimestamp({textStyle, thread, hasUnreads, format}) { // fn#88586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11746:300, offset: 0x01fe9e9e, size: 188 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const value2 = (require(9619) /* metro dependency 9619: ForumHooks */).useLastActiveTimestamp(thread,
|
||||
useForumChannelStore(thread.parent_id).sortOrder, format);
|
||||
const r5 = hasUnreads ? 'text-default' : 'text-muted';
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
lineClamp={1}
|
||||
variant="text-xs/normal"
|
||||
color={r5}
|
||||
style={[textStyle, styles.text]}
|
||||
>
|
||||
{value2}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 11562; source: modules/forums/native/posts/ForumPostTitle.tsx; dependencies: [31, 33, 4501, 4573, 2] */
|
||||
function _fun88589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11748:6, offset: 0x01fea083, size: 172 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {marginBottom: 6}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTitle.tsx');
|
||||
exports.default = ForumPostTitle;
|
||||
}
|
||||
|
||||
function ForumPostTitle({title, lineClamp, ellipsizeMode, hasUnreads, onTextLayout}) { // fn#88590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11748:257, offset: 0x01fea12f, size: 139 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const r9 = hasUnreads ? 'mobile-text-heading-primary' : 'text-muted';
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-md/semibold"
|
||||
color={r9}
|
||||
lineClamp={lineClamp}
|
||||
ellipsizeMode={ellipsizeMode}
|
||||
style={styles.title}
|
||||
onTextLayout={onTextLayout}
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* Metro module 11565; source: modules/forums/native/posts/ForumPostTypingUsers.tsx; dependencies: [31, 27, 33, 4501, 697, 9619, 11566, 11567, 4017, 1305, 4573, 2] */
|
||||
function _fun88595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:6, offset: 0x01fea7f3, size: 458 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {container: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1}};
|
||||
object2.lastTypingUser = {marginEnd: 0};
|
||||
const object5 = {'marginEnd': -8, 'borderWidth': 2};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.typingUser = object5;
|
||||
const object6 = {'backgroundColor': null, 'paddingVertical': null, 'paddingLeft': 4, 'borderRadius': null,
|
||||
'marginStart': -8, 'borderWidth': 4, 'marginEnd': 8, 'marginTop': -1, 'marginBottom': -1};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.paddingVertical = PX_4;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.dots = object6;
|
||||
object2.typingText = {flexShrink: 1};
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object2.borderColor = {color: CARD_BACKGROUND_DEFAULT};
|
||||
const CARD_PRIMARY_PRESSED_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_PRIMARY_PRESSED_BG;
|
||||
object2.borderColorPressed = {color: CARD_PRIMARY_PRESSED_BG};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function ForumPostTypingUsersTsx1(){const{forumPostPressedIn,borderColorPressed,borderColor}=this.__closure;return{borderColor:forumPostPressedIn.value?borderColorPressed:borderColor};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTypingUsers.tsx');
|
||||
exports.default = ForumPostTypingUsers;
|
||||
}
|
||||
|
||||
function ForumPostTypingUsers({thread, typingUserIds, hasUnreads}) { // fn#88596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:1003, offset: 0x01fea9bd, size: 546 bytes, params: 2, frame: 26
|
||||
var r0;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(9619) /* metro dependency 9619: ForumHooks */).useFacepileUsers(thread, typingUserIds);
|
||||
const defaultImport = importDefault(11566) /* metro dependency 11566: useTypingText */;
|
||||
const object2 = {};
|
||||
object2.channelId = thread.id;
|
||||
object2.guildId = thread.getGuildId();
|
||||
object2.typingUserIds = typingUserIds;
|
||||
const value3 = defaultImport(object2);
|
||||
const color = styles.borderColor.color;
|
||||
const color2 = styles.borderColorPressed.color;
|
||||
const value4 = (require(11567) /* metro dependency 11567: ForumPostContainer */).useForumPostContainerPressedIn();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ForumPostTypingUsers_;
|
||||
closure.__closure = {forumPostPressedIn: value4, borderColorPressed: color2, borderColor: color};
|
||||
closure.__workletHash = 6320844933544;
|
||||
closure.__initData = env0_7;
|
||||
if (thread.getGuildId() == null) {
|
||||
r0 = null;
|
||||
} else if (value2.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
items2 = [value2.map(_fun88598)];
|
||||
items2[1] = ((View) => <View style={[styles.dots, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])]}>{((Ellipsis) => <Ellipsis />)((require(1305) /* metro dependency 1305: native */).Ellipsis)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
|
||||
items2[2] = ((Text) => <Text variant="text-sm/semibold" color={hasUnreads ? 'text-default' : 'text-muted'} style={styles.typingText} lineClamp={1}>{value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ForumPostTypingUsers_() { // fn#88597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:1310, owner: ForumPostTypingUsers._, offset: 0x01feabdf, size: 34 bytes, params: 1, frame: 4
|
||||
return {borderColor: env0_4.value ? color : color};
|
||||
}
|
||||
|
||||
function _fun88598(a0, a1) { // fn#88598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:1583, offset: 0x01feac01, size: 212 bytes, params: 3, frame: 23
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.typingUser, env0_5];
|
||||
items2[2] = a1 === env0_1.length - 1 && styles.lastTypingUser;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const avatarProps = {source: a0.getAvatarSource(env0_6)};
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SIZE_16 = AvatarSizes.SIZE_16;
|
||||
avatarProps.size = SIZE_16;
|
||||
return (
|
||||
<View style={items2} key={a0.id}>
|
||||
<Avatar {...avatarProps} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 11551; source: modules/forums/native/posts/ForumPostUsername.tsx; dependencies: [31, 27, 4502, 11547, 33, 4501, 9619, 1389, 11335, 11552, 566, 8206, 1305, 4573, 2] */
|
||||
function _fun88529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:6, offset: 0x01fe6c96, size: 317 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_5 = (require(11547) /* metro dependency 11547: ForumChannelStore */).useForumChannelStore;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({authorContainer: {'flexDirection': 'row',
|
||||
'alignItems': 'center', 'justifyContent': 'center', 'marginEnd': 8}, roleDotContainer: {'alignItems': 'center',
|
||||
'justifyContent': 'center', 'marginEnd': 2, 'marginBottom': 4}, authorName: {'overflow': 'hidden',
|
||||
'flexWrap': 'nowrap'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostUsername.tsx');
|
||||
exports.ForumPostAuthor = ForumPostAuthor;
|
||||
exports.ForumPostMessageAuthor = ForumPostMessageAuthor;
|
||||
}
|
||||
|
||||
function ForumPostUsername({thread, authorId, authorName, authorColor, authorColors, containerStyle, roleDotStyle, textStyle, suffix, hasUnreads}) { // fn#88530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:446, offset: 0x01fe6dd3, size: 697 bytes, params: 2, frame: 34
|
||||
var object3;
|
||||
var items3;
|
||||
const styles = useStyles();
|
||||
let object4 = {thread: thread};
|
||||
const layoutType = useForumChannelStore(object4.thread.parent_id).layoutType;
|
||||
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
|
||||
const GRID = ForumLayout.GRID;
|
||||
let r7 = layoutType !== GRID ? 158 : 72;
|
||||
const value5 = (importDefault(11335) /* metro dependency 11335: useChatWidth */)();
|
||||
const GRID_HORIZONTAL_PADDING = (require(11552) /* metro dependency 11552: ForumPostGridBody */).GRID_HORIZONTAL_PADDING;
|
||||
const value6 = value5 - GRID_HORIZONTAL_PADDING - r7;
|
||||
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.roleStyle;
|
||||
});
|
||||
const r14 = roleStyle !== 'username' ? {} : authorColor != null ? {color: authorColor} : {};
|
||||
const r17 = hasUnreads ? {} : {opacity: 0.8};
|
||||
const value7 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(authorColors);
|
||||
const enhancedRoleColorUtilsModule = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
|
||||
const useIsRoleStyleAndRoleColorsEligibleForERC = enhancedRoleColorUtilsModule.useIsRoleStyleAndRoleColorsEligibleForERC;
|
||||
const guild_id = thread.guild_id;
|
||||
let r0 = authorId ?? undefined;
|
||||
if (authorName == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
object4 = {};
|
||||
object3 = {maxWidth: value6};
|
||||
copyDataProperties(object3, styles.authorContainer, roleStyle);
|
||||
object4.style = [object3, r17, containerStyle];
|
||||
object4.accessibilityRole = 'button';
|
||||
r7 = roleStyle === 'dot' && authorColor != null;
|
||||
r7 = r7 && <View style={[styles.roleDotContainer,
|
||||
roleDotStyle]}>{((RoleDot) => <RoleDot size="small" color={authorColor} colors={authorColors} />)((require(1305) /* metro dependency 1305: native */).RoleDot)}</View>;
|
||||
items3 = [r7];
|
||||
items3[1] = ((Text) => <Text variant="text-sm/semibold" color="mobile-text-heading-primary" gradientColors={Reflect.apply(useIsRoleStyleAndRoleColorsEligibleForERC,
|
||||
|
||||
enhancedRoleColorUtilsModule, [guild_id, r0, roleStyle,
|
||||
value7]) ? value7 : undefined} lineClamp={1} style={[r14, textStyle,
|
||||
styles.authorName]}>{authorName}{suffix}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
r0 = <View {...object4}>{items3}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ForumPostAuthor({thread, hasUnreads, suffix, containerStyle, roleDotStyle, textStyle}) { // fn#88532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:1517, offset: 0x01fe708c, size: 246 bytes, params: 2, frame: 25
|
||||
const {user, author} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumPostAuthor(thread);
|
||||
return user == null ? null : <ForumPostUsername thread={thread} authorId={user?.id} authorName={author?.nick ?? user?.username} authorColor={author?.colorString} authorColors={author?.colorStrings} suffix={suffix} containerStyle={containerStyle} roleDotStyle={roleDotStyle} textStyle={textStyle} hasUnreads={hasUnreads} />;
|
||||
}
|
||||
|
||||
function ForumPostMessageAuthor({thread, message, hasUnreads, suffix, containerStyle, roleDotStyle, textStyle}) { // fn#88533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:2018, offset: 0x01fe7182, size: 188 bytes, params: 2, frame: 24
|
||||
const {authorName, authorColor, authorColors,
|
||||
user} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumPostMessageAuthor(message, thread);
|
||||
return (
|
||||
<ForumPostUsername
|
||||
thread={thread}
|
||||
authorId={user?.id}
|
||||
authorName={authorName}
|
||||
authorColor={authorColor}
|
||||
authorColors={authorColors}
|
||||
suffix={suffix}
|
||||
containerStyle={containerStyle}
|
||||
roleDotStyle={roleDotStyle}
|
||||
textStyle={textStyle}
|
||||
hasUnreads={hasUnreads}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
/* Metro module 11552; source: modules/forums/native/posts/grid/ForumPostGridBody.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1305, 11553, 11554, 11158, 4573, 1478, 1360, 11555, 6863, 9587, 11559, 2] */
|
||||
function _fun88534(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:6, offset: 0x01fe723e, size: 683 bytes, params: 8, frame: 24
|
||||
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 env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object = {};
|
||||
const object3 = {'height': 20, 'width': 33, 'backgroundColor': 'black', 'borderRadius': null, 'resizeMode': 'cover'};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object.gifIcon = object3;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object.container = {'position': 'relative', 'backgroundColor': null, 'height': 225,
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object.wideAspectRatioContainer = {height: 192};
|
||||
object.mediaIconContainer = {paddingLeft: 6};
|
||||
object.headerLeftContainer = {'flexDirection': 'row', 'position': 'absolute', 'top': 4, 'left': 4};
|
||||
object.footerLeftContainer = {'flexDirection': 'row', 'position': 'absolute', 'bottom': 4, 'left': 4,
|
||||
'alignItems': 'center', 'justifyContent': 'flex-start'};
|
||||
object.footerRightContainer = {'position': 'absolute', 'bottom': 4, 'right': 4, 'alignItems': 'center',
|
||||
'justifyContent': 'flex-start'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.extraMediaCountContainer = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null,
|
||||
'height': 24, 'paddingHorizontal': 8, 'borderRadius': 20, backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object.extraMediaCount = {marginLeft: 2};
|
||||
const object4 = {'height': 225, 'flexDirection': 'row', 'borderRadius': null, 'overflow': 'hidden'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object.grid = object4;
|
||||
object.wideAspectRatioGrid = {height: 192};
|
||||
object.column = {'flex': 1, 'flexDirection': 'column'};
|
||||
object.columnSpacer = {'flex': 0, 'width': 2, 'height': '100%'};
|
||||
object.rowSpacer = {'flex': 0, 'height': 2, 'width': '100%'};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object.icon = {color: TEXT_SUBTLE};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
||||
object = [[0, 3], [1, 2]];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/grid/ForumPostGridBody.tsx');
|
||||
exports.default = ForumPostGridBody;
|
||||
exports.GRID_HORIZONTAL_PADDING = 48;
|
||||
}
|
||||
|
||||
function GIFIcon() { // fn#88535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1244, offset: 0x01fe74e9, size: 119 bytes, params: 1, frame: 18
|
||||
const styles = useStyles();
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const CUSTOM = Sizes.CUSTOM;
|
||||
return (
|
||||
<Icon
|
||||
size={CUSTOM}
|
||||
source={importDefault(11553) /* metro dependency 11553 */}
|
||||
disableColor
|
||||
style={styles.gifIcon}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function PlayIcon_88536() { // fn#88536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1376, offset: 0x01fe7560, size: 101 bytes, params: 1, frame: 17
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const SMALL_20 = Sizes.SMALL_20;
|
||||
return (
|
||||
<Icon
|
||||
size={SMALL_20}
|
||||
source={importDefault(11554) /* metro dependency 11554 */}
|
||||
disableColor
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ExtraMediaIcon({extraMediaCount}) { // fn#88537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1485, offset: 0x01fe75c5, size: 248 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(11158) /* metro dependency 11158 */, color: styles.icon.color};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
||||
iconProps.size = REFRESH_SMALL_16;
|
||||
const icon = <Icon {...iconProps} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.extraMediaCountContainer}>
|
||||
{icon}
|
||||
<Text
|
||||
style={styles.extraMediaCount}
|
||||
lineClamp={1}
|
||||
variant="text-xs/normal"
|
||||
color="text-default"
|
||||
>
|
||||
{'+' + extraMediaCount}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MediaGridColumn({column, thread}) { // fn#88538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1829, offset: 0x01fe76bd, size: 123 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.column}>
|
||||
{column.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun88539)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostGridBody({thread, hasUnreads, media}) { // fn#88540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2255, offset: 0x01fe780b, size: 653 bytes, params: 2, frame: 31
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
const value3 = env0_3((require(6863) /* metro dependency 6863: ForumTagHooks */).useSomeAppliedTags(thread, 2), 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const value4 = property.length > 0;
|
||||
const Math = global.Math;
|
||||
const value5 = Math.max(0, media.length - 4);
|
||||
const isMediaPost2 = thread.isMediaPost();
|
||||
const value6 = useMediaGridLayout(media, isMediaPost2);
|
||||
const {containsVideo, containsGif} = env0_4.useMemo(_fun88549, [media]);
|
||||
const items2 = [styles.container];
|
||||
items2[1] = isMediaPost2 && styles.wideAspectRatioContainer;
|
||||
const items3 = [<View style={[styles.grid,
|
||||
isMediaPost2 && styles.wideAspectRatioGrid]}>{value6.map(_fun88550)}</View>];
|
||||
items3[1] = value4 && <View style={styles.footerLeftContainer}>{((ForumPostAppliedTagPills) => <ForumPostAppliedTagPills appliedTags={property} additionalTagsCount={property2} hasUnreads={hasUnreads} />)((require(11559) /* metro dependency 11559: ForumPostAppliedTags */).ForumPostAppliedTagPills)}</View>;
|
||||
let r6 = containsGif || containsVideo;
|
||||
if (r6) {
|
||||
var viewBinding4Props = {style: styles.headerLeftContainer};
|
||||
items4 = [containsGif && <View style={styles.mediaIconContainer}><GIFIcon /></View>];
|
||||
items4[1] = containsVideo && <View style={styles.mediaIconContainer}><PlayIcon_88536 /></View>;
|
||||
r6 = <View {...viewBinding4Props}>{items4}</View>;
|
||||
}
|
||||
items3[2] = r6;
|
||||
items3[3] = value5 !== 0 && <View style={styles.footerRightContainer}><ExtraMediaIcon extraMediaCount={value5} /></View>;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun88539(a0, a1) { // fn#88539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1962, offset: 0x01fe7738, size: 211 bytes, params: 3, frame: 22
|
||||
const Fragment = env1_4.Fragment;
|
||||
const r1 = a1 > 0 && <View style={styles.rowSpacer} />;
|
||||
const ForumPostGridMedia = (require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostGridMedia;
|
||||
const threadBinding = thread;
|
||||
return (
|
||||
<Fragment key={'' + threadBinding.id + '-' + a1}>
|
||||
{r1}
|
||||
<ForumPostGridMedia
|
||||
channel={threadBinding}
|
||||
media={a0.media}
|
||||
targetWidth={a0.targetWidth}
|
||||
targetHeight={a0.targetHeight}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function useMediaGridLayout(a0, a1) { // fn#88541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2441, owner: ForumPostGridBody.useMediaGridLayout, offset: 0x01fe7a98, size: 128 bytes, params: 3, frame: 17
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return env1_4.useMemo(_fun88546,
|
||||
[(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width, env1_4.useMemo(_fun88542,
|
||||
[a0]), a1]);
|
||||
}
|
||||
|
||||
function _fun88549() { // fn#88549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2927, offset: 0x01fe7ccf, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
|
||||
return value.messageContainsGifOrVideo(media);
|
||||
}
|
||||
|
||||
function _fun88550(a0, a1) { // fn#88550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:3142, offset: 0x01fe7cfc, size: 157 bytes, params: 3, frame: 21
|
||||
const Fragment = env1_4.Fragment;
|
||||
return (
|
||||
<Fragment key={'' + a0 + '-' + a1}>
|
||||
{a1 > 0 && <View style={styles.columnSpacer} />}
|
||||
<MediaGridColumn column={a0} thread={thread} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun88542() { // fn#88542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2510, offset: 0x01fe7b18, size: 92 bytes, params: 1, frame: 14
|
||||
const Math = global.Math;
|
||||
let value = Math.min(env0_0.length, 2);
|
||||
value = env2_9.slice(0, value);
|
||||
value = value.map(function(a0) {
|
||||
return a0.map(_fun88544).filter(require(dependencyMap[12]).isNotNullish);
|
||||
});
|
||||
return value.filter(function(a0) {
|
||||
return a0.length > 0;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun88546() { // fn#88546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2668, offset: 0x01fe7bc5, size: 45 bytes, params: 1, frame: 12
|
||||
const env0_0 = require ? 192 : 225;
|
||||
return env0_3.map(_fun88547);
|
||||
}
|
||||
|
||||
function _fun88543(a0) { // fn#88543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2567, offset: 0x01fe7b74, size: 65 bytes, params: 2, frame: 13
|
||||
const value = a0.map(_fun88544);
|
||||
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
function _fun88547(a0) { // fn#88547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2703, offset: 0x01fe7bf2, size: 90 bytes, params: 2, frame: 14
|
||||
let length = a0.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).length;
|
||||
length = env1_3.length;
|
||||
return a0.map(_fun88548);
|
||||
}
|
||||
|
||||
function _fun88544(a0) { // fn#88544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2577, offset: 0x01fe7bb5, size: 16 bytes, params: 2, frame: 2
|
||||
return env2_0[a0];
|
||||
}
|
||||
|
||||
function _fun88548(a0) { // fn#88548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2777, offset: 0x01fe7c4c, size: 131 bytes, params: 2, frame: 7
|
||||
var r1;
|
||||
var binding;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const value2 = width - 48;
|
||||
let lengthBinding = length;
|
||||
const value5 = value2 / lengthBinding - 2 * (lengthBinding - 1) / lengthBinding;
|
||||
const object2 = {media: a0, targetWidth: value5};
|
||||
if (require) {
|
||||
lengthBinding = length;
|
||||
if (lengthBinding < 2) {
|
||||
r1 = value5 / 1.7777777777777777;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
binding = env1_0;
|
||||
lengthBinding = length;
|
||||
value = binding / lengthBinding;
|
||||
value -= 2 * (lengthBinding - 1) / lengthBinding;
|
||||
r1 = value;
|
||||
}
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
binding = env1_0;
|
||||
lengthBinding = length;
|
||||
value = binding / lengthBinding;
|
||||
value -= 2 * (lengthBinding - 1) / lengthBinding;
|
||||
r1 = value;
|
||||
}
|
||||
object2.targetHeight = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 11563; source: modules/forums/native/posts/grid/ForumPostGridFooter.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */
|
||||
function _fun88591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11749:6, offset: 0x01fea1ba, size: 295 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{footer: {'display': 'flex', 'alignItems': 'center',
|
||||
'flexDirection': 'row', 'justifyContent': 'flex-start', 'marginTop': 12}, dot: {'height': 4, 'width': 4,
|
||||
'borderRadius': 2, 'backgroundColor': null, 'marginHorizontal': 8, backgroundColor: BORDER_SUBTLE}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/grid/ForumPostGridFooter.tsx');
|
||||
exports.default = ForumPostGridFooter;
|
||||
}
|
||||
|
||||
function ForumPostGridFooter({thread, firstMessage, hasUnreads, parentChannel}) { // fn#88592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11749:520, offset: 0x01fea2e1, size: 354 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const value2 = (require(11531) /* metro dependency 11531: useTypingUsersIds */).useTypingUserIds(thread.id);
|
||||
const value3 = value2.length > 0;
|
||||
const items2 = [((Component) => <Component thread={thread} hasUnreads={hasUnreads} />)(importDefault(11564) /* metro dependency 11564: ForumPostMessageCount */)];
|
||||
items2[1] = value3 && <><View style={styles.dot} />{((Component) => <Component thread={thread} typingUserIds={value2} hasUnreads={hasUnreads} />)(importDefault(11565) /* metro dependency 11565: ForumPostTypingUsers */)}</>;
|
||||
items2[2] = firstMessage != null && ((MostCommonForumPostReaction) => <MostCommonForumPostReaction thread={thread} firstMessage={firstMessage} parentChannel={parentChannel} locationAnalyticsObject={AnalyticsObjects.FORUM_GRID_ITEM_FOOTER} />)((require(11313) /* metro dependency 11313: ForumPostReactions */).MostCommonForumPostReaction);
|
||||
return (
|
||||
<View style={styles.footer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Metro module 11548; source: modules/forums/native/posts/grid/ForumPostGridHeader.tsx; dependencies: [31, 27, 6900, 1386, 33, 4501, 11549, 11551, 11560, 11561, 11562, 2] */
|
||||
function _fun88524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11734:6, offset: 0x01fe67f9, size: 303 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(6900) /* metro dependency 6900: ForumConstants */).ForumTimestampFormats;
|
||||
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({pinIcon: {marginEnd: 8},
|
||||
container: {'display': 'flex', 'flexDirection': 'column', 'marginBottom': 4}, details: {'flexDirection': 'row',
|
||||
'alignItems': 'center', 'marginBottom': 4}, timestampText: {flex: 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/grid/ForumPostGridHeader.tsx');
|
||||
exports.default = ForumPostGridHeader;
|
||||
}
|
||||
|
||||
function ForumPostGridHeader({thread, hasUnreads, isNew}) { // fn#88525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11734:503, offset: 0x01fe6928, size: 377 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const hasFlag = thread.hasFlag;
|
||||
const PINNED = ChannelFlags.PINNED;
|
||||
const items2 = [Reflect.apply(hasFlag, thread,
|
||||
[PINNED]) && ((Component) => <Component containerStyle={styles.pinIcon} />)(importDefault(11549) /* metro dependency 11549: ForumPostPinIcon */)];
|
||||
const ForumPostAuthor = (require(11551) /* metro dependency 11551: ForumPostUsername */).ForumPostAuthor;
|
||||
items2[1] = <ForumPostAuthor thread={thread} hasUnreads={hasUnreads} />;
|
||||
const ForumPostTimestamp = importDefault(11560) /* metro dependency 11560: ForumPostTimestamp */;
|
||||
const POSTED_DURATION_AGO = ForumTimestampFormats.POSTED_DURATION_AGO;
|
||||
items2[2] = <ForumPostTimestamp thread={thread} hasUnreads={hasUnreads} format={POSTED_DURATION_AGO} textStyle={styles.timestampText} />;
|
||||
items2[3] = isNew && ((Component) => <Component />)(importDefault(11561) /* metro dependency 11561: ForumPostNewTag */);
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.details}>
|
||||
{items2}
|
||||
</View>
|
||||
{((Component) => <Component title={thread.name} hasUnreads={hasUnreads} />)(importDefault(11562) /* metro dependency 11562: ForumPostTitle */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Metro module 11571; source: modules/forums/native/posts/hooks/useNativeForumPostContent.tsx; dependencies: [661, 4501, 1244, 5216, 4643, 2] */
|
||||
function _fun88623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11757:6, offset: 0x01fec081, size: 168 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({italics: {fontStyle: 'italic'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/hooks/useNativeForumPostContent.tsx');
|
||||
exports.default = useNativeForumPostContent;
|
||||
}
|
||||
|
||||
function useNativeForumPostContent({message, messageContent, messageLoaded, isMessageDeleted, senderModifier}) { // fn#88624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11757:281, offset: 0x01fec129, size: 1062 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const styles = useStyles();
|
||||
if (isMessageDeleted) {
|
||||
return {content: intl.string(t.U8Rr2l), style: styles.italics, variant: 'text-sm/normal'};
|
||||
}
|
||||
if (message != null) {
|
||||
if ((importDefault(5216) /* metro dependency 5216: isSystemMessage */)(message)) {
|
||||
return {content: messageContent, style: styles.italics, variant: 'text-sm/normal'};
|
||||
}
|
||||
}
|
||||
const r5 = message != null && message.blocked;
|
||||
let r8 = message != null && message.ignored;
|
||||
const value6 = senderModifier === 'blocked';
|
||||
if (r5) {
|
||||
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
|
||||
variant: 'text-sm/normal'};
|
||||
}
|
||||
if (value6) {
|
||||
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
|
||||
variant: 'text-sm/normal'};
|
||||
}
|
||||
if (r8) {
|
||||
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
|
||||
variant: 'text-sm/normal'};
|
||||
}
|
||||
if (senderModifier === 'ignored') {
|
||||
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
|
||||
variant: 'text-sm/normal'};
|
||||
}
|
||||
let r9 = message?.content == null || message?.content === '';
|
||||
r9 = !r9 ? messageContent == null : r9;
|
||||
r9 = !r9 ? messageContent === '' : r9;
|
||||
r9 = !r9 ? global.Array.isArray(messageContent) && messageContent.length === 0 : r9;
|
||||
if (messageLoaded) {
|
||||
if (message == null) {
|
||||
r0 = intl.string(t.mE3KJN);
|
||||
} else {
|
||||
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
|
||||
r0 = moduleValue.getMessageStickers(message).length > 0 ? intl.string(t['7K5Lma']) : message.interaction == null ? message.hasFlag(MessageFlags.IS_VOICE_MESSAGE) ? intl.string(t['6bhHrc']) : message.hasFlag(MessageFlags.IS_COMPONENTS_V2) ? intl.string(t.Xxm5i3) : message.embeds.length > 0 || message.attachments.length > 0 ? intl.string(t.JAKsM8) : null : message.content === '' ? intl.string(t['2v7kfl']) : message.hasFlag(MessageFlags.IS_VOICE_MESSAGE) ? intl.string(t['6bhHrc']) : message.hasFlag(MessageFlags.IS_COMPONENTS_V2) ? intl.string(t.Xxm5i3) : message.embeds.length > 0 || message.attachments.length > 0 ? intl.string(t.JAKsM8) : null;
|
||||
}
|
||||
r8 = r0;
|
||||
} else {
|
||||
r8 = null;
|
||||
}
|
||||
return {'content': null, 'style': null, 'variant': 'text-sm/medium', content: r9 ? r8 : messageContent};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
/* Metro module 11231; source: modules/forums/native/posts/hooks/useNativeForumPostHandlers.tsx; dependencies: [31, 3849, 1379, 3793, 1878, 6865, 6901, 661, 1243, 7152, 44, 4805, 6647, 1471, 9587, 9598, 9544, 477, 4081, 4082, 7155, 4601, 4015, 11232, 9837, 9835, 2] */
|
||||
function _fun85851(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:6, offset: 0x01f7eae4, size: 291 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
|
||||
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 forumPostMessagesStore = importDefault(6865) /* metro dependency 6865: ForumPostMessagesStore */;
|
||||
const forumPostRecentMessageStore = importDefault(6901) /* metro dependency 6901: ForumPostRecentMessageStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.AnalyticsObjectTypes;
|
||||
const env0_11 = constantsModule.AnalyticsPages;
|
||||
const env0_12 = constantsModule.AnalyticsSections;
|
||||
const env0_13 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_14 = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/hooks/useNativeForumPostHandlers.tsx');
|
||||
exports.default = useNativeForumPostHandlers;
|
||||
}
|
||||
|
||||
function useNativeForumPostHandlers({threadId, reactionType}) { // fn#85852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:317, offset: 0x01f7ec07, size: 343 bytes, params: 2, frame: 22
|
||||
const r11 = reactionType !== undefined ? reactionType : (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.NORMAL;
|
||||
const binding = env0_3;
|
||||
let useCallback = binding.useCallback;
|
||||
const value = Reflect.apply(useCallback, binding, [_fun85853, [threadId]]);
|
||||
const value2 = binding.useCallback(_fun85855, [threadId]);
|
||||
const value3 = binding.useCallback(_fun85856, [value2, threadId]);
|
||||
const value4 = binding.useCallback(_fun85857, [threadId]);
|
||||
const value5 = binding.useCallback(_fun85858, [threadId]);
|
||||
const value6 = binding.useCallback(_fun85859, [threadId]);
|
||||
const value7 = binding.useCallback(_fun85860, [threadId]);
|
||||
useCallback = binding.useCallback;
|
||||
return {onTapMedia: value, onTapPost: value2, onLongTapPost: value4, onTapReaction: value5,
|
||||
onLongTapReaction: value6, onTapReactionCount: value7, onTapAddReaction: Reflect.apply(useCallback, binding,
|
||||
[_fun85861, [threadId, r11]]), onTapMostRecentMessage: value3};
|
||||
}
|
||||
|
||||
function _fun85853({messageId, mediaItems, containerRef, initialIndex}) { // fn#85853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:432, offset: 0x01f7ed5e, size: 258 bytes, params: 2, frame: 24
|
||||
var environment;
|
||||
initialIndex = initialIndex === undefined ? 0 : initialIndex;
|
||||
const value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(threadId);
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null, '[Forum Post Handlers] Thread cannot be null.');
|
||||
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialIndex: initialIndex,
|
||||
initialSources: mediaItems.map(_fun85854), channelId: channel.id,
|
||||
contextName: (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
|
||||
RelationshipStore, false),
|
||||
contextIcon: (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel),
|
||||
originViewOrOriginLayout: containerRef.current});
|
||||
}
|
||||
|
||||
function _fun85855() { // fn#85855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:1608, offset: 0x01f7f0b6, size: 328 bytes, params: 1, frame: 21
|
||||
var moduleValue2;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
|
||||
}
|
||||
const getChannel = ChannelStore.getChannel;
|
||||
const threadIdBinding = threadId;
|
||||
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
|
||||
const channel = ChannelStore.getChannel(value3.parent_id);
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null,
|
||||
'[Forum Post Handlers] Parent channel cannot be null.');
|
||||
const trackingModule = require(7155) /* metro dependency 7155: Tracking */;
|
||||
const trackForumPostClicked = trackingModule.trackForumPostClicked;
|
||||
const GUILD_CHANNEL = AnalyticsPages.GUILD_CHANNEL;
|
||||
const FORUM_CHANNEL_POST = AnalyticsSections.FORUM_CHANNEL_POST;
|
||||
Reflect.apply(trackForumPostClicked, trackingModule, [{guildId: channel.guild_id, channelId: channel.id,
|
||||
postId: threadIdBinding, location: {page: GUILD_CHANNEL, section: FORUM_CHANNEL_POST}}]);
|
||||
const transitionToChannelModule = require(4601) /* metro dependency 4601: transitionToChannel */;
|
||||
const transitionToThread = transitionToChannelModule.transitionToThread;
|
||||
const FORUM = OpenThreadAnalyticsLocations.FORUM;
|
||||
Reflect.apply(transitionToThread, transitionToChannelModule, [value3, {source: FORUM, navigationReplace: false}]);
|
||||
}
|
||||
|
||||
function _fun85856() { // fn#85856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:2112, offset: 0x01f7f1fe, size: 302 bytes, params: 1, frame: 23
|
||||
var moduleValue;
|
||||
var trackForumPostClicked;
|
||||
var id;
|
||||
var moduleValue2;
|
||||
var transitionToThreadMessage;
|
||||
const getChannel = ChannelStore.getChannel;
|
||||
const threadIdBinding = threadId;
|
||||
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
|
||||
const channel = ChannelStore.getChannel(value3.parent_id);
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null,
|
||||
'[Forum Post Handlers] Parent channel cannot be null.');
|
||||
const messageState = ForumPostRecentMessageStore.getMessageState(threadIdBinding);
|
||||
const message = messageState.message;
|
||||
if (messageState.loaded) {
|
||||
if (message != null) {
|
||||
moduleValue = require(7155) /* metro dependency 7155: Tracking */;
|
||||
trackForumPostClicked = moduleValue.trackForumPostClicked;
|
||||
id = channel.id;
|
||||
Reflect.apply(trackForumPostClicked, moduleValue, [{guildId: channel.guild_id, channelId: id,
|
||||
postId: threadId,
|
||||
location: {page: AnalyticsPages.GUILD_CHANNEL, section: AnalyticsSections.FORUM_CHANNEL_POST}}]);
|
||||
moduleValue2 = require(4601) /* metro dependency 4601: transitionToChannel */;
|
||||
transitionToThreadMessage = moduleValue2.transitionToThreadMessage;
|
||||
id = message.id;
|
||||
Reflect.apply(transitionToThreadMessage, moduleValue2, [value3, id,
|
||||
{source: OpenThreadAnalyticsLocations.FORUM,
|
||||
navigationReplace: false}]);
|
||||
} else {
|
||||
env0_2();
|
||||
}
|
||||
} else {
|
||||
env0_2();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun85857() { // fn#85857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:2617, offset: 0x01f7f32c, size: 239 bytes, params: 1, frame: 20
|
||||
const channel = ChannelStore.getChannel(threadId);
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null, '[Forum Post Handlers] Thread cannot be null.');
|
||||
const channel2 = ChannelStore.getChannel(channel.parent_id);
|
||||
(importDefault(44) /* metro dependency 44 */)(channel2 != null,
|
||||
'[Forum Post Handlers] Parent channel cannot be null.');
|
||||
(importDefault(44) /* metro dependency 44 */)(channel2.isForumLikeChannel(), 'Forum parents must be forum channels');
|
||||
const getContent = ActionSheetStore.getContent;
|
||||
const value5 = Reflect.apply(getContent, ActionSheetStore, []) != null;
|
||||
const getUser = UserStore.getUser;
|
||||
if (!(value5 || Reflect.apply(getUser, UserStore, [channel.ownerId]) == null)) {
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
(importDefault(11232) /* metro dependency 11232: showLongPressForumPostActionSheet */)(channel, channel2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun85858({reaction, disableReactionCreates, disableReactionUpdates, locationAnalyticsObject, reactionLocation}) { // fn#85858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:3015, offset: 0x01f7f41b, size: 311 bytes, params: 2, frame: 29
|
||||
var r8;
|
||||
let value = environment.__proto__;
|
||||
const getChannel = ChannelStore.getChannel;
|
||||
const threadIdBinding = threadId;
|
||||
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
|
||||
const getMessage = ForumPostMessagesStore.getMessage;
|
||||
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
|
||||
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
|
||||
if (disableReactionCreates) {
|
||||
if (disableReactionUpdates) {
|
||||
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: firstMessage.id,
|
||||
channelId: threadId, reactions: firstMessage.reactions, location: {object: locationAnalyticsObject,
|
||||
objectType: AnalyticsObjectTypes.CANT_ADD_OR_REMOVE}});
|
||||
} else {
|
||||
r8 = reaction != null && reaction.burst_count > 0;
|
||||
value = require(9835) /* metro dependency 9835: MessagesUtils */;
|
||||
value.handleAddOrRemoveReaction(firstMessage.id, value3, reaction, r8, reactionLocation);
|
||||
}
|
||||
} else {
|
||||
r8 = reaction != null && reaction.burst_count > 0;
|
||||
value = require(9835) /* metro dependency 9835: MessagesUtils */;
|
||||
value.handleAddOrRemoveReaction(firstMessage.id, value3, reaction, r8, reactionLocation);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun85859({emoji}) { // fn#85859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:3566, offset: 0x01f7f552, size: 140 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const getMessage = ForumPostMessagesStore.getMessage;
|
||||
const threadIdBinding = threadId;
|
||||
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
|
||||
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
|
||||
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: firstMessage.id,
|
||||
channelId: threadIdBinding, emoji: emoji, reactions: firstMessage.reactions});
|
||||
}
|
||||
|
||||
function _fun85860() { // fn#85860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:3790, offset: 0x01f7f5de, size: 126 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const getMessage = ForumPostMessagesStore.getMessage;
|
||||
const threadIdBinding = threadId;
|
||||
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
|
||||
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
|
||||
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: firstMessage.id,
|
||||
channelId: threadIdBinding, reactions: firstMessage.reactions});
|
||||
}
|
||||
|
||||
function _fun85861() { // fn#85861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:4001, offset: 0x01f7f65c, size: 186 bytes, params: 1, frame: 23
|
||||
let value = environment.__proto__;
|
||||
const getChannel = ChannelStore.getChannel;
|
||||
const threadIdBinding = threadId;
|
||||
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
|
||||
const getMessage = ForumPostMessagesStore.getMessage;
|
||||
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
|
||||
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
|
||||
value = require(9835) /* metro dependency 9835: MessagesUtils */;
|
||||
const handleAddOrRemoveReaction = value.handleAddOrRemoveReaction;
|
||||
const id = firstMessage.id;
|
||||
const binding = env0_1;
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
const BURST = ReactionTypes.BURST;
|
||||
Reflect.apply(handleAddOrRemoveReaction, value, [id, value3, null, binding === BURST]);
|
||||
}
|
||||
|
||||
function _fun85854(a0) { // fn#85854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:664, offset: 0x01f7ee60, size: 598 bytes, params: 2, frame: 22
|
||||
var r7;
|
||||
var r0;
|
||||
var r2;
|
||||
const ForumPostMediaTypes = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).ForumPostMediaTypes;
|
||||
var value13;
|
||||
const src = a0.src;
|
||||
const srcIsAnimated = a0.srcIsAnimated;
|
||||
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(src);
|
||||
const value3 = value2 != null;
|
||||
if (srcIsAnimated) {
|
||||
r0 = value3 && (value2.pathname.toLowerCase().endsWith('.webp') || value2.pathname.toLowerCase().endsWith('.avif'));
|
||||
if (r0) {
|
||||
r7 = a0.type === ForumPostMediaTypes.ATTACHMENT && (require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */).isAttachmentUrl(value2);
|
||||
r7 = !r7 ? a0.type === ForumPostMediaTypes.EMBED && (require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */).isExternalProxiedAttachmentUrl(value2) : r7;
|
||||
r0 = r7;
|
||||
}
|
||||
if (r0) {
|
||||
value2.searchParams.set('animated', 'true');
|
||||
value13 = value2.pathname.toLowerCase();
|
||||
if (value13.endsWith('.avif')) {
|
||||
value2.searchParams.set('format', 'webp');
|
||||
}
|
||||
r2 = value2.toString();
|
||||
} else {
|
||||
r2 = src;
|
||||
}
|
||||
} else if (value3 && value2.pathname.toLowerCase().endsWith('.avif')) {
|
||||
value2.searchParams.set('format', 'webp');
|
||||
r2 = value2.toString();
|
||||
} else {
|
||||
r2 = src;
|
||||
}
|
||||
return {uri: r2, guildId: env0_1.guild_id, messageId: messageId ?? EMPTY_STRING_SNOWFLAKE_ID, channelId: env0_1.id,
|
||||
mediaIndex: a0.mediaIndex, width: a0.width, height: a0.height, accessoryType: a0.type,
|
||||
attachmentId: a0.attachmentId};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 11568; source: modules/forums/native/posts/list/ForumPostList.tsx; dependencies: [57, 31, 27, 1386, 33, 4501, 6863, 11549, 11559, 11569, 11572, 2] */
|
||||
function _fun88612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11754:6, offset: 0x01feb48f, size: 280 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 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'display': 'flex',
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 8}, content: {'flex': 1, 'marginBottom': 12}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/list/ForumPostList.tsx');
|
||||
exports.default = ForumPostList;
|
||||
}
|
||||
|
||||
function ForumPostList({messageContent, firstMessage, firstMessageLoaded, hasUnreads, isNew, media, isEmbed, isLocalDeviceMedia, parentChannel, thread, senderModifier}) { // fn#88613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11754:427, offset: 0x01feb5a7, size: 519 bytes, params: 2, frame: 39
|
||||
var r23;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const value3 = env0_3((require(6863) /* metro dependency 6863: ForumTagHooks */).useSomeAppliedTags(thread, 2), 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const hasFlag = thread.hasFlag;
|
||||
const PINNED = ChannelFlags.PINNED;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, thread, [PINNED]);
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
let r6 = hasFlag2 || property.length !== 0;
|
||||
if (r6) {
|
||||
var viewBinding2Props = {style: styles.header};
|
||||
r23 = hasFlag2 && ((Component) => <Component />)(importDefault(11549) /* metro dependency 11549: ForumPostPinIcon */);
|
||||
items2 = [r23];
|
||||
r23 = property.length !== 0 && ((ForumPostAppliedTagPills) => <ForumPostAppliedTagPills appliedTags={property} additionalTagsCount={property2} hasUnreads={hasUnreads} />)((require(11559) /* metro dependency 11559: ForumPostAppliedTags */).ForumPostAppliedTagPills);
|
||||
items2[1] = r23;
|
||||
r6 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
let value = importDefault(11569) /* metro dependency 11569: ForumPostListBody */;
|
||||
value = <View style={styles.content}>{r6}{((Component) => <Component thread={thread} firstMessage={firstMessage} hasUnreads={hasUnreads} isNew={isNew} messageContent={messageContent} media={media} isEmbed={isEmbed} isLocalDeviceMedia={isLocalDeviceMedia} firstMessageLoaded={firstMessageLoaded} senderModifier={senderModifier} />)(value)}</View>;
|
||||
return (
|
||||
<>
|
||||
{value}
|
||||
{((Component) => <Component thread={thread} firstMessage={firstMessage} hasUnreads={hasUnreads} parentChannel={parentChannel} />)(importDefault(11572) /* metro dependency 11572: ForumPostListFooter */)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Metro module 11569; source: modules/forums/native/posts/list/ForumPostListBody.tsx; dependencies: [31, 27, 6900, 33, 4501, 11561, 11551, 11560, 11562, 11570, 11555, 2] */
|
||||
function _fun88614(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11755:6, offset: 0x01feb7ae, size: 296 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(6900) /* metro dependency 6900: ForumConstants */).ForumTimestampFormats;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({body: {'display': 'flex',
|
||||
'flexDirection': 'row', 'alignItems': 'flex-start'}, contentContainer: {flex: 1},
|
||||
thumbnailContainer: {marginLeft: 12}, details: {'flexDirection': 'row', 'alignItems': 'center',
|
||||
'marginBottom': 6}, newTagContainer: {marginEnd: 8}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/list/ForumPostListBody.tsx');
|
||||
exports.default = ForumPostListBody;
|
||||
}
|
||||
|
||||
function ForumPostListBody({containerStyle, thread, firstMessage, hasUnreads, isNew, firstMessageLoaded, messageContent, media, isEmbed, isLocalDeviceMedia, senderModifier}) { // fn#88615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11755:525, offset: 0x01feb8d6, size: 567 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const items3 = [styles.body, containerStyle];
|
||||
const items2 = [isNew && ((Component) => <Component containerStyle={styles.newTagContainer} />)(importDefault(11561) /* metro dependency 11561: ForumPostNewTag */)];
|
||||
const ForumPostAuthor = (require(11551) /* metro dependency 11551: ForumPostUsername */).ForumPostAuthor;
|
||||
items2[1] = <ForumPostAuthor thread={thread} hasUnreads={hasUnreads} />;
|
||||
const ForumPostTimestamp = importDefault(11560) /* metro dependency 11560: ForumPostTimestamp */;
|
||||
const POSTED_DURATION_AGO = ForumTimestampFormats.POSTED_DURATION_AGO;
|
||||
items2[2] = <ForumPostTimestamp thread={thread} hasUnreads={hasUnreads} format={POSTED_DURATION_AGO} />;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<View style={styles.contentContainer}>
|
||||
<View style={styles.details}>
|
||||
{items2}
|
||||
</View>
|
||||
{((Component) => <Component title={thread.name} lineClamp={2} ellipsizeMode="tail" hasUnreads={hasUnreads} />)(importDefault(11562) /* metro dependency 11562: ForumPostTitle */)}
|
||||
{((Component) => <Component messageContent={messageContent} message={firstMessage} isMessageDeleted={false} messageLoaded={firstMessageLoaded} hasUnreads={hasUnreads} senderModifier={senderModifier} />)(importDefault(11570) /* metro dependency 11570: ForumPostMessageContent */)}
|
||||
</View>
|
||||
{firstMessage == null ? media == null ? null : ((ForumPostMediaThumbnail) => <ForumPostMediaThumbnail channel={thread} media={media} isEmbed={isEmbed} isLocalDeviceMedia={isLocalDeviceMedia} firstMessageId={firstMessage?.id} containerStyle={styles.thumbnailContainer} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaThumbnail) : firstMessage.blocked || media == null ? null : ((ForumPostMediaThumbnail) => <ForumPostMediaThumbnail channel={thread} media={media} isEmbed={isEmbed} isLocalDeviceMedia={isLocalDeviceMedia} firstMessageId={firstMessage?.id} containerStyle={styles.thumbnailContainer} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaThumbnail)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 11572; source: modules/forums/native/posts/list/ForumPostListFooter.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */
|
||||
function _fun88625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11758:6, offset: 0x01fec54f, size: 295 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{footer: {'display': 'flex', 'alignItems': 'center',
|
||||
'flexDirection': 'row', 'justifyContent': 'flex-start'}, dot: {'height': 4, 'width': 4, 'borderRadius': 2,
|
||||
'backgroundColor': null, 'marginHorizontal': 8, backgroundColor: BORDER_SUBTLE}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/list/ForumPostListFooter.tsx');
|
||||
exports.default = ForumPostListFooter;
|
||||
}
|
||||
|
||||
function ForumPostListFooter({thread, firstMessage, hasUnreads, parentChannel}) { // fn#88626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11758:507, offset: 0x01fec676, size: 354 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const value2 = (require(11531) /* metro dependency 11531: useTypingUsersIds */).useTypingUserIds(thread.id);
|
||||
const value3 = value2.length > 0;
|
||||
const items2 = [((Component) => <Component thread={thread} hasUnreads={hasUnreads} />)(importDefault(11564) /* metro dependency 11564: ForumPostMessageCount */)];
|
||||
items2[1] = value3 && <><View style={styles.dot} />{((Component) => <Component thread={thread} typingUserIds={value2} hasUnreads={hasUnreads} />)(importDefault(11565) /* metro dependency 11565: ForumPostTypingUsers */)}</>;
|
||||
items2[2] = firstMessage != null && ((MostCommonForumPostReaction) => <MostCommonForumPostReaction thread={thread} firstMessage={firstMessage} parentChannel={parentChannel} locationAnalyticsObject={AnalyticsObjects.FORUM_LIST_ITEM_FOOTER} />)((require(11313) /* metro dependency 11313: ForumPostReactions */).MostCommonForumPostReaction);
|
||||
return (
|
||||
<View style={styles.footer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* Metro module 11230; source: modules/forums/native/posts/reactions/ForumPostReactionButton.tsx; dependencies: [31, 27, 33, 4501, 697, 11231, 5278, 1244, 4573, 7152, 9837, 9830, 3829, 9841, 673, 1423, 3795, 6739, 11252, 2] */
|
||||
function _fun85843(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:6, offset: 0x01f7e17d, size: 474 bytes, params: 8, frame: 24
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const closure = BurstReactionButton;
|
||||
const closure2 = ReactionButton;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsxs;
|
||||
const env0_6 = value.jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'paddingHorizontal': 8, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null, 'backgroundColor': null,
|
||||
'minWidth': 32, 'minHeight': 26, 'maxHeight': 26};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const REACTION_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BORDER_DEFAULT;
|
||||
object5.borderColor = REACTION_BORDER_DEFAULT;
|
||||
const REACTION_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = REACTION_BACKGROUND_DEFAULT;
|
||||
object4.container = object5;
|
||||
const object6 = {};
|
||||
const REACTION_BORDER_REACTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BORDER_REACTED_DEFAULT;
|
||||
object6.borderColor = REACTION_BORDER_REACTED_DEFAULT;
|
||||
const REACTION_BACKGROUND_REACTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BACKGROUND_REACTED_DEFAULT;
|
||||
object6.backgroundColor = REACTION_BACKGROUND_REACTED_DEFAULT;
|
||||
object4.selected = object6;
|
||||
object4.textEmoji = {fontSize: 12};
|
||||
object4.imageEmoji = {'height': 16, 'width': 16};
|
||||
object4.countContainer = {paddingStart: 4};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/reactions/ForumPostReactionButton.tsx');
|
||||
exports.DEFAULT_EMOJI_SIZE = 14;
|
||||
exports.AdditionalReactionCount = AdditionalReactionCount;
|
||||
exports.AddReactionButton = AddReactionButton;
|
||||
exports.ForumPostReactionButton = ForumPostReactionButton;
|
||||
exports.BurstReactionButton = closure;
|
||||
exports.ReactionButton = closure2;
|
||||
}
|
||||
|
||||
function BurstReactionButton({colors, emoji, onPress, onLongPress, containerStyle, count, emojiSize, selected, animate, animateCount, accessible}) { // fn#85844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:702, offset: 0x01f7e357, size: 353 bytes, params: 2, frame: 32
|
||||
var r12;
|
||||
var moduleValue2;
|
||||
const value3 = (require(9841) /* metro dependency 9841: useEmojiColorPalette */).useEmojiColorPalette(colors);
|
||||
const value4 = '';
|
||||
if (value3 != null) {
|
||||
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
|
||||
r12 = moduleValue2.hex2rgb(value3?.backgroundColor, value3?.opacity ?? 0.15) ?? value4;
|
||||
} else {
|
||||
r12 = value4;
|
||||
}
|
||||
return (
|
||||
<ReactionButton
|
||||
containerStyle={[containerStyle, {backgroundColor: r12, borderColor: value3?.backgroundColor,
|
||||
borderWidth: selected ? 1 : 0}]}
|
||||
textStyle={{color: value3?.accentColor}}
|
||||
selected={false}
|
||||
emoji={emoji}
|
||||
count={count}
|
||||
animate={animate}
|
||||
onPress={onPress}
|
||||
onLongPress={onLongPress}
|
||||
emojiSize={emojiSize}
|
||||
animateCount={animateCount}
|
||||
accessible={accessible}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ReactionButton({emoji, onPress, onLongPress, textStyle, containerStyle, count, emojiSize, selected, animate, animateCount, accessible, disabled}) { // fn#85845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:1304, offset: 0x01f7e4b8, size: 471 bytes, params: 2, frame: 34
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
const styles = useStyles();
|
||||
const r11 = emoji.id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: emoji.id,
|
||||
animated: animate && emoji.animated, size: emojiSize}) : undefined;
|
||||
const selectedBinding = selected ? styles.selected : undefined;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={[styles.container, containerStyle, selectedBinding]}
|
||||
accessible={accessible}
|
||||
accessibilityLabel={(require(3795) /* metro dependency 3795: ReactionUtils */).getAccessibleEmojiDisplayName(selectedBinding,
|
||||
count, emoji, false)}
|
||||
onPress={onPress}
|
||||
onLongPress={onLongPress}
|
||||
disabled={disabled}
|
||||
>
|
||||
{((Component) => <Component textEmojiStyle={styles.textEmoji} fastImageStyle={styles.imageEmoji} src={r11} name={emoji.name} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}
|
||||
{count != null && count > 0 && <View style={styles.countContainer}>{((Component) => <Component textStyle={textStyle} count={count} animate={animateCount} />)(importDefault(11252) /* metro dependency 11252: AnimatedCounter */)}</View>}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function AdditionalReactionCount({count, threadId, containerStyle}) { // fn#85846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:2111, offset: 0x01f7e68f, size: 254 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const onTapReactionCount = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: threadId}).onTapReactionCount;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const N8hbZB = (require(1244) /* metro dependency 1244: indexNative */).t.N8hbZB;
|
||||
const items2 = [styles.container, containerStyle];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessible
|
||||
accessibilityLabel={Reflect.apply(string, intl, [N8hbZB])}
|
||||
style={items2}
|
||||
onPress={onTapReactionCount}
|
||||
>
|
||||
<Text variant="heading-sm/medium" color="interactive-text-default">
|
||||
{'+'}
|
||||
{count}
|
||||
</Text>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function AddReactionButton({threadId, containerStyle, reactionType = require(dependencyMap[9]).ReactionTypes.NORMAL}) { // fn#85847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:2502, offset: 0x01f7e78d, size: 280 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const onTapAddReaction = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: threadId,
|
||||
reactionType: reactionType}).onTapAddReaction;
|
||||
const ADD_REACTION_ICON_COMPONENTS = (require(9837) /* metro dependency 9837: ReactionUtils */).ADD_REACTION_ICON_COMPONENTS;
|
||||
const property = ADD_REACTION_ICON_COMPONENTS[reactionType];
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [styles.container, containerStyle];
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={items2}
|
||||
accessible
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lfIHs4)}
|
||||
onPress={onTapAddReaction}
|
||||
>
|
||||
{((Component) => <Component size="xs" />)(property)}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumPostReactionButton({thread, reaction, animateCount, containerStyle, textStyle, locationAnalyticsObject, emojiSize}) { // fn#85848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:2906, offset: 0x01f7e8a5, size: 501 bytes, params: 2, frame: 27
|
||||
var r0;
|
||||
emojiSize = emojiSize === undefined ? 14 : emojiSize;
|
||||
const {disableReactionCreates,
|
||||
disableReactionUpdates} = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread);
|
||||
const env0_3 = disableReactionUpdates;
|
||||
const {onTapReaction,
|
||||
onLongTapReaction} = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: thread.id});
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
const value4 = AnimateEmoji.useSetting();
|
||||
const binding = env0_3;
|
||||
const value5 = binding.useCallback(function() {
|
||||
onTapReaction({reaction: reaction, disableReactionCreates: disableReactionCreates,
|
||||
disableReactionUpdates: disableReactionUpdates, locationAnalyticsObject: locationAnalyticsObject});
|
||||
}, [disableReactionCreates, disableReactionUpdates, locationAnalyticsObject, onTapReaction, reaction]);
|
||||
const value6 = binding.useCallback(function() {
|
||||
onLongTapReaction(reaction);
|
||||
}, [onLongTapReaction, reaction]);
|
||||
let r13 = disableReactionCreates ? !disableReactionUpdates : !disableReactionCreates;
|
||||
if (reaction.burst_count > 0) {
|
||||
var burstReactionButtonBindingProps = {accessible: r13, emoji: reaction.emoji, selected: reaction.me_burst};
|
||||
r13 = reaction.burst_colors ?? [];
|
||||
burstReactionButtonBindingProps.colors = r13;
|
||||
burstReactionButtonBindingProps.count = reaction.burst_count;
|
||||
burstReactionButtonBindingProps.onPress = value5;
|
||||
burstReactionButtonBindingProps.onLongPress = value6;
|
||||
burstReactionButtonBindingProps.containerStyle = containerStyle;
|
||||
burstReactionButtonBindingProps.textStyle = textStyle;
|
||||
burstReactionButtonBindingProps.emojiSize = emojiSize;
|
||||
burstReactionButtonBindingProps.animate = value4;
|
||||
burstReactionButtonBindingProps.animateCount = animateCount;
|
||||
r0 = <BurstReactionButton {...burstReactionButtonBindingProps} />;
|
||||
} else {
|
||||
r0 = <ReactionButton accessible={r13} emoji={reaction.emoji} selected={reaction.me} count={reaction.count} onPress={value5} onLongPress={value6} containerStyle={containerStyle} textStyle={textStyle} emojiSize={emojiSize} animate={value4} animateCount={animateCount} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/* Metro module 11313; source: modules/forums/native/posts/reactions/ForumPostReactions.tsx; dependencies: [31, 27, 33, 4501, 9830, 9619, 11230, 2] */
|
||||
function _fun86313(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:6, offset: 0x01f902bf, size: 284 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({reactionButtonContainer: {marginEnd: 8},
|
||||
actionBarReaction: {marginEnd: 4}, container: {flexDirection: 'row'},
|
||||
mostCommonContainer: {marginLeft: 'auto'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/reactions/ForumPostReactions.tsx');
|
||||
exports.MaxForumPostReactions = MaxForumPostReactions;
|
||||
exports.ForumPostActionBarReactions = ForumPostActionBarReactions;
|
||||
exports.MostCommonForumPostReaction = MostCommonForumPostReaction;
|
||||
}
|
||||
|
||||
function MaxForumPostReactions({thread, parentChannel, firstMessage, containerWidth, containerStyle, reactionContainerStyle}) { // fn#86314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:432, offset: 0x01f903db, size: 399 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const disableReactionCreates = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread).disableReactionCreates;
|
||||
const {reactions,
|
||||
additionalReactionCount} = (require(9619) /* metro dependency 9619: ForumHooks */).useMaxPossibleForumPostReactions({'containerWidth': null,
|
||||
'reactionEmojiWidth': 46, 'digitWidth': 7.5, containerWidth: containerWidth - (disableReactionCreates ? 0 : 28),
|
||||
message: firstMessage, parentChannel: parentChannel});
|
||||
if (reactions.length !== 0) {
|
||||
var viewBindingProps = {style: [styles.container, containerStyle]};
|
||||
items2 = [reactions.map(_fun86315)];
|
||||
items2[1] = additionalReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalReactionCount} containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
|
||||
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
} else if (disableReactionCreates) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: [styles.container, containerStyle]};
|
||||
items2 = [reactions.map(_fun86315)];
|
||||
items2[1] = additionalReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalReactionCount} containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
|
||||
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ForumPostActionBarReactions({thread, parentChannel, firstMessage, containerStyle, reactionContainerStyle}) { // fn#86316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:1217, offset: 0x01f905ee, size: 415 bytes, params: 2, frame: 26
|
||||
var r0;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const disableReactionCreates = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread).disableReactionCreates;
|
||||
const {reactions,
|
||||
additionalNonUniqueReactionCount} = (require(9619) /* metro dependency 9619: ForumHooks */).useSomeForumPostReactions({message: firstMessage,
|
||||
parentChannel: parentChannel, sorted: false, count: disableReactionCreates ? 3 : 2});
|
||||
if (reactions.length !== 0) {
|
||||
var viewBindingProps = {style: [styles.container, containerStyle]};
|
||||
items2 = [reactions.map(_fun86317)];
|
||||
items2[1] = additionalNonUniqueReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalNonUniqueReactionCount} containerStyle={[styles.actionBarReaction,
|
||||
|
||||
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
|
||||
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={[styles.actionBarReaction,
|
||||
|
||||
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
} else if (disableReactionCreates) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: [styles.container, containerStyle]};
|
||||
items2 = [reactions.map(_fun86317)];
|
||||
items2[1] = additionalNonUniqueReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalNonUniqueReactionCount} containerStyle={[styles.actionBarReaction,
|
||||
|
||||
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
|
||||
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={[styles.actionBarReaction,
|
||||
|
||||
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MostCommonForumPostReaction({thread, parentChannel, firstMessage, locationAnalyticsObject}) { // fn#86318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:1988, offset: 0x01f90811, size: 234 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const {disableReactionCreates,
|
||||
disableReactionUpdates} = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread);
|
||||
const forumHooksModule = require(9619) /* metro dependency 9619: ForumHooks */;
|
||||
const useSomeForumPostReactions = forumHooksModule.useSomeForumPostReactions;
|
||||
const property = Reflect.apply(useSomeForumPostReactions, forumHooksModule, [{parentChannel: parentChannel,
|
||||
message: firstMessage}]).reactions[0];
|
||||
if (property == null) {
|
||||
return null;
|
||||
}
|
||||
if (disableReactionUpdates) {
|
||||
return null;
|
||||
}
|
||||
if (disableReactionCreates) {
|
||||
if (property.me || property.me_burst) {
|
||||
const ForumPostReactionButton = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
|
||||
return (
|
||||
<ForumPostReactionButton
|
||||
containerStyle={styles.mostCommonContainer}
|
||||
thread={thread}
|
||||
reaction={property}
|
||||
locationAnalyticsObject={locationAnalyticsObject}
|
||||
animateCount={false}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
const ForumPostReactionButton2 = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
|
||||
return (
|
||||
<ForumPostReactionButton2
|
||||
containerStyle={styles.mostCommonContainer}
|
||||
thread={thread}
|
||||
reaction={property}
|
||||
locationAnalyticsObject={locationAnalyticsObject}
|
||||
animateCount={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86315(a0) { // fn#86315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:862, offset: 0x01f9056a, size: 132 bytes, params: 2, frame: 18
|
||||
const ForumPostReactionButton = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
|
||||
return (
|
||||
<ForumPostReactionButton
|
||||
containerStyle={[styles.reactionButtonContainer, reactionContainerStyle]}
|
||||
thread={thread}
|
||||
reaction={a0}
|
||||
animateCount={false}
|
||||
key={a0.emoji.id ?? a0.emoji.name}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86317(a0) { // fn#86317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:1595, offset: 0x01f9078d, size: 132 bytes, params: 2, frame: 18
|
||||
const ForumPostReactionButton = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
|
||||
return (
|
||||
<ForumPostReactionButton
|
||||
containerStyle={[styles.actionBarReaction, reactionContainerStyle]}
|
||||
thread={thread}
|
||||
reaction={a0}
|
||||
animateCount={false}
|
||||
key={a0.emoji.id ?? a0.emoji.name}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user