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

No files matched your search

@@ -1,45 +1,48 @@
/* Metro module 14163; source: modules/game_community_upsell/native/GameCommunityConfig.tsx; dependencies: [12556, 1360, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GlobalUtilsModule from '../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as LocalAppDetectionTypesModule from '../../local_app_detection/LocalAppDetectionTypes.tsx'; /* Metro dependency 12556 */
function _fun107186(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14360:6, offset: 0x022f69c8, size: 622 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const DetectableAppNames = (require(12556) /* metro dependency 12556: LocalAppDetectionTypes */).DetectableAppNames;
object = {};
const DetectableAppNames = (LocalAppDetectionTypesModule).DetectableAppNames;
const MINECRAFT = DetectableAppNames.MINECRAFT;
object2[MINECRAFT] = '1402418491272986635';
object[MINECRAFT] = '1402418491272986635';
const FORTNITE = DetectableAppNames.FORTNITE;
object2[FORTNITE] = '1402418703554842694';
object[FORTNITE] = '1402418703554842694';
const GENSHIN = DetectableAppNames.GENSHIN;
object2[GENSHIN] = '762434991303950386';
object[GENSHIN] = '762434991303950386';
const PUBG_MOBILE = DetectableAppNames.PUBG_MOBILE;
object2[PUBG_MOBILE] = '1474086506955014275';
object[PUBG_MOBILE] = '1474086506955014275';
const CALL_OF_DUTY_MOBILE = DetectableAppNames.CALL_OF_DUTY_MOBILE;
object2[CALL_OF_DUTY_MOBILE] = '1474087680169082943';
object[CALL_OF_DUTY_MOBILE] = '1474087680169082943';
const CLASH_OF_CLANS = DetectableAppNames.CLASH_OF_CLANS;
object2[CLASH_OF_CLANS] = '1441990808399253575';
object[CLASH_OF_CLANS] = '1441990808399253575';
const MOBILE_LEGENDS_BANG_BANG = DetectableAppNames.MOBILE_LEGENDS_BANG_BANG;
object2[MOBILE_LEGENDS_BANG_BANG] = '1441992389232165056';
object[MOBILE_LEGENDS_BANG_BANG] = '1441992389232165056';
const GARENA_FREE_FIRE = DetectableAppNames.GARENA_FREE_FIRE;
object2[GARENA_FREE_FIRE] = '1407144801089880165';
object[GARENA_FREE_FIRE] = '1407144801089880165';
const POKEMON_GO = DetectableAppNames.POKEMON_GO;
object2[POKEMON_GO] = '1474100461203357870';
object[POKEMON_GO] = '1474100461203357870';
const POKEMON_TCG_POCKET = DetectableAppNames.POKEMON_TCG_POCKET;
object2[POKEMON_TCG_POCKET] = '1474100935126028351';
object[POKEMON_TCG_POCKET] = '1474100935126028351';
const CLASH_ROYALE = DetectableAppNames.CLASH_ROYALE;
object2[CLASH_ROYALE] = '1420796862369239162';
object[CLASH_ROYALE] = '1420796862369239162';
const AMONG_US = DetectableAppNames.AMONG_US;
object2[AMONG_US] = '1402418440685486130';
object[AMONG_US] = '1402418440685486130';
const MONOPOLY_GO = DetectableAppNames.MONOPOLY_GO;
object2[MONOPOLY_GO] = '1474101904765227169';
object[MONOPOLY_GO] = '1474101904765227169';
const BRAWL_STARS = DetectableAppNames.BRAWL_STARS;
object2[BRAWL_STARS] = '1474102260807106581';
object[BRAWL_STARS] = '1474102260807106581';
const BRAWLHALLA = DetectableAppNames.BRAWLHALLA;
object2[BRAWLHALLA] = '356944273133928458';
object[BRAWLHALLA] = '356944273133928458';
const WUTHERING_WAVES = DetectableAppNames.WUTHERING_WAVES;
object2[WUTHERING_WAVES] = '1247227126416146462';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityConfig.tsx');
exports.DETECTABLE_GAME_TO_APPLICATION_ID_MAP = object2;
object[WUTHERING_WAVES] = '1247227126416146462';
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityConfig.tsx');
exports.DETECTABLE_GAME_TO_APPLICATION_ID_MAP = object;
exports.getGameIdsForDetectedGames = function(a0) {
var Object = global.Object;
var value = Object.entries(a0);
@@ -47,79 +50,118 @@ function _fun107186(global, require, importDefault, importAll, module, exports,
value = value.map(_fun107189);
return value.filter(require(dependencyMap[1]).isNotNullish);
};
}
function getGameIdsForDetectedGames(a0) { // fn#107187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14360:1298, offset: 0x022f6c36, size: 101 bytes, params: 2, frame: 13
const Object = global.Object;
let value = Object.entries(a0);
value = value.filter(function(a0) {
var r0;
var r1;
var r2;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
if (value2) {
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
function getGameIdsForDetectedGames(a0) { // fn#107187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14360:1298, offset: 0x022f6c36, size: 101 bytes, params: 2, frame: 13
const Object = global.Object;
let value = Object.entries(a0);
value = value.filter(function(a0) {
var r0;
var r1;
var r2;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
if (value2) {
r0 = value;
r1 = item3;
r2 = value3;
r1 = item2;
r2 = value2;
} else {
r0 = item;
r1 = item3;
r2 = value3;
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r1.return();
}
return r0;
});
value = value.map(_fun107189);
return value.filter((GlobalUtilsModule).isNotNullish);
function _fun107189(a0) { // fn#107189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14360:1388, offset: 0x022f6c9b, size: 60 bytes, params: 2, frame: 7
var r0;
var r2;
var item3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (value2) {
r0 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value;
r0 = item3;
r2 = value;
}
if (!r2) {
r0.return();
}
value = environment.__proto__;
return env1_2[r1];
}
if (!r2) {
r1.return();
}
return r0;
});
value = value.map(_fun107189);
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
}
function _fun107189(a0) { // fn#107189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14360:1388, offset: 0x022f6c9b, size: 60 bytes, params: 2, frame: 7
function _fun107188(a0) { // fn#107188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14360:1370, offset: 0x010997bf, size: 57 bytes, params: 2, frame: 6
var r0;
var r1;
var r2;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (value2) {
r0 = item2;
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value;
r0 = item3;
r2 = value;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r0.return();
r1.return();
}
value = environment.__proto__;
return env1_2[r1];
return r0;
}
global.__d(_fun107186, 14163, [12556, 1360, 2]) /* metro module 14163, dependencies: [12556, 1360, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,358 +1,406 @@
/* Metro module 14738; source: modules/game_community_upsell/native/GameCommunityMultiGuildUpsellModal.tsx; dependencies: [31, 27, 14162, 661, 9604, 33, 4501, 697, 8742, 480, 1485, 566, 6771, 6789, 14739, 8416, 1585, 7701, 12558, 4573, 1244, 14735, 683, 9603, 9611, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import Module09611 from '../../../by-id/module-09611.js'; /* Metro dependency 9611 */
import MobileGameCommunitiesStore from './MobileGameCommunitiesStore.tsx'; /* Metro dependency 14162 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Module01485Module from '../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ClientThemesOverridesModule from '../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as UseTrackImpressionModule from '../../app_analytics/useTrackImpression.tsx'; /* Metro dependency 8742 */
import * as HeaderSharedModule from '../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as MainTabsV2ConstantsModule from '../../main_tabs_v2/native/shared_components/MainTabsV2Constants.tsx'; /* Metro dependency 9604 */
import * as GameCommunityUpsellExperimentModule from './GameCommunityUpsellExperiment.tsx'; /* Metro dependency 12558 */
function _fun111144(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:6, offset: 0x02394bc8, size: 343 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = OneColumnGuildUpsellList;
const closure2 = TwoColumnGuildUpsellList;
const OneColumnGuildUpsellList2 = OneColumnGuildUpsellList;
const TwoColumnGuildUpsellList2 = TwoColumnGuildUpsellList;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const mobileGameCommunitiesStore = importDefault(14162) /* metro dependency 14162: MobileGameCommunitiesStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIN_HEADER_HEIGHT;
const value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun111157);
const env0_11 = (CreateStylesModule).createStyles(_fun111157);
const env0_12 = {'itemVisiblePercentThreshold': 50, 'minimumViewTime': 500};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityMultiGuildUpsellModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityMultiGuildUpsellModal.tsx');
exports.default = GameCommunityMultiGuildUpsellModal;
exports.OneColumnGuildUpsellList = closure;
exports.TwoColumnGuildUpsellList = closure2;
}
exports.OneColumnGuildUpsellList = OneColumnGuildUpsellList2;
exports.TwoColumnGuildUpsellList = TwoColumnGuildUpsellList2;
function OneColumnGuildUpsellList({suggestedGuilds, contentContainerStyle, subheader, onDismiss, bottomPadding}) { // fn#111145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1673, offset: 0x02394d1f, size: 351 bytes, params: 2, frame: 26
bottomPadding = bottomPadding === undefined ? 0 : bottomPadding;
const value2 = ReactModule.useCallback(function(a0) {
return a0.id;
}, []);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MobileGameCommunitiesStore],
function() {
return MobileGameCommunitiesStore.getGuildGameIds();
});
const defaultImport = UseAnalyticsLocations;
const GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT = (AnalyticsLocation).GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT;
const analyticsLocations = defaultImport(GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT).analyticsLocations;
const value4 = ReactModule.useCallback(_fun111148, [onDismiss, value3]);
const value5 = useOnViewableItemsChanged(value3, 'one-column', analyticsLocations);
const value6 = ReactModule.useMemo(function() {
return {paddingBottom: bottomPadding};
}, [bottomPadding]);
const FlashList = (FlashListModule).FlashList;
return (
<FlashList
onViewableItemsChanged={value5}
viewabilityConfig={env0_12}
contentContainerStyle={contentContainerStyle}
keyExtractor={value2}
data={suggestedGuilds}
ListHeaderComponent={subheader}
renderItem={value4}
estimatedItemSize={390}
ListFooterComponentStyle={value6}
/>
);
function _fun111148({item}) { // fn#111148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2008, offset: 0x02394e91, size: 119 bytes, params: 2, frame: 20
return ((Component) => <Component guild={item} gameId={env0_2[item.id]} variant="one-column" onDismiss={env0_2[item.id] != null ? onDismiss : null} key={item.id} />)(importDefault(14739) /* metro dependency 14739: GameCommunityMultiGuildUpsellCard */);
}
function OneColumnGuildUpsellList({suggestedGuilds, contentContainerStyle, subheader, onDismiss, bottomPadding}) { // fn#111145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1673, offset: 0x02394d1f, size: 351 bytes, params: 2, frame: 26
bottomPadding = bottomPadding === undefined ? 0 : bottomPadding;
const value2 = env0_4.useCallback(function(a0) {
return a0.id;
}, []);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MobileGameCommunitiesStore],
function() {
return MobileGameCommunitiesStore.getGuildGameIds();
});
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT;
const analyticsLocations = defaultImport(GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT).analyticsLocations;
const value4 = env0_4.useCallback(_fun111148, [onDismiss, value3]);
const value5 = useOnViewableItemsChanged(value3, 'one-column', analyticsLocations);
const value6 = env0_4.useMemo(function() {
return {paddingBottom: bottomPadding};
}, [bottomPadding]);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
return (
<FlashList
onViewableItemsChanged={value5}
viewabilityConfig={env0_12}
contentContainerStyle={contentContainerStyle}
keyExtractor={value2}
data={suggestedGuilds}
ListHeaderComponent={subheader}
renderItem={value4}
estimatedItemSize={390}
ListFooterComponentStyle={value6}
/>
);
}
}
function TwoColumnGuildUpsellList({suggestedGuilds, contentContainerStyle, rowStyle, subheader, onDismiss, bottomPadding}) { // fn#111150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2434, offset: 0x02394f18, size: 396 bytes, params: 2, frame: 27
bottomPadding = bottomPadding === undefined ? 0 : bottomPadding;
let env0_4 = undefined;
let value2 = env0_4.useMemo(function() {
return suggestedGuilds.reduce(_fun111152, []);
}, [suggestedGuilds]);
const value3 = env0_4.useCallback(function(a0) {
var r5;
var property = a0.left;
var value = undefined;
r5 = property == null ? value : property.id;
var value2 = '';
var r3 = r5 ?? value2;
property = a0.right;
return value2 + r3 + '-' + ((property == null ? value : property.id) ?? value2);
}, []);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MobileGameCommunitiesStore],
function() {
return MobileGameCommunitiesStore.getGuildGameIds();
});
env0_4 = value4;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT;
const value5 = useOnViewableItemsChanged(value4, 'two-column',
defaultImport(GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT).analyticsLocations);
const value6 = env0_4.useMemo(function() {
return {paddingBottom: bottomPadding};
}, [bottomPadding]);
const value7 = env0_4.useCallback(_fun111156, [rowStyle, onDismiss, value4]);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
return (
<FlashList
onViewableItemsChanged={value5}
viewabilityConfig={env0_12}
contentContainerStyle={contentContainerStyle}
keyExtractor={value3}
data={value2}
ListHeaderComponent={subheader}
renderItem={value7}
estimatedItemSize={250}
ListFooterComponentStyle={value6}
/>
);
}
function TwoColumnGuildUpsellList({suggestedGuilds, contentContainerStyle, rowStyle, subheader, onDismiss, bottomPadding}) { // fn#111150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2434, offset: 0x02394f18, size: 396 bytes, params: 2, frame: 27
bottomPadding = bottomPadding === undefined ? 0 : bottomPadding;
let env0_4 = undefined;
let value2 = env0_4.useMemo(function() {
return suggestedGuilds.reduce(_fun111152, []);
}, [suggestedGuilds]);
const value3 = env0_4.useCallback(function(a0) {
var r5;
var property = a0.left;
var value = undefined;
r5 = property == null ? value : property.id;
var value2 = '';
var r3 = r5 ?? value2;
property = a0.right;
return value2 + r3 + '-' + ((property == null ? value : property.id) ?? value2);
}, []);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MobileGameCommunitiesStore],
function() {
return MobileGameCommunitiesStore.getGuildGameIds();
});
env0_4 = value4;
const defaultImport = UseAnalyticsLocations;
const GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT = (AnalyticsLocation).GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT;
const value5 = useOnViewableItemsChanged(value4, 'two-column',
defaultImport(GAME_COMMUNITY_MULTI_GUILD_UPSELL_GUILDS_BAR_ENTRYPOINT).analyticsLocations);
const value6 = env0_4.useMemo(function() {
return {paddingBottom: bottomPadding};
}, [bottomPadding]);
const value7 = env0_4.useCallback(_fun111156, [rowStyle, onDismiss, value4]);
const FlashList = (FlashListModule).FlashList;
return (
<FlashList
onViewableItemsChanged={value5}
viewabilityConfig={env0_12}
contentContainerStyle={contentContainerStyle}
keyExtractor={value3}
data={value2}
ListHeaderComponent={subheader}
renderItem={value7}
estimatedItemSize={250}
ListFooterComponentStyle={value6}
/>
);
function _fun111151() { // fn#111151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2583, offset: 0x023950a4, size: 34 bytes, params: 1, frame: 13
return suggestedGuilds.reduce(_fun111152, []);
function _fun111152(a0, a1, a2) { // fn#111152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2597, offset: 0x023950c6, size: 62 bytes, params: 4, frame: 14
var push;
var value;
if (a2 % 2 === 0) {
push = a0.push;
value = environment.__proto__;
Reflect.apply(push, a0, [{left: a1, right: suggestedGuilds[a2 + 1]}]);
}
return a0;
}
function _fun111157(a0, a1) { // fn#111157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:235, offset: 0x023952fd, size: 337 bytes, params: 3, frame: 18
const object2 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 0};
object5.paddingTop = a1;
object5.minHeight = a1 + MIN_HEADER_HEIGHT;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingHorizontal = PX_8;
object2.headerWrapper = object5;
object2.headerTitle = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center'};
const object6 = {alignSelf: 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.marginHorizontal = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.marginBottom = PX_24;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.marginTop = PX_8;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
object6.textAlign = 'center';
object2.subtitle = object6;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.listContent = {paddingHorizontal: PX_16, paddingBottom: a0};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.twoColumnRow = {'flexDirection': 'row', 'gap': null, 'flex': 1, gap: PX_16};
return object2;
}
}
function trackImpressionForCard({current}, a1, a2, a3, a4) { // fn#111158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:927, offset: 0x0239544e, size: 158 bytes, params: 6, frame: 17
current.add(a1.id);
const useTrackImpressionModule = require(8742) /* metro dependency 8742: useTrackImpression */;
const trackImpression = useTrackImpressionModule.trackImpression;
const object2 = {};
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const PANE = ImpressionTypes.PANE;
object2.type = PANE;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD = ImpressionNames.GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD;
object2.name = GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD;
object2.properties = {game_id: a2, guild_id: a1.id, location_stack: a4, variant: a3};
Reflect.apply(trackImpression, useTrackImpressionModule, [object2]);
}
function _fun111156({item}) { // fn#111156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:3070, offset: 0x02395177, size: 390 bytes, params: 2, frame: 25
var r5;
var binding;
var GameCommunityMultiGuildUpsellCard;
var object2;
var GameCommunityMultiGuildUpsellCard2;
var object4;
let left = item.left;
let value = null;
const r14 = value != (value == left ? undefined : left.id) && value != env0_4[item.left.id];
let right = item.right;
const r11 = value != (value == right ? undefined : right.id) && value != env0_4[item.right.id];
const rowStyleBinding = rowStyle;
const value11 = value != item.left;
if (value11) {
GameCommunityMultiGuildUpsellCard = importDefault(14739) /* metro dependency 14739: GameCommunityMultiGuildUpsellCard */;
object2 = {};
left = item.left;
object2.guild = left;
binding = env0_4;
left = item.left;
object2.gameId = binding[left.id];
object2.variant = 'two-column';
object2.onDismiss = r14 ? onDismiss : value;
r5 = <GameCommunityMultiGuildUpsellCard {...object2} />;
} else {
r5 = value11;
}
const items2 = [r5];
right = item.right;
if (value != right) {
GameCommunityMultiGuildUpsellCard2 = importDefault(14739) /* metro dependency 14739: GameCommunityMultiGuildUpsellCard */;
object4 = {};
right = item.right;
object4.guild = right;
binding = env0_4;
right = item.right;
object4.gameId = binding[right.id];
object4.variant = 'two-column';
object4.onDismiss = r11 ? onDismiss : value;
value = <GameCommunityMultiGuildUpsellCard2 {...object4} />;
r5 = value;
} else {
r5 = <View style={{flex: 1}} />;
}
items2[1] = r5;
return (
<View style={rowStyleBinding}>
{items2}
</View>
);
}
function useOnViewableItemsChanged(a0, a1, a2) { // fn#111159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1181, offset: 0x023954ec, size: 171 bytes, params: 4, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let binding = env0_4;
const useRef = binding.useRef;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const env0_3 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value2]);
const moduleValue = require(1485) /* metro dependency 1485 */;
const useFocusEffect = moduleValue.useFocusEffect;
binding = env0_4;
const useCallback = binding.useCallback;
Reflect.apply(useFocusEffect, moduleValue, [Reflect.apply(useCallback, binding, [_fun111160, []])]);
return env0_4.useCallback(function({viewableItems}) {
viewableItems.forEach(_fun111162);
}, [a0, a2, a1]);
}
}
function GameCommunityMultiGuildUpsellModal({onClose}) { // fn#111163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:3807, offset: 0x0239572a, size: 821 bytes, params: 2, frame: 35
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
const styles = useStyles(bottom, top);
const GameCommunityUpsellMultiExperiment = (require(12558) /* metro dependency 12558: GameCommunityUpsellExperiment */).GameCommunityUpsellMultiExperiment;
const useConfig = GameCommunityUpsellMultiExperiment.useConfig;
const visualVariant = Reflect.apply(useConfig, GameCommunityUpsellMultiExperiment,
[{location: 'GameCommunityMultiGuildUpsellModal'}]).visualVariant;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([MobileGameCommunitiesStore],
function() {
return MobileGameCommunitiesStore.getPresentableUpsellGuilds();
});
const value5 = env0_4.useMemo(_fun111165, [styles.headerWrapper, value3]);
const value6 = env0_4.useMemo(_fun111166, [styles.subtitle]);
const value7 = env0_4.useCallback(function(a0, a1) {
importAll(dependencyMap[21]).dismissGuild(a0);
var defaultImport = importDefault(dependencyMap[22]);
var GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED = AnalyticEvents.GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED;
defaultImport.track(GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED, {game_id: a1, guild_id: a0,
variant: visualVariant});
}, [visualVariant]);
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
const object = {source: importDefault(9611) /* metro dependency 9611 */, onPress: onClose};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
const items2 = [<HeaderIconButton {...object} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.headerTitle}><Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['fs+2Kn'])}</Text></View>;
items2[2] = <View style={{width: 40}} />;
return (
<View style={styles.container}>
<View style={value5}>
{items2}
function _fun111157(a0, a1) { // fn#111157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:235, offset: 0x023952fd, size: 337 bytes, params: 3, frame: 18
const object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 0};
object3.paddingTop = a1;
object3.minHeight = a1 + MIN_HEADER_HEIGHT;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.paddingHorizontal = PX_8;
object.headerWrapper = object3;
object.headerTitle = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center'};
const object4 = {alignSelf: 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginHorizontal = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginTop = PX_8;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.textAlign = 'center';
object.subtitle = object4;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.listContent = {paddingHorizontal: PX_16, paddingBottom: a0};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.twoColumnRow = {'flexDirection': 'row', 'gap': null, 'flex': 1, gap: PX_16};
return object;
}
function trackImpressionForCard({current}, a1, a2, a3, a4) { // fn#111158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:927, offset: 0x0239544e, size: 158 bytes, params: 6, frame: 17
current.add(a1.id);
const trackImpression = UseTrackImpressionModule.trackImpression;
const object = {};
const ImpressionTypes = (AnalyticsUtilsModule).ImpressionTypes;
const PANE = ImpressionTypes.PANE;
object.type = PANE;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD = ImpressionNames.GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD;
object.name = GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD;
object.properties = {game_id: a2, guild_id: a1.id, location_stack: a4, variant: a3};
Reflect.apply(trackImpression, UseTrackImpressionModule, [object]);
}
function useOnViewableItemsChanged(a0, a1, a2) { // fn#111159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1181, offset: 0x023954ec, size: 171 bytes, params: 4, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let binding = ReactModule;
const useRef = binding.useRef;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const env0_3 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value2]);
const useFocusEffect = Module01485Module.useFocusEffect;
binding = ReactModule;
const useCallback = binding.useCallback;
Reflect.apply(useFocusEffect, Module01485Module, [Reflect.apply(useCallback, binding, [_fun111160, []])]);
return ReactModule.useCallback(function({viewableItems}) {
viewableItems.forEach(_fun111162);
}, [a0, a2, a1]);
function _fun111160() { // fn#111160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1261, offset: 0x02395597, size: 26 bytes, params: 1, frame: 9
env0_3.current.clear();
}
function _fun111161({viewableItems}) { // fn#111161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1306, offset: 0x023955b1, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun111162);
function _fun111162({item}) { // fn#111162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1339, offset: 0x023955d1, size: 345 bytes, params: 2, frame: 21
var r0;
var value;
var current;
var trackImpressionForCardBinding;
if (item != null) {
value = 'left' in item;
r0 = value && item.left != null;
if (r0) {
value = environment.__proto__;
current = env1_3.current;
value = !current.has(item.left.id);
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
trackImpressionForCardBinding = trackImpressionForCard;
value = environment.__proto__;
trackImpressionForCardBinding(env1_3, item.left, env1_0[item.left.id], require, importDefault);
}
value = 'right' in item;
r0 = value && item.right != null;
if (r0) {
value = environment.__proto__;
current = env1_3.current;
value = !current.has(item.right.id);
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
trackImpressionForCardBinding = trackImpressionForCard;
value = environment.__proto__;
trackImpressionForCardBinding(env1_3, item.right, env1_0[item.right.id], require, importDefault);
}
value = 'id' in item;
r0 = value && item.id != null;
if (r0) {
value = environment.__proto__;
current = env1_3.current;
value = !current.has(item.id);
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
trackImpressionForCardBinding = trackImpressionForCard;
value = environment.__proto__;
trackImpressionForCardBinding(env1_3, item, env1_0[item.id], require, importDefault);
}
}
}
}
}
function GameCommunityMultiGuildUpsellModal({onClose}) { // fn#111163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:3807, offset: 0x0239572a, size: 821 bytes, params: 2, frame: 35
const {top, bottom} = (UseSafeAreaInsetsNative)();
const value3 = (ClientThemesOverridesModule).useGradientTop();
const styles = useStyles(bottom, top);
const GameCommunityUpsellMultiExperiment = (GameCommunityUpsellExperimentModule).GameCommunityUpsellMultiExperiment;
const useConfig = GameCommunityUpsellMultiExperiment.useConfig;
const visualVariant = Reflect.apply(useConfig, GameCommunityUpsellMultiExperiment,
[{location: 'GameCommunityMultiGuildUpsellModal'}]).visualVariant;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([MobileGameCommunitiesStore],
function() {
return MobileGameCommunitiesStore.getPresentableUpsellGuilds();
});
const value5 = ReactModule.useMemo(_fun111165, [styles.headerWrapper, value3]);
const value6 = ReactModule.useMemo(_fun111166, [styles.subtitle]);
const value7 = ReactModule.useCallback(function(a0, a1) {
importAll(dependencyMap[21]).dismissGuild(a0);
var defaultImport = importDefault(dependencyMap[22]);
var GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED = AnalyticEvents.GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED;
defaultImport.track(GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED, {game_id: a1, guild_id: a0,
variant: visualVariant});
}, [visualVariant]);
const HeaderIconButton = (HeaderSharedModule).HeaderIconButton;
const object2 = {source: Module09611, onPress: onClose};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
const items2 = [
<HeaderIconButton {...object2} />,
];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.headerTitle}>
<Text
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['fs+2Kn'])}
</Text>
</View>
<View style={{flex: 1}}>
{visualVariant !== 'one-column' ? null : <OneColumnGuildUpsellList suggestedGuilds={value4.slice(0,
8)} contentContainerStyle={styles.listContent} subheader={value6} onDismiss={value7} />}
{visualVariant !== 'two-column' ? null : <TwoColumnGuildUpsellList suggestedGuilds={value4.slice(0,
20)} contentContainerStyle={styles.listContent} rowStyle={styles.twoColumnRow} subheader={value6} onDismiss={value7} />}
);
items2[2] = <View style={{width: 40}} />;
return (
<View style={styles.container}>
<View style={value5}>
{items2}
</View>
<View style={{flex: 1}}>
{
visualVariant !== 'one-column'
? null
: (
<OneColumnGuildUpsellList
suggestedGuilds={value4.slice(0, 8)}
contentContainerStyle={styles.listContent}
subheader={value6}
onDismiss={value7}
/>
)
}
{
visualVariant !== 'two-column'
? null
: (
<TwoColumnGuildUpsellList
suggestedGuilds={value4.slice(0, 20)}
contentContainerStyle={styles.listContent}
rowStyle={styles.twoColumnRow}
subheader={value6}
onDismiss={value7}
/>
)
}
</View>
</View>
</View>
);
}
);
function _fun111165() { // fn#111165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:4146, offset: 0x02395a72, size: 31 bytes, params: 1, frame: 3
return [styles.headerWrapper, env0_0];
}
function _fun111148({item}) { // fn#111148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2008, offset: 0x02394e91, size: 119 bytes, params: 2, frame: 20
return ((Component) => <Component guild={item} gameId={env0_2[item.id]} variant="one-column" onDismiss={env0_2[item.id] != null ? onDismiss : null} key={item.id} />)(importDefault(14739) /* metro dependency 14739: GameCommunityMultiGuildUpsellCard */);
}
function _fun111166() { // fn#111166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:4205, offset: 0x02395a91, size: 126 bytes, params: 1, frame: 18
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.subtitle}
>
{intl.string((IndexNativeModule).t['PH+G/A'])}
</Text>
);
}
function _fun111151() { // fn#111151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2583, offset: 0x023950a4, size: 34 bytes, params: 1, frame: 13
return suggestedGuilds.reduce(_fun111152, []);
}
function _fun111156({item}) { // fn#111156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:3070, offset: 0x02395177, size: 390 bytes, params: 2, frame: 25
var r5;
var binding;
var GameCommunityMultiGuildUpsellCard;
var object;
var GameCommunityMultiGuildUpsellCard2;
var object3;
let left = item.left;
let value = null;
const r14 = value != (value == left ? undefined : left.id) && value != env0_4[item.left.id];
let right = item.right;
const r11 = value != (value == right ? undefined : right.id) && value != env0_4[item.right.id];
const rowStyleBinding = rowStyle;
const value11 = value != item.left;
if (value11) {
GameCommunityMultiGuildUpsellCard = importDefault(14739) /* metro dependency 14739: GameCommunityMultiGuildUpsellCard */;
object = {};
left = item.left;
object.guild = left;
binding = env0_4;
left = item.left;
object.gameId = binding[left.id];
object.variant = 'two-column';
object.onDismiss = r14 ? onDismiss : value;
r5 = <GameCommunityMultiGuildUpsellCard {...object} />;
} else {
r5 = value11;
}
const items2 = [r5];
right = item.right;
if (value != right) {
GameCommunityMultiGuildUpsellCard2 = importDefault(14739) /* metro dependency 14739: GameCommunityMultiGuildUpsellCard */;
object3 = {};
right = item.right;
object3.guild = right;
binding = env0_4;
right = item.right;
object3.gameId = binding[right.id];
object3.variant = 'two-column';
object3.onDismiss = r11 ? onDismiss : value;
value = <GameCommunityMultiGuildUpsellCard2 {...object3} />;
r5 = value;
} else {
r5 = <View style={{flex: 1}} />;
}
items2[1] = r5;
return (
<View style={rowStyleBinding}>
{items2}
</View>
);
}
function _fun111160() { // fn#111160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1261, offset: 0x02395597, size: 26 bytes, params: 1, frame: 9
env0_3.current.clear();
}
function _fun111161({viewableItems}) { // fn#111161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1306, offset: 0x023955b1, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun111162);
}
function _fun111165() { // fn#111165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:4146, offset: 0x02395a72, size: 31 bytes, params: 1, frame: 3
return [styles.headerWrapper, env0_0];
}
function _fun111166() { // fn#111166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:4205, offset: 0x02395a91, size: 126 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.subtitle}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PH+G/A'])}
</Text>
);
}
function _fun111152(a0, a1, a2) { // fn#111152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:2597, offset: 0x023950c6, size: 62 bytes, params: 4, frame: 14
var push;
var value;
if (a2 % 2 === 0) {
push = a0.push;
value = environment.__proto__;
Reflect.apply(push, a0, [{left: a1, right: suggestedGuilds[a2 + 1]}]);
}
return a0;
}
function _fun111162({item}) { // fn#111162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14935:1339, offset: 0x023955d1, size: 345 bytes, params: 2, frame: 21
var r0;
var value;
var current;
var trackImpressionForCardBinding;
if (item != null) {
value = 'left' in item;
r0 = value && item.left != null;
if (r0) {
value = environment.__proto__;
current = env1_3.current;
value = !current.has(item.left.id);
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
trackImpressionForCardBinding = trackImpressionForCard;
value = environment.__proto__;
trackImpressionForCardBinding(env1_3, item.left, env1_0[item.left.id], require, importDefault);
}
value = 'right' in item;
r0 = value && item.right != null;
if (r0) {
value = environment.__proto__;
current = env1_3.current;
value = !current.has(item.right.id);
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
trackImpressionForCardBinding = trackImpressionForCard;
value = environment.__proto__;
trackImpressionForCardBinding(env1_3, item.right, env1_0[item.right.id], require, importDefault);
}
value = 'id' in item;
r0 = value && item.id != null;
if (r0) {
value = environment.__proto__;
current = env1_3.current;
value = !current.has(item.id);
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
trackImpressionForCardBinding = trackImpressionForCard;
value = environment.__proto__;
trackImpressionForCardBinding(env1_3, item, env1_0[item.id], require, importDefault);
}
}
}
global.__d(_fun111144, 14738, [31, 27, 14162, 661, 9604, 33, 4501, 697, 8742, 480, 1485, 566, 6771, 6789, 14739,
8416, 1585, 7701, 12558, 4573, 1244, 14735, 683, 9603, 9611,
2]) /* metro module 14738, dependencies: [31, 27, 14162, 661, 9604, 33, 4501, 697, 8742, 480, 1485, 566, 6771, 6789, 14739, 8416, 1585, 7701, 12558, 4573, 1244, 14735, 683, 9603, 9611, 2] */;
@@ -1,192 +1,277 @@
/* Metro module 14161; source: modules/game_community_upsell/native/GameCommunityUpsellDevTools.tsx; dependencies: [31, 27, 12555, 14162, 33, 4501, 697, 566, 14163, 12557, 12556, 6231, 6238, 13127, 6243, 1362, 1365, 12715, 2] */
import LocalAppDetectionStore from '../../local_app_detection/native/LocalAppDetectionStore.tsx'; /* Metro dependency 12555 */
import MobileGameCommunitiesStore from './MobileGameCommunitiesStore.tsx'; /* Metro dependency 14162 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableRowArrowNativeModule from '../../../design/components/TableRow/native/TableRowArrow.native.tsx'; /* Metro dependency 6243 */
import * as LocalAppDetectionTypesModule from '../../local_app_detection/LocalAppDetectionTypes.tsx'; /* Metro dependency 12556 */
import * as DismissibleContentFrameworkActionCreatorsModule from '../../dismissible_content/DismissibleContentFrameworkActionCreators.tsx'; /* Metro dependency 12715 */
import * as RefreshIconModule from '../../../design/components/Icon/native/redesign/generated/RefreshIcon.tsx'; /* Metro dependency 13127 */
import * as GameCommunityConfigModule from './GameCommunityConfig.tsx'; /* Metro dependency 14163 */
function _fun107148(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:6, offset: 0x022f566c, size: 375 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
const localAppDetectionStore = importDefault(12555) /* metro dependency 12555: LocalAppDetectionStore */;
const mobileGameCommunitiesStore = importDefault(14162) /* metro dependency 14162: MobileGameCommunitiesStore */;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object2.scrollView = {flex: 1};
const object3 = {};
object.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object.scrollView = {flex: 1};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingTop = PX_16;
object4.paddingTop = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.paddingBottom = PX_8;
object2.section = object3;
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityUpsellDevTools.tsx');
object4.paddingBottom = PX_8;
object.section = object4;
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityUpsellDevTools.tsx');
exports.default = GameCommunityUpsellDevTools;
}
function MultiGuildDevTools() { // fn#107149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:415, offset: 0x022f57e3, size: 1323 bytes, params: 1, frame: 39
var r26;
var Date;
var value6;
var date;
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocalAppDetectionStore],
function() {
return LocalAppDetectionStore.getUserAgnosticState();
});
const {guildsCount, dismissedCount,
lastFetchedAt} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MobileGameCommunitiesStore],
function() {
var object = {};
object.guildsCount = MobileGameCommunitiesStore.getPresentableUpsellGuilds().length;
object.dismissedCount = MobileGameCommunitiesStore.getDismissedGuildIds().size;
object.lastFetchedAt = MobileGameCommunitiesStore.getLastFetchedAt();
return object;
});
const Object = global.Object;
const entries = Object.entries;
const DETECTABLE_GAME_TO_APPLICATION_ID_MAP = (require(14163) /* metro dependency 14163: GameCommunityConfig */).DETECTABLE_GAME_TO_APPLICATION_ID_MAP;
const value4 = Reflect.apply(entries, Object, [DETECTABLE_GAME_TO_APPLICATION_ID_MAP]).map(_fun107152);
if (lastFetchedAt > 0) {
Date = global.Date;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(lastFetchedAt);
r26 = '' + (date instanceof Object ? date : value6).toLocaleTimeString();
} else {
r26 = 'Never';
}
const value10 = env0_2.useCallback(_fun107153, []);
let section = styles.section;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items4 = [<View style={section}><TableRowGroup title="Detected Apps" hasIcons={false}>{value4.length === 0 ? <TableRow label="No games configured" subLabel="MULTI_GUILD_GAME_CONFIGS is empty" disabled /> : value4.map(_fun107154)}</TableRowGroup></View>];
section = styles.section;
var TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let String = global.String;
const items2 = [<TableRow label="Presentable Guilds" subLabel={String(guildsCount)} disabled />];
String = global.String;
items2[1] = <TableRow label="Dismissed Guilds" subLabel={String(dismissedCount)} disabled />;
items2[2] = <TableRow label="Last Fetched" subLabel={r26} disabled />;
items4[1] = <View style={section}><TableRowGroup title="Store State" hasIcons={false}>{items2}</TableRowGroup></View>;
section = styles.section;
const tableRowProps2 = {'label': 'Refresh Upsell Guilds', 'subLabel': 'Redects games and suggested guilds',
onPress: value10};
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
tableRowProps2.icon = <RefreshIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
tableRowProps2.trailing = <TableRowArrow />;
const items3 = [<TableRow {...tableRowProps2} />];
items3[1] = <TableRow label="Clear Dismissed Guilds" subLabel="Reset dismissed guild IDs so all guilds show again" onPress={onPress_107155} icon={<RefreshIcon />} trailing={<TableRowArrow />} />;
items3[2] = <TableRow label="Clear All Store State" subLabel="Reset all MobileGameCommunitiesStore state (guilds, dismissed, fetch cache)" onPress={function() {
MobileGameCommunitiesStore.DEV_clearState();
}} icon={<RefreshIcon />} trailing={<TableRowArrow />} />;
items3[3] = <TableRow label="Reset Upsell Animation" subLabel="Clear the dismissed state for the create button NUX animation so it can replay" onPress={onPress_107157} icon={<RefreshIcon />} trailing={<TableRowArrow />} />;
items4[2] = <View style={section}><TableRowGroup title="Actions" hasIcons>{items3}</TableRowGroup></View>;
return (
<View style={styles.container}>
<ScrollView style={styles.scrollView}>
{items4}
</ScrollView>
</View>
);
}
function GameCommunityUpsellDevTools() { // fn#107158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:3304, offset: 0x022f5fcb, size: 23 bytes, params: 1, frame: 13
return <MultiGuildDevTools />;
}
function _fun107152(a0) { // fn#107152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:822, offset: 0x022f5d6b, size: 146 bytes, params: 2, frame: 8
var r0;
var r2;
var r3;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r2 = value3;
r3 = value;
function MultiGuildDevTools() { // fn#107149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:415, offset: 0x022f57e3, size: 1323 bytes, params: 1, frame: 39
var r26;
var Date;
var value6;
var date;
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocalAppDetectionStore],
function() {
return LocalAppDetectionStore.getUserAgnosticState();
});
const {guildsCount, dismissedCount,
lastFetchedAt} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MobileGameCommunitiesStore],
function() {
var object = {};
object.guildsCount = MobileGameCommunitiesStore.getPresentableUpsellGuilds().length;
object.dismissedCount = MobileGameCommunitiesStore.getDismissedGuildIds().size;
object.lastFetchedAt = MobileGameCommunitiesStore.getLastFetchedAt();
return object;
});
const Object = global.Object;
const entries = Object.entries;
const DETECTABLE_GAME_TO_APPLICATION_ID_MAP = (GameCommunityConfigModule).DETECTABLE_GAME_TO_APPLICATION_ID_MAP;
const value4 = Reflect.apply(entries, Object, [DETECTABLE_GAME_TO_APPLICATION_ID_MAP]).map(_fun107152);
if (lastFetchedAt > 0) {
Date = global.Date;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(lastFetchedAt);
r26 = '' + (date instanceof Object ? date : value6).toLocaleTimeString();
} else {
r0 = item3;
r2 = value3;
r3 = item;
r26 = 'Never';
}
const value10 = ReactModule.useCallback(_fun107153, []);
let section = styles.section;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const items4 = [
<View style={section}>
<TableRowGroup title="Detected Apps" hasIcons={false}>
{
value4.length === 0
? (
<TableRow
label="No games configured"
subLabel="MULTI_GUILD_GAME_CONFIGS is empty"
disabled
/>
)
: value4.map(_fun107154)
}
</TableRowGroup>
</View>,
];
section = styles.section;
var TableRow = (TableRowNativeModule).TableRow;
let String = global.String;
const items2 = [
<TableRow
label="Presentable Guilds"
subLabel={String(guildsCount)}
disabled
/>,
];
String = global.String;
items2[1] = (
<TableRow
label="Dismissed Guilds"
subLabel={String(dismissedCount)}
disabled
/>
);
items2[2] = (
<TableRow
label="Last Fetched"
subLabel={r26}
disabled
/>
);
items4[1] = (
<View style={section}>
<TableRowGroup title="Store State" hasIcons={false}>
{items2}
</TableRowGroup>
</View>
);
section = styles.section;
const tableRowProps2 = {'label': 'Refresh Upsell Guilds', 'subLabel': 'Redects games and suggested guilds',
onPress: value10};
const RefreshIcon = (RefreshIconModule).RefreshIcon;
tableRowProps2.icon = <RefreshIcon />;
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
tableRowProps2.trailing = <TableRowArrow />;
const items3 = [
<TableRow {...tableRowProps2} />,
];
items3[1] = (
<TableRow
label="Clear Dismissed Guilds"
subLabel="Reset dismissed guild IDs so all guilds show again"
onPress={onPress_107155}
icon={<RefreshIcon />}
trailing={<TableRowArrow />}
/>
);
items3[2] = (
<TableRow
label="Clear All Store State"
subLabel="Reset all MobileGameCommunitiesStore state (guilds, dismissed, fetch cache)"
onPress={function() {
MobileGameCommunitiesStore.DEV_clearState();
}}
icon={<RefreshIcon />}
trailing={<TableRowArrow />}
/>
);
items3[3] = (
<TableRow
label="Reset Upsell Animation"
subLabel="Clear the dismissed state for the create button NUX animation so it can replay"
onPress={onPress_107157}
icon={<RefreshIcon />}
trailing={<TableRowArrow />}
/>
);
items4[2] = (
<View style={section}>
<TableRowGroup title="Actions" hasIcons>
{items3}
</TableRowGroup>
</View>
);
return (
<View style={styles.container}>
<ScrollView style={styles.scrollView}>
{items4}
</ScrollView>
</View>
);
function _fun107152(a0) { // fn#107152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:822, offset: 0x022f5d6b, size: 146 bytes, params: 2, frame: 8
var r0;
var r2;
var r3;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r2 = value3;
r3 = value;
} else {
r0 = item3;
r2 = value3;
r3 = item;
}
}
if (!r2) {
r0.return();
}
const property = userAgnosticState.apps[r4];
const detected = property == null ? value : property.detected;
return {detectableAppName: r4, gameId: r3, detected: detected != null && detected,
lastScannedAt: property == null ? value : property.lastScannedAt};
}
function _fun107153() { // fn#107153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:1052, offset: 0x022f5dfd, size: 88 bytes, params: 1, frame: 14
let value = environment.__proto__;
LocalAppDetectionStore.DEV_resetState();
MobileGameCommunitiesStore.DEV_clearFetchCache();
value = require(12557) /* metro dependency 12557: LocalAppDetectionUtils */;
const detectLocalApps = value.detectLocalApps;
const ALL_DETECTABLE_APP_NAMES = (LocalAppDetectionTypesModule).ALL_DETECTABLE_APP_NAMES;
Reflect.apply(detectLocalApps, value, [ALL_DETECTABLE_APP_NAMES]);
}
function _fun107154(a0) { // fn#107154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:1465, offset: 0x022f5e55, size: 233 bytes, params: 2, frame: 23
var r8;
var date;
const value = environment.__proto__;
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {label: a0.detectableAppName};
const gameId = a0.gameId;
const r9 = a0.detected ? 'Detected' : 'Not detected';
if (a0.lastScannedAt != null) {
date = new global.Date(a0.lastScannedAt);
date = date.toLocaleTimeString();
date = ' (scanned ' + date + ')';
r8 = date;
} else {
r8 = '';
}
tableRowProps.subLabel = 'Game ID: ' + gameId + ' — ' + r9 + r8;
tableRowProps.disabled = true;
return <TableRow {...tableRowProps} key={a0.detectableAppName} />;
}
function MultiGuildDevToolsOnPress() { // fn#107155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:2446, owner: MultiGuildDevTools.onPress, offset: 0x022f5f3e, size: 34 bytes, params: 1, frame: 9
MobileGameCommunitiesStore.DEV_clearDismissedGuilds();
env0_1();
}
function MultiGuildDevToolsOnPress_107157() { // fn#107157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:2950, owner: MultiGuildDevTools.onPress, offset: 0x022f5f77, size: 84 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION = DismissibleContent.MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION;
Reflect.apply(removeDismissedContent, value, [MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION]);
(DismissibleContentFrameworkActionCreatorsModule).resetDismissibleContentFrameworkStore();
}
}
if (!r2) {
r0.return();
function GameCommunityUpsellDevTools() { // fn#107158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:3304, offset: 0x022f5fcb, size: 23 bytes, params: 1, frame: 13
return <MultiGuildDevTools />;
}
const property = userAgnosticState.apps[r4];
const detected = property == null ? value : property.detected;
return {detectableAppName: r4, gameId: r3, detected: detected != null && detected,
lastScannedAt: property == null ? value : property.lastScannedAt};
}
function _fun107153() { // fn#107153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:1052, offset: 0x022f5dfd, size: 88 bytes, params: 1, frame: 14
let value = environment.__proto__;
LocalAppDetectionStore.DEV_resetState();
MobileGameCommunitiesStore.DEV_clearFetchCache();
value = require(12557) /* metro dependency 12557: LocalAppDetectionUtils */;
const detectLocalApps = value.detectLocalApps;
const ALL_DETECTABLE_APP_NAMES = (require(12556) /* metro dependency 12556: LocalAppDetectionTypes */).ALL_DETECTABLE_APP_NAMES;
Reflect.apply(detectLocalApps, value, [ALL_DETECTABLE_APP_NAMES]);
}
function _fun107154(a0) { // fn#107154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:1465, offset: 0x022f5e55, size: 233 bytes, params: 2, frame: 23
var r8;
var date;
const value = environment.__proto__;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: a0.detectableAppName};
const gameId = a0.gameId;
const r9 = a0.detected ? 'Detected' : 'Not detected';
if (a0.lastScannedAt != null) {
date = new global.Date(a0.lastScannedAt);
date = date.toLocaleTimeString();
date = ' (scanned ' + date + ')';
r8 = date;
} else {
r8 = '';
}
tableRowProps.subLabel = 'Game ID: ' + gameId + ' — ' + r9 + r8;
tableRowProps.disabled = true;
return <TableRow {...tableRowProps} key={a0.detectableAppName} />;
}
function MultiGuildDevToolsOnPress() { // fn#107155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:2446, owner: MultiGuildDevTools.onPress, offset: 0x022f5f3e, size: 34 bytes, params: 1, frame: 9
MobileGameCommunitiesStore.DEV_clearDismissedGuilds();
env0_1();
}
function MultiGuildDevToolsOnPress_107157() { // fn#107157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14358:2950, owner: MultiGuildDevTools.onPress, offset: 0x022f5f77, size: 84 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION = DismissibleContent.MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION;
Reflect.apply(removeDismissedContent, value, [MOBILE_MULTI_GUILD_CREATE_UPSELL_ANIMATION]);
(require(12715) /* metro dependency 12715: DismissibleContentFrameworkActionCreators */).resetDismissibleContentFrameworkStore();
}
global.__d(_fun107148, 14161, [31, 27, 12555, 14162, 33, 4501, 697, 566, 14163, 12557, 12556, 6231, 6238, 13127,
6243, 1362, 1365, 12715,
2]) /* metro module 14161, dependencies: [31, 27, 12555, 14162, 33, 4501, 697, 566, 14163, 12557, 12556, 6231, 6238, 13127, 6243, 1362, 1365, 12715, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 12558; source: modules/game_community_upsell/native/GameCommunityUpsellExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun96092(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12748:6, offset: 0x02155289, size: 191 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-02-game-community-upsell-multi', 'kind': 'user',
defaultConfig: {'enabled': false, 'visualVariant': 'one-column'}, variations: {[1]: {'enabled': true,
'visualVariant': 'one-column'}, [2]: {'enabled': true, 'visualVariant': 'two-column'}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityUpsellExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/GameCommunityUpsellExperiment.tsx');
exports.GAME_COMMUNITY_UPSELL_MULTI_EXPERIMENT = '2026-02-game-community-upsell-multi';
exports.GameCommunityUpsellMultiExperiment = value;
}
global.__d(_fun96092, 12558, [1854, 2]) /* metro module 12558, dependencies: [1854, 2] */;
@@ -1,141 +1,212 @@
/* Metro module 14734; source: modules/game_community_upsell/native/GuildUpsellChannelList.tsx; dependencies: [31, 27, 14162, 661, 7553, 33, 4501, 697, 12558, 14735, 566, 683, 12025, 6239, 4573, 1244, 4578, 14736, 14738, 2] */
import CreateGuildModalActionCreators from '../../create_guild/native/CreateGuildModalActionCreators.tsx'; /* Metro dependency 12025 */
import MobileGameCommunitiesStore from './MobileGameCommunitiesStore.tsx'; /* Metro dependency 14162 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as CardNativeModule from '../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as YouBarConstantsModule from '../../main_tabs_v2/native/YouBarConstants.tsx'; /* Metro dependency 7553 */
import * as GameCommunityUpsellExperimentModule from './GameCommunityUpsellExperiment.tsx'; /* Metro dependency 12558 */
import * as MobileGameCommunitiesActionCreatorsModule from './MobileGameCommunitiesActionCreators.tsx'; /* Metro dependency 14735 */
function _fun111123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:6, offset: 0x0239364a, size: 633 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const mobileGameCommunitiesStore = importDefault(14162) /* metro dependency 14162: MobileGameCommunitiesStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarTotalHeight;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PANEL_BG = (importDefault(697) /* metro dependency 697: native */).colors.PANEL_BG;
object2.container = {flex: 1, backgroundColor: PANEL_BG};
object.container = {flex: 1, backgroundColor: PANEL_BG};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.header = {'height': 56, 'flexDirection': 'row', 'alignItems': 'center', marginHorizontal: PX_16};
object2.headerTitle = {flex: 1};
const object3 = {};
object.header = {'height': 56, 'flexDirection': 'row', 'alignItems': 'center', marginHorizontal: PX_16};
object.headerTitle = {flex: 1};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object5.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = PX_16;
object2.listContent = object3;
object5.paddingBottom = PX_16;
object.listContent = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.twoColumnRow = {'flexDirection': 'row', 'gap': null, 'flex': 1, gap: PX_16};
object2.listContainer = {flex: 1};
object.twoColumnRow = {'flexDirection': 'row', 'gap': null, 'flex': 1, gap: PX_16};
object.listContainer = {flex: 1};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.subheaderWrapper = {marginBottom: PX_8};
const object4 = {};
object.subheaderWrapper = {marginBottom: PX_8};
const object6 = {};
const BG_SURFACE_RAISED = (importDefault(697) /* metro dependency 697: native */).colors.BG_SURFACE_RAISED;
object4.backgroundColor = BG_SURFACE_RAISED;
object6.backgroundColor = BG_SURFACE_RAISED;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.gap = PX_4;
object6.gap = PX_4;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object2.createCard = object4;
object6.marginBottom = PX_24;
object.createCard = object6;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.descriptionSpacing = {marginBottom: PX_8};
object.descriptionSpacing = {marginBottom: PX_8};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.joinSection = {gap: PX_4};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/GuildUpsellChannelList.tsx');
object.joinSection = {gap: PX_4};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/GuildUpsellChannelList.tsx');
exports.default = GuildUpsellChannelList;
}
function GuildUpsellChannelList({style}) { // fn#111124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:958, offset: 0x023938c3, size: 767 bytes, params: 2, frame: 30
var view;
var Text;
var intl;
var value8;
const styles = useStyles();
const GameCommunityUpsellMultiExperiment = (GameCommunityUpsellExperimentModule).GameCommunityUpsellMultiExperiment;
const useConfig = GameCommunityUpsellMultiExperiment.useConfig;
const visualVariant = Reflect.apply(useConfig, GameCommunityUpsellMultiExperiment,
[{location: 'GuildUpsellChannelList'}]).visualVariant;
ReactModule.useEffect(_fun111125, []);
const value2 = (FluxModule).useStateFromStoresArray([MobileGameCommunitiesStore],
_fun111126);
const value3 = ReactModule.useCallback(function(a0, a1) {
importAll(dependencyMap[9]).dismissGuild(a0);
var defaultImport = importDefault(dependencyMap[11]);
var GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED = AnalyticEvents.GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED;
defaultImport.track(GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED, {game_id: a1, guild_id: a0,
variant: visualVariant});
}, [visualVariant]);
const value5 = ReactModule.useMemo(_fun111129, [ReactModule.useCallback(_fun111128, []), styles.subheaderWrapper,
styles.createCard, styles.descriptionSpacing, styles.joinSection]);
const value6 = useYouBarTotalHeight();
if (value2.length === 0) {
view = (
<View style={[styles.container, style]}>
{((GuildsEmptyContent) => <GuildsEmptyContent />)((require(14736) /* metro dependency 14736: GuildsEmpty */).GuildsEmptyContent)}
</View>
);
} else {
var viewBindingProps = {style: [styles.container, style]};
var viewBindingProps2 = {style: styles.header};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'style': null, 'color': 'mobile-text-heading-primary', 'variant': 'heading-lg/bold',
style: styles.headerTitle};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value8 = null;
view = (
<View {...viewBindingProps}>
<View {...viewBindingProps2}>
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7hB4kg'])}
</Text>
</View>
<View style={styles.listContainer}>
{
visualVariant !== 'one-column'
? value8
: ((OneColumnGuildUpsellList) => <OneColumnGuildUpsellList suggestedGuilds={value2} contentContainerStyle={styles.listContent} onDismiss={value3} subheader={value5} bottomPadding={value6} />)((require(14738) /* metro dependency 14738: GameCommunityMultiGuildUpsellModal */).OneColumnGuildUpsellList)
}
{
visualVariant !== 'two-column'
? value8
: ((TwoColumnGuildUpsellList) => <TwoColumnGuildUpsellList suggestedGuilds={value2} contentContainerStyle={styles.listContent} rowStyle={styles.twoColumnRow} onDismiss={value3} subheader={value5} bottomPadding={value6} />)((require(14738) /* metro dependency 14738: GameCommunityMultiGuildUpsellModal */).TwoColumnGuildUpsellList)
}
</View>
</View>
);
}
return view;
function _fun111125() { // fn#111125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1130, offset: 0x02393bc2, size: 97 bytes, params: 1, frame: 15
let Array = global.Array;
let from = Array.from;
const value = environment.__proto__;
const mobileGameCommunitiesStoreBinding = MobileGameCommunitiesStore;
const getLastFetchedGameIds = mobileGameCommunitiesStoreBinding.getLastFetchedGameIds;
const value2 = Reflect.apply(from, Array, [Reflect.apply(getLastFetchedGameIds, mobileGameCommunitiesStoreBinding,
[])]);
Array = global.Array;
from = Array.from;
const getDismissedGuildIds = mobileGameCommunitiesStoreBinding.getDismissedGuildIds;
(MobileGameCommunitiesActionCreatorsModule).fetchMobileGameCommunities(value2,
Reflect.apply(from, Array, [Reflect.apply(getDismissedGuildIds, mobileGameCommunitiesStoreBinding, [])]));
}
function _fun111126() { // fn#111126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1308, offset: 0x02393c23, size: 55 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = MobileGameCommunitiesStore.getPresentableUpsellGuilds();
return value.slice(0, visualVariant !== 'one-column' ? 20 : 8);
}
function _fun111128() { // fn#111128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1549, offset: 0x02393cc1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(CreateGuildModalActionCreators).openCreateGuildModal();
}
function _fun111129() { // fn#111129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1605, offset: 0x02393ce6, size: 615 bytes, params: 1, frame: 28
const value = environment.__proto__;
const stylesBinding = styles;
const subheaderWrapper = stylesBinding.subheaderWrapper;
const Card = (CardNativeModule).Card;
const createCard = stylesBinding.createCard;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const B44MTm = (require(1244) /* metro dependency 1244: indexNative */).t.B44MTm;
const items3 = [
<Text variant="heading-md/bold" color="mobile-text-heading-primary">
{Reflect.apply(string, intl, [B44MTm])}
</Text>,
];
items3[1] = (
<Text
variant="text-sm/medium"
color="text-default"
style={stylesBinding.descriptionSpacing}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l0tmhq)}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const CumH4u = (require(1244) /* metro dependency 1244: indexNative */).t.CumH4u;
items3[2] = (
<Button
variant="primary"
size="sm"
text={Reflect.apply(string, intl, [CumH4u])}
onPress={env0_2}
grow
/>
);
const items2 = [
<Card style={createCard}>
{items3}
</Card>,
];
items2[1] = (
<View style={stylesBinding.joinSection}>
<Text variant="heading-md/bold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rJRote)}
</Text>
<Text
variant="text-sm/medium"
color="text-subtle"
style={stylesBinding.descriptionSpacing}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJT2DK)}
</Text>
</View>
);
return (
<View style={subheaderWrapper}>
{items2}
</View>
);
}
function GuildUpsellChannelList({style}) { // fn#111124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:958, offset: 0x023938c3, size: 767 bytes, params: 2, frame: 30
var view;
var Text;
var intl;
var value8;
const styles = useStyles();
const GameCommunityUpsellMultiExperiment = (require(12558) /* metro dependency 12558: GameCommunityUpsellExperiment */).GameCommunityUpsellMultiExperiment;
const useConfig = GameCommunityUpsellMultiExperiment.useConfig;
const visualVariant = Reflect.apply(useConfig, GameCommunityUpsellMultiExperiment,
[{location: 'GuildUpsellChannelList'}]).visualVariant;
const binding = env0_4;
binding.useEffect(_fun111125, []);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([MobileGameCommunitiesStore],
_fun111126);
const value3 = binding.useCallback(function(a0, a1) {
importAll(dependencyMap[9]).dismissGuild(a0);
var defaultImport = importDefault(dependencyMap[11]);
var GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED = AnalyticEvents.GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED;
defaultImport.track(GAME_COMMUNITY_MULTI_GUILD_UPSELL_CARD_DISMISSED, {game_id: a1, guild_id: a0,
variant: visualVariant});
}, [visualVariant]);
const value5 = binding.useMemo(_fun111129, [binding.useCallback(_fun111128, []), styles.subheaderWrapper,
styles.createCard, styles.descriptionSpacing, styles.joinSection]);
const value6 = useYouBarTotalHeight();
if (value2.length === 0) {
view = <View style={[styles.container,
style]}>{((GuildsEmptyContent) => <GuildsEmptyContent />)((require(14736) /* metro dependency 14736: GuildsEmpty */).GuildsEmptyContent)}</View>;
} else {
var viewBindingProps = {style: [styles.container, style]};
var viewBindingProps2 = {style: styles.header};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'style': null, 'color': 'mobile-text-heading-primary', 'variant': 'heading-lg/bold',
style: styles.headerTitle};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value8 = null;
view = <View {...viewBindingProps}><View {...viewBindingProps2}><Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7hB4kg'])}</Text></View><View style={styles.listContainer}>{visualVariant !== 'one-column' ? value8 : ((OneColumnGuildUpsellList) => <OneColumnGuildUpsellList suggestedGuilds={value2} contentContainerStyle={styles.listContent} onDismiss={value3} subheader={value5} bottomPadding={value6} />)((require(14738) /* metro dependency 14738: GameCommunityMultiGuildUpsellModal */).OneColumnGuildUpsellList)}{visualVariant !== 'two-column' ? value8 : ((TwoColumnGuildUpsellList) => <TwoColumnGuildUpsellList suggestedGuilds={value2} contentContainerStyle={styles.listContent} rowStyle={styles.twoColumnRow} onDismiss={value3} subheader={value5} bottomPadding={value6} />)((require(14738) /* metro dependency 14738: GameCommunityMultiGuildUpsellModal */).TwoColumnGuildUpsellList)}</View></View>;
}
return view;
}
function _fun111125() { // fn#111125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1130, offset: 0x02393bc2, size: 97 bytes, params: 1, frame: 15
let Array = global.Array;
let from = Array.from;
const value = environment.__proto__;
const getLastFetchedGameIds = MobileGameCommunitiesStore.getLastFetchedGameIds;
const value2 = Reflect.apply(from, Array, [Reflect.apply(getLastFetchedGameIds, MobileGameCommunitiesStore, [])]);
Array = global.Array;
from = Array.from;
const getDismissedGuildIds = MobileGameCommunitiesStore.getDismissedGuildIds;
(require(14735) /* metro dependency 14735: MobileGameCommunitiesActionCreators */).fetchMobileGameCommunities(value2,
Reflect.apply(from, Array, [Reflect.apply(getDismissedGuildIds, MobileGameCommunitiesStore, [])]));
}
function _fun111126() { // fn#111126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1308, offset: 0x02393c23, size: 55 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = MobileGameCommunitiesStore.getPresentableUpsellGuilds();
return value.slice(0, visualVariant !== 'one-column' ? 20 : 8);
}
function _fun111128() { // fn#111128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1549, offset: 0x02393cc1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).openCreateGuildModal();
}
function _fun111129() { // fn#111129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14931:1605, offset: 0x02393ce6, size: 615 bytes, params: 1, frame: 28
const value = environment.__proto__;
const stylesBinding = styles;
const subheaderWrapper = stylesBinding.subheaderWrapper;
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const createCard = stylesBinding.createCard;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const B44MTm = (require(1244) /* metro dependency 1244: indexNative */).t.B44MTm;
const items3 = [<Text variant="heading-md/bold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
[B44MTm])}</Text>];
items3[1] = <Text variant="text-sm/medium" color="text-default" style={stylesBinding.descriptionSpacing}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l0tmhq)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const CumH4u = (require(1244) /* metro dependency 1244: indexNative */).t.CumH4u;
items3[2] = <Button variant="primary" size="sm" text={Reflect.apply(string, intl,
[CumH4u])} onPress={env0_2} grow />;
const items2 = [<Card style={createCard}>{items3}</Card>];
items2[1] = <View style={stylesBinding.joinSection}><Text variant="heading-md/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rJRote)}</Text><Text variant="text-sm/medium" color="text-subtle" style={stylesBinding.descriptionSpacing}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJT2DK)}</Text></View>;
return (
<View style={subheaderWrapper}>
{items2}
</View>
);
}
global.__d(_fun111123, 14734, [31, 27, 14162, 661, 7553, 33, 4501, 697, 12558, 14735, 566, 683, 12025, 6239, 4573,
1244, 4578, 14736, 14738,
2]) /* metro module 14734, dependencies: [31, 27, 14162, 661, 7553, 33, 4501, 697, 12558, 14735, 566, 683, 12025, 6239, 4573, 1244, 4578, 14736, 14738, 2] */;
@@ -1,46 +1,52 @@
/* Metro module 14735; source: modules/game_community_upsell/native/MobileGameCommunitiesActionCreators.tsx; dependencies: [661, 507, 1468, 694, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun111130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:6, offset: 0x02393f4d, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/MobileGameCommunitiesActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/MobileGameCommunitiesActionCreators.tsx');
exports.fetchMobileGameCommunities = fetchMobileGameCommunities;
exports.dismissGuild = dismissGuild;
function fetchMobileGameCommunities(a0) { // fn#111131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:255, offset: 0x02393fd6, size: 174 bytes, params: 2, frame: 20
let value = a1;
const value2 = a2;
const env0_0 = a0;
const r7 = value !== undefined ? value : [];
const r8 = value2 !== undefined ? value2 : 20;
const HTTP = (HTTPUtilsModule).HTTP;
const get = HTTP.get;
const object = {};
const MOBILE_GAME_COMMUNITIES = Endpoints.MOBILE_GAME_COMMUNITIES;
object.url = MOBILE_GAME_COMMUNITIES;
value = importDefault(1468) /* metro dependency 1468 */;
object.query = value.stringify({game_ids: a0, limit: r8, ignored_guild_ids: r7});
object.oldFormErrors = true;
object.rejectWithError = true;
return Reflect.apply(get, HTTP, [object]).then(_fun111132, _fun111133);
function _fun111132({body}) { // fn#111132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:469, offset: 0x02394084, size: 80 bytes, params: 2, frame: 14
const guilds = body.guilds;
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'MOBILE_GAME_COMMUNITIES_FETCH_SUCCESS',
guilds: guilds, gameIds: env0_0});
}
function _fun111133() { // fn#111133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:578, offset: 0x023940d4, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'MOBILE_GAME_COMMUNITIES_FETCH_FAILURE'});
}
}
function dismissGuild(a0) { // fn#111134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:667, offset: 0x02394105, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'MOBILE_GAME_COMMUNITIES_DISMISS_GUILD',
guildId: a0});
}
}
function fetchMobileGameCommunities(a0) { // fn#111131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:255, offset: 0x02393fd6, size: 174 bytes, params: 2, frame: 20
let value = a1;
const value2 = a2;
const env0_0 = a0;
const r7 = value !== undefined ? value : [];
const r8 = value2 !== undefined ? value2 : 20;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {};
const MOBILE_GAME_COMMUNITIES = Endpoints.MOBILE_GAME_COMMUNITIES;
object2.url = MOBILE_GAME_COMMUNITIES;
value = importDefault(1468) /* metro dependency 1468 */;
object2.query = value.stringify({game_ids: a0, limit: r8, ignored_guild_ids: r7});
object2.oldFormErrors = true;
object2.rejectWithError = true;
return Reflect.apply(get, HTTP, [object2]).then(_fun111132, _fun111133);
}
function dismissGuild(a0) { // fn#111134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:667, offset: 0x02394105, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MOBILE_GAME_COMMUNITIES_DISMISS_GUILD',
guildId: a0});
}
function _fun111132({body}) { // fn#111132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:469, offset: 0x02394084, size: 80 bytes, params: 2, frame: 14
const guilds = body.guilds;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MOBILE_GAME_COMMUNITIES_FETCH_SUCCESS',
guilds: guilds, gameIds: env0_0});
}
function _fun111133() { // fn#111133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14932:578, offset: 0x023940d4, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MOBILE_GAME_COMMUNITIES_FETCH_FAILURE'});
}
global.__d(_fun111130, 14735, [661, 507, 1468, 694,
2]) /* metro module 14735, dependencies: [661, 507, 1468, 694, 2] */;
@@ -1,4 +1,16 @@
/* Metro module 15842; source: modules/game_community_upsell/native/MobileGameCommunitiesManager.tsx; dependencies: [6, 7, 15, 17, 18, 12555, 14162, 14163, 14735, 12558, 12556, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import LocalAppDetectionStore from '../../local_app_detection/native/LocalAppDetectionStore.tsx'; /* Metro dependency 12555 */
import MobileGameCommunitiesStore from './MobileGameCommunitiesStore.tsx'; /* Metro dependency 14162 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GameCommunityUpsellExperimentModule from './GameCommunityUpsellExperiment.tsx'; /* Metro dependency 12558 */
import * as GameCommunityConfigModule from './GameCommunityConfig.tsx'; /* Metro dependency 14163 */
function _fun121797(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:6, offset: 0x02551715, size: 287 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_121800 = function(a0, a1) {
@@ -46,237 +58,252 @@ function _fun121797(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const localAppDetectionStore = importDefault(12555) /* metro dependency 12555: LocalAppDetectionStore */;
const mobileGameCommunitiesStore = importDefault(14162) /* metro dependency 14162: MobileGameCommunitiesStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun121804(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/MobileGameCommunitiesManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/MobileGameCommunitiesManager.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_121798(a0, a1) { // fn#121798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:170, offset: 0x02551834, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_121798(a0, a1) { // fn#121798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:170, offset: 0x02551834, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun121799;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_121800(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun121799;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_121800(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_121800(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun121799;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _isNativeReflectConstruct_121801() { // fn#121801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1080, offset: 0x025519a8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_121801_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121804(a0) { // fn#121804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1283, offset: 0x02551a0a, size: 122 bytes, params: 2, frame: 16
const closure = MobileGameCommunitiesManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_fetchGameCommunities', value: value_121808}, {key: 'handlePostConnectionOpen',
value: value_121810}, {key: 'handleLocalAppDetectionComplete', value: function({result}) {
var GameCommunityUpsellMultiExperiment = require(dependencyMap[9]).GameCommunityUpsellMultiExperiment;
if (GameCommunityUpsellMultiExperiment.getConfig({location: 'MobileGameCommunitiesManager'}).enabled) {
this._fetchGameCommunities(result);
}
}}]);
}
function MobileGameCommunitiesManager(a0) { // fn#121805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1295, offset: 0x02551a84, size: 164 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, MobileGameCommunitiesManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(MobileGameCommunitiesManager);
binding = env1_5;
if (_isNativeReflectConstruct_121801()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {LOCAL_APP_DETECTION_COMPLETE: LOCAL_APP_DETECTION_COMPLETE,
POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121807};
return value;
}
function value_121808(a0) { // fn#121808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1810, offset: 0x02551b28, size: 175 bytes, params: 2, frame: 17
var environment;
var dismissedGuildIds;
let value = environment.__proto__;
const gameIdsForDetectedGames = (require(14163) /* metro dependency 14163: GameCommunityConfig */).getGameIdsForDetectedGames(a0);
const Date = global.Date;
const value3 = Date.now();
const getLastFetchedAt = MobileGameCommunitiesStore.getLastFetchedAt;
if (value3 - Reflect.apply(getLastFetchedAt, MobileGameCommunitiesStore, []) >= 86400000) {
dismissedGuildIds = MobileGameCommunitiesStore.getDismissedGuildIds();
value = importAll(14735) /* metro dependency 14735: MobileGameCommunitiesActionCreators */;
value.fetchMobileGameCommunities(gameIdsForDetectedGames, global.Array.from(dismissedGuildIds), 6);
} else if (gameIdsForDetectedGames.some(_fun121809)) {
dismissedGuildIds = MobileGameCommunitiesStore.getDismissedGuildIds();
value = importAll(14735) /* metro dependency 14735: MobileGameCommunitiesActionCreators */;
value.fetchMobileGameCommunities(gameIdsForDetectedGames, global.Array.from(dismissedGuildIds), 6);
}
}
function value_121810() { // fn#121810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:2093, offset: 0x02551bfa, size: 253 bytes, params: 1, frame: 17
var r4;
var getLastFetchedAt;
var value2;
var Object;
var values;
var getUserAgnosticState;
var apps;
var value3;
var some;
var _createForOfIteratorHelperLoose_121798Binding;
var ALL_DETECTABLE_APP_NAMES;
var value4;
var value5;
var done;
var value6;
var isAppInstalled;
var value7;
var _fetchGameCommunities;
const GameCommunityUpsellMultiExperiment = (require(12558) /* metro dependency 12558: GameCommunityUpsellExperiment */).GameCommunityUpsellMultiExperiment;
const getConfig = GameCommunityUpsellMultiExperiment.getConfig;
let object2 = {location: 'MobileGameCommunitiesManager'};
reducibleJoin6: while (true) {
if (Reflect.apply(getConfig, GameCommunityUpsellMultiExperiment, [object2]).enabled) {
getLastFetchedAt = MobileGameCommunitiesStore.getLastFetchedAt;
value2 = Reflect.apply(getLastFetchedAt, MobileGameCommunitiesStore, []);
if (value2 !== 0) {
break reducibleJoin6;
}
Object = global.Object;
values = Object.values;
getUserAgnosticState = LocalAppDetectionStore.getUserAgnosticState;
apps = Reflect.apply(getUserAgnosticState, LocalAppDetectionStore, []).apps;
value3 = Reflect.apply(values, Object, [apps]);
some = value3.some;
if (Reflect.apply(some, value3, [function(a0) {
return a0?.lastScannedAt != null;
}])) {
object2 = {};
_createForOfIteratorHelperLoose_121798Binding = _createForOfIteratorHelperLoose_121798;
ALL_DETECTABLE_APP_NAMES = (require(12556) /* metro dependency 12556: LocalAppDetectionTypes */).ALL_DETECTABLE_APP_NAMES;
value4 = _createForOfIteratorHelperLoose_121798Binding(ALL_DETECTABLE_APP_NAMES);
value5 = value4();
done = value5.done;
if (!done) {
r4 = value5;
reducibleLoop4: while (true) {
value6 = r4.value;
isAppInstalled = LocalAppDetectionStore.isAppInstalled;
object2[value6] = Reflect.apply(isAppInstalled, LocalAppDetectionStore, [value6]);
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop4;
}
r4 = value7;
continue reducibleLoop4;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_121800(a0, value);
r6 = value;
} else {
r6 = value;
}
}
_fetchGameCommunities = this._fetchGameCommunities;
Reflect.apply(_fetchGameCommunities, this, [object2]);
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun121799;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun121799() { // fn#121799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:741, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _isNativeReflectConstruct_121801() { // fn#121801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1080, offset: 0x025519a8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_121801_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121804(a0) { // fn#121804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1283, offset: 0x02551a0a, size: 122 bytes, params: 2, frame: 16
const MobileGameCommunitiesManager2 = MobileGameCommunitiesManager;
Inherits(MobileGameCommunitiesManager2, a0);
return CreateClass(MobileGameCommunitiesManager2, [{key: '_fetchGameCommunities', value: value_121808},
{key: 'handlePostConnectionOpen', value: value_121810}, {key: 'handleLocalAppDetectionComplete',
value: function({result}) {
var GameCommunityUpsellMultiExperiment = require(dependencyMap[9]).GameCommunityUpsellMultiExperiment;
if (GameCommunityUpsellMultiExperiment.getConfig({location: 'MobileGameCommunitiesManager'}).enabled) {
this._fetchGameCommunities(result);
}
}}]);
function MobileGameCommunitiesManager(a0) { // fn#121805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1295, offset: 0x02551a84, size: 164 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, MobileGameCommunitiesManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(MobileGameCommunitiesManager);
binding = env1_5;
if (_isNativeReflectConstruct_121801()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {LOCAL_APP_DETECTION_COMPLETE: LOCAL_APP_DETECTION_COMPLETE_121806,
POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121807};
return value;
function MobileGameCommunitiesManagerLOCAL_APP_DETECTION_COMPLETE(a0) { // fn#121806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1605, owner: MobileGameCommunitiesManager.LOCAL_APP_DETECTION_COMPLETE, offset: 0x021546fc, size: 23 bytes, params: 2, frame: 11
return env0_0.handleLocalAppDetectionComplete(a0);
}
function MobileGameCommunitiesManagerPOST_CONNECTION_OPEN() { // fn#121807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1666, owner: MobileGameCommunitiesManager.POST_CONNECTION_OPEN, offset: 0x01148776, size: 19 bytes, params: 1, frame: 9
return env0_0.handlePostConnectionOpen();
}
}
function value_121808(a0) { // fn#121808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1810, offset: 0x02551b28, size: 175 bytes, params: 2, frame: 17
var environment;
var dismissedGuildIds;
let value = environment.__proto__;
const gameIdsForDetectedGames = (GameCommunityConfigModule).getGameIdsForDetectedGames(a0);
const Date = global.Date;
const value3 = Date.now();
const mobileGameCommunitiesStoreBinding = MobileGameCommunitiesStore;
const getLastFetchedAt = mobileGameCommunitiesStoreBinding.getLastFetchedAt;
if (value3 - Reflect.apply(getLastFetchedAt, mobileGameCommunitiesStoreBinding, []) >= 86400000) {
dismissedGuildIds = MobileGameCommunitiesStore.getDismissedGuildIds();
value = importAll(14735) /* metro dependency 14735: MobileGameCommunitiesActionCreators */;
value.fetchMobileGameCommunities(gameIdsForDetectedGames, global.Array.from(dismissedGuildIds), 6);
} else if (gameIdsForDetectedGames.some(_fun121809)) {
dismissedGuildIds = MobileGameCommunitiesStore.getDismissedGuildIds();
value = importAll(14735) /* metro dependency 14735: MobileGameCommunitiesActionCreators */;
value.fetchMobileGameCommunities(gameIdsForDetectedGames, global.Array.from(dismissedGuildIds), 6);
}
function _fun121809(a0) { // fn#121809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1918, offset: 0x02551bd7, size: 35 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = MobileGameCommunitiesStore.getLastFetchedGameIds();
return !value.has(a0);
}
}
function value_121810() { // fn#121810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:2093, offset: 0x02551bfa, size: 253 bytes, params: 1, frame: 17
var r4;
var mobileGameCommunitiesStoreBinding;
var getLastFetchedAt;
var value2;
var Object;
var values;
var localAppDetectionStoreBinding;
var getUserAgnosticState;
var apps;
var value3;
var some;
var _createForOfIteratorHelperLoose_121798Binding;
var ALL_DETECTABLE_APP_NAMES;
var value4;
var value5;
var done;
var value6;
var isAppInstalled;
var value7;
var _fetchGameCommunities;
const GameCommunityUpsellMultiExperiment = (GameCommunityUpsellExperimentModule).GameCommunityUpsellMultiExperiment;
const getConfig = GameCommunityUpsellMultiExperiment.getConfig;
let object = {location: 'MobileGameCommunitiesManager'};
reducibleJoin6: while (true) {
if (Reflect.apply(getConfig, GameCommunityUpsellMultiExperiment, [object]).enabled) {
mobileGameCommunitiesStoreBinding = MobileGameCommunitiesStore;
getLastFetchedAt = mobileGameCommunitiesStoreBinding.getLastFetchedAt;
value2 = Reflect.apply(getLastFetchedAt, mobileGameCommunitiesStoreBinding, []);
if (value2 !== 0) {
break reducibleJoin6;
}
Object = global.Object;
values = Object.values;
localAppDetectionStoreBinding = LocalAppDetectionStore;
getUserAgnosticState = localAppDetectionStoreBinding.getUserAgnosticState;
apps = Reflect.apply(getUserAgnosticState, localAppDetectionStoreBinding, []).apps;
value3 = Reflect.apply(values, Object, [apps]);
some = value3.some;
if (Reflect.apply(some, value3, [function(a0) {
return a0?.lastScannedAt != null;
}])) {
object = {};
_createForOfIteratorHelperLoose_121798Binding = _createForOfIteratorHelperLoose_121798;
ALL_DETECTABLE_APP_NAMES = (require(12556) /* metro dependency 12556: LocalAppDetectionTypes */).ALL_DETECTABLE_APP_NAMES;
value4 = _createForOfIteratorHelperLoose_121798Binding(ALL_DETECTABLE_APP_NAMES);
value5 = value4();
done = value5.done;
if (!done) {
r4 = value5;
reducibleLoop4: while (true) {
value6 = r4.value;
localAppDetectionStoreBinding = LocalAppDetectionStore;
isAppInstalled = localAppDetectionStoreBinding.isAppInstalled;
object[value6] = Reflect.apply(isAppInstalled, localAppDetectionStoreBinding, [value6]);
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop4;
}
r4 = value7;
continue reducibleLoop4;
}
}
_fetchGameCommunities = this._fetchGameCommunities;
Reflect.apply(_fetchGameCommunities, this, [object]);
break reducibleJoin6;
}
break reducibleJoin6;
}
break reducibleJoin6;
}
break reducibleJoin6;
}
break reducibleJoin6;
}
}
function _fun121809(a0) { // fn#121809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16050:1918, offset: 0x02551bd7, size: 35 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = MobileGameCommunitiesStore.getLastFetchedGameIds();
return !value.has(a0);
}
global.__d(_fun121797, 15842, [6, 7, 15, 17, 18, 12555, 14162, 14163, 14735, 12558, 12556, 4860,
2]) /* metro module 15842, dependencies: [6, 7, 15, 17, 18, 12555, 14162, 14163, 14735, 12558, 12556, 4860, 2] */;
@@ -1,6 +1,14 @@
/* Metro module 14162; source: modules/game_community_upsell/native/MobileGameCommunitiesStore.tsx; dependencies: [6, 7, 15, 17, 18, 6946, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildDiscoveryUtilsModule from '../../../utils/GuildDiscoveryUtils.tsx'; /* Metro dependency 6946 */
function _fun107159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:6, offset: 0x022f5fe2, size: 418 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const _arrayLikeToArray_107165 = function(a0, a1) {
var r0;
@@ -47,326 +55,337 @@ function _fun107159(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
object2 = {guilds: [], lastFetchedAt: 0};
object = {guilds: [], lastFetchedAt: 0};
let Set = global.Set;
let set = new Set();
object2.lastFetchedGameIds = set;
object.lastFetchedGameIds = set;
Set = global.Set;
object2.dismissedGuildIds = new Set();
object2.guildGameIds = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
object.dismissedGuildIds = new Set();
object.guildGameIds = {};
const PersistedStore = (Flux).PersistedStore;
set = _fun107166(PersistedStore);
set.displayName = 'MobileGameCommunitiesStore';
set.persistKey = 'MobileGameCommunitiesStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{MOBILE_GAME_COMMUNITIES_FETCH_SUCCESS: MOBILE_GAME_COMMUNITIES_FETCH_SUCCESS,
MOBILE_GAME_COMMUNITIES_DISMISS_GUILD: MOBILE_GAME_COMMUNITIES_DISMISS_GUILD, LOGOUT: LOGOUT_107185});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_community_upsell/native/MobileGameCommunitiesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_community_upsell/native/MobileGameCommunitiesStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_107160() { // fn#107160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:150, offset: 0x022f6184, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_107160_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_107163(a0, a1) { // fn#107163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:343, offset: 0x022f61e6, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_107160() { // fn#107160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:150, offset: 0x022f6184, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return _fun107164;
return (_isNativeReflectConstruct_107160_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_107165(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_107163(a0, a1) { // fn#107163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:343, offset: 0x022f61e6, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun107164;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_107165(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_107165(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_107165(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun107164;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun107166(a0) { // fn#107166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:1362, offset: 0x022f635a, size: 330 bytes, params: 2, frame: 16
const closure = MobileGameCommunitiesStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_107168}, {key: 'getState', value: value_107170},
{key: 'getPresentableUpsellGuilds', value: value_107172}, {key: 'hasGuilds', value: function() {
return this.getPresentableUpsellGuilds().length > 0;
}}, {key: 'getLastFetchedAt', value: value_107175}, {key: 'getLastFetchedGameIds', value: value_107176},
{key: 'getGuildGameIds', value: value_107177}, {key: 'getDismissedGuildIds', value: value_107178},
{key: 'DEV_clearFetchCache', value: value_107179}, {key: 'DEV_clearDismissedGuilds', value: value_107180},
{key: 'DEV_clearState', value: value_107181}]);
}
function MOBILE_GAME_COMMUNITIES_FETCH_SUCCESS({guilds, gameIds}) { // fn#107182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3293, offset: 0x022f67ed, size: 227 bytes, params: 2, frame: 19
var r9;
var r3;
var value4;
var game_id;
var id;
var value5;
const object3 = {};
copyDataProperties(object3, env0_7.guildGameIds, r9);
const value2 = _createForOfIteratorHelperLoose_107163(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
while (true) {
value4 = r3.value;
game_id = value4.game_id;
if (game_id != null) {
id = value4.id;
game_id = value4.game_id;
object3[id] = game_id;
if (r5) {
}
value5 = value2();
done = value5.done;
if (done) {
r9 = value5;
break;
}
r3 = value5;
continue;
return _fun107164;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun107164() { // fn#107164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:914, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const object4 = {};
copyDataProperties(object4, env0_7, r9);
object4['guilds'] = guilds.map(_fun107183);
const Date = global.Date;
object4['lastFetchedAt'] = Date.now();
const Set = global.Set;
const value8 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(gameIds);
object4['lastFetchedGameIds'] = set instanceof Object ? set : value8;
object4['guildGameIds'] = object3;
}
function MOBILE_GAME_COMMUNITIES_DISMISS_GUILD({guildId}) { // fn#107184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3650, offset: 0x022f68f9, size: 107 bytes, params: 2, frame: 17
const object2 = {};
copyDataProperties(object2, env0_7, undefined);
const Set = global.Set;
const dismissedGuildIds = env0_7.dismissedGuildIds;
const items2 = [];
const value2 = arraySpread(items2, dismissedGuildIds, 0, undefined);
items2[value2] = guildId;
value2 + 1;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(items2);
object2['dismissedGuildIds'] = set instanceof Object ? set : value3;
}
function _fun107166(a0) { // fn#107166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:1362, offset: 0x022f635a, size: 330 bytes, params: 2, frame: 16
const MobileGameCommunitiesStore2 = MobileGameCommunitiesStore;
Inherits(MobileGameCommunitiesStore2, a0);
return CreateClass(MobileGameCommunitiesStore2, [{key: 'initialize', value: value_107168}, {key: 'getState',
value: value_107170}, {key: 'getPresentableUpsellGuilds', value: value_107172}, {key: 'hasGuilds',
value: function() {
return this.getPresentableUpsellGuilds().length > 0;
}}, {key: 'getLastFetchedAt', value: value_107175}, {key: 'getLastFetchedGameIds', value: value_107176},
{key: 'getGuildGameIds', value: value_107177}, {key: 'getDismissedGuildIds', value: value_107178},
{key: 'DEV_clearFetchCache', value: value_107179}, {key: 'DEV_clearDismissedGuilds', value: value_107180},
{key: 'DEV_clearState', value: value_107181}]);
function MobileGameCommunitiesStore() { // fn#107167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:1374, offset: 0x00c6223c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, MobileGameCommunitiesStore);
const value3 = env1_5(MobileGameCommunitiesStore);
return env1_4(this, _isNativeReflectConstruct_107160() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function LOGOUT_107185() { // fn#107185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3768, offset: 0x022f6964, size: 100 bytes, params: 1, frame: 11
const object2 = {guilds: [], lastFetchedAt: 0};
let Set = global.Set;
object2.lastFetchedGameIds = new Set();
Set = global.Set;
object2.dismissedGuildIds = new Set();
object2.guildGameIds = {};
}
function value_107168(a0) { // fn#107168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:1722, offset: 0x022f64a4, size: 159 bytes, params: 2, frame: 15
var environment;
var object;
var Set;
var lastFetchedGameIds;
var prototype;
var value;
var set;
var dismissedGuildIds;
if (a0 != null) {
object = {};
object.guilds = a0.guilds.map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var Set = global.Set;
object['features'] = new Set(a0.features);
return object;
});
object.lastFetchedAt = a0.lastFetchedAt;
Set = global.Set;
lastFetchedGameIds = a0.lastFetchedGameIds;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
object.lastFetchedGameIds = value;
Set = global.Set;
dismissedGuildIds = a0.dismissedGuildIds;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
object.dismissedGuildIds = value;
object.guildGameIds = a0.guildGameIds ?? ({});
value = environment.__proto__;
}
}
function value_107168(a0) { // fn#107168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:1722, offset: 0x022f64a4, size: 159 bytes, params: 2, frame: 15
var environment;
var object2;
var Set;
var lastFetchedGameIds;
var prototype;
var value;
var set;
var dismissedGuildIds;
if (a0 != null) {
object2 = {};
object2.guilds = a0.guilds.map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var Set = global.Set;
object['features'] = new Set(a0.features);
function value_107170() { // fn#107170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2012, offset: 0x022f657f, size: 125 bytes, params: 1, frame: 15
let object = {};
const guilds = env1_7.guilds;
object.guilds = guilds.map(function(a0) {
var r3;
var r4;
var object = {};
copyDataProperties(object, a0, r4);
var features = a0.features;
var items = [];
arraySpread(items, features, 0, r3);
object['features'] = items;
return object;
});
object.lastFetchedAt = env1_7.lastFetchedAt;
const lastFetchedGameIds = env1_7.lastFetchedGameIds;
const items3 = [];
arraySpread(items3, lastFetchedGameIds, 0, guilds);
object.lastFetchedGameIds = items3;
const dismissedGuildIds = env1_7.dismissedGuildIds;
const items2 = [];
arraySpread(items2, dismissedGuildIds, 0, guilds);
object.dismissedGuildIds = items2;
object.guildGameIds = env1_7.guildGameIds;
return object;
});
object2.lastFetchedAt = a0.lastFetchedAt;
Set = global.Set;
lastFetchedGameIds = a0.lastFetchedGameIds;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
object2.lastFetchedGameIds = value;
Set = global.Set;
dismissedGuildIds = a0.dismissedGuildIds;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
object2.dismissedGuildIds = value;
object2.guildGameIds = a0.guildGameIds ?? ({});
value = environment.__proto__;
}
function value_107172() { // fn#107172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2279, offset: 0x022f6629, size: 34 bytes, params: 1, frame: 11
return env1_7.guilds.filter(_fun107173);
function _fun107173({id}) { // fn#107173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2314, offset: 0x022f664b, size: 36 bytes, params: 2, frame: 11
const dismissedGuildIds = env2_7.dismissedGuildIds;
return !dismissedGuildIds.has(id);
}
}
function value_107175() { // fn#107175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2468, offset: 0x022f6689, size: 15 bytes, params: 1, frame: 1
return env1_7.lastFetchedAt;
}
function value_107176() { // fn#107176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2539, offset: 0x022f6698, size: 15 bytes, params: 1, frame: 1
return env1_7.lastFetchedGameIds;
}
function value_107177() { // fn#107177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2609, offset: 0x022f66a7, size: 15 bytes, params: 1, frame: 1
return env1_7.guildGameIds;
}
function value_107178() { // fn#107178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2678, offset: 0x022f66b6, size: 15 bytes, params: 1, frame: 1
return env1_7.dismissedGuildIds;
}
function value_107179() { // fn#107179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2751, offset: 0x022f66c5, size: 109 bytes, params: 1, frame: 14
const object = {};
copyDataProperties(object, env1_7, undefined);
object['guilds'] = [];
object['lastFetchedAt'] = 0;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
object['lastFetchedGameIds'] = set instanceof Object ? set : value2;
object['guildGameIds'] = {};
this.emitChange();
}
function value_107180() { // fn#107180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2898, offset: 0x022f6732, size: 74 bytes, params: 1, frame: 14
const object = {};
copyDataProperties(object, env1_7, undefined);
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
object['dismissedGuildIds'] = set instanceof Object ? set : value2;
this.emitChange();
}
function value_107181() { // fn#107181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2992, offset: 0x022f677c, size: 113 bytes, params: 1, frame: 12
const object = {guilds: [], lastFetchedAt: 0};
let Set = global.Set;
let set = new Set();
object.lastFetchedGameIds = set;
Set = global.Set;
object.dismissedGuildIds = new Set();
object.guildGameIds = {};
set = environment.__proto__;
this.emitChange();
}
}
}
function value_107170() { // fn#107170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2012, offset: 0x022f657f, size: 125 bytes, params: 1, frame: 15
const object2 = {};
const guilds = env1_7.guilds;
object2.guilds = guilds.map(function(a0) {
function MOBILE_GAME_COMMUNITIES_FETCH_SUCCESS({guilds, gameIds}) { // fn#107182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3293, offset: 0x022f67ed, size: 227 bytes, params: 2, frame: 19
var r9;
var r3;
var r4;
var object = {};
copyDataProperties(object, a0, r4);
var features = a0.features;
var items = [];
arraySpread(items, features, 0, r3);
object['features'] = items;
return object;
});
object2.lastFetchedAt = env1_7.lastFetchedAt;
const lastFetchedGameIds = env1_7.lastFetchedGameIds;
const items3 = [];
arraySpread(items3, lastFetchedGameIds, 0, guilds);
object2.lastFetchedGameIds = items3;
const dismissedGuildIds = env1_7.dismissedGuildIds;
const items2 = [];
arraySpread(items2, dismissedGuildIds, 0, guilds);
object2.dismissedGuildIds = items2;
object2.guildGameIds = env1_7.guildGameIds;
return object2;
}
var value4;
var game_id;
var id;
var value5;
const object = {};
copyDataProperties(object, env0_7.guildGameIds, r9);
const value2 = _createForOfIteratorHelperLoose_107163(guilds);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
while (true) {
value4 = r3.value;
game_id = value4.game_id;
if (game_id != null) {
id = value4.id;
game_id = value4.game_id;
object[id] = game_id;
}
value5 = value2();
done = value5.done;
if (done) {
r9 = value5;
break;
}
r3 = value5;
continue;
}
}
const object2 = {};
copyDataProperties(object2, env0_7, r9);
object2['guilds'] = guilds.map(_fun107183);
const Date = global.Date;
object2['lastFetchedAt'] = Date.now();
const Set = global.Set;
const value8 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(gameIds);
object2['lastFetchedGameIds'] = set instanceof Object ? set : value8;
object2['guildGameIds'] = object;
function _fun107183(a0) { // fn#107183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3501, offset: 0x022f68d0, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (GuildDiscoveryUtilsModule).makeDiscoverableGuild(a0);
}
function value_107172() { // fn#107172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2279, offset: 0x022f6629, size: 34 bytes, params: 1, frame: 11
return env1_7.guilds.filter(_fun107173);
}
}
function value_107175() { // fn#107175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2468, offset: 0x022f6689, size: 15 bytes, params: 1, frame: 1
return env1_7.lastFetchedAt;
}
function MOBILE_GAME_COMMUNITIES_DISMISS_GUILD({guildId}) { // fn#107184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3650, offset: 0x022f68f9, size: 107 bytes, params: 2, frame: 17
const object = {};
copyDataProperties(object, env0_7, undefined);
const Set = global.Set;
const dismissedGuildIds = env0_7.dismissedGuildIds;
const items2 = [];
const value2 = arraySpread(items2, dismissedGuildIds, 0, undefined);
items2[value2] = guildId;
value2 + 1;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(items2);
object['dismissedGuildIds'] = set instanceof Object ? set : value3;
}
function value_107176() { // fn#107176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2539, offset: 0x022f6698, size: 15 bytes, params: 1, frame: 1
return env1_7.lastFetchedGameIds;
}
function LOGOUT_107185() { // fn#107185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3768, offset: 0x022f6964, size: 100 bytes, params: 1, frame: 11
const object = {guilds: [], lastFetchedAt: 0};
let Set = global.Set;
object.lastFetchedGameIds = new Set();
Set = global.Set;
object.dismissedGuildIds = new Set();
object.guildGameIds = {};
}
function value_107177() { // fn#107177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2609, offset: 0x022f66a7, size: 15 bytes, params: 1, frame: 1
return env1_7.guildGameIds;
}
function value_107178() { // fn#107178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2678, offset: 0x022f66b6, size: 15 bytes, params: 1, frame: 1
return env1_7.dismissedGuildIds;
}
function value_107179() { // fn#107179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2751, offset: 0x022f66c5, size: 109 bytes, params: 1, frame: 14
const object2 = {};
copyDataProperties(object2, env1_7, undefined);
object2['guilds'] = [];
object2['lastFetchedAt'] = 0;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
object2['lastFetchedGameIds'] = set instanceof Object ? set : value2;
object2['guildGameIds'] = {};
this.emitChange();
}
function value_107180() { // fn#107180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2898, offset: 0x022f6732, size: 74 bytes, params: 1, frame: 14
const object2 = {};
copyDataProperties(object2, env1_7, undefined);
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
object2['dismissedGuildIds'] = set instanceof Object ? set : value2;
this.emitChange();
}
function value_107181() { // fn#107181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2992, offset: 0x022f677c, size: 113 bytes, params: 1, frame: 12
const object2 = {guilds: [], lastFetchedAt: 0};
let Set = global.Set;
let set = new Set();
object2.lastFetchedGameIds = set;
Set = global.Set;
object2.dismissedGuildIds = new Set();
object2.guildGameIds = {};
set = environment.__proto__;
this.emitChange();
}
function _fun107183(a0) { // fn#107183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:3501, offset: 0x022f68d0, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(6946) /* metro dependency 6946: GuildDiscoveryUtils */).makeDiscoverableGuild(a0);
}
function _fun107173({id}) { // fn#107173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14359:2314, offset: 0x022f664b, size: 36 bytes, params: 2, frame: 11
const dismissedGuildIds = env2_7.dismissedGuildIds;
return !dismissedGuildIds.has(id);
}
global.__d(_fun107159, 14162, [6, 7, 15, 17, 18, 6946, 566, 694,
2]) /* metro module 14162, dependencies: [6, 7, 15, 17, 18, 6946, 566, 694, 2] */;