Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,427 @@
|
||||
/* 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] */
|
||||
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) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[15]).useStateFromStores([SearchQueryStore], _fun113573, [a0]);
|
||||
};
|
||||
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 */);
|
||||
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');
|
||||
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']);
|
||||
}
|
||||
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;
|
||||
});
|
||||
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 _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 _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 _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();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* 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] */
|
||||
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},
|
||||
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;
|
||||
const items2 = [START];
|
||||
const END = object2.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])};}'};
|
||||
value = value.memo(SearchBarActivityIcon);
|
||||
(require(2) /* metro dependency 2 */).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
|
||||
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 _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 _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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Metro module 15030; source: modules/search/native/components/layout/SearchScreenLayout.tsx; dependencies: [31, 27, 9674, 33, 4501, 14885, 566, 15031, 15115, 2] */
|
||||
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},
|
||||
visible: {flex: 1}});
|
||||
value = value.memo(_fun113668);
|
||||
(require(2) /* metro dependency 2 */).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 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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/* Metro module 15019; source: modules/search/native/components/layout/SearchScreenSearchBar.tsx; dependencies: [31, 27, 33, 4501, 15020, 15022, 15029, 2] */
|
||||
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',
|
||||
'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');
|
||||
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 */)}
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.headerControlsRight}>
|
||||
{((Component) => <Component searchContext={searchContext} />)(importDefault(15029) /* metro dependency 15029: SearchFilterButton */)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,476 @@
|
||||
/* 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] */
|
||||
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;
|
||||
const env0_16 = [];
|
||||
value = value.memo(AutocompleteScreen);
|
||||
(require(2) /* metro dependency 2 */).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 _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 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;
|
||||
}
|
||||
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 _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;
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}]);
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
id = value13.id;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
/* 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] */
|
||||
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');
|
||||
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 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;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
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};
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Metro module 15029; source: modules/search/native/components/layout/autocomplete/SearchFilterButton.tsx; dependencies: [31, 9614, 33, 15028, 15023, 1357, 8811, 1244, 8341, 13512, 2] */
|
||||
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;
|
||||
value = value.memo(_fun113662);
|
||||
(require(2) /* metro dependency 2 */).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,
|
||||
(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} />;
|
||||
}
|
||||
|
||||
+318
@@ -0,0 +1,318 @@
|
||||
/* 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] */
|
||||
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) {
|
||||
return a0.map(_fun113614).join(' ');
|
||||
};
|
||||
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 = {};
|
||||
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;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object3.borderColor = BORDER_SUBTLE;
|
||||
object3.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}]);
|
||||
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');
|
||||
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 _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 _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 _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 _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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
/* 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] */
|
||||
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 */;
|
||||
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');
|
||||
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 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']);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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 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 _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 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]);
|
||||
}
|
||||
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
/* Metro module 15017; source: modules/search/native/components/layout/autocomplete/useSearchSuggestionsGesture.tsx; dependencies: [31, 4017, 11822, 1585, 477, 5321, 2] */
|
||||
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');
|
||||
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;
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user