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

No files matched your search

@@ -1,34 +1,42 @@
/* Metro module 10987; source: modules/search/native/components/HighlightText.tsx; dependencies: [31, 661, 33, 4501, 4000, 697, 1305, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun84088(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11173:6, offset: 0x01f38916, size: 282 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
ReactModule;
const Fonts = (ConstantsModule).Fonts;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object.fontFamily = PRIMARY_BOLD;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexOpacityToRgba = colorUtilsModule.hexOpacityToRgba;
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object.backgroundColor = Reflect.apply(hexOpacityToRgba, colorUtilsModule, [YELLOW_300, 0.3]);
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object.color = TEXT_STRONG;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{text: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/HighlightText.tsx');
object2.fontFamily = PRIMARY_BOLD;
const hexOpacityToRgba = ColorUtilsModule.hexOpacityToRgba;
const YELLOW_300 = (Native).unsafe_rawColors.YELLOW_300;
object2.backgroundColor = Reflect.apply(hexOpacityToRgba, ColorUtilsModule, [YELLOW_300, 0.3]);
const TEXT_STRONG = (Native).colors.TEXT_STRONG;
object2.color = TEXT_STRONG;
const env0_3 = Reflect.apply(createStyles, CreateStylesModule, [{text: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/HighlightText.tsx');
exports.default = _default_84089;
function _default_84089({children}) { // fn#84089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11173:316, offset: 0x01f38a30, size: 74 bytes, params: 2, frame: 16
const styles = useStyles();
const LegacyText = (NativeModule).LegacyText;
return (
<LegacyText style={styles.text}>
{children}
</LegacyText>
);
}
}
function _default_84089({children}) { // fn#84089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11173:316, offset: 0x01f38a30, size: 74 bytes, params: 2, frame: 16
const styles = useStyles();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={styles.text}>
{children}
</LegacyText>
);
}
global.__d(_fun84088, 10987, [31, 661, 33, 4501, 4000, 697, 1305,
2]) /* metro module 10987, dependencies: [31, 661, 33, 4501, 4000, 697, 1305, 2] */;
@@ -1,4 +1,30 @@
/* Metro module 15020; source: modules/search/native/components/layout/SearchBar.tsx; dependencies: [31, 27, 1379, 1867, 3793, 1878, 9674, 9615, 9614, 661, 33, 4501, 697, 1244, 4805, 566, 4017, 4589, 1357, 11822, 11828, 3869, 9673, 9676, 4577, 4581, 3860, 674, 9100, 15021, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MobileVisualRefreshExperiment from '../../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import LinearGradient from '../../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import TagListInputNative from '../../../../../design/components/TagListInput/native/TagListInput.native.tsx'; /* Metro dependency 9100 */
import SearchQueryStore from '../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import SearchBarActivityIcon from './SearchBarActivityIcon.tsx'; /* Metro dependency 15021 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseTokenModule from '../../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as TrackingConstantsModule from '../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchPlatformUtilsModule from '../../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
function _fun113571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:6, offset: 0x023ff4d2, size: 458 bytes, params: 8, frame: 20
let env0_0 = require;
const useSearchPlaceholder = function(a0) {
@@ -7,421 +33,414 @@ function _fun113571(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_10 = searchConstantsModule.SEARCH_BAR_HEIGHT;
const env0_11 = searchConstantsModule.SearchQueryTagTypes;
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.HorizontalGradient;
const env0_14 = constantsModule.SearchTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_15 = value4.jsx;
const env0_16 = value4.jsxs;
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun113574);
const env0_18 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4589) /* metro dependency 4589 */);
let value = ReactModule;
const env0_17 = (CreateStylesModule).createStyles(_fun113574);
const env0_18 = (ReanimatedRexport).createAnimatedComponent(LinearGradient);
object = {code: 'function SearchBarTsx1(){const{withSpring,gradientVisible,springStandard}=this.__closure;return{opacity:withSpring(gradientVisible.get()?1:0,springStandard)};}'};
value = value.memo(value.forwardRef(_fun113575));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchBar.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/SearchBar.tsx');
exports.default = value;
}
function useSearchPlaceholder(a0) { // fn#113572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:675, offset: 0x023ff69c, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], _fun113573, [a0]);
}
function _fun113574(a0) { // fn#113574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:366, offset: 0x023ff973, size: 192 bytes, params: 2, frame: 16
var r6;
var r2;
var object;
const object4 = {};
if (a0) {
r2 = {height: SEARCH_BAR_HEIGHT + 2, overflow: 'hidden'};
} else {
object = {};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.height = SEARCH_BAR_HEIGHT;
object.overflow = 'hidden';
r2 = object;
r6 = importDefault;
}
copyDataProperties(object4, r2, r6);
return {searchBar: object4, icon: {'width': 32, 'height': null, 'justifyContent': 'center', 'zIndex': 10,
height: SEARCH_BAR_HEIGHT}, gradientContainer: {'position': 'absolute', 'right': 0, height: SEARCH_BAR_HEIGHT},
gradient: {'width': 32, 'position': 'absolute', 'left': 0, 'top': 1, 'bottom': 1, 'zIndex': 100}};
}
function _fun113575({searchContext, setSuggestionsDismissed}, a1) { // fn#113575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1746, offset: 0x023ffa33, size: 856 bytes, params: 3, frame: 33
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SearchBar'));
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getTags(searchContext);
}, [searchContext]);
let binding = env0_3;
const value4 = binding.useMemo(_fun113577, [value3]);
const value5 = binding.useMemo(_fun113578, [value3]);
const value6 = binding.useRef(null);
const value7 = useSearchPlaceholder(searchContext);
binding.useImperativeHandle(a1, function() {
return {setText: _fun113581, getText: _fun113582, blur: _fun113583, focus: _fun113584, isFocused: _fun113585,
measure: _fun113586, measureInWindow: _fun113587, measureLayout: _fun113588};
});
binding.useEffect(_fun113589, [searchContext]);
const value8 = binding.useCallback(_fun113591, [searchContext]);
const value9 = binding.useCallback(_fun113593, [searchContext]);
const value10 = binding.useMemo(function() {
return _fun113596;
}, [searchContext, setSuggestionsDismissed]);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = D_113599;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
gradientVisible: value11,
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
closure.__workletHash = 14270272447339;
closure.__initData = env0_19;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value13 = binding.useCallback(_fun113600, [value11]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const MOBILE_SEARCHBAR_GRADIENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_SEARCHBAR_GRADIENT_BACKGROUND;
const value15 = binding.useMemo(_fun113601, [Reflect.apply(useToken, useTokenModule,
[MOBILE_SEARCHBAR_GRADIENT_BACKGROUND])]);
const textInputValue = SearchQueryStore.getTextInputValue(searchContext);
const TagListInputNative = importDefault(9100) /* metro dependency 9100: TagListInputNative */;
const value17 = ((Component) => <Component searchContext={searchContext} />)(importDefault(15021) /* metro dependency 15021: SearchBarActivityIcon */);
binding = env0_18;
const {START, END} = HorizontalGradient;
return (
<TagListInputNative
ref={value6}
accessibilityHint={value5}
autoFocus
defaultValue={textInputValue}
style={styles.searchBar}
tags={value4}
icon={<View style={styles.icon}>{value17}<View style={styles.gradientContainer}>{((Component) => <Component start={START} end={END} colors={value15} style={[styles.gradient,
value12]} pointerEvents="none" />)(binding)}</View></View>}
onChangeText={value8}
onRemove={value9}
placeholder={value7}
onSubmitEditing={value10}
onScroll={value13}
horizontal
autoClearInputOnTagAdd={false}
/>
);
}
function _fun113573() { // fn#113573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:748, offset: 0x023ff6e7, size: 652 bytes, params: 1, frame: 23
var r3;
var name;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var channel;
let value = environment.__proto__;
const getChannelIds = SearchQueryStore.getChannelIds;
const binding = env0_0;
const value3 = Reflect.apply(getChannelIds, SearchQueryStore, [binding]);
const type = binding.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
if (value3.size === 0) {
name = GuildStore.getGuild(env0_0.guildId)?.name;
r0 = name == null ? intl.string(t['5h0QOP']) : intl.formatToPlainString(t.LDpotA, {guildName: name});
} else {
r0 = intl.string(t['5h0QOP']);
function useSearchPlaceholder(a0) { // fn#113572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:675, offset: 0x023ff69c, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStores([SearchQueryStore], _fun113573, [a0]);
function _fun113573() { // fn#113573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:748, offset: 0x023ff6e7, size: 652 bytes, params: 1, frame: 23
var r3;
var name;
var r0;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var channel;
var moduleValue;
let value = environment.__proto__;
const searchQueryStoreBinding = SearchQueryStore;
const getChannelIds = searchQueryStoreBinding.getChannelIds;
const binding = env0_0;
const value3 = Reflect.apply(getChannelIds, searchQueryStoreBinding, [binding]);
const type = binding.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
if (value3.size === 0) {
name = GuildStore.getGuild(env0_0.guildId)?.name;
r0 = name == null ? intl.string(t['5h0QOP']) : intl.formatToPlainString(t.LDpotA, {guildName: name});
} else {
r0 = intl.string(t['5h0QOP']);
}
return r0;
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
if (value3.size === 0) {
name = GuildStore.getGuild(env0_0.guildId)?.name;
r0 = name == null ? intl.string(t['5h0QOP']) : intl.formatToPlainString(t.LDpotA, {guildName: name});
} else {
r0 = intl.string(t['5h0QOP']);
}
return r0;
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
channel = ChannelStore.getChannel(env0_0.channelId);
if (channel == null) {
r3 = intl.string(t['5h0QOP']);
} else {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
value = moduleValue.computeChannelName(channel, UserStore, RelationshipStore, true);
value = intl.formatToPlainString(t.LDpotA, {guildName: value});
r3 = value;
}
return r3;
}
const DMS = SearchTypes.DMS;
if (DMS === type) {
return intl.string(t.m7OrlR);
}
return intl.string(t['5h0QOP']);
}
return r0;
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
if (value3.size === 0) {
name = GuildStore.getGuild(env0_0.guildId)?.name;
r0 = name == null ? intl.string(t['5h0QOP']) : intl.formatToPlainString(t.LDpotA, {guildName: name});
} else {
r0 = intl.string(t['5h0QOP']);
}
return r0;
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
channel = ChannelStore.getChannel(env0_0.channelId);
if (channel == null) {
r3 = intl.string(t['5h0QOP']);
} else {
value = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore, true);
value = intl.formatToPlainString(t.LDpotA, {guildName: value});
r3 = value;
}
return r3;
}
const DMS = SearchTypes.DMS;
if (DMS === type) {
return intl.string(t.m7OrlR);
}
return intl.string(t['5h0QOP']);
}
function _fun113577() { // fn#113577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1908, offset: 0x023ffda6, size: 50 bytes, params: 1, frame: 13
const binding = env0_2;
return binding.map((require(11822) /* metro dependency 11822: SearchPlatformUtils */).toSearchBarTag);
}
}
function _fun113578() { // fn#113578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1962, offset: 0x023ffdd8, size: 132 bytes, params: 1, frame: 16
var environment;
var value2;
var intl;
var value;
if (env0_2.length !== 0) {
value = env0_2.map(function(a0) {
return a0.text;
function _fun113574(a0) { // fn#113574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:366, offset: 0x023ff973, size: 192 bytes, params: 2, frame: 16
var r6;
var r2;
var object2;
const object3 = {};
if (a0) {
r2 = {height: SEARCH_BAR_HEIGHT + 2, overflow: 'hidden'};
} else {
object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.height = SEARCH_BAR_HEIGHT;
object2.overflow = 'hidden';
r2 = object2;
r6 = importDefault;
}
copyDataProperties(object3, r2, r6);
return {searchBar: object3, icon: {'width': 32, 'height': null, 'justifyContent': 'center', 'zIndex': 10,
height: SEARCH_BAR_HEIGHT}, gradientContainer: {'position': 'absolute', 'right': 0, height: SEARCH_BAR_HEIGHT},
gradient: {'width': 32, 'position': 'absolute', 'left': 0, 'top': 1, 'bottom': 1, 'zIndex': 100}};
}
function _fun113575({searchContext, setSuggestionsDismissed}, a1) { // fn#113575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1746, offset: 0x023ffa33, size: 856 bytes, params: 3, frame: 33
const styles = useStyles((MobileVisualRefreshExperiment)('SearchBar'));
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getTags(searchContext);
}, [searchContext]);
let binding = env0_3;
const value4 = binding.useMemo(_fun113577, [value3]);
const value5 = binding.useMemo(_fun113578, [value3]);
const value6 = binding.useRef(null);
const value7 = useSearchPlaceholder(searchContext);
binding.useImperativeHandle(a1, function() {
return {setText: _fun113581, getText: _fun113582, blur: _fun113583, focus: _fun113584, isFocused: _fun113585,
measure: _fun113586, measureInWindow: _fun113587, measureLayout: _fun113588};
});
value = value.join(', ');
value2 = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0zoRaK'],
{text: value});
}
}
binding.useEffect(_fun113589, [searchContext]);
const value8 = binding.useCallback(_fun113591, [searchContext]);
const value9 = binding.useCallback(_fun113593, [searchContext]);
const value10 = binding.useMemo(function() {
return _fun113596;
}, [searchContext, setSuggestionsDismissed]);
const value11 = (ReanimatedRexportModule).useSharedValue(false);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const D_1135992 = D_113599;
D_1135992.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
gradientVisible: value11,
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
D_1135992.__workletHash = 14270272447339;
D_1135992.__initData = env0_19;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [D_1135992]);
const value13 = binding.useCallback(_fun113600, [value11]);
const useToken = UseTokenModule.useToken;
const MOBILE_SEARCHBAR_GRADIENT_BACKGROUND = (Native).colors.MOBILE_SEARCHBAR_GRADIENT_BACKGROUND;
const value15 = binding.useMemo(_fun113601, [Reflect.apply(useToken, UseTokenModule,
[MOBILE_SEARCHBAR_GRADIENT_BACKGROUND])]);
const textInputValue = SearchQueryStore.getTextInputValue(searchContext);
const value17 = ((Component) => <Component searchContext={searchContext} />)(SearchBarActivityIcon);
binding = env0_18;
const {START, END} = HorizontalGradient;
return (
<TagListInputNative
ref={value6}
accessibilityHint={value5}
autoFocus
defaultValue={textInputValue}
style={styles.searchBar}
tags={value4}
icon={<View style={styles.icon}>
{value17}
<View style={styles.gradientContainer}>
{((Component) => <Component start={START} end={END} colors={value15} style={[styles.gradient,
value12]} pointerEvents="none" />)(binding)}
</View>
</View>}
onChangeText={value8}
onRemove={value9}
placeholder={value7}
onSubmitEditing={value10}
onScroll={value13}
horizontal
autoClearInputOnTagAdd={false}
/>
);
function _fun113577() { // fn#113577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1908, offset: 0x023ffda6, size: 50 bytes, params: 1, frame: 13
const binding = env0_2;
return binding.map((SearchPlatformUtilsModule).toSearchBarTag);
}
function _fun113580() { // fn#113580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2168, offset: 0x023ffe5c, size: 102 bytes, params: 1, frame: 3
return {setText: setText_113581, getText: getText_113582, blur: blur_113583, focus: focus_113584,
isFocused: isFocused_113585, measure: measure_113586, measureInWindow: measureInWindow_113587,
measureLayout: measureLayout_113588};
}
function _fun113589() { // fn#113589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2783, offset: 0x0240000a, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(searchContext, _fun113590);
}
function _fun113591(a0) { // fn#113591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2917, offset: 0x0240007c, size: 202 bytes, params: 2, frame: 18
var environment;
var defaultImport;
var updateSearchQuery;
var isInitialSearchQuery2;
const env0_0 = a0;
let value = environment.__proto__;
const getTextInputValue = SearchQueryStore.getTextInputValue;
let searchContextBinding = searchContext;
if (Reflect.apply(getTextInputValue, SearchQueryStore, [searchContextBinding]) !== a0) {
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport, [searchContextBinding, _fun113592]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocompleteDebounced(searchContextBinding);
if (!SearchQueryStore.isAutocompleteVisible(searchContextBinding)) {
isInitialSearchQuery2 = SearchQueryStore.isInitialSearchQuery(searchContext);
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (isInitialSearchQuery2) {
value.fetchInitialMessages(searchContext);
} else {
value.fetchInitialMessagesDebounced(searchContext);
function _fun113578() { // fn#113578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:1962, offset: 0x023ffdd8, size: 132 bytes, params: 1, frame: 16
var environment;
var value2;
var intl;
var value;
if (env0_2.length !== 0) {
value = env0_2.map(function(a0) {
return a0.text;
});
value = value.join(', ');
value2 = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0zoRaK'],
{text: value});
}
}
}
}
function _fun113593(a0) { // fn#113593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3207, offset: 0x02400162, size: 416 bytes, params: 2, frame: 21
var environment;
var AccessibilityAnnouncer;
var announce;
var intl;
var defaultImport2;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const getTags = SearchQueryStore.getTags;
const property = Reflect.apply(getTags, SearchQueryStore, [searchContext])[a0];
if (property != null) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.srlxB8,
{text: property.text})]);
if (property.type === SearchQueryTagTypes.COMPLETE) {
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterRemove({searchContext: searchContext,
searchTokenType: property.searchTokenType,
isDefault: property.location === SearchFilterAddLocations.CLIENT_AUTO_ADD});
}
defaultImport2 = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport2.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport2, [searchContextBinding, _fun113594]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocompleteDebounced(searchContextBinding);
if (SearchQueryStore.getQueryString(searchContextBinding) !== SearchQueryStore.getSearchResultsQuery(searchContextBinding)) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (SearchQueryStore.isInitialSearchQuery(searchContextBinding)) {
value.fetchInitialMessages(searchContext);
} else {
value.fetchInitialMessagesDebounced(searchContext);
function _fun113580() { // fn#113580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2168, offset: 0x023ffe5c, size: 102 bytes, params: 1, frame: 3
return {setText: setText_113581, getText: getText_113582, blur: blur_113583, focus: focus_113584,
isFocused: isFocused_113585, measure: measure_113586, measureInWindow: measureInWindow_113587,
measureLayout: measureLayout_113588};
function setText_113581(a0) { // fn#113581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2182, offset: 0x023ffec2, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.setText(a0);
}
function getText_113582() { // fn#113582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2248, offset: 0x023ffee9, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return env1_3.current?.getText() ?? '';
}
function blur_113583() { // fn#113583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2328, offset: 0x023fff1a, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.blur();
}
function focus_113584() { // fn#113584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2389, offset: 0x023fff3d, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.focus();
}
function isFocused_113585() { // fn#113585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2455, offset: 0x023fff60, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const isFocused = env1_3.current?.isFocused();
return isFocused != null && isFocused;
}
function measure_113586(a0) { // fn#113586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2538, offset: 0x023fff8d, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.measure(a0);
}
function measureInWindow_113587(a0) { // fn#113587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2612, offset: 0x023fffb4, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.measureInWindow(a0);
}
function measureLayout_113588(a0, a1, a2) { // fn#113588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2692, offset: 0x023fffdb, size: 47 bytes, params: 4, frame: 16
const value = environment.__proto__;
return env1_3.current?.measureLayout(a0, a1, a2);
}
}
function _fun113589() { // fn#113589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2783, offset: 0x0240000a, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(searchContext, _fun113590);
function _fun113590(a0, a1, a2) { // fn#113590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2823, offset: 0x02400041, size: 59 bytes, params: 4, frame: 14
var r2;
var value2;
var current;
let r1 = a2 || a0 == null;
value = undefined;
if (r1) {
r2 = value;
} else {
value2 = environment.__proto__;
current = env1_3.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.setText(a0);
}
return value;
}
}
function _fun113591(a0) { // fn#113591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2917, offset: 0x0240007c, size: 202 bytes, params: 2, frame: 18
var environment;
var defaultImport;
var updateSearchQuery;
var isInitialSearchQuery2;
const env0_0 = a0;
let value = environment.__proto__;
const getTextInputValue = SearchQueryStore.getTextInputValue;
let searchContextBinding = searchContext;
if (Reflect.apply(getTextInputValue, searchQueryStoreBinding, [searchContextBinding]) !== a0) {
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport, [searchContextBinding, _fun113592]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocompleteDebounced(searchContextBinding);
if (!Reflect.apply(SearchQueryStore.isAutocompleteVisible, searchQueryStoreBinding, [searchContextBinding])) {
searchQueryStoreBinding = SearchQueryStore;
isInitialSearchQuery2 = searchQueryStoreBinding.isInitialSearchQuery(searchContext);
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (isInitialSearchQuery2) {
value.fetchInitialMessages(searchContext);
} else {
value.fetchInitialMessagesDebounced(searchContext);
}
}
}
function _fun113592(a0) { // fn#113592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2980, offset: 0x02400146, size: 28 bytes, params: 2, frame: 13
a0.setTextInputValue(env0_0, true);
}
}
function _fun113593(a0) { // fn#113593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3207, offset: 0x02400162, size: 416 bytes, params: 2, frame: 21
var environment;
var AccessibilityAnnouncer;
var announce;
var intl;
var defaultImport2;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const searchQueryStoreBinding = SearchQueryStore;
const getTags = searchQueryStoreBinding.getTags;
const property = Reflect.apply(getTags, searchQueryStoreBinding, [searchContext])[a0];
if (property != null) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.srlxB8,
{text: property.text})]);
if (property.type === SearchQueryTagTypes.COMPLETE) {
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterRemove({searchContext: searchContext,
searchTokenType: property.searchTokenType,
isDefault: property.location === SearchFilterAddLocations.CLIENT_AUTO_ADD});
}
defaultImport2 = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport2.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport2, [searchContextBinding, _fun113594]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocompleteDebounced(searchContextBinding);
if (SearchQueryStore.getQueryString(searchContextBinding) !== SearchQueryStore.getSearchResultsQuery(searchContextBinding)) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (SearchQueryStore.isInitialSearchQuery(searchContextBinding)) {
value.fetchInitialMessages(searchContext);
} else {
value.fetchInitialMessagesDebounced(searchContext);
}
}
}
function _fun113594(a0) { // fn#113594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3532, offset: 0x02400302, size: 61 bytes, params: 2, frame: 12
a0.removeTag(env0_0);
const type = env0_1.type;
const PREFIX = SearchQueryTagTypes.PREFIX;
if (type === PREFIX) {
a0.restoreDraftTextInputValue();
}
}
}
function _fun113595() { // fn#113595, offset: 0x0240033f, size: 11 bytes, params: 1, frame: 1
return _fun113596;
function _fun113596() { // fn#113596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3832, offset: 0x0240034a, size: 310 bytes, params: 1, frame: 20
var environment;
var moduleValue;
var defaultImport;
var updateSearchQuery;
var defaultImport3;
const value = environment.__proto__;
setSuggestionsDismissed();
let searchQueryStoreBinding = SearchQueryStore;
const getPrefixTag = searchQueryStoreBinding.getPrefixTag;
let searchContextBinding = searchContext;
const value3 = Reflect.apply(getPrefixTag, searchQueryStoreBinding, [searchContextBinding]);
const value5 = SearchQueryStore.getTextInputValue(searchContextBinding).trim();
let r2 = value3 != null && value5 !== '';
if (r2) {
moduleValue = require(9676) /* metro dependency 9676: SearchTokens */;
r2 = moduleValue.isValidFilterAnswerForSubmit(value3.searchTokenType, value5);
}
if (r2) {
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport, [searchContextBinding, _fun113597]);
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterAdd({searchContext: searchContextBinding,
searchTokenType: value3.searchTokenType, location: value3.location});
}
searchQueryStoreBinding = SearchQueryStore;
const isQueryStringEmpty = searchQueryStoreBinding.isQueryStringEmpty;
searchContextBinding = searchContext;
if (!Reflect.apply(isQueryStringEmpty, searchQueryStoreBinding, [searchContextBinding])) {
defaultImport3 = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport3.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport3, [searchContextBinding, function(a0) {
return a0.markExplicitSearchSubmitted();
}]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
}
function _fun113597(a0) { // fn#113597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4005, offset: 0x02400480, size: 73 bytes, params: 2, frame: 12
a0.setTextInputValue('');
const addTag = a0.addTag;
const ANSWER = SearchQueryTagTypes.ANSWER;
Reflect.apply(addTag, a0, [{type: ANSWER, text: env0_0}]);
a0.restoreDraftTextInputValue();
}
}
}
function D_113599() { // fn#113599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4402, offset: 0x024004d8, size: 94 bytes, params: 1, frame: 17
const object = {};
object.opacity = SpringModule.withSpring(ReactNativeModule.View.get() ? 1 : 0,
(require(4581) /* metro dependency 4581: springPresets */).springStandard);
return object;
}
function _fun113600({nativeEvent}) { // fn#113600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4642, offset: 0x02400536, size: 66 bytes, params: 2, frame: 13
const set = ReactNativeModule.View.set;
const Math = global.Math;
Reflect.apply(set, ReactNativeModule.View, [Math.round(nativeEvent.contentOffset.x) > 5]);
}
function _fun113601() { // fn#113601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4791, offset: 0x02400578, size: 74 bytes, params: 1, frame: 13
const binding = env0_5;
const items2 = [binding];
let value = environment.__proto__;
value = (importDefault(674) /* metro dependency 674 */)(binding);
value = value.alpha(0);
items2[1] = value.hex();
return items2;
}
}
}
function _fun113595() { // fn#113595, offset: 0x0240033f, size: 11 bytes, params: 1, frame: 1
return _fun113596;
}
function D_113599() { // fn#113599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4402, offset: 0x024004d8, size: 94 bytes, params: 1, frame: 17
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
object2.opacity = springModule.withSpring(env0_4.get() ? 1 : 0,
(require(4581) /* metro dependency 4581: springPresets */).springStandard);
return object2;
}
function _fun113600({nativeEvent}) { // fn#113600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4642, offset: 0x02400536, size: 66 bytes, params: 2, frame: 13
const binding = env0_4;
const set = binding.set;
const Math = global.Math;
Reflect.apply(set, binding, [Math.round(nativeEvent.contentOffset.x) > 5]);
}
function _fun113601() { // fn#113601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4791, offset: 0x02400578, size: 74 bytes, params: 1, frame: 13
const binding = env0_5;
const items2 = [binding];
let value = environment.__proto__;
value = (importDefault(674) /* metro dependency 674 */)(binding);
value = value.alpha(0);
items2[1] = value.hex();
return items2;
}
function setText_113581(a0) { // fn#113581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2182, offset: 0x023ffec2, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.setText(a0);
}
function getText_113582() { // fn#113582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2248, offset: 0x023ffee9, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return env1_3.current?.getText() ?? '';
}
function blur_113583() { // fn#113583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2328, offset: 0x023fff1a, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.blur();
}
function focus_113584() { // fn#113584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2389, offset: 0x023fff3d, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.focus();
}
function isFocused_113585() { // fn#113585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2455, offset: 0x023fff60, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const isFocused = env1_3.current?.isFocused();
return isFocused != null && isFocused;
}
function measure_113586(a0) { // fn#113586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2538, offset: 0x023fff8d, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.measure(a0);
}
function measureInWindow_113587(a0) { // fn#113587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2612, offset: 0x023fffb4, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_3.current?.measureInWindow(a0);
}
function measureLayout_113588(a0, a1, a2) { // fn#113588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2692, offset: 0x023fffdb, size: 47 bytes, params: 4, frame: 16
const value = environment.__proto__;
return env1_3.current?.measureLayout(a0, a1, a2);
}
function _fun113590(a0, a1, a2) { // fn#113590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2823, offset: 0x02400041, size: 59 bytes, params: 4, frame: 14
var r2;
var value2;
var current;
let r1 = a2 || a0 == null;
value = undefined;
if (r1) {
r2 = value;
} else {
value2 = environment.__proto__;
current = env1_3.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.setText(a0);
}
return value;
}
function _fun113592(a0) { // fn#113592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:2980, offset: 0x02400146, size: 28 bytes, params: 2, frame: 13
a0.setTextInputValue(env0_0, true);
}
function _fun113594(a0) { // fn#113594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3532, offset: 0x02400302, size: 61 bytes, params: 2, frame: 12
a0.removeTag(env0_0);
const type = env0_1.type;
const PREFIX = SearchQueryTagTypes.PREFIX;
if (type === PREFIX) {
a0.restoreDraftTextInputValue();
}
}
function _fun113596() { // fn#113596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:3832, offset: 0x0240034a, size: 310 bytes, params: 1, frame: 20
var environment;
var moduleValue;
var defaultImport;
var updateSearchQuery;
var defaultImport3;
const value = environment.__proto__;
setSuggestionsDismissed();
const getPrefixTag = SearchQueryStore.getPrefixTag;
let searchContextBinding = searchContext;
const value3 = Reflect.apply(getPrefixTag, SearchQueryStore, [searchContextBinding]);
const value5 = SearchQueryStore.getTextInputValue(searchContextBinding).trim();
let r2 = value3 != null && value5 !== '';
if (r2) {
moduleValue = require(9676) /* metro dependency 9676: SearchTokens */;
r2 = moduleValue.isValidFilterAnswerForSubmit(value3.searchTokenType, value5);
}
if (r2) {
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport, [searchContextBinding, _fun113597]);
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterAdd({searchContext: searchContextBinding,
searchTokenType: value3.searchTokenType, location: value3.location});
}
const isQueryStringEmpty = SearchQueryStore.isQueryStringEmpty;
searchContextBinding = searchContext;
if (!Reflect.apply(isQueryStringEmpty, SearchQueryStore, [searchContextBinding])) {
defaultImport3 = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = defaultImport3.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, defaultImport3, [searchContextBinding, function(a0) {
return a0.markExplicitSearchSubmitted();
}]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
}
}
function _fun113597(a0) { // fn#113597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15217:4005, offset: 0x02400480, size: 73 bytes, params: 2, frame: 12
a0.setTextInputValue('');
const addTag = a0.addTag;
const ANSWER = SearchQueryTagTypes.ANSWER;
Reflect.apply(addTag, a0, [{type: ANSWER, text: env0_0}]);
a0.restoreDraftTextInputValue();
}
global.__d(_fun113571, 15020, [31, 27, 1379, 1867, 3793, 1878, 9674, 9615, 9614, 661, 33, 4501, 697, 1244, 4805,
566, 4017, 4589, 1357, 11822, 11828, 3869, 9673, 9676, 4577, 4581, 3860, 674, 9100, 15021,
2]) /* metro module 15020, dependencies: [31, 27, 1379, 1867, 3793, 1878, 9674, 9615, 9614, 661, 33, 4501, 697, 1244, 4805, 566, 4017, 4589, 1357, 11822, 11828, 3869, 9673, 9676, 4577, 4581, 3860, 674, 9100, 15021, 2] */;
@@ -1,120 +1,133 @@
/* Metro module 15021; source: modules/search/native/components/layout/SearchBarActivityIcon.tsx; dependencies: [31, 27, 4792, 9674, 9615, 33, 4501, 697, 632, 9675, 4017, 4504, 6998, 477, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import SearchMessageStore from '../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import SearchQueryStore from '../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as UseStateFromStoresModule from '../../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as MagnifyingGlassIconModule from '../../../../../design/components/Icon/native/redesign/generated/MagnifyingGlassIcon.tsx'; /* Metro dependency 6998 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:6, offset: 0x024005c2, size: 440 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ActivityIndicator;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_MESSAGE_TAB_SENTINEL;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.Fragment;
const env0_10 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [{spinnerColor: {color: INTERACTIVE_TEXT_DEFAULT},
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [{spinnerColor: {color: INTERACTIVE_TEXT_DEFAULT},
spinner: {'width': 18, 'height': 18, 'alignItems': 'center', 'justifyContent': 'center',
'position': 'absolute'}, icon: {'marginLeft': 12, 'marginRight': 4}}]);
object2 = {START: 0};
object2[0] = 'START';
object2.END = 1;
object2[1] = 'END';
const START = object2.START;
object = {START: 0};
object[0] = 'START';
object.END = 1;
object[1] = 'END';
const START = object.START;
const items2 = [START];
const END = object2.END;
const END = object.END;
items2[1] = END;
object2 = {code: 'function SearchBarActivityIconTsx1(){const{interpolate,fadeAnimationState,ANIMATION_STATE_INPUT}=this.__closure;return{opacity:interpolate(fadeAnimationState.get(),ANIMATION_STATE_INPUT,[0,0.5])};}'};
object2 = {code: 'function SearchBarActivityIconTsx2(){const{interpolate,fadeAnimationState,ANIMATION_STATE_INPUT}=this.__closure;return{opacity:interpolate(fadeAnimationState.get(),ANIMATION_STATE_INPUT,[1,0])};}'};
object = {code: 'function SearchBarActivityIconTsx1(){const{interpolate,fadeAnimationState,ANIMATION_STATE_INPUT}=this.__closure;return{opacity:interpolate(fadeAnimationState.get(),ANIMATION_STATE_INPUT,[0,0.5])};}'};
object = {code: 'function SearchBarActivityIconTsx2(){const{interpolate,fadeAnimationState,ANIMATION_STATE_INPUT}=this.__closure;return{opacity:interpolate(fadeAnimationState.get(),ANIMATION_STATE_INPUT,[1,0])};}'};
value = value.memo(SearchBarActivityIcon);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchBarActivityIcon.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/SearchBarActivityIcon.tsx');
exports.default = value;
}
function SearchBarActivityIcon({searchContext}) { // fn#113603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:964, offset: 0x0240077a, size: 594 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = (UseStateFromStoresModule).useStateFromStores([SearchQueryStore,
SearchMessageStore], _fun113604, [searchContext]);
const useSharedValue = ReanimatedRexportModule.useSharedValue;
const START = env0_12.START;
const value3 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [START]);
let binding = env0_3;
binding.useEffect(_fun113605, [value2, value3]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = SearchBarActivityIconE;
object = {interpolate: ReanimatedRexportModule.interpolate, fadeAnimationState: value3};
binding = env0_13;
object.ANIMATION_STATE_INPUT = binding;
closure.__closure = object;
closure.__workletHash = 12880513119188;
closure.__initData = env0_14;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = SearchBarActivityIconV;
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, fadeAnimationState: value3,
ANIMATION_STATE_INPUT: binding};
closure.__workletHash = 11061952032557;
closure.__initData = env0_15;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const color = styles.spinnerColor.color;
let icon = styles.icon;
const items3 = [
<View style={value4}>
<ActivityIndicator color={color} style={[icon, styles.spinner]} />
</View>,
];
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const MagnifyingGlassIcon = (MagnifyingGlassIconModule).MagnifyingGlassIcon;
icon = styles.icon;
let value = PlatformUtilsModule;
value = value.isAndroid();
items3[1] = (
<View style={value5}>
<MagnifyingGlassIcon
style={icon}
size={value ? 'sm' : 'xs'}
color="interactive-text-default"
/>
</View>
);
return (
<>
{items3}
</>
);
function _fun113604() { // fn#113604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1060, offset: 0x024009cc, size: 118 bytes, params: 1, frame: 17
const value = environment.__proto__;
const searchQueryStoreBinding = SearchQueryStore;
const getSearchResultsQuery = searchQueryStoreBinding.getSearchResultsQuery;
const searchContextBinding = searchContext;
return !SearchMessageStore.getIsInitialFetchComplete((require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, Reflect.apply(getSearchResultsQuery, searchQueryStoreBinding,
[searchContextBinding]))) && !searchQueryStoreBinding.isInitialSearchQuery(searchContextBinding) && !searchQueryStoreBinding.isAutocompleteVisible(searchContextBinding);
}
function SearchBarActivityIcon({searchContext}) { // fn#113603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:964, offset: 0x0240077a, size: 594 bytes, params: 2, frame: 27
var object2;
const styles = useStyles();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore,
SearchMessageStore], _fun113604, [searchContext]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const START = env0_12.START;
const value3 = Reflect.apply(useSharedValue, reanimatedRexportModule, [START]);
let binding = env0_3;
binding.useEffect(_fun113605, [value2, value3]);
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
let closure = SearchBarActivityIconE;
object2 = {interpolate: reanimatedRexportModule.interpolate, fadeAnimationState: value3};
binding = env0_13;
object2.ANIMATION_STATE_INPUT = binding;
closure.__closure = object2;
closure.__workletHash = 12880513119188;
closure.__initData = env0_14;
const value4 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = SearchBarActivityIconV;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, fadeAnimationState: value3,
ANIMATION_STATE_INPUT: binding};
closure.__workletHash = 11061952032557;
closure.__initData = env0_15;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const color = styles.spinnerColor.color;
let icon = styles.icon;
const items3 = [<View style={value4}><ActivityIndicator color={color} style={[icon, styles.spinner]} /></View>];
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
icon = styles.icon;
let value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = <View style={value5}><MagnifyingGlassIcon style={icon} size={value ? 'sm' : 'xs'} color="interactive-text-default" /></View>;
return (
<>
{items3}
</>
);
}
function _fun113605() { // fn#113605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1298, offset: 0x02400a42, size: 89 bytes, params: 1, frame: 15
const binding = env0_1;
const binding2 = env0_2;
const set = binding2.set;
const withTiming = TimingModule.withTiming;
const binding3 = env1_12;
if (binding) {
Reflect.apply(set, binding2, [Reflect.apply(withTiming, TimingModule, [binding3.END])]);
} else {
Reflect.apply(set, binding2, [Reflect.apply(withTiming, TimingModule, [binding3.START])]);
}
}
function _fun113604() { // fn#113604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1060, offset: 0x024009cc, size: 118 bytes, params: 1, frame: 17
const value = environment.__proto__;
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
return !SearchMessageStore.getIsInitialFetchComplete((require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, Reflect.apply(getSearchResultsQuery, SearchQueryStore,
[searchContextBinding]))) && !SearchQueryStore.isInitialSearchQuery(searchContextBinding) && !SearchQueryStore.isAutocompleteVisible(searchContextBinding);
}
function SearchBarActivityIconE() { // fn#113606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1424, owner: SearchBarActivityIcon.E, offset: 0x02400a9b, size: 76 bytes, params: 1, frame: 16
const object = {};
object.opacity = ReanimatedRexportModule.interpolate(env0_2.get(), env1_13, [0, 0.5]);
return object;
}
function SearchBarActivityIconV() { // fn#113607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1663, owner: SearchBarActivityIcon.v, offset: 0x02400ae7, size: 76 bytes, params: 1, frame: 16
const object = {};
object.opacity = ReanimatedRexportModule.interpolate(env0_2.get(), env1_13, [1, 0]);
return object;
}
function _fun113605() { // fn#113605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1298, offset: 0x02400a42, size: 89 bytes, params: 1, frame: 15
const binding = env0_1;
const binding2 = env0_2;
const set = binding2.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding3 = env1_12;
if (binding) {
Reflect.apply(set, binding2, [Reflect.apply(withTiming, timingModule, [binding3.END])]);
} else {
Reflect.apply(set, binding2, [Reflect.apply(withTiming, timingModule, [binding3.START])]);
}
}
function SearchBarActivityIconE() { // fn#113606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1424, owner: SearchBarActivityIcon.E, offset: 0x02400a9b, size: 76 bytes, params: 1, frame: 16
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = reanimatedRexportModule.interpolate(env0_2.get(), env1_13, [0, 0.5]);
return object2;
}
function SearchBarActivityIconV() { // fn#113607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15218:1663, owner: SearchBarActivityIcon.v, offset: 0x02400ae7, size: 76 bytes, params: 1, frame: 16
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = reanimatedRexportModule.interpolate(env0_2.get(), env1_13, [1, 0]);
return object2;
}
global.__d(_fun113602, 15021, [31, 27, 4792, 9674, 9615, 33, 4501, 697, 632, 9675, 4017, 4504, 6998, 477,
2]) /* metro module 15021, dependencies: [31, 27, 4792, 9674, 9615, 33, 4501, 697, 632, 9675, 4017, 4504, 6998, 477, 2] */;
@@ -1,48 +1,53 @@
/* Metro module 15030; source: modules/search/native/components/layout/SearchScreenLayout.tsx; dependencies: [31, 27, 9674, 33, 4501, 14885, 566, 15031, 15115, 2] */
import SearchQueryStore from '../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import AppFreezer from '../../../../panels/morphable/native/AppFreezer.tsx'; /* Metro dependency 14885 */
import SearchTabsLayout from '../tabs/SearchTabsLayout.tsx'; /* Metro dependency 15031 */
import AutocompleteScreen from './autocomplete/AutocompleteScreen.tsx'; /* Metro dependency 15115 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun113666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:6, offset: 0x02402b22, size: 265 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.Fragment;
const env0_7 = value2.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({hidden: {opacity: 0},
let value = ReactModule;
const env0_8 = (CreateStylesModule).createStyles({hidden: {opacity: 0},
visible: {flex: 1}});
value = value.memo(_fun113668);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchScreenLayout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/SearchScreenLayout.tsx');
exports.default = value;
function SearchFreezeContainer({visible, children, containerStyle}) { // fn#113667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:233, offset: 0x02402c2b, size: 147 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = !visible;
return (
<AppFreezer manualFreeze={value2} placeholder={null}>
<View style={[containerStyle, visible ? styles.visible : styles.hidden]} {...{['aria-hidden']: value2}}>
{children}
</View>
</AppFreezer>
);
}
function _fun113668({searchContext, containerStyle, width}) { // fn#113668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:457, offset: 0x02402cbe, size: 249 bytes, params: 2, frame: 28
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isAutocompleteVisible(searchContext);
}, [searchContext]);
return (
<>
<SearchFreezeContainer visible={!value2} containerStyle={containerStyle}>
{((Component) => <Component searchContext={searchContext} width={width} />)(SearchTabsLayout)}
</SearchFreezeContainer>
<SearchFreezeContainer visible={value2} containerStyle={containerStyle}>
{((Component) => <Component searchContext={searchContext} />)(AutocompleteScreen)}
</SearchFreezeContainer>
</>
);
}
}
function SearchFreezeContainer({visible, children, containerStyle}) { // fn#113667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:233, offset: 0x02402c2b, size: 147 bytes, params: 2, frame: 22
const styles = useStyles();
const AppFreezer = importDefault(14885) /* metro dependency 14885: AppFreezer */;
const value2 = !visible;
return (
<AppFreezer manualFreeze={value2} placeholder={null}>
<View style={[containerStyle, visible ? styles.visible : styles.hidden]} {...{['aria-hidden']: value2}}>
{children}
</View>
</AppFreezer>
);
}
function _fun113668({searchContext, containerStyle, width}) { // fn#113668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15227:457, offset: 0x02402cbe, size: 249 bytes, params: 2, frame: 28
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isAutocompleteVisible(searchContext);
}, [searchContext]);
return (
<>
<SearchFreezeContainer visible={!value2} containerStyle={containerStyle}>
{((Component) => <Component searchContext={searchContext} width={width} />)(importDefault(15031) /* metro dependency 15031: SearchTabsLayout */)}
</SearchFreezeContainer>
<SearchFreezeContainer visible={value2} containerStyle={containerStyle}>
{((Component) => <Component searchContext={searchContext} />)(importDefault(15115) /* metro dependency 15115: AutocompleteScreen */)}
</SearchFreezeContainer>
</>
);
}
global.__d(_fun113666, 15030, [31, 27, 9674, 33, 4501, 14885, 566, 15031, 15115,
2]) /* metro module 15030, dependencies: [31, 27, 9674, 33, 4501, 14885, 566, 15031, 15115, 2] */;
@@ -1,38 +1,42 @@
/* Metro module 15019; source: modules/search/native/components/layout/SearchScreenSearchBar.tsx; dependencies: [31, 27, 33, 4501, 15020, 15022, 15029, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun113569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15216:6, offset: 0x023ff21f, size: 324 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'flexDirection': 'row',
let value = ReactModule;
const env0_5 = (CreateStylesModule).createStyles({header: {'flexDirection': 'row',
'alignItems': 'center', 'paddingLeft': 16, 'zIndex': 10}, headerWithBackButton: {paddingLeft: 0},
headerSearch: {'flex': 1, 'flexGrow': 1}, headerControlsRight: {'paddingRight': 16, 'paddingLeft': 12},
suggestionsAnchor: {height: 0}, suggestions: {'position': 'absolute', 'left': 0, 'right': -50, 'top': 8},
suggestionsWithBackButton: {left: -28}});
value = value.memo(value.forwardRef(_fun113570));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/SearchScreenSearchBar.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/SearchScreenSearchBar.tsx');
exports.default = value;
}
function _fun113570({searchContext, onSuggestionsLayoutMesure, suggestionsDismissed, setSuggestionsDismissed, backButton}, a1) { // fn#113570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15216:510, offset: 0x023ff363, size: 367 bytes, params: 3, frame: 31
const styles = useStyles();
return (
<View style={[styles.header, backButton != null && styles.headerWithBackButton]}>
{backButton}
<View style={styles.headerSearch}>
{((Component) => <Component ref={a1} searchContext={searchContext} setSuggestionsDismissed={setSuggestionsDismissed} />)(importDefault(15020) /* metro dependency 15020: SearchBar */)}
<View style={styles.suggestionsAnchor}>
{((Component) => <Component searchContext={searchContext} onLayoutMeasure={onSuggestionsLayoutMesure} dismissed={suggestionsDismissed} containerStyle={[styles.suggestions,
backButton != null && styles.suggestionsWithBackButton]} />)(importDefault(15022) /* metro dependency 15022: SearchFilterSuggestions */)}
function _fun113570({searchContext, onSuggestionsLayoutMesure, suggestionsDismissed, setSuggestionsDismissed, backButton}, a1) { // fn#113570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15216:510, offset: 0x023ff363, size: 367 bytes, params: 3, frame: 31
const styles = useStyles();
return (
<View style={[styles.header, backButton != null && styles.headerWithBackButton]}>
{backButton}
<View style={styles.headerSearch}>
{((Component) => <Component ref={a1} searchContext={searchContext} setSuggestionsDismissed={setSuggestionsDismissed} />)(importDefault(15020) /* metro dependency 15020: SearchBar */)}
<View style={styles.suggestionsAnchor}>
{((Component) => <Component searchContext={searchContext} onLayoutMeasure={onSuggestionsLayoutMesure} dismissed={suggestionsDismissed} containerStyle={[styles.suggestions,
backButton != null && styles.suggestionsWithBackButton]} />)(importDefault(15022) /* metro dependency 15022: SearchFilterSuggestions */)}
</View>
</View>
<View style={styles.headerControlsRight}>
{((Component) => <Component searchContext={searchContext} />)(importDefault(15029) /* metro dependency 15029: SearchFilterButton */)}
</View>
</View>
<View style={styles.headerControlsRight}>
{((Component) => <Component searchContext={searchContext} />)(importDefault(15029) /* metro dependency 15029: SearchFilterButton */)}
</View>
</View>
);
);
}
}
global.__d(_fun113569, 15019, [31, 27, 33, 4501, 15020, 15022, 15029,
2]) /* metro module 15019, dependencies: [31, 27, 33, 4501, 15020, 15022, 15029, 2] */;
@@ -1,476 +1,494 @@
/* Metro module 15115; source: modules/search/native/components/layout/autocomplete/AutocompleteScreen.tsx; dependencies: [57, 31, 1379, 3793, 1878, 9677, 9674, 9615, 661, 33, 566, 15040, 11822, 11828, 9673, 3995, 4805, 9675, 15116, 9681, 9676, 15077, 15032, 1244, 15044, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import SearchAutocompleteStore from '../../../../SearchAutocompleteStore.tsx'; /* Metro dependency 9677 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as UsePlaceholderStylesModule from '../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
import * as UseSearchScreenErrorModule from '../../../hooks/useSearchScreenError.tsx'; /* Metro dependency 15077 */
import * as AutocompleteScreenUtilsModule from './AutocompleteScreenUtils.tsx'; /* Metro dependency 15116 */
function _fun115190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:6, offset: 0x02456b59, size: 330 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 */;
let value = importAll(31) /* metro dependency 31 */;
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 searchAutocompleteStore = importDefault(9677) /* metro dependency 9677: SearchAutocompleteStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_10 = searchConstantsModule.SearchListItemTypes;
const env0_11 = searchConstantsModule.SearchQueryTagTypes;
const env0_12 = searchConstantsModule.USER_ESTIMATED_ITEM_SIZE;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.SearchPopoutModes;
const env0_14 = constantsModule.SearchTokenTypes;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const env0_16 = [];
value = value.memo(AutocompleteScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/AutocompleteScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/autocomplete/AutocompleteScreen.tsx');
exports.default = value;
}
function AutocompleteScreen({searchContext}) { // fn#115191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:346, offset: 0x02456ca3, size: 821 bytes, params: 2, frame: 29
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchAutocompleteStore],
function() {
return SearchAutocompleteStore.getState(searchContext);
}, [searchContext], (require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
const binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isTextInputValueEmpty(searchContext);
}, [searchContext]);
const value6 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const value7 = binding.useCallback(_fun115194, [searchContext]);
const value8 = binding.useCallback(_fun115195, [value7, searchContext]);
const value9 = binding.useCallback(_fun115197, [value7, searchContext]);
const value10 = binding.useCallback(_fun115199, [value7, searchContext]);
binding.useEffect(_fun115201, [searchContext]);
binding.useEffect(_fun115204, [value2.autocompletes]);
const value11 = binding.useMemo(_fun115205, [property, searchContext, value6, value2, value9, value10, value8]);
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
r0 = value5 && value11.length === 0 ? ((Component) => <Component text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['E4HqQ+'])} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */) : value5 || value11.length !== 0 || property ? ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */) : ((Component) => <Component text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Dr1vko)} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */);
}
return r0;
}
function _fun115194() { // fn#115194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:694, offset: 0x0245700e, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
const syncAutocomplete = value.syncAutocomplete;
const searchContextBinding = searchContext;
Reflect.apply(syncAutocomplete, value, [searchContextBinding]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
}
function _fun115195(a0) { // fn#115195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:787, offset: 0x0245704f, size: 147 bytes, params: 2, frame: 18
var environment;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const prefixTag = SearchQueryStore.getPrefixTag(searchContext);
if (prefixTag != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115196]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
}
}
function _fun115197(a0) { // fn#115197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1086, offset: 0x0245712b, size: 169 bytes, params: 2, frame: 18
var environment;
var searchContextBinding;
var value4;
var updateSearchQuery;
let value = environment.__proto__;
if (UserStore.getUser(a0) != null) {
value4 = SearchQueryStore.getPrefixTag(searchContext);
if (value4 != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115198]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: value4.searchTokenType,
location: value4.location});
env0_5();
function AutocompleteScreen({searchContext}) { // fn#115191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:346, offset: 0x02456ca3, size: 821 bytes, params: 2, frame: 29
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchAutocompleteStore],
function() {
return SearchAutocompleteStore.getState(searchContext);
}, [searchContext], (require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
const binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isTextInputValueEmpty(searchContext);
}, [searchContext]);
const value6 = (UsePlaceholderStylesModule).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const value7 = binding.useCallback(_fun115194, [searchContext]);
const value8 = binding.useCallback(_fun115195, [value7, searchContext]);
const value9 = binding.useCallback(_fun115197, [value7, searchContext]);
const value10 = binding.useCallback(_fun115199, [value7, searchContext]);
binding.useEffect(_fun115201, [searchContext]);
binding.useEffect(_fun115204, [value2.autocompletes]);
const value11 = binding.useMemo(_fun115205, [property, searchContext, value6, value2, value9, value10, value8]);
const value12 = (UseSearchScreenErrorModule).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
r0 = (
value5 && value11.length === 0
? ((Component) => <Component text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['E4HqQ+'])} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */)
: (
value5 || value11.length !== 0 || property
? ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */)
: ((Component) => <Component text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Dr1vko)} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */)
)
);
}
}
}
function _fun115199(a0) { // fn#115199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1451, offset: 0x02457245, size: 298 bytes, params: 2, frame: 21
var environment;
var user;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
var prefixTag = SearchQueryStore.getPrefixTag(searchContext);
if (prefixTag == null) {
return undefined;
return r0;
function _fun115194() { // fn#115194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:694, offset: 0x0245700e, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
const syncAutocomplete = value.syncAutocomplete;
const searchContextBinding = searchContext;
Reflect.apply(syncAutocomplete, value, [searchContextBinding]);
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
}
var env0_1 = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore);
if (channel.isDM()) {
user = UserStore.getUser(channel.getRecipientId());
if (user == null) {
return undefined;
function _fun115195(a0) { // fn#115195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:787, offset: 0x0245704f, size: 147 bytes, params: 2, frame: 18
var environment;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const prefixTag = SearchQueryStore.getPrefixTag(searchContext);
if (prefixTag != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115196]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
}
env0_1 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115200]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
return undefined;
function _fun115196(a0) { // fn#115196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:856, offset: 0x024570e2, size: 73 bytes, params: 2, frame: 12
a0.setTextInputValue('');
const addTag = a0.addTag;
const ANSWER = SearchQueryTagTypes.ANSWER;
Reflect.apply(addTag, a0, [{type: ANSWER, text: env0_0}]);
a0.restoreDraftTextInputValue();
}
}
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115200]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
}
}
function _fun115201() { // fn#115201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1960, offset: 0x024573df, size: 65 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeSearchQueryState(searchContext, function(a0) {
var object = {isAutocompleteVisible: a0.isAutocompleteVisible(), textInputValue: a0.getTextInputValue()};
var value = a0.getPrefixTag();
var value2 = null;
object.prefixTag = value2 != value ? value : value2;
return object;
}, _fun115203, true);
}
function _fun115205() { // fn#115205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2378, offset: 0x024574bd, size: 681 bytes, params: 1, frame: 24
var environment;
var id;
var r1;
var r5;
var type;
var FILTER;
var property;
var Token;
var value10;
var token;
var value11;
var ANSWER_USERNAME_FROM;
var ANSWER_USERNAME_MENTIONS;
var moduleValue3;
var isValidUserAutocomplete;
var getData;
var value12;
var getUser;
var value13;
var moduleValue4;
var toSearchListUserItem;
var value14;
var ANSWER_IN;
var moduleValue5;
var isValidChannelAutocomplete;
var value15;
var value16;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value17;
const items2 = [];
let value = environment;
if (env0_2) {
value15 = 0;
value16 = environment.__proto__;
if (value15 < env0_4) {
r5 = value15;
reducibleLoop19: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value17 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value17 < env0_4) {
r5 = value17;
continue reducibleLoop19;
function _fun115197(a0) { // fn#115197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1086, offset: 0x0245712b, size: 169 bytes, params: 2, frame: 18
var environment;
var searchQueryStoreBinding;
var searchContextBinding;
var value4;
var updateSearchQuery;
let value = environment.__proto__;
if (UserStore.getUser(a0) != null) {
searchQueryStoreBinding = SearchQueryStore;
value4 = searchQueryStoreBinding.getPrefixTag(searchContext);
if (value4 != null) {
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115198]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: value4.searchTokenType,
location: value4.location});
env0_5();
}
break reducibleLoop19;
}
}
return items2;
}
let Set = global.Set;
const value3 = undefined;
const autocompleteScreenUtilsModule = require(15116) /* metro dependency 15116: AutocompleteScreenUtils */;
const getSearchQueryUserIds = autocompleteScreenUtilsModule.getSearchQueryUserIds;
const searchContextBinding = searchContext;
const value4 = Reflect.apply(getSearchQueryUserIds, autocompleteScreenUtilsModule, [searchContextBinding]);
let prototype = Set.prototype;
const value5 = Object.create(prototype, {constructor: {value: Set}});
let set = new Set(value4);
const env0_1 = set instanceof Object ? set : value5;
Set = global.Set;
set = new Set(autocompleteScreenUtilsModule.getSearchQueryChannelIds(searchContextBinding));
const closure = maybeAddUserItem;
let binding = env0_1;
const autocompletes = binding.autocompletes;
const tokens = binding.tokens;
const mode = binding.mode;
let forEach = autocompletes.forEach;
Reflect.apply(forEach, autocompletes, [function(a0) {
var property = mode.type;
if (property === SearchPopoutModes.FILTER) {
property = a0.results;
var env0_0 = a0.group;
if (property.length !== 0) {
property.forEach(_fun115209);
function _fun115198(a0) { // fn#115198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1186, offset: 0x024571d4, size: 113 bytes, params: 2, frame: 15
a0.setTextInputValue('');
const addTag = a0.addTag;
const object = {};
let value = environment.__proto__.__proto__;
const ANSWER = SearchQueryTagTypes.ANSWER;
object.type = ANSWER;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = value.getUserTag;
const binding = env0_0;
object.text = Reflect.apply(getUserTag, value, [binding]);
object.userId = binding.id;
Reflect.apply(addTag, a0, [object]);
a0.restoreDraftTextInputValue();
}
}
}]);
let length = items2.length;
reducibleJoin15: while (true) {
if (length !== 0) {
break reducibleJoin15;
function _fun115199(a0) { // fn#115199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1451, offset: 0x02457245, size: 298 bytes, params: 2, frame: 21
var environment;
var user;
var updateSearchQuery;
const env0_0 = a0;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
var prefixTag = SearchQueryStore.getPrefixTag(searchContext);
if (prefixTag == null) {
return undefined;
}
var moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
var env0_1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
if (channel.isDM()) {
user = UserStore.getUser(channel.getRecipientId());
if (user == null) {
return undefined;
}
env0_1 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115200]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
return undefined;
}
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
updateSearchQuery = value.updateSearchQuery;
searchContextBinding = searchContext;
Reflect.apply(updateSearchQuery, value, [searchContextBinding, _fun115200]);
value = importDefault(9673) /* metro dependency 9673: Tracking */;
value.trackSearchFilterAdd({searchContext: searchContextBinding, searchTokenType: prefixTag.searchTokenType,
location: prefixTag.location});
env0_5();
}
function _fun115200(a0) { // fn#115200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1694, offset: 0x0245736f, size: 112 bytes, params: 2, frame: 16
a0.setTextInputValue('');
const addTag = a0.addTag;
const object = {};
const value = environment.__proto__.__proto__;
const ANSWER = SearchQueryTagTypes.ANSWER;
object.type = ANSWER;
object.text = (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(env0_1);
object.channelId = env0_0;
Reflect.apply(addTag, a0, [object]);
a0.restoreDraftTextInputValue();
}
}
type = mode.type;
FILTER = SearchPopoutModes.FILTER;
if (type === FILTER) {
break reducibleJoin15;
function _fun115201() { // fn#115201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1960, offset: 0x024573df, size: 65 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeSearchQueryState(searchContext, function(a0) {
var object = {isAutocompleteVisible: a0.isAutocompleteVisible(), textInputValue: a0.getTextInputValue()};
var value = a0.getPrefixTag();
var value2 = null;
object.prefixTag = value2 != value ? value : value2;
return object;
}, _fun115203, true);
function _fun115203(a0, a1) { // fn#115203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2153, offset: 0x02457460, size: 93 bytes, params: 3, frame: 15
var value;
var value4;
if (a0.isAutocompleteVisible) {
value = undefined;
if (!(a0.textInputValue === (a1 == null ? value : a1.textInputValue) && a0.prefixTag === (a1 == null ? value : a1.prefixTag))) {
value4 = environment.__proto__;
env1_3(true);
}
}
}
}
length = tokens.length;
property = tokens[length - 1];
if (property == null) {
break reducibleJoin15;
function _fun115204() { // fn#115204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2329, offset: 0x01e44aa8, size: 18 bytes, params: 1, frame: 11
env0_3(false);
}
Token = (require(9681) /* metro dependency 9681: QueryTokenizer */).Token;
prototype = Token.prototype;
value10 = Object.create(prototype, {constructor: {value: Token}});
token = new Token();
value11 = token instanceof Object ? token : value10;
type = value11.type;
ANSWER_USERNAME_FROM = SearchTokenTypes.ANSWER_USERNAME_FROM;
reducibleJoin11: while (true) {
reducibleJoin6: while (true) {
if (type === ANSWER_USERNAME_FROM) {
break reducibleJoin6;
function _fun115205() { // fn#115205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2378, offset: 0x024574bd, size: 681 bytes, params: 1, frame: 24
var environment;
var id;
var r1;
var r5;
var type;
var FILTER;
var property;
var Token;
var value10;
var token;
var value11;
var ANSWER_USERNAME_FROM;
var ANSWER_USERNAME_MENTIONS;
var moduleValue3;
var isValidUserAutocomplete;
var getData;
var value12;
var userStoreBinding;
var getUser;
var value13;
var moduleValue4;
var toSearchListUserItem;
var value14;
var ANSWER_IN;
var moduleValue5;
var isValidChannelAutocomplete;
var value15;
var value16;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value17;
const items2 = [];
let value = environment;
if (env0_2) {
value15 = 0;
value16 = environment.__proto__;
if (value15 < env0_4) {
r5 = value15;
reducibleLoop19: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value17 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value17 < env0_4) {
r5 = value17;
continue reducibleLoop19;
}
break reducibleLoop19;
}
}
return items2;
}
let Set = global.Set;
const value3 = undefined;
const getSearchQueryUserIds = AutocompleteScreenUtilsModule.getSearchQueryUserIds;
const searchContextBinding = searchContext;
const value4 = Reflect.apply(getSearchQueryUserIds, AutocompleteScreenUtilsModule, [searchContextBinding]);
let prototype = Set.prototype;
const value5 = Object.create(prototype, {constructor: {value: Set}});
let set = new Set(value4);
const env0_1 = set instanceof Object ? set : value5;
Set = global.Set;
set = new Set(AutocompleteScreenUtilsModule.getSearchQueryChannelIds(searchContextBinding));
const maybeAddUserItem2 = maybeAddUserItem;
let binding = env0_1;
const autocompletes = binding.autocompletes;
const tokens = binding.tokens;
const mode = binding.mode;
let forEach = autocompletes.forEach;
Reflect.apply(forEach, autocompletes, [function(a0) {
var property = mode.type;
if (property === SearchPopoutModes.FILTER) {
property = a0.results;
var env0_0 = a0.group;
if (property.length !== 0) {
property.forEach(_fun115209);
}
}
}]);
let length = items2.length;
reducibleJoin15: while (true) {
if (length !== 0) {
break reducibleJoin15;
}
type = mode.type;
FILTER = SearchPopoutModes.FILTER;
if (type === FILTER) {
break reducibleJoin15;
}
length = tokens.length;
property = tokens[length - 1];
if (property == null) {
break reducibleJoin15;
}
Token = (require(9681) /* metro dependency 9681: QueryTokenizer */).Token;
prototype = Token.prototype;
value10 = Object.create(prototype, {constructor: {value: Token}});
token = new Token();
value11 = token instanceof Object ? token : value10;
type = value11.type;
ANSWER_USERNAME_FROM = SearchTokenTypes.ANSWER_USERNAME_FROM;
reducibleJoin11: while (true) {
reducibleJoin6: while (true) {
if (type === ANSWER_USERNAME_FROM) {
break reducibleJoin6;
}
type = value11.type;
ANSWER_USERNAME_MENTIONS = SearchTokenTypes.ANSWER_USERNAME_MENTIONS;
if (type !== ANSWER_USERNAME_MENTIONS) {
break reducibleJoin11;
}
break reducibleJoin6;
}
moduleValue3 = require(9676) /* metro dependency 9676: SearchTokens */;
isValidUserAutocomplete = moduleValue3.isValidUserAutocomplete;
if (Reflect.apply(isValidUserAutocomplete, moduleValue3, [value11])) {
getData = value11.getData;
value12 = Reflect.apply(getData, value11, ['userId']);
if (value12 == null) {
break reducibleJoin11;
}
userStoreBinding = UserStore;
getUser = userStoreBinding.getUser;
value13 = Reflect.apply(getUser, userStoreBinding, [value12]);
moduleValue4 = AutocompleteScreenUtilsModule;
toSearchListUserItem = moduleValue4.toSearchListUserItem;
value14 = Reflect.apply(toSearchListUserItem, moduleValue4, [searchContext, value13, env0_7]);
reducibleJoin10: while (true) {
if (value13 == null) {
id = value3;
break reducibleJoin10;
}
id = value13.id;
break reducibleJoin10;
}
maybeAddUserItem2(id, value14);
break reducibleJoin11;
}
break reducibleJoin11;
}
type = value11.type;
ANSWER_USERNAME_MENTIONS = SearchTokenTypes.ANSWER_USERNAME_MENTIONS;
if (type !== ANSWER_USERNAME_MENTIONS) {
break reducibleJoin11;
ANSWER_IN = SearchTokenTypes.ANSWER_IN;
if (type !== ANSWER_IN) {
break reducibleJoin15;
}
break reducibleJoin6;
}
moduleValue3 = require(9676) /* metro dependency 9676: SearchTokens */;
isValidUserAutocomplete = moduleValue3.isValidUserAutocomplete;
if (Reflect.apply(isValidUserAutocomplete, moduleValue3, [value11])) {
getData = value11.getData;
value12 = Reflect.apply(getData, value11, ['userId']);
if (value12 == null) {
break reducibleJoin11;
}
getUser = UserStore.getUser;
value13 = Reflect.apply(getUser, UserStore, [value12]);
moduleValue4 = autocompleteScreenUtilsModule;
toSearchListUserItem = moduleValue4.toSearchListUserItem;
value14 = Reflect.apply(toSearchListUserItem, moduleValue4, [searchContext, value13, env0_7]);
reducibleJoin10: while (true) {
if (value13 == null) {
id = value3;
break reducibleJoin10;
moduleValue5 = require(9676) /* metro dependency 9676: SearchTokens */;
isValidChannelAutocomplete = moduleValue5.isValidChannelAutocomplete;
if (Reflect.apply(isValidChannelAutocomplete, moduleValue5, [value11, searchContext])) {
getData = value11.getData;
value = Reflect.apply(getData, value11, ['channelIds']);
if (value == null) {
break reducibleJoin15;
}
id = value13.id;
break reducibleJoin10;
forEach = value.forEach;
Reflect.apply(forEach, value, [_fun115210]);
break reducibleJoin15;
}
closure(id, value14);
break reducibleJoin11;
}
break reducibleJoin11;
}
type = value11.type;
ANSWER_IN = SearchTokenTypes.ANSWER_IN;
if (type !== ANSWER_IN) {
break reducibleJoin15;
}
moduleValue5 = require(9676) /* metro dependency 9676: SearchTokens */;
isValidChannelAutocomplete = moduleValue5.isValidChannelAutocomplete;
if (Reflect.apply(isValidChannelAutocomplete, moduleValue5, [value11, searchContext])) {
getData = value11.getData;
value = Reflect.apply(getData, value11, ['channelIds']);
if (value == null) {
break reducibleJoin15;
}
forEach = value.forEach;
Reflect.apply(forEach, value, [_fun115210]);
break reducibleJoin15;
reducibleJoin17: while (true) {
if (items2.length > 0) {
r1 = items2;
break reducibleJoin17;
}
binding = env1_16;
r1 = binding;
break reducibleJoin17;
}
return r1;
function maybeAddUserItem(a0, a1) { // fn#115206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2609, offset: 0x02457766, size: 98 bytes, params: 3, frame: 13
var binding;
let value = a1 == null;
let r0 = value || a0 == null;
r0 = !r0 ? env0_1.has(a0) : r0;
if (!r0) {
value = environment.__proto__.__proto__;
value = RelationshipStore.isBlockedOrIgnored(a0);
r0 = value;
}
if (!r0) {
binding = env0_1;
binding.add(a0);
binding = env0_0;
binding.push(a1);
}
}
function maybeAddChannelItem(a0, a1) { // fn#115207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2712, offset: 0x024577c8, size: 77 bytes, params: 3, frame: 13
var binding;
let r0 = a1 == null || a0 == null;
r0 = !r0 ? env0_2.has(a0) : r0;
if (!r0) {
binding = env0_2;
binding.add(a0);
binding = env0_0;
binding.push(a1);
}
}
function _fun115208(a0) { // fn#115208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2822, offset: 0x02457815, size: 82 bytes, params: 2, frame: 12
var results;
var group;
const type = mode.type;
const FILTER = SearchPopoutModes.FILTER;
if (type === FILTER) {
results = a0.results;
group = a0.group;
if (results.length !== 0) {
results.forEach(_fun115209);
}
}
function _fun115209({user, channel, text}) { // fn#115209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2899, offset: 0x02457867, size: 374 bytes, params: 2, frame: 24
var binding;
var push;
var object;
var object2;
var object3;
const value = environment.__proto__.__proto__.__proto__;
maybeAddUserItem(user?.id, AutocompleteScreenUtilsModule.toSearchListUserItem(searchContext, user, env2_7));
maybeAddChannelItem(channel?.id, AutocompleteScreenUtilsModule.toSearchListChannelItem(channel, env2_8));
let groupBinding = group;
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (groupBinding === FILTER_HAS && text != null) {
binding = env1_0;
push = binding.push;
object = {};
object.type = SearchListItemTypes.GENERIC;
object2 = {text: text};
object2.icon = AutocompleteScreenUtilsModule.getSearchFilterHasIcon(text);
object2.onPress = env2_6;
object.props = object2;
Reflect.apply(push, binding, [object]);
}
groupBinding = group;
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (groupBinding === FILTER_AUTHOR_TYPE && text != null) {
binding = env1_0;
push = binding.push;
object = {};
object.type = SearchListItemTypes.GENERIC;
object3 = {text: text};
object3.icon = AutocompleteScreenUtilsModule.getSearchFilterAuthorTypeIcon(text);
object3.onPress = env2_6;
object.props = object3;
Reflect.apply(push, binding, [object]);
}
}
}
function _fun115210(a0) { // fn#115210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:3815, offset: 0x024579dd, size: 92 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(a0);
value = undefined;
maybeAddChannelItem(channel == null ? value : channel.id,
(require(15116) /* metro dependency 15116: AutocompleteScreenUtils */).toSearchListChannelItem(channel, env1_8));
return value;
}
}
break reducibleJoin15;
}
reducibleJoin17: while (true) {
if (items2.length > 0) {
r1 = items2;
break reducibleJoin17;
}
binding = env1_16;
r1 = binding;
break reducibleJoin17;
}
return r1;
}
function _fun115196(a0) { // fn#115196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:856, offset: 0x024570e2, size: 73 bytes, params: 2, frame: 12
a0.setTextInputValue('');
const addTag = a0.addTag;
const ANSWER = SearchQueryTagTypes.ANSWER;
Reflect.apply(addTag, a0, [{type: ANSWER, text: env0_0}]);
a0.restoreDraftTextInputValue();
}
function _fun115198(a0) { // fn#115198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1186, offset: 0x024571d4, size: 113 bytes, params: 2, frame: 15
a0.setTextInputValue('');
const addTag = a0.addTag;
const object2 = {};
let value = environment.__proto__.__proto__;
const ANSWER = SearchQueryTagTypes.ANSWER;
object2.type = ANSWER;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = value.getUserTag;
const binding = env0_0;
object2.text = Reflect.apply(getUserTag, value, [binding]);
object2.userId = binding.id;
Reflect.apply(addTag, a0, [object2]);
a0.restoreDraftTextInputValue();
}
function _fun115200(a0) { // fn#115200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:1694, offset: 0x0245736f, size: 112 bytes, params: 2, frame: 16
a0.setTextInputValue('');
const addTag = a0.addTag;
const object2 = {};
const value = environment.__proto__.__proto__;
const ANSWER = SearchQueryTagTypes.ANSWER;
object2.type = ANSWER;
object2.text = (require(9675) /* metro dependency 9675: SearchUtils */).quoteChannelName(env0_1);
object2.channelId = env0_0;
Reflect.apply(addTag, a0, [object2]);
a0.restoreDraftTextInputValue();
}
function _fun115203(a0, a1) { // fn#115203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2153, offset: 0x02457460, size: 93 bytes, params: 3, frame: 15
var value;
var value4;
if (a0.isAutocompleteVisible) {
value = undefined;
if (!(a0.textInputValue === (a1 == null ? value : a1.textInputValue) && a0.prefixTag === (a1 == null ? value : a1.prefixTag))) {
value4 = environment.__proto__;
env1_3(true);
}
}
}
function maybeAddUserItem(a0, a1) { // fn#115206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2609, offset: 0x02457766, size: 98 bytes, params: 3, frame: 13
var binding;
let value = a1 == null;
let r0 = value || a0 == null;
r0 = !r0 ? env0_1.has(a0) : r0;
if (!r0) {
value = environment.__proto__.__proto__;
value = RelationshipStore.isBlockedOrIgnored(a0);
r0 = value;
}
if (!r0) {
binding = env0_1;
binding.add(a0);
binding = env0_0;
binding.push(a1);
}
}
function maybeAddChannelItem(a0, a1) { // fn#115207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2712, offset: 0x024577c8, size: 77 bytes, params: 3, frame: 13
var binding;
let r0 = a1 == null || a0 == null;
r0 = !r0 ? env0_2.has(a0) : r0;
if (!r0) {
binding = env0_2;
binding.add(a0);
binding = env0_0;
binding.push(a1);
}
}
function _fun115208(a0) { // fn#115208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2822, offset: 0x02457815, size: 82 bytes, params: 2, frame: 12
var results;
var group;
const type = mode.type;
const FILTER = SearchPopoutModes.FILTER;
if (type === FILTER) {
results = a0.results;
group = a0.group;
if (results.length !== 0) {
results.forEach(_fun115209);
}
}
}
function _fun115210(a0) { // fn#115210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:3815, offset: 0x024579dd, size: 92 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(a0);
value = undefined;
maybeAddChannelItem(channel == null ? value : channel.id,
(require(15116) /* metro dependency 15116: AutocompleteScreenUtils */).toSearchListChannelItem(channel, env1_8));
return value;
}
function _fun115209({user, channel, text}) { // fn#115209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15312:2899, offset: 0x02457867, size: 374 bytes, params: 2, frame: 24
var binding;
var push;
var object4;
var object5;
var object6;
const value = environment.__proto__.__proto__.__proto__;
const autocompleteScreenUtilsModule = require(15116) /* metro dependency 15116: AutocompleteScreenUtils */;
maybeAddUserItem(user?.id, autocompleteScreenUtilsModule.toSearchListUserItem(searchContext, user, env2_7));
maybeAddChannelItem(channel?.id, autocompleteScreenUtilsModule.toSearchListChannelItem(channel, env2_8));
let groupBinding = group;
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (groupBinding === FILTER_HAS && text != null) {
binding = env1_0;
push = binding.push;
object4 = {};
object4.type = SearchListItemTypes.GENERIC;
object5 = {text: text};
object5.icon = autocompleteScreenUtilsModule.getSearchFilterHasIcon(text);
object5.onPress = env2_6;
object4.props = object5;
Reflect.apply(push, binding, [object4]);
}
groupBinding = group;
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (groupBinding === FILTER_AUTHOR_TYPE && text != null) {
binding = env1_0;
push = binding.push;
object4 = {};
object4.type = SearchListItemTypes.GENERIC;
object6 = {text: text};
object6.icon = autocompleteScreenUtilsModule.getSearchFilterAuthorTypeIcon(text);
object6.onPress = env2_6;
object4.props = object6;
Reflect.apply(push, binding, [object4]);
}
}
global.__d(_fun115190, 15115, [57, 31, 1379, 3793, 1878, 9677, 9674, 9615, 661, 33, 566, 15040, 11822, 11828, 9673,
3995, 4805, 9675, 15116, 9681, 9676, 15077, 15032, 1244, 15044,
2]) /* metro module 15115, dependencies: [57, 31, 1379, 3793, 1878, 9677, 9674, 9615, 661, 33, 566, 15040, 11822, 11828, 9673, 3995, 4805, 9675, 15116, 9681, 9676, 15077, 15032, 1244, 15044, 2] */;
@@ -1,174 +1,187 @@
/* Metro module 15116; source: modules/search/native/components/layout/autocomplete/AutocompleteScreenUtils.tsx; dependencies: [1945, 3793, 1878, 9674, 9615, 661, 1244, 9600, 4056, 9406, 11098, 9786, 9759, 6697, 10284, 10976, 11441, 9411, 15117, 9675, 3995, 2] */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import RelationshipStore from '../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchUtilsModule from '../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
function _fun115211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:6, offset: 0x02457a39, size: 275 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchListItemTypes;
const env0_8 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/AutocompleteScreenUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/autocomplete/AutocompleteScreenUtils.tsx');
exports.getSearchQueryChannelIds = getSearchQueryChannelIds;
exports.getSearchQueryUserIds = getSearchQueryUserIds;
exports.getSearchFilterHasIcon = getSearchFilterHasIcon;
exports.getSearchFilterAuthorTypeIcon = getSearchFilterAuthorTypeIcon;
exports.toSearchListUserItem = toSearchListUserItem;
exports.toSearchListChannelItem = toSearchListChannelItem;
}
function getSearchQueryChannelIds(a0) { // fn#115212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:336, offset: 0x02457b4c, size: 51 bytes, params: 2, frame: 11
const value = SearchQueryStore.getChannelIds(a0);
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
return set instanceof Object ? set : value2;
}
function getSearchQueryChannelIds(a0) { // fn#115212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:336, offset: 0x02457b4c, size: 51 bytes, params: 2, frame: 11
const value = SearchQueryStore.getChannelIds(a0);
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
return set instanceof Object ? set : value2;
}
function getSearchQueryUserIds(a0) { // fn#115213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:441, offset: 0x02457b7f, size: 109 bytes, params: 2, frame: 13
var Set;
var set;
var value;
const prefixTag = SearchQueryStore.getPrefixTag(a0);
if (prefixTag == null) {
Set = global.Set;
value = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
value = SearchQueryStore.getUserIds(a0, prefixTag.searchTokenType);
Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value3;
}
function getSearchFilterHasIcon(a0) { // fn#115214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:609, offset: 0x02457bec, size: 784 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (Reflect.apply(string, intl, [t.nrpA5E]) === a0) {
return importDefault(9600) /* metro dependency 9600: ForwardingIcon */;
}
string = intl.string;
const ZNR2fi = t.ZNR2fi;
if (Reflect.apply(string, intl, [ZNR2fi]) === a0) {
return (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
}
if (intl.string(t['20uQR3']) === a0) {
return (require(9406) /* metro dependency 9406: EmbedIcon */).EmbedIcon;
}
string = intl.string;
const L4lxyE = t.L4lxyE;
if (Reflect.apply(string, intl, [L4lxyE]) === a0) {
return (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
}
if (intl.string(t['AV/v6i']) === a0) {
return (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
}
string = intl.string;
const XM9XGP = t.XM9XGP;
if (Reflect.apply(string, intl, [XM9XGP]) === a0) {
return (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
}
string = intl.string;
const TNLcpx = t.TNLcpx;
if (Reflect.apply(string, intl, [TNLcpx]) === a0) {
return (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
}
string = intl.string;
const F8Wf0e = t.F8Wf0e;
if (Reflect.apply(string, intl, [F8Wf0e]) === a0) {
return (require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon;
}
string = intl.string;
const PJgX2h = t.PJgX2h;
if (Reflect.apply(string, intl, [PJgX2h]) === a0) {
return (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
}
}
function getSearchFilterAuthorTypeIcon(a0) { // fn#115215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1328, offset: 0x02457efc, size: 268 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (Reflect.apply(string, intl, [t.tPZo4p]) === a0) {
return (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
}
string = intl.string;
const JL7sRS = t.JL7sRS;
if (Reflect.apply(string, intl, [JL7sRS]) === a0) {
return (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
}
string = intl.string;
const WjkIKU = t.WjkIKU;
if (Reflect.apply(string, intl, [WjkIKU]) === a0) {
return (require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon;
}
}
function toSearchListUserItem(a0, a1, a2) { // fn#115216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1628, offset: 0x02458008, size: 196 bytes, params: 4, frame: 18
const guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(a0);
const value3 = null;
if (value3 == a1) {
return value3;
}
let r3 = value3 == guildIdFromSearchContext ? RelationshipStore.getNickname(a1.id) : value3;
r3 = value3 == r3 ? GuildMemberStore.getNick(guildIdFromSearchContext, a1.id) : r3;
r3 = value3 == r3 ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(a1) : r3;
const DM = SearchListItemTypes.DM;
const NONE = RelationshipTypes.NONE;
return {type: DM, props: {type: NONE, user: a1, nickname: r3, onPress: a2}};
}
function toSearchListChannelItem(a0, a1) { // fn#115217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1930, offset: 0x024580cc, size: 275 bytes, params: 3, frame: 18
var r5;
var r1;
var object2;
var user;
var object3;
var value6;
const env0_0 = a0;
const env0_1 = a1;
let value = null;
if (value == a0) {
return value;
}
if (a0.isDM()) {
user = UserStore.getUser(a0.getRecipientId());
if (value == user) {
r1 = value;
} else {
object2 = {};
object2.type = SearchListItemTypes.DM;
object3 = {};
object3.type = RelationshipTypes.NONE;
object3.user = user;
value6 = RelationshipStore.getNickname(user.id);
if (value != value6) {
r5 = value6;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r5 = value;
}
object3.nickname = r5;
object3.onPress = onPress_115218;
object2.props = object3;
r1 = object2;
function getSearchQueryUserIds(a0) { // fn#115213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:441, offset: 0x02457b7f, size: 109 bytes, params: 2, frame: 13
var Set;
var set;
var value;
const prefixTag = SearchQueryStore.getPrefixTag(a0);
if (prefixTag == null) {
Set = global.Set;
value = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
return r1;
value = SearchQueryStore.getUserIds(a0, prefixTag.searchTokenType);
Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value3;
}
value = a0.isGroupDM();
object2 = {};
if (value) {
object2.type = SearchListItemTypes.GROUP_DM;
object2.props = {channel: a0, onPress: a1};
} else {
object2.type = SearchListItemTypes.GUILD_TEXT_CHANNEL;
object2.props = {channel: a0, onPress: a1};
function getSearchFilterHasIcon(a0) { // fn#115214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:609, offset: 0x02457bec, size: 784 bytes, params: 2, frame: 16
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
if (Reflect.apply(string, intl, [t.nrpA5E]) === a0) {
return importDefault(9600) /* metro dependency 9600: ForwardingIcon */;
}
string = intl.string;
const ZNR2fi = t.ZNR2fi;
if (Reflect.apply(string, intl, [ZNR2fi]) === a0) {
return (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
}
if (intl.string(t['20uQR3']) === a0) {
return (require(9406) /* metro dependency 9406: EmbedIcon */).EmbedIcon;
}
string = intl.string;
const L4lxyE = t.L4lxyE;
if (Reflect.apply(string, intl, [L4lxyE]) === a0) {
return (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
}
if (intl.string(t['AV/v6i']) === a0) {
return (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
}
string = intl.string;
const XM9XGP = t.XM9XGP;
if (Reflect.apply(string, intl, [XM9XGP]) === a0) {
return (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
}
string = intl.string;
const TNLcpx = t.TNLcpx;
if (Reflect.apply(string, intl, [TNLcpx]) === a0) {
return (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
}
string = intl.string;
const F8Wf0e = t.F8Wf0e;
if (Reflect.apply(string, intl, [F8Wf0e]) === a0) {
return (require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon;
}
string = intl.string;
const PJgX2h = t.PJgX2h;
if (Reflect.apply(string, intl, [PJgX2h]) === a0) {
return (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
}
}
return object2;
function getSearchFilterAuthorTypeIcon(a0) { // fn#115215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1328, offset: 0x02457efc, size: 268 bytes, params: 2, frame: 16
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
if (Reflect.apply(string, intl, [t.tPZo4p]) === a0) {
return (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
}
string = intl.string;
const JL7sRS = t.JL7sRS;
if (Reflect.apply(string, intl, [JL7sRS]) === a0) {
return (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
}
string = intl.string;
const WjkIKU = t.WjkIKU;
if (Reflect.apply(string, intl, [WjkIKU]) === a0) {
return (require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon;
}
}
function toSearchListUserItem(a0, a1, a2) { // fn#115216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1628, offset: 0x02458008, size: 196 bytes, params: 4, frame: 18
const guildIdFromSearchContext = (SearchUtilsModule).getGuildIdFromSearchContext(a0);
const value3 = null;
if (value3 == a1) {
return value3;
}
let r3 = value3 == guildIdFromSearchContext ? RelationshipStore.getNickname(a1.id) : value3;
r3 = value3 == r3 ? GuildMemberStore.getNick(guildIdFromSearchContext, a1.id) : r3;
r3 = value3 == r3 ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(a1) : r3;
const DM = SearchListItemTypes.DM;
const NONE = RelationshipTypes.NONE;
return {type: DM, props: {type: NONE, user: a1, nickname: r3, onPress: a2}};
}
function toSearchListChannelItem(a0, a1) { // fn#115217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:1930, offset: 0x024580cc, size: 275 bytes, params: 3, frame: 18
var r5;
var r1;
var object;
var user;
var object4;
var relationshipStoreBinding;
var value6;
const env0_0 = a0;
const env0_1 = a1;
let value = null;
if (value == a0) {
return value;
}
if (a0.isDM()) {
user = UserStore.getUser(a0.getRecipientId());
if (value == user) {
r1 = value;
} else {
object = {};
object.type = SearchListItemTypes.DM;
object4 = {};
object4.type = RelationshipTypes.NONE;
object4.user = user;
relationshipStoreBinding = RelationshipStore;
value6 = relationshipStoreBinding.getNickname(user.id);
if (value != value6) {
r5 = value6;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r5 = value;
}
object4.nickname = r5;
object4.onPress = onPress_115218;
object.props = object4;
r1 = object;
}
return r1;
}
value = a0.isGroupDM();
object = {};
if (value) {
object.type = SearchListItemTypes.GROUP_DM;
object.props = {channel: a0, onPress: a1};
} else {
object.type = SearchListItemTypes.GUILD_TEXT_CHANNEL;
object.props = {channel: a0, onPress: a1};
}
return object;
function toSearchListChannelItemOnPress() { // fn#115218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15313:2172, owner: toSearchListChannelItem.onPress, offset: 0x024581df, size: 25 bytes, params: 1, frame: 11
return require(env0_0.id);
}
}
}
global.__d(_fun115211, 15116, [1945, 3793, 1878, 9674, 9615, 661, 1244, 9600, 4056, 9406, 11098, 9786, 9759, 6697,
10284, 10976, 11441, 9411, 15117, 9675, 3995,
2]) /* metro module 15116, dependencies: [1945, 3793, 1878, 9674, 9615, 661, 1244, 9600, 4056, 9406, 11098, 9786, 9759, 6697, 10284, 10976, 11441, 9411, 15117, 9675, 3995, 2] */;
@@ -1,60 +1,71 @@
/* Metro module 15029; source: modules/search/native/components/layout/autocomplete/SearchFilterButton.tsx; dependencies: [31, 9614, 33, 15028, 15023, 1357, 8811, 1244, 8341, 13512, 2] */
import MobileVisualRefreshExperiment from '../../../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as IconButtonNativeModule from '../../../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as ContextMenuNativeModule from '../../../../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
import * as TrackingConstantsModule from '../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as FiltersHorizontalIconModule from '../../../../../../design/components/Icon/native/redesign/generated/FiltersHorizontalIcon.tsx'; /* Metro dependency 13512 */
import * as UseValidFilterTokensModule from '../../../../tokens/hooks/useValidFilterTokens.tsx'; /* Metro dependency 15028 */
function _fun113661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:6, offset: 0x02402804, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun113662);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterButton.tsx');
exports.default = value;
function _fun113662({searchContext}) { // fn#113662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:165, offset: 0x024028b2, size: 239 bytes, params: 2, frame: 19
const value3 = env0_3.useMemo(_fun113663, [searchContext,
(UseValidFilterTokensModule).useValidOrderedFilterTokens(searchContext)]);
const env0_2 = (MobileVisualRefreshExperiment)('SearchFilterButton');
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
const intl = (IndexNativeModule).intl;
return (
<ContextMenu
items={value3}
align="below"
title={intl.string((IndexNativeModule).t.oYEmhB)}
keyboardShouldPersistTaps="handled"
>
{children_113665}
</ContextMenu>
);
function _fun113663() { // fn#113663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:251, offset: 0x024029a1, size: 28 bytes, params: 1, frame: 11
return env0_1.map(function(a0) {
var object = {};
var moduleValue = require(dependencyMap[4]);
var searchContextBinding = searchContext;
object.label = moduleValue.getSearchTokenLabel(searchContextBinding, a0);
object.IconComponent = require(dependencyMap[4]).getSearchTokenIcon(a0);
object.action = require(dependencyMap[4]).getSearchTokenPressHandler(searchContextBinding, a0,
SearchFilterAddLocations.CONTEXT_MENU);
return object;
});
}
function children_113665(a0) { // fn#113665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:597, offset: 0x02402a30, size: 242 bytes, params: 2, frame: 20
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['variant'] = 'tertiary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kP6oFy);
iconButtonProps['size'] = env0_2 ? 'md' : 'sm';
const FiltersHorizontalIcon = (FiltersHorizontalIconModule).FiltersHorizontalIcon;
iconButtonProps['icon'] = <FiltersHorizontalIcon size="sm" color="redesign-button-tertiary-text" />;
return <IconButton {...iconButtonProps} />;
}
}
}
function _fun113662({searchContext}) { // fn#113662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:165, offset: 0x024028b2, size: 239 bytes, params: 2, frame: 19
const value3 = env0_3.useMemo(_fun113663, [searchContext,
(require(15028) /* metro dependency 15028: useValidFilterTokens */).useValidOrderedFilterTokens(searchContext)]);
const env0_2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SearchFilterButton');
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ContextMenu
items={value3}
align="below"
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oYEmhB)}
keyboardShouldPersistTaps="handled"
>
{children_113665}
</ContextMenu>
);
}
function _fun113663() { // fn#113663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:251, offset: 0x024029a1, size: 28 bytes, params: 1, frame: 11
return env0_1.map(function(a0) {
var object = {};
var moduleValue = require(dependencyMap[4]);
var searchContextBinding = searchContext;
object.label = moduleValue.getSearchTokenLabel(searchContextBinding, a0);
object.IconComponent = require(dependencyMap[4]).getSearchTokenIcon(a0);
object.action = require(dependencyMap[4]).getSearchTokenPressHandler(searchContextBinding, a0,
SearchFilterAddLocations.CONTEXT_MENU);
return object;
});
}
function children_113665(a0) { // fn#113665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15226:597, offset: 0x02402a30, size: 242 bytes, params: 2, frame: 20
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['variant'] = 'tertiary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kP6oFy);
iconButtonProps['size'] = env0_2 ? 'md' : 'sm';
const FiltersHorizontalIcon = (require(13512) /* metro dependency 13512: FiltersHorizontalIcon */).FiltersHorizontalIcon;
iconButtonProps['icon'] = <FiltersHorizontalIcon size="sm" color="redesign-button-tertiary-text" />;
return <IconButton {...iconButtonProps} />;
}
global.__d(_fun113661, 15029, [31, 9614, 33, 15028, 15023, 1357, 8811, 1244, 8341, 13512,
2]) /* metro module 15029, dependencies: [31, 9614, 33, 15028, 15023, 1357, 8811, 1244, 8341, 13512, 2] */;
@@ -1,4 +1,21 @@
/* Metro module 15022; source: modules/search/native/components/layout/autocomplete/SearchFilterSuggestions.tsx; dependencies: [57, 31, 27, 9614, 33, 4501, 697, 15023, 6238, 4573, 4017, 4577, 4581, 4508, 15028, 11822, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as TableRowNativeModule from '../../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TrackingConstantsModule from '../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchFilterUtilsModule from './SearchFilterUtils.tsx'; /* Metro dependency 15023 */
import * as UseValidFilterTokensModule from '../../../../tokens/hooks/useValidFilterTokens.tsx'; /* Metro dependency 15028 */
function _fun113608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:6, offset: 0x02400b33, size: 460 bytes, params: 8, frame: 24
const env0_0 = require;
const getSuggestionsKey = function(a0) {
@@ -6,313 +23,320 @@ function _fun113608(global, require, importDefault, importAll, module, exports,
};
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 env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object3.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderColor = BORDER_SUBTLE;
object3.borderWidth = 1;
object2.borderColor = BORDER_SUBTLE;
object2.borderWidth = 1;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object3, SHADOW_LOW, undefined);
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{card: object3}]);
copyDataProperties(object2, SHADOW_LOW, undefined);
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{card: object2}]);
object = {code: "function SearchFilterSuggestionsTsx1(){const{withSpring,opacity,springStandard,state,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}),transform:[{translateY:withSpring(opacity.get()===1?0:-15,springStandard)}]};}"};
object = {code: 'function SearchFilterSuggestionsTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
const env0_11 = [];
object = {code: 'function SearchFilterSuggestionsTsx3(){const{dismissed}=this.__closure;return dismissed.get();}'};
object = {code: 'function SearchFilterSuggestionsTsx4(isDismissed){const{runOnJS,setSuggestions,EMPTY_SEARCH_FILTER_ROWS}=this.__closure;if(isDismissed){runOnJS(setSuggestions)(EMPTY_SEARCH_FILTER_ROWS);}}'};
value = value.memo(SearchFilterSuggestions);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterSuggestions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterSuggestions.tsx');
exports.default = value;
}
function SearchFilterPrefixRow(a0) { // fn#113609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:386, offset: 0x02400cff, size: 279 bytes, params: 2, frame: 22
const text = a0.text;
const searchTokenType = a0.searchTokenType;
const onPress = a0.onPress;
const object2 = {'text': 0, 'searchTokenType': 0, 'onPress': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const value3 = env0_4.useMemo(_fun113610, [searchTokenType]);
const value4 = env0_4.useMemo(_fun113611, [searchTokenType]);
const value5 = env0_4.useCallback(function() {
onPress(text);
}, [onPress, text]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<TableRow
icon={value3}
onPress={value5}
label={<Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{text}</Text>}
subLabel={value4}
{...value}
/>
);
}
function getSuggestionsKey(a0) { // fn#113613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:827, offset: 0x02400e8d, size: 40 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.text;
}).join(' ');
}
function AnimatedEnterExitContainer({children, state, cleanUp}) { // fn#113615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1481, offset: 0x02400eb5, size: 304 bytes, params: 2, frame: 24
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = AnimatedEnterExitContainerL;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value2;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 334512108462;
closure.__initData = env0_9;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
env0_4.useEffect(_fun113618, [value2, state]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={value3}>
{children}
</View>
);
}
function SearchFilterSuggestions({searchContext, onLayoutMeasure, containerStyle, dismissed}) { // fn#113619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2715, offset: 0x024011ae, size: 545 bytes, params: 2, frame: 25
const env0_3 = dismissed;
const styles = useStyles();
const env0_4 = styles;
const value2 = (require(15028) /* metro dependency 15028: useValidFilterTokens */).useValidFilterTokens(searchContext);
const [property, property2] = env0_3(env0_4.useState([]), 2);
env0_4.useEffect(_fun113620, [value2, searchContext, property2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return dismissed.get();
};
closure.__closure = {dismissed: dismissed};
closure.__workletHash = 17191989548971;
closure.__initData = env0_12;
const closure2 = SearchFilterSuggestionsE;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setSuggestions: property2,
EMPTY_SEARCH_FILTER_ROWS: env0_11};
closure2.__workletHash = 8991360021943;
closure2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value5 = env0_4.useMemo(function() {
return [styles.card, containerStyle];
}, [containerStyle, styles.card]);
const env0_9 = env0_4.useRef(null);
const value6 = env0_4.useCallback(function() {
global.setTimeout(_fun113629);
}, [onLayoutMeasure]);
const value7 = env0_4.useMemo(_fun113631, [property]);
const value8 = env0_4.useCallback(_fun113632, [value5, value6]);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={value7}
renderItem={value8}
getItemKey={getSuggestionsKey}
/>
);
}
function _fun113610() { // fn#113610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:477, offset: 0x02400e16, size: 74 bytes, params: 1, frame: 15
const value = environment.__proto__;
const searchTokenIcon = (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchTokenIcon(searchTokenType);
const value4 = null;
return value4 != searchTokenIcon ? ((Component) => <Component size="sm" />)(searchTokenIcon) : value4;
}
function _fun113611() { // fn#113611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:575, offset: 0x02400e60, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchTokenSubLabel(searchTokenType);
}
function AnimatedEnterExitContainerL() { // fn#113616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1616, owner: AnimatedEnterExitContainer.l, offset: 0x02400fe5, size: 281 bytes, params: 1, frame: 27
const object4 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_2;
const value3 = binding.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = lT;
const object5 = {};
object5.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object5.TransitionStates = TransitionStates;
object5.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object5.cleanUp = cleanUp;
closure.__closure = object5;
closure.__workletHash = 10696166249954;
closure.__initData = env1_10;
object4.opacity = Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure]);
const object6 = {};
const moduleValue2 = springModule;
object6.translateY = moduleValue2.withSpring(binding.get() !== 1 ? -15 : 0, springStandard);
object4.transform = [object6];
return object4;
}
function _fun113618() { // fn#113618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2285, offset: 0x02401169, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
function _fun113620() { // fn#113620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2916, offset: 0x024013cf, size: 63 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeSearchQueryState(searchContext, function(a0) {
return {textInputValue: a0.getTextInputValue(), isAutocompleteVisible: a0.isAutocompleteVisible()};
}, _fun113622);
}
function SearchFilterSuggestionsE(a0) { // fn#113626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3609, owner: SearchFilterSuggestions.E, offset: 0x024015ab, size: 61 bytes, params: 2, frame: 13
var value;
if (a0) {
value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_7)(env1_11);
}
}
function _fun113628() { // fn#113628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3858, offset: 0x02401607, size: 26 bytes, params: 1, frame: 11
global.setTimeout(_fun113629);
}
function _fun113631() { // fn#113631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3999, offset: 0x02401681, size: 41 bytes, params: 1, frame: 3
return env0_6.length > 0 ? [env0_6] : [];
}
function _fun113632(a0, a1, a2, a3) { // fn#113632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:4044, offset: 0x024016aa, size: 123 bytes, params: 5, frame: 19
return (
<AnimatedEnterExitContainer
state={a2}
cleanUp={a3}
key={a0}
>
<View
ref={env0_9}
style={env0_8}
collapsable={false}
onLayout={env0_10}
>
{a1.map(_fun113633)}
</View>
</AnimatedEnterExitContainer>
);
}
function lT(a0) { // fn#113617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1717, owner: AnimatedEnterExitContainer.l.t, offset: 0x024010fe, 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 _fun113622({textInputValue, isAutocompleteVisible}) { // fn#113622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3059, offset: 0x02401433, size: 178 bytes, params: 2, frame: 14
var environment;
var searchFilterSuggestions;
var value3;
var binding;
let value = textInputValue.trim();
if (value === '') {
value = environment.__proto__;
binding = env1_7;
value = environment.__proto__.__proto__;
binding(env2_11);
} else if (isAutocompleteVisible) {
value = environment.__proto__;
binding = env1_7;
value = environment.__proto__.__proto__;
binding(env2_11);
} else {
value = environment.__proto__.__proto__;
searchFilterSuggestions = (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchFilterSuggestions(textInputValue);
if (searchFilterSuggestions.length !== 0) {
var env0_1 = [];
searchFilterSuggestions.forEach(_fun113623);
value = environment.__proto__;
env1_7(_fun113624);
} else {
value3 = environment.__proto__;
env1_7(env2_11);
function SearchFilterPrefixRow(a0) { // fn#113609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:386, offset: 0x02400cff, size: 279 bytes, params: 2, frame: 22
const text = a0.text;
const searchTokenType = a0.searchTokenType;
const onPress = a0.onPress;
const object = {'text': 0, 'searchTokenType': 0, 'onPress': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const value3 = env0_4.useMemo(_fun113610, [searchTokenType]);
const value4 = env0_4.useMemo(_fun113611, [searchTokenType]);
const value5 = env0_4.useCallback(function() {
onPress(text);
}, [onPress, text]);
const TableRow = (TableRowNativeModule).TableRow;
const Text = (TextModule).Text;
return (
<TableRow
icon={value3}
onPress={value5}
label={<Text
lineClamp={1}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{text}
</Text>}
subLabel={value4}
{...value}
/>
);
function _fun113610() { // fn#113610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:477, offset: 0x02400e16, size: 74 bytes, params: 1, frame: 15
const value = environment.__proto__;
const searchTokenIcon = (SearchFilterUtilsModule).getSearchTokenIcon(searchTokenType);
const value4 = null;
return (
value4 != searchTokenIcon
? ((Component) => <Component size="sm" />)(searchTokenIcon)
: value4
);
}
function _fun113611() { // fn#113611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:575, offset: 0x02400e60, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (SearchFilterUtilsModule).getSearchTokenSubLabel(searchTokenType);
}
}
}
function _fun113629() { // fn#113629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3875, offset: 0x02401621, size: 42 bytes, params: 1, frame: 11
const current = env1_9.current;
if (current != null) {
current.measure(function(a0, a1, a2, a3, a4, a5) {
onLayoutMeasure({top: a5, bottom: a5 + a3, left: a4, right: a4 + a2});
});
function getSuggestionsKey(a0) { // fn#113613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:827, offset: 0x02400e8d, size: 40 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.text;
}).join(' ');
}
}
function _fun113633(a0) { // fn#113633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:4173, offset: 0x02401725, size: 42 bytes, params: 2, frame: 15
return <SearchFilterPrefixRow {...a0} key={a0.text} />;
}
function AnimatedEnterExitContainer({children, state, cleanUp}) { // fn#113615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1481, offset: 0x02400eb5, size: 304 bytes, params: 2, frame: 24
const value2 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const AnimatedEnterExitContainerL2 = AnimatedEnterExitContainerL;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.opacity = value2;
object.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object.state = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
AnimatedEnterExitContainerL2.__closure = object;
AnimatedEnterExitContainerL2.__workletHash = 334512108462;
AnimatedEnterExitContainerL2.__initData = env0_9;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [AnimatedEnterExitContainerL2]);
env0_4.useEffect(_fun113618, [value2, state]);
const View = (ReanimatedRexport).View;
return (
<View style={value3}>
{children}
</View>
);
function AnimatedEnterExitContainerL() { // fn#113616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1616, owner: AnimatedEnterExitContainer.l, offset: 0x02400fe5, size: 281 bytes, params: 1, frame: 27
const object = {};
const withSpring = SpringModule.withSpring;
const binding = env0_2;
const value3 = binding.get();
const springStandard = (SpringPresetsModule).springStandard;
const lT2 = lT;
const object2 = {};
object2.state = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.cleanUp = cleanUp;
lT2.__closure = object2;
lT2.__workletHash = 10696166249954;
lT2.__initData = env1_10;
object.opacity = Reflect.apply(withSpring, SpringModule, [value3, springStandard, 'respect-motion-settings', lT2]);
const object3 = {};
object3.translateY = SpringModule.withSpring(binding.get() !== 1 ? -15 : 0, springStandard);
object.transform = [object3];
return object;
function lT(a0) { // fn#113617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:1717, owner: AnimatedEnterExitContainer.l.t, offset: 0x024010fe, 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 _fun113618() { // fn#113618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2285, offset: 0x02401169, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
function _fun113623({text, token}, a1) { // fn#113623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3223, offset: 0x024014e5, size: 159 bytes, params: 3, frame: 19
var push;
var object2;
var value3;
var moduleValue;
let binding = env2_5;
if (binding.has(token)) {
binding = env0_1;
push = binding.push;
object2 = {text: text, searchTokenType: token, start: a1 === 0};
object2.end = a1 === env0_0.length - 1;
value3 = environment.__proto__.__proto__.__proto__;
moduleValue = require(15023) /* metro dependency 15023: SearchFilterUtils */;
object2.onPress = moduleValue.getSearchTokenPressHandler(searchContext, token,
SearchFilterAddLocations.SEARCH_INPUT_DROPDOWN);
Reflect.apply(push, binding, [object2]);
}
function SearchFilterSuggestions({searchContext, onLayoutMeasure, containerStyle, dismissed}) { // fn#113619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2715, offset: 0x024011ae, size: 545 bytes, params: 2, frame: 25
const dismissed2 = dismissed;
const styles = useStyles();
const styles2 = styles;
const value2 = (UseValidFilterTokensModule).useValidFilterTokens(searchContext);
const [property, property2] = dismissed2(styles2.useState([]), 2);
styles2.useEffect(_fun113620, [value2, searchContext, property2]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return dismissed.get();
};
closure.__closure = {dismissed: dismissed};
closure.__workletHash = 17191989548971;
closure.__initData = env0_12;
const SearchFilterSuggestionsE2 = SearchFilterSuggestionsE;
SearchFilterSuggestionsE2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, setSuggestions: property2,
EMPTY_SEARCH_FILTER_ROWS: env0_11};
SearchFilterSuggestionsE2.__workletHash = 8991360021943;
SearchFilterSuggestionsE2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, SearchFilterSuggestionsE2]);
const value5 = styles2.useMemo(function() {
return [styles.card, containerStyle];
}, [containerStyle, styles.card]);
const env0_9 = styles2.useRef(null);
const value6 = styles2.useCallback(function() {
global.setTimeout(_fun113629);
}, [onLayoutMeasure]);
const value7 = styles2.useMemo(_fun113631, [property]);
const value8 = styles2.useCallback(_fun113632, [value5, value6]);
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<TransitionGroup
items={value7}
renderItem={value8}
getItemKey={getSuggestionsKey}
/>
);
function _fun113620() { // fn#113620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:2916, offset: 0x024013cf, size: 63 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeSearchQueryState(searchContext, function(a0) {
return {textInputValue: a0.getTextInputValue(), isAutocompleteVisible: a0.isAutocompleteVisible()};
}, _fun113622);
function _fun113622({textInputValue, isAutocompleteVisible}) { // fn#113622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3059, offset: 0x02401433, size: 178 bytes, params: 2, frame: 14
var environment;
var searchFilterSuggestions;
var value3;
var binding;
let value = textInputValue.trim();
if (value === '') {
value = environment.__proto__;
binding = env1_7;
value = environment.__proto__.__proto__;
binding(env2_11);
} else if (isAutocompleteVisible) {
value = environment.__proto__;
binding = env1_7;
value = environment.__proto__.__proto__;
binding(env2_11);
} else {
value = environment.__proto__.__proto__;
searchFilterSuggestions = (require(15023) /* metro dependency 15023: SearchFilterUtils */).getSearchFilterSuggestions(textInputValue);
if (searchFilterSuggestions.length !== 0) {
var env0_1 = [];
searchFilterSuggestions.forEach(_fun113623);
value = environment.__proto__;
env1_7(_fun113624);
} else {
value3 = environment.__proto__;
env1_7(env2_11);
}
}
function _fun113623({text, token}, a1) { // fn#113623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3223, offset: 0x024014e5, size: 159 bytes, params: 3, frame: 19
var push;
var object;
var value3;
var moduleValue;
let binding = env2_5;
if (binding.has(token)) {
binding = env0_1;
push = binding.push;
object = {text: text, searchTokenType: token, start: a1 === 0};
object.end = a1 === env0_0.length - 1;
value3 = environment.__proto__.__proto__.__proto__;
moduleValue = require(15023) /* metro dependency 15023: SearchFilterUtils */;
object.onPress = moduleValue.getSearchTokenPressHandler(searchContext, token,
SearchFilterAddLocations.SEARCH_INPUT_DROPDOWN);
Reflect.apply(push, binding, [object]);
}
}
function _fun113624(a0) { // fn#113624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3400, offset: 0x02401584, size: 39 bytes, params: 2, frame: 14
const value = a0;
const getSuggestionsKeyBinding = getSuggestionsKey;
return getSuggestionsKeyBinding(value) === getSuggestionsKeyBinding(env0_1) ? value : env0_1;
}
}
}
function SearchFilterSuggestionsE(a0) { // fn#113626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3609, owner: SearchFilterSuggestions.E, offset: 0x024015ab, size: 61 bytes, params: 2, frame: 13
var value;
if (a0) {
value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(JsxRuntimeModule.jsx)(env1_11);
}
}
function _fun113628() { // fn#113628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3858, offset: 0x02401607, size: 26 bytes, params: 1, frame: 11
global.setTimeout(_fun113629);
function _fun113629() { // fn#113629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3875, offset: 0x02401621, size: 42 bytes, params: 1, frame: 11
const current = env1_9.current;
if (current != null) {
current.measure(function(a0, a1, a2, a3, a4, a5) {
onLayoutMeasure({top: a5, bottom: a5 + a3, left: a4, right: a4 + a2});
});
}
}
}
function _fun113631() { // fn#113631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3999, offset: 0x02401681, size: 41 bytes, params: 1, frame: 3
return TrackingConstantsModule.SearchFilterAddLocations.length > 0 ? [TrackingConstantsModule.SearchFilterAddLocations] : [];
}
function _fun113632(a0, a1, a2, a3) { // fn#113632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:4044, offset: 0x024016aa, size: 123 bytes, params: 5, frame: 19
return (
<AnimatedEnterExitContainer
state={a2}
cleanUp={a3}
key={a0}
>
<View
ref={env0_9}
style={env0_8}
collapsable={false}
onLayout={env0_10}
>
{a1.map(_fun113633)}
</View>
</AnimatedEnterExitContainer>
);
function _fun113633(a0) { // fn#113633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:4173, offset: 0x02401725, size: 42 bytes, params: 2, frame: 15
return <SearchFilterPrefixRow {...a0} key={a0.text} />;
}
}
}
}
function _fun113624(a0) { // fn#113624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:3400, offset: 0x02401584, size: 39 bytes, params: 2, frame: 14
const value = a0;
const getSuggestionsKeyBinding = getSuggestionsKey;
return getSuggestionsKeyBinding(value) === getSuggestionsKeyBinding(env0_1) ? value : env0_1;
function _fun113614(a0) { // fn#113614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15219:871, offset: 0x00d84dc1, size: 10 bytes, params: 2, frame: 1
return a0.text;
}
global.__d(_fun113608, 15022, [57, 31, 27, 9614, 33, 4501, 697, 15023, 6238, 4573, 4017, 4577, 4581, 4508, 15028,
11822,
2]) /* metro module 15022, dependencies: [57, 31, 27, 9614, 33, 4501, 697, 15023, 6238, 4573, 4017, 4577, 4581, 4508, 15028, 11822, 2] */;
@@ -1,304 +1,315 @@
/* Metro module 15023; source: modules/search/native/components/layout/autocomplete/SearchFilterUtils.tsx; dependencies: [9615, 9614, 661, 1244, 11441, 9786, 12376, 6700, 9133, 15024, 15026, 9411, 9676, 11828, 11822, 4080, 9066, 1962, 9673, 2] */
import Tracking from '../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchTokens from '../../../../tokens/SearchTokens.tsx'; /* Metro dependency 9676 */
import SearchPlatformUtils from '../../../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TrackingConstantsModule from '../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchTokensModule from '../../../../tokens/SearchTokens.tsx'; /* Metro dependency 9676 */
import * as SearchPlatformUtilsModule from '../../../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
function _fun113634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:6, offset: 0x0240174f, size: 261 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(9615) /* metro dependency 9615: SearchConstants */;
let value = SearchConstantsModule;
const env0_3 = value.EMPTY_SEARCH_QUERY_STRING;
const env0_4 = value.SearchQueryTagTypes;
const env0_5 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
value = require(661) /* metro dependency 661: Constants */;
const env0_6 = value.SEARCH_DATE_FORMAT;
const env0_7 = value.SearchTokenTypes;
const env0_8 = value.SearchTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/autocomplete/SearchFilterUtils.tsx');
exports.getSearchTokenLabel = getSearchTokenLabel;
exports.getSearchTokenSubLabel = getSearchTokenSubLabel;
exports.getSearchTokenIcon = getSearchTokenIcon;
exports.getSearchTokenPressHandler = getSearchTokenPressHandler;
exports.getSearchFilterSuggestions = getSearchFilterSuggestions;
}
function getSearchTokenText(a0) { // fn#113635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:265, offset: 0x02401854, size: 111 bytes, params: 2, frame: 17
var r3;
const value2 = undefined;
const property = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0];
if (property != null) {
r3 = property;
} else {
(require(9676) /* metro dependency 9676: SearchTokens */).rebuildSearchTokenConfigs();
r3 = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0];
}
return (r3 == null ? value2 : r3.key) ?? a0.toString();
}
function getSearchTokenText(a0) { // fn#113635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:265, offset: 0x02401854, size: 111 bytes, params: 2, frame: 17
var r3;
const value2 = undefined;
const property = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0];
if (property != null) {
r3 = property;
} else {
(require(9676) /* metro dependency 9676: SearchTokens */).rebuildSearchTokenConfigs();
r3 = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0];
function getSearchTokenLabel(a0, a1) { // fn#113636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:568, offset: 0x024018c3, size: 762 bytes, params: 3, frame: 16
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a1) {
return intl.string(t['6iuVMn']);
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a1) {
return intl.string(t.DMAzx8);
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a1) {
return intl.string(t.CMKzQx);
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a1) {
return a0.type === SearchTypes.DMS ? intl.string(t['8Fmo42']) : intl.string(t.cdPmq8);
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a1) {
return intl.string(t.h4qGfp);
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a1) {
return intl.string(t.c9qSBR);
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a1) {
return intl.string(t.hcMwDW);
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a1) {
return intl.string(t.C4r6xL);
}
const Error = global.Error;
const value = '[getSearchTokenLabel] Unhandled search token type: ' + a1;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
return (r3 == null ? value2 : r3.key) ?? a0.toString();
}
function getSearchTokenLabel(a0, a1) { // fn#113636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:568, offset: 0x024018c3, size: 762 bytes, params: 3, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a1) {
return intl.string(t['6iuVMn']);
function getSearchTokenSubLabel(a0) { // fn#113637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:1302, offset: 0x02401bbd, size: 679 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a0) {
return intl.string(t.kkGlww);
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a0) {
return intl.string(t.gUfZa2);
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a0) {
return intl.string(t.qDUdlT);
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a0) {
return intl.string(t.ILtwK5);
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a0) {
return intl.string(t.t8bWvr);
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a0) {
return intl.string(t.YEN3uU);
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a0) {
return intl.string(t.hwbB7s);
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a0) {
return intl.string(t.tJPdhZ);
}
const Error = global.Error;
const value = '[getSearchTokenSubLabel] Unhandled search token type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a1) {
return intl.string(t.DMAzx8);
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a1) {
return intl.string(t.CMKzQx);
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a1) {
return a0.type === SearchTypes.DMS ? intl.string(t['8Fmo42']) : intl.string(t.cdPmq8);
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a1) {
return intl.string(t.h4qGfp);
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a1) {
return intl.string(t.c9qSBR);
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a1) {
return intl.string(t.hcMwDW);
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a1) {
return intl.string(t.C4r6xL);
}
const Error = global.Error;
const value = '[getSearchTokenLabel] Unhandled search token type: ' + a1;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchTokenSubLabel(a0) { // fn#113637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:1302, offset: 0x02401bbd, size: 679 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a0) {
return intl.string(t.kkGlww);
function getSearchTokenIcon(a0) { // fn#113638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:1977, offset: 0x02401e64, size: 428 bytes, params: 2, frame: 13
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a0) {
return (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a0) {
return (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a0) {
return (require(12376) /* metro dependency 12376: ChannelListMagnifyingGlassIcon */).ChannelListMagnifyingGlassIcon;
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a0) {
return (require(6700) /* metro dependency 6700: AtIcon */).AtIcon;
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a0) {
return (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a0) {
return (require(15024) /* metro dependency 15024: CalendarMinusIcon */).CalendarMinusIcon;
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a0) {
return (require(15026) /* metro dependency 15026: CalendarPlusIcon */).CalendarPlusIcon;
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a0) {
return (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
}
const Error = global.Error;
const value = '[getSearchTokenIcon] Unhandled search token type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a0) {
return intl.string(t.gUfZa2);
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a0) {
return intl.string(t.qDUdlT);
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a0) {
return intl.string(t.ILtwK5);
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a0) {
return intl.string(t.t8bWvr);
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a0) {
return intl.string(t.YEN3uU);
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a0) {
return intl.string(t.hwbB7s);
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a0) {
return intl.string(t.tJPdhZ);
}
const Error = global.Error;
const value = '[getSearchTokenSubLabel] Unhandled search token type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchTokenIcon(a0) { // fn#113638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:1977, offset: 0x02401e64, size: 428 bytes, params: 2, frame: 13
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a0) {
return (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a0) {
return (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a0) {
return (require(12376) /* metro dependency 12376: ChannelListMagnifyingGlassIcon */).ChannelListMagnifyingGlassIcon;
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a0) {
return (require(6700) /* metro dependency 6700: AtIcon */).AtIcon;
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a0) {
return (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a0) {
return (require(15024) /* metro dependency 15024: CalendarMinusIcon */).CalendarMinusIcon;
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a0) {
return (require(15026) /* metro dependency 15026: CalendarPlusIcon */).CalendarPlusIcon;
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a0) {
return (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
}
const Error = global.Error;
const value = '[getSearchTokenIcon] Unhandled search token type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getSearchTokenPressHandler(a0, a1, a2) { // fn#113639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2534, offset: 0x02402010, size: 217 bytes, params: 4, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a1) {
return _fun113640;
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a1) {
return _fun113640;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a1) {
return _fun113640;
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a1) {
return _fun113640;
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a1) {
return _fun113640;
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a1) {
return _fun113643;
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a1) {
return _fun113643;
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a1) {
return _fun113643;
}
const Error = global.Error;
const value = '[getSearchTokenPressHandler] Unhandled search token type: ' + a1;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
function _fun113640() { // fn#113640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2696, offset: 0x024020e9, size: 35 bytes, params: 1, frame: 15
handleSearchTokenPress(env0_0, require, importDefault);
function handleSearchTokenPress(a0, a1, a2) { // fn#113641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2700, offset: 0x0240210c, size: 88 bytes, params: 4, frame: 16
var environment;
const env0_0 = a1;
const env0_1 = a2;
const value = environment.__proto__.__proto__;
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).updateSearchQuery(a0,
function(a0) {
if (importDefault === SearchFilterAddLocations.CONTEXT_MENU) {
a0.saveDraftTextInputValue();
}
a0.setTextInputValue(EMPTY_SEARCH_QUERY_STRING);
var object = {};
object.type = SearchQueryTagTypes.PREFIX;
object.searchTokenType = require;
object.location = importDefault;
object.text = getSearchTokenText(require);
a0.addTag(object);
});
(SearchPlatformUtils).syncAutocomplete(a0);
}
function getSearchTokenPressHandler(a0, a1, a2) { // fn#113639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2534, offset: 0x02402010, size: 217 bytes, params: 4, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const FILTER_FROM = SearchTokenTypes.FILTER_FROM;
if (FILTER_FROM === a1) {
return _fun113640;
}
const FILTER_IN = SearchTokenTypes.FILTER_IN;
if (FILTER_IN === a1) {
return _fun113640;
}
const FILTER_HAS = SearchTokenTypes.FILTER_HAS;
if (FILTER_HAS === a1) {
return _fun113640;
}
const FILTER_MENTIONS = SearchTokenTypes.FILTER_MENTIONS;
if (FILTER_MENTIONS === a1) {
return _fun113640;
}
const FILTER_AUTHOR_TYPE = SearchTokenTypes.FILTER_AUTHOR_TYPE;
if (FILTER_AUTHOR_TYPE === a1) {
return _fun113640;
}
const FILTER_ON = SearchTokenTypes.FILTER_ON;
if (FILTER_ON === a1) {
return _fun113643;
}
const FILTER_BEFORE = SearchTokenTypes.FILTER_BEFORE;
if (FILTER_BEFORE === a1) {
return _fun113643;
}
const FILTER_AFTER = SearchTokenTypes.FILTER_AFTER;
if (FILTER_AFTER === a1) {
return _fun113643;
}
const Error = global.Error;
const value = '[getSearchTokenPressHandler] Unhandled search token type: ' + a1;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
}
function getSearchFilterSuggestions(a0) { // fn#113648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3660, offset: 0x024023c4, size: 79 bytes, params: 2, frame: 15
const env0_0 = a0;
const Object = global.Object;
Object.keys(importDefault(9676) /* metro dependency 9676: SearchTokens */).forEach(_fun113649);
return [];
}
function _fun113643() { // fn#113643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3030, offset: 0x024021d5, size: 35 bytes, params: 1, frame: 15
handleSearchDateTokenPress(env0_0, require, importDefault);
function handleSearchDateTokenPress(a0, a1, a2) { // fn#113644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3034, offset: 0x024021f8, size: 68 bytes, params: 4, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value = environment.__proto__.__proto__;
(SearchPlatformUtilsModule).performKeyboardAwareNavigation(_fun113645);
function _fun113645() { // fn#113645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3118, offset: 0x0240223c, size: 96 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[17]);
value = value(dependencyMap[16], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'DatePicker', {onSubmit: onSubmit_113646}]);
function onSubmit_113646(a0) { // fn#113646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3188, offset: 0x0240229c, size: 146 bytes, params: 2, frame: 18
var environment;
const format = a0.format;
let value = environment.__proto__.__proto__.__proto__.__proto__;
const env0_0 = Reflect.apply(format, a0, [SEARCH_DATE_FORMAT]);
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
const updateSearchQuery = value.updateSearchQuery;
const binding = env1_0;
Reflect.apply(updateSearchQuery, value, [binding, _fun113647]);
(Tracking).trackSearchFilterAdd({searchContext: binding,
searchTokenType: require, location: importDefault});
(SearchPlatformUtils).fetchInitialMessages(binding);
function _fun113647(a0) { // fn#113647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3240, offset: 0x0240232e, size: 150 bytes, params: 2, frame: 21
const SEARCH_INPUT_DROPDOWN = SearchFilterAddLocations.SEARCH_INPUT_DROPDOWN;
if (importDefault === SEARCH_INPUT_DROPDOWN) {
a0.setTextInputValue(EMPTY_SEARCH_QUERY_STRING);
}
a0.removePrefixTags();
const addTag = a0.addTag;
const object = {};
const COMPLETE = SearchQueryTagTypes.COMPLETE;
object.type = COMPLETE;
object.text = '' + getSearchTokenText(require) + ' ' + env0_0;
object.searchTokenType = require;
object.location = importDefault;
Reflect.apply(addTag, a0, [object]);
}
function _fun113640() { // fn#113640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2696, offset: 0x024020e9, size: 35 bytes, params: 1, frame: 15
handleSearchTokenPress(env0_0, require, importDefault);
}
}
function _fun113643() { // fn#113643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3030, offset: 0x024021d5, size: 35 bytes, params: 1, frame: 15
handleSearchDateTokenPress(env0_0, require, importDefault);
}
}
function _fun113649(a0) { // fn#113649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3746, offset: 0x02402413, size: 184 bytes, params: 2, frame: 16
var plainText;
var regExp;
var binding;
const value = environment.__proto__;
const searchTokensModule = require(9676) /* metro dependency 9676: SearchTokens */;
if (searchTokensModule.isSearchFilterTokenType(a0)) {
plainText = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0].plainText;
if (plainText != null) {
regExp = new global.RegExp('^' + plainText + '(?:: ?)?$', 'i');
if (regExp.test(env0_0)) {
binding = env0_1;
binding.push({token: a0, text: plainText});
}
}
}
function getSearchFilterSuggestions(a0) { // fn#113648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3660, offset: 0x024023c4, size: 79 bytes, params: 2, frame: 15
const env0_0 = a0;
const Object = global.Object;
Object.keys(SearchTokens).forEach(_fun113649);
return [];
function _fun113649(a0) { // fn#113649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3746, offset: 0x02402413, size: 184 bytes, params: 2, frame: 16
var plainText;
var regExp;
var binding;
const value = environment.__proto__;
if (SearchTokensModule.isSearchFilterTokenType(a0)) {
plainText = (importDefault(9676) /* metro dependency 9676: SearchTokens */)[a0].plainText;
if (plainText != null) {
regExp = new global.RegExp('^' + plainText + '(?:: ?)?$', 'i');
if (regExp.test(env0_0)) {
binding = env0_1;
binding.push({token: a0, text: plainText});
}
}
}
}
}
}
function handleSearchTokenPress(a0, a1, a2) { // fn#113641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:2700, offset: 0x0240210c, size: 88 bytes, params: 4, frame: 16
var environment;
const env0_0 = a1;
const env0_1 = a2;
const value = environment.__proto__.__proto__;
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).updateSearchQuery(a0,
function(a0) {
if (importDefault === SearchFilterAddLocations.CONTEXT_MENU) {
a0.saveDraftTextInputValue();
}
a0.setTextInputValue(EMPTY_SEARCH_QUERY_STRING);
var object = {};
object.type = SearchQueryTagTypes.PREFIX;
object.searchTokenType = require;
object.location = importDefault;
object.text = getSearchTokenText(require);
a0.addTag(object);
});
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).syncAutocomplete(a0);
}
function handleSearchDateTokenPress(a0, a1, a2) { // fn#113644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3034, offset: 0x024021f8, size: 68 bytes, params: 4, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value = environment.__proto__.__proto__;
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113645);
}
function _fun113645() { // fn#113645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3118, offset: 0x0240223c, size: 96 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[17]);
value = value(dependencyMap[16], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'DatePicker', {onSubmit: onSubmit_113646}]);
}
function onSubmit_113646(a0) { // fn#113646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3188, offset: 0x0240229c, size: 146 bytes, params: 2, frame: 18
var environment;
const format = a0.format;
let value = environment.__proto__.__proto__.__proto__.__proto__;
const env0_0 = Reflect.apply(format, a0, [SEARCH_DATE_FORMAT]);
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
const updateSearchQuery = value.updateSearchQuery;
const binding = env1_0;
Reflect.apply(updateSearchQuery, value, [binding, _fun113647]);
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchFilterAdd({searchContext: binding,
searchTokenType: require, location: importDefault});
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(binding);
}
function _fun113647(a0) { // fn#113647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15220:3240, offset: 0x0240232e, size: 150 bytes, params: 2, frame: 21
const SEARCH_INPUT_DROPDOWN = SearchFilterAddLocations.SEARCH_INPUT_DROPDOWN;
if (importDefault === SEARCH_INPUT_DROPDOWN) {
a0.setTextInputValue(EMPTY_SEARCH_QUERY_STRING);
}
a0.removePrefixTags();
const addTag = a0.addTag;
const object2 = {};
const COMPLETE = SearchQueryTagTypes.COMPLETE;
object2.type = COMPLETE;
object2.text = '' + getSearchTokenText(require) + ' ' + env0_0;
object2.searchTokenType = require;
object2.location = importDefault;
Reflect.apply(addTag, a0, [object2]);
}
global.__d(_fun113634, 15023, [9615, 9614, 661, 1244, 11441, 9786, 12376, 6700, 9133, 15024, 15026, 9411, 9676,
11828, 11822, 4080, 9066, 1962, 9673,
2]) /* metro module 15023, dependencies: [9615, 9614, 661, 1244, 11441, 9786, 12376, 6700, 9133, 15024, 15026, 9411, 9676, 11828, 11822, 4080, 9066, 1962, 9673, 2] */;
@@ -1,83 +1,103 @@
/* Metro module 15017; source: modules/search/native/components/layout/autocomplete/useSearchSuggestionsGesture.tsx; dependencies: [31, 4017, 11822, 1585, 477, 5321, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as Module05321Module from '../../../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun113550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:6, offset: 0x023fea51, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {code: 'function inBoundingBox_useSearchSuggestionsGestureTsx1(e,coordinates,safeAreaTop){const touch=e.allTouches[0];if(touch==null)return false;return coordinates.left<touch.absoluteX&&touch.absoluteX<coordinates.right&&coordinates.top<touch.absoluteY+safeAreaTop&&touch.absoluteY+safeAreaTop<coordinates.bottom;}'};
const env0_5 = _fun113551();
object = {code: 'function useSearchSuggestionsGestureTsx2(e,manager){const{coordinates,inBoundingBox,safeAreaTop,dismissed}=this.__closure;manager.fail();const _coordinates=coordinates.get();if(_coordinates==null||inBoundingBox(e,_coordinates,safeAreaTop))return;dismissed.set(true);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/layout/autocomplete/useSearchSuggestionsGesture.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/layout/autocomplete/useSearchSuggestionsGesture.tsx');
exports.useSearchSuggestionsGesture = useSearchSuggestionsGesture;
}
function _fun113551() { // fn#113551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:429, offset: 0x023feaf9, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var r1;
var r0;
var property = a0.allTouches[0];
var value = property != null;
if (value) {
value = a1.left < property.absoluteX;
r1 = value && property.absoluteX < a1.right;
r1 = r1 && a1.top < property.absoluteY + a2;
if (r1) {
value = property.absoluteY + a2;
value = value < a1.bottom;
r1 = value;
function _fun113551() { // fn#113551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:429, offset: 0x023feaf9, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var r1;
var r0;
var property = a0.allTouches[0];
var value = property != null;
if (value) {
value = a1.left < property.absoluteX;
r1 = value && property.absoluteX < a1.right;
r1 = r1 && a1.top < property.absoluteY + a2;
if (r1) {
value = property.absoluteY + a2;
value = value < a1.bottom;
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
};
closure.__closure = {};
closure.__workletHash = 14606221606756;
closure.__initData = env0_4;
return closure;
}
function useSearchSuggestionsGesture(a0) { // fn#113553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1148, offset: 0x023feb99, size: 346 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(null);
let binding = env0_3;
const value4 = binding.useCallback(_fun113554, [value2]);
var env0_3 = value4;
binding.useEffect(_fun113555, [value2, a0, value4]);
const r2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top : 0;
binding = env0_3;
return binding.useMemo(_fun113560, [value2, binding.useCallback(_fun113559, [value2]), binding.useMemo(_fun113556,
[value3, r2, value2]), binding.useCallback(_fun113558, [value3])]);
}
function _fun113555() { // fn#113555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1314, offset: 0x023fecf3, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, env0_3);
}
function _fun113556() { // fn#113556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1424, offset: 0x023fed25, size: 153 bytes, params: 1, frame: 15
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value3 = Gesture.Manual().manualActivation(true);
const onTouchesDown = value3.onTouchesDown;
const closure = e_113557;
closure.__closure = {coordinates: env0_2, inBoundingBox: env1_5, safeAreaTop: env0_4, dismissed: env0_1};
closure.__workletHash = 2369649298113;
closure.__initData = env1_6;
return Reflect.apply(onTouchesDown, value3, [closure]);
}
function _fun113560() { // fn#113560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1796, offset: 0x023fee12, size: 43 bytes, params: 1, frame: 3
return {gesture: env0_5, dismissed: env0_1, onLayoutMeasure: env0_6, setDismissed: env0_7};
}
function e_113557(a0, a1) { // fn#113557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1500, offset: 0x023fedbe, size: 84 bytes, params: 3, frame: 17
a1.fail();
const value2 = env1_2.get();
if (!(value2 == null || env2_5(a0, value2, env1_4))) {
env1_1.set(true);
return r0;
};
closure.__closure = {};
closure.__workletHash = 14606221606756;
closure.__initData = env0_4;
return closure;
}
function useSearchSuggestionsGesture(a0) { // fn#113553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1148, offset: 0x023feb99, size: 346 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = (ReanimatedRexportModule).useSharedValue(false);
const value3 = (ReanimatedRexportModule).useSharedValue(null);
let binding = env0_3;
const value4 = binding.useCallback(_fun113554, [value2]);
var env0_3 = value4;
binding.useEffect(_fun113555, [value2, a0, value4]);
const r2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top : 0;
binding = env0_3;
return binding.useMemo(_fun113560, [value2, binding.useCallback(_fun113559, [value2]), binding.useMemo(_fun113556,
[value3, r2, value2]), binding.useCallback(_fun113558, [value3])]);
function _fun113554(a0, a1) { // fn#113554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1269, offset: 0x02183528, size: 33 bytes, params: 3, frame: 11
if (a0 !== a1) {
env0_1.set(false);
}
}
function _fun113555() { // fn#113555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1314, offset: 0x023fecf3, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, env0_3);
}
function _fun113556() { // fn#113556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1424, offset: 0x023fed25, size: 153 bytes, params: 1, frame: 15
const Gesture = (Module05321Module).Gesture;
const value3 = Gesture.Manual().manualActivation(true);
const onTouchesDown = value3.onTouchesDown;
const e_1135572 = e_113557;
e_1135572.__closure = {coordinates: env0_2, inBoundingBox: env1_5, safeAreaTop: env0_4, dismissed: env0_1};
e_1135572.__workletHash = 2369649298113;
e_1135572.__initData = env1_6;
return Reflect.apply(onTouchesDown, value3, [e_1135572]);
function e_113557(a0, a1) { // fn#113557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1500, offset: 0x023fedbe, size: 84 bytes, params: 3, frame: 17
a1.fail();
const value2 = env1_2.get();
if (!(value2 == null || env2_5(a0, value2, env1_4))) {
env1_1.set(true);
}
}
}
function _fun113558(a0) { // fn#113558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1719, offset: 0x010c54ad, size: 24 bytes, params: 2, frame: 11
env0_2.set(a0);
}
function _fun113559() { // fn#113559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1756, offset: 0x023451fb, size: 23 bytes, params: 1, frame: 11
env0_1.set(true);
}
function _fun113560() { // fn#113560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15214:1796, offset: 0x023fee12, size: 43 bytes, params: 1, frame: 3
return {gesture: env0_5, dismissed: env0_1, onLayoutMeasure: env0_6, setDismissed: env0_7};
}
}
}
global.__d(_fun113550, 15017, [31, 4017, 11822, 1585, 477, 5321,
2]) /* metro module 15017, dependencies: [31, 4017, 11822, 1585, 477, 5321, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 15044; source: modules/search/native/components/list/SearchList.tsx; dependencies: [31, 27, 9615, 33, 4501, 15045, 15047, 15048, 15058, 15041, 15060, 15062, 15057, 15049, 15063, 15067, 15068, 15071, 15072, 15073, 15074, 15075, 1585, 15032, 1244, 8416, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:6, offset: 0x02407dc2, size: 306 bytes, params: 8, frame: 21
const env0_0 = require;
const getItemType_113846 = function(a0) {
@@ -6,284 +13,282 @@ function _fun113840(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.SearchHistoryItemTypes;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_8 = value4.jsx;
const env0_9 = value4.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
let value = ReactModule;
const env0_10 = (CreateStylesModule).createStyles({container: {flex: 1}});
value = value.memo(SearchList);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/SearchList.tsx');
exports.default = value;
}
function getItemKey_113841(a0) { // fn#113841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:273, offset: 0x02407ef4, size: 876 bytes, params: 2, frame: 19
var props;
var data;
var messageId;
var id;
var section;
var media;
const type = a0.type;
const DM = SearchListItemTypes.DM;
if (DM === type) {
section = a0.section;
props = a0.props;
id = props.user.id;
props = a0.props;
return '' + section + '-' + id + '-' + props.guildId;
}
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
if (GUILD_CHANNEL_MEMBER === type) {
props = a0.props;
id = props.user.id;
props = a0.props;
return '' + id + '-' + props.guildId;
}
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
if (SEARCH_HISTORY_ITEM === type) {
return searchHistoryKeyExtractor(a0.props.searchHistoryItem);
}
const MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
if (MEDIA_GRID === type) {
return a0.props.media.map(function({messageId, mediaIndex}) {
return '' + messageId + '-' + mediaIndex;
}).join('-');
}
const MEDIA = SearchListItemTypes.MEDIA;
if (MEDIA === type) {
props = a0.props;
media = props.media;
messageId = media.messageId;
props = a0.props;
media = props.media;
return '' + messageId + '-' + media.mediaIndex;
}
const MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
if (MEDIA_PLACEHOLDER === type) {
return a0.key;
}
const FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
if (FILE_OR_LINK_PLACEHOLDER === type) {
return a0.key;
}
const MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
if (MESSAGE_PLACEHOLDER === type) {
return a0.key;
}
const GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
if (GUILD_CHANNEL_MEMBER_PLACEHOLDER === type) {
return a0.key;
}
const GROUP_DM = SearchListItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return '' + a0.section + '-' + a0.props.channel.id;
}
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return '' + a0.props.channel.id;
}
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return '' + a0.props.channel.id;
}
const MESSAGE = SearchListItemTypes.MESSAGE;
if (MESSAGE === type) {
return '' + a0.props.message.id;
}
const LINK = SearchListItemTypes.LINK;
if (LINK === type) {
props = a0.props;
data = props.data;
messageId = data.messageId;
props = a0.props;
data = props.data;
return '' + messageId + '-' + data.linkIndex;
}
const FILE = SearchListItemTypes.FILE;
if (FILE === type) {
props = a0.props;
data = props.data;
messageId = data.messageId;
props = a0.props;
data = props.data;
return '' + messageId + '-' + data.fileIndex;
}
const GENERIC = SearchListItemTypes.GENERIC;
if (GENERIC === type) {
return '' + a0.props.text;
}
const SECTION = SearchListItemTypes.SECTION;
if (SECTION === type) {
return '' + a0.props.title;
}
}
function keyExtractor_113845(a0) { // fn#113845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:1500, offset: 0x02408374, size: 52 bytes, params: 2, frame: 15
return '' + a0.type + '-' + getItemKey_113841(a0);
}
function renderItem_113847({item}) { // fn#113847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:1598, offset: 0x024083a8, size: 1095 bytes, params: 2, frame: 16
const type = item.type;
const DM = SearchListItemTypes.DM;
if (DM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15045) /* metro dependency 15045: DMRow */);
}
const GROUP_DM = SearchListItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15047) /* metro dependency 15047: GroupDMRow */);
}
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
if (SEARCH_HISTORY_ITEM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15048) /* metro dependency 15048: SearchHistoryRow */);
}
const MEDIA = SearchListItemTypes.MEDIA;
if (MEDIA === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15058) /* metro dependency 15058: MediaGridItem */);
}
const MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
if (MEDIA_PLACEHOLDER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15041) /* metro dependency 15041: MediaGridPlaceholder */);
}
const FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
if (FILE_OR_LINK_PLACEHOLDER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15060) /* metro dependency 15060: FileOrLinkGridPlaceholder */);
}
const MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
if (MEDIA_GRID === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15062) /* metro dependency 15062: MediaGrid */);
}
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15057) /* metro dependency 15057: GuildTextChannelRow */);
}
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15049) /* metro dependency 15049: GuildVoiceOrStageChannelRow */);
}
const MESSAGE = SearchListItemTypes.MESSAGE;
if (MESSAGE === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15063) /* metro dependency 15063: MessageRow */);
}
const MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
if (MESSAGE_PLACEHOLDER === type) {
return ((Component) => <Component />)(importDefault(15067) /* metro dependency 15067: FormRowPlaceholder */);
}
const LINK = SearchListItemTypes.LINK;
if (LINK === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15068) /* metro dependency 15068: LinkGridItem */);
}
const FILE = SearchListItemTypes.FILE;
if (FILE === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15071) /* metro dependency 15071: FileGridItem */);
}
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
if (GUILD_CHANNEL_MEMBER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15072) /* metro dependency 15072: GuildChannelMemberRow */);
}
const GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
if (GUILD_CHANNEL_MEMBER_PLACEHOLDER === type) {
return ((Component) => <Component />)(importDefault(15073) /* metro dependency 15073: MemberRowPlaceholder */);
}
const GENERIC = SearchListItemTypes.GENERIC;
if (GENERIC === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15074) /* metro dependency 15074: GenericTextRow */);
}
const SECTION = SearchListItemTypes.SECTION;
if (SECTION === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15075) /* metro dependency 15075: SearchListSection */);
}
return null;
}
function SearchList({contentContainerStyle, data, onEndReached, ItemSeparatorComponent, ListHeaderComponent, ListFooterComponent, estimatedItemSize, numColumns}) { // fn#113848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:2555, offset: 0x024087ef, size: 527 bytes, params: 2, frame: 37
var r27;
var defaultImport;
var intl;
const value2 = env0_3.useRef(null);
const styles = useStyles();
const bottom = importDefault(dependencyMap[22])().bottom;
const r15 = numColumns == null || numColumns === 1 ? 0.5 : numColumns === 2 ? 0.8 : numColumns >= 3 ? 0.99 : undefined;
let r5 = data.length === 0 && ListFooterComponent == null && ListHeaderComponent == null;
if (r5) {
var viewBinding2Props = {style: StyleSheet.absoluteFill};
defaultImport = importDefault(dependencyMap[23]);
intl = require(dependencyMap[24]).intl;
r5 = <View {...viewBinding2Props}>{((Component) => <Component text={intl.string(require(dependencyMap[24]).t.V6nAfF)} />)(defaultImport)}</View>;
r27 = dependencyMap;
}
const AnimatedFlashList = require(dependencyMap[25]).AnimatedFlashList;
const renderItem_113847Binding = renderItem_113847;
const object = {paddingBottom: 16 + bottom};
copyDataProperties(object, contentContainerStyle, r27);
return (
<View style={styles.container}>
{r5}
<AnimatedFlashList
ref={value2}
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps="handled"
estimatedItemSize={estimatedItemSize}
data={data}
renderItem={renderItem_113847Binding}
onEndReachedThreshold={r15}
onEndReached={onEndReached}
scrollsToTop
contentContainerStyle={object}
keyExtractor={keyExtractor_113845}
getItemType={getItemType_113846}
ListHeaderComponent={ListHeaderComponent}
ListFooterComponent={ListFooterComponent}
ItemSeparatorComponent={ItemSeparatorComponent}
numColumns={numColumns}
/>
</View>
);
}
function searchHistoryKeyExtractor(a0) { // fn#113842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:488, owner: getItemKey_113841.searchHistoryKeyExtractor, offset: 0x02408260, size: 232 bytes, params: 2, frame: 15
var environment;
var r3;
var text;
var tags;
const type = a0.type;
let value = environment.__proto__;
const TEXT = SearchHistoryItemTypes.TEXT;
if (TEXT === type) {
text = a0.text;
tags = a0.tags;
value = undefined;
if (tags == null) {
r3 = value;
} else {
value = tags.map(function(a0) {
return a0.text;
});
value = value.join(' ');
r3 = value;
function getItemKey_113841(a0) { // fn#113841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:273, offset: 0x02407ef4, size: 876 bytes, params: 2, frame: 19
var props;
var data;
var messageId;
var id;
var section;
var media;
const type = a0.type;
const DM = SearchListItemTypes.DM;
if (DM === type) {
section = a0.section;
props = a0.props;
id = props.user.id;
props = a0.props;
return '' + section + '-' + id + '-' + props.guildId;
}
return '' + text + ' ' + r3;
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
if (GUILD_CHANNEL_MEMBER === type) {
props = a0.props;
id = props.user.id;
props = a0.props;
return '' + id + '-' + props.guildId;
}
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
if (SEARCH_HISTORY_ITEM === type) {
return searchHistoryKeyExtractor(a0.props.searchHistoryItem);
}
const MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
if (MEDIA_GRID === type) {
return a0.props.media.map(function({messageId, mediaIndex}) {
return '' + messageId + '-' + mediaIndex;
}).join('-');
}
const MEDIA = SearchListItemTypes.MEDIA;
if (MEDIA === type) {
props = a0.props;
media = props.media;
messageId = media.messageId;
props = a0.props;
media = props.media;
return '' + messageId + '-' + media.mediaIndex;
}
const MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
if (MEDIA_PLACEHOLDER === type) {
return a0.key;
}
const FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
if (FILE_OR_LINK_PLACEHOLDER === type) {
return a0.key;
}
const MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
if (MESSAGE_PLACEHOLDER === type) {
return a0.key;
}
const GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
if (GUILD_CHANNEL_MEMBER_PLACEHOLDER === type) {
return a0.key;
}
const GROUP_DM = SearchListItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return '' + a0.section + '-' + a0.props.channel.id;
}
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return '' + a0.props.channel.id;
}
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return '' + a0.props.channel.id;
}
const MESSAGE = SearchListItemTypes.MESSAGE;
if (MESSAGE === type) {
return '' + a0.props.message.id;
}
const LINK = SearchListItemTypes.LINK;
if (LINK === type) {
props = a0.props;
data = props.data;
messageId = data.messageId;
props = a0.props;
data = props.data;
return '' + messageId + '-' + data.linkIndex;
}
const FILE = SearchListItemTypes.FILE;
if (FILE === type) {
props = a0.props;
data = props.data;
messageId = data.messageId;
props = a0.props;
data = props.data;
return '' + messageId + '-' + data.fileIndex;
}
const GENERIC = SearchListItemTypes.GENERIC;
if (GENERIC === type) {
return '' + a0.props.text;
}
const SECTION = SearchListItemTypes.SECTION;
if (SECTION === type) {
return '' + a0.props.title;
}
function searchHistoryKeyExtractor(a0) { // fn#113842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:488, owner: getItemKey_113841.searchHistoryKeyExtractor, offset: 0x02408260, size: 232 bytes, params: 2, frame: 15
var environment;
var r3;
var text;
var tags;
const type = a0.type;
let value = environment.__proto__;
const TEXT = SearchHistoryItemTypes.TEXT;
if (TEXT === type) {
text = a0.text;
tags = a0.tags;
value = undefined;
if (tags == null) {
r3 = value;
} else {
value = tags.map(function(a0) {
return a0.text;
});
value = value.join(' ');
r3 = value;
}
return '' + text + ' ' + r3;
}
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return '' + a0.channelId;
}
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return '' + a0.channelId;
}
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return '' + a0.channelId;
}
const DM = SearchHistoryItemTypes.DM;
if (DM === type) {
return '' + a0.userId;
}
}
}
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return '' + a0.channelId;
function keyExtractor_113845(a0) { // fn#113845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:1500, offset: 0x02408374, size: 52 bytes, params: 2, frame: 15
return '' + a0.type + '-' + getItemKey_113841(a0);
}
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return '' + a0.channelId;
function renderItem_113847({item}) { // fn#113847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:1598, offset: 0x024083a8, size: 1095 bytes, params: 2, frame: 16
const type = item.type;
const DM = SearchListItemTypes.DM;
if (DM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15045) /* metro dependency 15045: DMRow */);
}
const GROUP_DM = SearchListItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15047) /* metro dependency 15047: GroupDMRow */);
}
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
if (SEARCH_HISTORY_ITEM === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15048) /* metro dependency 15048: SearchHistoryRow */);
}
const MEDIA = SearchListItemTypes.MEDIA;
if (MEDIA === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15058) /* metro dependency 15058: MediaGridItem */);
}
const MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
if (MEDIA_PLACEHOLDER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15041) /* metro dependency 15041: MediaGridPlaceholder */);
}
const FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
if (FILE_OR_LINK_PLACEHOLDER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15060) /* metro dependency 15060: FileOrLinkGridPlaceholder */);
}
const MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
if (MEDIA_GRID === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15062) /* metro dependency 15062: MediaGrid */);
}
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15057) /* metro dependency 15057: GuildTextChannelRow */);
}
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15049) /* metro dependency 15049: GuildVoiceOrStageChannelRow */);
}
const MESSAGE = SearchListItemTypes.MESSAGE;
if (MESSAGE === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15063) /* metro dependency 15063: MessageRow */);
}
const MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
if (MESSAGE_PLACEHOLDER === type) {
return ((Component) => <Component />)(importDefault(15067) /* metro dependency 15067: FormRowPlaceholder */);
}
const LINK = SearchListItemTypes.LINK;
if (LINK === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15068) /* metro dependency 15068: LinkGridItem */);
}
const FILE = SearchListItemTypes.FILE;
if (FILE === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15071) /* metro dependency 15071: FileGridItem */);
}
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
if (GUILD_CHANNEL_MEMBER === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15072) /* metro dependency 15072: GuildChannelMemberRow */);
}
const GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
if (GUILD_CHANNEL_MEMBER_PLACEHOLDER === type) {
return ((Component) => <Component />)(importDefault(15073) /* metro dependency 15073: MemberRowPlaceholder */);
}
const GENERIC = SearchListItemTypes.GENERIC;
if (GENERIC === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15074) /* metro dependency 15074: GenericTextRow */);
}
const SECTION = SearchListItemTypes.SECTION;
if (SECTION === type) {
return ((Component) => <Component {...item.props} />)(importDefault(15075) /* metro dependency 15075: SearchListSection */);
}
return null;
}
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return '' + a0.channelId;
}
const DM = SearchHistoryItemTypes.DM;
if (DM === type) {
return '' + a0.userId;
function SearchList({contentContainerStyle, data, onEndReached, ItemSeparatorComponent, ListHeaderComponent, ListFooterComponent, estimatedItemSize, numColumns}) { // fn#113848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15241:2555, offset: 0x024087ef, size: 527 bytes, params: 2, frame: 37
var r27;
var defaultImport;
var intl;
const value2 = env0_3.useRef(null);
const styles = useStyles();
const bottom = importDefault(dependencyMap[22])().bottom;
const r15 = numColumns == null || numColumns === 1 ? 0.5 : numColumns === 2 ? 0.8 : numColumns >= 3 ? 0.99 : undefined;
let r5 = data.length === 0 && ListFooterComponent == null && ListHeaderComponent == null;
if (r5) {
var viewBinding2Props = {style: StyleSheet.absoluteFill};
defaultImport = importDefault(dependencyMap[23]);
intl = require(dependencyMap[24]).intl;
r5 = (
<View {...viewBinding2Props}>
{((Component) => <Component text={intl.string(require(dependencyMap[24]).t.V6nAfF)} />)(defaultImport)}
</View>
);
r27 = dependencyMap;
}
const AnimatedFlashList = require(dependencyMap[25]).AnimatedFlashList;
const renderItem_113847Binding = renderItem_113847;
const object2 = {paddingBottom: 16 + bottom};
copyDataProperties(object2, contentContainerStyle, r27);
return (
<View style={styles.container}>
{r5}
<AnimatedFlashList
ref={value2}
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps="handled"
estimatedItemSize={estimatedItemSize}
data={data}
renderItem={renderItem_113847Binding}
onEndReachedThreshold={r15}
onEndReached={onEndReached}
scrollsToTop
contentContainerStyle={object2}
keyExtractor={keyExtractor_113845}
getItemType={getItemType_113846}
ListHeaderComponent={ListHeaderComponent}
ListFooterComponent={ListFooterComponent}
ItemSeparatorComponent={ItemSeparatorComponent}
numColumns={numColumns}
/>
</View>
);
}
}
global.__d(_fun113840, 15044, [31, 27, 9615, 33, 4501, 15045, 15047, 15048, 15058, 15041, 15060, 15062, 15057,
15049, 15063, 15067, 15068, 15071, 15072, 15073, 15074, 15075, 1585, 15032, 1244, 8416,
2]) /* metro module 15044, dependencies: [31, 27, 9615, 33, 4501, 15045, 15047, 15048, 15058, 15041, 15060, 15062, 15057, 15049, 15063, 15067, 15068, 15071, 15072, 15073, 15074, 15075, 1585, 15032, 1244, 8416, 2] */;
@@ -1,171 +1,246 @@
/* Metro module 15061; source: modules/search/native/components/list/SearchListCard.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 4573, 3995, 4805, 9719, 6698, 1244, 6647, 6239, 2] */
import UserUtils from '../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import UseChannelName from '../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CardNativeModule from '../../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as ChannelUtilsModule from '../../../../../utils/native/ChannelUtils.tsx'; /* Metro dependency 6647 */
function _fun113960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:6, offset: 0x0240e0f1, size: 657 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const closure = SearchListContentAuthor;
const closure2 = SearchListGuildChannel;
const SearchListContentAuthor2 = SearchListContentAuthor;
const SearchListGuildChannel2 = SearchListGuildChannel;
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 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {channelName: {'flexShrink': 1, 'marginStart': 4}};
object = {channelName: {'flexShrink': 1, 'marginStart': 4}};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.channelIcon = {color: INTERACTIVE_TEXT_DEFAULT};
object2.avatar = {marginRight: 2};
object2.channel = {'flexDirection': 'row', 'alignItems': 'center'};
object2.author = {'flexDirection': 'row', 'alignItems': 'center'};
object2.authorName = {'flexShrink': 1, 'marginStart': 2};
object.channelIcon = {color: INTERACTIVE_TEXT_DEFAULT};
object.avatar = {marginRight: 2};
object.channel = {'flexDirection': 'row', 'alignItems': 'center'};
object.author = {'flexDirection': 'row', 'alignItems': 'center'};
object.authorName = {'flexShrink': 1, 'marginStart': 2};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'padding': 0, 'backgroundColor': null, 'overflow': 'hidden',
object.container = {'flex': 1, 'padding': 0, 'backgroundColor': null, 'overflow': 'hidden',
backgroundColor: BACKGROUND_BASE_LOW};
object2.content = {'paddingTop': 12, 'paddingHorizontal': 12, 'paddingBottom': 4};
object2.footer = {'flexDirection': 'column', 'paddingTop': 4, 'paddingHorizontal': 12, 'paddingBottom': 12,
'gap': 4};
const object3 = {'flex': 1, 'overflow': 'hidden'};
object3.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.content = {'paddingTop': 12, 'paddingHorizontal': 12, 'paddingBottom': 4};
object.footer = {'flexDirection': 'column', 'paddingTop': 4, 'paddingHorizontal': 12, 'paddingBottom': 12, 'gap': 4};
const object4 = {'flex': 1, 'overflow': 'hidden'};
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.borderBottomWidth = 1;
object4.backgroundColor = BACKGROUND_MOD_SUBTLE;
object4.borderBottomWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderBottomColor = BORDER_SUBTLE;
object2.thumbnail = object3;
object2.privateChannelIcon = {'flexDirection': 'row', 'alignItems': 'center'};
object2.icon = {marginRight: 4};
object2.gdmIcon = {width: 18};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchListCard.tsx');
exports.SearchListContentAuthor = closure;
exports.SearchListGuildChannel = closure2;
object4.borderBottomColor = BORDER_SUBTLE;
object.thumbnail = object4;
object.privateChannelIcon = {'flexDirection': 'row', 'alignItems': 'center'};
object.icon = {marginRight: 4};
object.gdmIcon = {width: 18};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/SearchListCard.tsx');
exports.SearchListContentAuthor = SearchListContentAuthor2;
exports.SearchListGuildChannel = SearchListGuildChannel2;
exports.SearchListCardContainer = SearchListCardContainer;
exports.SearchListCardThumbnail = SearchListCardThumbnail;
exports.SearchListCardContent = SearchListCardContent;
exports.SearchListCardFooter = SearchListCardFooter;
}
function SearchListContentAuthor({author, avatarSource}) { // fn#113961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1018, offset: 0x0240e382, size: 244 bytes, params: 2, frame: 23
const styles = useStyles();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SIZE_16 = AvatarSizes.SIZE_16;
const avatar = <Avatar source={avatarSource} size={SIZE_16} style={styles.avatar} avatarDecoration={author.avatarDecoration} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.author}>
{avatar}
<Text
style={styles.authorName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(author)}
</Text>
</View>
);
}
function SearchListPrivateChannel({channel}) { // fn#113962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1376, offset: 0x0240e476, size: 452 bytes, params: 2, frame: 26
var view;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var intl;
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const isGroupDM2 = channel.isGroupDM();
const object2 = {};
if (isGroupDM2) {
object2.style = styles.channel;
view = <View {...object2}><View style={styles.gdmIcon}>{((Component) => <Component channel={channel} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */)}</View><Text style={styles.channelName} variant="text-xs/medium" color="interactive-text-default" lineClamp={1}>{value2}</Text></View>;
} else {
object2.style = styles.privateChannelIcon;
items2 = [((ForumIcon) => <ForumIcon style={styles.icon} size="xs" color="interactive-text-default" />)((require(6698) /* metro dependency 6698: ForumIcon */).ForumIcon)];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text variant="text-xs/medium" color="interactive-text-default" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ACgJhM)}</Text>;
view = <View {...object2}>{items2}</View>;
function SearchListContentAuthor({author, avatarSource}) { // fn#113961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1018, offset: 0x0240e382, size: 244 bytes, params: 2, frame: 23
const styles = useStyles();
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const SIZE_16 = AvatarSizes.SIZE_16;
const avatar = (
<Avatar
source={avatarSource}
size={SIZE_16}
style={styles.avatar}
avatarDecoration={author.avatarDecoration}
/>
);
const Text = (TextModule).Text;
return (
<View style={styles.author}>
{avatar}
<Text
style={styles.authorName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{(UserUtils).getName(author)}
</Text>
</View>
);
}
return view;
}
function SearchListGuildChannel({channel}) { // fn#113963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1970, offset: 0x0240e63a, size: 261 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel,
{ignoreTraits: true});
channel = styles.channel;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const icon = <Icon size={REFRESH_SMALL_16} source={channelIcon} color={styles.channelIcon.color} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={channel}>
{icon}
<Text
style={styles.channelName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
function SearchListPrivateChannel({channel}) { // fn#113962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1376, offset: 0x0240e476, size: 452 bytes, params: 2, frame: 26
var view;
var items2;
const Text = (TextModule).Text;
var intl;
const styles = useStyles();
const value2 = (UseChannelName)(channel);
const isGroupDM2 = channel.isGroupDM();
const object = {};
if (isGroupDM2) {
object.style = styles.channel;
view = (
<View {...object}>
<View style={styles.gdmIcon}>
{((Component) => <Component channel={channel} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */)}
</View>
<Text
style={styles.channelName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{value2}
</Text>
</View>
);
} else {
object.style = styles.privateChannelIcon;
const ForumIcon = (require(6698) /* metro dependency 6698: ForumIcon */).ForumIcon;
items2 = [
<ForumIcon
style={styles.icon}
size="xs"
color="interactive-text-default"
/>,
];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ACgJhM)}
</Text>
);
view = (
<View {...object}>
{items2}
</View>
);
}
return view;
}
function SearchListGuildChannel({channel}) { // fn#113963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:1970, offset: 0x0240e63a, size: 261 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (UseChannelName)(channel);
const channelIcon = (ChannelUtilsModule).getChannelIcon(channel,
{ignoreTraits: true});
channel = styles.channel;
const Icon = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const icon = (
<Icon
size={REFRESH_SMALL_16}
source={channelIcon}
color={styles.channelIcon.color}
/>
);
const Text = (TextModule).Text;
return (
<View style={channel}>
{icon}
<Text
style={styles.channelName}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{value2}
</Text>
</View>
);
}
function SearchListCardContainer({children, onPress, containerStyle}) { // fn#113964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2554, offset: 0x0240e73f, size: 113 bytes, params: 2, frame: 18
const styles = useStyles();
const Card = (CardNativeModule).Card;
return (
<Card
shadow="low"
border="subtle"
onPress={onPress}
style={[styles.container, containerStyle]}
>
{value2}
</Text>
</View>
);
}
{children}
</Card>
);
}
function SearchListCardContainer({children, onPress, containerStyle}) { // fn#113964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2554, offset: 0x0240e73f, size: 113 bytes, params: 2, frame: 18
const styles = useStyles();
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<Card
shadow="low"
border="subtle"
onPress={onPress}
style={[styles.container, containerStyle]}
>
{children}
</Card>
);
}
function SearchListCardThumbnail({thumbnail}) { // fn#113965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2763, offset: 0x0240e7b0, size: 54 bytes, params: 2, frame: 15
const styles = useStyles();
return (
<View style={styles.thumbnail}>
{thumbnail}
</View>
);
}
function SearchListCardThumbnail({thumbnail}) { // fn#113965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2763, offset: 0x0240e7b0, size: 54 bytes, params: 2, frame: 15
const styles = useStyles();
return (
<View style={styles.thumbnail}>
{thumbnail}
</View>
);
}
function SearchListCardContent({label, subLabel}) { // fn#113966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2889, offset: 0x0240e7e6, size: 200 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<View style={styles.content}>
{
typeof label !== 'string'
? label
: ((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
{
typeof subLabel !== 'string'
? subLabel
: ((Text) => <Text variant="text-sm/normal" color="text-default" lineClamp={1}>{subLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
</View>
);
}
function SearchListCardContent({label, subLabel}) { // fn#113966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:2889, offset: 0x0240e7e6, size: 200 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<View style={styles.content}>
{typeof label !== 'string' ? label : ((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
{typeof subLabel !== 'string' ? subLabel : ((Text) => <Text variant="text-sm/normal" color="text-default" lineClamp={1}>{subLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
function SearchListCardFooter({author, avatarSource, channel}) { // fn#113967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:3250, offset: 0x0240e8ae, size: 139 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.footer}>
<SearchListContentAuthor author={author} avatarSource={avatarSource} />
{ReactModule.useMemo(_fun113968, [channel])}
</View>
);
function _fun113968() { // fn#113968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:3340, offset: 0x0240e939, size: 101 bytes, params: 1, frame: 15
const channelBinding = channel;
const value2 = null;
return (
value2 == channelBinding
? value2
: (
value2 == channel.getGuildId()
? (
<SearchListPrivateChannel channel={channel} />
)
: (
<SearchListGuildChannel channel={channel} />
)
)
);
}
function SearchListCardFooter({author, avatarSource, channel}) { // fn#113967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:3250, offset: 0x0240e8ae, size: 139 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.footer}>
<SearchListContentAuthor author={author} avatarSource={avatarSource} />
{env0_3.useMemo(_fun113968, [channel])}
</View>
);
}
}
function _fun113968() { // fn#113968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15258:3340, offset: 0x0240e939, size: 101 bytes, params: 1, frame: 15
const channelBinding = channel;
const value2 = null;
return value2 == channelBinding ? value2 : value2 == channel.getGuildId() ? <SearchListPrivateChannel channel={channel} /> : <SearchListGuildChannel channel={channel} />;
}
global.__d(_fun113960, 15061, [31, 27, 33, 4501, 697, 1305, 4573, 3995, 4805, 9719, 6698, 1244, 6647, 6239,
2]) /* metro module 15061, dependencies: [31, 27, 33, 4501, 697, 1305, 4573, 3995, 4805, 9719, 6698, 1244, 6647, 6239, 2] */;
@@ -1,59 +1,79 @@
/* Metro module 15046; source: modules/search/native/components/list/SearchListRow.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 5278, 4573, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113860(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:6, offset: 0x02409364, size: 233 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_ROW_TAP_STATE_PADDING;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun113861);
let value = ReactModule;
const env0_7 = (CreateStylesModule).createStyles(_fun113861);
value = value.memo(_fun113862);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchListRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/SearchListRow.tsx');
exports.SearchListRow = value;
function _fun113861(a0) { // fn#113861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:211, offset: 0x0240944d, size: 155 bytes, params: 2, frame: 14
const object = {};
object.pressable = {paddingHorizontal: 16, paddingVertical: SEARCH_ROW_TAP_STATE_PADDING};
object.body = {'flexDirection': 'row', 'alignItems': 'center'};
object.labels = {'justifyContent': 'center', 'flex': 1};
const INTERACTIVE_BACKGROUND_ACTIVE = (Native).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object.underlayColor = {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
object.text = {flexShrink: 1};
object.iconContainer = {marginRight: 12};
object.extrasContainer = {marginLeft: a0};
return object;
}
function _fun113862({containerStyle, onPress, label, subLabel, icon, iconContainerStyle, iconWidth, trailing, extras, header, accessible, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityActions, onAccessibilityAction, bodyStyle}) { // fn#113862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:527, offset: 0x024094e8, size: 523 bytes, params: 2, frame: 33
accessible = accessible === undefined || accessible;
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles(iconWidth ?? 0);
const PressableHighlight = (PressablesModule).PressableHighlight;
const items3 = [styles.pressable, containerStyle];
const backgroundColor = styles.underlayColor.backgroundColor;
const items2 = [header];
items2[1] = (
<View style={[styles.body, bodyStyle]}>
<View style={[styles.iconContainer, iconContainerStyle]}>
{icon}
</View>
<View style={styles.labels}>
{
typeof label !== 'string'
? label
: ((Text) => <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary" style={styles.text}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
{subLabel}
</View>
{trailing}
</View>
);
items2[2] = extras != null && <View style={[styles.extrasContainer]}>{extras}</View>;
return (
<PressableHighlight
accessible={accessible}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityHint={accessibilityHint}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
style={items3}
onPress={onPress}
unstable_pressDelay={130}
underlayColor={backgroundColor}
>
{items2}
</PressableHighlight>
);
}
}
function _fun113861(a0) { // fn#113861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:211, offset: 0x0240944d, size: 155 bytes, params: 2, frame: 14
const object2 = {};
object2.pressable = {paddingHorizontal: 16, paddingVertical: SEARCH_ROW_TAP_STATE_PADDING};
object2.body = {'flexDirection': 'row', 'alignItems': 'center'};
object2.labels = {'justifyContent': 'center', 'flex': 1};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object2.underlayColor = {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
object2.text = {flexShrink: 1};
object2.iconContainer = {marginRight: 12};
object2.extrasContainer = {marginLeft: a0};
return object2;
}
function _fun113862({containerStyle, onPress, label, subLabel, icon, iconContainerStyle, iconWidth, trailing, extras, header, accessible, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityActions, onAccessibilityAction, bodyStyle}) { // fn#113862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15243:527, offset: 0x024094e8, size: 523 bytes, params: 2, frame: 33
accessible = accessible === undefined || accessible;
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles(iconWidth ?? 0);
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const items3 = [styles.pressable, containerStyle];
const backgroundColor = styles.underlayColor.backgroundColor;
const items2 = [header];
items2[1] = <View style={[styles.body, bodyStyle]}><View style={[styles.iconContainer,
iconContainerStyle]}>{icon}</View><View style={styles.labels}>{typeof label !== 'string' ? label : ((Text) => <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary" style={styles.text}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{subLabel}</View>{trailing}</View>;
items2[2] = extras != null && <View style={[styles.extrasContainer]}>{extras}</View>;
return (
<PressableHighlight
accessible={accessible}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityHint={accessibilityHint}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
style={items3}
onPress={onPress}
unstable_pressDelay={130}
underlayColor={backgroundColor}
>
{items2}
</PressableHighlight>
);
}
global.__d(_fun113860, 15046, [31, 27, 9615, 33, 4501, 697, 5278, 4573,
2]) /* metro module 15046, dependencies: [31, 27, 9615, 33, 4501, 697, 5278, 4573, 2] */;
@@ -1,38 +1,44 @@
/* Metro module 15075; source: modules/search/native/components/list/SearchListSection.tsx; dependencies: [31, 27, 9615, 33, 4501, 4573, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun114039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15272:6, offset: 0x02411e63, size: 242 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const SEARCH_LIST_SECTION_TOP_PADDING = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_LIST_SECTION_TOP_PADDING;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({section: {'flex': 1,
let value = ReactModule;
const SEARCH_LIST_SECTION_TOP_PADDING = (SearchConstantsModule).SEARCH_LIST_SECTION_TOP_PADDING;
const env0_5 = (CreateStylesModule).createStyles({section: {'flex': 1,
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'textTransform': 'none', 'paddingTop': null, 'paddingHorizontal': 16, 'paddingBottom': 8,
paddingTop: SEARCH_LIST_SECTION_TOP_PADDING}});
value = value.memo(_fun114040);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchListSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/SearchListSection.tsx');
exports.default = value;
function _fun114040({title, trailing}) { // fn#114040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15272:400, offset: 0x02411f55, size: 124 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (TextModule).Text;
return (
<View style={styles.section}>
<Text
maxFontSizeMultiplier={2}
accessibilityRole="header"
variant="text-sm/semibold"
color="interactive-text-default"
>
{title}
</Text>
{trailing}
</View>
);
}
}
function _fun114040({title, trailing}) { // fn#114040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15272:400, offset: 0x02411f55, size: 124 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.section}>
<Text
maxFontSizeMultiplier={2}
accessibilityRole="header"
variant="text-sm/semibold"
color="interactive-text-default"
>
{title}
</Text>
{trailing}
</View>
);
}
global.__d(_fun114039, 15075, [31, 27, 9615, 33, 4501, 4573,
2]) /* metro module 15075, dependencies: [31, 27, 9615, 33, 4501, 4573, 2] */;
@@ -1,235 +1,274 @@
/* Metro module 15059; source: modules/search/native/components/list/SearchMediaImage.tsx; dependencies: [57, 31, 27, 4792, 33, 4501, 4048, 4002, 4840, 11139, 6692, 4564, 1477, 11558, 477, 1244, 10014, 9796, 9546, 566, 9783, 11143, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SearchMessageStore from '../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ImageUtilsModule from '../../../../../utils/native/ImageUtils.tsx'; /* Metro dependency 1477 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ObscureMediaModelsModule from '../../../../explicit_media_redaction/ObscureMediaModels.tsx'; /* Metro dependency 4840 */
import * as MediaSourceUtilModule from '../../../../media_viewer/native/MediaSourceUtil.tsx'; /* Metro dependency 9546 */
import * as CirclePlayIconModule from '../../../../../design/components/Icon/native/redesign/generated/CirclePlayIcon.tsx'; /* Metro dependency 9783 */
import * as UseContentHarmTypesModule from '../../../../explicit_media_redaction/hooks/useContentHarmTypes.tsx'; /* Metro dependency 9796 */
import * as ImageWithPlaceholderModule from '../../../../../components_native/common/ImageWithPlaceholder.tsx'; /* Metro dependency 10014 */
import * as AttachmentPreviewModule from '../../../../media/native/AttachmentPreview.tsx'; /* Metro dependency 11143 */
import * as MessageAttachmentUtilsModule from '../../../../messages/MessageAttachmentUtils.tsx'; /* Metro dependency 11558 */
function _fun113941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:6, offset: 0x0240d2ac, size: 375 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.ImageBackground;
const env0_6 = value2.StyleSheet;
const env0_7 = value2.View;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.Fragment;
const env0_11 = value3.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'justifyContent': 'center',
const env0_12 = (CreateStylesModule).createStyles({container: {'justifyContent': 'center',
'alignItems': 'center'}, sound: {'justifyContent': 'center', 'alignItems': 'center'}});
const env0_13 = value.memo(_fun113945);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/SearchMediaImage.tsx');
const env0_13 = ReactModule.memo(_fun113945);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/SearchMediaImage.tsx');
exports.SearchAttachmentMediaImage = SearchAttachmentMediaImage;
exports.SearchEmbedMediaImage = SearchEmbedMediaImage;
exports.SearchSoundMediaImage = SearchSoundMediaImage;
exports.SearchFileMediaImage = SearchFileMediaImage;
exports.SearchComponentMediaImage = SearchComponentMediaImage;
}
function SearchMediaObscurityIcon({obscureReason, height, width}) { // fn#113942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:354, offset: 0x0240d423, size: 329 bytes, params: 2, frame: 22
const styles = useStyles();
const r7 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? 'dark' : 'light';
const value5 = env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width]);
const value6 = env0_4.useMemo(_fun113944, [obscureReason]);
return (
<>
{((Component) => <Component blurTheme={r7} style={[StyleSheet.absoluteFill,
value5]} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}
{value6 != null && <View style={[StyleSheet.absoluteFill, styles.container]}>{value6}</View>}
</>
);
function _fun113944() { // fn#113944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:545, offset: 0x0240d583, size: 285 bytes, params: 1, frame: 15
const obscureReasonBinding = obscureReason;
const ObscureReason = (ObscureMediaModelsModule).ObscureReason;
const SPOILER = ObscureReason.SPOILER;
if (SPOILER === obscureReasonBinding) {
const SpoilerIcon = (require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon;
return <SpoilerIcon size="lg" />;
}
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
if (EXPLICIT_CONTENT === obscureReasonBinding) {
const ImageWarningIcon = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon size="lg" />;
}
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
if (GORE_CONTENT === obscureReasonBinding) {
const ImageWarningIcon2 = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon2 size="lg" />;
}
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
if (SELF_HARM_CONTENT === obscureReasonBinding) {
const ImageWarningIcon3 = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon3 size="lg" />;
}
const POTENTIAL_EXPLICIT_CONTENT = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
if (POTENTIAL_EXPLICIT_CONTENT === obscureReasonBinding) {
return null;
}
}
function SearchMediaObscurityIcon({obscureReason, height, width}) { // fn#113942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:354, offset: 0x0240d423, size: 329 bytes, params: 2, frame: 22
const styles = useStyles();
const r7 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? 'dark' : 'light';
const value5 = env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width]);
const value6 = env0_4.useMemo(_fun113944, [obscureReason]);
return (
<>
{((Component) => <Component blurTheme={r7} style={[StyleSheet.absoluteFill,
value5]} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}
{value6 != null && <View style={[StyleSheet.absoluteFill, styles.container]}>{value6}</View>}
</>
);
}
}
function _fun113945({mediaUrl, mediaHeight, mediaWidth, containerStyle, placeholder, placeholderVersion, renderFallback, obscureReason, containerHeight, containerWidth, scale}) { // fn#113945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:1040, offset: 0x0240d6a0, size: 745 bytes, params: 2, frame: 30
const ImageWithPlaceholder = (require(10014) /* metro dependency 10014: ImageWithPlaceholder */).ImageWithPlaceholder;
var r15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = env0_4.useMemo(function() {
return {height: containerHeight, width: containerWidth};
}, [containerHeight, containerWidth]);
if (mediaUrl == null) {
return renderFallback != null ? <>{renderFallback()}</> : null;
}
if (mediaHeight == null) {
return renderFallback != null ? <>{renderFallback()}</> : null;
}
if (mediaWidth == null) {
return renderFallback != null ? <>{renderFallback()}</> : null;
}
const value4 = containerHeight * scale;
const value5 = containerWidth * scale;
const value7 = env0_3(mediaWidth > mediaHeight ? [global.Math.round(mediaWidth * (value5 / mediaHeight)), value5] : [value4, global.Math.round(mediaHeight * (value4 / mediaWidth))], 2);
const srcWithWidthAndHeight = (require(1477) /* metro dependency 1477: ImageUtils */).getSrcWithWidthAndHeight({src: mediaUrl,
sourceWidth: mediaWidth, sourceHeight: mediaHeight, targetWidth: value7[0], targetHeight: value7[1],
format: 'png'});
const obscuredAlt = (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscuredAlt(obscureReason);
const r8 = obscureReason != null ? <SearchMediaObscurityIcon obscureReason={obscureReason} height={containerHeight} width={containerWidth} /> : null;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (obscureReason != null) {
function _fun113945({mediaUrl, mediaHeight, mediaWidth, containerStyle, placeholder, placeholderVersion, renderFallback, obscureReason, containerHeight, containerWidth, scale}) { // fn#113945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:1040, offset: 0x0240d6a0, size: 745 bytes, params: 2, frame: 30
const ImageWithPlaceholder = (ImageWithPlaceholderModule).ImageWithPlaceholder;
var r15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = env0_4.useMemo(function() {
return {height: containerHeight, width: containerWidth};
}, [containerHeight, containerWidth]);
if (mediaUrl == null) {
return (
<View style={containerStyle}>
<ImageBackground
style={value2}
source={{uri: srcWithWidthAndHeight}}
blurRadius={10}
resizeMode="cover"
accessibilityLabel={obscuredAlt}
/>
{r8}
</View>
renderFallback != null
? (
<>
{renderFallback()}
</>
)
: null
);
}
if (mediaHeight == null) {
return (
renderFallback != null
? (
<>
{renderFallback()}
</>
)
: null
);
}
if (mediaWidth == null) {
return (
renderFallback != null
? (
<>
{renderFallback()}
</>
)
: null
);
}
const value4 = containerHeight * scale;
const value5 = containerWidth * scale;
const value7 = Module00057(mediaWidth > mediaHeight ? [global.Math.round(mediaWidth * (value5 / mediaHeight)), value5] : [value4, global.Math.round(mediaHeight * (value4 / mediaWidth))], 2);
const srcWithWidthAndHeight = (ImageUtilsModule).getSrcWithWidthAndHeight({src: mediaUrl,
sourceWidth: mediaWidth, sourceHeight: mediaHeight, targetWidth: value7[0], targetHeight: value7[1],
format: 'png'});
const obscuredAlt = (MessageAttachmentUtilsModule).getObscuredAlt(obscureReason);
const r8 = (
obscureReason != null
? (
<SearchMediaObscurityIcon
obscureReason={obscureReason}
height={containerHeight}
width={containerWidth}
/>
)
: null
);
if (PlatformUtilsModule.isAndroid()) {
if (obscureReason != null) {
return (
<View style={containerStyle}>
<ImageBackground
style={value2}
source={{uri: srcWithWidthAndHeight}}
blurRadius={10}
resizeMode="cover"
accessibilityLabel={obscuredAlt}
/>
{r8}
</View>
);
}
}
return (
<View style={containerStyle}>
<ImageWithPlaceholder
style={value2}
uri={srcWithWidthAndHeight}
placeholder={placeholder}
placeholderVersion={placeholderVersion}
alt={PlatformUtilsModule.isAndroid() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jes7FG) : obscuredAlt}
/>
{r8}
</View>
);
}
const moduleValue4 = platformUtilsModule;
return (
<View style={containerStyle}>
<ImageWithPlaceholder
style={value2}
uri={srcWithWidthAndHeight}
placeholder={placeholder}
placeholderVersion={placeholderVersion}
alt={moduleValue4.isAndroid() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jes7FG) : obscuredAlt}
/>
{r8}
</View>
);
}
function SearchAttachmentMediaImage(a0) { // fn#113947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2164, offset: 0x0240d989, size: 237 bytes, params: 2, frame: 22
const attachment = a0.attachment;
const channelId = a0.channelId;
const authorId = a0.authorId;
const object2 = {'attachment': 0, 'channelId': 0, 'authorId': 0};
silentSetPrototypeOf(object2, null, undefined);
return ((Component) => <Component {...copyDataProperties({}, a0, object2,
undefined)} {...{['obscureReason']: env0_4.useMemo(_fun113948, [attachment,
(require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId)])}} {...{['mediaUrl']: (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(attachment)}} {...{['mediaHeight']: attachment.height}} {...{['mediaWidth']: attachment.width}} />)(env0_13);
}
function SearchAttachmentMediaImage(a0) { // fn#113947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2164, offset: 0x0240d989, size: 237 bytes, params: 2, frame: 22
const attachment = a0.attachment;
const channelId = a0.channelId;
const authorId = a0.authorId;
const object = {'attachment': 0, 'channelId': 0, 'authorId': 0};
silentSetPrototypeOf(object, null, undefined);
return ((Component) => <Component {...copyDataProperties({}, a0, object,
undefined)} {...{['obscureReason']: env0_4.useMemo(_fun113948, [attachment,
(UseContentHarmTypesModule).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId)])}} {...{['mediaUrl']: (MediaSourceUtilModule).getAttachmentUrl(attachment)}} {...{['mediaHeight']: attachment.height}} {...{['mediaWidth']: attachment.width}} />)(env0_13);
function _fun113948() { // fn#113948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2325, offset: 0x0240da76, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (MessageAttachmentUtilsModule).getObscureReasonForAttachment(attachment,
env0_1);
}
function SearchEmbedMediaImage(a0) { // fn#113949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2523, offset: 0x0240daa8, size: 358 bytes, params: 2, frame: 22
const embed = a0.embed;
const env0_1 = a0.sources;
const env0_2 = a0.messageId;
const channelId = a0.channelId;
const authorId = a0.authorId;
const object2 = {'embed': 0, 'sources': 0, 'messageId': 0, 'channelId': 0, 'authorId': 0};
const value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, channelId);
const value4 = undefined;
const env0_3 = (require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId);
const obscureReasonForEmbed = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
_fun113950);
const thumbnail = embed.thumbnail;
const embedMedia = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getEmbedMedia(embed);
let r7 = value != embedMedia ? (require(9546) /* metro dependency 9546: MediaSourceUtil */).getEmbedUrl(embedMedia) : value;
r7 = value != thumbnail ? thumbnail.url : r7;
return ((Component) => <Component {...value2} {...{['obscureReason']: obscureReasonForEmbed}} {...{['mediaUrl']: r7}} {...{['mediaHeight']: value != thumbnail ? thumbnail.height : value == embedMedia ? value4 : embedMedia.height}} {...{['mediaWidth']: value != thumbnail ? thumbnail.width : value == embedMedia ? value4 : embedMedia.width}} />)(env0_13);
}
function SearchSoundMediaImage({height, width, containerStyle}) { // fn#113951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3179, offset: 0x0240dca1, size: 174 bytes, params: 2, frame: 19
const styles = useStyles();
const items2 = [styles.sound, containerStyle, env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width])];
const CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
return (
<View style={items2}>
<CirclePlayIcon size="lg" color="interactive-text-default" />
</View>
);
}
function SearchFileMediaImage({fileName, height, width, containerStyle}) { // fn#113953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3442, offset: 0x0240dd4f, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.sound, containerStyle, env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width])];
const AttachmentIcon = (require(11143) /* metro dependency 11143: AttachmentPreview */).AttachmentIcon;
return (
<View style={items2}>
<AttachmentIcon fileName={fileName} />
</View>
);
}
function SearchComponentMediaImage(a0) { // fn#113955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3688, offset: 0x0240ddfc, size: 248 bytes, params: 2, frame: 22
const unfurledMediaItem = a0.unfurledMediaItem;
const sources = a0.sources;
const channelId = a0.channelId;
const authorId = a0.authorId;
const isBot = a0.isBot;
const object2 = {'unfurledMediaItem': 0, 'sources': 0, 'channelId': 0, 'authorId': 0, 'isBot': 0};
silentSetPrototypeOf(object2, null, undefined);
return ((Component) => <Component {...copyDataProperties({}, a0, object2,
undefined)} {...{['obscureReason']: env0_4.useMemo(_fun113956, [unfurledMediaItem,
(require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId), sources,
isBot])}} {...{['mediaUrl']: unfurledMediaItem.proxyUrl}} {...{['mediaHeight']: unfurledMediaItem.height}} {...{['mediaWidth']: unfurledMediaItem.width}} />)(env0_13);
}
function _fun113944() { // fn#113944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:545, offset: 0x0240d583, size: 285 bytes, params: 1, frame: 15
const obscureReasonBinding = obscureReason;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const SPOILER = ObscureReason.SPOILER;
if (SPOILER === obscureReasonBinding) {
const SpoilerIcon = (require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon;
return <SpoilerIcon size="lg" />;
}
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
if (EXPLICIT_CONTENT === obscureReasonBinding) {
const ImageWarningIcon = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon size="lg" />;
function SearchEmbedMediaImage(a0) { // fn#113949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2523, offset: 0x0240daa8, size: 358 bytes, params: 2, frame: 22
const embed = a0.embed;
const env0_1 = a0.sources;
const env0_2 = a0.messageId;
const channelId = a0.channelId;
const authorId = a0.authorId;
const object = {'embed': 0, 'sources': 0, 'messageId': 0, 'channelId': 0, 'authorId': 0};
const value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, channelId);
const value4 = undefined;
const env0_3 = (UseContentHarmTypesModule).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId);
const obscureReasonForEmbed = (FluxModule).useStateFromStores([SearchMessageStore],
_fun113950);
const thumbnail = embed.thumbnail;
const embedMedia = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getEmbedMedia(embed);
let r7 = value != embedMedia ? (require(9546) /* metro dependency 9546: MediaSourceUtil */).getEmbedUrl(embedMedia) : value;
r7 = value != thumbnail ? thumbnail.url : r7;
return ((Component) => <Component {...value2} {...{['obscureReason']: obscureReasonForEmbed}} {...{['mediaUrl']: r7}} {...{['mediaHeight']: value != thumbnail ? thumbnail.height : value == embedMedia ? value4 : embedMedia.height}} {...{['mediaWidth']: value != thumbnail ? thumbnail.width : value == embedMedia ? value4 : embedMedia.width}} />)(env0_13);
function _fun113950() { // fn#113950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2718, offset: 0x0240dc0e, size: 147 bytes, params: 1, frame: 20
const value = environment.__proto__;
const message = SearchMessageStore.getMessage(messageId);
if (message == null) {
return null;
}
const value4 = undefined;
const value5 = MediaSourceUtilModule.flattenSource(sources, false);
const spoiler = value5 == null ? value4 : value5.spoiler;
return (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscureReasonForEmbed(embed,
message, spoiler != null && spoiler, env0_3);
}
}
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
if (GORE_CONTENT === obscureReasonBinding) {
const ImageWarningIcon2 = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon2 size="lg" />;
function SearchSoundMediaImage({height, width, containerStyle}) { // fn#113951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3179, offset: 0x0240dca1, size: 174 bytes, params: 2, frame: 19
const styles = useStyles();
const items2 = [styles.sound, containerStyle, env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width])];
const CirclePlayIcon = (CirclePlayIconModule).CirclePlayIcon;
return (
<View style={items2}>
<CirclePlayIcon size="lg" color="interactive-text-default" />
</View>
);
}
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
if (SELF_HARM_CONTENT === obscureReasonBinding) {
const ImageWarningIcon3 = (require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon;
return <ImageWarningIcon3 size="lg" />;
function SearchFileMediaImage({fileName, height, width, containerStyle}) { // fn#113953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3442, offset: 0x0240dd4f, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.sound, containerStyle, env0_4.useMemo(function() {
return {height: height, width: width};
}, [height, width])];
const AttachmentIcon = (AttachmentPreviewModule).AttachmentIcon;
return (
<View style={items2}>
<AttachmentIcon fileName={fileName} />
</View>
);
}
const POTENTIAL_EXPLICIT_CONTENT = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
if (POTENTIAL_EXPLICIT_CONTENT === obscureReasonBinding) {
return null;
function SearchComponentMediaImage(a0) { // fn#113955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3688, offset: 0x0240ddfc, size: 248 bytes, params: 2, frame: 22
const unfurledMediaItem = a0.unfurledMediaItem;
const sources = a0.sources;
const channelId = a0.channelId;
const authorId = a0.authorId;
const isBot = a0.isBot;
const object = {'unfurledMediaItem': 0, 'sources': 0, 'channelId': 0, 'authorId': 0, 'isBot': 0};
silentSetPrototypeOf(object, null, undefined);
return ((Component) => <Component {...copyDataProperties({}, a0, object,
undefined)} {...{['obscureReason']: env0_4.useMemo(_fun113956, [unfurledMediaItem,
(UseContentHarmTypesModule).useEnabledHarmTypesBitmaskForChannelAndAuthorId(channelId,
authorId), sources,
isBot])}} {...{['mediaUrl']: unfurledMediaItem.proxyUrl}} {...{['mediaHeight']: unfurledMediaItem.height}} {...{['mediaWidth']: unfurledMediaItem.width}} />)(env0_13);
function _fun113956() { // fn#113956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3873, offset: 0x0240def4, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(11558) /* metro dependency 11558: MessageAttachmentUtils */;
const getObscureReasonForUnfurledMediaItem = value.getObscureReasonForUnfurledMediaItem;
const unfurledMediaItemBinding = unfurledMediaItem;
const value3 = MediaSourceUtilModule.flattenSource(sources);
return Reflect.apply(getObscureReasonForUnfurledMediaItem, value, [unfurledMediaItemBinding, Module00057,
!(value3 == null || !value3.spoiler), isBot]);
}
}
}
function _fun113948() { // fn#113948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2325, offset: 0x0240da76, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscureReasonForAttachment(attachment,
env0_1);
}
function _fun113950() { // fn#113950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:2718, offset: 0x0240dc0e, size: 147 bytes, params: 1, frame: 20
const value = environment.__proto__;
const message = SearchMessageStore.getMessage(messageId);
if (message == null) {
return null;
}
const value4 = undefined;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const value5 = mediaSourceUtilModule.flattenSource(sources, false);
const spoiler = value5 == null ? value4 : value5.spoiler;
return (require(11558) /* metro dependency 11558: MessageAttachmentUtils */).getObscureReasonForEmbed(embed,
message, spoiler != null && spoiler, env0_3);
}
function _fun113956() { // fn#113956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15256:3873, offset: 0x0240def4, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(11558) /* metro dependency 11558: MessageAttachmentUtils */;
const getObscureReasonForUnfurledMediaItem = value.getObscureReasonForUnfurledMediaItem;
const unfurledMediaItemBinding = unfurledMediaItem;
const binding = env0_3;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const value3 = mediaSourceUtilModule.flattenSource(sources);
return Reflect.apply(getObscureReasonForUnfurledMediaItem, value, [unfurledMediaItemBinding, binding,
!(value3 == null || !value3.spoiler), isBot]);
}
global.__d(_fun113941, 15059, [57, 31, 27, 4792, 33, 4501, 4048, 4002, 4840, 11139, 6692, 4564, 1477, 11558, 477,
1244, 10014, 9796, 9546, 566, 9783, 11143,
2]) /* metro module 15059, dependencies: [57, 31, 27, 4792, 33, 4501, 4048, 4002, 4840, 11139, 6692, 4564, 1477, 11558, 477, 1244, 10014, 9796, 9546, 566, 9783, 11143, 2] */;
@@ -1,204 +1,241 @@
/* Metro module 15045; source: modules/search/native/components/list/rows/DMRow.tsx; dependencies: [5, 57, 31, 27, 4502, 4396, 3793, 661, 33, 4501, 697, 4573, 3995, 8829, 566, 8706, 1305, 9098, 12229, 15046, 2] */
import Module00005 from '../../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import RelationshipStore from '../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserUtils from '../../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import PresenceStore from '../../../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import AccessibilityStore from '../../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SearchListRowModule from '../SearchListRow.tsx'; /* Metro dependency 15046 */
function _fun113849(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:6, offset: 0x024089fe, size: 435 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.View;
const env0_7 = value2.ActivityIndicator;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.StatusTypes;
const env0_12 = constantsModule.RelationshipTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_13 = value4.jsx;
const env0_14 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
const env0_15 = Reflect.apply(createStyles, createStylesModule, [{activityStatusIcon: {'width': 14, 'height': 14},
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
const env0_15 = Reflect.apply(createStyles, CreateStylesModule, [{activityStatusIcon: {'width': 14, 'height': 14},
activityStatusText: {'color': null, 'fontSize': 14, 'lineHeight': 18, 'fontWeight': '400', color: TEXT_SUBTLE},
tag: {marginLeft: 4}, title: {flexDirection: 'row'}}]);
value = value.memo(DMRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/DMRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/DMRow.tsx');
exports.default = value;
}
function FriendPresence({user, type, animate, guildId}) { // fn#113850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:483, offset: 0x02408bb1, size: 211 bytes, params: 2, frame: 19
var r0;
var Text;
var value;
const styles = useStyles();
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
if (type === PENDING_INCOMING) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = require(3995) /* metro dependency 3995: UserUtils */;
value = <Text lineClamp={1} variant="text-sm/medium" color="text-default">{value.getUserTag(user)}</Text>;
r0 = value;
} else {
value = importDefault(8829) /* metro dependency 8829: ActivityStatus */;
value = ((Component) => <Component userId={user.id} guildId={guildId} iconStyle={styles.activityStatusIcon} textStyle={styles.activityStatusText} emojiSize={16} animate={animate} />)(value);
r0 = value;
function FriendPresence({user, type, animate, guildId}) { // fn#113850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:483, offset: 0x02408bb1, size: 211 bytes, params: 2, frame: 19
var r0;
var Text;
var value;
const styles = useStyles();
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
if (type === PENDING_INCOMING) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = require(3995) /* metro dependency 3995: UserUtils */;
value = (
<Text
lineClamp={1}
variant="text-sm/medium"
color="text-default"
>
{value.getUserTag(user)}
</Text>
);
r0 = value;
} else {
value = importDefault(8829) /* metro dependency 8829: ActivityStatus */;
value = ((Component) => <Component userId={user.id} guildId={guildId} iconStyle={styles.activityStatusIcon} textStyle={styles.activityStatusText} emojiSize={16} animate={animate} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
function DMRow({user, nickname, premiumSince, isOwner, type, guildId, onPress, trailing, accessibilityActions, onAccessibilityAction}) { // fn#113851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:828, offset: 0x02408c84, size: 641 bytes, params: 2, frame: 34
const env0_3 = isOwner;
const env0_4 = type;
const env0_5 = guildId;
const styles = useStyles();
let binding = env0_5;
const [property, env0_8] = env0_4(binding.useState(false), 2);
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() {
var object = {};
var userBinding = user;
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
object.status = PresenceStore.getStatus(userBinding.id);
return object;
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun113854);
const value7 = binding.useCallback(env0_3(_fun113856), [onPress, user.id]);
const r20 = value5 ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
binding = env0_5;
const value9 = binding.useMemo(_fun113857, [styles.title, styles.tag, r20, user, isOwner, premiumSince]);
const value10 = binding.useMemo(_fun113858, [user, status, isMobileOnline, isVROnline, guildId]);
const value11 = binding.useMemo(_fun113859, [user, guildId, type, useReducedMotion]);
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
return (
<SearchListRow
label={value9}
subLabel={value11}
icon={value10}
onPress={value7}
trailing={property ? <ActivityIndicator /> : trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
function _fun113854() { // fn#113854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1308, offset: 0x02408f55, size: 48 bytes, params: 1, frame: 12
return nickname ?? RelationshipStore.getNickname(user.id);
}
function* _fun113856() { // fn#113856, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1367, offset: 0x02408f90, size: 97 bytes, params: 1, frame: 14
var id;
var value3;
var value4;
var value5;
var error;
if (true) {
value = environment.__proto__;
AccessibilityStore(true);
try {
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
id = require.id;
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
value3 = View(id);
} catch (error) {
AccessibilityStore(false);
throw error;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
AccessibilityStore(false);
throw error;
}
if (value5) {
AccessibilityStore(false);
return value4;
}
AccessibilityStore(false);
}
}
function _fun113857() { // fn#113857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1476, offset: 0x02408ff1, size: 531 bytes, params: 1, frame: 26
var r5;
var BotTag;
var isSystemUser2;
var Types;
const value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{env0_13}</Text>];
const bot = user.bot;
if (bot) {
BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
var defaultImportProps = {style: styles.tag};
userBinding = user;
defaultImportProps.verified = userBinding.isVerifiedBot();
isSystemUser2 = userBinding.isSystemUser();
Types = (importDefault(8706) /* metro dependency 8706: BotTag */).Types;
defaultImportProps.type = isSystemUser2 ? Types.SYSTEM_DM : Types.BOT;
r5 = <BotTag {...defaultImportProps} />;
} else {
r5 = bot;
}
items2[1] = r5;
items2[2] = isOwner && <View style={styles.tag}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(9098) /* metro dependency 9098 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
items2[3] = premiumSince != null && <View style={styles.tag}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(12229) /* metro dependency 12229 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
return (
<View style={styles.title}>
{items2}
</View>
);
}
function _fun113858() { // fn#113858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:2036, offset: 0x02409204, size: 165 bytes, params: 1, frame: 19
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {user: user, guildId: guildId};
const OFFLINE = StatusTypes.OFFLINE;
avatarProps.status = OFFLINE === status ? null : status;
avatarProps.isMobileOnline = isMobileOnline;
avatarProps.isVROnline = isVROnline;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
avatarProps.avatarDecoration = user.avatarDecoration;
avatarProps.autoStatusCutout = true;
return <Avatar {...avatarProps} />;
}
function _fun113859() { // fn#113859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:2254, offset: 0x024092a9, size: 187 bytes, params: 1, frame: 18
const value = environment.__proto__;
const userTag = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
const value4 = null;
if (value4 == userTag || user.isProvisional) {
return value4 != type ? <FriendPresence user={user} guildId={guildId} type={type} animate={!useReducedMotion} /> : value4;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
function DMRow({user, nickname, premiumSince, isOwner, type, guildId, onPress, trailing, accessibilityActions, onAccessibilityAction}) { // fn#113851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:828, offset: 0x02408c84, size: 641 bytes, params: 2, frame: 34
const isOwner2 = isOwner;
const type2 = type;
const guildId2 = guildId;
const styles = useStyles();
let binding = guildId2;
const [property, env0_8] = type2(binding.useState(false), 2);
const {isMobileOnline, isVROnline,
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() {
var object = {};
var presenceStoreBinding = PresenceStore;
var userBinding = user;
object.isMobileOnline = presenceStoreBinding.isMobileOnline(userBinding.id);
object.isVROnline = presenceStoreBinding.isVROnline(userBinding.id);
object.status = presenceStoreBinding.getStatus(userBinding.id);
return object;
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun113854);
const value7 = binding.useCallback(isOwner2(_fun113856), [onPress, user.id]);
const r20 = value5 ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
binding = guildId2;
const value9 = binding.useMemo(_fun113857, [styles.title, styles.tag, r20, user, isOwner, premiumSince]);
const value10 = binding.useMemo(_fun113858, [user, status, isMobileOnline, isVROnline, guildId]);
const value11 = binding.useMemo(_fun113859, [user, guildId, type, useReducedMotion]);
const SearchListRow = (SearchListRowModule).SearchListRow;
return (
<Text variant="text-sm/medium" color="text-muted">
{userTag}
</Text>
<SearchListRow
label={value9}
subLabel={value11}
icon={value10}
onPress={value7}
trailing={property
? (
<ActivityIndicator />
)
: trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
function _fun113854() { // fn#113854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1308, offset: 0x02408f55, size: 48 bytes, params: 1, frame: 12
return nickname ?? RelationshipStore.getNickname(user.id);
}
function* _fun113856() { // fn#113856, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1367, offset: 0x02408f90, size: 97 bytes, params: 1, frame: 14
var id;
var value3;
var value4;
var value5;
var error;
if (true) {
value = environment.__proto__;
AccessibilityStore(true);
try {
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
id = require.id;
} catch (error) {
AccessibilityStore(false);
throw error;
}
try {
value3 = View(id);
} catch (error) {
AccessibilityStore(false);
throw error;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
AccessibilityStore(false);
throw error;
}
if (value5) {
AccessibilityStore(false);
return value4;
}
AccessibilityStore(false);
}
}
function _fun113857() { // fn#113857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:1476, offset: 0x02408ff1, size: 531 bytes, params: 1, frame: 26
var r5;
var BotTag;
var isSystemUser2;
var Types;
const value = environment.__proto__;
const Text = (TextModule).Text;
const items2 = [
<Text
lineClamp={1}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{JsxRuntimeModule.jsx}
</Text>,
];
const bot = user.bot;
if (bot) {
BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
var defaultImportProps = {style: styles.tag};
userBinding = user;
defaultImportProps.verified = userBinding.isVerifiedBot();
isSystemUser2 = userBinding.isSystemUser();
Types = (importDefault(8706) /* metro dependency 8706: BotTag */).Types;
defaultImportProps.type = isSystemUser2 ? Types.SYSTEM_DM : Types.BOT;
r5 = <BotTag {...defaultImportProps} />;
} else {
r5 = bot;
}
items2[1] = r5;
items2[2] = isOwner && <View style={styles.tag}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(9098) /* metro dependency 9098 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
items2[3] = premiumSince != null && <View style={styles.tag}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(12229) /* metro dependency 12229 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
return (
<View style={styles.title}>
{items2}
</View>
);
}
function _fun113858() { // fn#113858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:2036, offset: 0x02409204, size: 165 bytes, params: 1, frame: 19
const Avatar = (NativeModule).Avatar;
const avatarProps = {user: user, guildId: guildId};
const OFFLINE = StatusTypes.OFFLINE;
avatarProps.status = OFFLINE === status ? null : status;
avatarProps.isMobileOnline = isMobileOnline;
avatarProps.isVROnline = isVROnline;
const AvatarSizes = (NativeModule).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
avatarProps.avatarDecoration = user.avatarDecoration;
avatarProps.autoStatusCutout = true;
return <Avatar {...avatarProps} />;
}
function _fun113859() { // fn#113859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15242:2254, offset: 0x024092a9, size: 187 bytes, params: 1, frame: 18
const value = environment.__proto__;
const userTag = (UserUtils).getUserTag(user);
const value4 = null;
if (value4 == userTag || user.isProvisional) {
return (
value4 != type
? (
<FriendPresence
user={user}
guildId={guildId}
type={type}
animate={!useReducedMotion}
/>
)
: value4
);
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/medium" color="text-muted">
{userTag}
</Text>
);
}
}
}
}
global.__d(_fun113849, 15045, [5, 57, 31, 27, 4502, 4396, 3793, 661, 33, 4501, 697, 4573, 3995, 8829, 566, 8706,
1305, 9098, 12229, 15046,
2]) /* metro module 15045, dependencies: [5, 57, 31, 27, 4502, 4396, 3793, 661, 33, 4501, 697, 4573, 3995, 8829, 566, 8706, 1305, 9098, 12229, 15046, 2] */;
@@ -1,130 +1,145 @@
/* Metro module 15071; source: modules/search/native/components/list/rows/FileGridItem.tsx; dependencies: [31, 27, 1379, 9615, 33, 4501, 4631, 6697, 9759, 10968, 566, 8430, 15059, 15061, 4655, 2] */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GetDisplayFilename from '../../../../../messages/getDisplayFilename.tsx'; /* Metro dependency 8430 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as MediaFormatTestersModule from '../../../../../messages/MediaFormatTesters.tsx'; /* Metro dependency 4631 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchListCardModule from '../SearchListCard.tsx'; /* Metro dependency 15061 */
function _fun114023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:6, offset: 0x0241142a, size: 293 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.useWindowDimensions;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_7 = searchConstantsModule.FILE_OR_LINK_IMAGE_BUFFER;
const env0_8 = searchConstantsModule.SearchFileTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({icon: {'alignItems': 'center',
let value = ReactModule;
const env0_11 = (CreateStylesModule).createStyles({icon: {'alignItems': 'center',
'justifyContent': 'center'}});
value = value.memo(FileGridItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/FileGridItem.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/FileGridItem.tsx');
exports.default = value;
}
function getAttachmentIcon(a0) { // fn#114024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:323, offset: 0x0241154f, size: 220 bytes, params: 2, frame: 16
const mediaFormatTestersModule = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (mediaFormatTestersModule.isImageFile(a0)) {
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
return <ImageIcon size="lg" color="interactive-text-default" />;
} else if (mediaFormatTestersModule.isVideoFile(a0)) {
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
return <VideoIcon size="lg" color="interactive-text-default" />;
} else {
const FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
return <FileIcon size="lg" color="interactive-text-default" />;
function getAttachmentIcon(a0) { // fn#114024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:323, offset: 0x0241154f, size: 220 bytes, params: 2, frame: 16
if (MediaFormatTestersModule.isImageFile(a0)) {
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
return <ImageIcon size="lg" color="interactive-text-default" />;
} else if (MediaFormatTestersModule.isVideoFile(a0)) {
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
return <VideoIcon size="lg" color="interactive-text-default" />;
} else {
const FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
return <FileIcon size="lg" color="interactive-text-default" />;
}
}
}
function FileGridItem({data, onPress, imageStyle, containerStyle}) { // fn#114025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:617, offset: 0x0241162b, size: 559 bytes, params: 2, frame: 27
const styles = useStyles();
const env0_3 = styles;
const scale = useWindowDimensions().scale;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(data.channelId);
});
let binding = env0_3;
const value3 = binding.useMemo(function() {
return data.author.getAvatarSource(channel?.guild_id);
}, [data.author, channel?.guild_id]);
const value4 = (importDefault(8430) /* metro dependency 8430: getDisplayFilename */)(data.attachment);
const size = data.attachment.size;
binding = env0_3;
const value5 = binding.useCallback(function() {
var onPressBinding = onPress;
var dataBinding = data;
onPressBinding({channelId: dataBinding.channelId, messageId: dataBinding.messageId});
}, [data.channelId, data.messageId, onPress]);
const value6 = binding.useMemo(_fun114029, [data, value4, imageStyle, scale, styles.icon]);
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
const SearchListCardThumbnail = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardThumbnail;
const items2 = [<SearchListCardThumbnail thumbnail={value6} />];
const SearchListCardContent = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContent;
items2[1] = <SearchListCardContent label={value4} subLabel={size > 0 ? (require(4655) /* metro dependency 4655: FileUtils */).sizeString(size) : undefined} />;
const SearchListCardFooter = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardFooter;
items2[2] = <SearchListCardFooter author={data.author} avatarSource={value3} channel={channel} />;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value5}>
{items2}
</SearchListCardContainer>
);
}
function _fun114029() { // fn#114029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:1046, offset: 0x024118d3, size: 357 bytes, params: 1, frame: 18
var SearchSoundMediaImage;
var imageStyleBinding;
var SearchFileMediaImage;
var SearchAttachmentMediaImage;
const type = data.type;
const MEDIA_ATTACHMENT = SearchFileTypes.MEDIA_ATTACHMENT;
if (MEDIA_ATTACHMENT === type) {
SearchAttachmentMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchAttachmentMediaImage;
imageStyleBinding = imageStyle;
dataBinding = data;
return (
<SearchAttachmentMediaImage
containerStyle={imageStyleBinding}
attachment={dataBinding.attachment}
channelId={dataBinding.channelId}
authorId={dataBinding.author.id}
scale={scale}
containerHeight={imageStyleBinding.height + FILE_OR_LINK_IMAGE_BUFFER}
containerWidth={imageStyleBinding.width + FILE_OR_LINK_IMAGE_BUFFER}
renderFallback={renderFallback_114030}
function FileGridItem({data, onPress, imageStyle, containerStyle}) { // fn#114025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:617, offset: 0x0241162b, size: 559 bytes, params: 2, frame: 27
const styles = useStyles();
const styles2 = styles;
const scale = useWindowDimensions().scale;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(data.channelId);
});
let binding = styles2;
const value3 = binding.useMemo(function() {
return data.author.getAvatarSource(channel?.guild_id);
}, [data.author, channel?.guild_id]);
const value4 = (GetDisplayFilename)(data.attachment);
const size = data.attachment.size;
binding = styles2;
const value5 = binding.useCallback(function() {
var onPressBinding = onPress;
var dataBinding = data;
onPressBinding({channelId: dataBinding.channelId, messageId: dataBinding.messageId});
}, [data.channelId, data.messageId, onPress]);
const value6 = binding.useMemo(_fun114029, [data, value4, imageStyle, scale, styles.icon]);
const SearchListCardContainer = (SearchListCardModule).SearchListCardContainer;
const SearchListCardThumbnail = (SearchListCardModule).SearchListCardThumbnail;
const items2 = [
<SearchListCardThumbnail thumbnail={value6} />,
];
const SearchListCardContent = (SearchListCardModule).SearchListCardContent;
items2[1] = (
<SearchListCardContent
label={value4}
subLabel={size > 0 ? (require(4655) /* metro dependency 4655: FileUtils */).sizeString(size) : undefined}
/>
);
}
const ATTACHMENT = SearchFileTypes.ATTACHMENT;
if (ATTACHMENT === type) {
SearchFileMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchFileMediaImage;
imageStyleBinding = imageStyle;
return (
<SearchFileMediaImage
fileName={env0_6}
containerStyle={imageStyleBinding}
height={imageStyleBinding.height}
width={imageStyleBinding.width}
const SearchListCardFooter = (SearchListCardModule).SearchListCardFooter;
items2[2] = (
<SearchListCardFooter
author={data.author}
avatarSource={value3}
channel={channel}
/>
);
}
const AUDIO = SearchFileTypes.AUDIO;
if (AUDIO === type) {
SearchSoundMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchSoundMediaImage;
imageStyleBinding = imageStyle;
return (
<SearchSoundMediaImage
containerStyle={imageStyleBinding}
height={imageStyleBinding.height}
width={imageStyleBinding.width}
/>
<SearchListCardContainer containerStyle={containerStyle} onPress={value5}>
{items2}
</SearchListCardContainer>
);
function _fun114029() { // fn#114029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:1046, offset: 0x024118d3, size: 357 bytes, params: 1, frame: 18
var SearchSoundMediaImage;
var imageStyleBinding;
var SearchFileMediaImage;
var SearchAttachmentMediaImage;
const type = data.type;
const MEDIA_ATTACHMENT = SearchFileTypes.MEDIA_ATTACHMENT;
if (MEDIA_ATTACHMENT === type) {
SearchAttachmentMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchAttachmentMediaImage;
imageStyleBinding = imageStyle;
dataBinding = data;
return (
<SearchAttachmentMediaImage
containerStyle={imageStyleBinding}
attachment={dataBinding.attachment}
channelId={dataBinding.channelId}
authorId={dataBinding.author.id}
scale={scale}
containerHeight={imageStyleBinding.height + FILE_OR_LINK_IMAGE_BUFFER}
containerWidth={imageStyleBinding.width + FILE_OR_LINK_IMAGE_BUFFER}
renderFallback={renderFallback_114030}
/>
);
}
const ATTACHMENT = SearchFileTypes.ATTACHMENT;
if (ATTACHMENT === type) {
SearchFileMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchFileMediaImage;
imageStyleBinding = imageStyle;
return (
<SearchFileMediaImage
fileName={env0_6}
containerStyle={imageStyleBinding}
height={imageStyleBinding.height}
width={imageStyleBinding.width}
/>
);
}
const AUDIO = SearchFileTypes.AUDIO;
if (AUDIO === type) {
SearchSoundMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchSoundMediaImage;
imageStyleBinding = imageStyle;
return (
<SearchSoundMediaImage
containerStyle={imageStyleBinding}
height={imageStyleBinding.height}
width={imageStyleBinding.width}
/>
);
}
function renderFallback_114030() { // fn#114030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:1295, offset: 0x02411a38, size: 84 bytes, params: 1, frame: 16
return (
<View style={[styles.icon, imageStyle]}>
{getAttachmentIcon(data.attachment.filename)}
</View>
);
}
}
}
}
function renderFallback_114030() { // fn#114030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15268:1295, offset: 0x02411a38, size: 84 bytes, params: 1, frame: 16
return (
<View style={[styles.icon, imageStyle]}>
{getAttachmentIcon(data.attachment.filename)}
</View>
);
}
global.__d(_fun114023, 15071, [31, 27, 1379, 9615, 33, 4501, 4631, 6697, 9759, 10968, 566, 8430, 15059, 15061, 4655,
2]) /* metro module 15071, dependencies: [31, 27, 1379, 9615, 33, 4501, 4631, 6697, 9759, 10968, 566, 8430, 15059, 15061, 4655, 2] */;
@@ -1,41 +1,60 @@
/* Metro module 15074; source: modules/search/native/components/list/rows/GenericTextRow.tsx; dependencies: [5, 31, 27, 33, 4501, 4573, 15046, 2] */
import Module00005 from '../../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SearchListRowModule from '../SearchListRow.tsx'; /* Metro dependency 15046 */
function _fun114035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:6, offset: 0x02411c27, size: 240 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
let 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 env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {flexDirection: 'row'},
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({title: {flexDirection: 'row'},
container: {padding: 10}});
value = value.memo(GenericTextRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GenericTextRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/GenericTextRow.tsx');
exports.default = value;
}
function GenericTextRow({text, icon, onPress, trailing, accessibilityActions, onAccessibilityAction}) { // fn#114036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:236, offset: 0x02411d17, size: 277 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_3.useCallback(Module00005(_fun114038), [onPress, text]);
const Text = (TextModule).Text;
const view = (
<View style={styles.title}>
<Text
lineClamp={1}
variant="text-md/medium"
color="mobile-text-heading-primary"
style={styles.container}
>
{text}
</Text>
</View>
);
const SearchListRow = (SearchListRowModule).SearchListRow;
return (
<SearchListRow
icon={icon != null && ((Component) => <Component size="sm" color="mobile-text-heading-primary" />)(icon)}
label={view}
onPress={value3}
trailing={trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
function* _fun114038() { // fn#114038, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:374, offset: 0x02411e37, size: 44 bytes, params: 1, frame: 12
if (true) {
value = environment.__proto__;
yield dependencyMap(require);
}
}
function GenericTextRow({text, icon, onPress, trailing, accessibilityActions, onAccessibilityAction}) { // fn#114036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:236, offset: 0x02411d17, size: 277 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_3.useCallback(env0_2(_fun114038), [onPress, text]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.title}><Text lineClamp={1} variant="text-md/medium" color="mobile-text-heading-primary" style={styles.container}>{text}</Text></View>;
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
return (
<SearchListRow
icon={icon != null && ((Component) => <Component size="sm" color="mobile-text-heading-primary" />)(icon)}
label={view}
onPress={value3}
trailing={trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
function* _fun114038() { // fn#114038, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15271:374, offset: 0x02411e37, size: 44 bytes, params: 1, frame: 12
if (true) {
value = environment.__proto__;
yield dependencyMap(require);
}
}
global.__d(_fun114035, 15074, [5, 31, 27, 33, 4501, 4573, 15046,
2]) /* metro module 15074, dependencies: [5, 31, 27, 33, 4501, 4573, 15046, 2] */;
@@ -1,38 +1,50 @@
/* Metro module 15047; source: modules/search/native/components/list/rows/GroupDMRow.tsx; dependencies: [31, 33, 4805, 9719, 1305, 12127, 4573, 15046, 2] */
import UseChannelName from '../../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import GroupDMAvatar from '../../../../../group_dm/native/GroupDMAvatar.tsx'; /* Metro dependency 9719 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseRecipientsLabelModule from '../../../../../main_tabs_v2/useRecipientsLabel.tsx'; /* Metro dependency 12127 */
import * as SearchListRowModule from '../SearchListRow.tsx'; /* Metro dependency 15046 */
function _fun113863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15244:6, offset: 0x024096f3, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GroupDMRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/GroupDMRow.tsx');
exports.default = GroupDMRow_113864;
function GroupDMRow_113864({channel, trailing, onPress, onAccessibilityAction, accessibilityActions}) { // fn#113864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15244:221, offset: 0x02409781, size: 360 bytes, params: 2, frame: 24
const value3 = (UseChannelName)(channel);
const value4 = ReactModule.useCallback(function() {
onPress(channel.id);
}, [channel.id, onPress]);
const AvatarSizes = (NativeModule).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
const groupDMAvatar = <GroupDMAvatar size={LARGE_48} channel={channel} />;
const value6 = (UseRecipientsLabelModule).useRecipientsLabel(channel);
const r7 = (
value6 != null
? ((Text) => <Text variant="text-xs/medium" color="text-muted" lineClamp={1}>{value6}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: undefined
);
const SearchListRow = (SearchListRowModule).SearchListRow;
const value = '';
return (
<SearchListRow
label={value3 ?? value}
icon={groupDMAvatar}
onPress={value4}
accessibilityLabel={value3 ?? value}
subLabel={r7}
trailing={trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
}
function GroupDMRow_113864({channel, trailing, onPress, onAccessibilityAction, accessibilityActions}) { // fn#113864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15244:221, offset: 0x02409781, size: 360 bytes, params: 2, frame: 24
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const value4 = env0_3.useCallback(function() {
onPress(channel.id);
}, [channel.id, onPress]);
const GroupDMAvatar = importDefault(9719) /* metro dependency 9719: GroupDMAvatar */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
const groupDMAvatar = <GroupDMAvatar size={LARGE_48} channel={channel} />;
const value6 = (require(12127) /* metro dependency 12127: useRecipientsLabel */).useRecipientsLabel(channel);
const r7 = value6 != null ? ((Text) => <Text variant="text-xs/medium" color="text-muted" lineClamp={1}>{value6}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : undefined;
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
const value = '';
return (
<SearchListRow
label={value3 ?? value}
icon={groupDMAvatar}
onPress={value4}
accessibilityLabel={value3 ?? value}
subLabel={r7}
trailing={trailing}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
/>
);
}
global.__d(_fun113863, 15047, [31, 33, 4805, 9719, 1305, 12127, 4573, 15046,
2]) /* metro module 15047, dependencies: [31, 33, 4805, 9719, 1305, 12127, 4573, 15046, 2] */;
@@ -1,14 +1,19 @@
/* Metro module 15072; source: modules/search/native/components/list/rows/GuildChannelMemberRow.tsx; dependencies: [31, 33, 7707, 2] */
import UserRow from '../../../../../main_tabs_v2/native/shared_components/user_list/UserRow.tsx'; /* Metro dependency 7707 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun114031(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15269:6, offset: 0x02411a8c, size: 134 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildChannelMemberRow.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/GuildChannelMemberRow.tsx');
exports.default = GuildChannelMemberRow;
function GuildChannelMemberRow(a0) { // fn#114032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15269:230, offset: 0x02411b12, size: 49 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} />)(UserRow);
}
}
function GuildChannelMemberRow(a0) { // fn#114032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15269:230, offset: 0x02411b12, size: 49 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} />)(importDefault(7707) /* metro dependency 7707: UserRow */);
}
global.__d(_fun114031, 15072, [31, 33, 7707, 2]) /* metro module 15072, dependencies: [31, 33, 7707, 2] */;
@@ -1,66 +1,78 @@
/* Metro module 15053; source: modules/search/native/components/list/rows/GuildChannelRow.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 4805, 15054, 6647, 15056, 15046, 2] */
import Native from '../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseChannelName from '../../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchListRowModule from '../SearchListRow.tsx'; /* Metro dependency 15046 */
import * as ChannelContentModule from '../../../../../main_tabs_v2/native/shared_components/guild_channels/ChannelContent.tsx'; /* Metro dependency 15054 */
import * as ChannelItemModule from '../../../../../main_tabs_v2/native/shared_components/guild_channels/ChannelItem.tsx'; /* Metro dependency 15056 */
function _fun113914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:6, offset: 0x0240b6aa, size: 331 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.Image;
const env0_4 = value2.View;
const env0_5 = (require(9615) /* metro dependency 9615: SearchConstants */).CHANNEL_LIST_SEARCH_LAYOUT;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{container: {paddingVertical: 10},
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{container: {paddingVertical: 10},
content: {'flexDirection': 'row', 'alignItems': 'center'}, iconContainer: {marginRight: 0},
simpleIcon: {'width': 20, 'height': 20, 'marginRight': 8, tintColor: TEXT_MUTED}}]);
value = value.memo(GuildChannelRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildChannelRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/GuildChannelRow.tsx');
exports.default = value;
function GuildChannelLabel({channel}) { // fn#113915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:405, offset: 0x0240b7f5, size: 123 bytes, params: 2, frame: 19
const styles = useStyles();
const value2 = (UseChannelName)(channel);
return (
<View style={styles.content}>
{ChannelContentModule.renderChannelContent({channel: channel, layout: CHANNEL_LIST_SEARCH_LAYOUT,
name: value2})}
</View>
);
}
function GuildChannelRow(a0) { // fn#113916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:579, offset: 0x0240b870, size: 383 bytes, params: 2, frame: 28
const channel = a0.channel;
const subtitle = a0.subtitle;
const trailing = a0.trailing;
const extras = a0.extras;
const onPress = a0.onPress;
const voiceStates = a0.voiceStates;
const object = {'channel': 0, 'subtitle': 0, 'trailing': 0, 'extras': 0, 'onPress': 0, 'voiceStates': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const channelAccessibilityProps = (ChannelItemModule).getChannelAccessibilityProps({'channel': null,
'unread': false, 'mentionCount': 0, channel: channel, voiceStates: voiceStates});
const object3 = {};
object3.icon = (
<Image
style={styles.simpleIcon}
source={(require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIcon(channel)}
/>
);
object3.iconWidth = 32;
const icon = object3.icon;
const iconWidth = object3.iconWidth;
const SearchListRow = (SearchListRowModule).SearchListRow;
const searchListRowProps = {...channelAccessibilityProps, ...value};
searchListRowProps['containerStyle'] = styles.container;
searchListRowProps['iconContainerStyle'] = styles.iconContainer;
searchListRowProps['icon'] = icon;
searchListRowProps['iconWidth'] = iconWidth;
searchListRowProps['label'] = <GuildChannelLabel channel={channel} />;
searchListRowProps['subLabel'] = subtitle;
searchListRowProps['onPress'] = onPress;
searchListRowProps['trailing'] = trailing;
searchListRowProps['extras'] = extras;
return <SearchListRow {...searchListRowProps} />;
}
}
function GuildChannelLabel({channel}) { // fn#113915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:405, offset: 0x0240b7f5, size: 123 bytes, params: 2, frame: 19
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const channelContentModule = require(15054) /* metro dependency 15054: ChannelContent */;
return (
<View style={styles.content}>
{channelContentModule.renderChannelContent({channel: channel, layout: CHANNEL_LIST_SEARCH_LAYOUT,
name: value2})}
</View>
);
}
function GuildChannelRow(a0) { // fn#113916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15250:579, offset: 0x0240b870, size: 383 bytes, params: 2, frame: 28
const channel = a0.channel;
const subtitle = a0.subtitle;
const trailing = a0.trailing;
const extras = a0.extras;
const onPress = a0.onPress;
const voiceStates = a0.voiceStates;
const object2 = {'channel': 0, 'subtitle': 0, 'trailing': 0, 'extras': 0, 'onPress': 0, 'voiceStates': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
const channelAccessibilityProps = (require(15056) /* metro dependency 15056: ChannelItem */).getChannelAccessibilityProps({'channel': null,
'unread': false, 'mentionCount': 0, channel: channel, voiceStates: voiceStates});
const object4 = {};
object4.icon = <Image style={styles.simpleIcon} source={(require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIcon(channel)} />;
object4.iconWidth = 32;
const icon = object4.icon;
const iconWidth = object4.iconWidth;
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
const searchListRowProps = {...channelAccessibilityProps, ...value};
searchListRowProps['containerStyle'] = styles.container;
searchListRowProps['iconContainerStyle'] = styles.iconContainer;
searchListRowProps['icon'] = icon;
searchListRowProps['iconWidth'] = iconWidth;
searchListRowProps['label'] = <GuildChannelLabel channel={channel} />;
searchListRowProps['subLabel'] = subtitle;
searchListRowProps['onPress'] = onPress;
searchListRowProps['trailing'] = trailing;
searchListRowProps['extras'] = extras;
return <SearchListRow {...searchListRowProps} />;
}
global.__d(_fun113914, 15053, [31, 27, 9615, 33, 4501, 697, 4805, 15054, 6647, 15056, 15046,
2]) /* metro module 15053, dependencies: [31, 27, 9615, 33, 4501, 697, 4805, 15054, 6647, 15056, 15046, 2] */;
@@ -1,47 +1,52 @@
/* Metro module 15057; source: modules/search/native/components/list/rows/GuildTextChannelRow.tsx; dependencies: [31, 9615, 33, 21, 15050, 9675, 15053, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as ChannelSubtitleModule from '../../../../../main_tabs_v2/native/shared_components/guild_channels/ChannelSubtitle.tsx'; /* Metro dependency 15050 */
function _fun113929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:6, offset: 0x0240c924, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).CHANNEL_LIST_SEARCH_LAYOUT;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(GuildTextChannelRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildTextChannelRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/GuildTextChannelRow.tsx');
exports.default = value;
}
function GuildTextChannelRow(a0) { // fn#113930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:171, offset: 0x0240c9d2, size: 297 bytes, params: 2, frame: 23
var r2;
const channel = a0.channel;
const trailing = a0.trailing;
const lastMessageId = a0.lastMessageId;
const onPress = a0.onPress;
const object = {'channel': 0, 'trailing': 0, 'lastMessageId': 0, 'onPress': 0};
let value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, undefined);
const id = channel.id;
const guild_id = channel.guild_id;
const guild_id2 = guild_id;
if (value != lastMessageId) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(lastMessageId);
r2 = value;
} else {
r2 = value;
}
const binding = guild_id2;
return ((Component) => <Component {...value2} {...{['subtitle']: binding.useMemo(_fun113931, [id, guild_id,
r2])}} {...{['channel']: channel}} {...{['trailing']: trailing}} {...{['onPress']: binding.useCallback(function() {
onPress(channel.id);
}, [channel.id, onPress])}} />)(importDefault(15053) /* metro dependency 15053: GuildChannelRow */);
function _fun113931() { // fn#113931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:335, offset: 0x0240cafb, size: 121 bytes, params: 1, frame: 18
const value3 = null;
return ChannelSubtitleModule.renderChannelSubtitle({subtitle: value3 != SearchConstantsModule.CHANNEL_LIST_SEARCH_LAYOUT ? (require(9675) /* metro dependency 9675: SearchUtils */).getChannelActiveAgoTimestamp(SearchConstantsModule.CHANNEL_LIST_SEARCH_LAYOUT) : value3,
layout: CHANNEL_LIST_SEARCH_LAYOUT, channelId: id, guildId: guild_id});
}
function GuildTextChannelRow(a0) { // fn#113930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:171, offset: 0x0240c9d2, size: 297 bytes, params: 2, frame: 23
var r2;
const channel = a0.channel;
const trailing = a0.trailing;
const lastMessageId = a0.lastMessageId;
const onPress = a0.onPress;
const object2 = {'channel': 0, 'trailing': 0, 'lastMessageId': 0, 'onPress': 0};
let value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, undefined);
const id = channel.id;
const guild_id = channel.guild_id;
const env0_3 = guild_id;
if (value != lastMessageId) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(lastMessageId);
r2 = value;
} else {
r2 = value;
}
const binding = env0_3;
return ((Component) => <Component {...value2} {...{['subtitle']: binding.useMemo(_fun113931, [id, guild_id,
r2])}} {...{['channel']: channel}} {...{['trailing']: trailing}} {...{['onPress']: binding.useCallback(function() {
onPress(channel.id);
}, [channel.id, onPress])}} />)(importDefault(15053) /* metro dependency 15053: GuildChannelRow */);
}
function _fun113931() { // fn#113931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15254:335, offset: 0x0240cafb, size: 121 bytes, params: 1, frame: 18
const channelSubtitleModule = require(15050) /* metro dependency 15050: ChannelSubtitle */;
const value3 = null;
return channelSubtitleModule.renderChannelSubtitle({subtitle: value3 != env0_4 ? (require(9675) /* metro dependency 9675: SearchUtils */).getChannelActiveAgoTimestamp(env0_4) : value3,
layout: CHANNEL_LIST_SEARCH_LAYOUT, channelId: id, guildId: guild_id});
}
global.__d(_fun113929, 15057, [31, 9615, 33, 21, 15050, 9675, 15053,
2]) /* metro module 15057, dependencies: [31, 9615, 33, 21, 15050, 9675, 15053, 2] */;
@@ -1,118 +1,129 @@
/* Metro module 15049; source: modules/search/native/components/list/rows/GuildVoiceOrStageChannelRow.tsx; dependencies: [31, 27, 1384, 9615, 33, 10981, 3995, 1244, 4501, 566, 15050, 6273, 6268, 15051, 15053, 11814, 2] */
import StageInstanceStore from '../../../../../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StageChannelParticipantsModule from '../../../../../stage_channels/StageChannelParticipants.tsx'; /* Metro dependency 6268 */
import * as StageChannelParticipantStoreHooksModule from '../../../../../stage_channels/StageChannelParticipantStoreHooks.tsx'; /* Metro dependency 6273 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as ChannelListLayoutModule from '../../../../../main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
function _fun113896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:6, offset: 0x0240a7b1, size: 303 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const env0_6 = (require(9615) /* metro dependency 9615: SearchConstants */).CHANNEL_LIST_SEARCH_LAYOUT;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({users: {marginTop: 4},
let value = ReactModule;
const env0_8 = (CreateStylesModule).createStyles({users: {marginTop: 4},
subtitle: {marginEnd: 16}, trailing: {'paddingVertical': 4, 'alignItems': 'center', 'alignSelf': 'center'}});
value = value.memo(GuildVoiceChannelRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/GuildVoiceOrStageChannelRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/GuildVoiceOrStageChannelRow.tsx');
exports.default = value;
}
function GuildVoiceChannelSubtitle({channel, voiceStates}) { // fn#113897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:326, offset: 0x0240a8e0, size: 197 bytes, params: 2, frame: 22
const id = channel.id;
const guild_id = channel.guild_id;
const guild_id2 = guild_id;
const styles = useStyles();
return (
<View style={styles.subtitle}>
{guild_id2.useMemo(_fun113899,
[(FluxModule).useStateFromStores([StageInstanceStore], _fun113898,
[channel.id]), voiceStates, id, guild_id])}
</View>
);
function _fun113898() { // fn#113898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:452, offset: 0x0240a9a5, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return StageInstanceStore.getStageInstanceByChannel(channel.id)?.topic;
}
function GuildVoiceChannelSubtitle({channel, voiceStates}) { // fn#113897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:326, offset: 0x0240a8e0, size: 197 bytes, params: 2, frame: 22
const id = channel.id;
const guild_id = channel.guild_id;
const env0_3 = guild_id;
const styles = useStyles();
return (
<View style={styles.subtitle}>
{env0_3.useMemo(_fun113899,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun113898,
[channel.id]), voiceStates, id, guild_id])}
</View>
);
}
function _fun113899() { // fn#113899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:552, offset: 0x0240a9d6, size: 124 bytes, params: 1, frame: 15
return (require(15050) /* metro dependency 15050: ChannelSubtitle */).renderChannelSubtitle({subtitle: ReactNativeModule.View ?? getVoiceChannelSubtitle(voiceStates,
CHANNEL_LIST_SEARCH_LAYOUT), muted: false, layout: CHANNEL_LIST_SEARCH_LAYOUT, channelId: id,
guildId: guild_id});
function getVoiceChannelSubtitle(a0, a1) { // fn#113900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:573, offset: 0x0240aa52, size: 347 bytes, params: 3, frame: 21
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const env0_0 = a0;
if (ChannelListLayoutModule.isLayoutCompact(a1)) {
return null;
}
const getVoiceChannelSubtitleGetName2 = getVoiceChannelSubtitleGetName;
const length = a0.length;
if (length === 0) {
return null;
}
if (length === 1) {
return intl.formatToPlainString(t['/GCyII'], {a: getVoiceChannelSubtitleGetName2(0)});
}
if (length === 2) {
return intl.formatToPlainString(t['2efxiV'], {a: getVoiceChannelSubtitleGetName2(0),
b: getVoiceChannelSubtitleGetName2(1)});
}
const formatToPlainString = intl.formatToPlainString;
const o2nmbk = t.o2nmbk;
const object = {a: getVoiceChannelSubtitleGetName2(0), b: getVoiceChannelSubtitleGetName2(1)};
object.n = a0.length - 2;
return Reflect.apply(formatToPlainString, intl, [o2nmbk, object]);
function getVoiceChannelSubtitleGetName(a0) { // fn#113901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:665, owner: getVoiceChannelSubtitle.getName, offset: 0x0240abad, size: 110 bytes, params: 2, frame: 16
var r0;
var value3;
var defaultImport;
var getName;
let property = env0_0[a0];
const value2 = undefined;
const nick = property == null || property.member == null ? value2 : property.member.nick;
if (nick != null) {
r0 = nick;
} else {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport.getName;
property = env0_0[a0];
r0 = Reflect.apply(getName, defaultImport, [property == null ? value2 : property.user]);
}
return r0;
}
function GuildVoiceChannelExtras({channel, users}) { // fn#113902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:1271, offset: 0x0240ac1b, size: 231 bytes, params: 2, frame: 25
const styles = useStyles();
const stageChannelParticipantStoreHooksModule = require(6273) /* metro dependency 6273: StageChannelParticipantStoreHooks */;
const useStageParticipantsCount = stageChannelParticipantStoreHooksModule.useStageParticipantsCount;
const id = channel.id;
const StageChannelParticipantNamedIndex = (require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex;
const AUDIENCE = StageChannelParticipantNamedIndex.AUDIENCE;
return (
<View style={styles.subtitle}>
{users.length !== 0 && <View style={styles.users}>{((Component) => <Component users={users} max={5} guildId={channel.guild_id} layout={CHANNEL_LIST_SEARCH_LAYOUT} audienceCount={Reflect.apply(useStageParticipantsCount,
stageChannelParticipantStoreHooksModule, [id,
AUDIENCE])} />)(importDefault(15051) /* metro dependency 15051: VoiceOrStageSummaryRow */)}</View>}
</View>
);
}
}
function GuildVoiceChannelRow({channel, voiceStates, speakerVoiceStates, trailing, onPress}) { // fn#113903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:1601, offset: 0x0240ad02, size: 331 bytes, params: 2, frame: 25
const styles = useStyles();
const r8 = channel.isGuildStageVoice() ? speakerVoiceStates : voiceStates;
const value2 = r8.map(function(a0) {
return a0.user;
});
const binding = env0_3;
const useCallback = binding.useCallback;
return ((Component) => <Component onPress={Reflect.apply(useCallback, binding, [function() {
onPress(channel.id);
}, [channel.id,
onPress]])} voiceStates={r8} channel={channel} subtitle={<GuildVoiceChannelSubtitle channel={channel} voiceStates={r8} users={value2} />} trailing={trailing ?? <View style={styles.trailing}>{((VocalChannelJoinButton) => <VocalChannelJoinButton channel={channel} voiceStates={r8} />)((require(11814) /* metro dependency 11814: components */).VocalChannelJoinButton)}</View>} extras={<GuildVoiceChannelExtras channel={channel} voiceStates={r8} users={value2} />} />)(importDefault(15053) /* metro dependency 15053: GuildChannelRow */);
}
}
function _fun113898() { // fn#113898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:452, offset: 0x0240a9a5, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return StageInstanceStore.getStageInstanceByChannel(channel.id)?.topic;
}
function _fun113899() { // fn#113899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:552, offset: 0x0240a9d6, size: 124 bytes, params: 1, frame: 15
return (require(15050) /* metro dependency 15050: ChannelSubtitle */).renderChannelSubtitle({subtitle: env0_4 ?? getVoiceChannelSubtitle(voiceStates,
CHANNEL_LIST_SEARCH_LAYOUT), muted: false, layout: CHANNEL_LIST_SEARCH_LAYOUT, channelId: id,
guildId: guild_id});
}
function getVoiceChannelSubtitle(a0, a1) { // fn#113900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:573, offset: 0x0240aa52, size: 347 bytes, params: 3, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
if (channelListLayoutModule.isLayoutCompact(a1)) {
return null;
}
const closure = getVoiceChannelSubtitleGetName;
const length = a0.length;
if (length === 0) {
return null;
function GuildVoiceChannelExtras({channel, users}) { // fn#113902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:1271, offset: 0x0240ac1b, size: 231 bytes, params: 2, frame: 25
const styles = useStyles();
const useStageParticipantsCount = StageChannelParticipantStoreHooksModule.useStageParticipantsCount;
const id = channel.id;
const StageChannelParticipantNamedIndex = (StageChannelParticipantsModule).StageChannelParticipantNamedIndex;
const AUDIENCE = StageChannelParticipantNamedIndex.AUDIENCE;
return (
<View style={styles.subtitle}>
{users.length !== 0 && <View style={styles.users}>{((Component) => <Component users={users} max={5} guildId={channel.guild_id} layout={CHANNEL_LIST_SEARCH_LAYOUT} audienceCount={Reflect.apply(useStageParticipantsCount,
StageChannelParticipantStoreHooksModule, [id,
AUDIENCE])} />)(importDefault(15051) /* metro dependency 15051: VoiceOrStageSummaryRow */)}</View>}
</View>
);
}
if (length === 1) {
return intl.formatToPlainString(t['/GCyII'], {a: closure(0)});
function GuildVoiceChannelRow({channel, voiceStates, speakerVoiceStates, trailing, onPress}) { // fn#113903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:1601, offset: 0x0240ad02, size: 331 bytes, params: 2, frame: 25
const styles = useStyles();
const r8 = channel.isGuildStageVoice() ? speakerVoiceStates : voiceStates;
const value2 = r8.map(function(a0) {
return a0.user;
});
const binding = env0_3;
const useCallback = binding.useCallback;
return ((Component) => <Component onPress={Reflect.apply(useCallback, binding, [function() {
onPress(channel.id);
}, [channel.id,
onPress]])} voiceStates={r8} channel={channel} subtitle={<GuildVoiceChannelSubtitle channel={channel} voiceStates={r8} users={value2} />} trailing={trailing ?? <View style={styles.trailing}>{((VocalChannelJoinButton) => <VocalChannelJoinButton channel={channel} voiceStates={r8} />)((require(11814) /* metro dependency 11814: components */).VocalChannelJoinButton)}</View>} extras={<GuildVoiceChannelExtras channel={channel} voiceStates={r8} users={value2} />} />)(importDefault(15053) /* metro dependency 15053: GuildChannelRow */);
}
if (length === 2) {
return intl.formatToPlainString(t['2efxiV'], {a: closure(0), b: closure(1)});
}
const formatToPlainString = intl.formatToPlainString;
const o2nmbk = t.o2nmbk;
const object2 = {a: closure(0), b: closure(1)};
object2.n = a0.length - 2;
return Reflect.apply(formatToPlainString, intl, [o2nmbk, object2]);
}
function getVoiceChannelSubtitleGetName(a0) { // fn#113901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15246:665, owner: getVoiceChannelSubtitle.getName, offset: 0x0240abad, size: 110 bytes, params: 2, frame: 16
var r0;
var value3;
var defaultImport;
var getName;
let property = env0_0[a0];
const value2 = undefined;
const nick = property == null || property.member == null ? value2 : property.member.nick;
if (nick != null) {
r0 = nick;
} else {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport.getName;
property = env0_0[a0];
r0 = Reflect.apply(getName, defaultImport, [property == null ? value2 : property.user]);
}
return r0;
}
global.__d(_fun113896, 15049, [31, 27, 1384, 9615, 33, 10981, 3995, 1244, 4501, 566, 15050, 6273, 6268, 15051,
15053, 11814,
2]) /* metro module 15049, dependencies: [31, 27, 1384, 9615, 33, 10981, 3995, 1244, 4501, 566, 15050, 6273, 6268, 15051, 15053, 11814, 2] */;
@@ -1,474 +1,513 @@
/* Metro module 15068; source: modules/search/native/components/list/rows/LinkGridItem.tsx; dependencies: [57, 31, 27, 1379, 4792, 9615, 33, 4501, 566, 1244, 8349, 15069, 4573, 6682, 11822, 4056, 9875, 15061, 5278, 15059, 44, 8872, 2] */
import Module00044 from '../../../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SearchMessageStore from '../../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as LinkIconModule from '../../../../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as RenderMessageMarkupModule from '../../../../../messages/renderMessageMarkup.tsx'; /* Metro dependency 8349 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchMediaImageModule from '../SearchMediaImage.tsx'; /* Metro dependency 15059 */
import * as SearchListCardModule from '../SearchListCard.tsx'; /* Metro dependency 15061 */
import * as SearchResultLinkPreviewMarkupModule from '../../../SearchResultLinkPreviewMarkup.tsx'; /* Metro dependency 15069 */
function _fun113998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:6, offset: 0x02410210, size: 364 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.useWindowDimensions;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_9 = searchConstantsModule.FILE_OR_LINK_IMAGE_BUFFER;
const env0_10 = searchConstantsModule.SearchLinkTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({iconContainer: {'alignItems': 'center',
let value = ReactModule;
const env0_13 = (CreateStylesModule).createStyles({iconContainer: {'alignItems': 'center',
'justifyContent': 'center'}, tapToSee: {fontStyle: 'italic'}});
value = value.memo(LinkGridItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/LinkGridItem.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/LinkGridItem.tsx');
exports.default = value;
}
function getLinkNodeAtIndex(a0, a1, a2) { // fn#113999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:382, offset: 0x0241037c, size: 159 bytes, params: 4, frame: 17
const env0_0 = a1;
const env0_1 = a2;
const Array = global.Array;
if (Array.isArray(a0)) {
a0.forEach(function(a0) {
getLinkNodeAtIndex(a0, require, importDefault);
return a0;
});
} else if (a0.type === 'link') {
if (a1 === 0) {
a2(a0);
} else {
getLinkNodeAtIndex(a0, a1 - 1, a2);
}
} else if (a0.type === 'channelMention') {
if (a1 === 0) {
a2(a0);
} else {
getLinkNodeAtIndex(a0, a1 - 1, a2);
}
} else if (a0.content != null) {
getLinkNodeAtIndex(a0.content, a1, a2);
}
return a0;
}
function getLinkNodeAtIndex(a0, a1, a2) { // fn#113999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:382, offset: 0x0241037c, size: 159 bytes, params: 4, frame: 17
const env0_0 = a1;
const env0_1 = a2;
const Array = global.Array;
if (Array.isArray(a0)) {
a0.forEach(function(a0) {
getLinkNodeAtIndex(a0, require, importDefault);
return a0;
function LinkParsedGridItem({author, linkIndex, channelId, messageId, onPressSearchLink, onPressGuildVoiceChannelMention, onPress, imageStyle, containerStyle}) { // fn#114001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:618, offset: 0x0241043b, size: 813 bytes, params: 2, frame: 33
const messageId2 = messageId;
const onPressSearchLink2 = onPressSearchLink;
const styles = useStyles();
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
function() {
return SearchMessageStore.getMessage(messageId);
});
} else if (a0.type === 'link') {
if (a1 === 0) {
a2(a0);
} else {
getLinkNodeAtIndex(a0, a1 - 1, a2);
}
} else if (a0.type === 'channelMention') {
if (a1 === 0) {
a2(a0);
} else {
getLinkNodeAtIndex(a0, a1 - 1, a2);
}
} else if (a0.content != null) {
getLinkNodeAtIndex(a0.content, a1, a2);
}
return a0;
}
function LinkParsedGridItem({author, linkIndex, channelId, messageId, onPressSearchLink, onPressGuildVoiceChannelMention, onPress, imageStyle, containerStyle}) { // fn#114001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:618, offset: 0x0241043b, size: 813 bytes, params: 2, frame: 33
const env0_3 = messageId;
const env0_4 = onPressSearchLink;
const styles = useStyles();
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
function() {
return SearchMessageStore.getMessage(messageId);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const [property, env0_11] = env0_3(env0_4.useState(null), 2);
const value6 = env0_4.useMemo(_fun114005, [message, env0_4.useCallback(_fun114004, [linkIndex])]);
const value7 = env0_4.useMemo(_fun114006, [property, styles.tapToSee]);
const value8 = env0_4.useMemo(_fun114007, [property?.target, property?.type]);
const value9 = env0_4.useCallback(_fun114008, [channelId, messageId, property, onPress,
onPressGuildVoiceChannelMention, onPressSearchLink]);
const value10 = env0_4.useMemo(function() {
return author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]);
const value11 = env0_4.useCallback(function() {
onPress({channelId: channelId, messageId: messageId});
}, [channelId, messageId, onPress]);
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
const SearchListCardThumbnail = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardThumbnail;
const items2 = [<SearchListCardThumbnail thumbnail={<View style={[styles.iconContainer,
imageStyle]}>{value8}</View>} />];
const SearchListCardContent = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContent;
items2[1] = <SearchListCardContent label={value6} subLabel={value7} />;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const SearchListCardFooter = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardFooter;
items2[2] = <PressableHighlight onPress={value11}><SearchListCardFooter author={author} avatarSource={value10} channel={channel} /></PressableHighlight>;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value9}>
{items2}
</SearchListCardContainer>
);
}
function LinkEmbedGridItem({embed, sources, author, channelId, messageId, onPressSearchLink, onPress, imageStyle, containerStyle}) { // fn#114011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3060, offset: 0x02410c51, size: 873 bytes, params: 2, frame: 32
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_4 = messageId;
const styles = useStyles();
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
function() {
return SearchMessageStore.getMessage(messageId);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const scale = useWindowDimensions().scale;
const url = embed.url;
let r8 = embed.rawTitle ?? embed.author?.name;
r8 = r8 ?? embed.url;
const value3 = env0_4.useMemo(_fun114014, [author.id, channelId, embed, imageStyle, messageId, scale, sources,
styles.iconContainer]);
const value4 = env0_4.useMemo(function() {
return author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]);
const value5 = env0_4.useCallback(_fun114017, [url, onPressSearchLink, r8, channelId, messageId]);
const value6 = env0_4.useCallback(function() {
onPress({channelId: channelId, messageId: messageId});
}, [channelId, messageId, onPress]);
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
const SearchListCardThumbnail = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardThumbnail;
const items2 = [<SearchListCardThumbnail thumbnail={value3} />];
const SearchListCardContent = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContent;
r8 = message == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN) : r8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <SearchListCardContent label={r8} subLabel={<Text variant="text-xs/normal" color="text-link" lineClamp={1}>{url ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}</Text>} />;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const SearchListCardFooter = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardFooter;
items2[2] = <PressableHighlight onPress={value6}><SearchListCardFooter author={author} avatarSource={value4} channel={channel} /></PressableHighlight>;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value5}>
{items2}
</SearchListCardContainer>
);
}
function LinkGridItem({data, onPressSearchLink, onPressGuildVoiceChannelMention, onPress, imageStyle, containerStyle}) { // fn#114019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:4564, offset: 0x024111c3, size: 262 bytes, params: 2, frame: 20
const type = data.type;
const EMBED = SearchLinkTypes.EMBED;
if (EMBED === type) {
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const [property, env0_11] = messageId2(onPressSearchLink2.useState(null), 2);
const value6 = onPressSearchLink2.useMemo(_fun114005, [message, onPressSearchLink2.useCallback(_fun114004,
[linkIndex])]);
const value7 = onPressSearchLink2.useMemo(_fun114006, [property, styles.tapToSee]);
const value8 = onPressSearchLink2.useMemo(_fun114007, [property?.target, property?.type]);
const value9 = onPressSearchLink2.useCallback(_fun114008, [channelId, messageId, property, onPress,
onPressGuildVoiceChannelMention, onPressSearchLink]);
const value10 = onPressSearchLink2.useMemo(function() {
return author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]);
const value11 = onPressSearchLink2.useCallback(function() {
onPress({channelId: channelId, messageId: messageId});
}, [channelId, messageId, onPress]);
const SearchListCardContainer = (SearchListCardModule).SearchListCardContainer;
const SearchListCardThumbnail = (SearchListCardModule).SearchListCardThumbnail;
const items2 = [
<SearchListCardThumbnail thumbnail={<View style={[styles.iconContainer, imageStyle]}>{value8}</View>} />,
];
const SearchListCardContent = (SearchListCardModule).SearchListCardContent;
items2[1] = <SearchListCardContent label={value6} subLabel={value7} />;
const PressableHighlight = (PressablesModule).PressableHighlight;
const SearchListCardFooter = (SearchListCardModule).SearchListCardFooter;
items2[2] = (
<PressableHighlight onPress={value11}>
<SearchListCardFooter
author={author}
avatarSource={value10}
channel={channel}
/>
</PressableHighlight>
);
return (
<LinkEmbedGridItem
embed={data.embed}
sources={data.sources}
messageId={data.messageId}
channelId={data.channelId}
author={data.author}
linkIndex={data.linkIndex}
onPressSearchLink={onPressSearchLink}
onPress={onPress}
imageStyle={imageStyle}
containerStyle={containerStyle}
<SearchListCardContainer containerStyle={containerStyle} onPress={value9}>
{items2}
</SearchListCardContainer>
);
function _fun114004(a0) { // fn#114004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:969, offset: 0x02410783, size: 32 bytes, params: 2, frame: 15
getLinkNodeAtIndex(a0, linkIndex, env0_11);
return a0;
}
function _fun114005() { // fn#114005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1017, offset: 0x024107a3, size: 230 bytes, params: 1, frame: 20
var intl;
if (message == null) {
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN);
}
const renderMessageMarkupWithParser = RenderMessageMarkupModule.renderMessageMarkupWithParser;
const NativeSearchResultLinkPreviewParser = (SearchResultLinkPreviewMarkupModule).NativeSearchResultLinkPreviewParser;
const content = Reflect.apply(renderMessageMarkupWithParser, RenderMessageMarkupModule,
[NativeSearchResultLinkPreviewParser, message, {postProcessor: JsxRuntimeModule.jsxs}]).content;
const Text = (TextModule).Text;
return (
<View pointerEvents="none">
<Text
variant="text-md/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{content}
</Text>
</View>
);
}
function _fun114006() { // fn#114006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1368, offset: 0x02410889, size: 367 bytes, params: 1, frame: 20
var value3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var originalLink;
if (SearchConstantsModule.SearchLinkTypes == null) {
if (SearchConstantsModule.SearchLinkTypes == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (SearchConstantsModule.SearchLinkTypes?.type === 'channelMention') {
originalLink = SearchConstantsModule.SearchLinkTypes.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (SearchConstantsModule.SearchLinkTypes.type !== 'link') {
if (SearchConstantsModule.SearchLinkTypes == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (SearchConstantsModule.SearchLinkTypes?.type === 'channelMention') {
originalLink = SearchConstantsModule.SearchLinkTypes.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
let target = SearchConstantsModule.SearchLinkTypes.target;
if (target == null) {
if (SearchConstantsModule.SearchLinkTypes == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (SearchConstantsModule.SearchLinkTypes?.type === 'channelMention') {
originalLink = SearchConstantsModule.SearchLinkTypes.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
target = SearchConstantsModule.SearchLinkTypes.target;
if (target !== '') {
target = SearchConstantsModule.SearchLinkTypes.target;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{target}
</Text>
);
}
if (SearchConstantsModule.SearchLinkTypes == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (SearchConstantsModule.SearchLinkTypes?.type === 'channelMention') {
originalLink = SearchConstantsModule.SearchLinkTypes.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
function _fun114007() { // fn#114007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1900, offset: 0x024109f8, size: 216 bytes, params: 1, frame: 15
var value3;
var moduleValue;
var value;
const type = SearchConstantsModule.SearchLinkTypes?.type;
if (type === 'channelMention') {
value = environment.__proto__;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
return <ChatIcon size="lg" />;
}
if (type === 'link') {
value3 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
return ((Component) => <Component size="lg" />)(moduleValue.getUrlIcon(SearchConstantsModule.SearchLinkTypes.target));
}
value = environment.__proto__;
const LinkIcon = (LinkIconModule).LinkIcon;
return <LinkIcon size="lg" />;
}
function _fun114008() { // fn#114008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:2184, offset: 0x02410ad0, size: 307 bytes, params: 1, frame: 15
var channelId2;
var value2;
var channel;
var onPressSearchLinkBinding;
var object;
var binding;
var value4;
if (SearchConstantsModule.SearchLinkTypes == null) {
onPress({channelId: channelId, messageId: messageId});
} else if (SearchConstantsModule.SearchLinkTypes.type === 'link') {
onPressSearchLinkBinding = onPressSearchLink;
object = {};
binding = SearchConstantsModule.SearchLinkTypes;
object.url = binding.target;
value4 = environment.__proto__;
object.trusted = (require(9875) /* metro dependency 9875: MarkupReactLinkUtils */).isLinkTrusted(binding);
object.messageId = messageId;
object.channelId = channelId;
onPressSearchLinkBinding(object);
} else if (SearchConstantsModule.SearchLinkTypes.type === 'channelMention') {
channelId2 = SearchConstantsModule.SearchLinkTypes.channelId;
value2 = environment.__proto__;
channel = ChannelStore.getChannel(channelId2);
if (channel == null) {
onPressSearchLink({url: SearchConstantsModule.SearchLinkTypes.originalLink, trusted: true, messageId: messageId, channelId: channelId});
} else if (channel.isGuildVocal()) {
onPressGuildVoiceChannelMention({channelId: channelId, messageId: messageId,
mentionedChannelId: channelId2});
} else {
onPressSearchLink({url: SearchConstantsModule.SearchLinkTypes.originalLink, trusted: true, messageId: messageId, channelId: channelId});
}
}
}
}
function LinkEmbedGridItem({embed, sources, author, channelId, messageId, onPressSearchLink, onPress, imageStyle, containerStyle}) { // fn#114011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3060, offset: 0x02410c51, size: 873 bytes, params: 2, frame: 32
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const messageId2 = messageId;
const styles = useStyles();
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchMessageStore],
function() {
return SearchMessageStore.getMessage(messageId);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const scale = useWindowDimensions().scale;
const url = embed.url;
let r8 = embed.rawTitle ?? embed.author?.name;
r8 = r8 ?? embed.url;
const value3 = messageId2.useMemo(_fun114014, [author.id, channelId, embed, imageStyle, messageId, scale, sources,
styles.iconContainer]);
const value4 = messageId2.useMemo(function() {
return author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]);
const value5 = messageId2.useCallback(_fun114017, [url, onPressSearchLink, r8, channelId, messageId]);
const value6 = messageId2.useCallback(function() {
onPress({channelId: channelId, messageId: messageId});
}, [channelId, messageId, onPress]);
const SearchListCardContainer = (SearchListCardModule).SearchListCardContainer;
const SearchListCardThumbnail = (SearchListCardModule).SearchListCardThumbnail;
const items2 = [
<SearchListCardThumbnail thumbnail={value3} />,
];
const SearchListCardContent = (SearchListCardModule).SearchListCardContent;
r8 = message == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN) : r8;
const Text = (TextModule).Text;
items2[1] = (
<SearchListCardContent
label={r8}
subLabel={<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{url ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>}
/>
);
}
const TEXT = SearchLinkTypes.TEXT;
if (TEXT === type) {
return (
<LinkParsedGridItem
messageId={data.messageId}
channelId={data.channelId}
author={data.author}
linkIndex={data.linkIndex}
onPressSearchLink={onPressSearchLink}
onPressGuildVoiceChannelMention={onPressGuildVoiceChannelMention}
onPress={onPress}
imageStyle={imageStyle}
containerStyle={containerStyle}
/>
const PressableHighlight = (PressablesModule).PressableHighlight;
const SearchListCardFooter = (SearchListCardModule).SearchListCardFooter;
items2[2] = (
<PressableHighlight onPress={value6}>
<SearchListCardFooter
author={author}
avatarSource={value4}
channel={channel}
/>
</PressableHighlight>
);
}
return null;
}
function _fun114004(a0) { // fn#114004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:969, offset: 0x02410783, size: 32 bytes, params: 2, frame: 15
getLinkNodeAtIndex(a0, linkIndex, env0_11);
return a0;
}
function _fun114005() { // fn#114005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1017, offset: 0x024107a3, size: 230 bytes, params: 1, frame: 20
var intl;
if (message == null) {
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN);
}
const renderMessageMarkupModule = require(8349) /* metro dependency 8349: renderMessageMarkup */;
const renderMessageMarkupWithParser = renderMessageMarkupModule.renderMessageMarkupWithParser;
const NativeSearchResultLinkPreviewParser = (require(15069) /* metro dependency 15069: SearchResultLinkPreviewMarkup */).NativeSearchResultLinkPreviewParser;
const content = Reflect.apply(renderMessageMarkupWithParser, renderMessageMarkupModule,
[NativeSearchResultLinkPreviewParser, message, {postProcessor: env0_12}]).content;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View pointerEvents="none">
<Text
variant="text-md/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{content}
</Text>
</View>
);
}
function _fun114006() { // fn#114006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1368, offset: 0x02410889, size: 367 bytes, params: 1, frame: 20
var value3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var originalLink;
if (env0_10 == null) {
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<SearchListCardContainer containerStyle={containerStyle} onPress={value5}>
{items2}
</SearchListCardContainer>
);
function _fun114014() { // fn#114014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3438, offset: 0x02410fef, size: 164 bytes, params: 1, frame: 17
const SearchEmbedMediaImage = (SearchMediaImageModule).SearchEmbedMediaImage;
const imageStyleBinding = imageStyle;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
<SearchEmbedMediaImage
messageId={messageId}
channelId={channelId}
authorId={author.id}
sources={sources}
embed={embed}
containerStyle={imageStyleBinding}
renderFallback={renderFallback_114015}
scale={scale}
containerHeight={imageStyleBinding.height + FILE_OR_LINK_IMAGE_BUFFER}
containerWidth={imageStyleBinding.width + FILE_OR_LINK_IMAGE_BUFFER}
/>
);
function renderFallback_114015() { // fn#114015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3564, offset: 0x02411093, size: 106 bytes, params: 1, frame: 17
const items2 = [styles.iconContainer];
items2[1] = imageStyle;
const LinkIcon = (LinkIconModule).LinkIcon;
return (
<View style={items2}>
<LinkIcon size="md" />
</View>
);
}
}
function _fun114017() { // fn#114017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3853, offset: 0x02411129, size: 120 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = Module00044;
const urlBinding = url;
defaultImport(urlBinding != null, '[LinkGridItem] Embed url cannot be null');
const onPressSearchLinkBinding = onPressSearchLink;
const object = {url: urlBinding};
object.trusted = (require(8872) /* metro dependency 8872: MaskedLinkUtils */).isLinkTrusted(urlBinding, JsxRuntimeModule.jsxs);
object.messageId = messageId;
object.channelId = channelId;
onPressSearchLinkBinding(object);
}
}
function LinkGridItem({data, onPressSearchLink, onPressGuildVoiceChannelMention, onPress, imageStyle, containerStyle}) { // fn#114019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:4564, offset: 0x024111c3, size: 262 bytes, params: 2, frame: 20
const type = data.type;
const EMBED = SearchLinkTypes.EMBED;
if (EMBED === type) {
return (
<LinkEmbedGridItem
embed={data.embed}
sources={data.sources}
messageId={data.messageId}
channelId={data.channelId}
author={data.author}
linkIndex={data.linkIndex}
onPressSearchLink={onPressSearchLink}
onPress={onPress}
imageStyle={imageStyle}
containerStyle={containerStyle}
/>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
const TEXT = SearchLinkTypes.TEXT;
if (TEXT === type) {
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
<LinkParsedGridItem
messageId={data.messageId}
channelId={data.channelId}
author={data.author}
linkIndex={data.linkIndex}
onPressSearchLink={onPressSearchLink}
onPressGuildVoiceChannelMention={onPressGuildVoiceChannelMention}
onPress={onPress}
imageStyle={imageStyle}
containerStyle={containerStyle}
/>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
return null;
}
if (env0_10.type !== 'link') {
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
let target = env0_10.target;
if (target == null) {
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
target = env0_10.target;
if (target !== '') {
target = env0_10.target;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{target}
</Text>
);
}
if (env0_10 == null) {
value3 = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
if (env0_10?.type === 'channelMention') {
originalLink = env0_10.originalLink;
value = environment.__proto__;
return (
<Text
variant="text-xs/normal"
color="text-link"
lineClamp={1}
>
{originalLink}
</Text>
);
}
return (
<Text
variant="text-xs/normal"
color="interactive-text-default"
lineClamp={1}
style={styles.tapToSee}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q2IIoP)}
</Text>
);
}
function _fun114007() { // fn#114007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:1900, offset: 0x024109f8, size: 216 bytes, params: 1, frame: 15
var value3;
var moduleValue;
var value;
const type = env0_10?.type;
if (type === 'channelMention') {
value = environment.__proto__;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
return <ChatIcon size="lg" />;
}
if (type === 'link') {
value3 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
return ((Component) => <Component size="lg" />)(moduleValue.getUrlIcon(env0_10.target));
}
value = environment.__proto__;
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return <LinkIcon size="lg" />;
}
function _fun114008() { // fn#114008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:2184, offset: 0x02410ad0, size: 307 bytes, params: 1, frame: 15
var channelId2;
var value2;
var channel;
var onPressSearchLinkBinding;
var object2;
var binding;
var value4;
if (env0_10 == null) {
onPress({channelId: channelId, messageId: messageId});
} else if (env0_10.type === 'link') {
onPressSearchLinkBinding = onPressSearchLink;
object2 = {};
binding = env0_10;
object2.url = binding.target;
value4 = environment.__proto__;
object2.trusted = (require(9875) /* metro dependency 9875: MarkupReactLinkUtils */).isLinkTrusted(binding);
object2.messageId = messageId;
object2.channelId = channelId;
onPressSearchLinkBinding(object2);
} else if (env0_10.type === 'channelMention') {
channelId2 = env0_10.channelId;
value2 = environment.__proto__;
channel = ChannelStore.getChannel(channelId2);
if (channel == null) {
onPressSearchLink({url: env0_10.originalLink, trusted: true, messageId: messageId, channelId: channelId});
} else if (channel.isGuildVocal()) {
onPressGuildVoiceChannelMention({channelId: channelId, messageId: messageId,
mentionedChannelId: channelId2});
} else {
onPressSearchLink({url: env0_10.originalLink, trusted: true, messageId: messageId, channelId: channelId});
}
}
}
function _fun114014() { // fn#114014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3438, offset: 0x02410fef, size: 164 bytes, params: 1, frame: 17
const SearchEmbedMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchEmbedMediaImage;
const imageStyleBinding = imageStyle;
return (
<SearchEmbedMediaImage
messageId={messageId}
channelId={channelId}
authorId={author.id}
sources={sources}
embed={embed}
containerStyle={imageStyleBinding}
renderFallback={renderFallback_114015}
scale={scale}
containerHeight={imageStyleBinding.height + FILE_OR_LINK_IMAGE_BUFFER}
containerWidth={imageStyleBinding.width + FILE_OR_LINK_IMAGE_BUFFER}
/>
);
}
function _fun114017() { // fn#114017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3853, offset: 0x02411129, size: 120 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(44) /* metro dependency 44 */;
const urlBinding = url;
defaultImport(urlBinding != null, '[LinkGridItem] Embed url cannot be null');
const onPressSearchLinkBinding = onPressSearchLink;
const object2 = {url: urlBinding};
object2.trusted = (require(8872) /* metro dependency 8872: MaskedLinkUtils */).isLinkTrusted(urlBinding, env0_12);
object2.messageId = messageId;
object2.channelId = channelId;
onPressSearchLinkBinding(object2);
}
function renderFallback_114015() { // fn#114015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15265:3564, offset: 0x02411093, size: 106 bytes, params: 1, frame: 17
const items2 = [styles.iconContainer];
items2[1] = imageStyle;
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return (
<View style={items2}>
<LinkIcon size="md" />
</View>
);
}
global.__d(_fun113998, 15068, [57, 31, 27, 1379, 4792, 9615, 33, 4501, 566, 1244, 8349, 15069, 4573, 6682, 11822,
4056, 9875, 15061, 5278, 15059, 44, 8872,
2]) /* metro module 15068, dependencies: [57, 31, 27, 1379, 4792, 9615, 33, 4501, 566, 1244, 8349, 15069, 4573, 6682, 11822, 4056, 9875, 15061, 5278, 15059, 44, 8872, 2] */;
@@ -1,72 +1,77 @@
/* Metro module 15062; source: modules/search/native/components/list/rows/MediaGrid.tsx; dependencies: [31, 27, 9615, 33, 4501, 15058, 11822, 8416, 15043, 2] */
import MediaGridItem from './MediaGridItem.tsx'; /* Metro dependency 15058 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as FlashListModule from '../../../../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchPlatformUtilsModule from '../../../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
import * as SeparatorsModule from './Separators.tsx'; /* Metro dependency 15043 */
function _fun113969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:6, offset: 0x0240e99e, size: 253 bytes, params: 8, frame: 22
const env0_0 = require;
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;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_HORIZONTAL_PADDING = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const env0_5 = searchConstantsModule.MEDIA_NUM_COLUMNS;
const env0_6 = searchConstantsModule.MEDIA_ITEM_GAP_WIDTH;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {paddingLeft: SEARCH_LIST_HORIZONTAL_PADDING - 2,
const SEARCH_LIST_HORIZONTAL_PADDING = SearchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const env0_8 = (CreateStylesModule).createStyles({container: {paddingLeft: SEARCH_LIST_HORIZONTAL_PADDING - 2,
paddingRight: SEARCH_LIST_HORIZONTAL_PADDING + 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/MediaGrid.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/MediaGrid.tsx');
exports.default = MediaGrid;
function MediaGrid({media, mediaSize, onPress, animate}) { // fn#113970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:398, offset: 0x0240ea9b, size: 262 bytes, params: 2, frame: 22
const animate2 = animate;
const styles = useStyles();
const binding = animate2;
const value2 = binding.useCallback(_fun113971, [media.length, mediaSize, onPress, animate]);
const value3 = binding.useMemo(_fun113972, [mediaSize, media.length]);
const FlashList = (FlashListModule).FlashList;
const MediaVerticalSeparator = (SeparatorsModule).MediaVerticalSeparator;
return (
<View style={styles.container}>
<FlashList
numColumns={MEDIA_NUM_COLUMNS}
data={media}
renderItem={value2}
ItemSeparatorComponent={MediaVerticalSeparator}
scrollEnabled={false}
estimatedItemSize={mediaSize}
estimatedListSize={value3}
/>
</View>
);
function _fun113971({item, index}) { // fn#113971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:487, offset: 0x0240eba1, size: 156 bytes, params: 2, frame: 19
const animateBinding = animate;
const mediaSizeBinding = mediaSize;
const onPressBinding = onPress;
const getMediaGridItemStyles = SearchPlatformUtilsModule.getMediaGridItemStyles;
return (
<MediaGridItem
animate={animateBinding}
size={mediaSizeBinding}
media={item}
onPress={onPressBinding}
containerStyle={Reflect.apply(getMediaGridItemStyles, SearchPlatformUtilsModule, [{itemIndex: index,
numItems: media.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH}])}
/>
);
}
function _fun113972() { // fn#113972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:689, offset: 0x0240ec3d, size: 115 bytes, params: 1, frame: 17
let Math = global.Math;
const min = Math.min;
const mediaBinding = media;
const value3 = Reflect.apply(min, Math, [mediaBinding.length, MEDIA_NUM_COLUMNS]);
Math = global.Math;
const value4 = Math.ceil(mediaBinding.length / value3);
const mediaSizeBinding = mediaSize;
return {width: value3 * mediaSizeBinding + (value3 - 1) * MEDIA_ITEM_GAP_WIDTH,
height: value4 * mediaSizeBinding + value4 * MEDIA_ITEM_GAP_WIDTH};
}
}
}
function MediaGrid({media, mediaSize, onPress, animate}) { // fn#113970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:398, offset: 0x0240ea9b, size: 262 bytes, params: 2, frame: 22
const env0_3 = animate;
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(_fun113971, [media.length, mediaSize, onPress, animate]);
const value3 = binding.useMemo(_fun113972, [mediaSize, media.length]);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const MediaVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator;
return (
<View style={styles.container}>
<FlashList
numColumns={MEDIA_NUM_COLUMNS}
data={media}
renderItem={value2}
ItemSeparatorComponent={MediaVerticalSeparator}
scrollEnabled={false}
estimatedItemSize={mediaSize}
estimatedListSize={value3}
/>
</View>
);
}
function _fun113971({item, index}) { // fn#113971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:487, offset: 0x0240eba1, size: 156 bytes, params: 2, frame: 19
const MediaGridItem = importDefault(15058) /* metro dependency 15058: MediaGridItem */;
const animateBinding = animate;
const mediaSizeBinding = mediaSize;
const onPressBinding = onPress;
const searchPlatformUtilsModule = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
const getMediaGridItemStyles = searchPlatformUtilsModule.getMediaGridItemStyles;
return (
<MediaGridItem
animate={animateBinding}
size={mediaSizeBinding}
media={item}
onPress={onPressBinding}
containerStyle={Reflect.apply(getMediaGridItemStyles, searchPlatformUtilsModule, [{itemIndex: index,
numItems: media.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH}])}
/>
);
}
function _fun113972() { // fn#113972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15259:689, offset: 0x0240ec3d, size: 115 bytes, params: 1, frame: 17
let Math = global.Math;
const min = Math.min;
const mediaBinding = media;
const value3 = Reflect.apply(min, Math, [mediaBinding.length, MEDIA_NUM_COLUMNS]);
Math = global.Math;
const value4 = Math.ceil(mediaBinding.length / value3);
const mediaSizeBinding = mediaSize;
return {width: value3 * mediaSizeBinding + (value3 - 1) * MEDIA_ITEM_GAP_WIDTH,
height: value4 * mediaSizeBinding + value4 * MEDIA_ITEM_GAP_WIDTH};
}
global.__d(_fun113969, 15062, [31, 27, 9615, 33, 4501, 15058, 11822, 8416, 15043,
2]) /* metro module 15062, dependencies: [31, 27, 9615, 33, 4501, 15058, 11822, 8416, 15043, 2] */;
@@ -1,136 +1,148 @@
/* Metro module 15058; source: modules/search/native/components/list/rows/MediaGridItem.tsx; dependencies: [31, 27, 1379, 9615, 33, 4501, 697, 566, 4017, 4504, 4507, 15059, 6239, 1305, 2] */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReanimatedRexport from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:6, offset: 0x0240cb74, size: 414 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.Pressable;
const env0_6 = value2.useWindowDimensions;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchMediaTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.overflow = 'hidden';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.backgroundColor = BORDER_SUBTLE;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [{container: object4,
avatar: {'position': 'absolute', 'top': 8, 'right': 8}, card: {padding: 0}}]);
object3 = {HIDDEN: 0};
object3[0] = 'HIDDEN';
object3.VISIBLE = 1;
object3[1] = 'VISIBLE';
object3 = {code: 'function MediaGridItemTsx1(){const{withTiming,opacity,timingStandard}=this.__closure;return{opacity:withTiming(opacity.get(),timingStandard)};}'};
value = value.memo(MediaGridItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/MediaGridItem.tsx');
exports.default = value;
}
function MediaGridItem({media, size, containerStyle, onPress, animate}) { // fn#113934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:666, offset: 0x0240cd12, size: 1212 bytes, params: 2, frame: 30
var r9;
var sources;
var channelId;
var id;
var SearchComponentMediaImage;
var unfurledMediaItem;
const styles = useStyles();
const scale = useWindowDimensions().scale;
let binding = env0_3;
const value3 = binding.useRef(null);
var env0_3 = value3;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(media.channelId);
});
const useMemo = binding.useMemo;
let author = media.author;
const value4 = Reflect.apply(useMemo, binding, [function() {
return media.author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]]);
const value5 = env0_3.useCallback(_fun113937, [media, onPress]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
binding = env0_12;
const value6 = Reflect.apply(useSharedValue, reanimatedRexportModule, [animate ? binding.HIDDEN : binding.VISIBLE]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
const closure = MediaGridItem_;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, opacity: value6,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
closure.__workletHash = 9644750191833;
closure.__initData = env0_13;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
binding = env0_3;
binding.useEffect(_fun113939, [value6]);
const value8 = binding.useMemo(function() {
var sizeBinding = size;
return {width: sizeBinding, height: sizeBinding};
}, [size]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.container, containerStyle, value8, value7];
let type = media.type;
const EMBED = SearchMediaTypes.EMBED;
const items2 = [type === EMBED && ((SearchEmbedMediaImage) => <SearchEmbedMediaImage sources={media.sources} embed={media.embed} messageId={media.messageId} channelId={media.channelId} authorId={media.author.id} scale={scale} containerHeight={size} containerWidth={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchEmbedMediaImage)];
type = media.type;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
items2[1] = type === ATTACHMENT && ((SearchAttachmentMediaImage) => <SearchAttachmentMediaImage attachment={media.attachment} channelId={media.channelId} authorId={media.author.id} scale={scale} containerHeight={size} containerWidth={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchAttachmentMediaImage);
type = media.type;
const AUDIO = SearchMediaTypes.AUDIO;
items2[2] = type === AUDIO && ((SearchSoundMediaImage) => <SearchSoundMediaImage height={size} width={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchSoundMediaImage);
type = media.type;
const COMPONENT = SearchMediaTypes.COMPONENT;
const value15 = type === COMPONENT;
if (value15) {
SearchComponentMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchComponentMediaImage;
unfurledMediaItem = media.unfurledMediaItem;
sources = media.sources;
channelId = media.channelId;
author = media.author;
id = author.id;
author = media.author;
r9 = <SearchComponentMediaImage unfurledMediaItem={unfurledMediaItem} sources={sources} channelId={channelId} authorId={id} isBot={author.bot} scale={scale} containerHeight={size} containerWidth={size} />;
} else {
r9 = value15;
}
items2[3] = r9;
items2[4] = value4 != null && <View style={styles.avatar}>{((Card) => <Card shadow="low" style={styles.card}>{((Avatar) => <Avatar source={value4} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} avatarDecoration={media.author.avatarDecoration} />)((require(1305) /* metro dependency 1305: native */).Avatar)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card)}</View>;
return (
<View2 style={items3}>
<Pressable
ref={value3}
style={value8}
accessibilityRole="button"
onPress={value5}
>
{items2}
</Pressable>
</View2>
);
}
function _fun113937() { // fn#113937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:976, offset: 0x0240d200, size: 41 bytes, params: 1, frame: 12
onPress({media: media, originView: env0_3.current});
}
function MediaGridItem_() { // fn#113938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:1102, owner: MediaGridItem._, offset: 0x0240d229, size: 78 bytes, params: 1, frame: 17
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
object2.opacity = value.withTiming(env0_5.get(),
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
return object2;
}
function _fun113939() { // fn#113939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:1324, offset: 0x0240d277, size: 34 bytes, params: 1, frame: 11
const binding = env0_5;
const set = binding.set;
const VISIBLE = env1_12.VISIBLE;
Reflect.apply(set, binding, [VISIBLE]);
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.overflow = 'hidden';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.backgroundColor = BORDER_SUBTLE;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2,
avatar: {'position': 'absolute', 'top': 8, 'right': 8}, card: {padding: 0}}]);
object = {HIDDEN: 0};
object[0] = 'HIDDEN';
object.VISIBLE = 1;
object[1] = 'VISIBLE';
object = {code: 'function MediaGridItemTsx1(){const{withTiming,opacity,timingStandard}=this.__closure;return{opacity:withTiming(opacity.get(),timingStandard)};}'};
value = value.memo(MediaGridItem);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/MediaGridItem.tsx');
exports.default = value;
function MediaGridItem({media, size, containerStyle, onPress, animate}) { // fn#113934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:666, offset: 0x0240cd12, size: 1212 bytes, params: 2, frame: 30
var r9;
var sources;
var channelId;
var id;
var SearchComponentMediaImage;
var unfurledMediaItem;
const styles = useStyles();
const scale = useWindowDimensions().scale;
let binding = env0_3;
const value3 = binding.useRef(null);
var env0_3 = value3;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(media.channelId);
});
const useMemo = binding.useMemo;
let author = media.author;
const value4 = Reflect.apply(useMemo, binding, [function() {
return media.author.getAvatarSource(channel?.guild_id);
}, [author, channel?.guild_id]]);
const value5 = env0_3.useCallback(_fun113937, [media, onPress]);
const useSharedValue = ReanimatedRexportModule.useSharedValue;
binding = env0_12;
const value6 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [animate ? binding.HIDDEN : binding.VISIBLE]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const MediaGridItem_2 = MediaGridItem_;
MediaGridItem_2.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
opacity: value6, timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
MediaGridItem_2.__workletHash = 9644750191833;
MediaGridItem_2.__initData = env0_13;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [MediaGridItem_2]);
binding = env0_3;
binding.useEffect(_fun113939, [value6]);
const value8 = binding.useMemo(function() {
var sizeBinding = size;
return {width: sizeBinding, height: sizeBinding};
}, [size]);
const View2 = (ReanimatedRexport).View;
const items3 = [styles.container, containerStyle, value8, value7];
let type = media.type;
const EMBED = SearchMediaTypes.EMBED;
const items2 = [
type === EMBED && ((SearchEmbedMediaImage) => <SearchEmbedMediaImage sources={media.sources} embed={media.embed} messageId={media.messageId} channelId={media.channelId} authorId={media.author.id} scale={scale} containerHeight={size} containerWidth={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchEmbedMediaImage),
];
type = media.type;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
items2[1] = type === ATTACHMENT && ((SearchAttachmentMediaImage) => <SearchAttachmentMediaImage attachment={media.attachment} channelId={media.channelId} authorId={media.author.id} scale={scale} containerHeight={size} containerWidth={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchAttachmentMediaImage);
type = media.type;
const AUDIO = SearchMediaTypes.AUDIO;
items2[2] = type === AUDIO && ((SearchSoundMediaImage) => <SearchSoundMediaImage height={size} width={size} />)((require(15059) /* metro dependency 15059: SearchMediaImage */).SearchSoundMediaImage);
type = media.type;
const COMPONENT = SearchMediaTypes.COMPONENT;
const value15 = type === COMPONENT;
if (value15) {
SearchComponentMediaImage = (require(15059) /* metro dependency 15059: SearchMediaImage */).SearchComponentMediaImage;
unfurledMediaItem = media.unfurledMediaItem;
sources = media.sources;
channelId = media.channelId;
author = media.author;
id = author.id;
author = media.author;
r9 = (
<SearchComponentMediaImage
unfurledMediaItem={unfurledMediaItem}
sources={sources}
channelId={channelId}
authorId={id}
isBot={author.bot}
scale={scale}
containerHeight={size}
containerWidth={size}
/>
);
} else {
r9 = value15;
}
items2[3] = r9;
items2[4] = value4 != null && <View style={styles.avatar}>{((Card) => <Card shadow="low" style={styles.card}>{((Avatar) => <Avatar source={value4} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} avatarDecoration={media.author.avatarDecoration} />)((require(1305) /* metro dependency 1305: native */).Avatar)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card)}</View>;
return (
<View2 style={items3}>
<Pressable
ref={value3}
style={value8}
accessibilityRole="button"
onPress={value5}
>
{items2}
</Pressable>
</View2>
);
function _fun113937() { // fn#113937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:976, offset: 0x0240d200, size: 41 bytes, params: 1, frame: 12
onPress({media: media, originView: env0_3.current});
}
function MediaGridItem_() { // fn#113938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:1102, owner: MediaGridItem._, offset: 0x0240d229, size: 78 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
object.opacity = value.withTiming(ReactNativeModule.Pressable.get(),
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
return object;
}
function _fun113939() { // fn#113939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15255:1324, offset: 0x0240d277, size: 34 bytes, params: 1, frame: 11
const set = ReactNativeModule.Pressable.set;
const VISIBLE = env1_12.VISIBLE;
Reflect.apply(set, ReactNativeModule.Pressable, [VISIBLE]);
}
}
}
global.__d(_fun113933, 15058, [31, 27, 1379, 9615, 33, 4501, 697, 566, 4017, 4504, 4507, 15059, 6239, 1305,
2]) /* metro module 15058, dependencies: [31, 27, 1379, 9615, 33, 4501, 697, 566, 4017, 4504, 4507, 15059, 6239, 1305, 2] */;
@@ -1,25 +1,37 @@
/* Metro module 15063; source: modules/search/native/components/list/rows/MessageRow.tsx; dependencies: [31, 27, 4502, 1382, 1379, 1867, 4864, 661, 33, 4501, 697, 566, 6647, 4805, 1305, 4573, 10937, 11053, 8706, 3995, 8061, 15064, 14429, 15065, 4634, 8206, 5087, 15046, 1244, 10975, 3834, 2] */
import Native from '../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import FavoriteStore from '../../../../../favorites/FavoriteStore.tsx'; /* Metro dependency 1382 */
import GuildStore from '../../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserUtils from '../../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import AccessibilityStore from '../../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseMessageAuthor from '../../../../../messages/useMessageAuthor.tsx'; /* Metro dependency 4634 */
import UseChannelName from '../../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import UserGuildSettingsStore from '../../../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpoilerChannelUtilsModule from '../../../../../spoiler_channels/SpoilerChannelUtils.tsx'; /* Metro dependency 5087 */
import * as ChannelUtilsModule from '../../../../../../utils/native/ChannelUtils.tsx'; /* Metro dependency 6647 */
import * as UserActionCreatorsModule from '../../../../../../actions/UserActionCreators.tsx'; /* Metro dependency 8061 */
import * as EnhancedRoleColorUtilsModule from '../../../../../premium/enhanced_role_colors/native/EnhancedRoleColorUtils.tsx'; /* Metro dependency 8206 */
import * as UseSearchMessageTimestampModule from '../../../hooks/useSearchMessageTimestamp.tsx'; /* Metro dependency 15064 */
function _fun113973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:6, offset: 0x0240ecb0, size: 552 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
value2.Platform;
const env0_4 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const favoriteStore = importDefault(1382) /* metro dependency 1382: FavoriteStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{channelIcon: {'marginRight': 5,
let value = ReactModule;
ReactNativeModule.Platform;
const createStyles = CreateStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [{channelIcon: {'marginRight': 5,
'alignSelf': 'center'}, channelStatus: {'marginLeft': 5, 'alignSelf': 'center',
tintColor: INTERACTIVE_TEXT_DEFAULT}, labelContainer: {'flexDirection': 'row', 'width': '100%',
'marginBottom': 2, 'alignItems': 'center'}, authorRow: {'flexShrink': 1, 'minWidth': 0, 'flexDirection': 'row'},
@@ -27,216 +39,308 @@ function _fun113973(global, require, importDefault, importAll, module, exports,
body: {alignItems: 'flex-start'}, pollBadge: {marginLeft: 8}, suppressNotificationsIcon: {marginLeft: 4},
spoilerText: {fontStyle: 'italic'}}]);
value = value.memo(MessageRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/MessageRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/MessageRow.tsx');
exports.default = value;
}
function GuildChannelMessageRowHeader({channel, muted, isFavorite}) { // fn#113974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:766, offset: 0x0240eed8, size: 594 bytes, params: 2, frame: 27
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var r5;
var value;
const styles = useStyles();
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel,
{isRulesChannel: (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore],
_fun113975) === channel.id});
const value4 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const items2 = [<Icon source={channelIcon} size={REFRESH_SMALL_16} style={styles.channelIcon} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text lineClamp={1} variant="text-sm/semibold" color="interactive-text-default">{value4}</Text>;
items2[2] = muted && <Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />;
items2[3] = isFavorite && <Icon source={importDefault(11053) /* metro dependency 11053 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />;
const isSystemDM2 = channel.isSystemDM();
if (isSystemDM2) {
value = importDefault(8706) /* metro dependency 8706: BotTag */;
value = ((Component) => <Component type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified />)(value);
r5 = value;
} else {
r5 = isSystemDM2;
}
items2[4] = r5;
return (
<View style={styles.header}>
{items2}
</View>
);
}
function MessageRowIcon({message, channel}) { // fn#113976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1528, offset: 0x0240f15b, size: 119 bytes, params: 2, frame: 19
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {user: message.author, guildId: channel.guild_id};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
avatarProps.avatarDecoration = message.author.avatarDecoration;
return <Avatar {...avatarProps} />;
}
function PrivateChannelMessageRowLabel({message, channel, muted}) { // fn#113977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1714, offset: 0x0240f1d2, size: 675 bytes, params: 2, frame: 33
var r5;
var value;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun113978, [message.author]);
env0_3.useEffect(function() {
if (channel.isDM() || channel.isGroupDM()) {
channel.recipients.forEach(_fun113980);
}
}, [channel]);
const {timestamp,
timestampAccessibilityLabel} = (require(15064) /* metro dependency 15064: useSearchMessageTimestamp */).useSearchMessageTimestamp(message,
channel);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [<Text lineClamp={1} variant="text-md/semibold" color="interactive-text-active">{value2}</Text>];
items3[1] = muted && ((Icon) => <Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />)((require(1305) /* metro dependency 1305: native */).Icon);
items3[2] = channel.isSystemDM() && ((Component) => <Component type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified />)(importDefault(8706) /* metro dependency 8706: BotTag */);
const items2 = [<View style={styles.authorRow}>{items3}</View>];
items2[1] = <Text variant="text-xs/medium" color="interactive-text-active" lineClamp={1} style={styles.timestamp} accessibilityLabel={timestampAccessibilityLabel}>{timestamp}</Text>;
const hasFlag = message.hasFlag;
const SUPPRESS_NOTIFICATIONS = MessageFlags.SUPPRESS_NOTIFICATIONS;
items2[2] = Reflect.apply(hasFlag, message,
[SUPPRESS_NOTIFICATIONS]) ? ((BellZIcon) => <BellZIcon size="xs" style={styles.suppressNotificationsIcon} />)((require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon) : null;
if (message.isPoll()) {
value = importDefault(15065) /* metro dependency 15065: PollBadge */;
value = ((Component) => <Component style={styles.pollBadge} />)(value);
r5 = value;
} else {
r5 = null;
}
items2[3] = r5;
return (
<View style={styles.labelContainer}>
{items2}
</View>
);
}
function GuildChannelMessageRowLabel({message, channel}) { // fn#113981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:2691, offset: 0x0240f517, size: 696 bytes, params: 2, frame: 34
var r5;
var value;
const styles = useStyles();
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const {nick, colorString,
colorStrings} = (importDefault(4634) /* metro dependency 4634: useMessageAuthor */)(message);
const r18 = roleStyle !== 'username' ? {} : colorString != null ? {color: colorString} : {};
const value4 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(colorStrings);
const value5 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useIsRoleStyleAndRoleColorsEligibleForERC(channel.guild_id,
message.author.id, roleStyle, value4);
const {timestamp,
timestampAccessibilityLabel} = (require(15064) /* metro dependency 15064: useSearchMessageTimestamp */).useSearchMessageTimestamp(message,
channel);
const r13 = roleStyle === 'dot' && colorString != null && ((RoleDot) => <RoleDot size="small" color={colorString} colors={colorStrings} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<View style={styles.authorRow}>{r13}<Text variant="text-sm/semibold" color="interactive-text-active" lineClamp={1} style={r18} gradientColors={value5 ? value4 : undefined}>{nick}</Text></View>];
items2[1] = <Text variant="text-xs/medium" color="text-default" lineClamp={1} style={styles.timestamp} accessibilityLabel={timestampAccessibilityLabel}>{timestamp}</Text>;
const hasFlag = message.hasFlag;
const SUPPRESS_NOTIFICATIONS = MessageFlags.SUPPRESS_NOTIFICATIONS;
items2[2] = Reflect.apply(hasFlag, message,
[SUPPRESS_NOTIFICATIONS]) ? ((BellZIcon) => <BellZIcon size="xs" style={styles.suppressNotificationsIcon} />)((require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon) : null;
if (message.isPoll()) {
value = importDefault(15065) /* metro dependency 15065: PollBadge */;
value = ((Component) => <Component style={styles.pollBadge} />)(value);
r5 = value;
} else {
r5 = null;
}
items2[3] = r5;
return (
<View style={styles.labelContainer}>
{items2}
</View>
);
}
function MessageRow({message, onPress, lineClamp, messageSizeCacheRef}) { // fn#113983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:3709, offset: 0x0240f7cf, size: 720 bytes, params: 2, frame: 28
var r7;
var r0;
var SearchListRow;
var Text;
var intl;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(message.channel_id);
});
const env0_3 = channel?.guild_id;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([FavoriteStore], _fun113985);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
function() {
return UserGuildSettingsStore.isChannelMuted(guild_id, message.channel_id);
});
const value6 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
let binding = env0_3;
const value7 = binding.useCallback(function() {
var onPressBinding = onPress;
var messageBinding = message;
onPressBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id});
}, [message.channel_id, message.id, onPress]);
binding = env0_3;
let useMemo = binding.useMemo;
const value8 = Reflect.apply(useMemo, binding, [function() {
var r0;
r0 = channel?.guild_id;
r0 = r0 == null ? PrivateChannelMessageRowLabel : GuildChannelMessageRowLabel;
return r0;
}, [channel?.guild_id]]);
binding = env0_3;
useMemo = binding.useMemo;
if (channel == null) {
r0 = null;
} else {
SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
var searchListRowProps = {header: Reflect.apply(useMemo, binding, [_fun113989, [channel, value4, value5]]),
icon: <MessageRowIcon message={message} channel={channel} />,
label: ((Component) => <Component message={message} channel={channel} muted={value5} />)(value8)};
if (value6) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-sm/normal', 'color': 'text-muted', style: styles.spoilerText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uaI/7'])}</Text>;
function GuildChannelMessageRowHeader({channel, muted, isFavorite}) { // fn#113974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:766, offset: 0x0240eed8, size: 594 bytes, params: 2, frame: 27
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var r5;
var value;
const styles = useStyles();
const channelIcon = (ChannelUtilsModule).getChannelIcon(channel,
{isRulesChannel: (FluxModule).useStateFromStores([GuildStore],
_fun113975) === channel.id});
const value4 = (UseChannelName)(channel);
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const items2 = [
<Icon
source={channelIcon}
size={REFRESH_SMALL_16}
style={styles.channelIcon}
/>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
lineClamp={1}
variant="text-sm/semibold"
color="interactive-text-default"
>
{value4}
</Text>
);
items2[2] = muted && <Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />;
items2[3] = isFavorite && <Icon source={importDefault(11053) /* metro dependency 11053 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />;
const isSystemDM2 = channel.isSystemDM();
if (isSystemDM2) {
value = importDefault(8706) /* metro dependency 8706: BotTag */;
value = ((Component) => <Component type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified />)(value);
r5 = value;
} else {
const NativeMessageChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeMessageChannelRowPreview;
r7 = <NativeMessageChannelRowPreview message={message} channel={channel} muted={false} layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COZY} color="interactive-text-default" lineClamp={lineClamp} messageSizeCacheRef={messageSizeCacheRef} />;
r5 = isSystemDM2;
}
searchListRowProps.subLabel = r7;
searchListRowProps.onPress = value7;
searchListRowProps.bodyStyle = styles.body;
r0 = <SearchListRow {...searchListRowProps} />;
items2[4] = r5;
return (
<View style={styles.header}>
{items2}
</View>
);
function _fun113975() { // fn#113975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:883, offset: 0x0240f12a, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return GuildStore.getGuild(channel.guild_id)?.rulesChannelId;
}
}
return r0;
}
function _fun113975() { // fn#113975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:883, offset: 0x0240f12a, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return GuildStore.getGuild(channel.guild_id)?.rulesChannelId;
}
function _fun113978() { // fn#113978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1807, offset: 0x0240f475, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(message.author);
}
function _fun113979() { // fn#113979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1864, offset: 0x0240f4a8, size: 70 bytes, params: 1, frame: 12
if (channel.isDM() || channel.isGroupDM()) {
channel.recipients.forEach(_fun113980);
function MessageRowIcon({message, channel}) { // fn#113976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1528, offset: 0x0240f15b, size: 119 bytes, params: 2, frame: 19
const Avatar = (NativeModule).Avatar;
const avatarProps = {user: message.author, guildId: channel.guild_id};
const AvatarSizes = (NativeModule).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
avatarProps.avatarDecoration = message.author.avatarDecoration;
return <Avatar {...avatarProps} />;
}
function PrivateChannelMessageRowLabel({message, channel, muted}) { // fn#113977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1714, offset: 0x0240f1d2, size: 675 bytes, params: 2, frame: 33
var r5;
var value;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun113978, [message.author]);
env0_3.useEffect(function() {
if (channel.isDM() || channel.isGroupDM()) {
channel.recipients.forEach(_fun113980);
}
}, [channel]);
const {timestamp,
timestampAccessibilityLabel} = (UseSearchMessageTimestampModule).useSearchMessageTimestamp(message,
channel);
const Text = (TextModule).Text;
const items3 = [
<Text
lineClamp={1}
variant="text-md/semibold"
color="interactive-text-active"
>
{value2}
</Text>,
];
items3[1] = muted && ((Icon) => <Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelStatus} />)((require(1305) /* metro dependency 1305: native */).Icon);
items3[2] = channel.isSystemDM() && ((Component) => <Component type={(importDefault(8706) /* metro dependency 8706: BotTag */).Types.SYSTEM_DM} verified />)(importDefault(8706) /* metro dependency 8706: BotTag */);
const items2 = [
<View style={styles.authorRow}>
{items3}
</View>,
];
items2[1] = (
<Text
variant="text-xs/medium"
color="interactive-text-active"
lineClamp={1}
style={styles.timestamp}
accessibilityLabel={timestampAccessibilityLabel}
>
{timestamp}
</Text>
);
const hasFlag = message.hasFlag;
const SUPPRESS_NOTIFICATIONS = MessageFlags.SUPPRESS_NOTIFICATIONS;
items2[2] = (
Reflect.apply(hasFlag, message, [SUPPRESS_NOTIFICATIONS])
? ((BellZIcon) => <BellZIcon size="xs" style={styles.suppressNotificationsIcon} />)((require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon)
: null
);
if (message.isPoll()) {
value = importDefault(15065) /* metro dependency 15065: PollBadge */;
value = ((Component) => <Component style={styles.pollBadge} />)(value);
r5 = value;
} else {
r5 = null;
}
items2[3] = r5;
return (
<View style={styles.labelContainer}>
{items2}
</View>
);
function _fun113978() { // fn#113978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1807, offset: 0x0240f475, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (UserUtils).getName(message.author);
}
function _fun113979() { // fn#113979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1864, offset: 0x0240f4a8, size: 70 bytes, params: 1, frame: 12
if (channel.isDM() || channel.isGroupDM()) {
channel.recipients.forEach(_fun113980);
}
function _fun113980(a0) { // fn#113980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1918, offset: 0x0240f4ee, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (UserActionCreatorsModule).getUser(a0);
}
}
}
function GuildChannelMessageRowLabel({message, channel}) { // fn#113981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:2691, offset: 0x0240f517, size: 696 bytes, params: 2, frame: 34
var r5;
var value;
const styles = useStyles();
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const {nick, colorString,
colorStrings} = (UseMessageAuthor)(message);
const r18 = roleStyle !== 'username' ? {} : colorString != null ? {color: colorString} : {};
const value4 = (EnhancedRoleColorUtilsModule).useProcessColorStringsArray(colorStrings);
const value5 = (EnhancedRoleColorUtilsModule).useIsRoleStyleAndRoleColorsEligibleForERC(channel.guild_id,
message.author.id, roleStyle, value4);
const {timestamp,
timestampAccessibilityLabel} = (UseSearchMessageTimestampModule).useSearchMessageTimestamp(message,
channel);
const r13 = roleStyle === 'dot' && colorString != null && ((RoleDot) => <RoleDot size="small" color={colorString} colors={colorStrings} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (TextModule).Text;
const items2 = [
<View style={styles.authorRow}>
{r13}
<Text
variant="text-sm/semibold"
color="interactive-text-active"
lineClamp={1}
style={r18}
gradientColors={value5 ? value4 : undefined}
>
{nick}
</Text>
</View>,
];
items2[1] = (
<Text
variant="text-xs/medium"
color="text-default"
lineClamp={1}
style={styles.timestamp}
accessibilityLabel={timestampAccessibilityLabel}
>
{timestamp}
</Text>
);
const hasFlag = message.hasFlag;
const SUPPRESS_NOTIFICATIONS = MessageFlags.SUPPRESS_NOTIFICATIONS;
items2[2] = (
Reflect.apply(hasFlag, message, [SUPPRESS_NOTIFICATIONS])
? ((BellZIcon) => <BellZIcon size="xs" style={styles.suppressNotificationsIcon} />)((require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon)
: null
);
if (message.isPoll()) {
value = importDefault(15065) /* metro dependency 15065: PollBadge */;
value = ((Component) => <Component style={styles.pollBadge} />)(value);
r5 = value;
} else {
r5 = null;
}
items2[3] = r5;
return (
<View style={styles.labelContainer}>
{items2}
</View>
);
}
function MessageRow({message, onPress, lineClamp, messageSizeCacheRef}) { // fn#113983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:3709, offset: 0x0240f7cf, size: 720 bytes, params: 2, frame: 28
var r7;
var r0;
var SearchListRow;
var Text;
var intl;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(message.channel_id);
});
const guild_id = channel?.guild_id;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([FavoriteStore], _fun113985);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
function() {
return UserGuildSettingsStore.isChannelMuted(guild_id, message.channel_id);
});
const value6 = (SpoilerChannelUtilsModule).useIsChannelSpoilerGated(channel);
let binding = guild_id;
const value7 = binding.useCallback(function() {
var onPressBinding = onPress;
var messageBinding = message;
onPressBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id});
}, [message.channel_id, message.id, onPress]);
binding = guild_id;
let useMemo = binding.useMemo;
const value8 = Reflect.apply(useMemo, binding, [function() {
var r0;
r0 = channel?.guild_id;
r0 = r0 == null ? PrivateChannelMessageRowLabel : GuildChannelMessageRowLabel;
return r0;
}, [channel?.guild_id]]);
binding = guild_id;
useMemo = binding.useMemo;
if (channel == null) {
r0 = null;
} else {
SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
var searchListRowProps = {header: Reflect.apply(useMemo, binding, [_fun113989, [channel, value4, value5]]),
icon: <MessageRowIcon message={message} channel={channel} />,
label: ((Component) => <Component message={message} channel={channel} muted={value5} />)(value8)};
if (value6) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-sm/normal', 'color': 'text-muted', style: styles.spoilerText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uaI/7'])}
</Text>
);
} else {
const NativeMessageChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeMessageChannelRowPreview;
r7 = (
<NativeMessageChannelRowPreview
message={message}
channel={channel}
muted={false}
layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COZY}
color="interactive-text-default"
lineClamp={lineClamp}
messageSizeCacheRef={messageSizeCacheRef}
/>
);
}
searchListRowProps.subLabel = r7;
searchListRowProps.onPress = value7;
searchListRowProps.bodyStyle = styles.body;
r0 = <SearchListRow {...searchListRowProps} />;
}
return r0;
function _fun113985() { // fn#113985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:3927, offset: 0x0240fa9f, size: 45 bytes, params: 1, frame: 12
return guild_id != null && FavoriteStore.isFavorite(message.channel_id);
}
function _fun113989() { // fn#113989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:4324, offset: 0x0240fb4a, size: 85 bytes, params: 1, frame: 16
const channelBinding = channel;
const value2 = null;
return (
value2 != (value2 == channelBinding ? undefined : channel.guild_id)
? (
<GuildChannelMessageRowHeader
channel={channel}
muted={env0_5}
isFavorite={ReactNativeModule.View}
/>
)
: value2
);
}
}
}
function _fun113985() { // fn#113985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:3927, offset: 0x0240fa9f, size: 45 bytes, params: 1, frame: 12
return guild_id != null && FavoriteStore.isFavorite(message.channel_id);
}
function _fun113989() { // fn#113989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:4324, offset: 0x0240fb4a, size: 85 bytes, params: 1, frame: 16
const channelBinding = channel;
const value2 = null;
return value2 != (value2 == channelBinding ? undefined : channel.guild_id) ? <GuildChannelMessageRowHeader channel={channel} muted={env0_5} isFavorite={env0_4} /> : value2;
}
function _fun113980(a0) { // fn#113980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15260:1918, offset: 0x0240f4ee, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(8061) /* metro dependency 8061: UserActionCreators */).getUser(a0);
}
global.__d(_fun113973, 15063, [31, 27, 4502, 1382, 1379, 1867, 4864, 661, 33, 4501, 697, 566, 6647, 4805, 1305,
4573, 10937, 11053, 8706, 3995, 8061, 15064, 14429, 15065, 4634, 8206, 5087, 15046, 1244, 10975, 3834,
2]) /* metro module 15063, dependencies: [31, 27, 4502, 1382, 1379, 1867, 4864, 661, 33, 4501, 697, 566, 6647, 4805, 1305, 4573, 10937, 11053, 8706, 3995, 8061, 15064, 14429, 15065, 4634, 8206, 5087, 15046, 1244, 10975, 3834, 2] */;
@@ -1,303 +1,375 @@
/* Metro module 15048; source: modules/search/native/components/list/rows/SearchHistoryRow.tsx; dependencies: [5, 31, 27, 1379, 4605, 1878, 9615, 33, 4501, 697, 11828, 5278, 5312, 15036, 9673, 15046, 4573, 6998, 632, 15047, 8061, 4603, 15045, 15049, 15057, 1244, 2] */
import Module00005 from '../../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ReadStateStore from '../../../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import Tracking from '../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as MagnifyingGlassIconModule from '../../../../../../design/components/Icon/native/redesign/generated/MagnifyingGlassIcon.tsx'; /* Metro dependency 6998 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as UseOnPressSearchItemModule from '../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as SearchListRowModule from '../SearchListRow.tsx'; /* Metro dependency 15046 */
function _fun113866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:6, offset: 0x024098e9, size: 571 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchHistoryItemTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_10 = value2.jsx;
const env0_11 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'height': 48, 'width': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'height': 48, 'width': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object3.iconContainer = object4;
object3.text = {flexShrink: 1};
object3.textContainer = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 2};
object3.textIconContainer = {alignSelf: 'flex-start'};
const object6 = {'paddingHorizontal': 8, 'paddingVertical': 4, 'borderRadius': null, 'overflow': 'hidden',
object2.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object.iconContainer = object2;
object.text = {flexShrink: 1};
object.textContainer = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 2};
object.textIconContainer = {alignSelf: 'flex-start'};
const object5 = {'paddingHorizontal': 8, 'paddingVertical': 4, 'borderRadius': null, 'overflow': 'hidden',
'margin': 2, 'flexDirection': 'row', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.tag = object6;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
object5.backgroundColor = BACKGROUND_BASE_LOWEST;
object.tag = object5;
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_13 = [];
value = value.memo(_fun113895);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/SearchHistoryRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/SearchHistoryRow.tsx');
exports.default = value;
}
function SearchHistoryRemoveIcon({searchContext, searchHistoryItem}) { // fn#113867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:748, offset: 0x02409b24, size: 201 bytes, params: 2, frame: 18
const value2 = env0_4.useCallback(_fun113868, [searchContext, searchHistoryItem]);
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<PressableHighlight
onPress={value2}
accessibilityRole="button"
unstable_pressDelay={130}
style={{marginLeft: 16}}
hitSlop={{'bottom': 16, 'left': 16, 'right': 16, 'top': 16}}
>
<XSmallIcon size="sm" color="interactive-text-default" />
</PressableHighlight>
);
}
function SearchHistoryTextRow({searchContext, searchHistoryItem}) { // fn#113869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1137, offset: 0x02409c1f, size: 447 bytes, params: 2, frame: 28
var object2;
const styles = useStyles();
const value4 = env0_4.useCallback(_fun113870,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressSearchHistoryText({searchContext: searchContext}),
searchContext, searchHistoryItem.tags, searchHistoryItem.text, searchHistoryItem.type]);
const SearchListRow = (require(15046) /* metro dependency 15046: SearchListRow */).SearchListRow;
object2 = {};
const r8 = searchHistoryItem.tags?.map(_fun113871);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2.label = <View style={styles.textContainer}>{r8}<Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary" style={styles.text}>{searchHistoryItem.text}</Text></View>;
object2.onPress = value4;
object2.trailing = <SearchHistoryRemoveIcon searchContext={searchContext} searchHistoryItem={searchHistoryItem} />;
object2.iconContainerStyle = styles.textIconContainer;
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
object2.icon = <View style={styles.iconContainer}><MagnifyingGlassIcon size="sm" color="interactive-text-default" /></View>;
return <SearchListRow {...object2} />;
}
function SearchHistoryGroupDMRow({searchContext, searchHistoryItem}) { // fn#113872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2083, offset: 0x02409eab, size: 293 bytes, params: 2, frame: 21
var r0;
var value;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
env0_4.useEffect(_fun113874, [channel, searchContext, searchHistoryItem]);
const value3 = env0_4.useCallback(_fun113875,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGroupDMItem({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (channel == null) {
r0 = null;
} else {
value = importDefault(15047) /* metro dependency 15047: GroupDMRow */;
value = ((Component) => <Component channel={channel} onPress={value3} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
}
function SearchHistoryDMRow({searchContext, searchHistoryItem}) { // fn#113876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2712, offset: 0x0240a060, size: 290 bytes, params: 2, frame: 21
var r0;
var value;
const user = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getUser(searchHistoryItem.userId);
});
const binding = env0_4;
const useEffect = binding.useEffect;
const userId = searchHistoryItem.userId;
Reflect.apply(useEffect, binding, [_fun113878, [userId]]);
const value4 = env0_4.useCallback(_fun113879(),
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (user == null) {
r0 = null;
} else {
value = importDefault(15045) /* metro dependency 15045: DMRow */;
value = ((Component) => <Component user={user} onPress={value4} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
}
function SearchHistoryGuildVoiceChannelRow({searchContext, searchHistoryItem}) { // fn#113883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:3448, offset: 0x0240a290, size: 299 bytes, params: 2, frame: 21
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
let binding = env0_4;
binding.useEffect(_fun113885, [channel, searchContext, searchHistoryItem]);
const value2 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
binding = env0_4;
const useCallback = binding.useCallback;
return channel == null ? null : ((Component) => <Component channel={channel} voiceStates={env0_13} speakerVoiceStates={env0_13} trailing={<SearchHistoryRemoveIcon searchContext={searchContext} searchHistoryItem={searchHistoryItem} />} onPress={Reflect.apply(useCallback,
binding, [_fun113886, [value2, searchContext,
searchHistoryItem.type]])} />)(importDefault(15049) /* metro dependency 15049: GuildVoiceOrStageChannelRow */);
}
function SearchHistoryGuildTextChannelRow({searchContext, searchHistoryItem}) { // fn#113887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4039, offset: 0x0240a3bb, size: 337 bytes, params: 2, frame: 22
var r0;
var value;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
env0_4.useEffect(_fun113889, [channel, searchContext, searchHistoryItem]);
let value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ReadStateStore],
function() {
var r1;
var value2 = ReadStateStore.lastMessageId(searchHistoryItem.channelId);
var value3 = null;
r1 = value3 != value2 ? value2 : value3 == channel ? undefined : channel.lastMessageId;
return value3 != r1 ? r1 : value3;
});
const value4 = env0_4.useCallback(_fun113891,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (channel == null) {
r0 = null;
} else {
value = importDefault(15057) /* metro dependency 15057: GuildTextChannelRow */;
value = ((Component) => <Component channel={channel} lastMessageId={value2} onPress={value4} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
}
function useClearableSearchHistoryRowProps(a0, a1) { // fn#113892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4845, offset: 0x0240a558, size: 126 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
object2.accessibilityActions = env0_4.useMemo(function() {
var object = {name: 'remove'};
object.label = require(dependencyMap[25]).intl.string(require(dependencyMap[25]).t.Ov3VO7);
return [object];
}, []);
object2.onAccessibilityAction = env0_4.useCallback(_fun113894, [a0, a1]);
object2.trailing = <SearchHistoryRemoveIcon searchContext={a0} searchHistoryItem={a1} />;
return object2;
}
function _fun113895(a0) { // fn#113895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:5219, offset: 0x0240a677, size: 314 bytes, params: 2, frame: 17
const searchHistoryItem = a0.searchHistoryItem;
const value = Object.create(null);
value.searchHistoryItem = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const type = searchHistoryItem.type;
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return <SearchHistoryGroupDMRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const DM = SearchHistoryItemTypes.DM;
if (DM === type) {
return <SearchHistoryDMRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const TEXT = SearchHistoryItemTypes.TEXT;
if (TEXT === type) {
return <SearchHistoryTextRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return <SearchHistoryGuildTextChannelRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return <SearchHistoryGuildVoiceChannelRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
return null;
}
function _fun113868() { // fn#113868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:841, offset: 0x02409bed, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
function _fun113870() { // fn#113870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1293, offset: 0x02409dde, size: 87 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchHistoryClicked = value.trackSearchHistoryClicked;
const searchHistoryItemBinding = searchHistoryItem;
Reflect.apply(trackSearchHistoryClicked, value, [{searchContext: searchContext,
searchHistoryItemType: searchHistoryItemBinding.type}]);
env0_3(searchHistoryItemBinding.text, searchHistoryItemBinding.tags);
}
function _fun113871(a0) { // fn#113871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1535, offset: 0x02409e35, size: 118 bytes, params: 2, frame: 19
const viewBindingProps = {accessibilityRole: 'button', style: styles.tag};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View {...viewBindingProps} key={a0.text}>
<Text
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
function SearchHistoryRemoveIcon({searchContext, searchHistoryItem}) { // fn#113867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:748, offset: 0x02409b24, size: 201 bytes, params: 2, frame: 18
const value2 = env0_4.useCallback(_fun113868, [searchContext, searchHistoryItem]);
const PressableHighlight = (PressablesModule).PressableHighlight;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
return (
<PressableHighlight
onPress={value2}
accessibilityRole="button"
unstable_pressDelay={130}
style={{marginLeft: 16}}
hitSlop={{
'bottom': 16,
'left': 16,
'right': 16,
'top': 16,
}}
>
{a0.text}
</Text>
</View>
);
}
function _fun113874() { // fn#113874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2239, offset: 0x02409fd0, size: 62 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (channel == null) {
value2 = environment.__proto__;
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
defaultImport.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
}
function _fun113875(a0) { // fn#113875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2375, offset: 0x0240a00e, size: 82 bytes, params: 2, frame: 15
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchHistoryClicked({searchContext: searchContext,
channelId: a0, searchHistoryItemType: searchHistoryItem.type});
env0_3(a0);
}
function _fun113878() { // fn#113878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2857, offset: 0x0240a1a2, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(8061) /* metro dependency 8061: UserActionCreators */;
const getUser = value.getUser;
const userId = searchHistoryItem.userId;
Reflect.apply(getUser, value, [userId]);
}
function _fun113879() { // fn#113879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2970, offset: 0x0240a1d4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun113881);
return _fun113882;
}
function _fun113894({nativeEvent}) { // fn#113894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:5042, offset: 0x0240a62c, size: 75 bytes, params: 2, frame: 13
var value;
if (nativeEvent.actionName === 'remove') {
value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.removeSearchHistoryItem(env0_0, require);
}
}
function* _fun113881(a0) { // fn#113881, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2990, offset: 0x0240a203, size: 141 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[21]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
<XSmallIcon size="sm" color="interactive-text-default" />
</PressableHighlight>
);
function _fun113868() { // fn#113868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:841, offset: 0x02409bed, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
value = env3_1(env3_2[14]);
value.trackSearchHistoryClicked({searchContext: require, channelId: value4,
searchHistoryItemType: importDefault.type});
dependencyMap(a0, value4);
}
function SearchHistoryTextRow({searchContext, searchHistoryItem}) { // fn#113869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1137, offset: 0x02409c1f, size: 447 bytes, params: 2, frame: 28
const styles = useStyles();
const value4 = env0_4.useCallback(_fun113870,
[(UseOnPressSearchItemModule).useOnPressSearchHistoryText({searchContext: searchContext}),
searchContext, searchHistoryItem.tags, searchHistoryItem.text, searchHistoryItem.type]);
const SearchListRow = (SearchListRowModule).SearchListRow;
object = {};
const r8 = searchHistoryItem.tags?.map(_fun113871);
const Text = (TextModule).Text;
object.label = (
<View style={styles.textContainer}>
{r8}
<Text
lineClamp={1}
variant="text-md/semibold"
color="mobile-text-heading-primary"
style={styles.text}
>
{searchHistoryItem.text}
</Text>
</View>
);
object.onPress = value4;
object.trailing = <SearchHistoryRemoveIcon searchContext={searchContext} searchHistoryItem={searchHistoryItem} />;
object.iconContainerStyle = styles.textIconContainer;
const MagnifyingGlassIcon = (MagnifyingGlassIconModule).MagnifyingGlassIcon;
object.icon = (
<View style={styles.iconContainer}>
<MagnifyingGlassIcon size="sm" color="interactive-text-default" />
</View>
);
return <SearchListRow {...object} />;
function _fun113870() { // fn#113870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1293, offset: 0x02409dde, size: 87 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchHistoryClicked = value.trackSearchHistoryClicked;
const searchHistoryItemBinding = searchHistoryItem;
Reflect.apply(trackSearchHistoryClicked, value, [{searchContext: searchContext,
searchHistoryItemType: searchHistoryItemBinding.type}]);
Module00005(searchHistoryItemBinding.text, searchHistoryItemBinding.tags);
}
function _fun113871(a0) { // fn#113871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:1535, offset: 0x02409e35, size: 118 bytes, params: 2, frame: 19
const viewBindingProps = {accessibilityRole: 'button', style: styles.tag};
const Text = (TextModule).Text;
return (
<View {...viewBindingProps} key={a0.text}>
<Text
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
>
{a0.text}
</Text>
</View>
);
}
}
function SearchHistoryGroupDMRow({searchContext, searchHistoryItem}) { // fn#113872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2083, offset: 0x02409eab, size: 293 bytes, params: 2, frame: 21
var r0;
var value;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
env0_4.useEffect(_fun113874, [channel, searchContext, searchHistoryItem]);
const value3 = env0_4.useCallback(_fun113875,
[(UseOnPressSearchItemModule).useOnPressGroupDMItem({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (channel == null) {
r0 = null;
} else {
value = importDefault(15047) /* metro dependency 15047: GroupDMRow */;
value = ((Component) => <Component channel={channel} onPress={value3} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
function _fun113874() { // fn#113874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2239, offset: 0x02409fd0, size: 62 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (channel == null) {
value2 = environment.__proto__;
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
defaultImport.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
}
function _fun113875(a0) { // fn#113875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2375, offset: 0x0240a00e, size: 82 bytes, params: 2, frame: 15
const value = environment.__proto__;
(Tracking).trackSearchHistoryClicked({searchContext: searchContext,
channelId: a0, searchHistoryItemType: searchHistoryItem.type});
Module00005(a0);
}
}
function SearchHistoryDMRow({searchContext, searchHistoryItem}) { // fn#113876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2712, offset: 0x0240a060, size: 290 bytes, params: 2, frame: 21
var r0;
var value;
const user = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getUser(searchHistoryItem.userId);
});
const binding = env0_4;
const useEffect = binding.useEffect;
const userId = searchHistoryItem.userId;
Reflect.apply(useEffect, binding, [_fun113878, [userId]]);
const value4 = env0_4.useCallback(_fun113879(),
[(UseOnPressSearchItemModule).useOnPressDMItem({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (user == null) {
r0 = null;
} else {
value = importDefault(15045) /* metro dependency 15045: DMRow */;
value = ((Component) => <Component user={user} onPress={value4} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
function _fun113878() { // fn#113878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2857, offset: 0x0240a1a2, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(8061) /* metro dependency 8061: UserActionCreators */;
const getUser = value.getUser;
const userId = searchHistoryItem.userId;
Reflect.apply(getUser, value, [userId]);
}
function _fun113879() { // fn#113879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2970, offset: 0x0240a1d4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun113881);
return _fun113882;
function* _fun113881(a0) { // fn#113881, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:2990, offset: 0x0240a203, size: 141 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[21]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
value = env3_1(env3_2[14]);
value.trackSearchHistoryClicked({searchContext: require, channelId: value4,
searchHistoryItemType: importDefault.type});
dependencyMap(a0, value4);
}
}
function _fun113882() { // fn#113882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:3165, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function SearchHistoryGuildVoiceChannelRow({searchContext, searchHistoryItem}) { // fn#113883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:3448, offset: 0x0240a290, size: 299 bytes, params: 2, frame: 21
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
let binding = env0_4;
binding.useEffect(_fun113885, [channel, searchContext, searchHistoryItem]);
const value2 = (UseOnPressSearchItemModule).useOnPressGuildVoiceChannel({searchContext: searchContext});
binding = env0_4;
const useCallback = binding.useCallback;
return (
channel == null
? null
: ((Component) => <Component channel={channel} voiceStates={env0_13} speakerVoiceStates={env0_13} trailing={<SearchHistoryRemoveIcon searchContext={searchContext} searchHistoryItem={searchHistoryItem} />} onPress={Reflect.apply(useCallback,
binding, [_fun113886, [value2, searchContext,
searchHistoryItem.type]])} />)(importDefault(15049) /* metro dependency 15049: GuildVoiceOrStageChannelRow */)
);
function _fun113885() { // fn#113885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:3614, offset: 0x02409fd0, size: 62 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (channel == null) {
value2 = environment.__proto__;
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
defaultImport.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
}
function _fun113886(a0) { // fn#113886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:3756, offset: 0x0240a00e, size: 82 bytes, params: 2, frame: 15
const value = environment.__proto__;
(Tracking).trackSearchHistoryClicked({searchContext: searchContext,
channelId: a0, searchHistoryItemType: searchHistoryItem.type});
Module00005(a0);
}
}
function SearchHistoryGuildTextChannelRow({searchContext, searchHistoryItem}) { // fn#113887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4039, offset: 0x0240a3bb, size: 337 bytes, params: 2, frame: 22
var r0;
var value;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(searchHistoryItem.channelId);
});
env0_4.useEffect(_fun113889, [channel, searchContext, searchHistoryItem]);
let value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ReadStateStore],
function() {
var r1;
var value2 = ReadStateStore.lastMessageId(searchHistoryItem.channelId);
var value3 = null;
r1 = value3 != value2 ? value2 : value3 == channel ? undefined : channel.lastMessageId;
return value3 != r1 ? r1 : value3;
});
const value4 = env0_4.useCallback(_fun113891,
[(UseOnPressSearchItemModule).useOnPressGuildTextChannel({searchContext: searchContext}),
searchContext, searchHistoryItem.type]);
const {trailing, accessibilityActions, onAccessibilityAction} = useClearableSearchHistoryRowProps(searchContext,
searchHistoryItem);
if (channel == null) {
r0 = null;
} else {
value = importDefault(15057) /* metro dependency 15057: GuildTextChannelRow */;
value = ((Component) => <Component channel={channel} lastMessageId={value2} onPress={value4} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} trailing={trailing} />)(value);
r0 = value;
}
return r0;
function _fun113889() { // fn#113889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4204, offset: 0x02409fd0, size: 62 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (channel == null) {
value2 = environment.__proto__;
defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
defaultImport.removeSearchHistoryItem(searchContext, searchHistoryItem);
}
}
function _fun113891(a0) { // fn#113891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4492, offset: 0x0240a00e, size: 82 bytes, params: 2, frame: 15
const value = environment.__proto__;
(Tracking).trackSearchHistoryClicked({searchContext: searchContext,
channelId: a0, searchHistoryItemType: searchHistoryItem.type});
Module00005(a0);
}
}
function useClearableSearchHistoryRowProps(a0, a1) { // fn#113892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:4845, offset: 0x0240a558, size: 126 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
let object = {};
object.accessibilityActions = env0_4.useMemo(function() {
var object = {name: 'remove'};
object.label = require(dependencyMap[25]).intl.string(require(dependencyMap[25]).t.Ov3VO7);
return [object];
}, []);
object.onAccessibilityAction = env0_4.useCallback(_fun113894, [a0, a1]);
object.trailing = <SearchHistoryRemoveIcon searchContext={a0} searchHistoryItem={a1} />;
return object;
function _fun113894({nativeEvent}) { // fn#113894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:5042, offset: 0x0240a62c, size: 75 bytes, params: 2, frame: 13
var value;
if (nativeEvent.actionName === 'remove') {
value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
value.removeSearchHistoryItem(env0_0, require);
}
}
}
function _fun113895(a0) { // fn#113895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15245:5219, offset: 0x0240a677, size: 314 bytes, params: 2, frame: 17
const searchHistoryItem = a0.searchHistoryItem;
const value = Object.create(null);
value.searchHistoryItem = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const type = searchHistoryItem.type;
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
if (GROUP_DM === type) {
return <SearchHistoryGroupDMRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const DM = SearchHistoryItemTypes.DM;
if (DM === type) {
return <SearchHistoryDMRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const TEXT = SearchHistoryItemTypes.TEXT;
if (TEXT === type) {
return <SearchHistoryTextRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
if (GUILD_TEXT_CHANNEL === type) {
return <SearchHistoryGuildTextChannelRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
if (GUILD_VOICE_CHANNEL === type) {
return <SearchHistoryGuildVoiceChannelRow {...value2} {...{['searchHistoryItem']: searchHistoryItem}} />;
}
return null;
}
}
global.__d(_fun113866, 15048, [5, 31, 27, 1379, 4605, 1878, 9615, 33, 4501, 697, 11828, 5278, 5312, 15036, 9673,
15046, 4573, 6998, 632, 15047, 8061, 4603, 15045, 15049, 15057, 1244,
2]) /* metro module 15048, dependencies: [5, 31, 27, 1379, 4605, 1878, 9615, 33, 4501, 697, 11828, 5278, 5312, 15036, 9673, 15046, 4573, 6998, 632, 15047, 8061, 4603, 15045, 15049, 15057, 1244, 2] */;
@@ -1,31 +1,38 @@
/* Metro module 15043; source: modules/search/native/components/list/rows/Separators.tsx; dependencies: [31, 27, 9615, 33, 4501, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:6, offset: 0x02407c48, size: 255 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const {MEDIA_ITEM_GAP_WIDTH, FILES_OR_LINKS_GAP_WIDTH} = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const env0_2 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({filesOrLinksSeparator: {height: FILES_OR_LINKS_GAP_WIDTH},
ReactModule;
const {MEDIA_ITEM_GAP_WIDTH, FILES_OR_LINKS_GAP_WIDTH} = SearchConstantsModule;
const env0_2 = (CreateStylesModule).createStyles({filesOrLinksSeparator: {height: FILES_OR_LINKS_GAP_WIDTH},
mediaSeparator: {height: MEDIA_ITEM_GAP_WIDTH}, messageSeparator: {height: 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/list/rows/Separators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/list/rows/Separators.tsx');
exports.MessageVerticalSeparator = MessageVerticalSeparator;
exports.MediaVerticalSeparator = MediaVerticalSeparator;
exports.CardVerticalSeparator = CardVerticalSeparator;
function MessageVerticalSeparator() { // fn#113837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:428, offset: 0x02407d47, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.messageSeparator} />;
}
function MediaVerticalSeparator() { // fn#113838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:539, offset: 0x02407d70, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.mediaSeparator} />;
}
function CardVerticalSeparator() { // fn#113839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:645, offset: 0x02407d99, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.filesOrLinksSeparator} />;
}
}
function MessageVerticalSeparator() { // fn#113837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:428, offset: 0x02407d47, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.messageSeparator} />;
}
function MediaVerticalSeparator() { // fn#113838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:539, offset: 0x02407d70, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.mediaSeparator} />;
}
function CardVerticalSeparator() { // fn#113839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15240:645, offset: 0x02407d99, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.filesOrLinksSeparator} />;
}
global.__d(_fun113836, 15043, [31, 27, 9615, 33, 4501,
2]) /* metro module 15043, dependencies: [31, 27, 9615, 33, 4501, 2] */;
@@ -1,94 +1,110 @@
/* Metro module 15224; source: modules/search/native/components/navigator/SearchNavigator.tsx; dependencies: [31, 27, 9614, 15037, 661, 33, 4501, 697, 9884, 5280, 9673, 1585, 15225, 9603, 15220, 15221, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import Tracking from '../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchNavigatorPreviewHeader from './SearchNavigatorPreviewHeader.tsx'; /* Metro dependency 15220 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as TrackingConstantsModule from '../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as Module09884Module from '../../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
import * as SearchNavigatorConstantsModule from './SearchNavigatorConstants.tsx'; /* Metro dependency 15037 */
function _fun116463(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:6, offset: 0x0248a5c0, size: 339 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchEntrypointAnalyticsLocations;
const env0_6 = (require(15037) /* metro dependency 15037: SearchNavigatorConstants */).SearchNavigatorScreens;
const env0_7 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [{container: {flex: 1,
backgroundColor: BACKGROUND_BASE_LOWEST}}]);
const env0_11 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_11 = (Module09884Module).createNativeStackNavigator();
value = value.memo(_fun116464);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigator.tsx');
exports.default = value;
function _fun116464(a0) { // fn#116464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:396, offset: 0x0248a713, size: 367 bytes, params: 2, frame: 23
const searchContext = a0.route.params.searchContext;
const value2 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
let binding = env0_3;
binding.useEffect(function() {
importDefault(dependencyMap[10]).trackSearchOpened({searchContext: searchContext,
searchLocation: searchContext.type === SearchTypes.GUILD ? SearchEntrypointAnalyticsLocations.GUILD : SearchEntrypointAnalyticsLocations.DM_LIST});
return _fun116466;
}, [searchContext]);
const styles = useStyles();
const {left, right} = (UseSafeAreaInsetsNative)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_11;
const Navigator = binding.Navigator;
const object2 = {};
copyDataProperties(object2, value2, searchContext);
let Screen = binding.Screen;
const SEARCH_TABS = SearchNavigatorScreens.SEARCH_TABS;
const screen = (
<Screen
initialParams={{searchContext: searchContext}}
name={SEARCH_TABS}
options={{'headerShown': false, 'fullScreenGestureEnabled': true}}
getComponent={function() {
return require(dependencyMap[12]).default;
}}
/>
);
Screen = binding.Screen;
const SEARCH_CHAT_PREVIEW = SearchNavigatorScreens.SEARCH_CHAT_PREVIEW;
return (
<View style={items2}>
<Navigator id="search-navigator" screenOptions={object2}>
{screen}
<Screen
name={SEARCH_CHAT_PREVIEW}
options={options_116468}
getComponent={function() {
return require(dependencyMap[15]).default;
}}
/>
</Navigator>
</View>
);
function _fun116465() { // fn#116465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:505, offset: 0x0248a882, size: 111 bytes, params: 1, frame: 13
const type = searchContext.type;
const GUILD = SearchTypes.GUILD;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchOpened({searchContext: searchContext,
searchLocation: type === GUILD ? SearchEntrypointAnalyticsLocations.GUILD : SearchEntrypointAnalyticsLocations.DM_LIST});
return _fun116466;
function _fun116466() { // fn#116466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:621, offset: 0x0248a8f1, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
(Tracking).trackSearchClosed({searchContext: searchContext});
}
}
function options_116468({route, navigation}) { // fn#116468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:1061, offset: 0x0248a945, size: 109 bytes, params: 2, frame: 17
var environment;
const object = {headerShown: true};
const value = environment.__proto__;
object.header = (require(9603) /* metro dependency 9603: HeaderShared */).renderHeader;
object.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderBackImage(navigation);
object.headerTitle = headerTitle_116469;
object.fullScreenGestureEnabled = true;
return object;
function options_116468HeaderTitle() { // fn#116469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:1187, owner: options_116468.headerTitle, offset: 0x0248a9b2, size: 61 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
return ((Component) => <Component channelId={route.params.channelId} />)(SearchNavigatorPreviewHeader);
}
}
}
}
function _fun116464(a0) { // fn#116464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:396, offset: 0x0248a713, size: 367 bytes, params: 2, frame: 23
const searchContext = a0.route.params.searchContext;
const value2 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
let binding = env0_3;
binding.useEffect(function() {
importDefault(dependencyMap[10]).trackSearchOpened({searchContext: searchContext,
searchLocation: searchContext.type === SearchTypes.GUILD ? SearchEntrypointAnalyticsLocations.GUILD : SearchEntrypointAnalyticsLocations.DM_LIST});
return _fun116466;
}, [searchContext]);
const styles = useStyles();
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_11;
const Navigator = binding.Navigator;
const object = {};
copyDataProperties(object, value2, searchContext);
let Screen = binding.Screen;
const SEARCH_TABS = SearchNavigatorScreens.SEARCH_TABS;
const screen = <Screen initialParams={{searchContext: searchContext}} name={SEARCH_TABS} options={{'headerShown': false,
'fullScreenGestureEnabled': true}} getComponent={function() {
return require(dependencyMap[12]).default;
}} />;
Screen = binding.Screen;
const SEARCH_CHAT_PREVIEW = SearchNavigatorScreens.SEARCH_CHAT_PREVIEW;
return (
<View style={items2}>
<Navigator id="search-navigator" screenOptions={object}>
{screen}
<Screen
name={SEARCH_CHAT_PREVIEW}
options={options_116468}
getComponent={function() {
return require(dependencyMap[15]).default;
}}
/>
</Navigator>
</View>
);
}
function _fun116465() { // fn#116465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:505, offset: 0x0248a882, size: 111 bytes, params: 1, frame: 13
const type = searchContext.type;
const GUILD = SearchTypes.GUILD;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchOpened({searchContext: searchContext,
searchLocation: type === GUILD ? SearchEntrypointAnalyticsLocations.GUILD : SearchEntrypointAnalyticsLocations.DM_LIST});
return _fun116466;
}
function options_116468({route, navigation}) { // fn#116468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:1061, offset: 0x0248a945, size: 109 bytes, params: 2, frame: 17
var environment;
const object2 = {headerShown: true};
const value = environment.__proto__;
object2.header = (require(9603) /* metro dependency 9603: HeaderShared */).renderHeader;
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderBackImage(navigation);
object2.headerTitle = headerTitle_116469;
object2.fullScreenGestureEnabled = true;
return object2;
}
function _fun116466() { // fn#116466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:621, offset: 0x0248a8f1, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchClosed({searchContext: searchContext});
}
function options_116468HeaderTitle() { // fn#116469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15421:1187, owner: options_116468.headerTitle, offset: 0x0248a9b2, size: 61 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
return ((Component) => <Component channelId={route.params.channelId} />)(importDefault(15220) /* metro dependency 15220: SearchNavigatorPreviewHeader */);
}
global.__d(_fun116463, 15224, [31, 27, 9614, 15037, 661, 33, 4501, 697, 9884, 5280, 9673, 1585, 15225, 9603, 15220,
15221,
2]) /* metro module 15224, dependencies: [31, 27, 9614, 15037, 661, 33, 4501, 697, 9884, 5280, 9673, 1585, 15225, 9603, 15220, 15221, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 15037; source: modules/search/native/components/navigator/SearchNavigatorConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun113815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15234:6, offset: 0x02406f29, size: 104 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorConstants.tsx');
exports.SearchNavigatorScreens = {SEARCH_TABS: 'search_tabs', SEARCH_CHAT_PREVIEW: 'search_chat_preview'};
}
global.__d(_fun113815, 15037, [2]) /* metro module 15037, dependencies: [2] */;
@@ -1,23 +1,30 @@
/* Metro module 15220; source: modules/search/native/components/navigator/SearchNavigatorPreviewHeader.tsx; dependencies: [31, 27, 33, 4501, 9709, 2] */
import ChannelHeader from '../../../../main_tabs_v2/native/channel/header/ChannelHeader.tsx'; /* Metro dependency 9709 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116434(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15417:6, offset: 0x02489258, size: 211 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexShrink': 1,
let value = ReactModule;
const env0_4 = (CreateStylesModule).createStyles({container: {'flexShrink': 1,
'paddingRight': 12, 'flexDirection': 'row', 'alignItems': 'center'}});
value = value.memo(_fun116435);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorPreviewHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorPreviewHeader.tsx');
exports.default = value;
function _fun116435({channelId}) { // fn#116435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15417:252, offset: 0x0248932b, size: 98 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={styles.container}>
{((Component) => <Component channelId={channelId} screenIndex="none" pressable={false} isGuildMemberCountVisible={false} isNavigationScreen />)(ChannelHeader)}
</View>
);
}
}
function _fun116435({channelId}) { // fn#116435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15417:252, offset: 0x0248932b, size: 98 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={styles.container}>
{((Component) => <Component channelId={channelId} screenIndex="none" pressable={false} isGuildMemberCountVisible={false} isNavigationScreen />)(importDefault(9709) /* metro dependency 9709: ChannelHeader */)}
</View>
);
}
global.__d(_fun116434, 15220, [31, 27, 33, 4501, 9709,
2]) /* metro module 15220, dependencies: [31, 27, 33, 4501, 9709, 2] */;
@@ -1,95 +1,102 @@
/* Metro module 15221; source: modules/search/native/components/navigator/SearchNavigatorPreviewScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 1484, 1487, 1478, 9673, 15182, 2] */
import UseWindowDimensionsNative from '../../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import Tracking from '../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as Module01487Module from '../../../../../by-id/module-01487.js'; /* Metro dependency 1487 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:6, offset: 0x0248938d, size: 233 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorPreviewScreen.tsx');
const env0_8 = (CreateStylesModule).createStyles({container: {flex: 1}});
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorPreviewScreen.tsx');
exports.default = SearchNavigatorPreviewScreen;
}
function SearchNavigatorPreviewScreen() { // fn#116437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:341, offset: 0x02489476, size: 420 bytes, params: 1, frame: 22
var container;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(1487) /* metro dependency 1487 */).useRoute();
const channelId = value3.params.channelId;
const searchContext = value3.params.searchContext;
const onBeforeJumpToMessage = value3.params.onBeforeJumpToMessage;
const env0_3 = onBeforeJumpToMessage;
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const binding = env0_3;
const useCallback = binding.useCallback;
let object = [searchContext, channelId, onBeforeJumpToMessage, value2];
const value4 = Reflect.apply(useCallback, binding, [_fun116438, object]);
const value5 = binding.useMemo(function() {
return {width: width};
}, [width]);
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
object = {'horizontal': true, 'scrollEnabled': false, 'bounces': false};
container = styles.container;
object.style = [container, value5];
container = styles.container;
return (
<ScrollView {...object}>
<View style={[container, value5]}>
{((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */)}
</View>
</ScrollView>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
object = {'horizontal': true, 'scrollEnabled': false, 'bounces': false};
container = styles.container;
object.style = [container, value5];
container = styles.container;
return (
<ScrollView {...object}>
<View style={[container, value5]}>
{((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */)}
</View>
</ScrollView>
);
}
return ((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */);
}
function _fun116438() { // fn#116438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:552, offset: 0x0248961a, size: 159 bytes, params: 1, frame: 15
let value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchJumpToMessage({searchContext: searchContext,
channelId: channelId});
if (onBeforeJumpToMessage != null) {
onBeforeJumpToMessage();
}
const type = searchContext.type;
const DMS = SearchTypes.DMS;
if (DMS !== type) {
var GUILD = SearchTypes.GUILD;
if (GUILD === type) {
function SearchNavigatorPreviewScreen() { // fn#116437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:341, offset: 0x02489476, size: 420 bytes, params: 1, frame: 22
var container;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const value3 = (Module01487Module).useRoute();
const channelId = value3.params.channelId;
const searchContext = value3.params.searchContext;
const onBeforeJumpToMessage = value3.params.onBeforeJumpToMessage;
const onBeforeJumpToMessage2 = onBeforeJumpToMessage;
const width = (UseWindowDimensionsNative)().width;
const binding = onBeforeJumpToMessage2;
const useCallback = binding.useCallback;
let object = [searchContext, channelId, onBeforeJumpToMessage, value2];
const value4 = Reflect.apply(useCallback, binding, [_fun116438, object]);
const value5 = binding.useMemo(function() {
return {width: width};
}, [width]);
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
object = {'horizontal': true, 'scrollEnabled': false, 'bounces': false};
container = styles.container;
object.style = [container, value5];
container = styles.container;
return (
<ScrollView {...object}>
<View style={[container, value5]}>
{((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */)}
</View>
</ScrollView>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
object = {'horizontal': true, 'scrollEnabled': false, 'bounces': false};
container = styles.container;
object.style = [container, value5];
container = styles.container;
return (
<ScrollView {...object}>
<View style={[container, value5]}>
{((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */)}
</View>
</ScrollView>
);
}
return ((Component) => <Component channelId={channelId} onBeforeJumpToMessage={value4} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */);
function _fun116438() { // fn#116438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15418:552, offset: 0x0248961a, size: 159 bytes, params: 1, frame: 15
let value = environment.__proto__;
(Tracking).trackSearchJumpToMessage({searchContext: searchContext,
channelId: channelId});
if (onBeforeJumpToMessage != null) {
onBeforeJumpToMessage();
}
const type = searchContext.type;
const DMS = SearchTypes.DMS;
if (DMS !== type) {
var GUILD = SearchTypes.GUILD;
if (GUILD === type) {
value = env0_0.getParent();
if (value == null) {
return undefined;
}
value.goBack();
return undefined;
}
var CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL !== type) {
return undefined;
}
}
value = env0_0.getParent();
if (value == null) {
return undefined;
if (value != null) {
value.goBack();
}
value.goBack();
return undefined;
}
var CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL !== type) {
return undefined;
}
}
value = env0_0.getParent();
if (value != null) {
value.goBack();
}
}
global.__d(_fun116436, 15221, [31, 27, 661, 33, 4501, 1484, 1487, 1478, 9673, 15182,
2]) /* metro module 15221, dependencies: [31, 27, 661, 33, 4501, 1484, 1487, 1478, 9673, 15182, 2] */;
@@ -1,79 +1,94 @@
/* Metro module 15225; source: modules/search/native/components/navigator/SearchNavigatorScreen.tsx; dependencies: [31, 27, 33, 4501, 697, 15017, 4012, 15226, 5278, 1244, 5284, 7704, 14380, 15019, 15030, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseBaseAppContainerDimensions from '../../../../screen/native/useBaseAppContainerDimensions.tsx'; /* Metro dependency 4012 */
import ThemedGradient from '../../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import SearchScreenSearchBar from '../layout/SearchScreenSearchBar.tsx'; /* Metro dependency 15019 */
import SearchScreenLayout from '../layout/SearchScreenLayout.tsx'; /* Metro dependency 15030 */
import UseSearchLayoutInsetTop from '../../hooks/useSearchLayoutInsetTop.tsx'; /* Metro dependency 15226 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ArrowLargeLeftIconModule from '../../../../../design/components/Icon/native/redesign/generated/ArrowLargeLeftIcon.tsx'; /* Metro dependency 5284 */
import * as NonCollapsableGestureDetectorModule from '../../../../gesture_handlers/native/NonCollapsableGestureDetector.tsx'; /* Metro dependency 14380 */
import * as UseSearchSuggestionsGestureModule from '../layout/autocomplete/useSearchSuggestionsGesture.tsx'; /* Metro dependency 15017 */
function _fun116471(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:6, offset: 0x0248a9ef, size: 338 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
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 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrapper = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object.wrapper = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.tabs = {flex: 1, marginTop: PX_16};
const object3 = {};
object.tabs = {flex: 1, marginTop: PX_16};
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginLeft = PX_16;
object4.marginLeft = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.marginRight = PX_12;
object2.back = object3;
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorScreen.tsx');
object4.marginRight = PX_12;
object.back = object4;
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/navigator/SearchNavigatorScreen.tsx');
exports.default = SearchNavigatorScreen;
}
function SearchNavigatorScreen(a0) { // fn#116472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:482, offset: 0x0248ab41, size: 450 bytes, params: 2, frame: 31
const navigation = a0.navigation;
const searchContext = a0.route.params.searchContext;
const styles = useStyles();
const {gesture, dismissed, setDismissed,
onLayoutMeasure} = (require(15017) /* metro dependency 15017: useSearchSuggestionsGesture */).useSearchSuggestionsGesture(searchContext);
const width = (importDefault(4012) /* metro dependency 4012: useBaseAppContainerDimensions */)().width;
const value3 = (importDefault(15226) /* metro dependency 15226: useSearchLayoutInsetTop */)();
const value4 = env0_3.useMemo(_fun116473, [navigation.goBack, styles.back]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const value5 = ((Component) => <Component absolute wide tall />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const NonCollapsableGestureDetector = (require(14380) /* metro dependency 14380: NonCollapsableGestureDetector */).NonCollapsableGestureDetector;
const items2 = [styles.wrapper];
items2[1] = {paddingTop: value3};
let value = importDefault(15019) /* metro dependency 15019: SearchScreenSearchBar */;
value = ((Component) => <Component searchContext={searchContext} suggestionsDismissed={dismissed} setSuggestionsDismissed={setDismissed} onSuggestionsLayoutMesure={onLayoutMeasure} backButton={value4} />)(value);
return (
<>
{value5}
<NonCollapsableGestureDetector gesture={gesture}>
<View style={items2}>
{value}
<View style={styles.tabs}>
{((Component) => <Component searchContext={searchContext} width={width} />)(importDefault(15030) /* metro dependency 15030: SearchScreenLayout */)}
function SearchNavigatorScreen(a0) { // fn#116472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:482, offset: 0x0248ab41, size: 450 bytes, params: 2, frame: 31
const navigation = a0.navigation;
const searchContext = a0.route.params.searchContext;
const styles = useStyles();
const {gesture, dismissed, setDismissed,
onLayoutMeasure} = (UseSearchSuggestionsGestureModule).useSearchSuggestionsGesture(searchContext);
const width = (UseBaseAppContainerDimensions)().width;
const value3 = (UseSearchLayoutInsetTop)();
const value4 = ReactModule.useMemo(_fun116473, [navigation.goBack, styles.back]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const value5 = ((Component) => <Component absolute wide tall />)(ThemedGradient);
const NonCollapsableGestureDetector = (NonCollapsableGestureDetectorModule).NonCollapsableGestureDetector;
const items2 = [styles.wrapper];
items2[1] = {paddingTop: value3};
let value = SearchScreenSearchBar;
value = ((Component) => <Component searchContext={searchContext} suggestionsDismissed={dismissed} setSuggestionsDismissed={setDismissed} onSuggestionsLayoutMesure={onLayoutMeasure} backButton={value4} />)(value);
return (
<>
{value5}
<NonCollapsableGestureDetector gesture={gesture}>
<View style={items2}>
{value}
<View style={styles.tabs}>
{((Component) => <Component searchContext={searchContext} width={width} />)(SearchScreenLayout)}
</View>
</View>
</NonCollapsableGestureDetector>
</>
);
function _fun116473() { // fn#116473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:719, offset: 0x0248ad03, size: 212 bytes, params: 1, frame: 22
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: styles.back};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
pressableOpacityProps.accessibilityRole = 'button';
pressableOpacityProps.onPress = navigation.goBack;
const ArrowLargeLeftIcon = (ArrowLargeLeftIconModule).ArrowLargeLeftIcon;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
return (
<View>
<PressableOpacity {...pressableOpacityProps}>
<ArrowLargeLeftIcon color={INTERACTIVE_TEXT_DEFAULT} />
</PressableOpacity>
</View>
</NonCollapsableGestureDetector>
</>
);
}
);
}
}
function _fun116473() { // fn#116473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15422:719, offset: 0x0248ad03, size: 212 bytes, params: 1, frame: 22
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.back};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
pressableOpacityProps.accessibilityRole = 'button';
pressableOpacityProps.onPress = navigation.goBack;
const ArrowLargeLeftIcon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
return (
<View>
<PressableOpacity {...pressableOpacityProps}>
<ArrowLargeLeftIcon color={INTERACTIVE_TEXT_DEFAULT} />
</PressableOpacity>
</View>
);
}
global.__d(_fun116471, 15225, [31, 27, 33, 4501, 697, 15017, 4012, 15226, 5278, 1244, 5284, 7704, 14380, 15019,
15030,
2]) /* metro module 15225, dependencies: [31, 27, 33, 4501, 697, 15017, 4012, 15226, 5278, 1244, 5284, 7704, 14380, 15019, 15030, 2] */;
@@ -1,31 +1,37 @@
/* Metro module 15110; source: modules/search/native/components/tabs/SearchTabsGradient.tsx; dependencies: [31, 33, 3860, 697, 4000, 12055, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import TabsGradientNative from '../../../../../design/components/Tabs/native/TabsGradient.native.tsx'; /* Metro dependency 12055 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseTokenModule from '../../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
function _fun115160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:6, offset: 0x02456087, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsGradient.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsGradient.tsx');
exports.default = SearchTabsGradient;
function SearchTabsGradient({state}) { // fn#115161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:224, offset: 0x02456115, size: 68 bytes, params: 2, frame: 16
return ((Component) => <Component state={state} colors={SearchTabsGradientUseGradientColors()} />)(TabsGradientNative);
function SearchTabsGradientUseGradientColors() { // fn#115162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:269, owner: SearchTabsGradient.useGradientColors, offset: 0x02456159, size: 101 bytes, params: 1, frame: 17
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
return env1_3.useMemo(_fun115163, [Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW])]);
function _fun115163() { // fn#115163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:375, offset: 0x024561be, size: 60 bytes, params: 1, frame: 14
const binding = env0_0;
const items2 = [binding];
let value = environment.__proto__.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
items2[1] = value.hexWithOpacity(binding, 0);
return items2;
}
}
}
}
function SearchTabsGradient({state}) { // fn#115161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:224, offset: 0x02456115, size: 68 bytes, params: 2, frame: 16
return ((Component) => <Component state={state} colors={SearchTabsGradientUseGradientColors()} />)(importDefault(12055) /* metro dependency 12055: TabsGradientNative */);
}
function SearchTabsGradientUseGradientColors() { // fn#115162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:269, owner: SearchTabsGradient.useGradientColors, offset: 0x02456159, size: 101 bytes, params: 1, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
return env1_3.useMemo(_fun115163, [Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW])]);
}
function _fun115163() { // fn#115163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:375, offset: 0x024561be, size: 60 bytes, params: 1, frame: 14
const binding = env0_0;
const items2 = [binding];
let value = environment.__proto__.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
items2[1] = value.hexWithOpacity(binding, 0);
return items2;
}
global.__d(_fun115160, 15110, [31, 33, 3860, 697, 4000, 12055,
2]) /* metro module 15110, dependencies: [31, 33, 3860, 697, 4000, 12055, 2] */;
@@ -1,323 +1,366 @@
/* Metro module 15031; source: modules/search/native/components/tabs/SearchTabsLayout.tsx; dependencies: [31, 27, 4792, 9674, 11829, 9615, 661, 33, 4501, 22, 9673, 15032, 1244, 9675, 15033, 9688, 11822, 15108, 15015, 5321, 4017, 11828, 9682, 9683, 1239, 15109, 15110, 8861, 566, 15111, 15112, 15113, 15114, 2] */
import SearchMessageStore from '../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import Tracking from '../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchQueryStore from '../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import SearchActionCreators from '../../../SearchActionCreators.tsx'; /* Metro dependency 9682 */
import SearchTabsFetchManager from '../../../managers/SearchTabsFetchManager.tsx'; /* Metro dependency 9683 */
import SearchSessionAnalyticsManager from '../../../managers/native/SearchSessionAnalyticsManager.tsx'; /* Metro dependency 9688 */
import SearchPlatformActionCreators from '../../SearchPlatformActionCreators.tsx'; /* Metro dependency 11828 */
import SearchTabsLayoutStore from '../../stores/SearchTabsLayoutStore.tsx'; /* Metro dependency 11829 */
import ErrorScreen from './pages/ErrorScreen.tsx'; /* Metro dependency 15032 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchUtilsModule from '../../../SearchUtils.tsx'; /* Metro dependency 9675 */
import * as SwipeForMemberListWrapperModule from '../../../../main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx'; /* Metro dependency 15015 */
import * as UseSearchSegmentedControlStateModule from './hooks/useSearchSegmentedControlState.tsx'; /* Metro dependency 15108 */
import * as UseAutoSearchGuildChannelTabModule from '../../hooks/useAutoSearchGuildChannelTab.tsx'; /* Metro dependency 15111 */
import * as UseAutoSearchMembersTabModule from '../../hooks/useAutoSearchMembersTab.tsx'; /* Metro dependency 15112 */
import * as UseAutoSearchPeopleTabModule from '../../hooks/useAutoSearchPeopleTab.tsx'; /* Metro dependency 15113 */
import * as UseAutoTrackSearchTabCountsViewedAnalyticsModule from '../../hooks/useAutoTrackSearchTabCountsViewedAnalytics.tsx'; /* Metro dependency 15114 */
function _fun113670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:6, offset: 0x02402dd2, size: 473 bytes, params: 8, frame: 21
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 searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchTabsLayoutStore = importDefault(11829) /* metro dependency 11829: SearchTabsLayoutStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_8 = searchConstantsModule.MESSAGE_SEARCH_RESULT_TABS_SET;
const env0_9 = searchConstantsModule.SEARCH_MESSAGE_TAB_SENTINEL;
const env0_10 = searchConstantsModule.SearchTabs;
const env0_11 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const env0_14 = value3.Fragment;
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({controls: {'flex': 0,
const env0_15 = (CreateStylesModule).createStyles({controls: {'flex': 0,
'minHeight': 32}, pages: {flex: 1}});
const env0_16 = (require(22) /* metro dependency 22 */).debounce(_fun113673, 500);
const env0_16 = (Module00022Module).debounce(_fun113673, 500);
object = {code: 'function SearchTabsLayoutTsx1({contentOffset:contentOffset}){const{isDragging,disallowMemberListGesture}=this.__closure;var _disallowMemberListGe;isDragging.set(true);(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(contentOffset.x>0);}'};
object = {code: 'function SearchTabsLayoutTsx2(){const{isDragging,disallowMemberListGesture}=this.__closure;var _disallowMemberListGe;isDragging.set(false);(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(false);}'};
object = {code: 'function SearchTabsLayoutTsx3({contentOffset:contentOffset}){const{isDragging,disallowMemberListGesture}=this.__closure;if(isDragging.get()){var _disallowMemberListGe;(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(contentOffset.x>0);}}'};
const env0_20 = value.memo(_fun113674);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsLayout.tsx');
const env0_20 = ReactModule.memo(_fun113674);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsLayout.tsx');
exports.default = ConnectedSearchTabsLayout;
}
function NoSearchResultsScreen({searchContext}) { // fn#113671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:462, offset: 0x02402fab, size: 139 bytes, params: 2, frame: 18
env0_3.useEffect(_fun113672, [searchContext]);
const ErrorScreen = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const V6nAfF = (require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF;
return <ErrorScreen text={Reflect.apply(string, intl, [V6nAfF])} />;
}
function _fun113673(a0) { // fn#113673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:402, offset: 0x0240306a, size: 48 bytes, params: 2, frame: 12
return (importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchTabSelected({searchContext: a0});
}
function _fun113674({searchContext, visibleTabs, visibleTabCounts, width}) { // fn#113674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1574, offset: 0x0240309a, size: 1147 bytes, params: 2, frame: 33
var r19;
var r0;
var jsxRuntimeEnv0_14Binding;
var items3;
var Provider;
var object;
var SegmentedControlPages;
var object2;
const env0_3 = width;
let value = undefined;
const styles = useStyles();
let binding = env0_3;
const value3 = binding.useMemo(function() {
visibleTabs.forEach(_fun113676);
return [];
}, [visibleTabCounts, visibleTabs, searchContext, width]);
binding = env0_3;
let useCallback = binding.useCallback;
const {segmentedControlState,
selectedTab} = (require(15108) /* metro dependency 15108: useSearchSegmentedControlState */).useSearchSegmentedControlState({items: value3,
visibleTabs: visibleTabs, onSelectedTabChange: Reflect.apply(useCallback, binding, [_fun113677,
[searchContext]]), width: width});
const setActiveIndex = segmentedControlState.setActiveIndex;
const value7 = env0_3.useMemo(_fun113685, [useSelectMediaTab({searchTabs: visibleTabs,
setActiveIndex: setActiveIndex}), selectedTab]);
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
const {gesture, disallowGesture, channelId, screenIndex} = value8 ?? ({});
const value9 = env0_3.useMemo(_fun113686, [gesture]);
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
binding = env0_3;
useCallback = binding.useCallback;
let closure = D_113687;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 766628353255;
closure.__initData = env0_17;
const value11 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = G_113688;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 5683301645106;
closure.__initData = env0_18;
const value12 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = A_113689;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 229712012692;
closure.__initData = env0_19;
const value13 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
const value14 = env0_3.useCallback(_fun113690, [searchContext]);
env0_3.useEffect(_fun113691, [value8, value14]);
env0_3.useEffect(_fun113693, [channelId, screenIndex, setActiveIndex, value8, value14]);
if (segmentedControlState.items.length === 0) {
r0 = <NoSearchResultsScreen searchContext={searchContext} />;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [<View style={styles.controls}>{((Component) => <Component state={segmentedControlState} />)(importDefault(15109) /* metro dependency 15109: SearchTabsTransitionGroup */)}{((Component) => <Component state={segmentedControlState} />)(importDefault(15110) /* metro dependency 15110: SearchTabsGradient */)}</View>];
var viewBindingProps2 = {style: styles.pages};
Provider = (require(15033) /* metro dependency 15033: SearchTabsPage */).SearchTabsPageContext.Provider;
object = {value: value7};
SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
object2 = {state: segmentedControlState, bounces: value8 == null, nativeGesture: value9};
r19 = value8 != null ? value11 : value;
object2.onBeginDragWorklet = r19;
r19 = value8 != null ? value12 : value;
object2.onEndDragWorklet = r19;
object2.onScrollWorklet = value8 != null ? value13 : value;
items3[1] = <View {...viewBindingProps2}><Provider {...object}><SegmentedControlPages {...object2} /></Provider></View>;
value = <>{items3}</>;
r0 = value;
}
return r0;
}
function ConnectedSearchTabsLayout({searchContext, width}) { // fn#113696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4546, offset: 0x02403a5f, size: 347 bytes, params: 2, frame: 24
const {visibleTabs, visibleTabCounts,
candidateTabs} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchTabsLayoutStore],
function() {
var object = {};
var searchContextBinding = searchContext;
object.visibleTabs = SearchTabsLayoutStore.getVisibleTabs(searchContextBinding);
object.visibleTabCounts = SearchTabsLayoutStore.getVisibleTabCounts(searchContextBinding);
object.candidateTabs = SearchTabsLayoutStore.getCandidateTabs(searchContextBinding);
return object;
}, [searchContext]);
const value3 = env0_3.useMemo(_fun113698, [candidateTabs]);
const useAutoSearchGuildChannelTabModule = require(15111) /* metro dependency 15111: useAutoSearchGuildChannelTab */;
const useAutoSearchGuildChannelTab = useAutoSearchGuildChannelTabModule.useAutoSearchGuildChannelTab;
let has = value3.has;
const GUILD_CHANNELS = SearchTabs.GUILD_CHANNELS;
Reflect.apply(useAutoSearchGuildChannelTab, useAutoSearchGuildChannelTabModule, [searchContext, !Reflect.apply(has,
value3, [GUILD_CHANNELS])]);
const useAutoSearchMembersTabModule = require(15112) /* metro dependency 15112: useAutoSearchMembersTab */;
const useAutoSearchMembersTab = useAutoSearchMembersTabModule.useAutoSearchMembersTab;
has = value3.has;
const MEMBERS = SearchTabs.MEMBERS;
Reflect.apply(useAutoSearchMembersTab, useAutoSearchMembersTabModule, [searchContext, !Reflect.apply(has, value3,
[MEMBERS])]);
const useAutoSearchPeopleTabModule = require(15113) /* metro dependency 15113: useAutoSearchPeopleTab */;
const useAutoSearchPeopleTab = useAutoSearchPeopleTabModule.useAutoSearchPeopleTab;
has = value3.has;
const PEOPLE = SearchTabs.PEOPLE;
Reflect.apply(useAutoSearchPeopleTab, useAutoSearchPeopleTabModule, [searchContext, !Reflect.apply(has, value3,
[PEOPLE])]);
(require(15114) /* metro dependency 15114: useAutoTrackSearchTabCountsViewedAnalytics */).useAutoTrackSearchTabCountsViewedAnalytics({searchContext: searchContext,
visibleTabCounts: visibleTabCounts, visibleTabs: visibleTabs});
return ((Component) => <Component searchContext={searchContext} visibleTabs={visibleTabs} visibleTabCounts={visibleTabCounts} width={width} />)(env0_20);
}
function _fun113672() { // fn#113672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:532, offset: 0x02403036, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchEmptyResult({searchContext: searchContext});
}
function _fun113675() { // fn#113675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1672, offset: 0x02403515, size: 36 bytes, params: 1, frame: 12
visibleTabs.forEach(_fun113676);
return [];
}
function _fun113677(a0) { // fn#113677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1888, offset: 0x024035de, size: 201 bytes, params: 2, frame: 19
let value = environment.__proto__;
const defaultImport = importDefault(9688) /* metro dependency 9688: SearchSessionAnalyticsManager */;
const setSelectedTab = defaultImport.setSelectedTab;
const searchContextBinding = searchContext;
Reflect.apply(setSelectedTab, defaultImport, [searchContextBinding, a0]);
env1_16(searchContextBinding);
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, SearchQueryStore.getQueryString(searchContextBinding));
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const value7 = MESSAGE_SEARCH_RESULT_TABS_SET.has(a0);
let r3 = value7 ? isInitialFetchComplete : !value7;
r3 = !r3 ? isFetching : r3;
if (!r3) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchInitialMessagesDebounced(searchContext);
}
}
function useSelectMediaTab({searchTabs, setActiveIndex}) { // fn#113678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2270, offset: 0x024036a7, size: 115 bytes, params: 2, frame: 16
const env0_2 = env1_3.useRef(function() {
setActiveIndex(searchTabs.findIndex(_fun113680));
});
env1_3.useEffect(_fun113681, [searchTabs, setActiveIndex]);
return env1_3.useCallback(_fun113684, []);
}
function _fun113685() { // fn#113685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2569, offset: 0x024037c2, size: 25 bytes, params: 1, frame: 3
return {selectedTab: selectedTab, selectMediaTab: env0_6};
}
function _fun113686() { // fn#113686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2757, offset: 0x024037db, size: 75 bytes, params: 1, frame: 12
var value2;
var value3;
if (gesture != null) {
value2 = environment.__proto__;
value3 = (require(5321) /* metro dependency 5321 */).Gesture.Native();
return value3.simultaneousWithExternalGesture(gesture);
}
}
function D_113687({contentOffset}) { // fn#113687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2898, offset: 0x02403826, size: 67 bytes, params: 2, frame: 13
env0_12.set(true);
let disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
function G_113688() { // fn#113688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3087, offset: 0x02403869, size: 47 bytes, params: 1, frame: 12
env0_12.set(false);
if (disallowGesture != null) {
disallowGesture.set(false);
}
}
function A_113689({contentOffset}) { // fn#113689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3257, offset: 0x02403898, size: 67 bytes, params: 2, frame: 12
var disallowGestureBinding;
const binding = env0_12;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
function NoSearchResultsScreen({searchContext}) { // fn#113671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:462, offset: 0x02402fab, size: 139 bytes, params: 2, frame: 18
env0_3.useEffect(_fun113672, [searchContext]);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const V6nAfF = (IndexNativeModule).t.V6nAfF;
return <ErrorScreen text={Reflect.apply(string, intl, [V6nAfF])} />;
function _fun113672() { // fn#113672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:532, offset: 0x02403036, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Tracking).trackSearchEmptyResult({searchContext: searchContext});
}
}
}
function _fun113690() { // fn#113690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3444, offset: 0x024038db, size: 136 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
const deleteSearchQuery = defaultImport.deleteSearchQuery;
const searchContextBinding = searchContext;
Reflect.apply(deleteSearchQuery, defaultImport, [searchContextBinding]);
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearAllSearchMesssages();
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearSearchRecentMessages();
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(searchContextBinding);
(importDefault(9683) /* metro dependency 9683: SearchTabsFetchManager */).cleanUp(value);
}
function _fun113691() { // fn#113691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3635, offset: 0x02403963, size: 28 bytes, params: 1, frame: 2
if (env0_7 == null) {
return _fun113692;
function _fun113673(a0) { // fn#113673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:402, offset: 0x0240306a, size: 48 bytes, params: 2, frame: 12
return (Tracking).trackSearchTabSelected({searchContext: a0});
}
}
function _fun113693() { // fn#113693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3687, offset: 0x0240397f, size: 92 bytes, params: 1, frame: 15
var environment;
var ComponentDispatch;
if (env0_7 != null) {
value = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
return function() {
var ComponentDispatch = require(dependencyMap[24]).ComponentDispatch;
var CHANNEL_DETAILS_HIDDEN = ComponentActions.CHANNEL_DETAILS_HIDDEN;
ComponentDispatch.unsubscribe(CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
};
function _fun113674({searchContext, visibleTabs, visibleTabCounts, width}) { // fn#113674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1574, offset: 0x0240309a, size: 1147 bytes, params: 2, frame: 33
var r19;
var r0;
var jsxRuntimeEnv0_14Binding;
var items3;
var Provider;
var object3;
var SegmentedControlPages;
var object4;
const width2 = width;
let value = undefined;
const styles = useStyles();
let binding = width2;
const value3 = binding.useMemo(function() {
visibleTabs.forEach(_fun113676);
return [];
}, [visibleTabCounts, visibleTabs, searchContext, width]);
binding = width2;
let useCallback = binding.useCallback;
const {segmentedControlState,
selectedTab} = (UseSearchSegmentedControlStateModule).useSearchSegmentedControlState({items: value3,
visibleTabs: visibleTabs, onSelectedTabChange: Reflect.apply(useCallback, binding, [_fun113677,
[searchContext]]), width: width});
const setActiveIndex = segmentedControlState.setActiveIndex;
const value7 = width2.useMemo(_fun113685, [useSelectMediaTab({searchTabs: visibleTabs,
setActiveIndex: setActiveIndex}), selectedTab]);
binding = width2;
const useContext = binding.useContext;
const SwipeForMemberListContext = (SwipeForMemberListWrapperModule).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
const {gesture, disallowGesture, channelId, screenIndex} = value8 ?? ({});
const value9 = width2.useMemo(_fun113686, [gesture]);
const value10 = (ReanimatedRexportModule).useSharedValue(false);
binding = width2;
useCallback = binding.useCallback;
let closure = D_113687;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 766628353255;
closure.__initData = env0_17;
const value11 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = width2;
useCallback = binding.useCallback;
closure = G_113688;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 5683301645106;
closure.__initData = env0_18;
const value12 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = width2;
useCallback = binding.useCallback;
closure = A_113689;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 229712012692;
closure.__initData = env0_19;
const value13 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
const value14 = width2.useCallback(_fun113690, [searchContext]);
width2.useEffect(_fun113691, [value8, value14]);
width2.useEffect(_fun113693, [channelId, screenIndex, setActiveIndex, value8, value14]);
if (segmentedControlState.items.length === 0) {
r0 = <NoSearchResultsScreen searchContext={searchContext} />;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [
<View style={styles.controls}>
{((Component) => <Component state={segmentedControlState} />)(importDefault(15109) /* metro dependency 15109: SearchTabsTransitionGroup */)}
{((Component) => <Component state={segmentedControlState} />)(importDefault(15110) /* metro dependency 15110: SearchTabsGradient */)}
</View>,
];
var viewBindingProps2 = {style: styles.pages};
Provider = (require(15033) /* metro dependency 15033: SearchTabsPage */).SearchTabsPageContext.Provider;
object3 = {value: value7};
SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
object4 = {state: segmentedControlState, bounces: value8 == null, nativeGesture: value9};
r19 = value8 != null ? value11 : value;
object4.onBeginDragWorklet = r19;
r19 = value8 != null ? value12 : value;
object4.onEndDragWorklet = r19;
object4.onScrollWorklet = value8 != null ? value13 : value;
items3[1] = (
<View {...viewBindingProps2}>
<Provider {...object3}>
<SegmentedControlPages {...object4} />
</Provider>
</View>
);
value = (
<>
{items3}
</>
);
r0 = value;
}
return r0;
function _fun113675() { // fn#113675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1672, offset: 0x02403515, size: 36 bytes, params: 1, frame: 12
visibleTabs.forEach(_fun113676);
return [];
function _fun113676(a0) { // fn#113676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1704, offset: 0x02403539, size: 165 bytes, params: 2, frame: 19
const binding = env0_0;
const push = binding.push;
const object = {};
const value = environment.__proto__.__proto__;
const value2 = undefined;
object.label = (require(9675) /* metro dependency 9675: SearchUtils */).getTabTitle(a0);
object.id = a0;
object.page = ((Component) => <Component tab={a0} searchContext={searchContext} width={width} />)(importDefault(15033) /* metro dependency 15033: SearchTabsPage */);
object.count = (visibleTabCounts == null ? value2 : visibleTabCounts[a0]) ?? value2;
Reflect.apply(push, binding, [object]);
return value2;
}
}
function _fun113677(a0) { // fn#113677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1888, offset: 0x024035de, size: 201 bytes, params: 2, frame: 19
let value = environment.__proto__;
const defaultImport = SearchSessionAnalyticsManager;
const setSelectedTab = defaultImport.setSelectedTab;
const searchContextBinding = searchContext;
Reflect.apply(setSelectedTab, defaultImport, [searchContextBinding, a0]);
env1_16(searchContextBinding);
const searchTabFetchId = (SearchUtilsModule).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, SearchQueryStore.getQueryString(searchContextBinding));
const searchMessageStoreBinding = SearchMessageStore;
const isFetching = searchMessageStoreBinding.getIsFetching(searchTabFetchId);
const isInitialFetchComplete = searchMessageStoreBinding.getIsInitialFetchComplete(searchTabFetchId);
const value7 = MESSAGE_SEARCH_RESULT_TABS_SET.has(a0);
let r3 = value7 ? isInitialFetchComplete : !value7;
r3 = !r3 ? isFetching : r3;
if (!r3) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchInitialMessagesDebounced(searchContext);
}
}
function useSelectMediaTab({searchTabs, setActiveIndex}) { // fn#113678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2270, offset: 0x024036a7, size: 115 bytes, params: 2, frame: 16
const env0_2 = env1_3.useRef(function() {
setActiveIndex(searchTabs.findIndex(_fun113680));
});
env1_3.useEffect(_fun113681, [searchTabs, setActiveIndex]);
return env1_3.useCallback(_fun113684, []);
function _fun113679() { // fn#113679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2346, offset: 0x0240371a, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
function _fun113680(a0) { // fn#113680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2370, offset: 0x02403742, size: 22 bytes, params: 2, frame: 2
const MEDIA = SearchTabs.MEDIA;
return a0 === MEDIA;
}
}
function _fun113681() { // fn#113681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2415, offset: 0x02403758, size: 26 bytes, params: 1, frame: 2
env0_2.current = function() {
setActiveIndex(searchTabs.findIndex(_fun113683));
};
function current_113682() { // fn#113682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2430, offset: 0x02403772, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
function _fun113683(a0) { // fn#113683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2454, offset: 0x0240379a, size: 22 bytes, params: 2, frame: 2
const MEDIA = SearchTabs.MEDIA;
return a0 === MEDIA;
}
}
}
function _fun113684() { // fn#113684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2501, offset: 0x024037b0, size: 18 bytes, params: 1, frame: 9
return env0_2.current();
}
}
function _fun113685() { // fn#113685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2569, offset: 0x024037c2, size: 25 bytes, params: 1, frame: 3
return {selectedTab: selectedTab, selectMediaTab: env0_6};
}
function _fun113686() { // fn#113686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2757, offset: 0x024037db, size: 75 bytes, params: 1, frame: 12
var value2;
var value3;
if (gesture != null) {
value2 = environment.__proto__;
value3 = (require(5321) /* metro dependency 5321 */).Gesture.Native();
return value3.simultaneousWithExternalGesture(gesture);
}
}
function D_113687({contentOffset}) { // fn#113687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2898, offset: 0x02403826, size: 67 bytes, params: 2, frame: 13
JsxRuntimeModule.jsx.set(true);
let disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
function G_113688() { // fn#113688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3087, offset: 0x02403869, size: 47 bytes, params: 1, frame: 12
JsxRuntimeModule.jsx.set(false);
if (disallowGesture != null) {
disallowGesture.set(false);
}
}
function A_113689({contentOffset}) { // fn#113689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3257, offset: 0x02403898, size: 67 bytes, params: 2, frame: 12
var disallowGestureBinding;
const get = JsxRuntimeModule.jsx.get;
if (Reflect.apply(get, JsxRuntimeModule.jsx, [])) {
disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
}
function _fun113690() { // fn#113690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3444, offset: 0x024038db, size: 136 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = SearchPlatformActionCreators;
const deleteSearchQuery = defaultImport.deleteSearchQuery;
const searchContextBinding = searchContext;
Reflect.apply(deleteSearchQuery, defaultImport, [searchContextBinding]);
(SearchActionCreators).clearAllSearchMesssages();
(SearchActionCreators).clearSearchRecentMessages();
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(searchContextBinding);
(SearchTabsFetchManager).cleanUp(value);
}
function _fun113691() { // fn#113691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3635, offset: 0x02403963, size: 28 bytes, params: 1, frame: 2
if (env0_7 == null) {
return _fun113692;
}
function _fun113692() { // fn#113692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3657, offset: 0x01dcf5fa, size: 15 bytes, params: 1, frame: 9
return env1_13();
}
}
function _fun113693() { // fn#113693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3687, offset: 0x0240397f, size: 92 bytes, params: 1, frame: 15
var environment;
var ComponentDispatch;
if (env0_7 != null) {
value = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
return function() {
var ComponentDispatch = require(dependencyMap[24]).ComponentDispatch;
var CHANNEL_DETAILS_HIDDEN = ComponentActions.CHANNEL_DETAILS_HIDDEN;
ComponentDispatch.unsubscribe(CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
};
}
function handleChannelDetailsHidden({channelId, screenIndex}) { // fn#113694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3898, offset: 0x024039db, size: 70 bytes, params: 2, frame: 16
if (channelId === channelId && screenIndex === screenIndex) {
setActiveIndex(0, false, true);
env1_13();
}
}
}
}
}
function _fun113698() { // fn#113698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4845, offset: 0x02403c02, size: 37 bytes, params: 1, frame: 11
const Set = global.Set;
const candidateTabsBinding = candidateTabs;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(candidateTabsBinding);
return set instanceof Object ? set : value;
}
function ConnectedSearchTabsLayout({searchContext, width}) { // fn#113696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4546, offset: 0x02403a5f, size: 347 bytes, params: 2, frame: 24
const {visibleTabs, visibleTabCounts,
candidateTabs} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchTabsLayoutStore],
function() {
var object = {};
var searchTabsLayoutStoreBinding = SearchTabsLayoutStore;
var searchContextBinding = searchContext;
object.visibleTabs = searchTabsLayoutStoreBinding.getVisibleTabs(searchContextBinding);
object.visibleTabCounts = searchTabsLayoutStoreBinding.getVisibleTabCounts(searchContextBinding);
object.candidateTabs = searchTabsLayoutStoreBinding.getCandidateTabs(searchContextBinding);
return object;
}, [searchContext]);
const value3 = env0_3.useMemo(_fun113698, [candidateTabs]);
const useAutoSearchGuildChannelTab = UseAutoSearchGuildChannelTabModule.useAutoSearchGuildChannelTab;
let has = value3.has;
const GUILD_CHANNELS = SearchTabs.GUILD_CHANNELS;
Reflect.apply(useAutoSearchGuildChannelTab, UseAutoSearchGuildChannelTabModule, [searchContext, !Reflect.apply(has,
value3, [GUILD_CHANNELS])]);
const useAutoSearchMembersTab = UseAutoSearchMembersTabModule.useAutoSearchMembersTab;
has = value3.has;
const MEMBERS = SearchTabs.MEMBERS;
Reflect.apply(useAutoSearchMembersTab, UseAutoSearchMembersTabModule, [searchContext, !Reflect.apply(has, value3,
[MEMBERS])]);
const useAutoSearchPeopleTab = UseAutoSearchPeopleTabModule.useAutoSearchPeopleTab;
has = value3.has;
const PEOPLE = SearchTabs.PEOPLE;
Reflect.apply(useAutoSearchPeopleTab, UseAutoSearchPeopleTabModule, [searchContext, !Reflect.apply(has, value3,
[PEOPLE])]);
(UseAutoTrackSearchTabCountsViewedAnalyticsModule).useAutoTrackSearchTabCountsViewedAnalytics({searchContext: searchContext,
visibleTabCounts: visibleTabCounts, visibleTabs: visibleTabs});
return ((Component) => <Component searchContext={searchContext} visibleTabs={visibleTabs} visibleTabCounts={visibleTabCounts} width={width} />)(env0_20);
function _fun113698() { // fn#113698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4845, offset: 0x02403c02, size: 37 bytes, params: 1, frame: 11
const Set = global.Set;
const candidateTabsBinding = candidateTabs;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(candidateTabsBinding);
return set instanceof Object ? set : value;
}
function _fun113676(a0) { // fn#113676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1704, offset: 0x02403539, size: 165 bytes, params: 2, frame: 19
const binding = env0_0;
const push = binding.push;
const object2 = {};
const value = environment.__proto__.__proto__;
const value2 = undefined;
object2.label = (require(9675) /* metro dependency 9675: SearchUtils */).getTabTitle(a0);
object2.id = a0;
object2.page = ((Component) => <Component tab={a0} searchContext={searchContext} width={width} />)(importDefault(15033) /* metro dependency 15033: SearchTabsPage */);
object2.count = (visibleTabCounts == null ? value2 : visibleTabCounts[a0]) ?? value2;
Reflect.apply(push, binding, [object2]);
return value2;
}
function _fun113679() { // fn#113679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2346, offset: 0x0240371a, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
}
function _fun113681() { // fn#113681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2415, offset: 0x02403758, size: 26 bytes, params: 1, frame: 2
env0_2.current = function() {
setActiveIndex(searchTabs.findIndex(_fun113683));
};
}
function _fun113684() { // fn#113684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2501, offset: 0x024037b0, size: 18 bytes, params: 1, frame: 9
return env0_2.current();
}
function handleChannelDetailsHidden({channelId, screenIndex}) { // fn#113694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3898, offset: 0x024039db, size: 70 bytes, params: 2, frame: 16
if (channelId === channelId && screenIndex === screenIndex) {
setActiveIndex(0, false, true);
env1_13();
}
}
function current_113682() { // fn#113682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2430, offset: 0x02403772, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
}
global.__d(_fun113670, 15031, [31, 27, 4792, 9674, 11829, 9615, 661, 33, 4501, 22, 9673, 15032, 1244, 9675, 15033,
9688, 11822, 15108, 15015, 5321, 4017, 11828, 9682, 9683, 1239, 15109, 15110, 8861, 566, 15111, 15112, 15113,
15114,
2]) /* metro module 15031, dependencies: [31, 27, 4792, 9674, 11829, 9615, 661, 33, 4501, 22, 9673, 15032, 1244, 9675, 15033, 9688, 11822, 15108, 15015, 5321, 4017, 11828, 9682, 9683, 1239, 15109, 15110, 8861, 566, 15111, 15112, 15113, 15114, 2] */;
@@ -1,70 +1,151 @@
/* Metro module 15033; source: modules/search/native/components/tabs/SearchTabsPage.tsx; dependencies: [57, 31, 27, 1379, 9615, 661, 33, 4501, 566, 5087, 5072, 11982, 11984, 15034, 15076, 15078, 15082, 15083, 15091, 15093, 15094, 15100, 15107, 44, 8621, 2] */
import Module00044 from '../../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseStateFromSharedValue from '../../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as AgeGateUtilsModule from '../../../../age_gate/AgeGateUtils.tsx'; /* Metro dependency 5072 */
import * as SpoilerChannelUtilsModule from '../../../../spoiler_channels/SpoilerChannelUtils.tsx'; /* Metro dependency 5087 */
import * as SearchConstantsModule from '../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113702(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:6, offset: 0x02403e1c, size: 309 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
const env0_8 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
let value = ReactModule;
const env0_10 = (CreateStylesModule).createStyles({container: {flex: 1}});
value = value.createContext(undefined);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsPage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsPage.tsx');
exports.default = ConnectedSearchTabsPage;
exports.SearchTabsPageContext = value;
}
function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width}) { // fn#113703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:269, offset: 0x02403f51, size: 1019 bytes, params: 2, frame: 24
var MEMBERS;
var type;
const [property, env0_1] = env0_3(env0_4.useState(isFocused), 2);
env0_4.useEffect(function() {
global.setTimeout(_fun113705, 10);
}, []);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun113706);
const value4 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
const value5 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel);
if (property) {
MEMBERS = SearchTabs.MEMBERS;
if (tab === MEMBERS) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width}) { // fn#113703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:269, offset: 0x02403f51, size: 1019 bytes, params: 2, frame: 24
var MEMBERS;
var type;
const [property, env0_1] = Module00057(env0_4.useState(isFocused), 2);
env0_4.useEffect(function() {
global.setTimeout(_fun113705, 10);
}, []);
const channel = (FluxModule).useStateFromStores([ChannelStore], _fun113706);
const value4 = (SpoilerChannelUtilsModule).useIsChannelSpoilerGated(channel);
const value5 = (AgeGateUtilsModule).useIsChannelContentGated(channel);
if (property) {
MEMBERS = SearchTabs.MEMBERS;
if (tab === MEMBERS) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
type = searchContext.type;
if (type === SearchTypes.GUILD_CHANNEL) {
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
if (value4) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */);
}
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen2 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen2 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
type = searchContext.type;
if (type !== SearchTypes.THREAD) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen3 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen3 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
type = searchContext.type;
if (type === SearchTypes.GUILD_CHANNEL) {
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
@@ -77,7 +158,8 @@ function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width})
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
MEMBERS = SearchTabs.MEMBERS;
if (MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
@@ -93,8 +175,8 @@ function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width})
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen2 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen2 searchContext={searchContext} />;
const SearchTabsThreadScreen4 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen4 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
@@ -102,112 +184,47 @@ function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width})
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
type = searchContext.type;
if (type !== SearchTypes.THREAD) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
return null;
function _fun113704() { // fn#113704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:411, offset: 0x0240434c, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun113705, 10);
function _fun113705() { // fn#113705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:428, offset: 0x01ef5e6d, size: 18 bytes, params: 1, frame: 11
env1_1(true);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen3 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen3 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
if (value4) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */);
}
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
MEMBERS = SearchTabs.MEMBERS;
if (MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen4 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen4 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
function _fun113706() { // fn#113706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:489, offset: 0x0240436a, size: 79 bytes, params: 1, frame: 14
const value = environment.__proto__;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const type = searchContext.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
return Reflect.apply(getChannel, channelStoreBinding,
[type === GUILD_CHANNEL ? searchContext.channelId : searchContext.type !== SearchTypes.THREAD ? undefined : searchContext.channelId]);
}
}
return null;
}
function ConnectedSearchTabsPage({tab, searchContext, width}) { // fn#113707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:1674, offset: 0x024043b9, size: 194 bytes, params: 2, frame: 21
const value2 = env0_4.useContext(env0_11);
(importDefault(44) /* metro dependency 44 */)(value2 != null, '[SearchTabsPageContext] Context should not be null.');
const styles = useStyles();
return (
<View style={styles.container}>
<SearchTabsPage
isFocused={(importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(value2.selectedTab) === tab}
selectMediaTab={value2.selectMediaTab}
tab={tab}
searchContext={searchContext}
width={width}
/>
</View>
);
}
function ConnectedSearchTabsPage({tab, searchContext, width}) { // fn#113707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:1674, offset: 0x024043b9, size: 194 bytes, params: 2, frame: 21
const value2 = env0_4.useContext(env0_11);
(Module00044)(value2 != null, '[SearchTabsPageContext] Context should not be null.');
const styles = useStyles();
return (
<View style={styles.container}>
<SearchTabsPage
isFocused={(UseStateFromSharedValue)(value2.selectedTab) === tab}
selectMediaTab={value2.selectMediaTab}
tab={tab}
searchContext={searchContext}
width={width}
/>
</View>
);
}
function _fun113704() { // fn#113704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:411, offset: 0x0240434c, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun113705, 10);
}
function _fun113706() { // fn#113706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:489, offset: 0x0240436a, size: 79 bytes, params: 1, frame: 14
const value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const type = searchContext.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
return Reflect.apply(getChannel, ChannelStore,
[type === GUILD_CHANNEL ? searchContext.channelId : searchContext.type !== SearchTypes.THREAD ? undefined : searchContext.channelId]);
}
global.__d(_fun113702, 15033, [57, 31, 27, 1379, 9615, 661, 33, 4501, 566, 5087, 5072, 11982, 11984, 15034, 15076,
15078, 15082, 15083, 15091, 15093, 15094, 15100, 15107, 44, 8621,
2]) /* metro module 15033, dependencies: [57, 31, 27, 1379, 9615, 661, 33, 4501, 566, 5087, 5072, 11982, 11984, 15034, 15076, 15078, 15082, 15083, 15091, 15093, 15094, 15100, 15107, 44, 8621, 2] */;
@@ -1,4 +1,16 @@
/* Metro module 15109; source: modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx; dependencies: [31, 33, 3829, 8859, 4017, 4508, 4577, 4581, 15015, 8859, 2] */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UserSettingsModule from '../../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TransitionGroupModule from '../../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as SpringModule from '../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as TabsNativeModule from '../../../../../design/components/Tabs/native/Tabs.native.tsx'; /* Metro dependency 8859 */
import * as SwipeForMemberListWrapperModule from '../../../../main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx'; /* Metro dependency 15015 */
function _fun115146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:6, offset: 0x02455946, size: 255 bytes, params: 8, frame: 18
const env0_0 = require;
const getItemKey_115147 = function({items}) {
@@ -6,210 +18,209 @@ function _fun115146(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
object = {code: "function SearchTabsTransitionGroupTsx1(){const{withSpring,opacity,springStandard,transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();}}),position:opacity.get()===1?'relative':'absolute'};}"};
object = {code: 'function SearchTabsTransitionGroupTsx2(finished){const{transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
object = {code: 'function SearchTabsTransitionGroupTsx3(){const{swipeForMemberListContext}=this.__closure;var _swipeForMemberListCo;(_swipeForMemberListCo=swipeForMemberListContext)===null||_swipeForMemberListCo===void 0||_swipeForMemberListCo.disallowGesture.set(false);}'};
object = {code: 'function SearchTabsTransitionGroupTsx4(){const{state}=this.__closure;return state.scrollOffset.get()>0;}'};
object = {code: 'function SearchTabsTransitionGroupTsx5(isOffsetFromStart,prevIsOffsetFromStart){const{swipeForMemberListContext}=this.__closure;if(isOffsetFromStart!==prevIsOffsetFromStart){var _swipeForMemberListCo;(_swipeForMemberListCo=swipeForMemberListContext)===null||_swipeForMemberListCo===void 0||_swipeForMemberListCo.disallowGesture.set(isOffsetFromStart);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx');
exports.default = SearchTabsTransitionGroup;
}
function getItemKey_115147({items}) { // fn#115147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:120, offset: 0x02455a45, size: 44 bytes, params: 2, frame: 11
return items.map(function(a0) {
return a0.id;
}).join('-');
}
function AnimatedTabs({state, transitionState, cleanUp}) { // fn#115149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1532, offset: 0x02455a71, size: 668 bytes, params: 2, frame: 25
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 value5 = Reflect.apply(useSharedValue, reanimatedRexportModule, [transitionState !== MOUNTED ? 0 : 1]);
const env0_3 = value5;
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
let closure = AnimatedTabsF;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value5;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.transitionState = transitionState;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 10740262883803;
closure.__initData = env0_5;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
let binding = env0_3;
binding.useEffect(_fun115152, [value5, transitionState]);
const value7 = useCountFormatter();
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = AnimatedTabsH;
closure.__closure = {swipeForMemberListContext: value8};
closure.__workletHash = 5080152010224;
closure.__initData = env0_7;
const value9 = Reflect.apply(useCallback, binding, [closure, [value8]]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue3.useAnimatedReaction;
closure = AnimatedTabsF_115156;
closure.__closure = {state: state};
closure.__workletHash = 7791091456487;
closure.__initData = env0_8;
const closure2 = AnimatedTabsW;
closure2.__closure = {swipeForMemberListContext: value8};
closure2.__workletHash = 15386779064911;
closure2.__initData = env0_9;
Reflect.apply(useAnimatedReaction, moduleValue3, [closure, closure2]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Tabs = (require(8859) /* metro dependency 8859: TabsNative */).Tabs;
return (
<View style={value6}>
<Tabs
state={state}
grow={false}
formatCount={value7}
simultaneousHandlers={value8?.gesture}
onEndDrag={value8 != null ? value9 : undefined}
/>
</View>
);
}
function renderItem_115158(a0, a1, a2, a3) { // fn#115158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3265, offset: 0x02456001, size: 50 bytes, params: 5, frame: 15
return (
<AnimatedTabs
state={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function SearchTabsTransitionGroup({state}) { // fn#115159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3469, offset: 0x02456033, size: 84 bytes, params: 2, frame: 16
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={[state]}
getItemKey={getItemKey_115147}
renderItem={renderItem_115158}
/>
);
}
function AnimatedTabsF() { // fn#115150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1697, owner: AnimatedTabs.f, offset: 0x02455d0d, size: 228 bytes, params: 1, frame: 24
var environment;
const object3 = {};
const value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = env0_3.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = fT;
const object4 = {};
object4.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object4.TransitionStates = TransitionStates;
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 15209468679721;
closure.__initData = env1_6;
object3.opacity = Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure]);
object3.position = env0_3.get() !== 1 ? 'absolute' : 'relative';
return object3;
}
function _fun115152() { // fn#115152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2325, offset: 0x02455e5c, size: 69 bytes, params: 1, frame: 14
const binding = env0_3;
const set = binding.set;
const transitionStateBinding = transitionState;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [transitionStateBinding !== YEETED ? 1 : 0]);
}
function useCountFormatter() { // fn#115153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2398, owner: AnimatedTabs.useCountFormatter, offset: 0x02455ea1, size: 79 bytes, params: 1, frame: 14
const SearchResultExactCountEnabled = (require(3829) /* metro dependency 3829: UserSettings */).SearchResultExactCountEnabled;
return env1_3.useCallback(_fun115154, [SearchResultExactCountEnabled.useSetting()]);
}
function AnimatedTabsH() { // fn#115155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2681, owner: AnimatedTabs.h, offset: 0x02455f8d, size: 39 bytes, params: 1, frame: 11
if (env0_4 != null) {
env0_4.disallowGesture.set(false);
function getItemKey_115147({items}) { // fn#115147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:120, offset: 0x02455a45, size: 44 bytes, params: 2, frame: 11
return items.map(function(a0) {
return a0.id;
}).join('-');
}
}
function AnimatedTabsF_115156() { // fn#115156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2861, owner: AnimatedTabs.F, offset: 0x02455fb4, size: 30 bytes, params: 1, frame: 9
return state.scrollOffset.get() > 0;
}
function AnimatedTabs({state, transitionState, cleanUp}) { // fn#115149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1532, offset: 0x02455a71, size: 668 bytes, params: 2, frame: 25
const useSharedValue = ReanimatedRexportModule.useSharedValue;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value5 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [transitionState !== MOUNTED ? 0 : 1]);
const env0_3 = value5;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = AnimatedTabsF;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.opacity = value5;
object.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object.transitionState = transitionState;
object.TransitionStates = TransitionStates;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
closure.__closure = object;
closure.__workletHash = 10740262883803;
closure.__initData = env0_5;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
let binding = env0_3;
binding.useEffect(_fun115152, [value5, transitionState]);
const value7 = useCountFormatter();
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (SwipeForMemberListWrapperModule).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = AnimatedTabsH;
closure.__closure = {swipeForMemberListContext: value8};
closure.__workletHash = 5080152010224;
closure.__initData = env0_7;
const value9 = Reflect.apply(useCallback, binding, [closure, [value8]]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = AnimatedTabsF_115156;
closure.__closure = {state: state};
closure.__workletHash = 7791091456487;
closure.__initData = env0_8;
const AnimatedTabsW2 = AnimatedTabsW;
AnimatedTabsW2.__closure = {swipeForMemberListContext: value8};
AnimatedTabsW2.__workletHash = 15386779064911;
AnimatedTabsW2.__initData = env0_9;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, AnimatedTabsW2]);
const View = (ReanimatedRexport).View;
const Tabs = (TabsNativeModule).Tabs;
return (
<View style={value6}>
<Tabs
state={state}
grow={false}
formatCount={value7}
simultaneousHandlers={value8?.gesture}
onEndDrag={value8 != null ? value9 : undefined}
/>
</View>
);
function AnimatedTabsF() { // fn#115150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1697, owner: AnimatedTabs.f, offset: 0x02455d0d, size: 228 bytes, params: 1, frame: 24
var environment;
const object = {};
const value = environment.__proto__;
const withSpring = SpringModule.withSpring;
const value3 = env0_3.get();
const springStandard = (SpringPresetsModule).springStandard;
const fT2 = fT;
const object2 = {};
object2.transitionState = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.cleanUp = cleanUp;
fT2.__closure = object2;
fT2.__workletHash = 15209468679721;
fT2.__initData = env1_6;
object.opacity = Reflect.apply(withSpring, SpringModule, [value3, springStandard, 'respect-motion-settings', fT2]);
object.position = env0_3.get() !== 1 ? 'absolute' : 'relative';
return object;
function fT(a0) { // fn#115151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1796, owner: AnimatedTabs.f.t, offset: 0x02455df1, size: 107 bytes, params: 2, frame: 13
var r0;
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function AnimatedTabsW(a0, a1) { // fn#115157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2961, owner: AnimatedTabs.w, offset: 0x02455fd2, size: 47 bytes, params: 3, frame: 12
if (a0 !== a1) {
if (env0_4 != null) {
env0_4.disallowGesture.set(a0);
}
function _fun115152() { // fn#115152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2325, offset: 0x02455e5c, size: 69 bytes, params: 1, frame: 14
const binding = env0_3;
const set = binding.set;
const transitionStateBinding = transitionState;
const value = environment.__proto__;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [transitionStateBinding !== YEETED ? 1 : 0]);
}
function useCountFormatter() { // fn#115153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2398, owner: AnimatedTabs.useCountFormatter, offset: 0x02455ea1, size: 79 bytes, params: 1, frame: 14
const SearchResultExactCountEnabled = (UserSettingsModule).SearchResultExactCountEnabled;
return env1_3.useCallback(_fun115154, [SearchResultExactCountEnabled.useSetting()]);
function _fun115154(a0) { // fn#115154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2506, offset: 0x02455ef0, size: 157 bytes, params: 2, frame: 14
var r0;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
} else if (a0 > 1000) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(1000);
value = '(' + value + '+)';
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
}
return r0;
}
}
function AnimatedTabsH() { // fn#115155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2681, owner: AnimatedTabs.h, offset: 0x02455f8d, size: 39 bytes, params: 1, frame: 11
if (JsxRuntimeModule.jsx != null) {
JsxRuntimeModule.jsx.disallowGesture.set(false);
}
}
function AnimatedTabsF_115156() { // fn#115156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2861, owner: AnimatedTabs.F, offset: 0x02455fb4, size: 30 bytes, params: 1, frame: 9
return state.scrollOffset.get() > 0;
}
function AnimatedTabsW(a0, a1) { // fn#115157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2961, owner: AnimatedTabs.w, offset: 0x02455fd2, size: 47 bytes, params: 3, frame: 12
if (a0 !== a1) {
if (JsxRuntimeModule.jsx != null) {
JsxRuntimeModule.jsx.disallowGesture.set(a0);
}
}
}
}
function renderItem_115158(a0, a1, a2, a3) { // fn#115158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3265, offset: 0x02456001, size: 50 bytes, params: 5, frame: 15
return (
<AnimatedTabs
state={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function SearchTabsTransitionGroup({state}) { // fn#115159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3469, offset: 0x02456033, size: 84 bytes, params: 2, frame: 16
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<TransitionGroup
items={[state]}
getItemKey={getItemKey_115147}
renderItem={renderItem_115158}
/>
);
}
}
function fT(a0) { // fn#115151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1796, owner: AnimatedTabs.f.t, offset: 0x02455df1, size: 107 bytes, params: 2, frame: 13
var r0;
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun115154(a0) { // fn#115154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2506, offset: 0x02455ef0, size: 157 bytes, params: 2, frame: 14
var r0;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
} else if (a0 > 1000) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(1000);
value = '(' + value + '+)';
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
}
return r0;
function _fun115148(a0) { // fn#115148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:163, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
global.__d(_fun115146, 15109, [31, 33, 3829, 8859, 4017, 4508, 4577, 4581, 15015, 8859,
2]) /* metro module 15109, dependencies: [31, 33, 3829, 8859, 4017, 4508, 4577, 4581, 15015, 8859, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 15079; source: modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx; dependencies: [9615, 4501, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun114083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15276:6, offset: 0x024137b3, size: 196 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(9615) /* metro dependency 9615: SearchConstants */;
let value = SearchConstantsModule;
const SEARCH_LIST_SECTION_TOP_PADDING = value.SEARCH_LIST_SECTION_TOP_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = value.SEARCH_ROW_TAP_STATE_PADDING;
const SEARCH_LIST_HORIZONTAL_PADDING = value.SEARCH_LIST_HORIZONTAL_PADDING;
@@ -14,7 +17,8 @@ function _fun114083(global, require, importDefault, importAll, module, exports,
messagesContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING - SEARCH_ROW_TAP_STATE_PADDING},
membersContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx');
exports.useContentContainerStyles = value;
}
global.__d(_fun114083, 15079, [9615, 4501, 2]) /* metro module 15079, dependencies: [9615, 4501, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 15084; source: modules/search/native/components/tabs/hooks/useSearchMessages.tsx; dependencies: [4792, 9674, 566, 9675, 2] */
import SearchMessageStore from '../../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as SearchUtilsModule from '../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
function _fun114134(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:6, offset: 0x02415351, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessages.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessages.tsx');
exports.useSearchMessages = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[2]).useStateFromStores([SearchQueryStore, SearchMessageStore], _fun114136, [a0,
a1]);
};
function useSearchMessages(a0, a1) { // fn#114135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:235, offset: 0x024153d3, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (FluxModule).useStateFromStores([SearchQueryStore, SearchMessageStore],
_fun114136, [a0, a1]);
function _fun114136() { // fn#114136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:308, offset: 0x02415431, size: 81 bytes, params: 1, frame: 17
const searchQueryStoreBinding = SearchQueryStore;
const getSearchResultsQuery = searchQueryStoreBinding.getSearchResultsQuery;
const binding = env0_0;
return SearchMessageStore.getMessages((SearchUtilsModule).getSearchTabFetchId(binding,
require, Reflect.apply(getSearchResultsQuery, searchQueryStoreBinding, [binding])));
}
}
}
function useSearchMessages(a0, a1) { // fn#114135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:235, offset: 0x024153d3, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore, SearchMessageStore],
_fun114136, [a0, a1]);
}
function _fun114136() { // fn#114136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:308, offset: 0x02415431, size: 81 bytes, params: 1, frame: 17
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const binding = env0_0;
return SearchMessageStore.getMessages((require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(binding,
require, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [binding])));
}
global.__d(_fun114134, 15084, [4792, 9674, 566, 9675,
2]) /* metro module 15084, dependencies: [4792, 9674, 566, 9675, 2] */;
@@ -1,35 +1,44 @@
/* Metro module 15085; source: modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx; dependencies: [4792, 9674, 9615, 15040, 566, 9675, 2] */
import SearchMessageStore from '../../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchUtilsModule from '../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
import * as UsePlaceholderStylesModule from '../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
function _fun114137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:6, offset: 0x02415482, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_TABS_TO_SEARCH_QUERY_LIMITS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx');
exports.useSearchMessagesLoadingState = useSearchMessagesLoadingState;
function useSearchMessagesLoadingState({searchContext, tab, placeholderHeight, numColumns}) { // fn#114138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:304, offset: 0x0241551a, size: 142 bytes, params: 2, frame: 19
const env0_2 = (UsePlaceholderStylesModule).useFullscreenPlaceholderCount({placeholderHeight: placeholderHeight,
numColumns: numColumns});
return (FluxModule).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], _fun114139);
function _fun114139() { // fn#114139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:528, offset: 0x024155a8, size: 167 bytes, params: 1, frame: 17
let value = environment.__proto__;
const searchQueryStoreBinding = SearchQueryStore;
const getSearchResultsQuery = searchQueryStoreBinding.getSearchResultsQuery;
const searchContextBinding = searchContext;
const searchTabFetchId = (SearchUtilsModule).getSearchTabFetchId(searchContextBinding,
tab, Reflect.apply(getSearchResultsQuery, searchQueryStoreBinding, [searchContextBinding]));
const searchMessageStoreBinding = SearchMessageStore;
const isInitialFetchComplete = searchMessageStoreBinding.getIsInitialFetchComplete(searchTabFetchId);
const isFetching = searchMessageStoreBinding.getIsFetching(searchTabFetchId);
const value7 = !isInitialFetchComplete;
const r3 = isInitialFetchComplete ? isFetching : !value7;
const Math = global.Math;
value = Math.max(env0_2, SEARCH_TABS_TO_SEARCH_QUERY_LIMITS[tab]);
return {isFirstPageLoading: value7, isNextPageLoading: r3,
placeholderCount: isInitialFetchComplete ? r3 ? value : 0 : value};
}
}
}
function useSearchMessagesLoadingState({searchContext, tab, placeholderHeight, numColumns}) { // fn#114138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:304, offset: 0x0241551a, size: 142 bytes, params: 2, frame: 19
const env0_2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: placeholderHeight,
numColumns: numColumns});
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], _fun114139);
}
function _fun114139() { // fn#114139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:528, offset: 0x024155a8, size: 167 bytes, params: 1, frame: 17
let value = environment.__proto__;
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
tab, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]));
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
const value7 = !isInitialFetchComplete;
const r3 = isInitialFetchComplete ? isFetching : !value7;
const Math = global.Math;
value = Math.max(env0_2, SEARCH_TABS_TO_SEARCH_QUERY_LIMITS[tab]);
return {isFirstPageLoading: value7, isNextPageLoading: r3,
placeholderCount: isInitialFetchComplete ? r3 ? value : 0 : value};
}
global.__d(_fun114137, 15085, [4792, 9674, 9615, 15040, 566, 9675,
2]) /* metro module 15085, dependencies: [4792, 9674, 9615, 15040, 566, 9675, 2] */;
@@ -1,123 +1,132 @@
/* Metro module 15108; source: modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx; dependencies: [31, 4017, 8853, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SegmentedControlStateNativeModule from '../../../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
function _fun115137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:6, offset: 0x024554f8, size: 210 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
object = {code: 'function useSearchSegmentedControlStateTsx1(){const{visibleTabsStateful}=this.__closure;return visibleTabsStateful;}'};
object = {code: 'function useSearchSegmentedControlStateTsx2(){const{visibleTabs,activeIndex}=this.__closure;return visibleTabs.get()[activeIndex.get()];}'};
object = {code: 'function useSearchSegmentedControlStateTsx3(){const{visibleTabs}=this.__closure;return visibleTabs.get();}'};
object = {code: 'function useSearchSegmentedControlStateTsx4(visibleTabs){const{lastSelectedTab,runOnJS,setActiveIndex}=this.__closure;if(visibleTabs.length===0)return;const lastSelectedTabIndex=visibleTabs.indexOf(lastSelectedTab.get());const targetIndex=Math.max(0,lastSelectedTabIndex);const maxIndex=Math.max(0,visibleTabs.length-1);const nextActiveIndex=Math.min(targetIndex,maxIndex);runOnJS(setActiveIndex)(nextActiveIndex,false);}'};
object = {code: 'function useSearchSegmentedControlStateTsx5(){const{selectedTab}=this.__closure;return selectedTab.get();}'};
object = {code: 'function useSearchSegmentedControlStateTsx6(selectedTab){const{lastSelectedTab,runOnJS,onSelectedTabChange}=this.__closure;if(selectedTab==null)return;lastSelectedTab.set(selectedTab);runOnJS(onSelectedTabChange)(selectedTab);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx');
exports.useSearchSegmentedControlState = useSearchSegmentedControlState;
}
function useSearchSegmentedControlState({items, visibleTabs, onSelectedTabChange, width}) { // fn#115138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1436, offset: 0x024555ca, size: 601 bytes, params: 2, frame: 26
const value2 = (ReanimatedRexportModule).useSharedValue(visibleTabs[0]);
const env0_2 = value2;
let useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = function() {
return visibleTabs;
};
closure.__closure = {visibleTabsStateful: visibleTabs};
closure.__workletHash = 17125959946782;
closure.__initData = env0_3;
const value3 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const value4 = (SegmentedControlStateNativeModule).useSegmentedControlState({items: items,
defaultIndex: 0, pageWidth: width});
const env0_4 = value4;
const activeIndex = value4.activeIndex;
const activeIndex2 = activeIndex;
const setActiveIndex = value4.setActiveIndex;
const setActiveIndex2 = setActiveIndex;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = useSearchSegmentedControlStateX;
closure.__closure = {visibleTabs: value3, activeIndex: activeIndex};
closure.__workletHash = 6189329624535;
closure.__initData = env0_4;
const value5 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_7 = value5;
let useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useSearchSegmentedControlStateF;
closure.__closure = {visibleTabs: value3};
closure.__workletHash = 9222891018885;
closure.__initData = activeIndex2;
const useSearchSegmentedControlStateV2 = useSearchSegmentedControlStateV;
object = {lastSelectedTab: value2};
const runOnJS = ReanimatedRexportModule.runOnJS;
object.runOnJS = runOnJS;
object.setActiveIndex = setActiveIndex;
useSearchSegmentedControlStateV2.__closure = object;
useSearchSegmentedControlStateV2.__workletHash = 13456384876758;
useSearchSegmentedControlStateV2.__initData = setActiveIndex2;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useSearchSegmentedControlStateV2]);
useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useSearchSegmentedControlStateC;
closure.__closure = {selectedTab: value5};
closure.__workletHash = 2491149576387;
closure.__initData = env0_7;
const useSearchSegmentedControlStateI2 = useSearchSegmentedControlStateI;
useSearchSegmentedControlStateI2.__closure = {lastSelectedTab: value2, runOnJS: runOnJS,
onSelectedTabChange: onSelectedTabChange};
useSearchSegmentedControlStateI2.__workletHash = 8452224388929;
useSearchSegmentedControlStateI2.__initData = env0_8;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useSearchSegmentedControlStateI2]);
return env0_2.useMemo(_fun115145, [value4, value5]);
function useSearchSegmentedControlStateX() { // fn#115140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1836, owner: useSearchSegmentedControlState.x, offset: 0x02455823, size: 35 bytes, params: 1, frame: 10
const binding = env0_3;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const activeIndexBinding = activeIndex;
get = activeIndexBinding.get;
return value2[Reflect.apply(get, activeIndexBinding, [])];
}
function useSearchSegmentedControlState({items, visibleTabs, onSelectedTabChange, width}) { // fn#115138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1436, offset: 0x024555ca, size: 601 bytes, params: 2, frame: 26
var object2;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(visibleTabs[0]);
const env0_2 = value2;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
return visibleTabs;
};
closure.__closure = {visibleTabsStateful: visibleTabs};
closure.__workletHash = 17125959946782;
closure.__initData = env0_3;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const value4 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: items,
defaultIndex: 0, pageWidth: width});
const env0_4 = value4;
const activeIndex = value4.activeIndex;
const env0_5 = activeIndex;
const setActiveIndex = value4.setActiveIndex;
const env0_6 = setActiveIndex;
const moduleValue4 = reanimatedRexportModule;
useDerivedValue = moduleValue4.useDerivedValue;
closure = useSearchSegmentedControlStateX;
closure.__closure = {visibleTabs: value3, activeIndex: activeIndex};
closure.__workletHash = 6189329624535;
closure.__initData = env0_4;
const value5 = Reflect.apply(useDerivedValue, moduleValue4, [closure]);
const env0_7 = value5;
const moduleValue5 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue5.useAnimatedReaction;
closure = useSearchSegmentedControlStateF;
closure.__closure = {visibleTabs: value3};
closure.__workletHash = 9222891018885;
closure.__initData = env0_5;
const closure2 = useSearchSegmentedControlStateV;
object2 = {lastSelectedTab: value2};
const runOnJS = reanimatedRexportModule.runOnJS;
object2.runOnJS = runOnJS;
object2.setActiveIndex = setActiveIndex;
closure2.__closure = object2;
closure2.__workletHash = 13456384876758;
closure2.__initData = env0_6;
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedReaction = moduleValue6.useAnimatedReaction;
closure = useSearchSegmentedControlStateC;
closure.__closure = {selectedTab: value5};
closure.__workletHash = 2491149576387;
closure.__initData = env0_7;
const closure3 = useSearchSegmentedControlStateI;
closure3.__closure = {lastSelectedTab: value2, runOnJS: runOnJS, onSelectedTabChange: onSelectedTabChange};
closure3.__workletHash = 8452224388929;
closure3.__initData = env0_8;
Reflect.apply(useAnimatedReaction, moduleValue6, [closure, closure3]);
return env0_2.useMemo(_fun115145, [value4, value5]);
}
function useSearchSegmentedControlStateF() { // fn#115141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1986, owner: useSearchSegmentedControlState.f, offset: 0x010bf756, size: 18 bytes, params: 1, frame: 9
return env0_3.get();
}
function useSearchSegmentedControlStateX() { // fn#115140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1836, owner: useSearchSegmentedControlState.x, offset: 0x02455823, size: 35 bytes, params: 1, frame: 10
const binding = env0_3;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const activeIndexBinding = activeIndex;
get = activeIndexBinding.get;
return value2[Reflect.apply(get, activeIndexBinding, [])];
}
function useSearchSegmentedControlStateV(a0) { // fn#115142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2077, owner: useSearchSegmentedControlState.v, offset: 0x02455846, size: 157 bytes, params: 2, frame: 17
var indexOf;
var binding;
var value2;
var Math;
var value3;
var value4;
var value5;
var value6;
var moduleValue;
if (a0.length !== 0) {
indexOf = a0.indexOf;
binding = env0_2;
value2 = Reflect.apply(indexOf, a0, [binding.get()]);
Math = global.Math;
value3 = Math.max(0, value2);
Math = global.Math;
value4 = Math.max(0, a0.length - 1);
Math = global.Math;
value5 = Math.min(value3, value4);
value6 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(setActiveIndex)(value5, false);
}
}
function useSearchSegmentedControlStateC() { // fn#115143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2368, owner: useSearchSegmentedControlState.C, offset: 0x010c555b, size: 18 bytes, params: 1, frame: 9
return env0_7.get();
}
function useSearchSegmentedControlStateI(a0) { // fn#115144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2459, owner: useSearchSegmentedControlState.I, offset: 0x024558e3, size: 74 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (a0 != null) {
env0_2.set(a0);
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onSelectedTabChange)(a0);
}
}
function _fun115145() { // fn#115145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2651, offset: 0x0245592d, size: 25 bytes, params: 1, frame: 3
return {segmentedControlState: env0_4, selectedTab: env0_7};
}
function useSearchSegmentedControlStateV(a0) { // fn#115142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2077, owner: useSearchSegmentedControlState.v, offset: 0x02455846, size: 157 bytes, params: 2, frame: 17
var indexOf;
var binding;
var value2;
var Math;
var value3;
var value4;
var value5;
var value6;
var moduleValue;
if (a0.length !== 0) {
indexOf = a0.indexOf;
binding = env0_2;
value2 = Reflect.apply(indexOf, a0, [binding.get()]);
Math = global.Math;
value3 = Math.max(0, value2);
Math = global.Math;
value4 = Math.max(0, a0.length - 1);
Math = global.Math;
value5 = Math.min(value3, value4);
value6 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(setActiveIndex)(value5, false);
}
}
function useSearchSegmentedControlStateI(a0) { // fn#115144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2459, owner: useSearchSegmentedControlState.I, offset: 0x024558e3, size: 74 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (a0 != null) {
env0_2.set(a0);
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onSelectedTabChange)(a0);
}
}
function _fun115145() { // fn#115145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2651, offset: 0x0245592d, size: 25 bytes, params: 1, frame: 3
return {segmentedControlState: env0_4, selectedTab: env0_7};
}
global.__d(_fun115137, 15108, [31, 4017, 8853, 2]) /* metro module 15108, dependencies: [31, 4017, 8853, 2] */;
@@ -1,4 +1,21 @@
/* Metro module 15082; source: modules/search/native/components/tabs/pages/ChannelsScreen.tsx; dependencies: [31, 11830, 9674, 9615, 9614, 33, 9675, 566, 14549, 14705, 15036, 1244, 3869, 15040, 9673, 15077, 15032, 15044, 2] */
import Tracking from '../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import SearchGuildChannelTabStore from '../../../stores/SearchGuildChannelTabStore.tsx'; /* Metro dependency 11830 */
import UseVoiceStatesForChannelList from '../../../../../favorites/useVoiceStatesForChannelList.tsx'; /* Metro dependency 14549 */
import UseStageChannelSpeakerVoiceStates from '../../../../../stage_channels/useStageChannelSpeakerVoiceStates.tsx'; /* Metro dependency 14705 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TrackingConstantsModule from '../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchUtilsModule from '../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
import * as UseOnPressSearchItemModule from '../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as UsePlaceholderStylesModule from '../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
import * as UseSearchScreenErrorModule from '../../../hooks/useSearchScreenError.tsx'; /* Metro dependency 15077 */
function _fun114106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:6, offset: 0x0241426e, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const getVoiceStates = function(a0, a1, a2) {
@@ -6,240 +23,237 @@ function _fun114106(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchGuildChannelTabStore = importDefault(11830) /* metro dependency 11830: SearchGuildChannelTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.EMPTY_VOICE_STATES;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const env0_8 = searchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE;
const env0_9 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(ChannelsScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/ChannelsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/ChannelsScreen.tsx');
exports.default = value;
}
function ChannelsScreen({searchContext}) { // fn#114108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:382, offset: 0x024143a2, size: 679 bytes, params: 2, frame: 28
var r0;
var value;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const textChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun114109);
const voiceChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun114110);
const env0_3 = voiceChannels;
const value2 = (importDefault(14549) /* metro dependency 14549: useVoiceStatesForChannelList */)(searchContext.guildId);
const value3 = (importDefault(14705) /* metro dependency 14705: useStageChannelSpeakerVoiceStates */)(searchContext.guildId);
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext});
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getQueryString(searchContext);
}, [searchContext]);
const binding = env0_3;
binding.useEffect(_fun114113, [textChannels, voiceChannels, value7]);
const usePlaceholderStylesModule = require(15040) /* metro dependency 15040: usePlaceholderStyles */;
const useFullscreenPlaceholderCount = usePlaceholderStylesModule.useFullscreenPlaceholderCount;
const value11 = binding.useMemo(_fun114116, [Reflect.apply(useFullscreenPlaceholderCount,
usePlaceholderStylesModule, [{placeholderHeight: CHANNELS_ESTIMATED_ITEM_SIZE, numColumns: 1}]),
binding.useCallback(_fun114114, [value4, searchContext]), binding.useCallback(_fun114115, [value5,
searchContext]), value6, value3, textChannels, voiceChannels, value2]);
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function _fun114109() { // fn#114109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:495, offset: 0x02414649, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getTextChannels(env0_1);
}
function _fun114110() { // fn#114110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:556, offset: 0x02414664, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getVoiceChannels(env0_1);
}
function _fun114113() { // fn#114113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:886, offset: 0x024146b5, size: 231 bytes, params: 1, frame: 17
var r2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value3;
var value;
if (env0_9.trim() !== '') {
value = textChannels.length + voiceChannels.length;
if (value > 0) {
value3 = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: value});
r2 = value;
function ChannelsScreen({searchContext}) { // fn#114108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:382, offset: 0x024143a2, size: 679 bytes, params: 2, frame: 28
var r0;
var value;
const env0_1 = (SearchUtilsModule).getSearchContextId(searchContext);
let useStateFromStores = FluxModule.useStateFromStores;
const searchGuildChannelTabStoreBinding = SearchGuildChannelTabStore;
const textChannels = Reflect.apply(useStateFromStores, FluxModule, [[searchGuildChannelTabStoreBinding],
_fun114109]);
const voiceChannels = FluxModule.useStateFromStores([searchGuildChannelTabStoreBinding], _fun114110);
const voiceChannels2 = voiceChannels;
const value2 = (UseVoiceStatesForChannelList)(searchContext.guildId);
const value3 = (UseStageChannelSpeakerVoiceStates)(searchContext.guildId);
const value4 = (UseOnPressSearchItemModule).useOnPressGuildTextChannel({searchContext: searchContext});
const value5 = (UseOnPressSearchItemModule).useOnPressGuildVoiceChannel({searchContext: searchContext});
useStateFromStores = FluxModule.useStateFromStores;
const searchQueryStoreBinding = SearchQueryStore;
const value6 = Reflect.apply(useStateFromStores, FluxModule, [[searchQueryStoreBinding], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}]);
const value7 = FluxModule.useStateFromStores([searchQueryStoreBinding], function() {
return SearchQueryStore.getQueryString(searchContext);
}, [searchContext]);
const binding = voiceChannels2;
binding.useEffect(_fun114113, [textChannels, voiceChannels, value7]);
const useFullscreenPlaceholderCount = UsePlaceholderStylesModule.useFullscreenPlaceholderCount;
const value11 = binding.useMemo(_fun114116, [Reflect.apply(useFullscreenPlaceholderCount,
UsePlaceholderStylesModule, [{placeholderHeight: CHANNELS_ESTIMATED_ITEM_SIZE, numColumns: 1}]),
binding.useCallback(_fun114114, [value4, searchContext]), binding.useCallback(_fun114115, [value5,
searchContext]), value6, value3, textChannels, voiceChannels, value2]);
const value12 = (UseSearchScreenErrorModule).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
value = environment.__proto__;
value = intl.string(t.f5cMAg);
r2 = value;
r0 = ((Component) => <Component estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
function _fun114109() { // fn#114109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:495, offset: 0x02414649, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getTextChannels(env0_1);
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
}
function _fun114114(a0, a1) { // fn#114114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1196, offset: 0x0241479c, size: 90 bytes, params: 3, frame: 15
env0_6(a0);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114110() { // fn#114110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:556, offset: 0x02414664, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getVoiceChannels(env0_1);
}
function _fun114115(a0, a1) { // fn#114115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1330, offset: 0x024147f6, size: 90 bytes, params: 3, frame: 15
env0_7(a0);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114116() { // fn#114116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1460, offset: 0x02414850, size: 429 bytes, params: 1, frame: 22
var environment;
var r6;
var push;
var value3;
var SECTION;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var nIfr0Y;
var forEach;
var value4;
var CYnO4s;
var binding;
var binding2;
var value5;
var sort;
var value6;
var value7;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
const items2 = [];
let value = 0;
var env0_1;
let length = textChannels.length;
reducibleJoin2: while (true) {
if (length > value) {
push = items2.push;
value3 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
nIfr0Y = t.nIfr0Y;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [nIfr0Y])}}]);
textChannelsBinding = textChannels;
forEach = textChannelsBinding.forEach;
Reflect.apply(forEach, textChannelsBinding, [_fun114117]);
length = textChannelsBinding.length;
env0_1 = value + length;
break reducibleJoin2;
}
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (voiceChannels.length > value) {
push = items2.push;
value4 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
CYnO4s = t.CYnO4s;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [CYnO4s])}}]);
binding = env0_4;
binding2 = env0_5;
value5 = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return _fun114120;
})(binding, binding2);
voiceChannelsBinding = voiceChannels;
sort = voiceChannelsBinding.sort;
value6 = Reflect.apply(sort, voiceChannelsBinding, [value5]);
forEach = value6.forEach;
Reflect.apply(forEach, value6, [_fun114121]);
break reducibleJoin4;
}
break reducibleJoin4;
}
reducibleJoin8: while (true) {
if (env0_8) {
break reducibleJoin8;
}
length = items2.length;
if (value !== length) {
break reducibleJoin8;
}
value7 = environment.__proto__;
if (!(value < env0_10)) {
break reducibleJoin8;
}
r6 = value;
reducibleLoop7: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r6}]);
value = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
if (value < env0_10) {
r6 = value;
continue reducibleLoop7;
function _fun114113() { // fn#114113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:886, offset: 0x024146b5, size: 231 bytes, params: 1, frame: 17
var r2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value3;
var value;
if (TrackingConstantsModule.SearchResultContentEntityTypes.trim() !== '') {
value = textChannels.length + voiceChannels.length;
if (value > 0) {
value3 = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: value});
r2 = value;
} else {
value = environment.__proto__;
value = intl.string(t.f5cMAg);
r2 = value;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
break reducibleJoin8;
}
function _fun114114(a0, a1) { // fn#114114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1196, offset: 0x0241479c, size: 90 bytes, params: 3, frame: 15
(0, SearchConstantsModule.EMPTY_VOICE_STATES)(a0);
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114115(a0, a1) { // fn#114115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1330, offset: 0x024147f6, size: 90 bytes, params: 3, frame: 15
(0, SearchConstantsModule.SearchListItemTypes)(a0);
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114116() { // fn#114116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1460, offset: 0x02414850, size: 429 bytes, params: 1, frame: 22
var environment;
var r6;
var push;
var value3;
var SECTION;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var nIfr0Y;
var forEach;
var value4;
var CYnO4s;
var binding;
var binding2;
var value5;
var sort;
var value6;
var value7;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
const items2 = [];
let value = 0;
var env0_1;
let length = textChannels.length;
reducibleJoin2: while (true) {
if (length > value) {
push = items2.push;
value3 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
nIfr0Y = t.nIfr0Y;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [nIfr0Y])}}]);
textChannelsBinding = textChannels;
forEach = textChannelsBinding.forEach;
Reflect.apply(forEach, textChannelsBinding, [_fun114117]);
length = textChannelsBinding.length;
env0_1 = value + length;
break reducibleJoin2;
}
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (voiceChannels.length > value) {
push = items2.push;
value4 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
CYnO4s = t.CYnO4s;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [CYnO4s])}}]);
binding = env0_4;
binding2 = env0_5;
value5 = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return _fun114120;
})(binding, binding2);
voiceChannelsBinding = voiceChannels;
sort = voiceChannelsBinding.sort;
value6 = Reflect.apply(sort, voiceChannelsBinding, [value5]);
forEach = value6.forEach;
Reflect.apply(forEach, value6, [_fun114121]);
break reducibleJoin4;
}
break reducibleJoin4;
}
reducibleJoin8: while (true) {
if (SearchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE) {
break reducibleJoin8;
}
length = items2.length;
if (value !== length) {
break reducibleJoin8;
}
value7 = environment.__proto__;
if (!(value < JsxRuntimeModule.jsx)) {
break reducibleJoin8;
}
r6 = value;
reducibleLoop7: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r6}]);
value = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
if (value < JsxRuntimeModule.jsx) {
r6 = value;
continue reducibleLoop7;
}
break reducibleJoin8;
}
}
return items2;
function _fun114117({channel, lastMessageId}, a1) { // fn#114117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1584, offset: 0x024149fd, size: 97 bytes, params: 3, frame: 15
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_TEXT_CHANNEL, props: {channel: channel, lastMessageId: lastMessageId,
onPress: onPress_114118}}]);
function onPress_114118(a0) { // fn#114118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1699, offset: 0x02414a5e, size: 27 bytes, params: 2, frame: 13
return env2_11(a0, env0_0);
}
}
function createSorter(a0, a1) { // fn#114119, offset: 0x02414a79, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun114120;
function _fun114120({channel}, {channel}) { // fn#114120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1859, offset: 0x02414a92, size: 100 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const getVoiceStatesBinding = getVoiceStates;
const binding = env0_0;
value = getVoiceStatesBinding(channel, binding, require);
const voiceStatesBinding = getVoiceStatesBinding(channel, binding, require);
return value.length < voiceStatesBinding.length ? 1 : value.length > voiceStatesBinding.length ? -1 : 0;
}
}
function _fun114121(a0, a1) { // fn#114121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2017, offset: 0x02414af6, size: 153 bytes, params: 3, frame: 19
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_VOICE_CHANNEL, props: {channel: a0.channel,
voiceStates: env1_4[a0.channel.id] ?? EMPTY_VOICE_STATES,
speakerVoiceStates: env1_5[a0.channel.id] ?? EMPTY_VOICE_STATES, onPress: onPress_114122}}]);
function onPress_114122(a0) { // fn#114122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2198, offset: 0x02414b8f, size: 27 bytes, params: 2, frame: 13
return env2_12(a0, env0_0);
}
}
}
}
return items2;
}
function _fun114117({channel, lastMessageId}, a1) { // fn#114117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1584, offset: 0x024149fd, size: 97 bytes, params: 3, frame: 15
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_TEXT_CHANNEL, props: {channel: channel, lastMessageId: lastMessageId,
onPress: onPress_114118}}]);
}
function createSorter(a0, a1) { // fn#114119, offset: 0x02414a79, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun114120;
}
function _fun114121(a0, a1) { // fn#114121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2017, offset: 0x02414af6, size: 153 bytes, params: 3, frame: 19
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_VOICE_CHANNEL, props: {channel: a0.channel,
voiceStates: env1_4[a0.channel.id] ?? EMPTY_VOICE_STATES,
speakerVoiceStates: env1_5[a0.channel.id] ?? EMPTY_VOICE_STATES, onPress: onPress_114122}}]);
}
function onPress_114118(a0) { // fn#114118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1699, offset: 0x02414a5e, size: 27 bytes, params: 2, frame: 13
return env2_11(a0, env0_0);
}
function _fun114120({channel}, {channel}) { // fn#114120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1859, offset: 0x02414a92, size: 100 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const getVoiceStatesBinding = getVoiceStates;
const binding = env0_0;
value = getVoiceStatesBinding(channel, binding, require);
const voiceStatesBinding = getVoiceStatesBinding(channel, binding, require);
return value.length < voiceStatesBinding.length ? 1 : value.length > voiceStatesBinding.length ? -1 : 0;
}
function onPress_114122(a0) { // fn#114122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2198, offset: 0x02414b8f, size: 27 bytes, params: 2, frame: 13
return env2_12(a0, env0_0);
}
global.__d(_fun114106, 15082, [31, 11830, 9674, 9615, 9614, 33, 9675, 566, 14549, 14705, 15036, 1244, 3869, 15040,
9673, 15077, 15032, 15044,
2]) /* metro module 15082, dependencies: [31, 11830, 9674, 9615, 9614, 33, 9675, 566, 14549, 14705, 15036, 1244, 3869, 15040, 9673, 15077, 15032, 15044, 2] */;
@@ -1,38 +1,46 @@
/* Metro module 15032; source: modules/search/native/components/tabs/pages/ErrorScreen.tsx; dependencies: [31, 27, 33, 4501, 5463, 3869, 4573, 2] */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun113699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:6, offset: 0x02403c27, size: 237 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'justifyContent': 'center',
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({container: {'justifyContent': 'center',
'alignItems': 'center', 'height': '100%', 'display': 'flex'}, text: {'textAlign': 'center', 'width': '75%'}});
value = value.memo(_fun113700);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/ErrorScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/ErrorScreen.tsx');
exports.default = value;
function _fun113700({text}) { // fn#113700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:294, offset: 0x02403d14, size: 206 bytes, params: 2, frame: 20
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
env0_3.useEffect(function() {
var AccessibilityAnnouncer = require(dependencyMap[5]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(text, 'polite');
}, [text]);
const items2 = [styles.container];
items2[1] = {paddingBottom: insets.bottom};
const Text = (TextModule).Text;
return (
<View style={items2}>
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.text}
>
{text}
</Text>
</View>
);
}
}
function _fun113700({text}) { // fn#113700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:294, offset: 0x02403d14, size: 206 bytes, params: 2, frame: 20
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
env0_3.useEffect(function() {
var AccessibilityAnnouncer = require(dependencyMap[5]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(text, 'polite');
}, [text]);
const items2 = [styles.container];
items2[1] = {paddingBottom: insets.bottom};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.text}
>
{text}
</Text>
</View>
);
}
global.__d(_fun113699, 15032, [31, 27, 33, 4501, 5463, 3869, 4573,
2]) /* metro module 15032, dependencies: [31, 27, 33, 4501, 5463, 3869, 4573, 2] */;
@@ -1,327 +1,353 @@
/* Metro module 15078; source: modules/search/native/components/tabs/pages/MembersScreen.tsx; dependencies: [31, 27, 6875, 1379, 1945, 1867, 1934, 11831, 9674, 9615, 9614, 661, 33, 4501, 632, 6771, 9675, 15040, 3789, 1848, 9673, 8743, 1244, 3869, 15079, 15077, 15032, 11382, 15044, 15080, 6789, 11725, 2] */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import SelectedChannelStore from '../../../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildMemberStore from '../../../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import UseAnalyticsLocations from '../../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import Tracking from '../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import SearchMemberTabStore from '../../../stores/SearchMemberTabStore.tsx'; /* Metro dependency 11831 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseStateFromStoresModule from '../../../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as KeyboardManagerUtilsModule from '../../../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseAnalyticsLocationsModule from '../../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as ChannelMemberStoreModule from '../../../../../../stores/ChannelMemberStore.tsx'; /* Metro dependency 6875 */
import * as TrackingConstantsModule from '../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchUtilsModule from '../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
import * as UsePlaceholderStylesModule from '../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
import * as UseSearchScreenErrorModule from '../../../hooks/useSearchScreenError.tsx'; /* Metro dependency 15077 */
import * as UseContentContainerStylesModule from '../hooks/useContentContainerStyles.tsx'; /* Metro dependency 15079 */
function _fun114061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:6, offset: 0x024129c1, size: 470 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(6875) /* metro dependency 6875: ChannelMemberStore */).EVERYONE_CHANNEL_ID;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const searchMemberTabStore = importDefault(11831) /* metro dependency 11831: SearchMemberTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_13 = searchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE;
const env0_14 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_15 = searchConstantsModule.SearchListItemTypes;
const env0_16 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_17 = constantsModule.RelationshipTypes;
const env0_18 = constantsModule.SearchTypes;
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
const env0_20 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
let value = ReactModule;
const env0_20 = (CreateStylesModule).createStyles({container: {'flex': 1,
'flexGrow': 1}, userList: {backgroundColor: 'transparent'}});
value = value.memo(MembersScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/MembersScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/MembersScreen.tsx');
exports.default = value;
}
function SearchableMembersScreen({searchContext, guildId}) { // fn#114062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:523, offset: 0x02412b97, size: 872 bytes, params: 2, frame: 31
var r0;
var value;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_3 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const results = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114063);
const env0_4 = results;
const value2 = useMemberScreenChannelId(searchContext);
const channelId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
_fun114067);
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun114068);
const value6 = env0_4.useCallback(_fun114069, [searchContext, value2, channelId, analyticsLocations]);
const value7 = env0_4.useCallback(_fun114070, [searchContext]);
const value8 = env0_4.useCallback(_fun114071, [value6]);
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const isFetching = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114073);
env0_4.useEffect(_fun114074, [results, value9, isFetching]);
const value10 = env0_4.useMemo(_fun114075, [results, isFetching, value9, guildId, value4, value6, value3]);
const value11 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else if (value9) {
if (value5 != null) {
value = importDefault(11382) /* metro dependency 11382: GuildChannelUserList */;
value = ((Component) => <Component onUserPress={value7} onUserLongPress={value8} channelId={value5} guildId={guildId} disableStickySections listStyleOverride={styles.userList} isNameplatedList canShowDisplayNameStylesFont />)(value);
function SearchableMembersScreen({searchContext, guildId}) { // fn#114062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:523, offset: 0x02412b97, size: 872 bytes, params: 2, frame: 31
var r0;
var value;
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const env0_3 = (SearchUtilsModule).getSearchContextId(searchContext);
const results = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114063);
const results2 = results;
const value2 = useMemberScreenChannelId(searchContext);
const channelId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const value3 = (UsePlaceholderStylesModule).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
_fun114067);
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun114068);
const value6 = results2.useCallback(_fun114069, [searchContext, value2, channelId, analyticsLocations]);
const value7 = results2.useCallback(_fun114070, [searchContext]);
const value8 = results2.useCallback(_fun114071, [value6]);
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const isFetching = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114073);
results2.useEffect(_fun114074, [results, value9, isFetching]);
const value10 = results2.useMemo(_fun114075, [results, isFetching, value9, guildId, value4, value6, value3]);
const value11 = (UseContentContainerStylesModule).useContentContainerStyles();
const value12 = (UseSearchScreenErrorModule).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else if (value9) {
if (value5 != null) {
value = importDefault(11382) /* metro dependency 11382: GuildChannelUserList */;
value = ((Component) => <Component onUserPress={value7} onUserLongPress={value8} channelId={value5} guildId={guildId} disableStickySections listStyleOverride={styles.userList} isNameplatedList canShowDisplayNameStylesFont />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
return r0;
function _fun114063() { // fn#114063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:696, offset: 0x02412eff, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getResults(env0_3);
}
function ThreadMembersScreen({searchContext, channelId, guildId}) { // fn#114079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3160, offset: 0x02413486, size: 241 bytes, params: 2, frame: 23
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
let useStateFromStores = useStateFromStoresModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [[ChannelStore], _fun114080]);
const moduleValue2 = useStateFromStoresModule;
useStateFromStores = moduleValue2.useStateFromStores;
return value2 ? <SearchableMembersScreen searchContext={searchContext} guildId={guildId} /> : Reflect.apply(useStateFromStores,
moduleValue2, [[SearchQueryStore], _fun114081,
[searchContext]]) ? ((Component) => <Component channelId={channelId} guildId={guildId} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} disableStickySections />)(importDefault(15080) /* metro dependency 15080: ThreadChannelUserList */) : <SearchableMembersScreen searchContext={searchContext} guildId={guildId} />;
}
function useMemberScreenChannelId(a0) { // fn#114064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:720, owner: SearchableMembersScreen.useMemberScreenChannelId, offset: 0x02412f1a, size: 128 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = (UseStateFromStoresModule).useStateFromStores([SearchQueryStore],
_fun114065, [a0]);
return value2.size === 0 ? EVERYONE_CHANNEL_ID : value2.size !== 1 ? null : global.Array.from(value2)[0];
function _fun114065() { // fn#114065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:796, offset: 0x02412f9a, size: 27 bytes, params: 1, frame: 11
return SearchQueryStore.getChannelIds(env0_0);
}
function MembersScreen({searchContext}) { // fn#114082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3640, offset: 0x024135e4, size: 463 bytes, params: 2, frame: 23
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const SEARCH_MEMBERS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SEARCH_MEMBERS;
const analyticsLocations = defaultImport(SEARCH_MEMBERS).analyticsLocations;
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{((Component) => <Component channelId={searchContext.channelId} disableStickySections listStyleOverride={styles.userList} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} />)(importDefault(11725) /* metro dependency 11725: PrivateChannelUserList */)}
</View>
</AnalyticsLocationProvider>
);
}
const THREAD = SearchTypes.THREAD;
if (THREAD === type) {
return (
<ThreadMembersScreen
searchContext={searchContext}
channelId={searchContext.channelId}
guildId={searchContext.guildId}
/>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const Error = global.Error;
const value = '[MembersScreen] Unsupported search context type: ' + searchContext.type;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
}
function _fun114063() { // fn#114063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:696, offset: 0x02412eff, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getResults(env0_3);
}
function useMemberScreenChannelId(a0) { // fn#114064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:720, owner: SearchableMembersScreen.useMemberScreenChannelId, offset: 0x02412f1a, size: 128 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
_fun114065, [a0]);
return value2.size === 0 ? EVERYONE_CHANNEL_ID : value2.size !== 1 ? null : global.Array.from(value2)[0];
}
function _fun114067() { // fn#114067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1052, offset: 0x02412fb5, size: 71 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const guild = GuildStore.getGuild(guildId);
if (guild != null) {
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
value = value.getGuildVisualOwnerId(guild);
r0 = value;
} else {
r0 = undefined;
}
return r0;
}
function _fun114068() { // fn#114068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1171, offset: 0x02412ffc, size: 91 bytes, params: 1, frame: 12
if (env0_5 === EVERYONE_CHANNEL_ID) {
return env0_5;
}
const channel = ChannelStore.getChannel(env0_5);
return channel == null ? env0_5 : channel.isAnnouncementThread() && channel.parent_id != null ? channel.parent_id : env0_5;
}
function _fun114069(a0, a1) { // fn#114069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1311, offset: 0x02413057, size: 175 bytes, params: 3, frame: 18
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: a0.id, index: a1,
entityType: USER}]);
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id,
channelId: env0_5 !== EVERYONE_CHANNEL_ID ? env0_5 : channelId, sourceAnalyticsLocations: analyticsLocations});
}
function _fun114070({user, index}) { // fn#114070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1546, offset: 0x02413106, size: 119 bytes, params: 2, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: user.id,
index: index, entityType: USER}]);
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
}
function _fun114071({user, index}) { // fn#114071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1716, offset: 0x0241317d, size: 30 bytes, params: 2, frame: 13
env0_9(user, index);
}
function _fun114073() { // fn#114073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1857, offset: 0x024131b6, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getIsFetching(env0_3);
}
function _fun114074() { // fn#114074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1895, offset: 0x024131d1, size: 213 bytes, params: 1, frame: 17
var r2;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (!env0_10) {
if (!isFetching) {
length = results.length;
if (length > 0) {
value = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: length});
r2 = value;
function _fun114067() { // fn#114067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1052, offset: 0x02412fb5, size: 71 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const guild = GuildStore.getGuild(guildId);
if (guild != null) {
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
value = value.getGuildVisualOwnerId(guild);
r0 = value;
} else {
value = environment.__proto__;
value = intl.string(t.tuL9TW);
r2 = value;
r0 = undefined;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
return r0;
}
}
}
function _fun114075() { // fn#114075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2108, offset: 0x024132a6, size: 142 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var GUILD_CHANNEL_MEMBER_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114076);
reducibleJoin5: while (true) {
reducibleJoin3: while (true) {
if (isFetching) {
break reducibleJoin3;
function _fun114068() { // fn#114068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1171, offset: 0x02412ffc, size: 91 bytes, params: 1, frame: 12
if (ReactNativeModule.View === EVERYONE_CHANNEL_ID) {
return ReactNativeModule.View;
}
if (env0_10) {
const channel = ChannelStore.getChannel(ReactNativeModule.View);
return channel == null ? ReactNativeModule.View : channel.isAnnouncementThread() && channel.parent_id != null ? channel.parent_id : ReactNativeModule.View;
}
function _fun114069(a0, a1) { // fn#114069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1311, offset: 0x02413057, size: 175 bytes, params: 3, frame: 18
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: a0.id, index: a1,
entityType: USER}]);
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id,
channelId: ReactNativeModule.View !== EVERYONE_CHANNEL_ID ? ReactNativeModule.View : channelId, sourceAnalyticsLocations: analyticsLocations});
}
function _fun114070({user, index}) { // fn#114070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1546, offset: 0x02413106, size: 119 bytes, params: 2, frame: 17
const value = environment.__proto__;
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: user.id,
index: index, entityType: USER}]);
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
}
function _fun114071({user, index}) { // fn#114071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1716, offset: 0x0241317d, size: 30 bytes, params: 2, frame: 13
env0_9(user, index);
}
function _fun114073() { // fn#114073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1857, offset: 0x024131b6, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getIsFetching(env0_3);
}
function _fun114074() { // fn#114074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1895, offset: 0x024131d1, size: 213 bytes, params: 1, frame: 17
var r2;
var length;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value;
if (!env0_10) {
if (!isFetching) {
length = results.length;
if (length > 0) {
value = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: length});
r2 = value;
} else {
value = environment.__proto__;
value = intl.string(t.tuL9TW);
r2 = value;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
}
}
function _fun114075() { // fn#114075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2108, offset: 0x024132a6, size: 142 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var GUILD_CHANNEL_MEMBER_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114076);
reducibleJoin5: while (true) {
reducibleJoin3: while (true) {
if (isFetching) {
break reducibleJoin3;
}
if (env0_10) {
break reducibleJoin5;
}
length = items2.length;
if (length !== 0) {
break reducibleJoin5;
}
break reducibleJoin3;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_7)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: GUILD_CHANNEL_MEMBER_PLACEHOLDER,
key: 'guild-channel-member-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_7) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
length = items2.length;
if (length !== 0) {
break reducibleJoin5;
return items2;
function _fun114076(a0, a1) { // fn#114076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2136, offset: 0x02413334, size: 311 bytes, params: 3, frame: 23
var environment;
const env0_0 = a1;
let value = environment.__proto__.__proto__;
const member = GuildMemberStore.getMember(guildId, a0.record.id);
const binding = env0_0;
const push = binding.push;
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
const NONE = RelationshipTypes.NONE;
value = undefined;
Reflect.apply(push, binding, [{type: GUILD_CHANNEL_MEMBER, props: {type: NONE, user: a0.record,
nickname: member == null ? value : member.nick, usernameColor: member == null ? value : member.colorString,
roleColors: member == null ? value : member.colorStrings, isNameplatedRow: true,
premiumSince: (member == null ? value : member.premiumSince) ?? value, isOwner: env1_8 === a0.record.id,
guildId: guildId, onLongPress: onLongPress_114077, onPress: onPress_114078, start: a1 === 0,
end: a1 === results.length - 1, canShowDisplayNameStylesFont: true}}]);
return value;
function onLongPress_114077(a0) { // fn#114077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2490, offset: 0x0241346b, size: 27 bytes, params: 2, frame: 13
return env2_9(a0, require);
}
function onPress_114078(a0) { // fn#114078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2508, offset: 0x0241346b, size: 27 bytes, params: 2, frame: 13
return env2_9(a0, require);
}
}
break reducibleJoin3;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_7)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: GUILD_CHANNEL_MEMBER_PLACEHOLDER,
key: 'guild-channel-member-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_7) {
r5 = value4;
continue reducibleLoop4;
}
function ThreadMembersScreen({searchContext, channelId, guildId}) { // fn#114079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3160, offset: 0x02413486, size: 241 bytes, params: 2, frame: 23
let useStateFromStores = UseStateFromStoresModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [[ChannelStore], _fun114080]);
useStateFromStores = UseStateFromStoresModule.useStateFromStores;
return (
value2
? (
<SearchableMembersScreen searchContext={searchContext} guildId={guildId} />
)
: (
Reflect.apply(useStateFromStores, UseStateFromStoresModule, [[SearchQueryStore], _fun114081, [searchContext]])
? ((Component) => <Component channelId={channelId} guildId={guildId} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} disableStickySections />)(importDefault(15080) /* metro dependency 15080: ThreadChannelUserList */)
: (
<SearchableMembersScreen searchContext={searchContext} guildId={guildId} />
)
)
);
function _fun114080() { // fn#114080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3269, offset: 0x02413577, size: 57 bytes, params: 1, frame: 12
var r1;
let value = environment.__proto__;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r1 = undefined;
} else {
value = value.isAnnouncementThread();
r1 = value;
}
break reducibleJoin5;
return r1 != null && r1;
}
break reducibleJoin5;
function _fun114081() { // fn#114081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3398, offset: 0x024135b0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
const searchQueryStoreBinding = SearchQueryStore;
return searchQueryStoreBinding.isInitialSearchQuery(searchContext) && !SearchQueryStore.isTagsEmpty(searchContext);
}
}
return items2;
}
function _fun114080() { // fn#114080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3269, offset: 0x02413577, size: 57 bytes, params: 1, frame: 12
var r1;
let value = environment.__proto__;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r1 = undefined;
} else {
value = value.isAnnouncementThread();
r1 = value;
function MembersScreen({searchContext}) { // fn#114082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3640, offset: 0x024135e4, size: 463 bytes, params: 2, frame: 23
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const styles = useStyles();
const defaultImport = UseAnalyticsLocations;
const SEARCH_MEMBERS = (AnalyticsLocation).SEARCH_MEMBERS;
const analyticsLocations = defaultImport(SEARCH_MEMBERS).analyticsLocations;
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{((Component) => <Component channelId={searchContext.channelId} disableStickySections listStyleOverride={styles.userList} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} />)(importDefault(11725) /* metro dependency 11725: PrivateChannelUserList */)}
</View>
</AnalyticsLocationProvider>
);
}
const THREAD = SearchTypes.THREAD;
if (THREAD === type) {
return (
<ThreadMembersScreen
searchContext={searchContext}
channelId={searchContext.channelId}
guildId={searchContext.guildId}
/>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const Error = global.Error;
const value = '[MembersScreen] Unsupported search context type: ' + searchContext.type;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
return r1 != null && r1;
}
function _fun114081() { // fn#114081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3398, offset: 0x024135b0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return SearchQueryStore.isInitialSearchQuery(searchContext) && !SearchQueryStore.isTagsEmpty(searchContext);
}
function _fun114065() { // fn#114065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:796, offset: 0x02412f9a, size: 27 bytes, params: 1, frame: 11
return SearchQueryStore.getChannelIds(env0_0);
}
function _fun114076(a0, a1) { // fn#114076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2136, offset: 0x02413334, size: 311 bytes, params: 3, frame: 23
var environment;
const env0_0 = a1;
let value = environment.__proto__.__proto__;
const member = GuildMemberStore.getMember(guildId, a0.record.id);
const binding = env0_0;
const push = binding.push;
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
const NONE = RelationshipTypes.NONE;
value = undefined;
Reflect.apply(push, binding, [{type: GUILD_CHANNEL_MEMBER, props: {type: NONE, user: a0.record,
nickname: member == null ? value : member.nick, usernameColor: member == null ? value : member.colorString,
roleColors: member == null ? value : member.colorStrings, isNameplatedRow: true,
premiumSince: (member == null ? value : member.premiumSince) ?? value, isOwner: env1_8 === a0.record.id,
guildId: guildId, onLongPress: onLongPress_114077, onPress: onPress_114078, start: a1 === 0,
end: a1 === results.length - 1, canShowDisplayNameStylesFont: true}}]);
return value;
}
function onLongPress_114077(a0) { // fn#114077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2490, offset: 0x0241346b, size: 27 bytes, params: 2, frame: 13
return env2_9(a0, require);
}
global.__d(_fun114061, 15078, [31, 27, 6875, 1379, 1945, 1867, 1934, 11831, 9674, 9615, 9614, 661, 33, 4501, 632,
6771, 9675, 15040, 3789, 1848, 9673, 8743, 1244, 3869, 15079, 15077, 15032, 11382, 15044, 15080, 6789, 11725,
2]) /* metro module 15078, dependencies: [31, 27, 6875, 1379, 1945, 1867, 1934, 11831, 9674, 9615, 9614, 661, 33, 4501, 632, 6771, 9675, 15040, 3789, 1848, 9673, 8743, 1244, 3869, 15079, 15077, 15032, 11382, 15044, 15080, 6789, 11725, 2] */;
@@ -1,171 +1,192 @@
/* Metro module 15076; source: modules/search/native/components/tabs/pages/PeopleScreen.tsx; dependencies: [5, 31, 11832, 9674, 9615, 9614, 33, 9675, 566, 15040, 15036, 4603, 9673, 15077, 15032, 15044, 2] */
import Module00005 from '../../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Tracking from '../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchQueryStore from '../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import SearchPeopleTabStore from '../../../stores/SearchPeopleTabStore.tsx'; /* Metro dependency 11832 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TrackingConstantsModule from '../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchConstantsModule from '../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchUtilsModule from '../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
import * as UseOnPressSearchItemModule from '../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as UsePlaceholderStylesModule from '../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
import * as UseSearchScreenErrorModule from '../../../hooks/useSearchScreenError.tsx'; /* Metro dependency 15077 */
function _fun114041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:6, offset: 0x02411fd1, size: 254 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const searchPeopleTabStore = importDefault(11832) /* metro dependency 11832: SearchPeopleTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const env0_8 = searchConstantsModule.USER_ESTIMATED_ITEM_SIZE;
const env0_9 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(PeopleScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/PeopleScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/PeopleScreen.tsx');
exports.default = value;
}
function PeopleScreen({searchContext}) { // fn#114042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:272, offset: 0x024120cf, size: 494 bytes, params: 2, frame: 24
var r0;
var value;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const results = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchPeopleTabStore],
_fun114043);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const env0_4 = value3;
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGroupDMItem({searchContext: searchContext});
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext});
const binding = env0_4;
const value9 = binding.useMemo(_fun114050, [binding.useCallback(_fun114045(), [value5, searchContext]),
binding.useCallback(_fun114049, [value4, searchContext]), value2, value3, results]);
const value10 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value10 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value10} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value9} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function _fun114043() { // fn#114043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:383, offset: 0x024122bd, size: 27 bytes, params: 1, frame: 11
return SearchPeopleTabStore.getResults(env0_1);
}
function _fun114045() { // fn#114045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:662, offset: 0x024122f3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun114047);
return _fun114048;
}
function _fun114049(a0, a1) { // fn#114049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:939, offset: 0x024123bb, size: 90 bytes, params: 3, frame: 16
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
env0_5(a0);
}
function _fun114050() { // fn#114050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1069, offset: 0x02412415, size: 135 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114051);
reducibleJoin4: while (true) {
if (env0_3) {
break reducibleJoin4;
function PeopleScreen({searchContext}) { // fn#114042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:272, offset: 0x024120cf, size: 494 bytes, params: 2, frame: 24
var r0;
var value;
const env0_1 = (SearchUtilsModule).getSearchContextId(searchContext);
const results = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchPeopleTabStore],
_fun114043);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value3 = (UsePlaceholderStylesModule).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const env0_4 = value3;
const value4 = (UseOnPressSearchItemModule).useOnPressGroupDMItem({searchContext: searchContext});
const value5 = (UseOnPressSearchItemModule).useOnPressDMItem({searchContext: searchContext});
const binding = env0_4;
const value9 = binding.useMemo(_fun114050, [binding.useCallback(_fun114045(), [value5, searchContext]),
binding.useCallback(_fun114049, [value4, searchContext]), value2, value3, results]);
const value10 = (UseSearchScreenErrorModule).useMessageTabCountsErrorText({searchContext: searchContext});
if (value10 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value10} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value9} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
length = items2.length;
value2 = 0;
if (value2 !== length) {
break reducibleJoin4;
return r0;
function _fun114043() { // fn#114043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:383, offset: 0x024122bd, size: 27 bytes, params: 1, frame: 11
return SearchPeopleTabStore.getResults(env0_1);
}
value3 = environment.__proto__;
if (!(value2 < env0_4)) {
break reducibleJoin4;
}
r5 = value2;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_4) {
r5 = value4;
continue reducibleLoop3;
function _fun114045() { // fn#114045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:662, offset: 0x024122f3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun114047);
return _fun114048;
function* _fun114047(a0, a1) { // fn#114047, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:682, offset: 0x02412322, size: 153 bytes, params: 3, frame: 19
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[11]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
var value6 = env3_1(env3_2[12]);
var trackSearchResultClicked = value6.trackSearchResultClicked;
var CHANNEL = env3_9.CHANNEL;
Reflect.apply(trackSearchResultClicked, value6, [{searchContext: require, userId: a0, channelId: value4,
index: a1,
entityType: CHANNEL}]);
SearchQueryStore(a0, value4);
}
}
break reducibleJoin4;
function _fun114048() { // fn#114048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:869, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
return items2;
}
function* _fun114047(a0, a1) { // fn#114047, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:682, offset: 0x02412322, size: 153 bytes, params: 3, frame: 19
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[11]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
function _fun114049(a0, a1) { // fn#114049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:939, offset: 0x024123bb, size: 90 bytes, params: 3, frame: 16
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
env0_5(a0);
}
var value6 = env3_1(env3_2[12]);
var trackSearchResultClicked = value6.trackSearchResultClicked;
var CHANNEL = env3_9.CHANNEL;
Reflect.apply(trackSearchResultClicked, value6, [{searchContext: require, userId: a0, channelId: value4,
index: a1,
entityType: CHANNEL}]);
SearchQueryStore(a0, value4);
}
}
function _fun114051({title, items}) { // fn#114051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1097, offset: 0x0241249c, size: 104 bytes, params: 2, frame: 13
var environment;
var value;
if (title != null) {
if (items.length > 0) {
value = environment.__proto__.__proto__;
title.push({type: SearchListItemTypes.SECTION, props: {title: title}});
function _fun114050() { // fn#114050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1069, offset: 0x02412415, size: 135 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114051);
reducibleJoin4: while (true) {
if (Module00005) {
break reducibleJoin4;
}
length = items2.length;
value2 = 0;
if (value2 !== length) {
break reducibleJoin4;
}
value3 = environment.__proto__;
if (!(value2 < env0_4)) {
break reducibleJoin4;
}
r5 = value2;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_4) {
r5 = value4;
continue reducibleLoop3;
}
break reducibleJoin4;
}
}
return items2;
function _fun114051({title, items}) { // fn#114051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1097, offset: 0x0241249c, size: 104 bytes, params: 2, frame: 13
var environment;
var value;
if (title != null) {
if (items.length > 0) {
value = environment.__proto__.__proto__;
title.push({type: SearchListItemTypes.SECTION, props: {title: title}});
}
}
items.forEach(_fun114052);
function _fun114052(a0, a1) { // fn#114052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1203, offset: 0x02412504, size: 204 bytes, params: 3, frame: 16
var environment;
var binding;
var push;
var type;
var user;
var firstMatch;
var username;
const env0_0 = a1;
let value = environment.__proto__;
if ('user' in a0) {
type = a0.type;
user = a0.user;
firstMatch = a0.firstMatch;
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
username = user.username;
value = undefined;
Reflect.apply(push, binding, [{type: SearchListItemTypes.DM, section: title, props: {type: type, user: user,
nickname: username === firstMatch ? value : firstMatch, onPress: onPress_114053}}]);
} else {
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [{type: SearchListItemTypes.GROUP_DM, section: title, props: {channel: a0,
onPress: onPress_114054}}]);
}
function onPress_114053(a0) { // fn#114053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1353, offset: 0x024125d0, size: 27 bytes, params: 2, frame: 13
return env3_7(a0, require);
}
function onPress_114054(a0) { // fn#114054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1430, offset: 0x024125eb, size: 27 bytes, params: 2, frame: 13
return env3_8(a0, require);
}
}
}
}
}
items.forEach(_fun114052);
}
function _fun114052(a0, a1) { // fn#114052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1203, offset: 0x02412504, size: 204 bytes, params: 3, frame: 16
var environment;
var binding;
var push;
var type;
var user;
var firstMatch;
var username;
const env0_0 = a1;
let value = environment.__proto__;
if ('user' in a0) {
type = a0.type;
user = a0.user;
firstMatch = a0.firstMatch;
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
username = user.username;
value = undefined;
Reflect.apply(push, binding, [{type: SearchListItemTypes.DM, section: title, props: {type: type, user: user,
nickname: username === firstMatch ? value : firstMatch, onPress: onPress_114053}}]);
} else {
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [{type: SearchListItemTypes.GROUP_DM, section: title, props: {channel: a0,
onPress: onPress_114054}}]);
}
}
global.__d(_fun114041, 15076, [5, 31, 11832, 9674, 9615, 9614, 33, 9675, 566, 15040, 15036, 4603, 9673, 15077,
15032, 15044,
2]) /* metro module 15076, dependencies: [5, 31, 11832, 9674, 9615, 9614, 33, 9675, 566, 15040, 15036, 4603, 9673, 15077, 15032, 15044, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,116 +1,130 @@
/* Metro module 15086; source: modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx; dependencies: [31, 4792, 9674, 9614, 33, 9673, 566, 9675, 15077, 15087, 11822, 15088, 15089, 15032, 15044, 2] */
import SearchMessageStore from '../../../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import Tracking from '../../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchQueryStore from '../../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TrackingConstantsModule from '../../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as UseSearchScreenErrorModule from '../../../../hooks/useSearchScreenError.tsx'; /* Metro dependency 15077 */
import * as SearchFetchPendingManagerModule from './SearchFetchPendingManager.tsx'; /* Metro dependency 15087 */
function _fun114140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:6, offset: 0x0241564f, size: 209 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 searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_6 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx');
exports.default = BaseMessagesScreen;
exports.trackMessageItemPress = trackMessageItemPress;
}
function BaseMessagesScreen({data, searchContext, tab, isFocused, isFirstPageLoading, isNextPageLoading, estimatedItemSize, contentContainerStyle, ItemSeparatorComponent, numColumns}) { // fn#114141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:187, offset: 0x02415720, size: 659 bytes, params: 2, frame: 34
const env0_3 = isFocused;
let r0 = isFirstPageLoading || isNextPageLoading;
var value;
const {isIndexing, isHistoricalIndexing,
documentsIndexed} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], function() {
var searchContextBinding = searchContext;
var value4 = require(dependencyMap[7]).getSearchTabFetchId(searchContextBinding, tab,
SearchQueryStore.getSearchResultsQuery(searchContextBinding));
var object = {};
object.isIndexing = SearchMessageStore.getIsIndexing(value4);
object.isHistoricalIndexing = SearchMessageStore.getIsHistoricalIndexing(value4);
object.documentsIndexed = SearchMessageStore.getDocumentsIndexed(value4);
return object;
});
const {hasError, errorText, isErrorFullscreen, isErrorToast,
showErrorToast} = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageSearchErrorScreen({searchContext: searchContext,
tab: tab, hasListItems: data.length > 0});
let value4 = (require(15087) /* metro dependency 15087: SearchFetchPendingManager */).useSearchFetchPendingManager(searchContext);
const binding = env0_3;
const value5 = binding.useCallback(_fun114143, [data.length, r0, isFocused, hasError, searchContext, tab, value4]);
binding.useEffect(_fun114144, [isFocused, r0, searchContext, value4, tab]);
binding.useEffect(_fun114145, [isErrorToast, r0, isFocused, showErrorToast]);
const value6 = binding.useMemo(_fun114146, [documentsIndexed, isHistoricalIndexing, searchContext, tab]);
if (isIndexing) {
value = importDefault(15089) /* metro dependency 15089: SearchIndexingScreen */;
value = ((Component) => <Component searchContext={searchContext} />)(value);
r0 = value;
} else if (isErrorFullscreen) {
if (r0) {
function BaseMessagesScreen({data, searchContext, tab, isFocused, isFirstPageLoading, isNextPageLoading, estimatedItemSize, contentContainerStyle, ItemSeparatorComponent, numColumns}) { // fn#114141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:187, offset: 0x02415720, size: 659 bytes, params: 2, frame: 34
const isFocused2 = isFocused;
let r0 = isFirstPageLoading || isNextPageLoading;
var value;
const {isIndexing, isHistoricalIndexing,
documentsIndexed} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], function() {
var searchQueryStoreBinding = SearchQueryStore;
var searchContextBinding = searchContext;
var value4 = require(dependencyMap[7]).getSearchTabFetchId(searchContextBinding, tab,
searchQueryStoreBinding.getSearchResultsQuery(searchContextBinding));
var object = {};
var searchMessageStoreBinding = SearchMessageStore;
object.isIndexing = searchMessageStoreBinding.getIsIndexing(value4);
object.isHistoricalIndexing = searchMessageStoreBinding.getIsHistoricalIndexing(value4);
object.documentsIndexed = searchMessageStoreBinding.getDocumentsIndexed(value4);
return object;
});
const {hasError, errorText, isErrorFullscreen, isErrorToast,
showErrorToast} = (UseSearchScreenErrorModule).useMessageSearchErrorScreen({searchContext: searchContext,
tab: tab, hasListItems: data.length > 0});
let value4 = (SearchFetchPendingManagerModule).useSearchFetchPendingManager(searchContext);
const binding = isFocused2;
const value5 = binding.useCallback(_fun114143, [data.length, r0, isFocused, hasError, searchContext, tab, value4]);
binding.useEffect(_fun114144, [isFocused, r0, searchContext, value4, tab]);
binding.useEffect(_fun114145, [isErrorToast, r0, isFocused, showErrorToast]);
const value6 = binding.useMemo(_fun114146, [documentsIndexed, isHistoricalIndexing, searchContext, tab]);
if (isIndexing) {
value = importDefault(15089) /* metro dependency 15089: SearchIndexingScreen */;
value = ((Component) => <Component searchContext={searchContext} />)(value);
r0 = value;
} else if (isErrorFullscreen) {
if (r0) {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
} else {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={errorText} />)(value);
r0 = value;
}
} else {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
} else {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={errorText} />)(value);
r0 = value;
}
} else {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
}
return r0;
}
function trackMessageItemPress({searchContext, channelId, messageId, index}) { // fn#114147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1607, offset: 0x02415b8d, size: 146 bytes, params: 2, frame: 18
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: index, entityType: MESSAGE}]);
}
function _fun114143() { // fn#114143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:935, offset: 0x02415a31, size: 151 bytes, params: 1, frame: 14
var binding;
var value2;
var defaultImport;
if (data.length !== 0) {
if (env0_4) {
binding = env0_10;
binding.add(tab);
} else if (isFocused) {
if (hasError) {
binding = env0_10;
binding.add(tab);
} else {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
defaultImport.fetchNextMessages(searchContext, tab);
return r0;
function _fun114143() { // fn#114143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:935, offset: 0x02415a31, size: 151 bytes, params: 1, frame: 14
var binding;
var value2;
var defaultImport;
if (data.length !== 0) {
if (env0_4) {
binding = env0_10;
binding.add(tab);
} else if (isFocused) {
if (hasError) {
binding = env0_10;
binding.add(tab);
} else {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
defaultImport.fetchNextMessages(searchContext, tab);
}
} else {
binding = env0_10;
binding.add(tab);
}
}
} else {
binding = env0_10;
binding.add(tab);
}
function _fun114144() { // fn#114144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1060, offset: 0x02415ac8, size: 48 bytes, params: 1, frame: 13
var binding;
if (isFocused && !env0_4) {
binding = env0_10;
binding.flush(searchContext, tab);
}
}
function _fun114145() { // fn#114145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1113, offset: 0x02415af8, size: 41 bytes, params: 1, frame: 10
if (isErrorToast && !env0_4 && isFocused) {
showErrorToast();
}
}
function _fun114146() { // fn#114146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1162, offset: 0x02415b21, size: 108 bytes, params: 1, frame: 16
const isHistoricalIndexingBinding = isHistoricalIndexing;
const value2 = null;
return (
isHistoricalIndexingBinding && value2 != documentsIndexed && documentsIndexed > 0
? ((Component) => <Component searchContext={searchContext} documentsIndexed={documentsIndexed} tab={tab} />)(importDefault(15088) /* metro dependency 15088: SearchHistoricalIndexingHeader */)
: value2
);
}
}
}
function _fun114144() { // fn#114144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1060, offset: 0x02415ac8, size: 48 bytes, params: 1, frame: 13
var binding;
if (isFocused && !env0_4) {
binding = env0_10;
binding.flush(searchContext, tab);
function trackMessageItemPress({searchContext, channelId, messageId, index}) { // fn#114147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1607, offset: 0x02415b8d, size: 146 bytes, params: 2, frame: 18
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: index, entityType: MESSAGE}]);
}
}
function _fun114145() { // fn#114145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1113, offset: 0x02415af8, size: 41 bytes, params: 1, frame: 10
if (isErrorToast && !env0_4 && isFocused) {
showErrorToast();
}
}
function _fun114146() { // fn#114146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1162, offset: 0x02415b21, size: 108 bytes, params: 1, frame: 16
const isHistoricalIndexingBinding = isHistoricalIndexing;
const value2 = null;
return isHistoricalIndexingBinding && value2 != documentsIndexed && documentsIndexed > 0 ? ((Component) => <Component searchContext={searchContext} documentsIndexed={documentsIndexed} tab={tab} />)(importDefault(15088) /* metro dependency 15088: SearchHistoricalIndexingHeader */) : value2;
}
global.__d(_fun114140, 15086, [31, 4792, 9674, 9614, 33, 9673, 566, 9675, 15077, 15087, 11822, 15088, 15089, 15032,
15044,
2]) /* metro module 15086, dependencies: [31, 4792, 9674, 9614, 33, 9673, 566, 9675, 15077, 15087, 11822, 15088, 15089, 15032, 15044, 2] */;
@@ -1,132 +1,147 @@
/* Metro module 15091; source: modules/search/native/components/tabs/pages/messages/FilesScreen.tsx; dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15086, 15085, 11822, 15090, 15043, 2] */
import BaseMessagesScreen from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as UseOnPressSearchItemModule from '../../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as SeparatorsModule from '../../../list/rows/Separators.tsx'; /* Metro dependency 15043 */
import * as UseContentContainerStylesModule from '../../hooks/useContentContainerStyles.tsx'; /* Metro dependency 15079 */
import * as UseSearchMessagesModule from '../../hooks/useSearchMessages.tsx'; /* Metro dependency 15084 */
import * as UseSearchMessagesLoadingStateModule from '../../hooks/useSearchMessagesLoadingState.tsx'; /* Metro dependency 15085 */
import * as BaseMessagesScreenModule from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as UseFileOrLinkImageDimensionsModule from '../../../../hooks/useFileOrLinkImageDimensions.tsx'; /* Metro dependency 15092 */
function _fun114169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:6, offset: 0x02416384, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_4 = searchConstantsModule.SearchListItemTypes;
const env0_5 = searchConstantsModule.CARD_ESTIMATED_ITEM_SIZE;
const env0_6 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_7 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(FilesScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/FilesScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/FilesScreen.tsx');
exports.default = value;
}
function FilesScreen({searchContext, tab, isFocused, width}) { // fn#114170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:258, offset: 0x02416450, size: 410 bytes, params: 2, frame: 29
const value2 = (UseContentContainerStylesModule).useContentContainerStyles();
const value3 = (UseSearchMessagesModule).useSearchMessages(searchContext,
tab);
const value4 = (UseFileOrLinkImageDimensionsModule).useFileOrLinkImageDimensions(width);
const value5 = (UseOnPressSearchItemModule).useOnPressMessageItem({searchContext: searchContext});
const binding = value5;
const value6 = binding.useCallback(_fun114171, [value5, searchContext]);
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (UseSearchMessagesLoadingStateModule).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const value8 = binding.useMemo(_fun114172, [value6, value4, value3, placeholderCount]);
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (SeparatorsModule).CardVerticalSeparator;
return ((Component) => <Component data={value8} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(BaseMessagesScreen);
function _fun114171({channelId, messageId}, a1) { // fn#114171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:509, offset: 0x024165ea, size: 90 bytes, params: 3, frame: 17
const value = environment.__proto__;
(BaseMessagesScreenModule).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_3(channelId, messageId);
}
function FilesScreen({searchContext, tab, isFocused, width}) { // fn#114170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:258, offset: 0x02416450, size: 410 bytes, params: 2, frame: 29
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value4 = (require(15092) /* metro dependency 15092: useFileOrLinkImageDimensions */).useFileOrLinkImageDimensions(width);
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const binding = value5;
const value6 = binding.useCallback(_fun114171, [value5, searchContext]);
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const value8 = binding.useMemo(_fun114172, [value6, value4, value3, placeholderCount]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).CardVerticalSeparator;
return ((Component) => <Component data={value8} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114172() { // fn#114172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:815, offset: 0x02416644, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object4;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114173]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'file-or-link-placeholder-' + r9;
object4 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object4.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
function _fun114172() { // fn#114172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:815, offset: 0x02416644, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object2;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object3;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114173]);
break reducibleJoin2;
}
break reducibleJoin5;
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object2 = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object2.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object2.key = 'file-or-link-placeholder-' + r9;
object3 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object3.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object2.props = object3;
Reflect.apply(push, items2, [object2]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
function _fun114173(a0) { // fn#114173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:856, offset: 0x0241675e, size: 80 bytes, params: 2, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getFiles(a0);
value.forEach(_fun114174);
env0_1 = env0_1 + value.length;
function _fun114174(a0, a1) { // fn#114174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:897, offset: 0x024167ae, size: 154 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object = {};
const FILE = SearchListItemTypes.FILE;
object.type = FILE;
const object2 = {data: a0, onPress: onPress_114175};
object2.imageStyle = env2_2;
object2.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object.props = object2;
Reflect.apply(push, binding, [object]);
function onPress_114175(a0) { // fn#114175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:957, offset: 0x02416848, size: 27 bytes, params: 2, frame: 13
return env3_4(a0, env0_0);
}
}
}
}
}
return items2;
}
function _fun114173(a0) { // fn#114173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:856, offset: 0x0241675e, size: 80 bytes, params: 2, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getFiles(a0);
value.forEach(_fun114174);
env0_1 = env0_1 + value.length;
}
function _fun114174(a0, a1) { // fn#114174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:897, offset: 0x024167ae, size: 154 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object3 = {};
const FILE = SearchListItemTypes.FILE;
object3.type = FILE;
const object4 = {data: a0, onPress: onPress_114175};
object4.imageStyle = env2_2;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPress_114175(a0) { // fn#114175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:957, offset: 0x02416848, size: 27 bytes, params: 2, frame: 13
return env3_4(a0, env0_0);
}
global.__d(_fun114169, 15091, [31, 9615, 33, 15079, 15084, 15092, 15036, 15086, 15085, 11822, 15090, 15043,
2]) /* metro module 15091, dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15086, 15085, 11822, 15090, 15043, 2] */;
@@ -1,158 +1,175 @@
/* Metro module 15093; source: modules/search/native/components/tabs/pages/messages/LinksScreen.tsx; dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15085, 15086, 11822, 15090, 15043, 2] */
import BaseMessagesScreen from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchPlatformUtilsModule from '../../../../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
import * as UseOnPressSearchItemModule from '../../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as SeparatorsModule from '../../../list/rows/Separators.tsx'; /* Metro dependency 15043 */
import * as UseContentContainerStylesModule from '../../hooks/useContentContainerStyles.tsx'; /* Metro dependency 15079 */
import * as UseSearchMessagesModule from '../../hooks/useSearchMessages.tsx'; /* Metro dependency 15084 */
import * as UseSearchMessagesLoadingStateModule from '../../hooks/useSearchMessagesLoadingState.tsx'; /* Metro dependency 15085 */
import * as BaseMessagesScreenModule from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as UseFileOrLinkImageDimensionsModule from '../../../../hooks/useFileOrLinkImageDimensions.tsx'; /* Metro dependency 15092 */
function _fun114179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:6, offset: 0x0241696b, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_4 = searchConstantsModule.SearchListItemTypes;
const env0_5 = searchConstantsModule.CARD_ESTIMATED_ITEM_SIZE;
const env0_6 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_7 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(LinksScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/LinksScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/LinksScreen.tsx');
exports.default = value;
}
function LinksScreen({searchContext, tab, isFocused, width}) { // fn#114180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:258, offset: 0x02416a37, size: 545 bytes, params: 2, frame: 31
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value4 = (require(15092) /* metro dependency 15092: useFileOrLinkImageDimensions */).useFileOrLinkImageDimensions(width);
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value5;
const value6 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressSearchLink(searchContext);
const value7 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const binding = env0_3;
const value12 = binding.useMemo(_fun114184, [binding.useCallback(_fun114183, [value7, searchContext]),
binding.useCallback(_fun114182, [value6, searchContext]), binding.useCallback(_fun114181, [value5,
searchContext]), value4, value3, placeholderCount, searchContext]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).CardVerticalSeparator;
return ((Component) => <Component data={value12} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114181({channelId, messageId}, a1) { // fn#114181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:764, offset: 0x02416c58, size: 90 bytes, params: 3, frame: 17
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_3(channelId, messageId);
}
function _fun114182({channelId, messageId, url, trusted}, a1) { // fn#114182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:910, offset: 0x02416cb2, size: 101 bytes, params: 3, frame: 19
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_4(url, trusted);
}
function _fun114183({channelId, messageId, mentionedChannelId}, a1) { // fn#114183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1072, offset: 0x02416d17, size: 95 bytes, params: 3, frame: 17
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_5(mentionedChannelId);
}
function _fun114184() { // fn#114184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1233, offset: 0x02416d76, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object4;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
function LinksScreen({searchContext, tab, isFocused, width}) { // fn#114180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:258, offset: 0x02416a37, size: 545 bytes, params: 2, frame: 31
const value2 = (UseContentContainerStylesModule).useContentContainerStyles();
const value3 = (UseSearchMessagesModule).useSearchMessages(searchContext,
tab);
const value4 = (UseFileOrLinkImageDimensionsModule).useFileOrLinkImageDimensions(width);
const value5 = (UseOnPressSearchItemModule).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value5;
const value6 = (UseOnPressSearchItemModule).useOnPressSearchLink(searchContext);
const value7 = (UseOnPressSearchItemModule).useOnPressGuildVoiceChannel({searchContext: searchContext});
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (UseSearchMessagesLoadingStateModule).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const binding = env0_3;
const value12 = binding.useMemo(_fun114184, [binding.useCallback(_fun114183, [value7, searchContext]),
binding.useCallback(_fun114182, [value6, searchContext]), binding.useCallback(_fun114181, [value5,
searchContext]), value4, value3, placeholderCount, searchContext]);
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (SeparatorsModule).CardVerticalSeparator;
return ((Component) => <Component data={value12} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(BaseMessagesScreen);
function _fun114181({channelId, messageId}, a1) { // fn#114181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:764, offset: 0x02416c58, size: 90 bytes, params: 3, frame: 17
const value = environment.__proto__;
(BaseMessagesScreenModule).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_3(channelId, messageId);
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114185]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
function _fun114182({channelId, messageId, url, trusted}, a1) { // fn#114182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:910, offset: 0x02416cb2, size: 101 bytes, params: 3, frame: 19
const value = environment.__proto__;
(BaseMessagesScreenModule).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
(0, SearchConstantsModule.SearchListItemTypes)(url, trusted);
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
function _fun114183({channelId, messageId, mentionedChannelId}, a1) { // fn#114183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1072, offset: 0x02416d17, size: 95 bytes, params: 3, frame: 17
const value = environment.__proto__;
(BaseMessagesScreenModule).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
(0, SearchConstantsModule.CARD_ESTIMATED_ITEM_SIZE)(mentionedChannelId);
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'file-or-link-placeholder-' + r9;
object4 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object4.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
function _fun114184() { // fn#114184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1233, offset: 0x02416d76, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object2;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object3;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114185]);
break reducibleJoin2;
}
break reducibleJoin5;
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object2 = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object2.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object2.key = 'file-or-link-placeholder-' + r9;
object3 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object3.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object2.props = object3;
Reflect.apply(push, items2, [object2]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
function _fun114185(a0) { // fn#114185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1274, offset: 0x02416e90, size: 88 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const getLinks = (SearchPlatformUtilsModule).getLinks;
value = Reflect.apply(getLinks, value, [searchContext, a0]);
value.forEach(_fun114186);
env0_1 = env0_1 + value.length;
function _fun114186(a0, a1) { // fn#114186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1317, offset: 0x02416ee8, size: 178 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object = {};
const LINK = SearchListItemTypes.LINK;
object.type = LINK;
const object2 = {data: a0, onPress: onPress_114187, onPressSearchLink: onPressSearchLink,
onPressGuildVoiceChannelMention: onPressGuildVoiceChannelMention};
object2.imageStyle = env2_2;
object2.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object.props = object2;
Reflect.apply(push, binding, [object]);
function onPress_114187(a0) { // fn#114187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1377, offset: 0x024125d0, size: 27 bytes, params: 2, frame: 13
return env3_7(a0, env0_0);
}
function onPressSearchLink(a0) { // fn#114188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1405, offset: 0x024125eb, size: 27 bytes, params: 2, frame: 13
return env3_8(a0, env0_0);
}
function onPressGuildVoiceChannelMention(a0) { // fn#114189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1447, offset: 0x02416f9a, size: 27 bytes, params: 2, frame: 13
return env3_9(a0, env0_0);
}
}
}
}
}
return items2;
}
function _fun114185(a0) { // fn#114185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1274, offset: 0x02416e90, size: 88 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const getLinks = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getLinks;
value = Reflect.apply(getLinks, value, [searchContext, a0]);
value.forEach(_fun114186);
env0_1 = env0_1 + value.length;
}
function _fun114186(a0, a1) { // fn#114186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1317, offset: 0x02416ee8, size: 178 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object3 = {};
const LINK = SearchListItemTypes.LINK;
object3.type = LINK;
const object4 = {data: a0, onPress: onPress_114187, onPressSearchLink: onPressSearchLink,
onPressGuildVoiceChannelMention: onPressGuildVoiceChannelMention};
object4.imageStyle = env2_2;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPressGuildVoiceChannelMention(a0) { // fn#114189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1447, offset: 0x02416f9a, size: 27 bytes, params: 2, frame: 13
return env3_9(a0, env0_0);
}
global.__d(_fun114179, 15093, [31, 9615, 33, 15079, 15084, 15092, 15036, 15085, 15086, 11822, 15090, 15043,
2]) /* metro module 15093, dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15085, 15086, 11822, 15090, 15043, 2] */;
@@ -1,209 +1,219 @@
/* Metro module 15083; source: modules/search/native/components/tabs/pages/messages/MediaScreen.tsx; dependencies: [31, 4792, 9674, 9615, 11823, 661, 33, 15079, 15039, 15084, 15085, 11822, 4007, 9675, 9545, 15036, 13344, 5263, 5074, 15086, 15090, 15043, 2] */
import SearchMessageStore from '../../../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import SearchQueryStore from '../../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import UseSearchMediaSize from '../../../../hooks/useSearchMediaSize.tsx'; /* Metro dependency 15039 */
import BaseMessagesScreen from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NavigationRouteUtilsNativeModule from '../../../../../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchPlatformConstantsModule from '../../../../SearchPlatformConstants.tsx'; /* Metro dependency 11823 */
import * as ExplicitMediaRedactionNativeUtilsModule from '../../../../../../explicit_media_redaction/native/ExplicitMediaRedactionNativeUtils.tsx'; /* Metro dependency 13344 */
import * as UseOnPressSearchItemModule from '../../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as SeparatorsModule from '../../../list/rows/Separators.tsx'; /* Metro dependency 15043 */
import * as UseContentContainerStylesModule from '../../hooks/useContentContainerStyles.tsx'; /* Metro dependency 15079 */
import * as UseSearchMessagesModule from '../../hooks/useSearchMessages.tsx'; /* Metro dependency 15084 */
import * as UseSearchMessagesLoadingStateModule from '../../hooks/useSearchMessagesLoadingState.tsx'; /* Metro dependency 15085 */
function _fun114123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:6, offset: 0x02414baa, size: 280 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.SearchListItemTypes;
const env0_7 = searchConstantsModule.MEDIA_NUM_COLUMNS;
const env0_8 = searchConstantsModule.MEDIA_ITEM_GAP_WIDTH;
const env0_9 = searchConstantsModule.SearchMediaTypes;
const env0_10 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).EMPTY_MEDIA_RESULTS;
const env0_11 = (require(661) /* metro dependency 661: Constants */).MEDIA_MODAL_KEY;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(MediaScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MediaScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MediaScreen.tsx');
exports.default = value;
}
function MediaScreen({searchContext, tab, isFocused, width}) { // fn#114124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:315, offset: 0x02414cc2, size: 493 bytes, params: 2, frame: 32
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (importDefault(15039) /* metro dependency 15039: useSearchMediaSize */)(width);
const value4 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const env0_3 = value4;
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: value3, numColumns: MEDIA_NUM_COLUMNS});
const binding = env0_3;
const value6 = binding.useMemo(_fun114125, [value4, searchContext]);
const value10 = binding.useMemo(_fun114131, [binding.useCallback(_fun114129,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMediaItem({searchContext: searchContext,
allMediaResults: value6, onEndReached: binding.useCallback(_fun114126, [searchContext, tab]),
onEndReachedThreshold: 500}), searchContext, value4]), value6, value3, placeholderCount]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const mediaContentContainer = value2.mediaContentContainer;
const MediaVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator;
return ((Component) => <Component data={value10} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={value3} contentContainerStyle={mediaContentContainer} ItemSeparatorComponent={MediaVerticalSeparator} numColumns={MEDIA_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114125() { // fn#114125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:648, offset: 0x02414eaf, size: 69 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
var value;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
r0 = moduleValue.getMedia(searchContext, env0_3);
} else {
value = environment.__proto__;
r0 = EMPTY_MEDIA_RESULTS;
}
return r0;
}
function _fun114126() { // fn#114126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:710, offset: 0x02414ef4, size: 60 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchNextMessages(searchContext, tab, _fun114127);
}
function _fun114129({media, originView}, a1) { // fn#114129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1200, offset: 0x02415070, size: 248 bytes, params: 3, frame: 18
var object2;
var showAgeVerificationGetStartedModal;
var value;
const r7 = env0_3?.find(function({id}) {
return id === media.messageId;
});
const explicitMediaRedactionNativeUtilsModule = require(13344) /* metro dependency 13344: ExplicitMediaRedactionNativeUtils */;
if (explicitMediaRedactionNativeUtilsModule.shouldAgeVerifyForSearchMedia(media, r7)) {
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
object2 = {};
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SEARCH_MEDIA_PREVIEW;
Reflect.apply(showAgeVerificationGetStartedModal, value, [object2]);
} else {
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: media.channelId, messageId: media.messageId, index: a1});
env0_6(media, originView);
}
}
function _fun114131() { // fn#114131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1581, offset: 0x02415168, size: 295 bytes, params: 1, frame: 26
var environment;
var r9;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var MEDIA_PLACEHOLDER;
var value5;
var HermesInternal;
var concat;
var object4;
var moduleValue2;
var getMediaGridItemStyles;
var length2;
var value6;
const items2 = [];
env0_5.forEach(_fun114132);
const placeholderCountBinding = placeholderCount;
const value2 = 0;
reducibleJoin3: while (true) {
if (!(placeholderCountBinding > value2)) {
break reducibleJoin3;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: MEDIA_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value2 < value4)) {
break reducibleJoin3;
}
r9 = value2;
reducibleLoop2: while (true) {
push = items2.push;
object = {};
MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
object.type = MEDIA_PLACEHOLDER;
value5 = length + r9;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'media-placeholder-' + value5;
object4 = {size: env0_2};
moduleValue2 = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getMediaGridItemStyles = moduleValue2.getMediaGridItemStyles;
length2 = env0_5.length;
object4.containerStyle = Reflect.apply(getMediaGridItemStyles, moduleValue2, [{itemIndex: length + r9,
numItems: length2, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value6 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value6 < value4) {
r9 = value6;
continue reducibleLoop2;
function MediaScreen({searchContext, tab, isFocused, width}) { // fn#114124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:315, offset: 0x02414cc2, size: 493 bytes, params: 2, frame: 32
const value2 = (UseContentContainerStylesModule).useContentContainerStyles();
const value3 = (UseSearchMediaSize)(width);
const value4 = (UseSearchMessagesModule).useSearchMessages(searchContext,
tab);
const env0_3 = value4;
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (UseSearchMessagesLoadingStateModule).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: value3, numColumns: MEDIA_NUM_COLUMNS});
const binding = env0_3;
const value6 = binding.useMemo(_fun114125, [value4, searchContext]);
const value10 = binding.useMemo(_fun114131, [binding.useCallback(_fun114129,
[(UseOnPressSearchItemModule).useOnPressMediaItem({searchContext: searchContext,
allMediaResults: value6, onEndReached: binding.useCallback(_fun114126, [searchContext, tab]),
onEndReachedThreshold: 500}), searchContext, value4]), value6, value3, placeholderCount]);
const mediaContentContainer = value2.mediaContentContainer;
const MediaVerticalSeparator = (SeparatorsModule).MediaVerticalSeparator;
return ((Component) => <Component data={value10} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={value3} contentContainerStyle={mediaContentContainer} ItemSeparatorComponent={MediaVerticalSeparator} numColumns={MEDIA_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(BaseMessagesScreen);
function _fun114125() { // fn#114125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:648, offset: 0x02414eaf, size: 69 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
var value;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
r0 = moduleValue.getMedia(searchContext, env0_3);
} else {
value = environment.__proto__;
r0 = EMPTY_MEDIA_RESULTS;
}
break reducibleJoin3;
return r0;
}
}
return items2;
}
function _fun114127() { // fn#114127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:748, offset: 0x02414f30, size: 221 bytes, params: 1, frame: 19
var environment;
var getSearchResultsQuery;
var value2;
var searchContextBinding;
var value3;
var moduleValue2;
var messages;
let value = environment.__proto__.__proto__;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (navigationRouteUtilsNativeModule.isModalOpen(MEDIA_MODAL_KEY)) {
getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
value2 = environment.__proto__;
searchContextBinding = searchContext;
value3 = Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]);
moduleValue2 = require(9675) /* metro dependency 9675: SearchUtils */;
messages = SearchMessageStore.getMessages(moduleValue2.getSearchTabFetchId(searchContextBinding, tab, value3));
if (messages != null) {
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getMedia(searchContext, messages);
value.forEach(_fun114128);
value = require(9545) /* metro dependency 9545: useMediaViewerSources */;
value.setMediaViewerSources({sources: []});
function _fun114126() { // fn#114126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:710, offset: 0x02414ef4, size: 60 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchNextMessages(searchContext, tab, _fun114127);
function _fun114127() { // fn#114127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:748, offset: 0x02414f30, size: 221 bytes, params: 1, frame: 19
var environment;
var searchQueryStoreBinding;
var getSearchResultsQuery;
var value2;
var searchContextBinding;
var value3;
var moduleValue2;
var messages;
let value = environment.__proto__.__proto__;
if (NavigationRouteUtilsNativeModule.isModalOpen(MEDIA_MODAL_KEY)) {
searchQueryStoreBinding = SearchQueryStore;
getSearchResultsQuery = searchQueryStoreBinding.getSearchResultsQuery;
value2 = environment.__proto__;
searchContextBinding = searchContext;
value3 = Reflect.apply(getSearchResultsQuery, searchQueryStoreBinding, [searchContextBinding]);
moduleValue2 = require(9675) /* metro dependency 9675: SearchUtils */;
messages = SearchMessageStore.getMessages(moduleValue2.getSearchTabFetchId(searchContextBinding, tab, value3));
if (messages != null) {
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getMedia(searchContext, messages);
value.forEach(_fun114128);
value = require(9545) /* metro dependency 9545: useMediaViewerSources */;
value.setMediaViewerSources({sources: []});
}
}
function _fun114128(a0) { // fn#114128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:928, offset: 0x0241500d, size: 99 bytes, params: 2, frame: 13
var binding;
const type = a0.type;
const value = environment.__proto__.__proto__.__proto__;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
if (!(type !== ATTACHMENT && a0.type !== SearchMediaTypes.EMBED && a0.type !== SearchMediaTypes.COMPONENT)) {
binding = env0_0;
binding.push(a0.sources);
}
}
}
}
function _fun114129({media, originView}, a1) { // fn#114129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1200, offset: 0x02415070, size: 248 bytes, params: 3, frame: 18
var object;
var showAgeVerificationGetStartedModal;
var value;
const r7 = env0_3?.find(function({id}) {
return id === media.messageId;
});
if (ExplicitMediaRedactionNativeUtilsModule.shouldAgeVerifyForSearchMedia(media, r7)) {
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
object = {};
object.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SEARCH_MEDIA_PREVIEW;
Reflect.apply(showAgeVerificationGetStartedModal, value, [object]);
} else {
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: media.channelId, messageId: media.messageId, index: a1});
(0, SearchConstantsModule.SearchListItemTypes)(media, originView);
}
}
function _fun114131() { // fn#114131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1581, offset: 0x02415168, size: 295 bytes, params: 1, frame: 26
var environment;
var r9;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object2;
var MEDIA_PLACEHOLDER;
var value5;
var HermesInternal;
var concat;
var object3;
var moduleValue2;
var getMediaGridItemStyles;
var length2;
var value6;
const items2 = [];
env0_5.forEach(_fun114132);
const placeholderCountBinding = placeholderCount;
const value2 = 0;
reducibleJoin3: while (true) {
if (!(placeholderCountBinding > value2)) {
break reducibleJoin3;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: MEDIA_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value2 < value4)) {
break reducibleJoin3;
}
r9 = value2;
reducibleLoop2: while (true) {
push = items2.push;
object2 = {};
MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
object2.type = MEDIA_PLACEHOLDER;
value5 = length + r9;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object2.key = 'media-placeholder-' + value5;
object3 = {size: env0_2};
moduleValue2 = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getMediaGridItemStyles = moduleValue2.getMediaGridItemStyles;
length2 = env0_5.length;
object3.containerStyle = Reflect.apply(getMediaGridItemStyles, moduleValue2, [{itemIndex: length + r9,
numItems: length2, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2}]);
object2.props = object3;
Reflect.apply(push, items2, [object2]);
value6 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value6 < value4) {
r9 = value6;
continue reducibleLoop2;
}
break reducibleJoin3;
}
}
return items2;
function _fun114132(a0, a1) { // fn#114132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1609, offset: 0x0241528f, size: 167 bytes, params: 3, frame: 19
const binding = a1;
const push = binding.push;
const object = {};
const MEDIA = SearchListItemTypes.MEDIA;
object.type = MEDIA;
const object2 = {media: a0};
object2.size = env1_2;
object2.onPress = onPress_114133;
object2.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getMediaGridItemStyles({itemIndex: a1,
numItems: env1_5.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2});
object.props = object2;
Reflect.apply(push, binding, [object]);
function onPress_114133(a0) { // fn#114133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1668, offset: 0x02415336, size: 27 bytes, params: 2, frame: 13
return env2_7(a0, require);
}
}
}
}
}
function _fun114132(a0, a1) { // fn#114132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1609, offset: 0x0241528f, size: 167 bytes, params: 3, frame: 19
const binding = a1;
const push = binding.push;
const object3 = {};
const MEDIA = SearchListItemTypes.MEDIA;
object3.type = MEDIA;
const object4 = {media: a0};
object4.size = env1_2;
object4.onPress = onPress_114133;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getMediaGridItemStyles({itemIndex: a1,
numItems: env1_5.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function _fun114128(a0) { // fn#114128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:928, offset: 0x0241500d, size: 99 bytes, params: 2, frame: 13
var binding;
const type = a0.type;
const value = environment.__proto__.__proto__.__proto__;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
if (!(type !== ATTACHMENT && a0.type !== SearchMediaTypes.EMBED && a0.type !== SearchMediaTypes.COMPONENT)) {
binding = env0_0;
binding.push(a0.sources);
}
}
function onPress_114133(a0) { // fn#114133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1668, offset: 0x02415336, size: 27 bytes, params: 2, frame: 13
return env2_7(a0, require);
}
global.__d(_fun114123, 15083, [31, 4792, 9674, 9615, 11823, 661, 33, 15079, 15039, 15084, 15085, 11822, 4007, 9675,
9545, 15036, 13344, 5263, 5074, 15086, 15090, 15043,
2]) /* metro module 15083, dependencies: [31, 4792, 9674, 9615, 11823, 661, 33, 15079, 15039, 15084, 15085, 11822, 4007, 9675, 9545, 15036, 13344, 5263, 5074, 15086, 15090, 15043, 2] */;
@@ -1,130 +1,141 @@
/* Metro module 15100; source: modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx; dependencies: [31, 9674, 9615, 33, 15084, 566, 15036, 15086, 15101, 15085, 15090, 15079, 15043, 2] */
import SearchQueryStore from '../../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import BaseMessagesScreen from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as UseOnPressSearchItemModule from '../../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as SeparatorsModule from '../../../list/rows/Separators.tsx'; /* Metro dependency 15043 */
import * as UseContentContainerStylesModule from '../../hooks/useContentContainerStyles.tsx'; /* Metro dependency 15079 */
import * as UseSearchMessagesModule from '../../hooks/useSearchMessages.tsx'; /* Metro dependency 15084 */
import * as UseSearchMessagesLoadingStateModule from '../../hooks/useSearchMessagesLoadingState.tsx'; /* Metro dependency 15085 */
import * as BaseMessagesScreenModule from './BaseMessagesScreen.tsx'; /* Metro dependency 15086 */
import * as PlaceholderUtilsModule from '../placeholders/PlaceholderUtils.tsx'; /* Metro dependency 15090 */
function _fun114244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:6, offset: 0x0241952b, size: 250 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_5 = searchConstantsModule.SEARCH_FILTERS_BY_TAB;
const env0_6 = searchConstantsModule.SearchFilter;
const env0_7 = searchConstantsModule.SEARCH_PINNED_MESSAGES_LINE_CLAMP;
const env0_8 = searchConstantsModule.SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
const env0_9 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_10 = searchConstantsModule.SearchListItemTypes;
const env0_11 = searchConstantsModule.MESSAGE_ESTIMATED_ITEM_SIZE;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(MessagesScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx');
exports.default = value;
}
function MessagesScreen({searchContext, tab, isFocused}) { // fn#114245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:366, offset: 0x02419625, size: 545 bytes, params: 2, frame: 28
const value2 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getSearchResultsQuery(searchContext);
}, [searchContext]);
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value4;
let binding = env0_3;
const value5 = binding.useCallback(_fun114247, [value4, searchContext]);
const env0_5 = binding.useRef({});
const property = SEARCH_FILTERS_BY_TAB[tab];
const Pins = SearchFilter.Pins;
const r16 = property === Pins ? SEARCH_PINNED_MESSAGES_LINE_CLAMP : SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
binding = env0_3;
const value6 = binding.useMemo(_fun114248, [r16, value3]);
const {placeholderCount, isFirstPageLoading,
isNextPageLoading} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE, numColumns: 1});
const value8 = binding.useMemo(_fun114249, [value5, r16, value2, value6, placeholderCount]);
const value9 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const BaseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const messagesContentContainer = value9.messagesContentContainer;
const MessageVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MessageVerticalSeparator;
return (
<BaseMessagesScreen
data={value8}
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
estimatedItemSize={MESSAGE_ESTIMATED_ITEM_SIZE}
contentContainerStyle={messagesContentContainer}
ItemSeparatorComponent={MessageVerticalSeparator}
isFirstPageLoading={isFirstPageLoading}
isNextPageLoading={isNextPageLoading}
/>
);
}
function _fun114248() { // fn#114248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:780, offset: 0x02419861, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(15101) /* metro dependency 15101: MessageSearchResultParser */;
const binding = env0_2;
const binding2 = env0_6;
const value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(binding, binding2);
return value instanceof Object ? value : value3;
}
function _fun114249() { // fn#114249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:988, offset: 0x0241989b, size: 181 bytes, params: 1, frame: 17
var r3;
var binding;
var forEach;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
function MessagesScreen({searchContext, tab, isFocused}) { // fn#114245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:366, offset: 0x02419625, size: 545 bytes, params: 2, frame: 28
const value2 = (UseSearchMessagesModule).useSearchMessages(searchContext,
tab);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getSearchResultsQuery(searchContext);
}, [searchContext]);
const value4 = (UseOnPressSearchItemModule).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value4;
let binding = env0_3;
const value5 = binding.useCallback(_fun114247, [value4, searchContext]);
const env0_5 = binding.useRef({});
const property = SEARCH_FILTERS_BY_TAB[tab];
const Pins = SearchFilter.Pins;
const r16 = property === Pins ? SEARCH_PINNED_MESSAGES_LINE_CLAMP : SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
binding = env0_3;
const value6 = binding.useMemo(_fun114248, [r16, value3]);
const {placeholderCount, isFirstPageLoading,
isNextPageLoading} = (UseSearchMessagesLoadingStateModule).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE, numColumns: 1});
const value8 = binding.useMemo(_fun114249, [value5, r16, value2, value6, placeholderCount]);
const value9 = (UseContentContainerStylesModule).useContentContainerStyles();
const messagesContentContainer = value9.messagesContentContainer;
const MessageVerticalSeparator = (SeparatorsModule).MessageVerticalSeparator;
return (
<BaseMessagesScreen
data={value8}
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
estimatedItemSize={MESSAGE_ESTIMATED_ITEM_SIZE}
contentContainerStyle={messagesContentContainer}
ItemSeparatorComponent={MessageVerticalSeparator}
isFirstPageLoading={isFirstPageLoading}
isNextPageLoading={isNextPageLoading}
/>
);
function _fun114247({channelId, messageId}, a1) { // fn#114247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:603, offset: 0x024165ea, size: 90 bytes, params: 3, frame: 17
const value = environment.__proto__;
(BaseMessagesScreenModule).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_3(channelId, messageId);
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114250]);
break reducibleJoin2;
}
const adjustedPlaceholderCount = (require(15090) /* metro dependency 15090: PlaceholderUtils */).getAdjustedPlaceholderCount({numColumns: 1,
numResults: items2.length, placeholderCount: placeholderCount});
const value3 = 0;
if (value3 < adjustedPlaceholderCount) {
r3 = value3;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r3}]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value4 < adjustedPlaceholderCount) {
r3 = value4;
continue reducibleLoop3;
function _fun114248() { // fn#114248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:780, offset: 0x02419861, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(15101) /* metro dependency 15101: MessageSearchResultParser */;
const binding = env0_2;
const value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(binding, SearchConstantsModule.SearchFilter);
return value instanceof Object ? value : value3;
}
function _fun114249() { // fn#114249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:988, offset: 0x0241989b, size: 181 bytes, params: 1, frame: 17
var r3;
var binding;
var forEach;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114250]);
break reducibleJoin2;
}
break reducibleLoop3;
const adjustedPlaceholderCount = (PlaceholderUtilsModule).getAdjustedPlaceholderCount({numColumns: 1,
numResults: items2.length, placeholderCount: placeholderCount});
const value3 = 0;
if (value3 < adjustedPlaceholderCount) {
r3 = value3;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r3}]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value4 < adjustedPlaceholderCount) {
r3 = value4;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
return items2;
function _fun114250(a0, a1) { // fn#114250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1022, offset: 0x02419950, size: 109 bytes, params: 3, frame: 17
const binding = a1;
const push = binding.push;
const object = {};
const MESSAGE = SearchListItemTypes.MESSAGE;
object.type = MESSAGE;
const object2 = {};
object2.message = env1_7.parse(a0);
object2.onPress = onPress_114251;
object2.lineClamp = env1_6;
object2.messageSizeCacheRef = env1_5;
object.props = object2;
Reflect.apply(push, binding, [object]);
function onPress_114251(a0) { // fn#114251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1087, offset: 0x024199bd, size: 27 bytes, params: 2, frame: 13
return env2_4(a0, require);
}
}
}
}
return items2;
}
function _fun114250(a0, a1) { // fn#114250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1022, offset: 0x02419950, size: 109 bytes, params: 3, frame: 17
const binding = a1;
const push = binding.push;
const object3 = {};
const MESSAGE = SearchListItemTypes.MESSAGE;
object3.type = MESSAGE;
const object4 = {};
object4.message = env1_7.parse(a0);
object4.onPress = onPress_114251;
object4.lineClamp = env1_6;
object4.messageSizeCacheRef = env1_5;
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPress_114251(a0) { // fn#114251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1087, offset: 0x024199bd, size: 27 bytes, params: 2, frame: 13
return env2_4(a0, require);
}
global.__d(_fun114244, 15100, [31, 9674, 9615, 33, 15084, 566, 15036, 15086, 15101, 15085, 15090, 15079, 15043,
2]) /* metro module 15100, dependencies: [31, 9674, 9615, 33, 15084, 566, 15036, 15086, 15101, 15085, 15090, 15079, 15043, 2] */;
@@ -1,183 +1,208 @@
/* Metro module 15107; source: modules/search/native/components/tabs/pages/messages/PinsScreen.tsx; dependencies: [31, 11169, 4792, 9674, 9615, 9614, 661, 33, 566, 15040, 11168, 15036, 9673, 15079, 15044, 15043, 15100, 2] */
import SearchMessageStore from '../../../../../SearchMessageStore.tsx'; /* Metro dependency 4792 */
import Tracking from '../../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import SearchQueryStore from '../../../../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
import ChannelPinActionCreators from '../../../../../../../actions/ChannelPinActionCreators.tsx'; /* Metro dependency 11168 */
import ChannelPinsStore from '../../../../../../../stores/ChannelPinsStore.tsx'; /* Metro dependency 11169 */
import SearchList from '../../../list/SearchList.tsx'; /* Metro dependency 15044 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TrackingConstantsModule from '../../../../tracking/TrackingConstants.tsx'; /* Metro dependency 9614 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as ChannelPinsStoreModule from '../../../../../../../stores/ChannelPinsStore.tsx'; /* Metro dependency 11169 */
import * as UseOnPressSearchItemModule from '../../../../hooks/useOnPressSearchItem.tsx'; /* Metro dependency 15036 */
import * as UsePlaceholderStylesModule from '../../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
import * as SeparatorsModule from '../../../list/rows/Separators.tsx'; /* Metro dependency 15043 */
import * as UseContentContainerStylesModule from '../../hooks/useContentContainerStyles.tsx'; /* Metro dependency 15079 */
function _fun115125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:6, offset: 0x02454e0e, size: 326 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelPinsStore = importDefault(11169) /* metro dependency 11169: ChannelPinsStore */;
const env0_5 = (require(11169) /* metro dependency 11169: ChannelPinsStore */).FetchState;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_8 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_9 = searchConstantsModule.SearchListItemTypes;
const env0_10 = searchConstantsModule.SEARCH_PINNED_MESSAGES_LINE_CLAMP;
const env0_11 = searchConstantsModule.MESSAGE_ESTIMATED_ITEM_SIZE;
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_13 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(PinsScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/PinsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/PinsScreen.tsx');
exports.default = value;
}
function InitialPinsScreen({searchContext, isFocused}) { // fn#115126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:376, offset: 0x02454f54, size: 487 bytes, params: 2, frame: 23
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const value3 = (UsePlaceholderStylesModule).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const env0_3 = value3;
env0_3.useEffect(_fun115128, [isFocused, value2, searchContext.channelId]);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelPinsStore],
_fun115129);
const items2 = value4.items;
const showLoading = value4.showLoading;
const value6 = env0_3.useCallback(_fun115130,
[(UseOnPressSearchItemModule).useOnPressMessageItem({searchContext: searchContext}),
searchContext]);
const env0_8 = env0_3.useRef({});
const value7 = env0_3.useMemo(_fun115131, [value3, value6, showLoading, items2]);
const value8 = (UseContentContainerStylesModule).useContentContainerStyles();
object = {contentContainerStyle: value8.messagesContentContainer, data: value7, onEndReached: onEndReached_115134,
estimatedItemSize: MESSAGE_ESTIMATED_ITEM_SIZE};
const MessageVerticalSeparator = (SeparatorsModule).MessageVerticalSeparator;
object.ItemSeparatorComponent = MessageVerticalSeparator;
return <SearchList {...object} />;
function _fun115128() { // fn#115128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:597, offset: 0x02455156, size: 66 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (env0_2 && isFocused) {
value2 = environment.__proto__;
defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
defaultImport.fetchPins(searchContext.channelId);
}
}
function InitialPinsScreen({searchContext, isFocused}) { // fn#115126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:376, offset: 0x02454f54, size: 487 bytes, params: 2, frame: 23
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const env0_3 = value3;
env0_3.useEffect(_fun115128, [isFocused, value2, searchContext.channelId]);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelPinsStore],
_fun115129);
const items2 = value4.items;
const showLoading = value4.showLoading;
const value6 = env0_3.useCallback(_fun115130,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext}),
searchContext]);
const env0_8 = env0_3.useRef({});
const value7 = env0_3.useMemo(_fun115131, [value3, value6, showLoading, items2]);
const value8 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const SearchList = importDefault(15044) /* metro dependency 15044: SearchList */;
object2 = {contentContainerStyle: value8.messagesContentContainer, data: value7, onEndReached: onEndReached,
estimatedItemSize: MESSAGE_ESTIMATED_ITEM_SIZE};
const MessageVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MessageVerticalSeparator;
object2.ItemSeparatorComponent = MessageVerticalSeparator;
return <SearchList {...object2} />;
}
function _fun115129() { // fn#115129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:706, offset: 0x02455198, size: 87 bytes, params: 1, frame: 14
const value = environment.__proto__;
const pins = ChannelPinsStore.getPins(searchContext.channelId);
return {items: pins?.items, showLoading: pins == null || pins.state === FetchState.LOADING};
}
function PinsScreen({searchContext, tab, isFocused}) { // fn#115135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1806, offset: 0x0245540f, size: 233 bytes, params: 2, frame: 21
var r0;
var value;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]])) {
if (searchContext.type === SearchTypes.CHANNEL) {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
} else if (searchContext.type === SearchTypes.GUILD_CHANNEL) {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
} else if (searchContext.type !== SearchTypes.THREAD) {
function _fun115130({channelId, messageId}, a1) { // fn#115130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:916, offset: 0x024551ef, size: 155 bytes, params: 3, frame: 21
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = Tracking;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: a1, entityType: MESSAGE}]);
env0_6(channelId, messageId);
}
function _fun115131() { // fn#115131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1170, offset: 0x0245528a, size: 134 bytes, params: 1, frame: 17
var environment;
var r5;
var forEach;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
let itemsBinding = items;
reducibleJoin2: while (true) {
if (itemsBinding == null) {
break reducibleJoin2;
}
itemsBinding = items;
forEach = itemsBinding.forEach;
Reflect.apply(forEach, itemsBinding, [_fun115132]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!showLoading) {
break reducibleJoin5;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_3)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_3) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
function _fun115132({message}, a1) { // fn#115132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1207, offset: 0x02455310, size: 99 bytes, params: 3, frame: 15
const binding = a1;
const push = binding.push;
const MESSAGE = SearchListItemTypes.MESSAGE;
Reflect.apply(push, binding, [{type: MESSAGE, props: {message: message, onPress: onPress_115133,
lineClamp: SEARCH_PINNED_MESSAGES_LINE_CLAMP, messageSizeCacheRef: env1_8}}]);
function onPress_115133({channelId, messageId}) { // fn#115133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1273, offset: 0x02455373, size: 47 bytes, params: 2, frame: 13
return env2_7({channelId: channelId, messageId: messageId}, require);
}
}
}
function InitialPinsScreenOnEndReached() { // fn#115134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1613, owner: InitialPinsScreen.onEndReached, offset: 0x024553a2, size: 109 bytes, params: 1, frame: 19
var pinnedAt;
var value3;
let value = environment.__proto__;
value = undefined;
const defaultImport = ChannelPinActionCreators;
const fetchPins = defaultImport.fetchPins;
const channelId = searchContext.channelId;
if (items == null) {
pinnedAt = value;
} else {
value3 = items.at(-1);
pinnedAt = value3 == null ? value : value3.pinnedAt;
}
Reflect.apply(fetchPins, defaultImport, [channelId, {before: pinnedAt}]);
return value;
}
}
function PinsScreen({searchContext, tab, isFocused}) { // fn#115135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1806, offset: 0x0245540f, size: 233 bytes, params: 2, frame: 21
var r0;
var value;
const useStateFromStores = FluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, FluxModule, [[SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]])) {
if (searchContext.type === SearchTypes.CHANNEL) {
r0 = (
<InitialPinsScreen
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
/>
);
} else if (searchContext.type === SearchTypes.GUILD_CHANNEL) {
r0 = (
<InitialPinsScreen
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
/>
);
} else if (searchContext.type !== SearchTypes.THREAD) {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
} else {
r0 = (
<InitialPinsScreen
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
/>
);
}
} else {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
} else {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
}
} else {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
return r0;
}
return r0;
}
function _fun115128() { // fn#115128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:597, offset: 0x02455156, size: 66 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (env0_2 && isFocused) {
value2 = environment.__proto__;
defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
defaultImport.fetchPins(searchContext.channelId);
}
}
function _fun115129() { // fn#115129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:706, offset: 0x02455198, size: 87 bytes, params: 1, frame: 14
const value = environment.__proto__;
const pins = ChannelPinsStore.getPins(searchContext.channelId);
return {items: pins?.items, showLoading: pins == null || pins.state === FetchState.LOADING};
}
function _fun115130({channelId, messageId}, a1) { // fn#115130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:916, offset: 0x024551ef, size: 155 bytes, params: 3, frame: 21
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: a1, entityType: MESSAGE}]);
env0_6(channelId, messageId);
}
function _fun115131() { // fn#115131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1170, offset: 0x0245528a, size: 134 bytes, params: 1, frame: 17
var environment;
var r5;
var forEach;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
let itemsBinding = items;
reducibleJoin2: while (true) {
if (itemsBinding == null) {
break reducibleJoin2;
}
itemsBinding = items;
forEach = itemsBinding.forEach;
Reflect.apply(forEach, itemsBinding, [_fun115132]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!showLoading) {
break reducibleJoin5;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_3)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_3) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function InitialPinsScreenOnEndReached() { // fn#115134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1613, owner: InitialPinsScreen.onEndReached, offset: 0x024553a2, size: 109 bytes, params: 1, frame: 19
var pinnedAt;
var value3;
let value = environment.__proto__;
value = undefined;
const defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
const fetchPins = defaultImport.fetchPins;
const channelId = searchContext.channelId;
if (items == null) {
pinnedAt = value;
} else {
value3 = items.at(-1);
pinnedAt = value3 == null ? value : value3.pinnedAt;
}
Reflect.apply(fetchPins, defaultImport, [channelId, {before: pinnedAt}]);
return value;
}
function _fun115132({message}, a1) { // fn#115132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1207, offset: 0x02455310, size: 99 bytes, params: 3, frame: 15
const binding = a1;
const push = binding.push;
const MESSAGE = SearchListItemTypes.MESSAGE;
Reflect.apply(push, binding, [{type: MESSAGE, props: {message: message, onPress: onPress_115133,
lineClamp: SEARCH_PINNED_MESSAGES_LINE_CLAMP, messageSizeCacheRef: env1_8}}]);
}
function onPress_115133({channelId, messageId}) { // fn#115133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1273, offset: 0x02455373, size: 47 bytes, params: 2, frame: 13
return env2_7({channelId: channelId, messageId: messageId}, require);
}
global.__d(_fun115125, 15107, [31, 11169, 4792, 9674, 9615, 9614, 661, 33, 566, 15040, 11168, 15036, 9673, 15079,
15044, 15043, 15100,
2]) /* metro module 15107, dependencies: [31, 11169, 4792, 9674, 9615, 9614, 661, 33, 566, 15040, 11168, 15036, 9673, 15079, 15044, 15043, 15100, 2] */;
@@ -1,84 +1,89 @@
/* Metro module 15087; source: modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx; dependencies: [7, 6, 31, 11822, 6518, 2] */
import ClassCallCheck from '../../../../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import UseInitialValue from '../../../../../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun114148(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:6, offset: 0x02415c1f, size: 165 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = value(SearchFetchPendingManager);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx');
const env0_4 = CreateClass(SearchFetchPendingManager);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx');
exports.useSearchFetchPendingManager = useSearchFetchPendingManager;
}
function SearchFetchPendingManager() { // fn#114149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:131, offset: 0x02415cc4, size: 129 bytes, params: 1, frame: 14
env0_2(this, SearchFetchPendingManager);
const Set = global.Set;
this.pending = new Set();
this.add = add_114150;
this.remove = remove_114151;
this.has = has_114152;
this.flush = flush_114153;
this.reset = reset_114154;
}
function useSearchFetchPendingManager(a0) { // fn#114155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:599, offset: 0x02415e1f, size: 86 bytes, params: 2, frame: 15
const env0_0 = a0;
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun114156);
env0_3.useEffect(_fun114157, [a0, value2]);
return value2;
}
function SearchFetchPendingManagerAdd(a0) { // fn#114150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:232, owner: SearchFetchPendingManager.add, offset: 0x02415d45, size: 30 bytes, params: 2, frame: 11
env0_0.pending.add(a0);
}
function SearchFetchPendingManagerRemove(a0) { // fn#114151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:269, owner: SearchFetchPendingManager.remove, offset: 0x02415d63, size: 30 bytes, params: 2, frame: 11
env0_0.pending.delete(a0);
}
function SearchFetchPendingManagerHas(a0) { // fn#114152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:306, owner: SearchFetchPendingManager.has, offset: 0x02415d81, size: 28 bytes, params: 2, frame: 11
return env0_0.pending.has(a0);
}
function SearchFetchPendingManagerFlush(a0, a1) { // fn#114153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:340, owner: SearchFetchPendingManager.flush, offset: 0x02415d9d, size: 85 bytes, params: 3, frame: 14
var value2;
var defaultImport;
const binding = env0_0;
if (binding.has(a1)) {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (defaultImport.fetchNextMessages(a0, a1)) {
env0_0.remove(a1);
function SearchFetchPendingManager() { // fn#114149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:131, offset: 0x02415cc4, size: 129 bytes, params: 1, frame: 14
ClassCallCheck(this, SearchFetchPendingManager);
const Set = global.Set;
this.pending = new Set();
this.add = add_114150;
this.remove = remove_114151;
this.has = has_114152;
this.flush = flush_114153;
this.reset = reset_114154;
function SearchFetchPendingManagerAdd(a0) { // fn#114150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:232, owner: SearchFetchPendingManager.add, offset: 0x02415d45, size: 30 bytes, params: 2, frame: 11
env0_0.pending.add(a0);
}
function SearchFetchPendingManagerRemove(a0) { // fn#114151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:269, owner: SearchFetchPendingManager.remove, offset: 0x02415d63, size: 30 bytes, params: 2, frame: 11
env0_0.pending.delete(a0);
}
function SearchFetchPendingManagerHas(a0) { // fn#114152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:306, owner: SearchFetchPendingManager.has, offset: 0x02415d81, size: 28 bytes, params: 2, frame: 11
return env0_0.pending.has(a0);
}
function SearchFetchPendingManagerFlush(a0, a1) { // fn#114153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:340, owner: SearchFetchPendingManager.flush, offset: 0x02415d9d, size: 85 bytes, params: 3, frame: 14
var value2;
var defaultImport;
const binding = env0_0;
if (binding.has(a1)) {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (defaultImport.fetchNextMessages(a0, a1)) {
env0_0.remove(a1);
}
}
}
function SearchFetchPendingManagerReset() { // fn#114154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:422, owner: SearchFetchPendingManager.reset, offset: 0x02415df2, size: 45 bytes, params: 1, frame: 10
const binding = env0_0;
const Set = global.Set;
binding.pending = new Set();
}
}
}
function SearchFetchPendingManagerReset() { // fn#114154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:422, owner: SearchFetchPendingManager.reset, offset: 0x02415df2, size: 45 bytes, params: 1, frame: 10
const binding = env0_0;
const Set = global.Set;
binding.pending = new Set();
}
function useSearchFetchPendingManager(a0) { // fn#114155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:599, offset: 0x02415e1f, size: 86 bytes, params: 2, frame: 15
const env0_0 = a0;
const value2 = (UseInitialValue)(_fun114156);
ReactModule.useEffect(_fun114157, [a0, value2]);
return value2;
function _fun114156() { // fn#114156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:655, offset: 0x02415e75, size: 29 bytes, params: 1, frame: 9
let value = environment.__proto__;
const binding = env1_4;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function _fun114156() { // fn#114156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:655, offset: 0x02415e75, size: 29 bytes, params: 1, frame: 9
let value = environment.__proto__;
const binding = env1_4;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function _fun114157() { // fn#114157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:687, offset: 0x02415e92, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, _fun114158);
function _fun114158(a0, a1) { // fn#114158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:726, offset: 0x02415ec9, size: 31 bytes, params: 3, frame: 9
var value;
if (a1 !== a0) {
value = environment.__proto__;
env1_1.reset();
}
}
function _fun114157() { // fn#114157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:687, offset: 0x02415e92, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, _fun114158);
}
}
function _fun114158(a0, a1) { // fn#114158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:726, offset: 0x02415ec9, size: 31 bytes, params: 3, frame: 9
var value;
if (a1 !== a0) {
value = environment.__proto__;
env1_1.reset();
}
}
global.__d(_fun114148, 15087, [7, 6, 31, 11822, 6518,
2]) /* metro module 15087, dependencies: [7, 6, 31, 11822, 6518, 2] */;
@@ -1,55 +1,63 @@
/* Metro module 15088; source: modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx; dependencies: [31, 1949, 9615, 33, 4501, 9673, 6239, 4573, 1244, 2] */
import LocaleStore from '../../../../../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import Tracking from '../../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CardNativeModule from '../../../../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun114159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:6, offset: 0x02415ee8, size: 249 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_HORIZONTAL_PADDING = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = searchConstantsModule.SEARCH_ROW_TAP_STATE_PADDING;
const env0_5 = searchConstantsModule.SearchTabs;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {marginBottom: 16},
const SEARCH_LIST_HORIZONTAL_PADDING = SearchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = SearchConstantsModule.SEARCH_ROW_TAP_STATE_PADDING;
const env0_7 = (CreateStylesModule).createStyles({header: {marginBottom: 16},
headerMessages: {marginHorizontal: SEARCH_LIST_HORIZONTAL_PADDING, marginTop: SEARCH_ROW_TAP_STATE_PADDING}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx');
exports.default = HistoricalIndexingHeader;
function HistoricalIndexingHeader({searchContext, documentsIndexed, tab}) { // fn#114160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:328, offset: 0x02415fe1, size: 322 bytes, params: 2, frame: 21
const styles = useStyles();
const binding = styles;
const value2 = binding.useMemo(_fun114161, [documentsIndexed]);
const value3 = binding.useMemo(function() {
return tab === SearchTabs.MESSAGES ? styles.headerMessages : tab !== SearchTabs.PINS ? undefined : styles.headerMessages;
}, [styles.headerMessages, tab]);
binding.useEffect(_fun114163, [documentsIndexed, searchContext]);
const Card = (CardNativeModule).Card;
const items2 = [styles.header, value3];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Card
variant="primary"
border="subtle"
style={items2}
>
<Text variant="heading-sm/normal" color="interactive-text-default">
{intl.format((IndexNativeModule).t['4Y3O+O'], {count: value2})}
</Text>
</Card>
);
function _fun114161() { // fn#114161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:429, offset: 0x02416123, size: 48 bytes, params: 1, frame: 11
const Number = global.Number;
const value = Number(documentsIndexed);
return value.toLocaleString(LocaleStore.locale);
}
function _fun114163() { // fn#114163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:585, offset: 0x0241618b, size: 68 bytes, params: 1, frame: 14
const value = environment.__proto__;
(Tracking).trackSearchIndexing({searchContext: searchContext,
isHistoricalIndexing: true, documentsIndexed: documentsIndexed});
}
}
}
function HistoricalIndexingHeader({searchContext, documentsIndexed, tab}) { // fn#114160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:328, offset: 0x02415fe1, size: 322 bytes, params: 2, frame: 21
const styles = useStyles();
const binding = styles;
const value2 = binding.useMemo(_fun114161, [documentsIndexed]);
const value3 = binding.useMemo(function() {
return tab === SearchTabs.MESSAGES ? styles.headerMessages : tab !== SearchTabs.PINS ? undefined : styles.headerMessages;
}, [styles.headerMessages, tab]);
binding.useEffect(_fun114163, [documentsIndexed, searchContext]);
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const items2 = [styles.header, value3];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Card
variant="primary"
border="subtle"
style={items2}
>
<Text variant="heading-sm/normal" color="interactive-text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['4Y3O+O'], {count: value2})}
</Text>
</Card>
);
}
function _fun114161() { // fn#114161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:429, offset: 0x02416123, size: 48 bytes, params: 1, frame: 11
const Number = global.Number;
const value = Number(documentsIndexed);
return value.toLocaleString(LocaleStore.locale);
}
function _fun114163() { // fn#114163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:585, offset: 0x0241618b, size: 68 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchIndexing({searchContext: searchContext,
isHistoricalIndexing: true, documentsIndexed: documentsIndexed});
}
global.__d(_fun114159, 15088, [31, 1949, 9615, 33, 4501, 9673, 6239, 4573, 1244,
2]) /* metro module 15088, dependencies: [31, 1949, 9615, 33, 4501, 9673, 6239, 4573, 1244, 2] */;
@@ -1,21 +1,28 @@
/* Metro module 15089; source: modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx; dependencies: [31, 33, 9673, 9675, 15032, 2] */
import Tracking from '../../../../tracking/Tracking.tsx'; /* Metro dependency 9673 */
import ErrorScreen from '../ErrorScreen.tsx'; /* Metro dependency 15032 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SearchUtilsModule from '../../../../../SearchUtils.tsx'; /* Metro dependency 9675 */
function _fun114164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:6, offset: 0x024161cf, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx');
exports.default = SearchIndexingScreen;
function SearchIndexingScreen({searchContext}) { // fn#114165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:126, offset: 0x0241625d, size: 115 bytes, params: 2, frame: 16
ReactModule.useEffect(_fun114166, [searchContext]);
return ((Component) => <Component text={(SearchUtilsModule).getIndexingErrorText(searchContext)} />)(ErrorScreen);
function _fun114166() { // fn#114166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:188, offset: 0x024162d0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Tracking).trackSearchIndexing({searchContext: searchContext});
}
}
}
function SearchIndexingScreen({searchContext}) { // fn#114165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:126, offset: 0x0241625d, size: 115 bytes, params: 2, frame: 16
env0_3.useEffect(_fun114166, [searchContext]);
return ((Component) => <Component text={(require(9675) /* metro dependency 9675: SearchUtils */).getIndexingErrorText(searchContext)} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */);
}
function _fun114166() { // fn#114166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:188, offset: 0x024162d0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchIndexing({searchContext: searchContext});
}
global.__d(_fun114164, 15089, [31, 33, 9673, 9675, 15032,
2]) /* metro module 15089, dependencies: [31, 33, 9673, 9675, 15032, 2] */;
@@ -1,25 +1,37 @@
/* Metro module 15060; source: modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx; dependencies: [31, 33, 15040, 4584, 4017, 15061, 2] */
import ReanimatedRexport from '../../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseFontScaleModule from '../../../../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as UsePlaceholderStylesModule from '../../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
import * as SearchListCardModule from '../../../list/SearchListCard.tsx'; /* Metro dependency 15061 */
function _fun113957(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:6, offset: 0x0240df61, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx');
exports.default = FileOrLinkGridPlaceholderItem;
function FileOrLinkGridPlaceholderItem({imageStyle, containerStyle}) { // fn#113958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:250, offset: 0x0240dfef, size: 235 bytes, params: 2, frame: 21
const value2 = (UsePlaceholderStylesModule).usePlaceholderAnimatedStyle(true);
const value5 = ReactModule.useMemo(_fun113959, [imageStyle.width,
imageStyle.height + 108 * (UseFontScaleModule).useFontScale()]);
const View = (ReanimatedRexport).View;
const items2 = [containerStyle, value2];
const SearchListCardContainer = (SearchListCardModule).SearchListCardContainer;
return (
<View style={items2} pointerEvents="none">
<SearchListCardContainer containerStyle={value5} />
</View>
);
function _fun113959() { // fn#113959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:433, offset: 0x0240e0da, size: 23 bytes, params: 1, frame: 3
return {width: width, height: env0_1};
}
}
}
function FileOrLinkGridPlaceholderItem({imageStyle, containerStyle}) { // fn#113958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:250, offset: 0x0240dfef, size: 235 bytes, params: 2, frame: 21
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const value5 = env0_3.useMemo(_fun113959, [imageStyle.width,
imageStyle.height + 108 * (require(4584) /* metro dependency 4584: useFontScale */).useFontScale()]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [containerStyle, value2];
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
return (
<View style={items2} pointerEvents="none">
<SearchListCardContainer containerStyle={value5} />
</View>
);
}
global.__d(_fun113957, 15060, [31, 33, 15040, 4584, 4017, 15061,
2]) /* metro module 15060, dependencies: [31, 33, 15040, 4584, 4017, 15061, 2] */;
@@ -1,53 +1,61 @@
/* Metro module 15067; source: modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 2] */
import ReanimatedRexport from '../../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as UsePlaceholderStylesModule from '../../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
function _fun113996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:6, offset: 0x0240ff50, size: 468 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;
const SEARCH_ROW_TAP_STATE_PADDING = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_ROW_TAP_STATE_PADDING;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const SEARCH_ROW_TAP_STATE_PADDING = (SearchConstantsModule).SEARCH_ROW_TAP_STATE_PADDING;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.itemContainer = {'flexDirection': 'row', 'paddingHorizontal': 16, 'overflow': 'hidden', 'height': 64,
object = {};
object.itemContainer = {'flexDirection': 'row', 'paddingHorizontal': 16, 'overflow': 'hidden', 'height': 64,
'paddingVertical': null, 'alignItems': 'center', paddingVertical: SEARCH_ROW_TAP_STATE_PADDING};
const object6 = {'height': 48, 'width': 48, 'borderRadius': null, 'marginRight': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const object3 = {'height': 48, 'width': 48, 'borderRadius': null, 'marginRight': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object2.avatar = object6;
object2.innerContainer = {'justifyContent': 'center', 'flex': 1};
const object7 = {'width': '50%', 'borderRadius': null, 'height': 16, 'marginBottom': 8};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.backgroundColor = BORDER_SUBTLE;
object.avatar = object3;
object.innerContainer = {'justifyContent': 'center', 'flex': 1};
const object4 = {'width': '50%', 'borderRadius': null, 'height': 16, 'marginBottom': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.backgroundColor = BORDER_SUBTLE;
object2.upperText = object7;
const object8 = {'justifyContent': 'center', 'width': '100%', 'borderRadius': null, 'height': 16};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.backgroundColor = BORDER_SUBTLE;
object.upperText = object4;
const object5 = {'justifyContent': 'center', 'width': '100%', 'borderRadius': null, 'height': 16};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.backgroundColor = BORDER_SUBTLE;
object2.lowerText = object8;
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx');
object5.backgroundColor = BORDER_SUBTLE;
object.lowerText = object5;
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx');
exports.default = FormRowPlaceholderItem;
function FormRowPlaceholderItem({style}) { // fn#113997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:881, offset: 0x02410124, size: 236 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (UsePlaceholderStylesModule).usePlaceholderAnimatedStyle(true);
const View2 = (ReanimatedRexport).View;
return (
<View2 style={[value2, styles.itemContainer, style]} pointerEvents="none">
<View style={styles.avatar} />
<View style={styles.innerContainer}>
<View style={styles.upperText} />
<View style={styles.lowerText} />
</View>
</View2>
);
}
}
function FormRowPlaceholderItem({style}) { // fn#113997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:881, offset: 0x02410124, size: 236 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[value2, styles.itemContainer, style]} pointerEvents="none">
<View style={styles.avatar} />
<View style={styles.innerContainer}>
<View style={styles.upperText} />
<View style={styles.lowerText} />
</View>
</View2>
);
}
global.__d(_fun113996, 15067, [31, 27, 9615, 33, 4501, 697, 15040, 4017,
2]) /* metro module 15067, dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 2] */;
@@ -1,24 +1,29 @@
/* Metro module 15042; source: modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun113834(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:6, offset: 0x02407af2, size: 257 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'flex': 1, 'borderRadius': null, 'overflow': 'hidden'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'flex': 1, 'borderRadius': null, 'overflow': 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.backgroundColor = BORDER_SUBTLE;
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{imageContainer: object}]);
object2.backgroundColor = BORDER_SUBTLE;
const env0_2 = Reflect.apply(createStyles, CreateStylesModule, [{imageContainer: object2}]);
value = value.memo(_fun113835);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx');
exports.default = value;
function _fun113835({width, height, style}) { // fn#113835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:288, offset: 0x02407bf3, size: 85 bytes, params: 2, frame: 18
const styles = useStyles();
return <View style={[{width: width, height: height}, styles.imageContainer, style]} />;
}
}
function _fun113835({width, height, style}) { // fn#113835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:288, offset: 0x02407bf3, size: 85 bytes, params: 2, frame: 18
const styles = useStyles();
return <View style={[{width: width, height: height}, styles.imageContainer, style]} />;
}
global.__d(_fun113834, 15042, [31, 27, 33, 4501, 697,
2]) /* metro module 15042, dependencies: [31, 27, 33, 4501, 697, 2] */;
@@ -1,12 +1,21 @@
/* Metro module 15041; source: modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 15042, 22, 4573, 1244, 11822, 15043, 2] */
import ReanimatedRexport from '../../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import GridItemPlaceholder from './GridItemPlaceholder.tsx'; /* Metro dependency 15042 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../../../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SearchConstantsModule from '../../../../../SearchConstants.tsx'; /* Metro dependency 9615 */
import * as SearchPlatformUtilsModule from '../../../../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
import * as UsePlaceholderStylesModule from '../../../../hooks/usePlaceholderStyles.tsx'; /* Metro dependency 15040 */
function _fun113827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:6, offset: 0x02407515, size: 403 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
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(9615) /* metro dependency 9615: SearchConstants */;
let value = SearchConstantsModule;
const env0_5 = value.MEDIA_NUM_COLUMNS;
const SEARCH_LIST_SECTION_TOP_PADDING = value.SEARCH_LIST_SECTION_TOP_PADDING;
const env0_6 = value.MEDIA_ITEM_GAP_WIDTH;
@@ -16,100 +25,121 @@ function _fun113827(global, require, importDefault, importAll, module, exports,
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'zIndex': 1, 'position': 'absolute', 'width': '100%'}};
object2.recentsContainer = {position: 'relative', paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING};
object2.row = {flexDirection: 'row'};
object2.section = {'flex': 1, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
object = {container: {'zIndex': 1, 'position': 'absolute', 'width': '100%'}};
object.recentsContainer = {position: 'relative', paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING};
object.row = {flexDirection: 'row'};
object.section = {'flex': 1, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', 'textTransform': 'none', 'paddingTop': null, 'paddingBottom': 8,
paddingTop: SEARCH_LIST_SECTION_TOP_PADDING};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.backgroundColor = BORDER_SUBTLE;
object2.sectionItem = object3;
object2.sectionText = {opacity: 0};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx');
object4.backgroundColor = BORDER_SUBTLE;
object.sectionItem = object4;
object.sectionText = {opacity: 0};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx');
exports.default = MediaGridPlaceholderItem;
exports.RecentsMediaGridPlaceholder = RecentsMediaGridPlaceholder;
}
function MediaGridPlaceholderItem({size, containerStyle}) { // fn#113828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:713, offset: 0x024076a8, size: 148 bytes, params: 2, frame: 20
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[containerStyle, value2]} pointerEvents="none">
{((Component) => <Component height={size} width={size} style={containerStyle} />)(importDefault(15042) /* metro dependency 15042: GridItemPlaceholder */)}
</View>
);
}
function RecentsMediaGridPlaceholder({visible, size, numRows}) { // fn#113829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1084, offset: 0x0240773c, size: 528 bytes, params: 2, frame: 29
const styles = useStyles();
const binding = env0_3;
const value3 = binding.useMemo(_fun113831, [binding.useMemo(function() {
return require(dependencyMap[9]).range(0, numRows * MEDIA_NUM_COLUMNS);
}, [numRows])]);
const value4 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(visible);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container];
items2[1] = styles.recentsContainer;
items2[2] = value4;
let sectionItem = styles.sectionItem;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let sectionText = styles.sectionText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const LBYpDH = (require(1244) /* metro dependency 1244: indexNative */).t.LBYpDH;
let view = <View style={sectionItem}><Text style={sectionText} maxFontSizeMultiplier={2} accessibilityRole="header" variant="text-sm/semibold" color="interactive-text-default">{Reflect.apply(string,
intl, [LBYpDH])}</Text></View>;
sectionItem = styles.sectionItem;
sectionText = styles.sectionText;
string = intl.string;
const LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
view = <View style={styles.section}>{view}<View style={sectionItem}><Text variant="text-sm/semibold" color="text-brand" style={sectionText}>{Reflect.apply(string,
intl, [LFTAUp])}</Text></View></View>;
return (
<View2 style={items2} pointerEvents="none">
{[view, value3.map(_fun113832)]}
</View2>
);
}
function _fun113831() { // fn#113831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1218, offset: 0x02407984, size: 50 bytes, params: 1, frame: 13
const moduleValue = require(22) /* metro dependency 22 */;
return moduleValue.chunk(env0_3, MEDIA_NUM_COLUMNS);
}
function _fun113832(a0, a1) { // fn#113832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1829, offset: 0x024079b6, size: 173 bytes, params: 3, frame: 22
var environment;
const env0_0 = a1;
const value = environment.__proto__;
const Fragment = env1_3.Fragment;
return (
<Fragment key={a1}>
<View style={styles.row}>
{a0.map(_fun113833)}
function MediaGridPlaceholderItem({size, containerStyle}) { // fn#113828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:713, offset: 0x024076a8, size: 148 bytes, params: 2, frame: 20
const value2 = (UsePlaceholderStylesModule).usePlaceholderAnimatedStyle(true);
const View = (ReanimatedRexport).View;
return (
<View style={[containerStyle, value2]} pointerEvents="none">
{((Component) => <Component height={size} width={size} style={containerStyle} />)(GridItemPlaceholder)}
</View>
{a1 < env0_4.length - 1 && ((MediaVerticalSeparator) => <MediaVerticalSeparator />)((require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator)}
</Fragment>
);
}
);
}
function RecentsMediaGridPlaceholder({visible, size, numRows}) { // fn#113829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1084, offset: 0x0240773c, size: 528 bytes, params: 2, frame: 29
const styles = useStyles();
const value3 = ReactModule.useMemo(_fun113831, [ReactModule.useMemo(function() {
return require(dependencyMap[9]).range(0, numRows * MEDIA_NUM_COLUMNS);
}, [numRows])]);
const value4 = (UsePlaceholderStylesModule).usePlaceholderAnimatedStyle(visible);
const View2 = (ReanimatedRexport).View;
const items2 = [styles.container];
items2[1] = styles.recentsContainer;
items2[2] = value4;
let sectionItem = styles.sectionItem;
const Text = (TextModule).Text;
let sectionText = styles.sectionText;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const LBYpDH = (IndexNativeModule).t.LBYpDH;
let view = (
<View style={sectionItem}>
<Text
style={sectionText}
maxFontSizeMultiplier={2}
accessibilityRole="header"
variant="text-sm/semibold"
color="interactive-text-default"
>
{Reflect.apply(string, intl, [LBYpDH])}
</Text>
</View>
);
sectionItem = styles.sectionItem;
sectionText = styles.sectionText;
string = intl.string;
const LFTAUp = (IndexNativeModule).t.LFTAUp;
view = (
<View style={styles.section}>
{view}
<View style={sectionItem}>
<Text
variant="text-sm/semibold"
color="text-brand"
style={sectionText}
>
{Reflect.apply(string, intl, [LFTAUp])}
</Text>
</View>
</View>
);
return (
<View2 style={items2} pointerEvents="none">
{[view, value3.map(_fun113832)]}
</View2>
);
function _fun113831() { // fn#113831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1218, offset: 0x02407984, size: 50 bytes, params: 1, frame: 13
return Module00022Module.chunk(ReactModule, MEDIA_NUM_COLUMNS);
}
function _fun113832(a0, a1) { // fn#113832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1829, offset: 0x024079b6, size: 173 bytes, params: 3, frame: 22
var environment;
const env0_0 = a1;
const value = environment.__proto__;
const Fragment = env1_3.Fragment;
return (
<Fragment key={a1}>
<View style={styles.row}>
{a0.map(_fun113833)}
</View>
{a1 < ReactNativeModule.View.length - 1 && ((MediaVerticalSeparator) => <MediaVerticalSeparator />)((require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator)}
</Fragment>
);
function _fun113833(a0, a1) { // fn#113833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1893, offset: 0x02407a63, size: 143 bytes, params: 3, frame: 22
const sizeBinding = size;
const getMediaGridItemStyles = SearchPlatformUtilsModule.getMediaGridItemStyles;
return (
<GridItemPlaceholder
height={sizeBinding}
width={sizeBinding}
style={Reflect.apply(getMediaGridItemStyles, SearchPlatformUtilsModule,
[{itemIndex: require * MEDIA_NUM_COLUMNS + a1, numItems: env1_3.length, numColumns: MEDIA_NUM_COLUMNS,
spacing: MEDIA_ITEM_GAP_WIDTH}])}
key={a1}
/>
);
}
}
}
function _fun113833(a0, a1) { // fn#113833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1893, offset: 0x02407a63, size: 143 bytes, params: 3, frame: 22
const GridItemPlaceholder = importDefault(15042) /* metro dependency 15042: GridItemPlaceholder */;
const sizeBinding = size;
const searchPlatformUtilsModule = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
const getMediaGridItemStyles = searchPlatformUtilsModule.getMediaGridItemStyles;
return (
<GridItemPlaceholder
height={sizeBinding}
width={sizeBinding}
style={Reflect.apply(getMediaGridItemStyles, searchPlatformUtilsModule,
[{itemIndex: require * MEDIA_NUM_COLUMNS + a1, numItems: env1_3.length, numColumns: MEDIA_NUM_COLUMNS,
spacing: MEDIA_ITEM_GAP_WIDTH}])}
key={a1}
/>
);
}
global.__d(_fun113827, 15041, [31, 27, 9615, 33, 4501, 697, 15040, 4017, 15042, 22, 4573, 1244, 11822, 15043,
2]) /* metro module 15041, dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 15042, 22, 4573, 1244, 11822, 15043, 2] */;
@@ -1,16 +1,23 @@
/* Metro module 15073; source: modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx; dependencies: [31, 33, 4501, 15067, 2] */
import FormRowPlaceholder from './FormRowPlaceholder.tsx'; /* Metro dependency 15067 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun114033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:6, offset: 0x02411b43, size: 172 bytes, params: 8, frame: 20
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({container: {paddingHorizontal: 0}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx');
ReactModule;
const env0_3 = (CreateStylesModule).createStyles({container: {paddingHorizontal: 0}});
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx');
exports.default = MemberRowPlaceholderItem;
function MemberRowPlaceholderItem() { // fn#114034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:301, offset: 0x02411bef, size: 56 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.container} />)(FormRowPlaceholder);
}
}
function MemberRowPlaceholderItem() { // fn#114034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:301, offset: 0x02411bef, size: 56 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.container} />)(importDefault(15067) /* metro dependency 15067: FormRowPlaceholder */);
}
global.__d(_fun114033, 15073, [31, 33, 4501, 15067,
2]) /* metro module 15073, dependencies: [31, 33, 4501, 15067, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 15090; source: modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun114167(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15287:6, offset: 0x02416304, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx');
exports.getAdjustedPlaceholderCount = function({numColumns, numResults, placeholderCount}) {
var value = 0;
return value === placeholderCount ? value : placeholderCount + (numColumns - numResults % numColumns);
};
}
global.__d(_fun114167, 15090, [2]) /* metro module 15090, dependencies: [2] */;