Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

File diff suppressed because it is too large. Load diff
+411
View File
@@ -0,0 +1,411 @@
/* Metro module 9589; source: modules/icymi/ICYMIAnalytics.tsx; dependencies: [9569, 661, 8370, 7230, 683, 2] */
function _fun75101(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:6, offset: 0x01da2b0e, size: 429 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ChannelTypes;
const env0_5 = constantsModule.AnalyticEvents;
object2 = {trackItemInteraction: trackItemInteraction, trackItemShortImpression: trackItemShortImpression,
trackItemLongImpression: trackItemLongImpression, trackFeedLoaded: trackFeedLoaded,
trackFeedShown: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var FEED_SHOWN = AnalyticEvents.FEED_SHOWN;
var object = {};
object.load_id = ICYMIStore.getLoadId();
object.home_session_id = a0.homeSessionId;
object.variant = a0.variant;
defaultImport.track(FEED_SHOWN, object);
}, trackFeedFirstScrollStarted: function() {
var defaultImport = importDefault(dependencyMap[4]);
var HOME_FIRST_SCROLL_STARTED = AnalyticEvents.HOME_FIRST_SCROLL_STARTED;
var object = {};
object.load_id = ICYMIStore.getLoadId();
object.home_session_id = 'gravity';
defaultImport.track(HOME_FIRST_SCROLL_STARTED, object);
}, trackFeedFeedbackPromptViewed: function() {
importDefault(dependencyMap[4]).track(AnalyticEvents.HOME_FEEDBACK_PROMPT_VIEWED);
}, trackFeedFeedbackSubmitted: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var HOME_FEEDBACK_SUBMITTED = AnalyticEvents.HOME_FEEDBACK_SUBMITTED;
var object = {};
object.load_id = ICYMIStore.getLoadId();
object.home_session_id = 'gravity';
copyDataProperties(object, a0, ICYMIStore);
defaultImport.track(HOME_FEEDBACK_SUBMITTED, object);
}, trackFeedOnboardingScreenSkipped: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var ICYMI_ONBOARDING_SCREEN_SKIPPED = AnalyticEvents.ICYMI_ONBOARDING_SCREEN_SKIPPED;
defaultImport.track(ICYMI_ONBOARDING_SCREEN_SKIPPED, {location: a0.location});
}, trackFeedOnboardingGuildToggled: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var ICYMI_ONBOARDING_GUILD_TOGGLED = AnalyticEvents.ICYMI_ONBOARDING_GUILD_TOGGLED;
defaultImport.track(ICYMI_ONBOARDING_GUILD_TOGGLED, {guild_id: a0.guildId, toggled: a0.toggled});
}, trackFeedOnboardingCategoryToggled: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var ICYMI_ONBOARDING_CATEGORY_TOGGLED = AnalyticEvents.ICYMI_ONBOARDING_CATEGORY_TOGGLED;
defaultImport.track(ICYMI_ONBOARDING_CATEGORY_TOGGLED, {category_id: a0.categoryId, toggled: a0.toggled});
}, trackFeedEmptyLoadingSeen: function() {
var defaultImport = importDefault(dependencyMap[4]);
var ICYMI_FEED_EMPTY_LOADING_SEEN = AnalyticEvents.ICYMI_FEED_EMPTY_LOADING_SEEN;
var object = {};
object.load_id = ICYMIStore.getLoadId();
object.version = ICYMIStore.getVersion();
defaultImport.track(ICYMI_FEED_EMPTY_LOADING_SEEN, object);
}, trackFeedEmptyLoadingComplete: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var ICYMI_FEED_EMPTY_LOADING_COMPLETE = AnalyticEvents.ICYMI_FEED_EMPTY_LOADING_COMPLETE;
var object = {};
object.load_id = ICYMIStore.getLoadId();
object.dwell_time_ms = a0.dwellTimeMs;
object.version = ICYMIStore.getVersion();
defaultImport.track(ICYMI_FEED_EMPTY_LOADING_COMPLETE, object);
}, trackFeedEmptyLoadingAbandoned: function(a0) {
var defaultImport = importDefault(dependencyMap[4]);
var ICYMI_FEED_EMPTY_LOADING_ABANDONED = AnalyticEvents.ICYMI_FEED_EMPTY_LOADING_ABANDONED;
var object = {};
object.load_id = ICYMIStore.getLoadId();
object.dwell_time_ms = a0.dwellTimeMs;
object.version = ICYMIStore.getVersion();
defaultImport.track(ICYMI_FEED_EMPTY_LOADING_ABANDONED, object);
}, trackFeedSessionStarted: trackFeedSessionStarted, trackFeedSessionCompleted: trackFeedSessionCompleted,
trackFeedItemDwell1s: trackFeedItemDwell1s, trackFeedItemDwelled: trackFeedItemDwelled,
trackFeedItemActioned: trackFeedItemActioned, trackFeedFilterActioned: trackFeedFilterActioned,
trackFeedPageActioned: trackFeedPageActioned};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIAnalytics.tsx');
exports.DEFAULT_UX_VARIATION = 'default';
exports.ICYMIAnalytics = object2;
}
function listItemToType(a0) { // fn#75102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:167, offset: 0x01da2cbb, size: 239 bytes, params: 2, frame: 16
const kind = a0.data.kind;
if (kind === 'end') {
return 'end';
}
if (kind === 'loading') {
return 'loading';
}
const value = 'message';
if (value === kind) {
return a0.channelType !== ChannelTypes.GUILD_ANNOUNCEMENT ? value : 'announcement';
}
if (kind === 'guildEvent') {
return 'guild_event';
}
if (kind === 'contentInventory') {
return a0.data.content.content_type !== (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType.CUSTOM_STATUS ? 'hotwheels_gaming_activity' : 'hotwheels_custom_status';
}
if (kind === 'recommendedGuilds') {
return 'recommended_guilds';
}
if (kind === 'forumThread') {
return 'forum_thread';
}
if (kind === 'icymiHeader') {
return 'icymi_header';
}
return 'unknown';
}
function dehydratedItemToType(a0) { // fn#75103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:701, offset: 0x01da2daa, size: 256 bytes, params: 2, frame: 15
const type = a0.type;
const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
if (MESSAGE === type) {
return a0.data.channel_type !== ChannelTypes.GUILD_ANNOUNCEMENT ? 'message' : 'announcement';
}
const ACTIVITY = ICYMIItemTypes.ACTIVITY;
if (ACTIVITY === type) {
return 'hotwheels_gaming_activity';
}
const CUSTOM_STATUS = ICYMIItemTypes.CUSTOM_STATUS;
if (CUSTOM_STATUS === type) {
return 'hotwheels_custom_status';
}
const GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
if (GUILD_EVENT === type) {
return 'guild_event';
}
const RECOMMENDED_GUILDS = ICYMIItemTypes.RECOMMENDED_GUILDS;
if (RECOMMENDED_GUILDS === type) {
return 'recommended_guilds';
}
}
function trackItemInteraction(a0) { // fn#75104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:1115, offset: 0x01da2eaa, size: 189 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_ITEM_INTERACTED = AnalyticEvents.FEED_ITEM_INTERACTED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.feed_item_type = a0.type;
object2.feed_item_id = a0.id;
object2.home_session_id = 'gravity';
object2.action_type = a0.actionType;
object2.feed_item_index = ICYMIStore.getIndexInHydratedFeed(a0.id);
object2.icymi_session_id = a0.icymiSessionId;
object2.impression_id = a0.impressionId;
object2.ux_variation = a0.uxVariation;
object2.session_interaction_index = a0.sessionInteractionIndex;
Reflect.apply(track, defaultImport, [FEED_ITEM_INTERACTED, object2]);
}
function trackItemShortImpression(a0, a1, a2) { // fn#75105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:1482, offset: 0x01da2f67, size: 234 bytes, params: 4, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_ITEM_SEEN_BATCH = AnalyticEvents.FEED_ITEM_SEEN_BATCH;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.home_session_id = 'gravity';
object2.feed_item_ids = a0.map(function(a0) {
return a0.item.id;
});
object2.feed_item_types = a0.map(function(a0) {
return listItemToType(a0.item);
});
object2.num_items = a0.length;
object2.all_feed_item_ids = a1.map(function(a0) {
return a0.id;
});
object2.all_feed_item_types = a1.map(function(a0) {
return a0.type;
});
object2.num_all_items = a1.length;
object2.all_feed_item_indices = a1.map(function(a0, a1) {
return a1;
});
object2.feed_version = a2;
object2.version = 3;
Reflect.apply(track, defaultImport, [FEED_ITEM_SEEN_BATCH, object2]);
}
function trackItemLongImpression(a0, a1, a2) { // fn#75111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:1871, offset: 0x01da3069, size: 234 bytes, params: 4, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_ITEM_SEEN_LONG = AnalyticEvents.FEED_ITEM_SEEN_LONG;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.home_session_id = 'gravity';
object2.feed_item_ids = a0.map(function(a0) {
return a0.item.id;
});
object2.feed_item_types = a0.map(function(a0) {
return listItemToType(a0.item);
});
object2.num_items = a0.length;
object2.all_feed_item_ids = a1.map(function(a0) {
return a0.id;
});
object2.all_feed_item_types = a1.map(function(a0) {
return a0.type;
});
object2.num_all_items = a1.length;
object2.all_feed_item_indices = a1.map(function(a0, a1) {
return a1;
});
object2.feed_version = a2;
object2.version = 3;
Reflect.apply(track, defaultImport, [FEED_ITEM_SEEN_LONG, object2]);
}
function trackFeedLoaded({unreadFeedItems, readFeedItems, newTrackingProps, homeSessionId, hasNewContent}) { // fn#75117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:2258, offset: 0x01da3153, size: 222 bytes, params: 2, frame: 21
unreadFeedItems.forEach(_fun75118);
readFeedItems.forEach(_fun75119);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_LOADED = AnalyticEvents.FEED_LOADED;
const object2 = {};
copyDataProperties(object2, newTrackingProps, undefined);
object2['home_session_id'] = homeSessionId;
object2['tab_badged'] = hasNewContent;
object2['unread_feed_item_ids'] = [];
object2['read_feed_item_ids'] = [];
object2['unread_feed_item_types'] = [];
object2['read_feed_item_types'] = [];
Reflect.apply(track, defaultImport, [FEED_LOADED, object2]);
}
function trackFeedSessionStarted({sessionStartTimeMs, icymiSessionId, previousIcymiSessionCount, uxVariation}) { // fn#75130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:3923, offset: 0x01da35be, size: 131 bytes, params: 2, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_SESSION_STARTED = AnalyticEvents.FEED_SESSION_STARTED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.version = ICYMIStore.getVersion();
object2.session_start_time_ms = sessionStartTimeMs;
object2.icymi_session_id = icymiSessionId;
object2.previous_icymi_session_count = previousIcymiSessionCount;
object2.ux_variation = uxVariation;
Reflect.apply(track, defaultImport, [FEED_SESSION_STARTED, object2]);
}
function trackFeedSessionCompleted({sessionDurationMs, sessionStartTimeMs, sessionEndTimeMs, impressionCount, uniqueImpressionCount, icymiSessionId, feedReloadCount, feedDwelledItemsChangedCount, feedFetchCount, impressionItemTypes, latestDwellStartTimeMs, previousIcyMiSessionCount, uxVariation, interactionCount, dwelledCount, uniqueDwelledCount}) { // fn#75131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:4197, offset: 0x01da3641, size: 285 bytes, params: 2, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_SESSION_COMPLETED = AnalyticEvents.FEED_SESSION_COMPLETED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.version = ICYMIStore.getVersion();
object2.session_duration_ms = sessionDurationMs;
object2.session_start_time_ms = sessionStartTimeMs;
object2.session_end_time_ms = sessionEndTimeMs;
object2.impression_count = impressionCount;
object2.unique_impression_count = uniqueImpressionCount;
object2.icymi_session_id = icymiSessionId;
object2.feed_reload_count = feedReloadCount;
object2.feed_visible_items_changed_count = feedDwelledItemsChangedCount;
object2.feed_fetch_count = feedFetchCount;
object2.impression_item_types = impressionItemTypes;
object2.latest_dwell_start_time_ms = latestDwellStartTimeMs;
object2.previous_icymi_session_count = previousIcyMiSessionCount;
object2.ux_variation = uxVariation;
object2.interaction_count = interactionCount;
object2.dwelled_count = dwelledCount;
object2.unique_dwelled_count = uniqueDwelledCount;
Reflect.apply(track, defaultImport, [FEED_SESSION_COMPLETED, object2]);
}
function trackFeedItemDwell1s({impressionId, itemId, itemType, dwellStartTimeMs, icymiSessionId, triggerType, itemOccurenceCountInSession, itemFeedIndex, isInitiallyVisible, itemScore, itemChannelType, itemCardHeight, isDwelling, interactionActionTypes, interactionCount, uxVariation, sessionImpressionIndex}) { // fn#75132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:4975, offset: 0x01da375e, size: 288 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_ITEM_1S_DWELLED = AnalyticEvents.FEED_ITEM_1S_DWELLED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.version = ICYMIStore.getVersion();
object2.impression_id = impressionId;
object2.item_id = itemId;
object2.item_type = itemType;
object2.dwell_start_time_ms = dwellStartTimeMs;
object2.icymi_session_id = icymiSessionId;
object2.trigger_type = triggerType;
object2.item_occurence_count_in_session = itemOccurenceCountInSession;
object2.item_feed_index = itemFeedIndex;
object2.is_initially_visible = isInitiallyVisible;
object2.item_score = itemScore;
object2.item_channel_type = itemChannelType ?? null;
object2.item_card_height = itemCardHeight;
object2.is_dwelling = isDwelling;
object2.interaction_action_types = interactionActionTypes;
object2.interaction_count = interactionCount;
object2.ux_variation = uxVariation;
object2.session_impression_index = sessionImpressionIndex;
Reflect.apply(track, defaultImport, [FEED_ITEM_1S_DWELLED, object2]);
}
function trackFeedItemDwelled({impressionId, dwellTimeMs, itemId, itemType, dwellStartTimeMs, dwellEndTimeMs, icymiSessionId, triggerType, itemOccurenceCountInSession, itemFeedIndex, isInitiallyVisible, itemScore, itemChannelType, itemCardHeight, uxVariation, interactionActionTypes, interactionCount, sessionImpressionIndex}) { // fn#75133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:5693, offset: 0x01da387e, size: 299 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_ITEM_DWELLED = AnalyticEvents.FEED_ITEM_DWELLED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.version = ICYMIStore.getVersion();
object2.impression_id = impressionId;
object2.dwell_time_ms = dwellTimeMs;
object2.item_id = itemId;
object2.item_type = itemType;
object2.dwell_start_time_ms = dwellStartTimeMs;
object2.dwell_end_time_ms = dwellEndTimeMs;
object2.icymi_session_id = icymiSessionId;
object2.trigger_type = triggerType;
object2.item_occurence_count_in_session = itemOccurenceCountInSession;
object2.item_feed_index = itemFeedIndex;
object2.is_initially_visible = isInitiallyVisible;
object2.item_score = itemScore;
object2.item_channel_type = itemChannelType ?? null;
object2.item_card_height = itemCardHeight;
object2.ux_variation = uxVariation;
object2.interaction_action_types = interactionActionTypes;
object2.interaction_count = interactionCount;
object2.session_impression_index = sessionImpressionIndex;
Reflect.apply(track, defaultImport, [FEED_ITEM_DWELLED, object2]);
}
function trackFeedItemActioned(a0) { // fn#75134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:6446, offset: 0x01da39a9, size: 233 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_ITEM_ACTIONED = AnalyticEvents.FEED_ITEM_ACTIONED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.icymi_session_id = a0.icymiSessionId;
object2.ux_variation = a0.uxVariation;
object2.version = ICYMIStore.getVersion();
object2.session_action_index = a0.sessionActionIndex;
object2.item_id = a0.itemId;
object2.item_type = a0.itemType;
const impressionId = a0.impressionId;
const value = null;
object2.impression_id = value != impressionId ? impressionId : value;
object2.action_gesture_type = a0.actionParameters.actionGestureType;
object2.action_target_element = a0.actionParameters.actionTargetElement;
object2.action_intent_type = a0.actionParameters.actionIntentType;
object2.action_destination_type = a0.actionParameters.actionDestinationType;
Reflect.apply(track, defaultImport, [FEED_ITEM_ACTIONED, object2]);
}
function trackFeedFilterActioned(a0) { // fn#75135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:6986, offset: 0x01da3a92, size: 427 bytes, params: 2, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_FILTER_ACTIONED = AnalyticEvents.FEED_FILTER_ACTIONED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.icymi_session_id = a0.icymiSessionId;
object2.ux_variation = a0.uxVariation;
object2.version = ICYMIStore.getVersion();
object2.session_action_index = a0.sessionActionIndex;
object2.filter_setting_context = a0.filterParameters.filterSettingContext;
object2.filter_target_type = a0.filterParameters.filterTargetType;
const targetGuildId = a0.filterParameters.targetGuildId;
const value = null;
object2.target_guild_id = value != targetGuildId ? targetGuildId : value;
const targetChannelId = a0.filterParameters.targetChannelId;
object2.target_channel_id = value != targetChannelId ? targetChannelId : value;
const previousTuneSetting = a0.filterParameters.previousTuneSetting;
object2.previous_tune_setting = value != previousTuneSetting ? previousTuneSetting : value;
const newTuneSetting = a0.filterParameters.newTuneSetting;
object2.new_tune_setting = value != newTuneSetting ? newTuneSetting : value;
const previousOutSetting = a0.filterParameters.previousOutSetting;
object2.previous_out_setting = value != previousOutSetting ? previousOutSetting : value;
const newOutSetting = a0.filterParameters.newOutSetting;
object2.new_out_setting = value != newOutSetting ? newOutSetting : value;
const itemId = a0.itemId;
object2.item_id = value != itemId ? itemId : value;
const itemType = a0.itemType;
object2.item_type = value != itemType ? itemType : value;
const impressionId = a0.impressionId;
object2.impression_id = value != impressionId ? impressionId : value;
Reflect.apply(track, defaultImport, [FEED_FILTER_ACTIONED, object2]);
}
function trackFeedPageActioned(a0) { // fn#75136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:7884, offset: 0x01da3c3d, size: 188 bytes, params: 2, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEED_PAGE_ACTIONED = AnalyticEvents.FEED_PAGE_ACTIONED;
const object2 = {};
object2.load_id = ICYMIStore.getLoadId();
object2.icymi_session_id = a0.icymiSessionId;
object2.ux_variation = a0.uxVariation;
object2.version = ICYMIStore.getVersion();
object2.session_action_index = a0.sessionActionIndex;
object2.action_gesture_type = a0.actionParameters.actionGestureType;
object2.action_target_element = a0.actionParameters.actionTargetElement;
object2.action_intent_type = a0.actionParameters.actionIntentType;
object2.action_destination_type = a0.actionParameters.actionDestinationType;
Reflect.apply(track, defaultImport, [FEED_PAGE_ACTIONED, object2]);
}
function _fun75118(a0) { // fn#75118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:2328, offset: 0x01da3231, size: 55 bytes, params: 2, frame: 13
let binding = env0_0;
binding.push(a0.id);
binding = env0_2;
binding.push(dehydratedItemToType(a0));
}
function _fun75119(a0) { // fn#75119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9775:2405, offset: 0x01da3268, size: 55 bytes, params: 2, frame: 13
let binding = env0_1;
binding.push(a0.id);
binding = env0_3;
binding.push(dehydratedItemToType(a0));
}
@@ -0,0 +1,32 @@
/* Metro module 4695; source: modules/icymi/ICYMIAttachmentUploadTarget.tsx; dependencies: [6, 7, 661, 4651, 2] */
function _fun40590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4873:6, offset: 0x0110585e, size: 174 bytes, params: 8, frame: 19
const env0_0 = require;
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 */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_4 = value.Endpoints;
const env0_5 = value.MAX_ATTACHMENT_SIZE;
const env0_6 = value.MAX_UPLOAD_COUNT;
value = _fun40591();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIAttachmentUploadTarget.tsx');
exports.default = value;
}
function _fun40591() { // fn#40591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4873:187, offset: 0x0110590c, size: 176 bytes, params: 1, frame: 15
return env0_3(ICYMIAttachmentUploadTarget, [{key: 'getCreateAttachmentURL', value: function() {
return Endpoints.GRAVITY_ATTACHMENTS;
}}, {key: 'getDeleteUploadURL', value: function(a0) {
return Endpoints.MESSAGE_DELETE_UPLOAD(a0);
}}, {key: 'getMaxFileSize', value: function() {
return MAX_ATTACHMENT_SIZE;
}}, {key: 'getMaxAttachmentsCount', value: function() {
return MAX_UPLOAD_COUNT;
}}, {key: 'getMaxTotalAttachmentSize', value: function() {
return require(dependencyMap[3]).MAX_TOTAL_ATTACHMENT_SIZE;
}}, {key: 'shouldReactNativeCompressUploads', get: function() {
return true;
}}]);
}
+12
View File
@@ -0,0 +1,12 @@
/* Metro module 14814; source: modules/icymi/ICYMIConstants.tsx; dependencies: [672, 2] */
function _fun111818(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15011:6, offset: 0x023b3671, size: 121 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const MINUTE = Millis.MINUTE;
const value = 15 * MINUTE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIConstants.tsx');
exports.NUM_GUILDS_EXTENDED_ONBOARDING = 3;
exports.SCROLL_EVENT_THROTTLE_MS = value;
}
+37
View File
@@ -0,0 +1,37 @@
/* Metro module 9581; source: modules/icymi/ICYMIExperiment.tsx; dependencies: [9582, 1854, 9584, 2] */
function _fun75055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9767:6, offset: 0x01da14c4, size: 360 bytes, params: 8, frame: 25
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const labFeatureStore = importDefault(9582) /* metro dependency 9582: LabFeatureStore */;
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-04-icymi-staff-only', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const apexExperiment = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-03-icymi-staff-debugging-utility',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const apexExperiment2 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-03-icymi-desktop',
'kind': 'user', defaultConfig: {icymiDesktopEnabled: false}, variations: {[1]: {icymiDesktopEnabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIExperiment.tsx');
exports.ICYMI_LAB_FEATURE = 'hide_icymi_tab';
exports.ICYMIStaffOnlyExperiment = value;
exports.useICYMIEnabled = useICYMIEnabled;
exports.getICYMIEnabled = getICYMIEnabled;
exports.ICYMIStaffDebuggingUtilityExperiment = apexExperiment;
exports.ICYMIDesktopExperiment = apexExperiment2;
}
function useICYMIEnabled(a0) { // fn#75056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9767:698, offset: 0x01da162c, size: 97 bytes, params: 2, frame: 15
const value2 = (importDefault(9584) /* metro dependency 9584: useLabFeature */)('hide_icymi_tab');
const binding = env0_3;
const useConfig = binding.useConfig;
const enabled = Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
env0_4.useConfig({location: a0});
return !value2 && enabled;
}
function getICYMIEnabled(a0) { // fn#75057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9767:837, offset: 0x01da168d, size: 63 bytes, params: 2, frame: 13
const value2 = LabFeatureStore.get('hide_icymi_tab');
const binding = env0_3;
const getConfig = binding.getConfig;
return !value2 && Reflect.apply(getConfig, binding, [{location: a0}]).enabled;
}
@@ -0,0 +1,73 @@
/* Metro module 9577; source: modules/icymi/ICYMIFiltersStore.tsx; dependencies: [6, 7, 15, 17, 18, 7230, 566, 694, 2] */
function _fun74935(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9763:6, offset: 0x01d9e122, size: 287 bytes, params: 8, frame: 19
const env0_0 = require;
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 */;
let env0_7 = {};
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
let value = _fun74939(DeviceSettingsStore);
value.displayName = 'ICYMIFiltersStore';
value.persistKey = 'ICYMIFiltersStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {SET_ICYMI_FILTERS: function(a0) {
env0_7 = a0.filters;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIFiltersStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_74936() { // fn#74936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9763:148, offset: 0x01d9e241, 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_74936_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun74939(a0) { // fn#74939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9763:356, offset: 0x01d9e2a3, size: 174 bytes, params: 2, frame: 16
const closure = ICYMIFiltersStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_74941}, {key: 'filterStaffContent', value: value_74942},
{key: 'getDoubleTapBehavior', value: value_74943}, {key: 'getState', value: value_74944},
{key: 'getUserAgnosticState', value: value_74945}]);
}
function value_74941(a0) { // fn#74941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9763:671, offset: 0x01d9e351, size: 22 bytes, params: 2, frame: 2
const r1 = a0 ?? ({});
value = environment.__proto__;
}
function value_74942() { // fn#74942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9763:732, offset: 0x01d9e367, size: 21 bytes, params: 1, frame: 2
return env1_7.filterStaffContent === true;
}
function value_74943() { // fn#74943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9763:811, offset: 0x01d9e37c, size: 57 bytes, params: 1, frame: 12
return env1_7.doubleTapBehavior ?? (require(7230) /* metro dependency 7230: ICYMITypes */).GravityICYMIDoubleTapBehavior.DEFAULT;
}
+10
View File
@@ -0,0 +1,10 @@
/* Metro module 9586; source: modules/icymi/ICYMIItemTypes.tsx; dependencies: [2] */
function _fun75074(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9772:6, offset: 0x01da1b4e, size: 114 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const set = new Set(['end', 'loading', 'bottomLoading', 'icymiHeader', 'recommendedGuilds']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIItemTypes.tsx');
exports.NON_ELIGIBLE_SCROLL_ITEMS = set;
}
+95
View File
@@ -0,0 +1,95 @@
/* Metro module 13087; source: modules/icymi/ICYMIManager.tsx; dependencies: [6, 7, 15, 17, 18, 9580, 672, 694, 9581, 4561, 2] */
function _fun99996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:6, offset: 0x021db75c, size: 247 bytes, params: 8, frame: 19
const env0_0 = require;
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 */;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun100002(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_99997() { // fn#99997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:148, offset: 0x021db853, 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_99997_isNativeReflectConstruct = function() {
return !!result;
})();
}
function fetchDehydratedData() { // fn#100000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:352, offset: 0x021db8b5, size: 147 bytes, params: 1, frame: 15
const value = a0;
const r5 = value !== undefined ? value : false;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
defaultImport.fetchDehydrated({isInitialLoad: r5});
if (env0_8 != null) {
global.clearTimeout(env0_8);
}
const setTimeout = global.setTimeout;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const MINUTE = Millis.MINUTE;
env0_8 = setTimeout(function() {
fetchDehydratedData();
}, 15 * MINUTE);
}
function _fun100002(a0) { // fn#100002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:528, offset: 0x021db957, size: 122 bytes, params: 2, frame: 16
const closure = ICYMIManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: value_100004}, {key: '_terminate', value: value_100005},
{key: 'handlePostConnectionOpen', value: value_100006}]);
}
function value_100004() { // fn#100004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:819, offset: 0x021db9d1, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function value_100005() { // fn#100005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:928, offset: 0x021dba05, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function value_100006() { // fn#100006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13277:1053, offset: 0x021dba39, size: 107 bytes, params: 1, frame: 14
let value = environment.__proto__;
const icymiExperimentModule = require(9581) /* metro dependency 9581: ICYMIExperiment */;
const getICYMIEnabled = icymiExperimentModule.getICYMIEnabled;
if (Reflect.apply(getICYMIEnabled, icymiExperimentModule, ['ICYMIManager'])) {
fetchDehydratedData(true);
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
value.getGuildChannelScores();
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
value.getRecommendedGuilds();
}
}
@@ -0,0 +1,93 @@
/* Metro module 14846; source: modules/icymi/ICYMIPopularGuildsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 1418, 6946, 566, 694, 2] */
function _fun112150(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15043:6, offset: 0x023bcfc3, size: 323 bytes, params: 8, frame: 19
const env0_0 = require;
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 */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let env0_8 = [];
let env0_9 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun112154(Store);
value.displayName = 'ICYMIPopularGuildsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{LOAD_ICYMI_POPULAR_GUILDS: LOAD_ICYMI_POPULAR_GUILDS, LOGOUT: function() {
env0_8 = [];
env0_9 = [];
env0_10 = 0;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIPopularGuildsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_112151() { // fn#112151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15043:158, offset: 0x023bd106, 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_112151_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun112154(a0) { // fn#112154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15043:375, offset: 0x023bd168, size: 153 bytes, params: 2, frame: 16
const closure = ICYMIPopularGuildsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore);
}}, {key: 'getOnboardingCategoryIds', value: value_112157}, {key: 'getOnboardingGuilds', value: value_112158},
{key: 'getCurrentOnboardingGuildOffset', value: value_112159}]);
}
function LOAD_ICYMI_POPULAR_GUILDS({categoryIds, guilds, offset}) { // fn#112160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15043:1036, offset: 0x023bd201, size: 229 bytes, params: 2, frame: 21
env0_9 = offset === 0 ? [] : env0_9;
let Set = global.Set;
const binding = env0_9;
let set = new Set(binding.map(function(a0) {
return a0.id;
}));
Set = global.Set;
set = new Set(GuildStore.getGuildIds());
const value9 = guilds.map(_fun112162).filter(_fun112163);
const binding2 = env0_9;
const items2 = [];
arraySpread(items2, value9, arraySpread(items2, binding2, 0, binding), binding);
}
function _fun112162(a0) { // fn#112162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15043:1198, offset: 0x023bd2e6, size: 64 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = require(1418) /* metro dependency 1418: GuildRecordUtils */;
const fromClientDiscoverableGuild = value.fromClientDiscoverableGuild;
const guildDiscoveryUtilsModule = require(6946) /* metro dependency 6946: GuildDiscoveryUtils */;
return Reflect.apply(fromClientDiscoverableGuild, value, [guildDiscoveryUtilsModule.makeDiscoverableGuild(a0)]);
}
function _fun112163(a0) { // fn#112163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15043:1281, offset: 0x023bd326, size: 55 bytes, params: 2, frame: 13
const binding = env0_1;
return !binding.has(a0.id) && !env0_0.has(a0.id);
}
+946
View File
@@ -0,0 +1,946 @@
/* Metro module 12954; source: modules/icymi/ICYMISessionStore.tsx; dependencies: [15, 17, 18, 6, 7, 4107, 1220, 9582, 1226, 9569, 491, 9589, 566, 694, 2] */
function _fun98705(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:6, offset: 0x021b29f7, size: 647 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_98711 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = ICYMI_TAB_OPENED_98714;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
const labFeatureStore = importDefault(9582) /* metro dependency 9582: LabFeatureStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const env0_13 = [];
const Map = global.Map;
let map = new Map();
map = _fun98715();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value5 = new _fun98753(Store)(importDefault(694) /* metro dependency 694: Dispatcher */,
{ICYMI_TAB_OPENED: closure, ICYMI_TAB_CLOSED: function() {
return endCurrentSession();
}, ICYMI_SET_FOCUSED_TAB: ICYMI_SET_FOCUSED_TAB_98759, ICYMI_ITEMS_DWELL_START: ICYMI_ITEMS_DWELL_START,
ICYMI_ITEMS_LONG_IMPRESSION: ICYMI_ITEMS_LONG_IMPRESSION, RELOAD_ICYMI: RELOAD_ICYMI_98763,
LOAD_ICYMI_DEHYDRATED: LOAD_ICYMI_DEHYDRATED_98764, APP_STATE_UPDATE: APP_STATE_UPDATE_98765,
CHANNEL_SELECT: CHANNEL_SELECT_98766, ICYMI_SET_CARD_HEIGHT: ICYMI_SET_CARD_HEIGHT,
ICYMI_ITEM_INTERACTED: ICYMI_ITEM_INTERACTED, ICYMI_FEED_ITEM_ACTIONED: ICYMI_FEED_ITEM_ACTIONED,
ICYMI_FEED_FILTER_ACTIONED: ICYMI_FEED_FILTER_ACTIONED, ICYMI_FEED_PAGE_ACTIONED: ICYMI_FEED_PAGE_ACTIONED});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMISessionStore.tsx');
exports.default = value5;
exports.resetGlobalState = resetGlobalState;
exports.ICYMISession = map;
}
function _isNativeReflectConstruct_98706() { // fn#98706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:211, offset: 0x021b2c7e, 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_98706_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_98709(a0, a1) { // fn#98709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:404, offset: 0x021b2ce0, 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 _fun98710;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_98711(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') {
value = _arrayLikeToArray_98711(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_98711(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun98710;
}
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 endCurrentSession() { // fn#98712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:9871, offset: 0x021b2e54, size: 34 bytes, params: 1, frame: 10
var r0;
const value2 = env0_12 != null;
if (value2) {
env0_12.endSession();
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function endCurrentSessionImpressions() { // fn#98713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:9936, offset: 0x021b2e76, size: 34 bytes, params: 1, frame: 10
var r0;
const value2 = env0_12 != null;
if (value2) {
env0_12.endAllImpressions();
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function ICYMI_TAB_OPENED_98714() { // fn#98714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:10019, offset: 0x021b2e98, size: 68 bytes, params: 1, frame: 15
var r0;
var value4;
if (env0_13.length > 0) {
value4 = new env0_16(env0_13, 'focus');
r0 = true;
} else {
r0 = endCurrentSession();
}
return r0;
}
function _fun98715() { // fn#98715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:1356, offset: 0x021b2edc, size: 725 bytes, params: 1, frame: 15
return env0_6(ICYMISession, [{key: 'sessionId', get: function() {
return this._sessionId;
}}, {key: 'startTimestamp', get: function() {
return this._startTimestamp;
}}, {key: 'endTimestamp', get: function() {
return this._endTimestamp;
}}, {key: 'dwellCount', get: function() {
return this._dwellCount;
}}, {key: 'uniqueDwellCount', get: function() {
return this._dwelledItemIdMap.size;
}}, {key: 'impressionCount', get: function() {
return this._impressionCount;
}}, {key: 'uniqueImpressionCount', get: function() {
return this._impressionItemIdMap.size;
}}, {key: 'interactionCount', get: function() {
return this._interactionCount;
}}, {key: 'reloadCount', get: function() {
return this._reloadCount;
}}, {key: 'feedFetchCount', get: function() {
return this._feedFetchCount;
}}, {key: 'dwelledItemsChangedCount', get: function() {
return this._dwelledItemsChangedCount;
}}, {key: 'impressionItemTypes', get: function() {
return this._impressionItemTypes;
}}, {key: 'getImpression', value: function(a0) {
var env0_0 = a0;
return this._activeItems.find(_fun98732);
}}, {key: 'startItemsDwell', value: value_98733}, {key: 'trackItemsLongImpression', value: value_98737},
{key: 'trackItemInteraction', value: value_98738}, {key: 'trackFeedItemActioned', value: value_98739},
{key: 'trackFeedFilterActioned', value: value_98740}, {key: 'trackFeedPageActioned', value: value_98741},
{key: 'incrementReloadCount', value: function() {
this._resetTimeout();
var _reloadCount = this._reloadCount;
this._reloadCount = typeof _reloadCount === 'bigint' ? _reloadCount + 1n : +_reloadCount + 1;
}}, {key: 'incrementFeedFetchCount', value: function() {
var _feedFetchCount = this._feedFetchCount;
this._feedFetchCount = typeof _feedFetchCount === 'bigint' ? _feedFetchCount + 1n : +_feedFetchCount + 1;
}}, {key: 'endAllImpressions', value: function() {
var r3;
var env0_0 = this;
var _activeItems = this._activeItems;
var items = [];
arraySpread(items, _activeItems, 0, r3);
items.forEach(_fun98745);
}}, {key: 'endSession', value: value_98746}, {key: '_resetTimeout', value: function() {
var env0_0 = this;
global.clearTimeout(this._timeout);
this._timeout = global.setTimeout(_fun98748, 300000);
}}, {key: '_createImpression', value: value_98749}, {key: '_constructImpressionFromInput', value: value_98750},
{key: '_endImpression', value: value_98751}]);
}
function _fun98753(a0) { // fn#98753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:9400, offset: 0x021b4020, size: 124 bytes, params: 2, frame: 16
const closure = ICYMISessionStore;
env0_4(closure, a0);
return env0_6(closure, [{key: 'initialize', value: function() {
this.waitFor(ApexExperimentStore, AuthenticationStore, ICYMIStore, ExperimentStore, LabFeatureStore);
}}, {key: 'currentSession', get: get_98756}, {key: 'endedSessionCount', get: get_98757}]);
}
function ICYMI_SET_FOCUSED_TAB_98759({focused}) { // fn#98759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:10269, offset: 0x021b4138, size: 110 bytes, params: 2, frame: 12
var binding;
var value2;
if (focused) {
if (env0_12 != null) {
if (env0_13.length > 0) {
binding = env0_13;
value2 = binding.map(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['triggerType'] = 'focus';
object['isInitiallyVisible'] = true;
return object;
});
binding = env0_12;
binding.startItemsDwell(value2);
return true;
}
return false;
}
return ICYMI_TAB_OPENED_98714();
}
return endCurrentSessionImpressions();
}
function ICYMI_ITEMS_DWELL_START(a0) { // fn#98761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:10542, offset: 0x021b41cc, size: 81 bytes, params: 2, frame: 14
var binding;
var value3;
if (env0_12 == null) {
value3 = new env0_16(a0.items, 'list');
} else {
binding = env0_12;
binding.startItemsDwell(a0.items);
}
return true;
}
function ICYMI_ITEMS_LONG_IMPRESSION(a0) { // fn#98762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:10674, offset: 0x021b421d, size: 81 bytes, params: 2, frame: 15
var value3;
if (env0_12 == null) {
value3 = new env0_16(a0.items, 'list');
}
const binding = env0_12;
binding.trackItemsLongImpression(a0.items);
return true;
}
function RELOAD_ICYMI_98763() { // fn#98763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:10807, offset: 0x021b426e, size: 36 bytes, params: 1, frame: 10
var r0;
const value2 = env0_12 != null;
if (value2) {
env0_12.incrementReloadCount();
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function LOAD_ICYMI_DEHYDRATED_98764() { // fn#98764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:10905, offset: 0x021b4292, size: 46 bytes, params: 1, frame: 11
var r0;
const value2 = env0_12 != null;
if (value2) {
env0_12.incrementFeedFetchCount();
endCurrentSessionImpressions();
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function APP_STATE_UPDATE_98765({state}) { // fn#98765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11040, offset: 0x021b42c0, size: 50 bytes, params: 2, frame: 10
return state !== 'active' && env0_12 != null && endCurrentSession();
}
function CHANNEL_SELECT_98766() { // fn#98766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11144, offset: 0x021b42f2, size: 28 bytes, params: 1, frame: 10
return env0_12 != null && endCurrentSessionImpressions();
}
function ICYMI_SET_CARD_HEIGHT({itemId, height}) { // fn#98767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11247, offset: 0x021b430e, size: 36 bytes, params: 2, frame: 13
env0_15.set(itemId, height);
return true;
}
function ICYMI_ITEM_INTERACTED({itemId, itemType, actionType}) { // fn#98768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11337, offset: 0x021b4332, size: 91 bytes, params: 2, frame: 16
var value3;
if (env0_12 == null) {
value3 = new env0_16(env0_13, 'focus');
}
env0_12.trackItemInteraction(itemId, itemType, actionType);
return true;
}
function ICYMI_FEED_ITEM_ACTIONED(a0) { // fn#98769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11493, offset: 0x021b438d, size: 71 bytes, params: 2, frame: 14
var value3;
if (env0_12 == null) {
value3 = new env0_16(env0_13, 'focus');
}
env0_12.trackFeedItemActioned(a0);
return true;
}
function ICYMI_FEED_FILTER_ACTIONED(a0) { // fn#98770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11623, offset: 0x021b43d4, size: 71 bytes, params: 2, frame: 14
var value3;
if (env0_12 == null) {
value3 = new env0_16(env0_13, 'focus');
}
env0_12.trackFeedFilterActioned(a0);
return true;
}
function ICYMI_FEED_PAGE_ACTIONED(a0) { // fn#98771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11755, offset: 0x021b441b, size: 71 bytes, params: 2, frame: 14
var value3;
if (env0_12 == null) {
value3 = new env0_16(env0_13, 'focus');
}
env0_12.trackFeedPageActioned(a0);
return true;
}
function resetGlobalState() { // fn#98772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:11964, offset: 0x021b4462, size: 74 bytes, params: 1, frame: 13
if (env0_12 != null) {
global.clearTimeout(env0_12._timeout);
}
env0_13 = [];
env0_15.clear();
}
function ICYMISession() { // fn#98716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:1377, offset: 0x021b31b1, size: 432 bytes, params: 1, frame: 22
var environment;
let value = a0;
const value2 = a1;
const r5 = value !== undefined ? value : [];
const env0_1 = value2 !== undefined ? value2 : 'list';
value = environment.__proto__;
env1_5(this, ICYMISession);
const moduleValue = require(491) /* metro dependency 491 */;
this._sessionId = moduleValue.v4();
const Date = global.Date;
this._startTimestamp = Date.now();
this._endTimestamp = null;
this._activeItems = [];
this._dwellCount = 0;
this._impressionCount = 0;
let Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
let map = new Map();
this._dwelledItemIdMap = map instanceof Object ? map : value4;
Map = global.Map;
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
this._impressionItemIdMap = map instanceof Object ? map : value6;
const Set = global.Set;
const value8 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
this._impressionItemTypes = set instanceof Object ? set : value8;
this._reloadCount = 0;
this._feedFetchCount = 0;
this._dwelledItemsChangedCount = 0;
this._interactionCount = 0;
this._actionCount = 0;
this._latestDwellStartTimeMs = 0;
this._timeout = global.setTimeout(_fun98717, 300000);
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedSessionStarted = ICYMIAnalytics.trackFeedSessionStarted;
const object2 = {};
object2.icymiSessionId = this._sessionId;
object2.sessionStartTimeMs = this._startTimestamp;
object2.previousIcymiSessionCount = env1_14;
const DEFAULT_UX_VARIATION = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
object2.uxVariation = DEFAULT_UX_VARIATION;
Reflect.apply(trackFeedSessionStarted, ICYMIAnalytics, [object2]);
if (r5.length > 0) {
this.startItemsDwell(r5.map(_fun98718));
}
}
function value_98731(a0) { // fn#98731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:3042, offset: 0x021b342b, size: 38 bytes, params: 2, frame: 11
const env0_0 = a0;
return this._activeItems.find(_fun98732);
}
function value_98733(a0) { // fn#98733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:3134, offset: 0x021b3451, size: 299 bytes, params: 2, frame: 20
var environment;
var r5;
var value6;
var getImpression;
var itemId;
var value7;
var push;
var _createImpression;
var value8;
this._resetTimeout();
let value = environment.__proto__;
env1_13 = a0;
if (a0.length === this._activeItems.length) {
reducibleJoin2: while (true) {
if (a0.every(_fun98734)) {
return this._activeItems;
}
break reducibleJoin2;
}
}
const _dwelledItemsChangedCount = this._dwelledItemsChangedCount;
this._dwelledItemsChangedCount = typeof _dwelledItemsChangedCount === 'bigint' ? _dwelledItemsChangedCount + 1n : +_dwelledItemsChangedCount + 1;
const items2 = [];
const Set = global.Set;
const set = new Set(this._activeItems.map(function(a0) {
return a0.itemId;
}));
value = _createForOfIteratorHelperLoose_98709(a0);
const value5 = value();
let done = value5.done;
if (!done) {
r5 = value5;
reducibleLoop3: while (true) {
value6 = r5.value;
getImpression = this.getImpression;
itemId = value6.itemId;
value7 = Reflect.apply(getImpression, this, [itemId]);
if (value7 != null) {
push = items2.push;
Reflect.apply(push, items2, [value7]);
itemId = value6.itemId;
set.delete(itemId);
} else {
push = items2.push;
_createImpression = this._createImpression;
Reflect.apply(push, items2, [Reflect.apply(_createImpression, this, [value6])]);
}
value8 = value();
done = value8.done;
if (done) {
break reducibleLoop3;
}
r5 = value8;
continue reducibleLoop3;
}
}
set.forEach(_fun98736);
this._activeItems = items2;
return this._activeItems;
}
function value_98737(a0) { // fn#98737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:3684, offset: 0x021b35c7, size: 497 bytes, params: 2, frame: 26
var r2;
var r12;
var r1;
var r14;
var r15;
var r13;
var value5;
var getImpression;
var itemId;
var value6;
var value7;
var _impressionCount;
var value8;
var _impressionItemIdMap;
var set;
var _impressionItemIdMap2;
var get;
var itemId2;
var value9;
var value10;
var ICYMIAnalytics;
var trackFeedItemDwell1s;
var object2;
var _sessionId;
var impressionId;
var itemType;
var impressionStartTimestamp;
var triggerType;
var _dwelledItemIdMap;
var value11;
var itemFeedIndex;
var itemScore;
var isInitiallyVisible;
var itemChannelType;
var binding;
var value12;
var itemCardHeight;
var interactionActionTypes;
var interactionCount;
var uxVariation;
var DEFAULT_UX_VARIATION;
var sessionImpressionIndex;
var value13;
const value2 = _createForOfIteratorHelperLoose_98709(a0);
const value3 = value2();
let done = value3.done;
const value4 = null;
if (!done) {
r2 = value3;
while (true) {
value5 = r2.value;
getImpression = this.getImpression;
itemId = value5.itemId;
value6 = Reflect.apply(getImpression, this, [itemId]);
if (value4 != value6) {
r12 = value6;
} else {
value7 = this._constructImpressionFromInput(value5);
r12 = value7;
}
_impressionCount = this._impressionCount;
value8 = typeof _impressionCount === 'bigint' ? _impressionCount + 1n : +_impressionCount + 1;
this._impressionCount = value8;
r12.sessionImpressionIndex = value8;
_impressionItemIdMap = this._impressionItemIdMap;
set = _impressionItemIdMap.set;
itemId = value5.itemId;
_impressionItemIdMap2 = this._impressionItemIdMap;
get = _impressionItemIdMap2.get;
itemId2 = value5.itemId;
value9 = Reflect.apply(get, _impressionItemIdMap2, [itemId2]);
value10 = 0;
if (value4 != value9) {
r1 = value9;
continue;
}
r1 = value10;
continue;
Reflect.apply(set, _impressionItemIdMap, [itemId, r1 + 1]);
ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
trackFeedItemDwell1s = ICYMIAnalytics.trackFeedItemDwell1s;
object2 = {};
_sessionId = this._sessionId;
object2.icymiSessionId = _sessionId;
impressionId = r12.impressionId;
object2.impressionId = impressionId;
itemId = r12.itemId;
object2.itemId = itemId;
itemType = r12.itemType;
object2.itemType = itemType;
impressionStartTimestamp = r12.impressionStartTimestamp;
object2.dwellStartTimeMs = impressionStartTimestamp;
triggerType = r12.triggerType;
object2.triggerType = triggerType;
_dwelledItemIdMap = this._dwelledItemIdMap;
get = _dwelledItemIdMap.get;
itemId = r12.itemId;
value11 = Reflect.apply(get, _dwelledItemIdMap, [itemId]);
if (value4 != value11) {
r14 = value11;
continue;
}
r14 = value10;
continue;
object2.itemOccurenceCountInSession = r14;
itemFeedIndex = r12.itemFeedIndex;
object2.itemFeedIndex = itemFeedIndex;
itemScore = r12.itemScore;
object2.itemScore = itemScore;
isInitiallyVisible = r12.isInitiallyVisible;
object2.isInitiallyVisible = isInitiallyVisible;
itemChannelType = r12.itemChannelType;
object2.itemChannelType = itemChannelType;
binding = env1_15;
get = binding.get;
itemId = r12.itemId;
value12 = Reflect.apply(get, binding, [itemId]);
if (value4 != value12) {
r15 = value12;
continue;
}
itemCardHeight = r12.itemCardHeight;
r15 = itemCardHeight;
if (value4 != r15) {
r14 = r15;
continue;
}
r14 = value4;
continue;
object2.itemCardHeight = r14;
object2.isDwelling = value4 != value6;
interactionActionTypes = r12.interactionActionTypes;
object2.interactionActionTypes = interactionActionTypes;
interactionCount = r12.interactionCount;
object2.interactionCount = interactionCount;
uxVariation = r12.uxVariation;
if (value4 != uxVariation) {
r13 = uxVariation;
continue;
}
DEFAULT_UX_VARIATION = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
r13 = DEFAULT_UX_VARIATION;
object2.uxVariation = r13;
sessionImpressionIndex = r12.sessionImpressionIndex;
object2.sessionImpressionIndex = sessionImpressionIndex;
Reflect.apply(trackFeedItemDwell1s, ICYMIAnalytics, [object2]);
value13 = value2();
done = value13.done;
if (done) {
break;
}
r2 = value13;
continue;
}
}
}
function value_98738(a0, a1, a2) { // fn#98738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:4764, offset: 0x021b37b8, size: 217 bytes, params: 4, frame: 20
var interactionCount;
const impression = this.getImpression(a0);
const value3 = undefined;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackItemInteraction = ICYMIAnalytics.trackItemInteraction;
const object2 = {id: a0, type: a1, actionType: a2};
object2.impressionId = impression == null ? value3 : impression.impressionId;
object2.uxVariation = (impression == null ? value3 : impression.uxVariation) ?? (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
const _interactionCount = this._interactionCount;
const value4 = typeof _interactionCount === 'bigint' ? _interactionCount + 1n : +_interactionCount + 1;
this._interactionCount = value4;
object2.sessionInteractionIndex = value4;
object2.icymiSessionId = this._sessionId;
Reflect.apply(trackItemInteraction, ICYMIAnalytics, [object2]);
if (impression != null) {
impression.interactionActionTypes.push(a2);
interactionCount = impression.interactionCount;
impression.interactionCount = typeof interactionCount === 'bigint' ? interactionCount + 1n : +interactionCount + 1;
}
return value3;
}
function value_98739(a0) { // fn#98739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:5193, offset: 0x021b3891, size: 214 bytes, params: 2, frame: 20
const impression = this.getImpression(a0.itemId);
const value3 = undefined;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedItemActioned = ICYMIAnalytics.trackFeedItemActioned;
const object2 = {};
object2.icymiSessionId = this._sessionId;
const value4 = null;
const uxVariation = value4 == impression ? value3 : impression.uxVariation;
object2.uxVariation = value4 != uxVariation ? uxVariation : (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
const _actionCount = this._actionCount;
const value5 = typeof _actionCount === 'bigint' ? _actionCount + 1n : +_actionCount + 1;
this._actionCount = value5;
object2.sessionActionIndex = value5;
object2.itemId = a0.itemId;
object2.itemType = a0.itemType;
const impressionId = value4 == impression ? value3 : impression.impressionId;
object2.impressionId = value4 != impressionId ? impressionId : value4;
object2.actionParameters = a0.actionParameters;
Reflect.apply(trackFeedItemActioned, ICYMIAnalytics, [object2]);
return value3;
}
function value_98740(a0) { // fn#98740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:5619, offset: 0x021b3967, size: 229 bytes, params: 2, frame: 20
const itemId = a0.itemId;
const value = null;
const r6 = value != itemId ? this.getImpression(a0.itemId) : value;
const value4 = undefined;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedFilterActioned = ICYMIAnalytics.trackFeedFilterActioned;
const object2 = {};
object2.icymiSessionId = this._sessionId;
const uxVariation = value == r6 ? value4 : r6.uxVariation;
object2.uxVariation = value != uxVariation ? uxVariation : (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
const _actionCount = this._actionCount;
const value5 = typeof _actionCount === 'bigint' ? _actionCount + 1n : +_actionCount + 1;
this._actionCount = value5;
object2.sessionActionIndex = value5;
object2.filterParameters = a0.filterParameters;
object2.itemId = a0.itemId;
object2.itemType = a0.itemType;
const impressionId = value == r6 ? value4 : r6.impressionId;
object2.impressionId = value != impressionId ? impressionId : value;
Reflect.apply(trackFeedFilterActioned, ICYMIAnalytics, [object2]);
return value4;
}
function value_98741(a0) { // fn#98741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:6065, offset: 0x021b3a4c, size: 110 bytes, params: 2, frame: 18
let value = environment.__proto__;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedPageActioned = ICYMIAnalytics.trackFeedPageActioned;
const object2 = {};
const _sessionId = this._sessionId;
object2.icymiSessionId = _sessionId;
const DEFAULT_UX_VARIATION = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
object2.uxVariation = DEFAULT_UX_VARIATION;
const _actionCount = this._actionCount;
value = typeof _actionCount === 'bigint' ? _actionCount + 1n : +_actionCount + 1;
this._actionCount = value;
object2.sessionActionIndex = value;
copyDataProperties(object2, a0, _sessionId);
Reflect.apply(trackFeedPageActioned, ICYMIAnalytics, [object2]);
}
function value_98744() { // fn#98744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:6439, offset: 0x021b3af0, size: 49 bytes, params: 1, frame: 14
const _activeItems = this._activeItems;
const items2 = [];
arraySpread(items2, _activeItems, 0, undefined);
items2.forEach(_fun98745);
}
function value_98746() { // fn#98746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:6543, offset: 0x021b3b3e, size: 349 bytes, params: 1, frame: 21
this.endAllImpressions();
const Date = global.Date;
this._endTimestamp = Date.now();
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedSessionCompleted = ICYMIAnalytics.trackFeedSessionCompleted;
const object2 = {};
object2.icymiSessionId = this._sessionId;
object2.sessionDurationMs = this._endTimestamp - this._startTimestamp;
object2.sessionStartTimeMs = this._startTimestamp;
object2.sessionEndTimeMs = this._endTimestamp;
object2.impressionCount = this._impressionCount;
object2.uniqueImpressionCount = this._impressionItemIdMap.size;
const Array = global.Array;
object2.impressionItemTypes = Array.from(this._impressionItemTypes);
object2.feedReloadCount = this._reloadCount;
object2.feedDwelledItemsChangedCount = this._dwelledItemsChangedCount;
object2.feedFetchCount = this._feedFetchCount;
object2.latestDwellStartTimeMs = this._latestDwellStartTimeMs;
object2.previousIcyMiSessionCount = env1_14;
object2.interactionCount = this._interactionCount;
object2.dwelledCount = this._dwellCount;
object2.uniqueDwelledCount = this._dwelledItemIdMap.size;
const DEFAULT_UX_VARIATION = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
object2.uxVariation = DEFAULT_UX_VARIATION;
Reflect.apply(trackFeedSessionCompleted, ICYMIAnalytics, [object2]);
global.clearTimeout(this._timeout);
const binding = env1_14;
env1_14 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
env1_15.clear();
return this;
}
function value_98747() { // fn#98747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:7437, offset: 0x021b3c9b, size: 63 bytes, params: 1, frame: 15
global.clearTimeout(this._timeout);
this._timeout = global.setTimeout(_fun98748, 300000);
}
function value_98749(a0) { // fn#98749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:7561, offset: 0x021b3cda, size: 134 bytes, params: 2, frame: 18
const value = this._constructImpressionFromInput(a0);
const _dwellCount = this._dwellCount;
this._dwellCount = typeof _dwellCount === 'bigint' ? _dwellCount + 1n : +_dwellCount + 1;
const _dwelledItemIdMap = this._dwelledItemIdMap;
_dwelledItemIdMap.set(a0.itemId, (this._dwelledItemIdMap.get(a0.itemId) ?? 0) + 1);
const _impressionItemTypes = this._impressionItemTypes;
_impressionItemTypes.add(a0.itemType);
this._latestDwellStartTimeMs = value.impressionStartTimestamp;
return value;
}
function value_98750(a0) { // fn#98750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:7882, offset: 0x021b3d60, size: 244 bytes, params: 2, frame: 15
const value2 = (require(491) /* metro dependency 491 */).v4();
const object2 = {};
object2.itemId = a0.itemId;
object2.itemType = a0.itemType;
object2.impressionId = value2;
const Date = global.Date;
object2.impressionStartTimestamp = Date.now();
object2.impressionComplete = false;
object2.triggerType = a0.triggerType;
object2.itemFeedIndex = a0.itemFeedIndex;
object2.itemScore = a0.itemScore;
object2.isInitiallyVisible = a0.isInitiallyVisible;
object2.itemChannelType = a0.itemChannelType;
const value3 = env1_15.get(a0.itemId);
const value4 = null;
object2.itemCardHeight = value4 != value3 ? value3 : value4;
const DEFAULT_UX_VARIATION = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
object2.uxVariation = DEFAULT_UX_VARIATION;
object2.interactionActionTypes = [];
object2.interactionCount = 0;
object2.sessionImpressionIndex = value4;
return object2;
}
function value_98751(a0) { // fn#98751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:8380, offset: 0x021b3e54, size: 460 bytes, params: 2, frame: 23
var environment;
var r7;
var r12;
var r0;
var value2;
var ICYMIAnalytics;
var trackFeedItemDwelled;
var object2;
var impressionEndTimestamp;
var impressionStartTimestamp;
var itemId;
var _dwelledItemIdMap;
var get;
var value3;
var binding;
var value5;
var uxVariation;
const env0_0 = a0;
const index = this._activeItems.findIndex(_fun98752);
const property = this._activeItems[index];
const value = null;
if (value != property) {
property.impressionEndTimestamp = global.Date.now();
property.impressionComplete = true;
value2 = environment.__proto__;
ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
trackFeedItemDwelled = ICYMIAnalytics.trackFeedItemDwelled;
object2 = {};
object2.icymiSessionId = this._sessionId;
object2.impressionId = property.impressionId;
impressionEndTimestamp = property.impressionEndTimestamp;
impressionStartTimestamp = property.impressionStartTimestamp;
object2.dwellTimeMs = impressionEndTimestamp - impressionStartTimestamp;
itemId = property.itemId;
object2.itemId = itemId;
object2.itemType = property.itemType;
impressionStartTimestamp = property.impressionStartTimestamp;
object2.dwellStartTimeMs = impressionStartTimestamp;
impressionEndTimestamp = property.impressionEndTimestamp;
object2.dwellEndTimeMs = impressionEndTimestamp;
object2.triggerType = property.triggerType;
_dwelledItemIdMap = this._dwelledItemIdMap;
get = _dwelledItemIdMap.get;
itemId = property.itemId;
value3 = Reflect.apply(get, _dwelledItemIdMap, [itemId]);
r7 = value != value3 ? value3 : 0;
object2.itemOccurenceCountInSession = r7;
object2.itemFeedIndex = property.itemFeedIndex;
object2.itemScore = property.itemScore;
object2.isInitiallyVisible = property.isInitiallyVisible;
object2.itemChannelType = property.itemChannelType;
binding = env1_15;
get = binding.get;
itemId = property.itemId;
value5 = Reflect.apply(get, binding, [itemId]);
r12 = value != value5 ? value5 : property.itemCardHeight;
r7 = value != r12 ? r12 : value;
object2.itemCardHeight = r7;
uxVariation = property.uxVariation;
r7 = value != uxVariation ? uxVariation : (require(9589) /* metro dependency 9589: ICYMIAnalytics */).DEFAULT_UX_VARIATION;
object2.uxVariation = r7;
object2.interactionActionTypes = property.interactionActionTypes;
object2.interactionCount = property.interactionCount;
object2.sessionImpressionIndex = property.sessionImpressionIndex;
Reflect.apply(trackFeedItemDwelled, ICYMIAnalytics, [object2]);
this._activeItems.splice(index, 1);
r0 = property;
} else {
r0 = value;
}
return r0;
}
function ICYMISessionStore() { // fn#98754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:9412, offset: 0x021b409c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, ICYMISessionStore);
const value3 = env1_3(ICYMISessionStore);
return env1_2(this, _isNativeReflectConstruct_98706() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function _fun98717() { // fn#98717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:1863, offset: 0x021b3361, size: 19 bytes, params: 1, frame: 9
return env0_0.endSession();
}
function _fun98718(a0) { // fn#98718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:2123, offset: 0x021b3374, size: 41 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['triggerType'] = env0_1;
object2['isInitiallyVisible'] = true;
return object2;
}
function _fun98734({itemId}, a1) { // fn#98734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:3220, offset: 0x021b357c, size: 41 bytes, params: 3, frame: 2
const itemId = env0_0._activeItems[a1].itemId;
return itemId === itemId;
}
function _fun98736(a0) { // fn#98736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:3578, offset: 0x021b35b0, size: 23 bytes, params: 2, frame: 11
return env0_0._endImpression(a0);
}
function _fun98745({itemId}) { // fn#98745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13144:6482, offset: 0x021b3b21, size: 29 bytes, params: 2, frame: 11
return env0_0._endImpression(itemId);
}
File diff suppressed because it is too large. Load diff
+87
View File
@@ -0,0 +1,87 @@
/* Metro module 7230; source: modules/icymi/ICYMITypes.tsx; dependencies: [661, 2] */
function _fun57906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7408:6, offset: 0x016b9378, size: 507 bytes, params: 8, frame: 24
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_0 = constantsModule.ChannelTypes;
const MessageEmbedTypes = constantsModule.MessageEmbedTypes;
object3 = {MESSAGE: 0};
object3[0] = 'MESSAGE';
object3.ACTIVITY = 2;
object3[2] = 'ACTIVITY';
object3.CUSTOM_STATUS = 3;
object3[3] = 'CUSTOM_STATUS';
object3.GUILD_EVENT = 5;
object3[5] = 'GUILD_EVENT';
object3.RECOMMENDED_GUILDS = 6;
object3[6] = 'RECOMMENDED_GUILDS';
let Set = global.Set;
const MESSAGE = object3.MESSAGE;
const CUSTOM_STATUS = object3.CUSTOM_STATUS;
let set = new Set([MESSAGE, CUSTOM_STATUS]);
Set = global.Set;
const IMAGE = MessageEmbedTypes.IMAGE;
const GIFV = MessageEmbedTypes.GIFV;
set = new Set([IMAGE, GIFV]);
const object4 = {DEFAULT: 0};
object4[0] = 'DEFAULT';
object4.BOOKMARKS = 2;
object4[2] = 'BOOKMARKS';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMITypes.tsx');
exports.ICYMI_PAGE_SIZE = 15;
exports.MIN_ITEMS_FOR_NEW_PILL = 3;
exports.MIN_SCORE_FOR_NEW_PILL = 50;
exports.GAME_CONTENT_GUILD_ID = '1312632705086787756';
exports.ICYMIItemTypes = object3;
exports.typeToString = typeToString;
exports.SUPPORTED_ITEM_TYPES = set;
exports.GRAVITY_VALID_EMBED_TYPES = set;
exports.GravityICYMIDoubleTapBehavior = object4;
exports.ContentType = {POPULAR_MESSAGE: 'POPULAR_MESSAGE', IMAGE: 'IMAGE', VIDEO: 'VIDEO', LINK: 'LINK',
THREAD: 'THREAD', CHANGED_STATUS: 'CHANGED_STATUS', INTERESTING: 'INTERESTING', ANNOUNCEMENT: 'ANNOUNCEMENT',
FORUM_POST: 'FORUM_POST', FILE: 'FILE'};
}
function typeToString(a0) { // fn#57907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7408:973, offset: 0x016b9573, size: 196 bytes, params: 2, frame: 5
var external_content_application_id;
var r0;
var channel_type;
var GUILD_ANNOUNCEMENT;
var message_context;
const type = a0.type;
var value;
const MESSAGE = env0_1.MESSAGE;
if (MESSAGE === type) {
channel_type = a0.data.channel_type;
GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
value = 'announcement';
if (channel_type === GUILD_ANNOUNCEMENT) {
r0 = value;
} else {
message_context = a0.data.message_context;
value = undefined;
external_content_application_id = message_context == null ? value : message_context.external_content_application_id;
value = 'message';
r0 = external_content_application_id != null ? 'game_message' : value;
}
return r0;
}
const ACTIVITY = env0_1.ACTIVITY;
if (ACTIVITY === type) {
return 'hotwheels_gaming_activity';
}
const CUSTOM_STATUS = env0_1.CUSTOM_STATUS;
if (CUSTOM_STATUS === type) {
return 'hotwheels_custom_status';
}
const GUILD_EVENT = env0_1.GUILD_EVENT;
if (GUILD_EVENT === type) {
return 'guild_event';
}
const RECOMMENDED_GUILDS = env0_1.RECOMMENDED_GUILDS;
if (RECOMMENDED_GUILDS === type) {
return 'recommended_guilds';
}
}
@@ -0,0 +1,321 @@
/* Metro module 9578; source: modules/icymi/ICYMIUnreadStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 672, 7230, 9579, 566, 694, 2] */
function _fun74947(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:6, offset: 0x01d9e3b5, size: 377 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_74953 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
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 */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const DAY = Millis.DAY;
const env0_7 = 7 * DAY;
object = {readIdToTimestampMap: {}};
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
let value = _fun74954(DeviceSettingsStore);
value.displayName = 'ICYMIUnreadStateStore';
value.persistKey = 'ICYMIUnreadStateStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {ICYMI_ACK_ITEMS: function({items,
override}) {
items.forEach(_fun74962);
}, LOAD_ICYMI_DEHYDRATED: LOAD_ICYMI_DEHYDRATED_74963, CLEAR_ICYMI_READ_STATES: CLEAR_ICYMI_READ_STATES});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIUnreadStateStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_74948() { // fn#74948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:150, offset: 0x01d9e52e, 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_74948_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_74951(a0, a1) { // fn#74951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:343, offset: 0x01d9e590, 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 _fun74952;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_74953(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') {
value = _arrayLikeToArray_74953(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_74953(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun74952;
}
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 _fun74954(a0) { // fn#74954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:1314, offset: 0x01d9e704, size: 147 bytes, params: 2, frame: 16
const closure = ICYMIUnreadStateStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_74956}, {key: 'getReadTimestamp', value: value_74958},
{key: 'getState', value: value_74959}, {key: 'getUserAgnosticState', value: value_74960}]);
}
function ICYMI_ACK_ITEMS({items, override}) { // fn#74961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:2301, offset: 0x01d9e888, size: 42 bytes, params: 2, frame: 11
items.forEach(_fun74962);
}
function LOAD_ICYMI_DEHYDRATED_74963({items}) { // fn#74963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:2479, offset: 0x01d9e908, size: 265 bytes, params: 2, frame: 25
var r3;
var external_content_application_id;
var r11;
var value5;
var type;
var ICYMIItemTypes;
var MESSAGE;
var readIdToTimestampMap;
var id;
var value6;
var data;
var message_context;
var value7;
var moduleValue;
var isItemUnreadInChannel;
var channel_id;
var message_id;
var isItemUnreadInChannel2;
var value8;
const value3 = _createForOfIteratorHelperLoose_74951(items);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
type = value5.type;
ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
MESSAGE = ICYMIItemTypes.MESSAGE;
if (type === MESSAGE) {
readIdToTimestampMap = env0_8.readIdToTimestampMap;
id = value5.id;
value6 = readIdToTimestampMap[id] != null;
if (value6) {
r11 = value6;
continue;
}
data = value5.data;
message_context = data.message_context;
if (message_context == null) {
external_content_application_id = undefined;
continue;
}
external_content_application_id = message_context.external_content_application_id;
value7 = external_content_application_id != null;
r11 = value7;
if (r11) {
continue;
}
moduleValue = require(9579) /* metro dependency 9579: ICYMIUtils */;
isItemUnreadInChannel = moduleValue.isItemUnreadInChannel;
data = value5.data;
channel_id = data.channel_id;
data = value5.data;
message_id = data.message_id;
isItemUnreadInChannel2 = Reflect.apply(isItemUnreadInChannel, moduleValue, [channel_id, message_id]);
r11 = isItemUnreadInChannel2;
if (r11) {
break;
}
readIdToTimestampMap = env0_8.readIdToTimestampMap;
id = value5.id;
readIdToTimestampMap[id] = 0;
break;
}
value8 = value3();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
}
}
function CLEAR_ICYMI_READ_STATES() { // fn#74964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:2890, offset: 0x01d9ea11, size: 19 bytes, params: 1, frame: 2
env0_8.readIdToTimestampMap = {};
}
function value_74956(a0) { // fn#74956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:1649, offset: 0x01d9e797, size: 186 bytes, params: 2, frame: 14
var object;
var r2;
var readIdToTimestampMap;
var value7;
var value8;
reducibleJoin4: while (true) {
reducibleJoin2: while (true) {
if (a0 == null) {
break reducibleJoin2;
}
readIdToTimestampMap = a0.readIdToTimestampMap;
if (readIdToTimestampMap != null) {
readIdToTimestampMap = a0.readIdToTimestampMap;
object = {readIdToTimestampMap: readIdToTimestampMap};
break reducibleJoin4;
}
break reducibleJoin2;
}
object = {readIdToTimestampMap: {}};
break reducibleJoin4;
}
env1_8 = object;
const Date = global.Date;
const env0_0 = Date.now() - env1_7;
const Object = global.Object;
const value5 = _createForOfIteratorHelperLoose_74951(Object.keys(env1_8.readIdToTimestampMap).filter(_fun74957));
const value6 = value5();
let done = value6.done;
if (!done) {
r2 = value6;
reducibleLoop5: while (true) {
value7 = r2.value;
readIdToTimestampMap = env1_8.readIdToTimestampMap;
delete readIdToTimestampMap[value7];
value8 = value5();
done = value8.done;
if (done) {
break reducibleLoop5;
}
r2 = value8;
continue reducibleLoop5;
}
}
}
function value_74958(a0) { // fn#74958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:2010, offset: 0x01d9e872, size: 22 bytes, params: 2, frame: 2
return env1_8.readIdToTimestampMap[a0];
}
function _fun74962(a0) { // fn#74962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:2356, offset: 0x01d9e8b2, size: 86 bytes, params: 2, frame: 5
var r1;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_8.readIdToTimestampMap[a0.id] == null;
r1 = value || override;
} else {
r1 = value;
}
if (r1) {
value = environment.__proto__;
env1_8.readIdToTimestampMap[a0.id] = a0.timestamp;
}
}
function _fun74957(a0) { // fn#74957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9764:1844, offset: 0x01d9e851, size: 33 bytes, params: 2, frame: 2
return env2_8.readIdToTimestampMap[a0] < env0_0;
}
+735
View File
@@ -0,0 +1,735 @@
/* Metro module 9579; source: modules/icymi/ICYMIUtils.tsx; dependencies: [5, 4117, 1383, 1379, 1867, 4814, 4605, 9569, 9578, 661, 7230, 9580, 4625, 21, 566, 9581, 9585, 8370, 9586, 9587, 1244, 5097, 1962, 661, 2] */
function _fun74965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:6, offset: 0x01d9ea24, size: 669 bytes, params: 8, frame: 24
var object2;
let env0_0 = require;
const closure = function(a0, a1) {
return 'hydration-' + a0 + '-' + a1;
};
const closure2 = function() {
return _hydrateItems.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).ThreadChannelRecord;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const icymiUnreadStateStore = importDefault(9578) /* metro dependency 9578: ICYMIUnreadStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.ChannelTypes;
const env0_13 = constantsModule.GuildNSFWContentLevel;
object2 = {UNKNOWN: 0};
object2[0] = 'UNKNOWN';
object2.DEFAULT = 1;
object2[1] = 'DEFAULT';
object2.MORE = 2;
object2[2] = 'MORE';
object2.LESS = 3;
object2[3] = 'LESS';
object2.MUTED = 4;
object2[4] = 'MUTED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/ICYMIUtils.tsx');
exports.generateHydrationId = closure;
exports.ICYMICustomScore = object2;
exports.isGuildItem = isGuildItem;
exports.isChannelCustomScoreEligible = isChannelCustomScoreEligible;
exports.numberToCustomScore = numberToCustomScore;
exports.customScoreToNumber = customScoreToNumber;
exports.hydrateItems = closure2;
exports.hydrateNextPage = function() {
return _hydrateNextPage.apply(this, arguments);
};
exports.createGravityMessageFromServer = createGravityMessageFromServer;
exports.isItemUnreadInChannel = isItemUnreadInChannel;
exports.useGravityMessage = function(a0) {
var env0_0 = a0;
return require(dependencyMap[14]).useStateFromStores([MessageStore, ICYMIStore], _fun74992, [a0]);
};
exports.useGravityMessageItem = function(a0) {
var env0_0 = a0;
return require(dependencyMap[14]).useStateFromStores([ICYMIStore], _fun74994, [a0.id]);
};
exports.useICYMIMessage = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[14]).useStateFromStores([MessageStore, ICYMIStore], _fun74996, [a0, a1]);
};
exports.icymiEnabled = icymiEnabled;
exports.customStatusToContentInventoryEntry = customStatusToContentInventoryEntry;
exports.compareGravityUnreadIds = compareGravityUnreadIds;
exports.getViewableFeedItemsArray = getViewableFeedItemsArray;
exports.isItemNSFW = isItemNSFW;
exports.itemToType = itemToType;
exports.determineContentType = determineContentType;
exports.contentTypeToText = contentTypeToText;
exports.regenerateFeedAndClearReadStates = function() {
return _regenerateFeedAndClearReadStates.apply(this, arguments);
};
}
function _hydrateItems() { // fn#74968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:539, offset: 0x01d9ece7, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun74970).apply(this, arguments);
}
function _hydrateNextPage() { // fn#74977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:1708, offset: 0x01d9f05a, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun74979).apply(this, arguments);
}
function _regenerateFeedAndClearReadStates() { // fn#74980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:1948, offset: 0x01d9f123, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun74982).apply(this, arguments);
}
function isGuildItem(a0) { // fn#74984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:2840, offset: 0x01d9f3f6, size: 92 bytes, params: 2, frame: 15
const type = a0.type;
const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
return type === MESSAGE || a0.type === ICYMIItemTypes.GUILD_EVENT;
}
function isChannelCustomScoreEligible(a0) { // fn#74985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:2990, offset: 0x01d9f452, size: 74 bytes, params: 2, frame: 5
const type = a0.type;
const GUILD_FORUM = ChannelTypes.GUILD_FORUM;
return type === GUILD_FORUM || (a0.type === ChannelTypes.GUILD_ANNOUNCEMENT || a0.type === ChannelTypes.GUILD_TEXT);
}
function numberToCustomScore(a0) { // fn#74986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:3140, offset: 0x01d9f49c, size: 87 bytes, params: 2, frame: 3
return a0 < -1.5 ? env0_14.MUTED : a0 < 0 ? env0_14.LESS : a0 > 0 ? env0_14.MORE : env0_14.DEFAULT;
}
function customScoreToNumber(a0) { // fn#74987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:3249, offset: 0x01d9f4f3, size: 73 bytes, params: 2, frame: 3
const MORE = env0_14.MORE;
if (MORE === a0) {
return 1;
}
const LESS = env0_14.LESS;
if (LESS === a0) {
return -1;
}
const MUTED = env0_14.MUTED;
if (MUTED === a0) {
return -2;
}
return 0;
}
function createGravityMessageFromServer(a0, a1) { // fn#74989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:3527, offset: 0x01d9f53c, size: 118 bytes, params: 3, frame: 16
const object2 = {};
copyDataProperties(object2, a1, undefined);
const value2 = undefined;
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
object2['message'] = messageRecordUtilsModule.createMessageRecord(a0.message);
object2['threadChannel'] = a0.thread_channel != null ? ThreadChannelRecord.fromServer(a0.thread_channel,
a0.guild_id) : value2;
return object2;
}
function isItemUnreadInChannel(a0, a1) { // fn#74990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:3744, offset: 0x01d9f5b2, size: 92 bytes, params: 3, frame: 17
var r0;
var defaultImport;
var value;
const trackedAckMessageId = ReadStateStore.getTrackedAckMessageId(a0);
const value3 = trackedAckMessageId == null;
if (value3) {
r0 = value3;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(a1);
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value > defaultImport.extractTimestamp(trackedAckMessageId);
r0 = value;
}
return r0;
}
function useGravityMessage(a0) { // fn#74991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:3911, offset: 0x01d9f60e, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore, ICYMIStore], _fun74992,
[a0]);
}
function useGravityMessageItem(a0) { // fn#74993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:4150, offset: 0x01d9f6c3, size: 80 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], _fun74994, [a0.id]);
}
function useICYMIMessage(a0, a1) { // fn#74995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:4280, offset: 0x01d9f733, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore, ICYMIStore], _fun74996,
[a0, a1]);
}
function icymiEnabled(a0) { // fn#74997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:4488, offset: 0x01d9f7eb, size: 41 bytes, params: 2, frame: 11
return (require(9581) /* metro dependency 9581: ICYMIExperiment */).getICYMIEnabled(a0);
}
function customStatusToContentInventoryEntry(a0) { // fn#74998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:4587, offset: 0x01d9f814, size: 298 bytes, params: 2, frame: 15
const object3 = {};
object3.id = a0.id;
const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
let CUSTOM_STATUS = ICYMIItemTypes.CUSTOM_STATUS;
object3.type = CUSTOM_STATUS;
const object4 = {};
object4.id = a0.id;
const user_id = a0.data.user_id;
object4.author_id = user_id;
const ContentInventoryAuthorType = (require(9585) /* metro dependency 9585: ContentInventoryAuthorType */).ContentInventoryAuthorType;
const USER = ContentInventoryAuthorType.USER;
object4.author_type = USER;
object4.traits = [];
object4.participants = [];
const ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
CUSTOM_STATUS = ContentInventoryEntryType.CUSTOM_STATUS;
object4.content_type = CUSTOM_STATUS;
object4.extra = {type: 'custom_status_extra', status: a0.data.text ?? '', emoji_id: a0.data.emoji_id,
emoji_name: a0.data.emoji_name, emoji_animated: a0.data.emoji_animated, attachments: a0.data.attachments};
object3.activity = object4;
object3.score = a0.score;
object3.score_components = a0.score_components;
return object3;
}
function compareGravityUnreadIds(a0, a1, a2) { // fn#74999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:5153, offset: 0x01d9f93e, size: 132 bytes, params: 4, frame: 16
const r4 = ICYMIUnreadStateStore.getReadTimestamp(a0) ?? a2?.[a0];
const r3 = ICYMIUnreadStateStore.getReadTimestamp(a1) ?? a2?.[a1];
return r4 != null ? r4 == null ? -1 : r3 == null ? 1 : r3 - r4 : r3 == null ? 0 : r4 == null ? -1 : r3 == null ? 1 : r3 - r4;
}
function getViewableFeedItemsArray(a0) { // fn#75000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:5395, offset: 0x01d9f9c2, size: 229 bytes, params: 2, frame: 25
var r8;
var r1;
var r0;
var property;
var NON_ELIGIBLE_SCROLL_ITEMS;
var has;
var item;
var data;
var kind;
var id;
var value6;
const unreadDisplayItems = ICYMIStore.getUnreadDisplayItems();
const items2 = [];
const value3 = arraySpread(items2, unreadDisplayItems, 0, undefined);
const getReadDisplayItems = ICYMIStore.getReadDisplayItems;
arraySpread(items2, Reflect.apply(getReadDisplayItems, ICYMIStore, []), value3, undefined);
const value4 = null;
var env0_0;
const value5 = a0.length - 1;
if (value5 >= 0) {
r8 = value5;
reducibleLoop1: while (true) {
property = a0[r8];
if (value4 != property) {
NON_ELIGIBLE_SCROLL_ITEMS = (require(9586) /* metro dependency 9586: ICYMIItemTypes */).NON_ELIGIBLE_SCROLL_ITEMS;
has = NON_ELIGIBLE_SCROLL_ITEMS.has;
item = property.item;
data = item.data;
kind = data.kind;
reducibleJoin4: while (true) {
if (Reflect.apply(has, NON_ELIGIBLE_SCROLL_ITEMS, [kind])) {
break reducibleJoin4;
}
item = property.item;
id = item.id;
env0_0 = id;
r1 = id;
break reducibleLoop1;
}
}
value6 = typeof r8 === 'bigint' ? r8 - 1n : +r8 - 1;
if (value6 >= 0) {
r8 = value6;
continue reducibleLoop1;
}
r1 = value4;
break reducibleLoop1;
}
} else {
r1 = value4;
}
if (value4 == r1) {
return [];
}
let value = items2.findIndex(function({id}) {
return id === id;
});
if (value < 0) {
r0 = [];
} else {
value = items2.slice(0, value + 1);
r0 = value;
}
return r0;
}
function isItemNSFW(a0) { // fn#75002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:5728, offset: 0x01d9faa7, size: 273 bytes, params: 2, frame: 15
var guild_id;
var r3;
var guild_id2;
var r6;
var value;
var value2;
var id;
var channel_id;
var channel;
var value4;
var value5;
const kind = a0.data.kind;
if (kind === 'message') {
channel_id = a0.data.message.channel_id;
value = undefined;
r3 = channel_id;
guild_id = value;
channel = ChannelStore.getChannel(r3);
value4 = null;
if (value4 == channel) {
value5 = undefined;
guild_id2 = value4 == channel ? value5 : channel.guild_id;
r6 = value4 == guild_id2 ? guild_id : guild_id2;
r3 = value4 != r6 ? GuildStore.getGuild(r6) : value4;
return (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.EXPLICIT || (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.AGE_RESTRICTED;
}
if (channel.nsfw) {
return true;
}
value5 = undefined;
guild_id2 = value4 == channel ? value5 : channel.guild_id;
r6 = value4 == guild_id2 ? guild_id : guild_id2;
r3 = value4 != r6 ? GuildStore.getGuild(r6) : value4;
return (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.EXPLICIT || (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.AGE_RESTRICTED;
}
if (kind === 'forumThread') {
id = a0.data.threadChannel.id;
value = undefined;
r3 = id;
guild_id = value;
channel = ChannelStore.getChannel(r3);
value4 = null;
if (value4 == channel) {
value5 = undefined;
guild_id2 = value4 == channel ? value5 : channel.guild_id;
r6 = value4 == guild_id2 ? guild_id : guild_id2;
r3 = value4 != r6 ? GuildStore.getGuild(r6) : value4;
return (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.EXPLICIT || (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.AGE_RESTRICTED;
}
if (channel.nsfw) {
return true;
}
value5 = undefined;
guild_id2 = value4 == channel ? value5 : channel.guild_id;
r6 = value4 == guild_id2 ? guild_id : guild_id2;
r3 = value4 != r6 ? GuildStore.getGuild(r6) : value4;
return (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.EXPLICIT || (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.AGE_RESTRICTED;
}
if (kind === 'guildEvent') {
value = GuildScheduledEventStore.getGuildScheduledEvent(a0.data.eventId);
value2 = undefined;
guild_id = value == null ? value2 : value.guild_id;
r3 = value2;
channel = ChannelStore.getChannel(r3);
value4 = null;
if (value4 == channel) {
value5 = undefined;
guild_id2 = value4 == channel ? value5 : channel.guild_id;
r6 = value4 == guild_id2 ? guild_id : guild_id2;
r3 = value4 != r6 ? GuildStore.getGuild(r6) : value4;
return (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.EXPLICIT || (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.AGE_RESTRICTED;
}
if (channel.nsfw) {
return true;
}
value5 = undefined;
guild_id2 = value4 == channel ? value5 : channel.guild_id;
r6 = value4 == guild_id2 ? guild_id : guild_id2;
r3 = value4 != r6 ? GuildStore.getGuild(r6) : value4;
return (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.EXPLICIT || (value4 == r3 ? value5 : r3.nsfwLevel) === GuildNSFWContentLevel.AGE_RESTRICTED;
}
return false;
}
function itemToType(a0) { // fn#75003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:6228, offset: 0x01d9fbb8, size: 298 bytes, params: 2, frame: 17
const kind = a0.data.kind;
if (kind === 'end') {
return 'end';
}
if (kind === 'loading') {
return 'loading';
}
if (kind === 'bottomLoading') {
return 'bottomLoading';
}
const value = 'message';
if (value === kind) {
return a0.channelType === ChannelTypes.GUILD_ANNOUNCEMENT ? 'announcement' : a0.data.messageContext?.external_content_application_id != null ? 'game_message' : value;
}
if (kind === 'guildEvent') {
return 'guild_event';
}
if (kind === 'contentInventory') {
return a0.data.content.content_type !== (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType.CUSTOM_STATUS ? 'hotwheels_gaming_activity' : 'hotwheels_custom_status';
}
if (kind === 'recommendedGuilds') {
return 'recommended_guilds';
}
if (kind === 'forumThread') {
return 'forum_thread';
}
if (kind === 'icymiHeader') {
return 'icymi_header';
}
return 'unknown';
}
function determineContentType(a0, a1) { // fn#75004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:6928, offset: 0x01d9fce2, size: 499 bytes, params: 3, frame: 18
var r1;
var r3;
const ContentType = (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType;
var moduleValue;
var moduleValue2;
let type = a0.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
if (type === GUILD_ANNOUNCEMENT) {
return ContentType.ANNOUNCEMENT;
}
type = a0.type;
const GUILD_FORUM = ChannelTypes.GUILD_FORUM;
if (type === GUILD_FORUM) {
return ContentType.FORUM_POST;
}
if (a1.reactions != null) {
var value2 = a1.reactions.map(function(a0) {
var r1;
var r0;
var property;
var value = 0;
if (a0.count_details == null) {
r0 = value;
} else {
property = a0.count_details.burst;
r1 = property ?? value;
property = a0.count_details.normal;
value = r1 + (property ?? value);
r0 = value;
}
return r0;
});
if (value2.length === 0) {
if (a1.attachments.length > 0) {
moduleValue = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
if (moduleValue.isValidImageAttachment(a1.attachments[0])) {
r3 = ContentType.IMAGE;
} else {
moduleValue2 = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
r3 = moduleValue2.isValidVideoAttachment(a1.attachments[0]) ? ContentType.VIDEO : ContentType.FILE;
}
r1 = r3;
} else {
r1 = a1.embeds.length > 0 ? ContentType.LINK : ContentType.INTERESTING;
}
return r1;
}
if (value2.reduce(function(a0, a1) {
return a0 + a1;
}) > 10) {
return ContentType.POPULAR_MESSAGE;
}
}
if (a1.attachments.length > 0) {
moduleValue = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
if (moduleValue.isValidImageAttachment(a1.attachments[0])) {
r3 = ContentType.IMAGE;
} else {
moduleValue2 = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
r3 = moduleValue2.isValidVideoAttachment(a1.attachments[0]) ? ContentType.VIDEO : ContentType.FILE;
}
r1 = r3;
} else {
r1 = a1.embeds.length > 0 ? ContentType.LINK : ContentType.INTERESTING;
}
return r1;
}
function contentTypeToText(a0) { // fn#75007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:7667, offset: 0x01d9ff1f, size: 984 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = a1;
let r1 = value !== undefined ? value : false;
const ContentType = (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType;
const POPULAR_MESSAGE = ContentType.POPULAR_MESSAGE;
if (POPULAR_MESSAGE === a0) {
return intl.string(t['H/2+cl']);
}
const IMAGE = ContentType.IMAGE;
if (IMAGE === a0) {
return intl.string(t.gmOWAo);
}
const VIDEO = ContentType.VIDEO;
if (VIDEO === a0) {
return intl.string(t.swhcPM);
}
const LINK = ContentType.LINK;
if (LINK === a0) {
return intl.string(t.oj5yvD);
}
const THREAD = ContentType.THREAD;
if (THREAD === a0) {
return intl.string(t.DwLrLK);
}
const FORUM_POST = ContentType.FORUM_POST;
if (FORUM_POST === a0) {
return intl.string(t['Q9/6BS']);
}
const CHANGED_STATUS = ContentType.CHANGED_STATUS;
if (CHANGED_STATUS === a0) {
return intl.string(t.TGrUmi);
}
const INTERESTING = ContentType.INTERESTING;
if (INTERESTING === a0) {
return intl.string(t['TahE/i']);
}
const ANNOUNCEMENT = ContentType.ANNOUNCEMENT;
if (ANNOUNCEMENT === a0) {
string = intl.string;
r1 = r1 ? Reflect.apply(string, intl, [t.E0MW8I]) : Reflect.apply(string, intl, [t['2ih63V']]);
return r1;
}
const FILE = ContentType.FILE;
if (FILE === a0) {
return intl.string(t.pYrnTY);
}
}
function* _fun74970(a0, a1, a2) { // fn#74970, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:588, offset: 0x01d9ed24, size: 320 bytes, params: 4, frame: 24
var environment;
if (true) {
var env0_0;
value = environment.__proto__.__proto__;
var binding = env2_10;
env0_0 = binding.getHydratedItems();
var value3 = a0.slice(a1, a2);
if (value3.length === 0) {
return undefined;
}
binding = env2_1;
var binding2 = env2_2;
binding(binding2[11]).loadHydratedAttempt(env2_15(a1, a2));
var filter = value3.filter;
value = Reflect.apply(filter, value3, [_fun74971]);
var value6 = value.filter(_fun74972).map(function(a0) {
return {channel_id: a0.data.channel_id, message_id: a0.data.message_id};
});
var value8 = value.map(_fun74974).flat();
filter = value8.filter;
var Boolean = global.Boolean;
var value9 = Reflect.apply(filter, value8, [Boolean]);
var value11 = value.filter(_fun74975).map(function(a0) {
return {user_id: a0.data.user_id, content_id: a0.data.content_id};
});
var value12 = binding(binding2[11]);
var fetchHydrated = value12.fetchHydrated;
var items2 = [];
arraySpread(items2, value9, arraySpread(items2, value6, 0, value), value);
yield Reflect.apply(fetchHydrated, value12, [a1, a2, {messageItems: items2, activityItems: value11}]);
}
}
function* _fun74979() { // fn#74979, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:1763, offset: 0x01d9f097, size: 140 bytes, params: 1, frame: 18
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_10;
var unreadDisplayItems = binding.getUnreadDisplayItems();
var readDisplayItems = env2_10.getReadDisplayItems();
var nextIndexToHydrate = env2_10.getNextIndexToHydrate();
binding = env2_16;
var items2 = [];
arraySpread(items2, readDisplayItems, arraySpread(items2, unreadDisplayItems, 0, undefined), undefined);
var ICYMI_PAGE_SIZE = env2_0(env2_2[10]).ICYMI_PAGE_SIZE;
yield binding(items2, nextIndexToHydrate, nextIndexToHydrate + ICYMI_PAGE_SIZE);
}
}
function* _fun74982(a0) { // fn#74982, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:2037, offset: 0x01d9f160, size: 402 bytes, params: 2, frame: 20
var environment;
if (true) {
var env0_0 = a0;
var env0_1;
var env0_2;
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
yield binding(binding2[22])(binding2[21], binding2.paths);
var value4 = undefined;
if (false) {
return value4;
}
env0_1 = value4.ack;
binding = env2_0;
var binding3 = env2_2;
yield binding(binding3[22])(binding3[23], binding3.paths);
var value7 = undefined;
if (false) {
return value7;
}
env0_2 = value7.AnalyticsObjectTypes;
env2_10.getDehydratedItems().forEach(_fun74983);
var value10 = env2_1(env2_2[11]);
yield value10.clearReadStates();
if (false) {
return undefined;
}
var value13 = env2_1(env2_2[11]);
yield value13.fetchDehydrated({'isReloading': true, 'forceRefresh': true});
if (false) {
return undefined;
}
var value16 = env2_1(env2_2[11]);
yield value16.reloadICYMITab();
if (false) {
return undefined;
}
var value19 = env2_1(env2_2[11]);
var getGuildChannelScores = value19.getGuildChannelScores;
yield Reflect.apply(getGuildChannelScores, value19, []);
if (false) {
return undefined;
}
env2_1(env2_2[11]).getRecommendedGuilds();
}
}
function _fun74992() { // fn#74992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:3983, offset: 0x01d9f661, size: 98 bytes, params: 1, frame: 15
const value = environment.__proto__;
const getMessage = MessageStore.getMessage;
const binding = env0_0;
let r0 = Reflect.apply(getMessage, MessageStore, [binding.getChannelId(),
binding.id]) ?? ICYMIStore.getHydratedItem(env0_0.id)?.message;
r0 = r0 ?? env0_0;
return r0;
}
function _fun74994() { // fn#74994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:4224, offset: 0x01d9f713, size: 32 bytes, params: 1, frame: 11
return ICYMIStore.getHydratedItem(env0_0.id);
}
function _fun74996() { // fn#74996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:4352, offset: 0x01d9f791, size: 90 bytes, params: 1, frame: 17
const value2 = null;
return value2 != require ? value2 != MessageStore.getMessage(env0_0, require) ? MessageStore.getMessage(env0_0,
require) : value2 == ICYMIStore.getHydratedItem(require) ? undefined : ICYMIStore.getHydratedItem(require).message : value2;
}
function _fun74971({id}) { // fn#74971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:736, offset: 0x01d9ee64, size: 27 bytes, params: 2, frame: 2
return env0_0[id] == null;
}
function _fun74972({type}) { // fn#74972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:767, offset: 0x01d9ee7f, size: 51 bytes, params: 2, frame: 12
const ICYMIItemTypes = env3_0(env3_2[10]).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
return type === MESSAGE;
}
function _fun74974(a0) { // fn#74974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:894, offset: 0x01d9eed7, size: 297 bytes, params: 2, frame: 15
var items2;
var data;
var message_context;
var push;
var object4;
var object5;
var object6;
const type = a0.type;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
value = undefined;
const ICYMIItemTypes = binding(env3_2[10]).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
if (type === MESSAGE) {
items2 = [];
data = a0.data;
message_context = data.message_context;
if ((message_context == null ? value : message_context.reply_message_id) != null) {
push = items2.push;
object4 = {};
data = a0.data;
object4.channel_id = data.channel_id;
data = a0.data;
object4.message_id = data.message_context.reply_message_id;
Reflect.apply(push, items2, [object4]);
}
data = a0.data;
message_context = data.message_context;
if ((message_context == null ? value : message_context.before_message_id) != null) {
push = items2.push;
object5 = {};
data = a0.data;
object5.channel_id = data.channel_id;
data = a0.data;
object5.message_id = data.message_context.before_message_id;
Reflect.apply(push, items2, [object5]);
}
data = a0.data;
message_context = data.message_context;
if ((message_context == null ? value : message_context.after_message_id) != null) {
push = items2.push;
object6 = {};
data = a0.data;
object6.channel_id = data.channel_id;
data = a0.data;
object6.message_id = data.message_context.after_message_id;
Reflect.apply(push, items2, [object6]);
}
return items2;
}
return [];
}
function _fun74975({type}) { // fn#74975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:1490, offset: 0x01d9f000, size: 51 bytes, params: 2, frame: 12
const ICYMIItemTypes = env3_0(env3_2[10]).ICYMIItemTypes;
const ACTIVITY = ICYMIItemTypes.ACTIVITY;
return type === ACTIVITY;
}
function _fun74983(a0) { // fn#74983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9765:2179, offset: 0x01d9f2f2, size: 260 bytes, params: 2, frame: 21
var data;
var value4;
var compare;
var ackMessageId;
var channel_id;
var value5;
var ackBinding;
var object2;
var atPreviousMillisecond;
const type = a0.type;
let value = environment.__proto__.__proto__.__proto__;
let binding = env3_0;
const ICYMIItemTypes = binding(env3_2[10]).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
let r3 = type === MESSAGE && a0.data.channel_type === env3_12.GUILD_ANNOUNCEMENT;
if (r3) {
binding = env3_1;
value4 = binding(env3_2[13]);
compare = value4.compare;
binding = env3_9;
ackMessageId = binding.ackMessageId;
data = a0.data;
value5 = Reflect.apply(ackMessageId, binding, [data.channel_id]);
data = a0.data;
r3 = Reflect.apply(compare, value4, [value5, data.message_id]) >= 0;
}
if (r3) {
ackBinding = ack;
data = a0.data;
channel_id = data.channel_id;
object2 = {object: env0_0};
object2.objectType = AnalyticsObjectTypes.ACK_SEMI_AUTOMATIC;
value = env3_1(env3_2[13]);
atPreviousMillisecond = value.atPreviousMillisecond;
data = a0.data;
value = Reflect.apply(atPreviousMillisecond, value, [data.message_id]);
ackBinding(channel_id, object2, true, true, value);
}
}
@@ -0,0 +1,180 @@
/* Metro module 14852; source: modules/icymi/native/AnnouncementMessageRow.tsx; dependencies: [31, 27, 1379, 1867, 3793, 4864, 1878, 14853, 33, 14815, 697, 566, 6593, 9580, 12129, 11401, 14854, 9579, 14856, 1244, 21, 5278, 9122, 14858, 14862, 2] */
function _fun112236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:6, offset: 0x023c02f6, size: 329 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(14853) /* metro dependency 14853: DesignConstants */).ITEM_PADDING;
const value2 = require(33) /* metro dependency 33 */;
const env0_11 = value2.jsx;
const env0_12 = value2.jsxs;
const env0_13 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(function(a0) {
var object = {};
object.pressable = {flex: 1, paddingLeft: a0.inset};
var object3 = {marginVertical: a0.margin};
object3.gap = importDefault(dependencyMap[10]).space.PX_8;
object3.paddingHorizontal = ITEM_PADDING;
object3.marginLeft = a0.inset;
object.footer = object3;
return object;
});
const env0_14 = value.memo(_fun112238);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/AnnouncementMessageRow.tsx');
exports.default = AnnouncementMessageRowWrapper;
}
function _fun112238({unread, message, guild, channel, visible}) { // fn#112238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:404, offset: 0x023c04ab, size: 767 bytes, params: 2, frame: 32
var object2;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112239);
const value4 = env0_13();
let binding = env0_3;
binding.useEffect(_fun112240, [guild?.id, message.author.id]);
binding = env0_3;
const value5 = binding.useCallback(_fun112241, [channel.id, message.id]);
const value6 = binding.useCallback(_fun112242, [channel, message]);
const value7 = binding.useCallback(_fun112243, [message, channel.id, guild.id]);
const value8 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useGravityMessage(message);
const ICYMICardInCard = importDefault(14856) /* metro dependency 14856: ICYMICardInCard */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8P08G9']);
object2.id = message.id;
object2.interactionType = 'announcement';
object2.channelId = channel.id;
const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
object2.timestamp = defaultImport2.extractTimestamp(message.id);
object2.onHeaderPress = value7;
object2.onHeaderLongPress = value5;
object2.message = value8;
object2.shouldFeatureUser = true;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {onPress: value7, onLongPress: value6, accessibilityRole: 'button',
accessibilityLabel: (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel,
unread: unread}),
accessibilityHint: (require(9122) /* metro dependency 9122: getChannelA11yLabel */).getChannelA11yHint({channel: channel,
muted: value3}), unstable_pressDelay: 130, style: value4.pressable};
const MessageRowContent = (require(14858) /* metro dependency 14858: ICYMIMessageRow */).MessageRowContent;
return (
<ICYMICardInCard {...object2}>
<PressableHighlight {...pressableHighlightProps}>
<MessageRowContent
message={message}
channel={channel}
guild={guild}
lineClamp={5}
visible={visible}
/>
</PressableHighlight>
<View style={value4.footer}>
{((Component) => <Component message={message} channel={channel} guild={guild} backgroundVariant="base" id={message.id} itemType="announcement" />)(importDefault(14862) /* metro dependency 14862: ICYMICardInteractionRow */)}
</View>
</ICYMICardInCard>
);
}
function AnnouncementMessageRowWrapper({unread, message, visible}) { // fn#112244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:2719, offset: 0x023c0a93, size: 300 bytes, params: 2, frame: 23
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const channel = Reflect.apply(useStateFromStores, fluxModule, [[ChannelStore], function() {
return ChannelStore.getChannel(message.getChannelId());
}]);
const guild = fluxModule.useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel?.guild_id);
});
const value3 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useGravityMessage(message);
const author = value3?.author;
const moduleValue4 = fluxModule;
useStateFromStores = moduleValue4.useStateFromStores;
return channel == null || guild == null || (value3 == null || author == null) || Reflect.apply(useStateFromStores,
moduleValue4, [[RelationshipStore], function() {
return RelationshipStore.isBlockedOrIgnored(author?.id);
}]) ? null : ((Component) => <Component unread={unread} message={value3} channel={channel} guild={guild} visible={visible} />)(env0_14);
}
function _fun112239() { // fn#112239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:502, offset: 0x023c07aa, size: 43 bytes, params: 1, frame: 13
const value = environment.__proto__;
const isChannelMuted = UserGuildSettingsStore.isChannelMuted;
const channelBinding = channel;
return Reflect.apply(isChannelMuted, UserGuildSettingsStore, [channelBinding.getGuildId(), channelBinding.id]);
}
function _fun112240() { // fn#112240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:565, offset: 0x023c07d5, size: 107 bytes, params: 1, frame: 15
var value3;
var defaultImport;
const guildBinding = guild;
const value2 = undefined;
if ((guildBinding == null ? value2 : guild.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.requestMembersById(guild == null ? value2 : guild.id, message.author.id);
}
return value2;
}
function _fun112241() { // fn#112241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:718, offset: 0x023c0840, size: 154 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'announcement', 'long_press_channel']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'announcement',
actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'channel'}});
value = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
value.openChannelLongPressActionSheet(channel.id);
}
function _fun112242() { // fn#112242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:1073, offset: 0x023c08da, size: 189 bytes, params: 1, frame: 22
const value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'announcement', 'long_press_message']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'announcement',
actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_container',
'actionIntentType': 'open', 'actionDestinationType': 'channel'}});
(require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */).showLongPressMessageActionSheet({channel: channel,
message: messageBinding, user: UserStore.getUser(messageBinding.author.id)});
}
function _fun112243() { // fn#112243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:1478, offset: 0x023c0997, size: 252 bytes, params: 1, frame: 22
var defaultImport3;
var ackGravityItems;
var navigateToPost;
let value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
let messageBinding = message;
let id = messageBinding.id;
Reflect.apply(itemInteracted, defaultImport, [id, 'announcement', 'press_message']);
const defaultImport2 = defaultImport;
const feedItemActioned = defaultImport2.feedItemActioned;
let object2 = {};
object2.itemId = messageBinding.id;
object2.itemType = 'announcement';
object2.actionParameters = {'actionGestureType': 'press', 'actionTargetElement': 'item_container',
'actionIntentType': 'navigate', 'actionDestinationType': 'channel'};
Reflect.apply(feedItemActioned, defaultImport2, [object2]);
if (messageBinding != null) {
defaultImport3 = defaultImport;
ackGravityItems = defaultImport3.ackGravityItems;
object2 = {};
messageBinding = message;
id = messageBinding.id;
object2.id = id;
object2.timestamp = global.Date.now();
Reflect.apply(ackGravityItems, defaultImport3, [[object2]]);
value = require(14854) /* metro dependency 14854: ICYMIShared */;
navigateToPost = value.navigateToPost;
id = channel.id;
Reflect.apply(navigateToPost, value, [id, guild.id, messageBinding.id]);
}
}
@@ -0,0 +1,35 @@
/* Metro module 14883; source: modules/icymi/native/CardHeightMeasurer.tsx; dependencies: [31, 27, 33, 14816, 9580, 2] */
function _fun112597(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15080:6, offset: 0x023d3fe8, size: 173 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun112598);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/CardHeightMeasurer.tsx');
exports.CardHeightMeasurer = value;
}
function _fun112598({itemId, children}) { // fn#112598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15080:145, offset: 0x023d4095, size: 154 bytes, params: 2, frame: 18
const binding = env0_3;
const useContext = binding.useContext;
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
return (
<View
onLayout={binding.useCallback(_fun112599, [itemId])}
pointerEvents="box-none"
style={{width: Reflect.apply(useContext, binding, [ICYMIContext]).width, alignSelf: 'center'}}
>
{children}
</View>
);
}
function _fun112599({nativeEvent}) { // fn#112599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15080:241, offset: 0x023d412f, size: 66 bytes, params: 2, frame: 14
const height = nativeEvent.layout.height;
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
value.setCardHeight(itemId, height);
}
@@ -0,0 +1,313 @@
/* Metro module 14878; source: modules/icymi/native/CaughtUpRow.tsx; dependencies: [5, 57, 31, 27, 33, 4017, 4573, 14815, 697, 9580, 14832, 14828, 4008, 4504, 3860, 10231, 1244, 4578, 14854, 4589, 676, 674, 2] */
function _fun112546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:6, offset: 0x023d0ee1, size: 330 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = value.createAnimatedComponent;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const env0_9 = Reflect.apply(createAnimatedComponent, value, [Text]);
const env0_10 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112547);
object = {code: 'function CaughtUpRowTsx1(){const{visibleSharedValue,withTiming,Easing}=this.__closure;return{transform:[{translateY:visibleSharedValue.get()?withTiming(0,{duration:250,easing:Easing.bezier(0.5,1.8,0.5,1)}):-80}],opacity:visibleSharedValue.get()?withTiming(1,{duration:100,easing:Easing.out(Easing.bezierFn(0.33,1,0.68,1))}):0};}'};
object = {code: 'function CaughtUpRowTsx2(){const{visibleSharedValue,withDelay,withSequence,withTiming,Easing}=this.__closure;return{transform:[{translateY:visibleSharedValue.get()?withDelay(80,withSequence(withTiming(8,{duration:100,easing:Easing.inOut(Easing.ease)}),withTiming(0,{duration:300,easing:Easing.out(Easing.ease)}))):0}]};}'};
object = {code: 'function CaughtUpRowTsx3(){const{visibleSharedValue,withDelay,withSequence,withTiming,Easing}=this.__closure;return{transform:[{translateY:visibleSharedValue.get()?withDelay(115,withSequence(withTiming(8,{duration:150,easing:Easing.inOut(Easing.ease)}),withTiming(0,{duration:300,easing:Easing.out(Easing.ease)}))):0}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/CaughtUpRow.tsx');
exports.default = ExploreServersRow;
}
function _fun112547(a0) { // fn#112547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:245, offset: 0x023d102b, size: 344 bytes, params: 2, frame: 17
const object2 = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.container = {'flex': 1, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
marginVertical: PX_32};
const object4 = {};
object4.marginHorizontal = a0.margin;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object2.textContainer = object4;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.recommendedGuildsContainer = {flex: 1, marginBottom: PX_24};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.iconWrapper = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_24};
object2.icon = {'height': 40, 'width': 40};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerText = {'alignSelf': 'center', 'marginBottom': null, 'textAlign': 'center', marginBottom: PX_8};
object2.subtitleText = {'alignSelf': 'center', 'textAlign': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.buttonContainer = {'flex': 1, 'width': '100%', gap: PX_12, paddingHorizontal: a0.margin};
object2.gradient = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': 150};
return object2;
}
function ExploreServersRow({visible}) { // fn#112548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2017, offset: 0x023d1183, size: 1477 bytes, params: 2, frame: 33
var object2;
const value2 = env0_10();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
let binding = env0_5;
binding.useEffect(_fun112549, [visible, value3]);
const [property, env0_2] = env0_4(binding.useState(false), 2);
const value7 = binding.useCallback(env0_3(_fun112552), []);
let closure = _fun112555;
const value8 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = ExploreServersRowE;
object2 = {visibleSharedValue: value3};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const Easing = reanimatedRexportModule.Easing;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 6575188656069;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = ExploreServersRowB;
object2 = {visibleSharedValue: value3};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.withSequence = reanimatedRexportModule.withSequence;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 469742746264;
closure.__initData = env0_12;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = ExploreServersRowX;
object2 = {visibleSharedValue: value3};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.withSequence = reanimatedRexportModule.withSequence;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 14933607481025;
closure.__initData = env0_13;
const value11 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const value12 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
const container = value2.container;
const textContainer = value2.textContainer;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [value2.iconWrapper, value9];
const FlashIcon = (require(10231) /* metro dependency 10231: FlashIcon */).FlashIcon;
const items2 = [<View2 style={items4}><FlashIcon size="custom" style={value2.icon} color="background-brand" /></View2>];
binding = env0_9;
const items3 = [value2.headerText, value10];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = ((Component) => <Component variant="heading-lg/semibold" color="mobile-text-heading-primary" style={items3}>{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.xjxffq])}</Component>)(binding);
items2[2] = ((Component) => <Component variant="text-md/normal" color="text-default" style={[value2.subtitleText,
value11]}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sAApb0)}</Component>)(binding);
const items5 = [<View style={textContainer}>{items2}</View>];
const buttonContainer = value2.buttonContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let value = <Button size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lNJYV8)} grow variant="primary" onPress={value7} loading={property} />;
string = intl.string;
const AGrUbj = (require(1244) /* metro dependency 1244: indexNative */).t.AGrUbj;
items5[1] = <View style={buttonContainer}>{value}<Button size="md" text={Reflect.apply(string, intl,
[AGrUbj])} grow variant="secondary" onPress={value8} /></View>;
const items7 = [<View style={container}>{items5}</View>];
const Separator = (require(14854) /* metro dependency 14854: ICYMIShared */).Separator;
items7[1] = <Separator />;
value = importDefault(4589) /* metro dependency 4589 */;
const gradient = value2.gradient;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
const value15 = (importDefault(674) /* metro dependency 674 */)(value12).alpha(0.2);
const items8 = [value15.hex()];
const value18 = (importDefault(674) /* metro dependency 674 */)(value12).alpha(0);
items8[1] = value18.hex();
items7[2] = ((Component) => <Component style={gradient} start={START} end={END} colors={items8} pointerEvents="none" />)(value);
return (
<View>
{items7}
</View>
);
}
function _fun112549() { // fn#112549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2109, offset: 0x023d1748, size: 69 bytes, params: 1, frame: 13
if (visible && env0_1.get() !== visible) {
global.setTimeout(_fun112550, 500);
}
}
function* _fun112552() { // fn#112552, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2242, offset: 0x023d17af, size: 198 bytes, params: 1, frame: 20
var environment;
if (true) {
value = environment.__proto__;
dependencyMap(true);
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[9]).itemInteracted('caught_up', 'caught_up', 'press_explore');
binding(binding2[9]).feedItemActioned({'itemId': 'caught_up', 'itemType': 'caught_up',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'browse_servers_button',
'actionIntentType': 'open', 'actionDestinationType': null}});
value = env2_0(binding2[10]);
yield value.maybeFetchGuildDiscoveryCategories();
if (false) {
return undefined;
}
global.setTimeout(_fun112553, 100);
}
}
function _fun112555() { // fn#112555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2728, offset: 0x023d18d8, size: 164 bytes, params: 1, frame: 19
let value = environment.__proto__;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).itemInteracted('caught_up', 'caught_up',
'press_home');
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({'itemId': 'caught_up',
'itemType': 'caught_up', actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'back_to_home_button', 'actionIntentType': 'navigate',
'actionDestinationType': 'guild_home'}});
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate('tabs', {screen: 'guilds'});
}
}
function ExploreServersRowE() { // fn#112556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:3133, owner: ExploreServersRow.E, offset: 0x023d197c, size: 321 bytes, params: 1, frame: 23
var r2;
var r1;
var value4;
var moduleValue;
var withTiming;
var object2;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
var out;
var Easing2;
const object4 = {};
if (env0_1.get()) {
value4 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object2 = {duration: 250};
object2.easing = Easing.bezier(0.5, 1.8, 0.5, 1);
r2 = Reflect.apply(withTiming, moduleValue, [0, object2]);
} else {
r2 = -80;
}
object4.transform = [{translateY: r2}];
let value = env0_1.get();
if (value) {
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
out = Easing.out;
Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
value = Reflect.apply(withTiming, value, [1, {duration: 100, easing: Reflect.apply(out, Easing,
[Easing2.bezierFn(0.33, 1, 0.68, 1)])}]);
r1 = value;
} else {
r1 = 0;
}
object4.opacity = r1;
return object4;
}
function ExploreServersRowB() { // fn#112557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:3557, owner: ExploreServersRow.b, offset: 0x023d1abd, size: 281 bytes, params: 1, frame: 28
var r1;
var withDelay;
var moduleValue;
var withSequence;
var moduleValue2;
var withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
var inOut;
var ease;
var value3;
var moduleValue3;
var out;
let value = env0_1.get();
const value2 = 0;
if (value) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
inOut = Easing.inOut;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value3 = Reflect.apply(withTiming, moduleValue2, [8, {duration: 100, easing: Reflect.apply(inOut, Easing,
[ease])}]);
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
out = Easing.out;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value = Reflect.apply(withDelay, value, [80, Reflect.apply(withSequence, moduleValue, [value3,
Reflect.apply(withTiming, moduleValue3, [value2, {duration: 300, easing: Reflect.apply(out, Easing,
[ease])}])])]);
r1 = value;
} else {
r1 = value2;
}
return {transform: [{translateY: r1}]};
}
function ExploreServersRowX() { // fn#112558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:4056, owner: ExploreServersRow.x, offset: 0x023d1bd6, size: 281 bytes, params: 1, frame: 28
var r1;
var withDelay;
var moduleValue;
var withSequence;
var moduleValue2;
var withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
var inOut;
var ease;
var value3;
var moduleValue3;
var out;
let value = env0_1.get();
const value2 = 0;
if (value) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
inOut = Easing.inOut;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value3 = Reflect.apply(withTiming, moduleValue2, [8, {duration: 150, easing: Reflect.apply(inOut, Easing,
[ease])}]);
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
out = Easing.out;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value = Reflect.apply(withDelay, value, [115, Reflect.apply(withSequence, moduleValue, [value3,
Reflect.apply(withTiming, moduleValue3, [value2, {duration: 300, easing: Reflect.apply(out, Easing,
[ease])}])])]);
r1 = value;
} else {
r1 = value2;
}
return {transform: [{translateY: r1}]};
}
function _fun112550() { // fn#112550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2142, offset: 0x023d178d, size: 23 bytes, params: 1, frame: 11
env1_1.set(true);
}
function _fun112553() { // fn#112553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2596, offset: 0x023d1875, size: 81 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__.__proto__;
env3_0(env3_2[11]).pushICYMIInfoModal({'extendedOnboarding': true, 'skipIntro': true});
global.setTimeout(function() {
dependencyMap(false);
}, 500);
}
@@ -0,0 +1,39 @@
/* Metro module 14863; source: modules/icymi/native/ContentInventoryEntryRow.tsx; dependencies: [31, 3793, 33, 566, 8370, 14864, 14873, 2] */
function _fun112403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15060:6, offset: 0x023c9f97, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ContentInventoryEntryRow.tsx');
exports.default = ContentInventoryEntryRow;
}
function ContentInventoryEntryRow({content, renderForScreenshot, visible}) { // fn#112404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15060:221, offset: 0x023ca031, size: 315 bytes, params: 2, frame: 19
renderForScreenshot = !(renderForScreenshot === undefined) && renderForScreenshot;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (!Reflect.apply(useStateFromStores, fluxModule, [[RelationshipStore], function() {
return RelationshipStore.isBlockedOrIgnored(content.author_id);
}])) {
var content_type = content.content_type;
var ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
var TOP_GAME = ContentInventoryEntryType.TOP_GAME;
if (TOP_GAME === content_type) {
return ((Component) => <Component content={content} renderForScreenshot={renderForScreenshot} />)(importDefault(14864) /* metro dependency 14864: GamingLikeEntryRow */);
}
ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
var PLAYED_GAME = ContentInventoryEntryType.PLAYED_GAME;
if (PLAYED_GAME === content_type) {
return ((Component) => <Component content={content} renderForScreenshot={renderForScreenshot} />)(importDefault(14864) /* metro dependency 14864: GamingLikeEntryRow */);
}
ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
var CUSTOM_STATUS = ContentInventoryEntryType.CUSTOM_STATUS;
if (CUSTOM_STATUS === content_type) {
return ((Component) => <Component content={content} renderForScreenshot={renderForScreenshot} visible={visible != null && visible} />)(importDefault(14873) /* metro dependency 14873: CustomStatusEntryRow */);
}
}
return null;
}
@@ -0,0 +1,9 @@
/* Metro module 14853; source: modules/icymi/native/DesignConstants.tsx; dependencies: [697, 2] */
function _fun112248(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15050:6, offset: 0x023c0c41, size: 104 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/DesignConstants.tsx');
exports.ITEM_PADDING = PX_12;
}
+540
View File
@@ -0,0 +1,540 @@
/* Metro module 14813; source: modules/icymi/native/ICYMI.tsx; dependencies: [57, 31, 27, 4502, 1226, 1867, 9577, 9569, 14814, 1376, 33, 4501, 697, 14815, 8341, 13512, 9580, 4080, 14817, 1962, 4068, 14828, 4573, 1244, 7556, 6618, 7704, 3963, 5278, 14762, 14764, 5312, 9579, 1478, 1585, 1485, 4884, 566, 14744, 14848, 14851, 7014, 1365, 14838, 1484, 7230, 5080, 11179, 13574, 677, 14852, 14858, 14863, 14876, 14877, 14878, 14879, 14880, 14881, 14882, 14883, 7701, 14884, 8416, 477, 9871, 4003, 14885, 14816, 3868, 2] */
function _fun111780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:6, offset: 0x023b1c82, size: 486 bytes, params: 8, frame: 19
const env0_0 = require;
const keyExtractor_111811 = function(a0) {
return a0.id;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.RefreshControl;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const icymiFiltersStore = importDefault(9577) /* metro dependency 9577: ICYMIFiltersStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const env0_12 = (require(14814) /* metro dependency 14814: ICYMIConstants */).NUM_GUILDS_EXTENDED_ONBOARDING;
const env0_13 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.Fragment;
const env0_16 = value3.jsxs;
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
var object2 = {};
object2.backgroundColor = importDefault(dependencyMap[12]).colors.BACKGROUND_BASE_LOWEST;
object2.paddingHorizontal = importDefault(dependencyMap[12]).space.PX_8;
object2.overflow = 'hidden';
object2.flex = 1;
object2.paddingTop = a0;
return {containerOuterTablet: object2};
});
const env0_18 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun111813);
const env0_19 = value.memo(_fun111814);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMI.tsx');
exports.ICYMITab = ICYMITab;
}
function SettingsButton() { // fn#111781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:1824, offset: 0x023b1e68, size: 112 bytes, params: 1, frame: 18
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const FiltersHorizontalIcon = (require(13512) /* metro dependency 13512: FiltersHorizontalIcon */).FiltersHorizontalIcon;
return (
<IconButton
accessibilityLabel="button"
variant="tertiary"
size="sm"
icon={<FiltersHorizontalIcon size="sm" />}
onPress={onPress_111782}
/>
);
}
function InfoButton() { // fn#111783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2319, offset: 0x023b1f78, size: 112 bytes, params: 1, frame: 18
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
return (
<IconButton
accessibilityLabel="button"
variant="tertiary"
size="sm"
icon={<CircleInformationIcon size="sm" />}
onPress={onPress_111784}
/>
);
}
function ICYMIHeaderTextWrapper() { // fn#111785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2780, offset: 0x023b2069, size: 73 bytes, params: 1, frame: 16
return (
<View style={env0_18().headerText}>
{env0_4.useMemo(_fun111786, [])}
</View>
);
}
function handleEndReached() { // fn#111787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:3995, offset: 0x023b21a2, size: 37 bytes, params: 1, frame: 11
(require(9579) /* metro dependency 9579: ICYMIUtils */).hydrateNextPage();
}
function ICYMI({inNestedNavigator}) { // fn#111788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4050, offset: 0x023b21c7, size: 1612 bytes, params: 2, frame: 45
const value2 = env0_18();
const {height, width} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value4 = (require(1485) /* metro dependency 1485 */).useIsFocused();
env0_4.useLayoutEffect(_fun111789);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.notificationItem();
}, []);
const showDot = (importDefault(14744) /* metro dependency 14744: useICYMITabBadge */)().showDot;
env0_4.useEffect(_fun111792, [value4]);
const value6 = (require(14848) /* metro dependency 14848: useSharedICYMILogic */).useSharedICYMILogic({showDot: showDot,
notificationItem: value5});
const data = value6.data;
const env0_3 = data;
const loading = value6.loading;
const version = value6.version;
const visibleItemIds = value6.visibleItemIds;
var env0_4 = visibleItemIds;
const endVisible = value6.endVisible;
const isRefreshing = value6.isRefreshing;
const handleOnRefresh = value6.handleOnRefresh;
const stickyHeaderIndices = value6.stickyHeaderIndices;
const viewabilityConfigCallbackPairs = value6.viewabilityConfigCallbackPairs;
(require(14851) /* metro dependency 14851: useICYMIEmptyLoadingAnalytics */).useICYMIEmptyLoadingAnalytics(loading,
value4);
const useGetDismissibleContentModule = require(7014) /* metro dependency 7014: useGetDismissibleContent */;
const useGetDismissibleContent = useGetDismissibleContentModule.useGetDismissibleContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const ICYMI_ALPHA_UPSELL = DismissibleContent.ICYMI_ALPHA_UPSELL;
const value8 = env0_3(Reflect.apply(useGetDismissibleContent, useGetDismissibleContentModule,
[[ICYMI_ALPHA_UPSELL]]), 2);
env0_4.useEffect(_fun111794, [value8[0], value8[1],
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuildCount();
})]);
env0_4.useEffect(_fun111795, [endVisible]);
const value11 = env0_4.useRef(null);
(require(1485) /* metro dependency 1485 */).useScrollToTop(env0_4.useRef({scrollToTop: scrollToTop_111796}));
env0_4.useEffect(_fun111798,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIFiltersStore], function() {
return ICYMIFiltersStore.getDoubleTapBehavior();
}), (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), useReducedMotion]);
const env0_13 = env0_4.useCallback(_fun111801, [value11, useReducedMotion]);
const value16 = height - top - 32 - 24 - (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight();
const value17 = env0_4.useCallback(_fun111802, [visibleItemIds, endVisible]);
const value18 = env0_4.useMemo(function() {
return {backgroundColor: 'transparent'};
}, []);
const value19 = env0_4.useMemo(_fun111808, [value16, data.length, width]);
const value20 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.hasNewContent();
}, []);
const items2 = [value2.containerInPanels];
items2[1] = value2.containerBackground;
const env0_192 = ((Component) => <Component inNestedNavigator={inNestedNavigator} />)(env0_19);
const items3 = [value2.flashListWrapper];
items3[1] = {height: value16, width: width, marginHorizontal: 'auto'};
items3[2] = value20;
const items4 = [((Component) => <Component onPress={onPress_111810} isRefreshing={isRefreshing} />)(importDefault(14884) /* metro dependency 14884: NewContentPill */)];
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const flashListProps = {ref: value11, scrollEnabled: !loading, extraData: {endVisible: endVisible},
contentContainerStyle: value18};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OIgYlQ = (require(1244) /* metro dependency 1244: indexNative */).t.OIgYlQ;
flashListProps.accessibilityLabel = Reflect.apply(string, intl, [OIgYlQ]);
flashListProps.data = data;
flashListProps.refreshing = isRefreshing;
flashListProps.refreshControl = <RefreshControl onRefresh={handleOnRefresh} refreshing={isRefreshing} tintColor={value2.refreshing.color} style={{opacity: value21 ? 0 : 1}} />;
flashListProps.onEndReachedThreshold = 3;
flashListProps.onEndReached = handleEndReached;
flashListProps.keyExtractor = keyExtractor_111811;
flashListProps.renderItem = value17;
flashListProps.estimatedItemSize = 200;
flashListProps.estimatedListSize = value19;
flashListProps.getItemType = (require(9579) /* metro dependency 9579: ICYMIUtils */).itemToType;
(require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
flashListProps.drawDistance = 100;
flashListProps.stickyHeaderIndices = stickyHeaderIndices;
flashListProps.viewabilityConfigCallbackPairs = viewabilityConfigCallbackPairs;
items4[1] = <FlashList {...flashListProps} key={'Version-' + (loading ? 1 : version)} />;
const TTIFirstContentfulPaint = (require(9871) /* metro dependency 9871: TTIFirstContentfulPaint */).TTIFirstContentfulPaint;
items4[2] = <TTIFirstContentfulPaint label="icymi" />;
return (
<View style={items2}>
{env0_192}
<View style={items3}>
{items4}
</View>
</View>
);
}
function _fun111813({margin}) { // fn#111813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:539, offset: 0x023b2f7e, size: 621 bytes, params: 2, frame: 16
const object3 = {container: {'flex': 1, 'flexShrink': 1, 'flexGrow': 1}};
const object4 = {'flex': 1, 'flexShrink': 1, 'flexGrow': 1, 'overflow': 'hidden'};
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.containerInPanels = object4;
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.containerBackground = {backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.flashListWrapper = {'backgroundColor': null, 'minHeight': 2, 'flex': 1,
backgroundColor: BACKGROUND_BASE_LOW};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.refreshing = {color: INTERACTIVE_TEXT_DEFAULT};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.header = {'backgroundColor': null, 'position': 'relative', 'overflow': 'hidden', 'width': '100%',
backgroundColor: BACKGROUND_BASE_LOW};
object3.headerLeft = {'flexDirection': 'row', 'alignItems': 'center'};
const object5 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginRight = PX_16;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.height = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.width = PX_32;
object5.alignItems = 'center';
object5.justifyContent = 'center';
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.headerClose = object5;
object3.headerTitle = {'height': 56, 'marginHorizontal': null, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', marginHorizontal: margin};
object3.headerText = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.headerActions = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const object6 = {'height': 18, 'width': 18};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.notificationBadge = object6;
const PX_96 = (importDefault(697) /* metro dependency 697: native */).space.PX_96;
object3.loading = {'flex': 1, 'justifyContent': 'center', paddingTop: PX_96};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.headerBorder = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'backgroundColor': null,
'height': 1, backgroundColor: BORDER_SUBTLE};
return object3;
}
function _fun111814({inNestedNavigator}) { // fn#111814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:3236, offset: 0x023b31eb, size: 638 bytes, params: 2, frame: 33
var r14;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = env0_18();
const value3 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const header = value2.header;
const ThemedGradient = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
const {LEVEL_7, LEVEL_8} = (require(3963) /* metro dependency 3963: ClientThemesUtils */).OverlayOpacity;
const items2 = [<ThemedGradient absolute wide tall mix mixAmount={{dark: LEVEL_7, light: LEVEL_8}} />];
const headerTitle = value2.headerTitle;
const headerLeft = value2.headerLeft;
if (value3) {
r14 = <PressableOpacity style={value2.headerClose} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} onPress={(require(14762) /* metro dependency 14762: Notifications */).goBack}>{inNestedNavigator ? ((LeftBackIconWithBadge) => <LeftBackIconWithBadge includeNotificationsCount />)((require(14764) /* metro dependency 14764: BackIconWithBadge */).LeftBackIconWithBadge) : ((XSmallIcon) => <XSmallIcon color="interactive-text-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>;
} else if (inNestedNavigator) {
r14 = <PressableOpacity style={value2.headerClose} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} onPress={(require(14762) /* metro dependency 14762: Notifications */).goBack}>{inNestedNavigator ? ((LeftBackIconWithBadge) => <LeftBackIconWithBadge includeNotificationsCount />)((require(14764) /* metro dependency 14764: BackIconWithBadge */).LeftBackIconWithBadge) : ((XSmallIcon) => <XSmallIcon color="interactive-text-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>;
} else {
r14 = null;
}
items2[1] = <View style={headerTitle}><View style={headerLeft}>{r14}<ICYMIHeaderTextWrapper /></View><View style={value2.headerActions}><InfoButton /><SettingsButton /></View></View>;
items2[2] = <View style={value2.headerBorder} />;
return (
<SafeAreaPaddingView top={!value3} style={header}>
{items2}
</SafeAreaPaddingView>
);
}
function ICYMITab({route}) { // fn#111815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:8277, offset: 0x023b3469, size: 496 bytes, params: 2, frame: 30
const value3 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
const value4 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const inNestedNavigator = route == null || route.params == null ? undefined : route.params.inNestedNavigator;
const styles = useStyles(top);
const value5 = env0_4.useMemo(_fun111817, [value4, styles.containerOuterTablet]);
const r9 = value4 ? View : env0_4.Fragment;
const AppFreezer = importDefault(14885) /* metro dependency 14885: AppFreezer */;
const ICYMIContextProvider = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContextProvider;
const r9Props = {...(value4 ? {style: value5} : {})};
const value6 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<AppFreezer>
<ICYMIContextProvider>
{((Component) => <Component {...r9Props}>{value6}<ThemeContextProvider gradient={value3}><ICYMI inNestedNavigator={inNestedNavigator} key={'' + id} /></ThemeContextProvider></Component>)(r9)}
</ICYMIContextProvider>
</AppFreezer>
);
}
function SettingsButtonOnPress() { // fn#111782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:1996, owner: SettingsButton.onPress, offset: 0x023b1ed8, size: 160 bytes, params: 1, frame: 19
let value = environment.__proto__;
importDefault(dependencyMap[16]).itemInteracted('filters_button', 'filters_button', 'press_info_button');
importDefault(dependencyMap[16]).feedPageActioned({actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'settings_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
const defaultImport3 = importDefault(dependencyMap[17]);
const openLazy = defaultImport3.openLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport3, [value, 'ICYMISettingsActionSheet', {}]);
}
function InfoButtonOnPress() { // fn#111784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2487, owner: InfoButton.onPress, offset: 0x023b1fe8, size: 129 bytes, params: 1, frame: 19
const value = environment.__proto__;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).itemInteracted('info_button', 'info_button',
'press_info_button');
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedPageActioned({actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'info_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
(require(14828) /* metro dependency 14828: NativeICYMIUtils */).pushICYMIInfoModal({extendedOnboarding: true});
}
function _fun111786() { // fn#111786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2837, offset: 0x023b20b2, size: 240 bytes, params: 1, frame: 24
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const SY4sdZ = (require(1244) /* metro dependency 1244: indexNative */).t.SY4sdZ;
const text = <Text color="mobile-text-heading-primary" variant="heading-lg/bold" maxFontSizeMultiplier={1.75} accessibilityRole="header">{Reflect.apply(string,
intl, [SY4sdZ])}</Text>;
string = intl.string;
const Ac2OZA = (require(1244) /* metro dependency 1244: indexNative */).t.Ac2OZA;
return (
<>
{text}
<Text
color="text-brand"
variant="text-xs/bold"
style={{marginTop: 4}}
>
{Reflect.apply(string, intl, [Ac2OZA])}
</Text>
</>
);
}
function _fun111789() { // fn#111789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4194, offset: 0x023b2813, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
}
function _fun111792() { // fn#111792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4393, offset: 0x023b284b, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).setTabFocused(env0_1);
}
function _fun111794() { // fn#111794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4890, offset: 0x023b288b, size: 91 bytes, params: 1, frame: 16
var value2;
if (env0_7 != null) {
value2 = environment.__proto__;
(require(14828) /* metro dependency 14828: NativeICYMIUtils */).pushICYMIInfoModal({extendedOnboarding: guildCount <= NUM_GUILDS_EXTENDED_ONBOARDING});
env0_8(ContentDismissActionType.USER_DISMISS);
}
}
function _fun111795() { // fn#111795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5003, offset: 0x023b28e6, size: 116 bytes, params: 1, frame: 16
var r0;
var defaultImport;
var openLazy;
var value;
const endVisibleBinding = endVisible;
if (endVisibleBinding) {
value = environment.__proto__;
value = ICYMIStore.hasOpenedEnoughTimes();
r0 = value;
} else {
r0 = endVisibleBinding;
}
if (r0) {
value = environment.__proto__;
defaultImport = importDefault(dependencyMap[17]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[43], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ICYMIFeedbackSheet', {}]);
}
}
function ICYMIScrollToTop() { // fn#111796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5156, owner: ICYMI.scrollToTop, offset: 0x023b295a, size: 54 bytes, params: 1, frame: 13
const current = env0_10.current;
if (current != null) {
current.scrollToOffset({offset: 0, animated: !useReducedMotion});
}
}
function _fun111798() { // fn#111798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5369, offset: 0x023b29a5, size: 102 bytes, params: 1, frame: 14
const doubleTapBehaviorBinding = doubleTapBehavior;
const GravityICYMIDoubleTapBehavior = (require(7230) /* metro dependency 7230: ICYMITypes */).GravityICYMIDoubleTapBehavior;
const DEFAULT = GravityICYMIDoubleTapBehavior.DEFAULT;
if (doubleTapBehaviorBinding === DEFAULT) {
env0_11.current = {scrollToTop: scrollToTop_111799};
} else {
env0_11.current = {scrollToTop: scrollToTop_111800};
}
}
function _fun111802({item}) { // fn#111802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5812, offset: 0x023b2aa1, size: 927 bytes, params: 2, frame: 20
var environment;
var r0;
var r4;
var value;
var ICYMIForumThreadRow;
var object2;
var channelType;
let data = item.data;
const kind = data.kind;
if (kind === 'message') {
channelType = item.channelType;
value = environment.__proto__;
if (channelType === (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_ANNOUNCEMENT) {
value = importDefault(14852) /* metro dependency 14852: AnnouncementMessageRow */;
value = ((Component) => <Component unread={item.unread} message={item.data.message} visible={visibleItemIds.find(function(a0) {
return a0.item.id === item.id;
}) != null} />)(value);
r0 = value;
} else {
value = importDefault(14858) /* metro dependency 14858: ICYMIMessageRow */;
object2 = {};
data = item.data;
object2.message = data.message;
data = item.data;
object2.messageContext = data.messageContext;
object2.visible = visibleItemIds.find(_fun111804) != null;
value = ((Component) => <Component {...object2} />)(value);
r0 = value;
}
r4 = r0;
value = environment.__proto__;
const CardHeightMeasurer = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
return (
<CardHeightMeasurer itemId={item.id}>
{r4}
</CardHeightMeasurer>
);
}
if (kind === 'contentInventory') {
value = environment.__proto__;
value = importDefault(14863) /* metro dependency 14863: ContentInventoryEntryRow */;
value = ((Component) => <Component visible={visibleItemIds.find(function(a0) {
return a0.item.id === item.id;
}) != null} content={item.data.content} />)(value);
r4 = value;
value = environment.__proto__;
const CardHeightMeasurer2 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
return (
<CardHeightMeasurer2 itemId={item.id}>
{r4}
</CardHeightMeasurer2>
);
}
if (kind === 'loading') {
value = environment.__proto__;
const ICYMILoading = (require(14876) /* metro dependency 14876: ICYMILoading */).ICYMILoading;
return <ICYMILoading />;
}
if (kind === 'bottomLoading') {
value = environment.__proto__;
const ICYMIBottomLoading = (require(14877) /* metro dependency 14877: ICYMIBottomLoading */).ICYMIBottomLoading;
return <ICYMIBottomLoading />;
}
if (kind === 'end') {
value = environment.__proto__;
value = importDefault(14878) /* metro dependency 14878: CaughtUpRow */;
return ((Component) => <Component visible={endVisible} />)(value);
}
if (kind === 'guildEvent') {
value = environment.__proto__;
value = importDefault(14879) /* metro dependency 14879: ICYMIGuildEventRow */;
value = ((Component) => <Component eventId={item.data.eventId} />)(value);
r4 = value;
value = environment.__proto__;
const CardHeightMeasurer3 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
return (
<CardHeightMeasurer3 itemId={item.id}>
{r4}
</CardHeightMeasurer3>
);
}
if (kind === 'recommendedGuilds') {
value = environment.__proto__;
const ICYMIServerRecommendationRow = (require(14880) /* metro dependency 14880: ICYMIServerRecommendationRow */).ICYMIServerRecommendationRow;
value = <ICYMIServerRecommendationRow />;
r4 = value;
value = environment.__proto__;
const CardHeightMeasurer4 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
return (
<CardHeightMeasurer4 itemId={item.id}>
{r4}
</CardHeightMeasurer4>
);
}
if (kind === 'icymiHeader') {
value = environment.__proto__;
value = importDefault(14881) /* metro dependency 14881: ICYMIHeader */;
return ((Component) => <Component />)(value);
}
if (kind === 'forumThread') {
value = environment.__proto__;
ICYMIForumThreadRow = (require(14882) /* metro dependency 14882: ICYMIForumThreadRow */).ICYMIForumThreadRow;
object2 = {};
data = item.data;
object2.message = data.message;
data = item.data;
object2.channel = data.threadChannel;
value = visibleItemIds.find(function(a0) {
return a0.item.id === item.id;
});
object2.visible = value != null;
value = <ICYMIForumThreadRow {...object2} />;
r4 = value;
value = environment.__proto__;
const CardHeightMeasurer5 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
return (
<CardHeightMeasurer5 itemId={item.id}>
{r4}
</CardHeightMeasurer5>
);
}
return null;
}
function _fun111808() { // fn#111808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:6904, offset: 0x023b2e6b, size: 46 bytes, params: 1, frame: 4
return data.length > 0 ? {height: env0_14, width: width} : undefined;
}
function ICYMIOnPress() { // fn#111810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:7270, owner: ICYMI.onPress, offset: 0x023b2eac, size: 112 bytes, params: 1, frame: 18
const value = environment.__proto__;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).itemInteracted('refresh_button',
'refresh_button', 'press_refresh_button');
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedPageActioned({actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'new_content_pill', 'actionIntentType': 'refresh', 'actionDestinationType': null}});
handleOnRefresh();
env0_13();
}
function _fun111817() { // fn#111817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:8483, offset: 0x023b3659, size: 24 bytes, params: 1, frame: 3
return env0_0 ? styles.containerOuterTablet : undefined;
}
function scrollToTop_111799() { // fn#111799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5448, offset: 0x023b2a0b, size: 54 bytes, params: 1, frame: 13
const current = env1_10.current;
if (current != null) {
current.scrollToOffset({offset: 0, animated: !useReducedMotion});
}
}
function scrollToTop_111800() { // fn#111800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5546, offset: 0x023b2a41, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[46]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[47], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {}, 'for-later-modal', {presentation: 'modal'}]);
}
@@ -0,0 +1,30 @@
/* Metro module 14877; source: modules/icymi/native/ICYMIBottomLoading.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
function _fun112543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15074:6, offset: 0x023d0d84, size: 198 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_2 = value.View;
const env0_3 = value.ActivityIndicator;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {};
object2.paddingTop = importDefault(dependencyMap[4]).space.PX_8;
object2.paddingBottom = importDefault(dependencyMap[4]).space.PX_24;
object2.alignItems = 'center';
object2.justifyContent = 'center';
return {container: object2};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIBottomLoading.tsx');
exports.ICYMIBottomLoading = ICYMIBottomLoading;
}
function ICYMIBottomLoading() { // fn#112545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15074:411, offset: 0x023d0ea1, size: 64 bytes, params: 1, frame: 16
const styles = useStyles();
return (
<View style={styles.container}>
<ActivityIndicator size="small" />
</View>
);
}
@@ -0,0 +1,377 @@
/* Metro module 14856; source: modules/icymi/native/ICYMICardInCard.tsx; dependencies: [31, 27, 1379, 1945, 1867, 661, 33, 14815, 697, 7599, 6819, 1305, 4584, 566, 4635, 8699, 4617, 4573, 4805, 14857, 1244, 6691, 14855, 5278, 4788, 8638, 2] */
function _fun112281(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:6, offset: 0x023c303b, size: 308 bytes, params: 8, frame: 19
const env0_0 = require;
const truncateUsername_112282 = function(a0) {
var r0;
var value = a0;
if (value.length > 20) {
value = value.slice(0, 17);
value = '' + value + '...';
r0 = value;
} else {
r0 = value;
}
return r0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR_HEX;
let value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
const env0_12 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112284);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMICardInCard.tsx');
exports.default = ICYMICardInCard;
}
function CutoutGuildIconWithUserCustom({guild, author}) { // fn#112283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:1518, offset: 0x023c316f, size: 311 bytes, params: 2, frame: 27
const value2 = env0_12();
const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const Circle = CutoutShape.Circle;
const items2 = [{'shape': null, 'x': 18, 'y': 18, 'size': 24, shape: Circle}];
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const SMALL_32 = GuildIconSizes.SMALL_32;
const clipView = <ClipView cutouts={items2}><GuildIcon guild={guild} size={SMALL_32} /></ClipView>;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const authorAvatar = value2.authorAvatar;
const id = guild.id;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL_20 = AvatarSizes.XSMALL_20;
return (
<View style={{'width': 40, 'height': 40}}>
{clipView}
<Avatar
animate
style={authorAvatar}
guildId={id}
user={author}
size={XSMALL_20}
/>
</View>
);
}
function _fun112284(a0) { // fn#112284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:329, offset: 0x023c32a6, size: 476 bytes, params: 2, frame: 17
const object2 = {};
object2.container = {marginTop: a0.margin};
object2.content = {'flex': 1, 'overflow': 'hidden'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.channelNameAndAccessory = {'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', paddingBottom: PX_4, marginHorizontal: a0.margin};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.channelNameAndAccessoryLarge = {flexDirection: 'column', paddingBottom: PX_4, marginHorizontal: a0.margin};
object2.header = {'flexDirection': 'row', 'flexGrow': 1};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.headerInfo = {'flexGrow': 1, 'flexShrink': 1, marginLeft: PX_12};
object2.title = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginBottom': 2};
object2.titleLeft = {'flexShrink': 1, 'flexGrow': 0, 'flexDirection': 'row', 'alignItems': 'center', 'gap': 6};
const object3 = {'flexDirection': 'row', 'justifyContent': 'space-between'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.subTitleContainer = object3;
object2.subtitle = {'flexShrink': 1, 'flexGrow': 0, 'width': '100%'};
object2.genContentSubtitle = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2};
object2.genContentSubtitleChannel = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2, 'flex': 1};
object2.subtitleTrailing = {paddingVertical: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.separator = {'height': 1, 'width': '100%', backgroundColor: BORDER_SUBTLE};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object2.normalContent = {'borderBottomWidth': 1, 'borderBottomColor': null, 'flexShrink': 0,
borderBottomColor: BORDER_STRONG};
object2.authorAvatar = {'position': 'absolute', 'right': 0, 'bottom': 0};
return object2;
}
function ICYMICardInCard({children, message, actionLabel, timestamp, id, interactionType, onHeaderPress, onHeaderLongPress, channelId, guildId, hideTimestamp, shouldFeatureUser}) { // fn#112285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:1978, offset: 0x023c3482, size: 1496 bytes, params: 2, frame: 48
const env0_3 = interactionType;
hideTimestamp = !(hideTimestamp === undefined) && hideTimestamp;
shouldFeatureUser = !(shouldFeatureUser === undefined) && shouldFeatureUser;
const value5 = undefined();
const value6 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const r21 = value7?.guild_id ?? guildId;
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112287, [r21]);
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun112288,
[shouldFeatureUser, r21, message]);
const value12 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: message == null || message.author == null ? undefined : message.author.id})});
const nicknameUtilsModule = require(4617) /* metro dependency 4617: NicknameUtils */;
const useName = nicknameUtilsModule.useName;
const r19 = shouldFeatureUser && (message?.author != null && r21 != null) && value7 != null ? Reflect.apply(useName,
nicknameUtilsModule, [r21, value7?.id, message?.author]) : null;
let binding = env0_3;
const value14 = binding.useMemo(_fun112289, [value9, shouldFeatureUser, message?.author]);
binding = env0_3;
const value15 = binding.useMemo(_fun112290, [value9]);
const value17 = binding.useMemo(_fun112291, [shouldFeatureUser, message?.author, r21, value7,
(importDefault(4805) /* metro dependency 4805: useChannelName */)(value7), r19, value10, value12,
value5.genContentSubtitle, value5.genContentSubtitleChannel, onHeaderPress, actionLabel]);
binding = env0_3;
const value18 = binding.useCallback(_fun112292, [value9, value7, id, interactionType]);
const value19 = binding.useMemo(_fun112293, [value6, value5.channelNameAndAccessoryLarge,
value5.channelNameAndAccessory]);
const container = value5.container;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const content = value5.content;
const header = value5.header;
const headerInfo = value5.headerInfo;
const title = value5.title;
const view = <View style={value5.titleLeft}>{value15}{!hideTimestamp && ((Text) => <Text lineClamp={1} variant="text-xs/normal" color="text-muted">{(require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(timestamp)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const subtitleTrailing = value5.subtitleTrailing;
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
return (
<View style={container}>
<PressableHighlight
onPress={onHeaderPress}
onLongPress={onHeaderLongPress}
style={content}
>
<View style={value19}>
<View style={header}>
{value14}
<View style={headerInfo}>
<View style={title}>
{view}
<PressableOpacity
onPress={value18}
style={subtitleTrailing}
hitSlop={8}
>
<MoreHorizontalIcon color={ICON_MUTED} size="sm" />
</PressableOpacity>
</View>
<View style={value5.subTitleContainer}>
<View style={value5.subtitle}>
{value17}
</View>
</View>
</View>
</View>
</View>
</PressableHighlight>
<View style={value5.normalContent}>
{children}
</View>
</View>
);
}
function _fun112287() { // fn#112287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2354, offset: 0x023c3a74, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_10 ? GuildStore.getGuild(env0_10) : value2;
}
function _fun112288() { // fn#112288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2426, offset: 0x023c3a9c, size: 104 bytes, params: 1, frame: 14
const shouldFeatureUserBinding = shouldFeatureUser;
const value2 = null;
return shouldFeatureUserBinding && value2 != env0_10 && value2 != (value2 == message ? undefined : message.author.id) ? GuildMemberStore.getMember(env0_10,
message.author.id) : value2;
}
function _fun112289() { // fn#112289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2780, offset: 0x023c3b04, size: 180 bytes, params: 1, frame: 20
const value2 = null;
return value2 == env0_11 ? value2 : shouldFeatureUser && value2 != (value2 == message ? undefined : message.author) ? <CutoutGuildIconWithUserCustom guild={env0_11} author={message.author} /> : ((Component) => <Component guild={env0_11} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.NORMAL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
function _fun112290() { // fn#112290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2994, offset: 0x023c3bb8, size: 111 bytes, params: 1, frame: 18
const value2 = null;
if (value2 != env0_11) {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={{maxWidth: 225}}
lineClamp={1}
variant="text-md/semibold"
color="mobile-text-heading-primary"
key={env0_11.id}
>
{env0_11.name}
</Text>
);
} else {
return value2;
}
}
function _fun112291() { // fn#112291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:3180, offset: 0x023c3c27, size: 1014 bytes, params: 1, frame: 32
var r22;
var r6;
var r7;
var messageBinding;
var value2;
var value3;
var value7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
var jsxRuntimeEnv1_11Binding;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var items3;
var value12;
var iconForChannel;
var items5;
var items6;
if (shouldFeatureUser) {
messageBinding = message;
value2 = undefined;
if ((messageBinding == null ? value2 : message.author) == null) {
value3 = null;
r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
value7 = environment.__proto__;
var viewBindingProps = {style: env0_7.genContentSubtitle};
items4 = [<Text variant="text-sm/medium" color="text-default">{actionLabel}</Text>];
if (value3 != env0_9) {
jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
items2 = [<Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}</Text>];
var viewBinding2Props = {style: env0_7.genContentSubtitleChannel};
items3 = [((Component) => <Component size="xs" color="text-default" />)(r22)];
items3[1] = <Text variant="text-sm/medium" color="text-default" onPress={onHeaderPress} style={{flex: 1}} lineClamp={1} ellipsizeMode="tail">{env0_15}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
r6 = <>{items2}</>;
} else {
r6 = value3;
}
items4[1] = r6;
return (
<View {...viewBindingProps}>
{items4}
</View>
);
}
if (env0_10 == null) {
value3 = null;
r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
value7 = environment.__proto__;
var viewBindingProps = {style: env0_7.genContentSubtitle};
items4 = [<Text variant="text-sm/medium" color="text-default">{actionLabel}</Text>];
if (value3 != env0_9) {
jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
items2 = [<Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}</Text>];
var viewBinding2Props = {style: env0_7.genContentSubtitleChannel};
items3 = [((Component) => <Component size="xs" color="text-default" />)(r22)];
items3[1] = <Text variant="text-sm/medium" color="text-default" onPress={onHeaderPress} style={{flex: 1}} lineClamp={1} ellipsizeMode="tail">{env0_15}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
r6 = <>{items2}</>;
} else {
r6 = value3;
}
items4[1] = r6;
return (
<View {...viewBindingProps}>
{items4}
</View>
);
}
if (env0_9 == null) {
value3 = null;
r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
value7 = environment.__proto__;
var viewBindingProps = {style: env0_7.genContentSubtitle};
items4 = [<Text variant="text-sm/medium" color="text-default">{actionLabel}</Text>];
if (value3 != env0_9) {
jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
items2 = [<Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}</Text>];
var viewBinding2Props = {style: env0_7.genContentSubtitleChannel};
items3 = [((Component) => <Component size="xs" color="text-default" />)(r22)];
items3[1] = <Text variant="text-sm/medium" color="text-default" onPress={onHeaderPress} style={{flex: 1}} lineClamp={1} ellipsizeMode="tail">{env0_15}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
r6 = <>{items2}</>;
} else {
r6 = value3;
}
items4[1] = r6;
return (
<View {...viewBindingProps}>
{items4}
</View>
);
}
if (env0_14 != null) {
r7 = (env0_12 == null ? value2 : env0_12.colorString) ?? DEFAULT_ROLE_COLOR_HEX;
value12 = environment.__proto__;
iconForChannel = (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9);
var viewBindingProps = {style: env0_7.genContentSubtitle};
items5 = [<Text variant="text-sm/semibold" style={[{color: r7},
env0_13 != null ? {fontFamily: env0_13} : value2]}>{truncateUsername_112282(env0_14)}</Text>];
items5[1] = <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}</Text>;
var viewBinding3Props = {style: env0_7.genContentSubtitleChannel};
items6 = [((Component) => <Component size="xs" color="text-default" />)(iconForChannel)];
items6[1] = <Text variant="text-sm/medium" color="text-default" onPress={onHeaderPress} style={{flex: 1}} lineClamp={1} ellipsizeMode="tail">{env0_15}</Text>;
items5[2] = <View {...viewBinding3Props}>{items6}</View>;
return (
<View {...viewBindingProps}>
{items5}
</View>
);
}
value3 = null;
r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
value7 = environment.__proto__;
var viewBindingProps2 = {style: env0_7.genContentSubtitle};
items4 = [<Text variant="text-sm/medium" color="text-default">{actionLabel}</Text>];
if (value3 != env0_9) {
jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
items2 = [<Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}</Text>];
var viewBinding2Props = {style: env0_7.genContentSubtitleChannel};
items3 = [((Component) => <Component size="xs" color="text-default" />)(r22)];
items3[1] = <Text variant="text-sm/medium" color="text-default" onPress={onHeaderPress} style={{flex: 1}} lineClamp={1} ellipsizeMode="tail">{env0_15}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
r6 = <>{items2}</>;
} else {
r6 = value3;
}
items4[1] = r6;
return (
<View {...viewBindingProps2}>
{items4}
</View>
);
}
value3 = null;
r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
const genContentSubtitle = env0_7.genContentSubtitle;
const text = <Text variant="text-sm/medium" color="text-default">{actionLabel}</Text>;
if (value3 != env0_9) {
jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
items2 = [<Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}</Text>];
var viewBinding2Props = {style: env0_7.genContentSubtitleChannel};
items3 = [((Component) => <Component size="xs" color="text-default" />)(r22)];
items3[1] = <Text variant="text-sm/medium" color="text-default" onPress={onHeaderPress} style={{flex: 1}} lineClamp={1} ellipsizeMode="tail">{env0_15}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
r6 = <>{items2}</>;
} else {
r6 = value3;
}
return (
<View style={genContentSubtitle}>
{text}
{r6}
</View>
);
}
function _fun112292() { // fn#112292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:4519, offset: 0x023c401d, size: 111 bytes, params: 1, frame: 13
var value4;
if (env0_11 != null && env0_9 != null) {
value4 = environment.__proto__;
(require(14855) /* metro dependency 14855: openDetailsActionSheet */).openDetailsActionSheet({guildId: env0_11.id,
channelId: env0_9.id, id: id, type: interactionType});
}
}
function _fun112293() { // fn#112293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:4643, offset: 0x023c408c, size: 45 bytes, params: 1, frame: 3
return env0_8 > 1.8 ? env0_7.channelNameAndAccessoryLarge : env0_7.channelNameAndAccessory;
}
@@ -0,0 +1,650 @@
/* Metro module 14862; source: modules/icymi/native/ICYMICardInteractionRow.tsx; dependencies: [57, 31, 27, 6898, 1379, 4798, 3784, 661, 1881, 33, 3795, 7151, 4501, 697, 477, 4000, 566, 4603, 7067, 8529, 5278, 1244, 7950, 4573, 9841, 673, 1423, 9835, 8852, 11252, 9600, 11209, 14854, 6682, 7152, 11419, 9797, 9580, 9591, 11004, 3860, 4589, 674, 6818, 2] */
function _fun112372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:6, offset: 0x023c81df, size: 479 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = onAddReaction;
const closure2 = useThread;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Image;
const env0_7 = value.ScrollView;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.MessageFlags;
const env0_13 = value.Permissions;
const env0_14 = value.HorizontalGradient;
const env0_15 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
value = require(33) /* metro dependency 33 */;
const env0_16 = value.jsx;
const env0_17 = value.jsxs;
const env0_18 = value.Fragment;
const env0_20 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112388);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMICardInteractionRow.tsx');
exports.default = ICYMICardInteractionRow;
exports.onAddReaction = closure;
exports.useThread = closure2;
}
function onAddReaction(a0, a1, a2, a3) { // fn#112373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:336, offset: 0x023c83be, size: 114 bytes, params: 5, frame: 19
var value;
var moduleValue;
if (a2 != null) {
value = require(3795) /* metro dependency 3795: ReactionUtils */;
value = value.toReactionEmoji(a2);
moduleValue = require(7151) /* metro dependency 7151: ReactionActionCreators */;
moduleValue.addReaction(a0, a1, value,
(require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations.MESSAGE, {burst: a3});
}
}
function useThread(a0, a1, a2) { // fn#112374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2212, offset: 0x023c8430, size: 180 bytes, params: 4, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const {thread, messageCount,
mostRecentMessage} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
ThreadMessageStore], _fun112375);
env0_4.useEffect(_fun112376, [a0 == null ? value2 : a0.id, a2, a1, a0]);
return {thread: thread, messageCount: messageCount, mostRecentMessage: mostRecentMessage};
}
function AddEmojiButton({channel, onPressEmoji, showText, disabled, handleItemInteracted}) { // fn#112377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2842, offset: 0x023c8652, size: 409 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = env0_4.useCallback(_fun112378, [channel, onPressEmoji, handleItemInteracted]);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: value2, style: [styles.emojiContainer, styles.addEmojiContainer,
disabled ? styles.disabled : null], accessible: true};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lfIHs4);
pressableOpacityProps.disabled = disabled;
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
return (
<PressableOpacity {...pressableOpacityProps}>
<ReactionIcon size="sm" />
{showText && ((Text) => <Text variant="text-sm/semibold" color="redesign-button-tertiary-text">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m9O1gd)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</PressableOpacity>
);
}
function EmojiReaction({messageId, channel, reaction, count, isBurstReaction, handleItemInteracted}) { // fn#112379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:3667, offset: 0x023c8879, size: 975 bytes, params: 2, frame: 32
var r1;
var moduleValue2;
const env0_4 = handleItemInteracted;
const styles = useStyles();
const value4 = (require(9841) /* metro dependency 9841: useEmojiColorPalette */).useEmojiColorPalette(reaction.burst_colors ?? []);
const object2 = {};
const value5 = '';
if (value4 != null) {
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
r1 = moduleValue2.hex2rgb(value4?.backgroundColor, value4?.opacity ?? 0.15) ?? value5;
} else {
r1 = value5;
}
object2.backgroundColor = r1;
object2.borderColor = value4?.backgroundColor;
const r12 = value4?.accentColor != null ? {color: value4.accentColor} : null;
const emoji = reaction.emoji;
let r10 = isBurstReaction ? reaction.me_burst : reaction.me;
const selected = r10 ? styles.selected : undefined;
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildVerificationStore],
_fun112380);
const value9 = env0_4.useMemo(_fun112381, [emoji]);
const value10 = env0_4.useCallback(function() {
handleItemInteracted('press_reaction', {'actionGestureType': 'press',
'actionTargetElement': 'toggle_existing_reaction_button', 'actionIntentType': 'react',
'actionDestinationType': null});
require(dependencyMap[27]).handleAddOrRemoveReaction(messageId, channel, reaction, isBurstReaction,
require(dependencyMap[11]).ReactionLocations.MESSAGE);
}, [channel, isBurstReaction, messageId, reaction, handleItemInteracted]);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: [styles.emojiContainer, selected, isBurstReaction && object2],
onPress: value10, accessible: true, accessibilityLabel: emoji.name, disabled: !value8};
const view = <View style={[styles.innerEmojiContainer,
r10 && styles.selectedInnerEmojiContainer]}>{emoji.id == null ? ((Text) => <Text variant="text-md/medium" color="interactive-text-default" style={[styles.defaultEmoji,
styles.emojiText]} allowFontScaling={false}>{emoji.name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? <Image style={[styles.defaultEmoji,
styles.emojiImage]} source={value9} /> : ((Component) => <Component emoji={emoji} size={env0_19} style={styles.defaultEmoji} animate />)(importDefault(8852) /* metro dependency 8852: ActivityEmoji */)}</View>;
r10 = r10 && styles.selectedInnerTextContainer;
return (
<PressableOpacity {...pressableOpacityProps}>
{view}
<View style={[styles.innerTextContainer, r10]}>
{((Component) => <Component animate count={count} textStyle={isBurstReaction ? r12 : null} textVariant="text-md/semibold" />)(importDefault(11252) /* metro dependency 11252: AnimatedCounter */)}
</View>
</PressableOpacity>
);
}
function ForwardButton({onPress, disabled}) { // fn#112383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:5293, offset: 0x023c8d59, size: 223 bytes, params: 2, frame: 19
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.emojiContainer];
items2[1] = styles.addEmojiContainer;
items2[2] = disabled ? styles.disabled : null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PressableOpacity
onPress={onPress}
style={items2}
accessible
disabled={disabled}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xIUfJS)}
>
{((Component) => <Component size="sm" />)(importDefault(9600) /* metro dependency 9600: ForwardingIcon */)}
</PressableOpacity>
);
}
function ReplyButton({onPress, disabled}) { // fn#112384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:5578, offset: 0x023c8e38, size: 225 bytes, params: 2, frame: 19
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress, style: [styles.emojiContainer, styles.addEmojiContainer,
disabled ? styles.disabled : null], accessible: true, disabled: disabled};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NwaNY']);
const ArrowAngleLeftUpIcon = (require(11209) /* metro dependency 11209: ArrowAngleLeftUpIcon */).ArrowAngleLeftUpIcon;
return (
<PressableOpacity {...pressableOpacityProps}>
<ArrowAngleLeftUpIcon size="sm" />
</PressableOpacity>
);
}
function ThreadAsCommentsButton({parentMessage, threadData, style, handleItemInteracted}) { // fn#112385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:5885, offset: 0x023c8f19, size: 562 bytes, params: 2, frame: 25
var messageCount;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
return PermissionStore.canWithPartialContext(VIEW_CHANNEL, {channelId: parentMessage.id});
});
const value3 = env0_4.useCallback(_fun112387, [parentMessage, threadData.thread, handleItemInteracted]);
if (value2) {
messageCount = threadData.messageCount;
if (messageCount === 0) {
return null;
}
if (threadData.thread == null) {
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
return (
<PressableHighlight style={[styles.comments, style]} onPress={value3}>
<View style={styles.commentCount}>
{((ChatIcon) => <ChatIcon style={styles.commentsIcon} />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
</View>
</PressableHighlight>
);
}
if (threadData.mostRecentMessage != null) {
messageCount = threadData.messageCount;
messageCount = messageCount > 9 ? '9+' : threadData.messageCount;
const PressableHighlight2 = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
return (
<PressableHighlight2 style={[styles.comments, style]} onPress={value3}>
<View style={styles.commentCount}>
{((ChatIcon) => <ChatIcon style={styles.commentsIcon} />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
{((Text) => <Text variant="text-md/semibold" color="text-strong">{messageCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</PressableHighlight2>
);
}
const PressableHighlight3 = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
return (
<PressableHighlight3 style={[styles.comments, style]} onPress={value3}>
<View style={styles.commentCount}>
{((ChatIcon) => <ChatIcon style={styles.commentsIcon} />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
</View>
</PressableHighlight3>
);
}
return null;
}
function _fun112388() { // fn#112388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:517, offset: 0x023c9205, size: 674 bytes, params: 1, frame: 19
const object3 = {container: {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap',
'justifyContent': 'space-between'}, replyForwardButtonContainer: {'flexDirection': 'row',
'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 6}, emojisRowContainer: {'position': 'relative',
'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 6},
emojisContainer: {'position': 'relative', 'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap',
'gap': 6}};
const object4 = {'flexDirection': 'row', 'backgroundColor': null, 'borderRadius': null, 'flexShrink': 3,
'paddingHorizontal': 8, 'gap': 6};
let REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.emojiContainer = object4;
object3.innerEmojiContainer = {paddingVertical: 5};
object3.selectedInnerEmojiContainer = {paddingVertical: 4};
object3.addEmojiContainer = {'minHeight': 30, 'alignItems': 'center'};
object3.disabled = {opacity: 0.4};
object3.defaultEmoji = {width: env0_19, height: env0_19};
const object5 = {'lineHeight': null, 'fontSize': 16, 'textAlign': 'center', 'paddingTop': 2};
object5.lineHeight = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 16 : env0_19;
object3.emojiText = object5;
object3.selectedInnerTextContainer = {paddingBottom: 3.5};
object3.innerTextContainer = {'alignSelf': 'flex-end', 'paddingBottom': 4.5};
object3.emojiImage = {resizeMode: 'contain', width: env0_19, height: env0_19};
const object6 = {'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 7};
const BRAND_560 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_560;
object6.borderColor = BRAND_560;
const value = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = value.hexWithOpacity;
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object6.backgroundColor = Reflect.apply(hexWithOpacity, value, [BRAND_500, 0.3]);
object3.selected = object6;
object3.gradient = {'position': 'absolute', 'right': 0, 'top': 0, 'bottom': 0, 'width': 48};
object3.overflowChevron = {'position': 'absolute', 'right': 0};
const object8 = {'paddingVertical': 6, 'paddingHorizontal': 8, 'backgroundColor': null, 'borderRadius': null,
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object8.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.comments = object8;
object3.commentCount = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 4,
'justifySelf': 'end'};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.commentsIcon = {'width': 20, 'height': 20, tintColor: INTERACTIVE_TEXT_DEFAULT};
return object3;
}
function ICYMICardInteractionRow({message, channel, guild, hideAdditionalButtons, isKeyMessage, inForum, backgroundVariant, id, itemType}) { // fn#112389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:6994, offset: 0x023c94a7, size: 1429 bytes, params: 2, frame: 54
var r20;
var r8;
var r0;
var items2;
var items4;
var value25;
var items5;
hideAdditionalButtons = !(hideAdditionalButtons === undefined) && hideAdditionalButtons;
isKeyMessage = !(isKeyMessage === undefined) && isKeyMessage;
const env0_3 = isKeyMessage;
inForum = !(inForum === undefined) && inForum;
backgroundVariant = backgroundVariant === undefined ? 'primary' : backgroundVariant;
const env0_4 = backgroundVariant;
const styles = useStyles();
const value2 = useThread(guild, message, inForum);
let binding = env0_4;
let useMemo = binding.useMemo;
const value3 = Reflect.apply(useMemo, binding, [function() {
message.reactions.forEach(_fun112391);
return [];
}, [message.reactions]]);
const value4 = env0_4.useMemo(_fun112392, [channel]);
const value5 = (require(9797) /* metro dependency 9797: canForwardMessage */).useCanForwardMessage(message);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var SEND_MESSAGES = Permissions.SEND_MESSAGES;
return PermissionStore.can(SEND_MESSAGES, channel);
});
const {hasOverflow, showReplyForwardButtons, showThreadAsComments} = env0_4.useMemo(_fun112394,
[hideAdditionalButtons, value2.messageCount, value3.length, value6, value5]);
const value8 = env0_4.useCallback(_fun112395, [id, itemType]);
const value9 = env0_4.useCallback(_fun112396, [channel.id, message.id, value8]);
const value10 = env0_4.useCallback(_fun112397, [message, value8]);
const value11 = env0_4.useCallback(_fun112398, [channel, message, value8]);
binding = env0_4;
useMemo = binding.useMemo;
const value13 = (require(3860) /* metro dependency 3860: useToken */).useToken(Reflect.apply(useMemo, binding,
[_fun112399, [backgroundVariant, isKeyMessage]]));
const [property, env0_12] = env0_3(env0_4.useState(true), 2);
const value16 = env0_4.useCallback(_fun112400, []);
const value17 = env0_4.useCallback(_fun112401, [value8]);
if (value3.length !== 0) {
var viewBindingProps = {style: styles.container};
var viewBinding2Props = {style: styles.emojisRowContainer};
if (value3.length > 0) {
var viewBinding3Props = {style: [styles.emojisContainer]};
var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6},
onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false};
r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments);
if (r20) {
var viewBinding4Props = {style: styles.replyForwardButtonContainer};
items2 = [showThreadAsComments && <ThreadAsCommentsButton threadData={value2} parentMessage={message} handleItemInteracted={value8} />];
items2[1] = showReplyForwardButtons && <><ReplyButton onPress={value11} disabled={!value6} /><ForwardButton onPress={value10} disabled={!value5} /></>;
r20 = <View {...viewBinding4Props}>{items2}</View>;
}
items4 = [r20];
items4[1] = value3.map(_fun112402);
value25 = null;
r20 = hideAdditionalButtons ? value25 : value4 ? <AddEmojiButton channel={channel} onPressEmoji={value9} handleItemInteracted={value8} /> : value25;
items4[2] = r20;
items5 = [<ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>];
items5[1] = hasOverflow && property ? <>{((Component) => <Component style={styles.gradient} start={HorizontalGradient.START} end={HorizontalGradient.END} colors={[(importDefault(674) /* metro dependency 674 */)(value13).alpha(0).hex(),
value13, value13]} locations={[0, 0.8,
1]} />)(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={[styles.overflowChevron]} size="xs" color="icon-muted" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</> : value25;
r8 = <View {...viewBinding3Props}>{items5}</View>;
} else if (value4) {
var viewBinding3Props = {style: [styles.emojisContainer]};
var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6},
onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false};
r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments);
if (r20) {
var viewBinding4Props = {style: styles.replyForwardButtonContainer};
items2 = [showThreadAsComments && <ThreadAsCommentsButton threadData={value2} parentMessage={message} handleItemInteracted={value8} />];
items2[1] = showReplyForwardButtons && <><ReplyButton onPress={value11} disabled={!value6} /><ForwardButton onPress={value10} disabled={!value5} /></>;
r20 = <View {...viewBinding4Props}>{items2}</View>;
}
items4 = [r20];
items4[1] = value3.map(_fun112402);
value25 = null;
r20 = hideAdditionalButtons ? value25 : value4 ? <AddEmojiButton channel={channel} onPressEmoji={value9} handleItemInteracted={value8} /> : value25;
items4[2] = r20;
items5 = [<ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>];
items5[1] = hasOverflow && property ? <>{((Component) => <Component style={styles.gradient} start={HorizontalGradient.START} end={HorizontalGradient.END} colors={[(importDefault(674) /* metro dependency 674 */)(value13).alpha(0).hex(),
value13, value13]} locations={[0, 0.8,
1]} />)(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={[styles.overflowChevron]} size="xs" color="icon-muted" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</> : value25;
r8 = <View {...viewBinding3Props}>{items5}</View>;
} else {
r8 = null;
}
r0 = <View {...viewBindingProps}><View {...viewBinding2Props}>{r8}</View></View>;
} else if (hideAdditionalButtons) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
var viewBinding2Props = {style: styles.emojisRowContainer};
if (value3.length > 0) {
var viewBinding3Props = {style: [styles.emojisContainer]};
var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6},
onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false};
r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments);
if (r20) {
var viewBinding4Props = {style: styles.replyForwardButtonContainer};
items2 = [showThreadAsComments && <ThreadAsCommentsButton threadData={value2} parentMessage={message} handleItemInteracted={value8} />];
items2[1] = showReplyForwardButtons && <><ReplyButton onPress={value11} disabled={!value6} /><ForwardButton onPress={value10} disabled={!value5} /></>;
r20 = <View {...viewBinding4Props}>{items2}</View>;
}
items4 = [r20];
items4[1] = value3.map(_fun112402);
value25 = null;
r20 = hideAdditionalButtons ? value25 : value4 ? <AddEmojiButton channel={channel} onPressEmoji={value9} handleItemInteracted={value8} /> : value25;
items4[2] = r20;
items5 = [<ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>];
items5[1] = hasOverflow && property ? <>{((Component) => <Component style={styles.gradient} start={HorizontalGradient.START} end={HorizontalGradient.END} colors={[(importDefault(674) /* metro dependency 674 */)(value13).alpha(0).hex(),
value13, value13]} locations={[0, 0.8,
1]} />)(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={[styles.overflowChevron]} size="xs" color="icon-muted" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</> : value25;
r8 = <View {...viewBinding3Props}>{items5}</View>;
} else if (value4) {
var viewBinding3Props = {style: [styles.emojisContainer]};
var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6},
onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false};
r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments);
if (r20) {
var viewBinding4Props = {style: styles.replyForwardButtonContainer};
items2 = [showThreadAsComments && <ThreadAsCommentsButton threadData={value2} parentMessage={message} handleItemInteracted={value8} />];
items2[1] = showReplyForwardButtons && <><ReplyButton onPress={value11} disabled={!value6} /><ForwardButton onPress={value10} disabled={!value5} /></>;
r20 = <View {...viewBinding4Props}>{items2}</View>;
}
items4 = [r20];
items4[1] = value3.map(_fun112402);
value25 = null;
r20 = hideAdditionalButtons ? value25 : value4 ? <AddEmojiButton channel={channel} onPressEmoji={value9} handleItemInteracted={value8} /> : value25;
items4[2] = r20;
items5 = [<ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>];
items5[1] = hasOverflow && property ? <>{((Component) => <Component style={styles.gradient} start={HorizontalGradient.START} end={HorizontalGradient.END} colors={[(importDefault(674) /* metro dependency 674 */)(value13).alpha(0).hex(),
value13, value13]} locations={[0, 0.8,
1]} />)(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={[styles.overflowChevron]} size="xs" color="icon-muted" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</> : value25;
r8 = <View {...viewBinding3Props}>{items5}</View>;
} else {
r8 = null;
}
r0 = <View {...viewBindingProps}><View {...viewBinding2Props}>{r8}</View></View>;
}
return r0;
}
function _fun112375() { // fn#112375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2285, offset: 0x023c84e4, size: 157 bytes, params: 1, frame: 15
var r0;
var object2;
var value3;
var getChannel;
var id;
var value4;
var getCount;
var value5;
var getMostRecentMessage;
const value2 = null;
if (value2 == require) {
r0 = {'thread': null, 'messageCount': 0, 'mostRecentMessage': null};
} else if (value2 == env0_0) {
r0 = {'thread': null, 'messageCount': 0, 'mostRecentMessage': null};
} else {
object2 = {};
value3 = environment.__proto__;
getChannel = ChannelStore.getChannel;
id = require.id;
value4 = Reflect.apply(getChannel, ChannelStore, [id]);
object2.thread = value2 != value4 ? value4 : value2;
getCount = ThreadMessageStore.getCount;
id = require.id;
value5 = Reflect.apply(getCount, ThreadMessageStore, [id]);
object2.messageCount = value2 != value5 ? value5 : 0;
getMostRecentMessage = ThreadMessageStore.getMostRecentMessage;
id = require.id;
object2.mostRecentMessage = Reflect.apply(getMostRecentMessage, ThreadMessageStore, [id]);
r0 = object2;
}
return r0;
}
function _fun112376() { // fn#112376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2583, offset: 0x023c8581, size: 209 bytes, params: 1, frame: 17
var id;
var value7;
var defaultImport;
var preload;
var fetchMessages;
var value;
if (require != null && env0_0 != null && (require.hasFlag(MessageFlags.HAS_THREAD) || importDefault) && ThreadMessageStore.getMostRecentMessage(require.id) == null) {
value7 = environment.__proto__;
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
preload = defaultImport.preload;
id = env0_0.id;
Reflect.apply(preload, defaultImport, [id, require.id]);
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
fetchMessages = value.fetchMessages;
id = require.id;
Reflect.apply(fetchMessages, value, [{'channelId': null, 'isPreload': true, 'limit': 25, channelId: id}]);
}
}
function _fun112378() { // fn#112378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2966, offset: 0x023c87eb, size: 142 bytes, params: 1, frame: 17
const handleItemInteractedBinding = handleItemInteracted;
const value2 = undefined;
handleItemInteractedBinding('press_reaction_picker', {'actionGestureType': 'press',
'actionTargetElement': 'reaction_picker_button', 'actionIntentType': 'open', 'actionDestinationType': null});
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const REACTION = EmojiIntention.REACTION;
const channelBinding = channel;
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [{'pickerIntention': null,
'autoFocus': false, 'startExpanded': false, pickerIntention: REACTION, onPressEmoji: onPressEmoji,
channel: channelBinding, guildId: channelBinding == null ? value2 : channel.guild_id}]);
return value2;
}
function _fun112380() { // fn#112380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:4188, offset: 0x023c8c48, size: 50 bytes, params: 1, frame: 12
return channel.guild_id != null && GuildVerificationStore.canChatInGuild(channel.guild_id);
}
function _fun112381() { // fn#112381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:4254, offset: 0x023c8c7a, size: 107 bytes, params: 1, frame: 15
var r0;
var value3;
var defaultImport;
if (emoji.id != null) {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r0 = {uri: defaultImport.getEmojiURL({id: emoji.id, animated: emoji.animated, size: 48})};
} else {
r0 = undefined;
}
return r0;
}
function _fun112387() { // fn#112387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:6105, offset: 0x023c917c, size: 137 bytes, params: 1, frame: 16
var value4;
var moduleValue;
var navigateToPost;
handleItemInteracted('press_comments', {'actionGestureType': 'press',
'actionTargetElement': 'thread_comments_button', 'actionIntentType': 'navigate',
'actionDestinationType': 'channel'});
if (parentMessage != null && threadData.thread != null) {
value4 = environment.__proto__;
moduleValue = require(14854) /* metro dependency 14854: ICYMIShared */;
navigateToPost = moduleValue.navigateToPost;
parentMessageBinding = parentMessage;
Reflect.apply(navigateToPost, moduleValue, [parentMessageBinding.getChannelId(), threadData.thread.guild_id,
parentMessageBinding.id]);
}
}
function _fun112390() { // fn#112390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7204, offset: 0x023c9a3c, size: 42 bytes, params: 1, frame: 12
message.reactions.forEach(_fun112391);
return [];
}
function _fun112392() { // fn#112392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7431, offset: 0x023c9b27, size: 52 bytes, params: 1, frame: 13
return channel != null && (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(channel);
}
function _fun112394() { // fn#112394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7576, offset: 0x023c9b81, size: 134 bytes, params: 1, frame: 6
const r2 = hideAdditionalButtons ? 6 : 4;
const messageCount = env0_7.messageCount;
const value4 = 0;
const r1 = messageCount > value4 ? r2 - 1 : r2;
return {hasOverflow: (env0_8.length > r1 ? env0_8.length - r1 : value4) > value4,
showReplyForwardButtons: !hideAdditionalButtons && (env0_10 || env0_9),
showThreadAsComments: env0_7.messageCount > value4};
}
function _fun112395(a0, a1) { // fn#112395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7870, offset: 0x023c9c07, size: 94 bytes, params: 3, frame: 19
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const idBinding = id;
const itemTypeBinding = itemType;
Reflect.apply(itemInteracted, value, [idBinding, itemTypeBinding, a0]);
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
value.feedItemActioned({itemId: idBinding, itemType: itemTypeBinding, actionParameters: a1});
}
function _fun112396(a0, a1) { // fn#112396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8003, offset: 0x023c9c65, size: 74 bytes, params: 3, frame: 17
env0_11('press_reaction', {'actionGestureType': 'press', 'actionTargetElement': 'add_new_reaction_button',
'actionIntentType': 'open', 'actionDestinationType': null});
onAddReaction(channel.id, message.id, a0, a1);
}
function _fun112397() { // fn#112397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8219, offset: 0x023c9caf, size: 91 bytes, params: 1, frame: 14
env0_11('press_forward', {'actionGestureType': 'press', 'actionTargetElement': 'forward_button',
'actionIntentType': 'share', 'actionDestinationType': 'channel'});
(require(9591) /* metro dependency 9591: ForwardModalUtils */).openForwardModal({message: message,
source: 'icymi-tab'});
}
function _fun112398() { // fn#112398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8449, offset: 0x023c9d0a, size: 141 bytes, params: 1, frame: 20
env0_11('press_reply', {'actionGestureType': 'press', 'actionTargetElement': 'reply_button',
'actionIntentType': 'reply', 'actionDestinationType': 'channel'});
const icymiSharedModule = require(14854) /* metro dependency 14854: ICYMIShared */;
const navigateToPost = icymiSharedModule.navigateToPost;
const channelBinding = channel;
const id = channelBinding.id;
const guild_id = channelBinding.guild_id;
const messageBinding = message;
Reflect.apply(navigateToPost, icymiSharedModule, [id, guild_id, messageBinding.id]);
const value = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
value.createPendingReply({channel: channelBinding, message: messageBinding, shouldMention: true,
showMentionToggle: true});
}
function _fun112399() { // fn#112399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8750, offset: 0x023c9d97, size: 197 bytes, params: 1, frame: 11
if (isKeyMessage) {
value = environment.__proto__;
return (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
}
const backgroundVariantBinding = backgroundVariant;
if (backgroundVariantBinding === 'primary') {
value = environment.__proto__;
return (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
}
if (backgroundVariantBinding === 'secondary') {
value = environment.__proto__;
return (importDefault(697) /* metro dependency 697: native */).colors.CARD_SECONDARY_BG;
}
if (backgroundVariantBinding === 'base') {
value = environment.__proto__;
return (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
}
}
function _fun112400({nativeEvent}) { // fn#112400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:9092, offset: 0x023c9e5c, size: 69 bytes, params: 2, frame: 12
env0_12(!(nativeEvent.contentOffset.x + nativeEvent.layoutMeasurement.width >= nativeEvent.contentSize.width));
}
function _fun112401() { // fn#112401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:9222, offset: 0x023c9ea1, size: 37 bytes, params: 1, frame: 13
env0_11('scroll_reaction_row', {'actionGestureType': 'swipe', 'actionTargetElement': 'reaction_row_container',
'actionIntentType': 'scroll', 'actionDestinationType': null});
}
function _fun112402(a0, a1) { // fn#112402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:9936, offset: 0x023c9ec6, size: 209 bytes, params: 3, frame: 23
const id = message.id;
const channelBinding = channel;
let type = a0.type;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
let BURST = ReactionTypes.BURST;
const r9 = type === BURST ? a0.burst_count : a0.count;
type = a0.type;
BURST = ReactionTypes.BURST;
return (
<View key={'reaction-' + a1}>
<EmojiReaction
messageId={id}
channel={channelBinding}
reaction={a0}
count={r9}
isBurstReaction={type === BURST}
handleItemInteracted={env0_11}
/>
</View>
);
}
function _fun112391(a0) { // fn#112391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7246, offset: 0x023c9a66, size: 193 bytes, params: 2, frame: 17
var r7;
var value;
var binding;
var push;
var object2;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
if (a0.me_vote == null) {
if (a0.burst_count > 0) {
binding = env0_0;
push = binding.push;
object2 = {};
copyDataProperties(object2, a0, r7);
value = environment.__proto__.__proto__;
object2['type'] = ReactionTypes.BURST;
Reflect.apply(push, binding, [object2]);
r7 = require;
}
if (a0.count > 0) {
binding = env0_0;
push = binding.push;
object2 = {};
copyDataProperties(object2, a0, r7);
value = environment.__proto__.__proto__;
object2['type'] = ReactionTypes.NORMAL;
Reflect.apply(push, binding, [object2]);
}
}
}
@@ -0,0 +1,32 @@
/* Metro module 14816; source: modules/icymi/native/ICYMIContext.tsx; dependencies: [31, 33, 1478, 697, 2] */
function _fun111822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15013:6, offset: 0x023b37ec, size: 185 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const createContext = (require(31) /* metro dependency 31 */).createContext;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const context = createContext({'width': 0, 'margin': 0, 'inset': 0});
const closure = useICYMIContextConstructor;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIContext.tsx');
exports.ICYMIContext = context;
exports.useICYMIContextConstructor = closure;
exports.ICYMIContextProvider = ICYMIContextProvider;
}
function useICYMIContextConstructor() { // fn#111823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15013:193, offset: 0x023b38a5, size: 106 bytes, params: 1, frame: 16
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const Math = global.Math;
const value = Math.min(width, 480);
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
return {width: value, margin: PX_16, inset: PX_16 + 38};
}
function ICYMIContextProvider({children}) { // fn#111824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15013:464, offset: 0x023b390f, size: 86 bytes, params: 2, frame: 18
const {width, margin, inset} = useICYMIContextConstructor();
const Provider = env0_3.Provider;
return (
<Provider value={{width: width, margin: margin, inset: inset}}>
{children}
</Provider>
);
}
@@ -0,0 +1,54 @@
/* Metro module 14838; source: modules/icymi/native/ICYMIFeedbackSheet.tsx; dependencies: [31, 33, 9927, 1244, 9589, 9580, 2] */
function _fun111980(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15035:6, offset: 0x023b998d, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIFeedbackSheet.tsx');
exports.default = ICYMIFeedbackSheet;
}
function ICYMIFeedbackSheet() { // fn#111981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15035:205, offset: 0x023b9a17, size: 570 bytes, params: 1, frame: 21
const FeedbackActionSheet = importDefault(9927) /* metro dependency 9927: FeedbackActionSheet */;
const object2 = {'headerLabel': null, 'showHeaderCloseButton': true, 'hideDontShowAgainCheckbox': true};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.headerLabel = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ppfH9+']]);
object2.ratingsBodyLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ePk/Cf']);
object2.reasonsHeaderLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sBOuOf);
string = intl.string;
const F6TmZA = (require(1244) /* metro dependency 1244: indexNative */).t.F6TmZA;
const items2 = [{label: Reflect.apply(string, intl, [F6TmZA]), value: 'irrelevant_content'}];
const object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.voWAzi);
object4.value = 'not_enough_content';
items2[1] = object4;
string = intl.string;
const Ay8iwx = (require(1244) /* metro dependency 1244: indexNative */).t.Ay8iwx;
items2[2] = {label: Reflect.apply(string, intl, [Ay8iwx]), value: 'too_much_content'};
const object6 = {};
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Yu+52W']);
object6.value = 'laggy';
items2[3] = object6;
items2[4] = {'label': 'Other', 'value': 'other'};
object2.reasons = items2;
object2.otherKey = 'other';
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
object2.trackOpen = ICYMIAnalytics.trackFeedFeedbackPromptViewed;
object2.feedbackReasons = ['other'];
object2.trackReport = trackReport;
return <FeedbackActionSheet {...object2} />;
}
function ICYMIFeedbackSheetTrackReport(a0) { // fn#111982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15035:913, owner: ICYMIFeedbackSheet.trackReport, offset: 0x023b9c51, size: 157 bytes, params: 2, frame: 17
const value = environment.__proto__;
const value2 = undefined;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).giveFeedback();
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
ICYMIAnalytics.trackFeedFeedbackSubmitted({reason_descriptions: a0.reason != null ? [a0.reason.value] : value2,
rating: a0.rating ?? value2, user_feedback: a0.feedback});
return value2;
}
@@ -0,0 +1,183 @@
/* Metro module 14882; source: modules/icymi/native/ICYMIForumThreadRow.tsx; dependencies: [31, 27, 1379, 1867, 33, 14815, 697, 566, 6593, 9580, 14854, 12129, 9579, 4805, 14856, 1244, 21, 5278, 4573, 6622, 14860, 14862, 2] */
function _fun112588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:6, offset: 0x023d37bd, size: 263 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = ICYMIForumThreadRow;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112595);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIForumThreadRow.tsx');
exports.default = ForumThreadRowWrapper;
exports.MAX_AVATARS_IN_PILE = 3;
exports.ICYMIForumThreadRow = closure;
}
function ICYMIForumThreadRow({channel, message, visible}) { // fn#112589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:551, offset: 0x023d38c4, size: 996 bytes, params: 2, frame: 38
var r0;
var ICYMICardInCard;
var intl;
var defaultImport2;
var extractTimestamp;
var PressableHighlight;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items3;
var defaultImport3;
var items2;
var value;
const value3 = env0_9();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112590);
const author = message.author;
const env0_3 = author;
const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
});
let binding = env0_3;
const useEffect = binding.useEffect;
let id = author.id;
Reflect.apply(useEffect, binding, [_fun112592, [id, guild?.id]]);
binding = env0_3;
let useCallback = binding.useCallback;
const value5 = Reflect.apply(useCallback, binding, [_fun112593, [channel, guild, message.id]]);
binding = env0_3;
useCallback = binding.useCallback;
object = [channel.parent_id];
object[1] = message.id;
const value6 = Reflect.apply(useCallback, binding, [_fun112594, object]);
const value7 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useGravityMessage(message);
if (channel == null) {
r0 = null;
} else if (channel.guild_id == null) {
r0 = null;
} else if (guild == null) {
r0 = null;
} else if (author == null) {
r0 = null;
} else if (channel2 == null) {
r0 = null;
} else {
ICYMICardInCard = importDefault(14856) /* metro dependency 14856: ICYMICardInCard */;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bYNuVx);
id = value7.id;
object.id = id;
object.interactionType = 'forum_thread';
object.channelId = channel.parent_id;
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
extractTimestamp = defaultImport2.extractTimestamp;
id = value7.id;
object.timestamp = Reflect.apply(extractTimestamp, defaultImport2, [id]);
object.onHeaderPress = value5;
object.onHeaderLongPress = value6;
object.message = value7;
object.shouldFeatureUser = true;
PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
var pressableHighlightProps = {onPress: value5, onLongPress: value6, accessibilityRole: 'button',
unstable_pressDelay: 130, style: value3.pressable};
var viewBindingProps = {style: value3.container};
items3 = [<Text variant="text-lg/semibold" color="mobile-text-heading-primary">{(importDefault(4805) /* metro dependency 4805: useChannelName */)(channel)}</Text>];
var textProps = {'variant': 'text-md/normal', 'color': 'text-subtle', 'style': null, 'lineClamp': 5,
style: value3.subtitle};
defaultImport3 = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
items3[1] = <Text {...textProps}>{defaultImport3.parseInlineReply(message.content, true)}</Text>;
items3[2] = ((Component) => <Component message={message} visible={visible} itemType="forum_thread" />)(importDefault(14860) /* metro dependency 14860: ICYMIMediaMosaic */);
items2 = [<PressableHighlight {...pressableHighlightProps}><View {...viewBindingProps}>{items3}</View></PressableHighlight>];
var viewBindingProps2 = {style: value3.footer};
var viewBinding2Props = {style: value3.ICYMICardInteractionRow};
value = importDefault(14862) /* metro dependency 14862: ICYMICardInteractionRow */;
id = value7.id;
items2[1] = <View {...viewBindingProps2}><View {...viewBinding2Props}>{((Component) => <Component message={value7} channel={channel} guild={guild} backgroundVariant="base" id={id} itemType="forum_thread" />)(value)}</View></View>;
value = <ICYMICardInCard {...object}>{items2}</ICYMICardInCard>;
r0 = value;
}
return r0;
}
function _fun112595(a0) { // fn#112595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:197, offset: 0x023d3ee7, size: 201 bytes, params: 2, frame: 14
const object2 = {};
object2.pressable = {flex: 1, paddingLeft: a0.inset};
object2.container = {marginHorizontal: a0.margin};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.subtitle = {marginTop: PX_8, marginBottom: a0.margin};
object2.footer = {justifyContent: 'flex-end', paddingLeft: a0.inset, marginTop: a0.margin, gap: a0.margin};
object2.threadAsComments = {marginHorizontal: a0.margin};
object2.ICYMICardInteractionRow = {marginHorizontal: a0.margin, marginBottom: a0.margin};
return object2;
}
function ForumThreadRowWrapper({message, threadChannel, visible}) { // fn#112596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:2763, offset: 0x023d3fb0, size: 56 bytes, params: 2, frame: 15
return (
<ICYMIForumThreadRow
message={message}
channel={threadChannel}
visible={visible}
/>
);
}
function _fun112590() { // fn#112590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:657, offset: 0x023d3ca8, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildStore.getGuild(channel?.getGuildId());
}
function _fun112592() { // fn#112592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:795, offset: 0x023d3cfc, size: 109 bytes, params: 1, frame: 15
var value3;
var defaultImport;
const guildBinding = guild;
const value2 = undefined;
if ((guildBinding == null ? value2 : guild.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.requestMembersById(guild == null ? value2 : guild.id, [author.id]);
}
return value2;
}
function _fun112593() { // fn#112593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:935, offset: 0x023d3d69, size: 204 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'forum_thread', 'press_forum_thread']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'forum_thread',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_container',
'actionIntentType': 'navigate', 'actionDestinationType': 'channel'}});
if (channel != null && guild != null) {
value = require(14854) /* metro dependency 14854: ICYMIShared */;
value.navigateToPost(channel.id, guild.id, message.id);
}
}
function _fun112594() { // fn#112594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:1300, offset: 0x023d3e35, size: 178 bytes, params: 1, frame: 22
var value2;
var defaultImport;
var itemInteracted;
var messageBinding;
var id;
var defaultImport2;
var feedItemActioned;
var moduleValue;
if (channel.parent_id != null) {
value2 = environment.__proto__;
defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
itemInteracted = defaultImport.itemInteracted;
messageBinding = message;
id = messageBinding.id;
Reflect.apply(itemInteracted, defaultImport, [id, 'forum_thread', 'long_press_forum_thread']);
defaultImport2 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
feedItemActioned = defaultImport2.feedItemActioned;
id = messageBinding.id;
Reflect.apply(feedItemActioned, defaultImport2, [{itemId: id, itemType: 'forum_thread',
actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_container',
'actionIntentType': 'open', 'actionDestinationType': null}}]);
moduleValue = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
moduleValue.openChannelLongPressActionSheet(channel.parent_id);
}
}
@@ -0,0 +1,168 @@
/* Metro module 14879; source: modules/icymi/native/ICYMIGuildEventRow.tsx; dependencies: [31, 27, 4117, 1379, 1867, 33, 14815, 697, 9045, 1244, 9039, 4805, 9042, 9121, 9580, 9032, 6947, 9035, 14856, 21, 4573, 9123, 6699, 1305, 566, 2] */
function _fun112559(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:6, offset: 0x023d1cef, size: 304 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.Pressable;
const env0_5 = value.View;
value = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_6 = value.isGuildEventEnded;
const env0_7 = value.isGuildScheduledEventActive;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112564);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIGuildEventRow.tsx');
exports.default = ICYMIGuildEventRowWrapper;
}
function ICYMIGuildEventRow({event, channel, guild}) { // fn#112560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:899, offset: 0x023d1e1f, size: 1503 bytes, params: 2, frame: 43
var object2;
var moduleValue5;
const value3 = env0_13();
const value5 = (importDefault(9045) /* metro dependency 9045: useEventSchedule */)(event, null);
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(event);
const r1 = value5 == null ? undefined : value5.startTime.toISOString();
const env0_3 = r1;
const binding = env0_3;
const useMemo = binding.useMemo;
const startDateTimeString = Reflect.apply(useMemo, binding, [_fun112561, [r1,
isGuildScheduledEventActive2]]).startDateTimeString;
const r23 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel) ?? (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(event);
const eventLocationIconSource = (require(9121) /* metro dependency 9121: GuildEventUtils */).getEventLocationIconSource(event,
channel, true);
const eventLocationIconComponent = (require(9121) /* metro dependency 9121: GuildEventUtils */).getEventLocationIconComponent(event,
channel, true);
const nextRecurrenceIdInEvent = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(event);
const value12 = env0_3.useCallback(_fun112562, [event]);
const value13 = env0_3.useCallback(_fun112563, [guild.id, event.id]);
let r11 = event.description != null && event.description.length > 0;
const value16 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(event?.guild_id,
event?.id, nextRecurrenceIdInEvent);
const ICYMICardInCard = importDefault(14856) /* metro dependency 14856: ICYMICardInCard */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6pFsLQ']);
object2.id = event.id;
object2.interactionType = 'guild_event';
object2.channelId = channel?.id;
object2.guildId = guild.id;
const defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
object2.timestamp = defaultImport4.extractTimestamp(event.id);
object2.onHeaderPress = value13;
object2.onHeaderLongPress = value13;
const container = value3.container;
const timeAndUserPillContainer = value3.timeAndUserPillContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<View style={timeAndUserPillContainer}><Text variant="text-sm/semibold" color={isGuildScheduledEventActive2 ? 'status-positive' : 'text-brand'}>{startDateTimeString}</Text></View>];
r11 = r11 && value3.title;
items2[1] = <Text style={r11} variant="text-lg/semibold">{event.name}</Text>;
let r8 = event.description != null && event.description.length > 0;
if (r8) {
moduleValue5 = require(9123) /* metro dependency 9123: guildEventDetailsParserNative */;
r8 = <Text variant="text-md/normal" color="text-subtle" lineClamp={5}>{moduleValue5.guildEventDetailsParser(event.description,
true, {guildId: guild.id})}</Text>;
}
items2[2] = r8;
items2[3] = <View style={value3.separator} />;
const infoContainer = value3.infoContainer;
const locationContainer = value3.locationContainer;
const GroupIcon = (require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon;
items2[4] = <View style={infoContainer}><View style={locationContainer}><GroupIcon size="xs" style={value3.eventsChannelIcon} /><Text lineClamp={1} variant="text-xs/normal" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['+DLsD8'],
{count: value16})}</Text></View><View style={value3.locationContainer}>{eventLocationIconComponent != null ? ((Component) => <Component size="xs" style={value3.eventsChannelIcon} />)(eventLocationIconComponent) : eventLocationIconSource != null && ((Icon) => <Icon source={eventLocationIconSource} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={value3.eventsChannelIcon} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)}<Text lineClamp={2} variant="text-xs/normal" color="text-muted">{r23 != null ? (require(9123) /* metro dependency 9123: guildEventDetailsParserNative */).guildEventDetailsParser(r23,
true) : null}</Text></View></View>;
return (
<ICYMICardInCard {...object2}>
<Pressable onPress={value12} style={container}>
{items2}
</Pressable>
</ICYMICardInCard>
);
}
function _fun112564(a0) { // fn#112564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:289, offset: 0x023d25af, size: 349 bytes, params: 2, frame: 15
const object2 = {};
object2.container = {marginHorizontal: a0.margin, marginBottom: a0.margin, marginLeft: a0.margin + a0.inset};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.card = {marginTop: PX_12};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.title = {marginBottom: PX_4};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.timeAndUserPillContainer = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': null,
'justifyContent': 'space-between', marginBottom: PX_8};
const object3 = {'height': 1, 'width': '100%'};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.backgroundColor = BORDER_SUBTLE;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.marginVertical = PX_12;
object2.separator = object3;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.eventsChannelIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.infoContainer = {gap: PX_4};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.locationContainer = {'alignItems': 'center', 'flexDirection': 'row', gap: PX_8};
return object2;
}
function ICYMIGuildEventRowWrapper({eventId}) { // fn#112565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:3592, offset: 0x023d270c, size: 217 bytes, params: 2, frame: 20
const guildScheduledEvent = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId);
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildScheduledEvent?.guild_id);
});
return guildScheduledEvent == null || guild == null || isGuildEventEnded(guildScheduledEvent) ? null : <ICYMIGuildEventRow event={guildScheduledEvent} channel={(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(guildScheduledEvent?.channel_id);
})} guild={guild} />;
}
function _fun112561() { // fn#112561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:1047, offset: 0x023d23fe, size: 113 bytes, params: 1, frame: 16
var r0;
var object2;
var intl;
if (env0_2) {
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.startDateTimeString = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TxqPQR);
r0 = object2;
} else {
r0 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(env0_3);
}
return r0;
}
function _fun112562() { // fn#112562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:1386, offset: 0x023d246f, size: 164 bytes, params: 1, frame: 21
const value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const eventBinding = event;
Reflect.apply(itemInteracted, defaultImport, [eventBinding.id, 'guild_event', 'press_event']);
defaultImport.feedItemActioned({itemId: eventBinding.id, itemType: 'guild_event',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_body',
'actionIntentType': 'navigate', 'actionDestinationType': 'event'}});
(require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */).openGuildEventDetails({eventId: eventBinding.id,
event: eventBinding});
}
function _fun112563() { // fn#112563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15076:1727, offset: 0x023d2513, size: 156 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const eventBinding = event;
Reflect.apply(itemInteracted, defaultImport, [eventBinding.id, 'guild_event', 'press_event']);
defaultImport.feedItemActioned({itemId: eventBinding.id, itemType: 'guild_event',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'navigate', 'actionDestinationType': 'guild'}});
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
value.transitionToGuild(guild.id);
}
@@ -0,0 +1,45 @@
/* Metro module 14881; source: modules/icymi/native/ICYMIHeader.tsx; dependencies: [31, 27, 33, 14815, 697, 4573, 1244, 2] */
function _fun112585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15078:6, offset: 0x023d35bf, size: 212 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
const env0_7 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(function(a0) {
var object = {};
object.text = {'flexDirection': 'row', 'justifyContent': 'space-between', marginHorizontal: a0.margin};
var object3 = {'height': 1, 'width': '100%'};
object3.backgroundColor = importDefault(dependencyMap[4]).colors.BORDER_SUBTLE;
object3.marginBottom = importDefault(dependencyMap[4]).space.PX_16;
object.separator = object3;
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIHeader.tsx');
exports.default = ICYMIHeader;
}
function ICYMIHeader() { // fn#112587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15078:473, offset: 0x023d3709, size: 180 bytes, params: 1, frame: 22
const value2 = env0_7();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const view = <View style={value2.separator} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = value2.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<>
{view}
<Text
style={text}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jnXV/V'])}
</Text>
</>
);
}
@@ -0,0 +1,126 @@
/* Metro module 14876; source: modules/icymi/native/ICYMILoading.tsx; dependencies: [31, 27, 33, 14815, 697, 11956, 4017, 14854, 2] */
function _fun112537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15073:6, offset: 0x023d078c, size: 238 bytes, params: 8, frame: 18
const env0_0 = require;
const placeholderRowWidth_112538 = function(a0, a1, a2) {
var Math = global.Math;
var value = Math.sin(a0);
value = 100 * value;
Math = global.Math;
value -= Math.floor(value);
return value * (a2 - a1) + a1;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
const env0_8 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112541);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMILoading.tsx');
exports.ICYMILoading = ICYMILoading;
}
function ICYMILoadingItem() { // fn#112539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15073:867, offset: 0x023d08c0, size: 667 bytes, params: 1, frame: 39
const value2 = env0_8();
const value3 = (importDefault(11956) /* metro dependency 11956: useChatPlaceholderAnimatedStyles */)({'visible': true,
'animated': true});
const {avatarTitle, title, subtitle} = env0_3.useMemo(_fun112540, []);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const container = value2.container;
const avatarRow = value2.avatarRow;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View2 style={[value2.backgroundColor, value2.avatar, value3]} />;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [value2.backgroundColor];
items3[1] = value2.avatarTitle;
items3[2] = value3;
const object = {};
const placeholderRowWidth_112538Binding = placeholderRowWidth_112538;
object.width = '' + placeholderRowWidth_112538Binding(avatarTitle, 30, 60) + '%';
items3[3] = object;
const items4 = [<View style={avatarRow}>{view}<View3 style={items3} /></View>];
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items5 = [value2.backgroundColor];
items5[1] = value2.title;
items5[2] = value3;
const object2 = {};
object2.width = '' + placeholderRowWidth_112538Binding(title, 75, 100) + '%';
items5[3] = object2;
items4[1] = <View4 style={items5} />;
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items6 = [value2.backgroundColor];
items6[1] = value2.subtitle;
items6[2] = value3;
const object3 = {};
object3.width = '' + placeholderRowWidth_112538Binding(subtitle, 75, 100) + '%';
items6[3] = object3;
items4[2] = <View5 style={items6} />;
const View6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items4[3] = <View6 style={[value2.backgroundColor, value2.image, value3]} />;
const view2 = <View style={container}>{items4}</View>;
const Separator = (require(14854) /* metro dependency 14854: ICYMIShared */).Separator;
return (
<>
{view2}
<Separator />
</>
);
}
function _fun112541(a0) { // fn#112541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15073:190, offset: 0x023d0be1, size: 352 bytes, params: 2, frame: 18
const object2 = {};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object2.backgroundColor = {backgroundColor: BACKGROUND_MOD_SUBTLE};
object2.container = {padding: a0.margin};
object2.avatarRow = {'flexDirection': 'row', 'alignItems': 'center', marginBottom: a0.margin};
const object3 = {'width': 40, 'height': 40};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.marginRight = PX_12;
object2.avatar = object3;
object2.avatarTitle = {'height': 18, 'borderRadius': 10, 'flexShrink': 1};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.height = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.marginBottom = PX_12;
object4.borderRadius = 10;
object4.flexShrink = 1;
object2.title = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.subtitle = {height: PX_16, marginBottom: a0.margin, borderRadius: 10, flexShrink: 1};
const object7 = {'width': '100%', 'height': 240};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.image = object7;
object2.separator = {};
return object2;
}
function ICYMILoading() { // fn#112542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15073:1738, offset: 0x023d0d41, size: 67 bytes, params: 1, frame: 17
return (
<>
<ICYMILoadingItem />
<ICYMILoadingItem />
</>
);
}
function _fun112540() { // fn#112540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15073:954, offset: 0x023d0b5b, size: 134 bytes, params: 1, frame: 15
const object2 = {};
let Math = global.Math;
let floor = Math.floor;
const Math2 = global.Math;
object2.avatarTitle = Reflect.apply(floor, Math, [10 * Math2.random()]);
Math = global.Math;
floor = Math.floor;
const Math3 = global.Math;
object2.title = Reflect.apply(floor, Math, [10 * Math3.random()]);
Math = global.Math;
floor = Math.floor;
const Math4 = global.Math;
object2.subtitle = Reflect.apply(floor, Math, [10 * Math4.random()]);
return object2;
}
@@ -0,0 +1,302 @@
/* Metro module 14858; source: modules/icymi/native/ICYMIMessageRow.tsx; dependencies: [31, 27, 1379, 1945, 1867, 3793, 4864, 1878, 14853, 661, 33, 697, 14815, 477, 14816, 9546, 7230, 566, 14859, 14860, 4573, 1244, 1305, 4617, 6593, 9579, 9580, 12129, 11401, 14854, 14856, 21, 5278, 9122, 14862, 2] */
function _fun112296(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:6, offset: 0x023c4268, size: 455 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = MessageRowContent;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_11 = (require(14853) /* metro dependency 14853: DesignConstants */).ITEM_PADDING;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.DEFAULT_ROLE_COLOR_HEX;
const env0_13 = constantsModule.MessageEmbedTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.jsxs;
const env0_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const env0_17 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_18 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112304);
const env0_19 = value.memo(_fun112305);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIMessageRow.tsx');
exports.default = MessageRowWrapper;
exports.MessageRowContent = closure;
}
function MessageRowContent({message, channel, lineClamp, nested, visible}) { // fn#112297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:997, offset: 0x023c442f, size: 728 bytes, params: 2, frame: 31
var r11;
var r6;
var MessageRowPreview;
var object;
lineClamp = lineClamp === undefined ? 3 : lineClamp;
nested = !(nested === undefined) && nested;
visible = !(visible === undefined) && visible;
const value6 = env0_18();
const binding = env0_3;
const useContext = binding.useContext;
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
const value7 = Reflect.apply(useContext, binding, [ICYMIContext]);
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const extractMediaSourcesFromMessage = mediaSourceUtilModule.extractMediaSourcesFromMessage;
const guild_id = channel.guild_id;
const GRAVITY_VALID_EMBED_TYPES = (require(7230) /* metro dependency 7230: ICYMITypes */).GRAVITY_VALID_EMBED_TYPES;
const value8 = Reflect.apply(extractMediaSourcesFromMessage, mediaSourceUtilModule, [message, message, guild_id,
GRAVITY_VALID_EMBED_TYPES]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112298);
const value10 = env0_3.useMemo(_fun112299, [message.attachments.length, message.content, message.embeds]);
const value11 = message.attachments.every(function({content_type}) {
return content_type?.startsWith('audio/');
});
const items3 = [value6.messagePreview];
items3[1] = nested ? null : {paddingLeft: value7.margin};
if (value10) {
r6 = !value10;
} else {
MessageRowPreview = (require(14859) /* metro dependency 14859: ICYMIMessageRowPreview */).MessageRowPreview;
object = {message: message, muted: value9, lineClamp: lineClamp};
r11 = value8.length !== 0 ? undefined : message.attachments.length > 0 ? message.embeds.length !== 0 ? undefined : {renderAttachments: true} : undefined;
object.messageOptions = r11;
r11 = value11 ? 'auto' : 'none';
object.pointerEvents = r11;
r6 = <MessageRowPreview {...object} />;
}
const items2 = [r6];
items2[1] = value8.length > 0 && <View style={value6.media}>{((Component) => <Component message={message} visible={visible} itemType="message" />)(importDefault(14860) /* metro dependency 14860: ICYMIMediaMosaic */)}</View>;
items2[2] = value8.length === 0 && message.embeds.length > 0 && <View style={value6.media}>{((NonMediaEmbedsRowPreview) => <NonMediaEmbedsRowPreview message={message} muted={value9} lineClamp={3} />)((require(14859) /* metro dependency 14859: ICYMIMessageRowPreview */).NonMediaEmbedsRowPreview)}</View>;
return (
<View style={items3}>
{items2}
</View>
);
}
function ReplyMessageContent({message, channel, guild}) { // fn#112301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:2076, offset: 0x023c47da, size: 847 bytes, params: 2, frame: 42
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var intl;
var items4;
var Avatar;
var id;
var items2;
var object;
var inset;
var moduleValue3;
var getName;
var items3;
var Provider;
const value3 = env0_18();
let binding = env0_3;
let useContext = binding.useContext;
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
const value4 = Reflect.apply(useContext, binding, [ICYMIContext]);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(message.author.id);
});
const r28 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guild.id, message.author.id);
})?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
binding = env0_3;
useContext = binding.useContext;
const width = Reflect.apply(useContext, binding, [ICYMIContext]).width;
if (user == null) {
r0 = null;
} else {
var viewBindingProps = {style: value3.replyPreview};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4 = [<Text variant="text-sm/semibold" color="text-muted" style={{fontStyle: 'italic'}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mPPcez)}</Text>];
var viewBinding2Props = {style: value3.replyInner};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
id = guild.id;
items2 = [<Avatar animate={false} guildId={id} user={user} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} />];
object = {};
inset = value4.inset;
object.style = {gap: 4, width: width - inset - 2 * ITEM_PADDING - 2 * PX_12 - 30 - PX_8 - 2};
var textProps2 = {'variant': 'text-md/semibold', 'style': null, 'lineClamp': 1, style: {color: r28}};
moduleValue3 = require(4617) /* metro dependency 4617: NicknameUtils */;
getName = moduleValue3.getName;
id = guild.id;
items3 = [<Text {...textProps2}>{Reflect.apply(getName, moduleValue3, [id, channel.id, user])}</Text>];
Provider = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext.Provider;
inset = value4.inset;
items3[1] = <Provider value={{width: width - 2 * PX_12 - 30 - PX_8 - 2, margin: value4.margin,
inset: inset}}><MessageRowContent message={message} channel={channel} guild={guild} nested /></Provider>;
items2[1] = <View {...object}>{items3}</View>;
items4[1] = <View {...viewBinding2Props}>{items2}</View>;
r0 = <View {...viewBindingProps}>{items4}</View>;
}
return r0;
}
function _fun112304(a0) { // fn#112304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:366, offset: 0x023c4b7f, size: 439 bytes, params: 2, frame: 19
const object5 = {};
const object6 = {flex: 1};
object6.paddingLeft = a0.inset;
const PX_82 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_82;
object5.pressable = object6;
const object7 = {};
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const value2 = 0;
object7.marginTop = isAndroid2 ? -2 : value2;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object7.gap = value2;
object5.messagePreview = object7;
const object9 = {};
const PX_83 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.gap = PX_83;
object9.marginHorizontal = a0.margin;
object9.padding = PX_12;
object9.overflow = 'hidden';
object9.borderWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object9.borderColor = BORDER_SUBTLE;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9.maxHeight = 132;
object5.replyPreview = object9;
object5.replyInner = {'flexDirection': 'row', 'gap': null, 'overflow': 'hidden', gap: PX_8};
object5.afterMessage = {paddingLeft: a0.inset, paddingBottom: a0.margin};
object5.media = {marginRight: a0.margin};
const object10 = {};
const PX_84 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginTop = PX_84;
object10.marginBottom = a0.margin;
const PX_85 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.gap = PX_85;
object10.paddingHorizontal = a0.margin;
object10.marginLeft = a0.inset;
object5.footer = object10;
return object5;
}
function _fun112305({message, channel, guild, visible, messageContext}) { // fn#112305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:3084, offset: 0x023c4d36, size: 941 bytes, params: 2, frame: 33
var object2;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112306);
env0_3.useEffect(_fun112307, [guild?.id, message.author.id]);
const value5 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useICYMIMessage(channel.id,
messageContext?.reply_message_id);
const value6 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useICYMIMessage(channel.id,
messageContext?.before_message_id);
const value7 = env0_18();
const value8 = env0_3.useCallback(_fun112308, [channel.id, message]);
const value9 = env0_3.useCallback(_fun112309, [channel, message]);
const value10 = env0_3.useCallback(_fun112310, [channel.id, guild.id, message.id]);
const ICYMICardInCard = importDefault(14856) /* metro dependency 14856: ICYMICardInCard */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hMFMY9);
object2.id = message.id;
object2.interactionType = 'message';
object2.channelId = channel.id;
const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
object2.timestamp = defaultImport2.extractTimestamp(message.id);
object2.onHeaderPress = value10;
object2.onHeaderLongPress = value8;
object2.message = message;
object2.shouldFeatureUser = true;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {onPress: value10, onLongPress: value9, unstable_pressDelay: 130,
accessibilityRole: 'button',
accessibilityLabel: (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel}),
accessibilityHint: (require(9122) /* metro dependency 9122: getChannelA11yLabel */).getChannelA11yHint({channel: channel,
muted: value3}), style: value7.pressable};
const items2 = [value6 != null ? <MessageRowContent message={value6} channel={channel} guild={guild} visible={visible} /> : null];
items2[1] = <MessageRowContent message={message} channel={channel} guild={guild} visible={visible} />;
items2[2] = value5 != null ? <ReplyMessageContent message={value5} channel={channel} guild={guild} /> : null;
return (
<ICYMICardInCard {...object2}>
<PressableHighlight {...pressableHighlightProps}>
{items2}
</PressableHighlight>
<View style={value7.footer}>
{((Component) => <Component message={message} channel={channel} guild={guild} backgroundVariant="base" id={message.id} itemType="message" />)(importDefault(14862) /* metro dependency 14862: ICYMICardInteractionRow */)}
</View>
</ICYMICardInCard>
);
}
function MessageRowWrapper({message, messageContext, visible}) { // fn#112311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:5479, offset: 0x023c534f, size: 251 bytes, params: 2, frame: 23
const value2 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useGravityMessage(message);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun112312);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel?.guild_id);
});
return channel == null || guild == null || (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore],
_fun112314) ? null : ((Component) => <Component message={value2} channel={channel} guild={guild} messageContext={messageContext} visible={visible} />)(env0_19);
}
function _fun112298() { // fn#112298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:1262, offset: 0x023c4707, size: 43 bytes, params: 1, frame: 13
const value = environment.__proto__;
const isChannelMuted = UserGuildSettingsStore.isChannelMuted;
const channelBinding = channel;
return Reflect.apply(isChannelMuted, UserGuildSettingsStore, [channelBinding.getGuildId(), channelBinding.id]);
}
function _fun112299() { // fn#112299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:1319, offset: 0x023c4732, size: 129 bytes, params: 1, frame: 5
return !(message.embeds.length !== 1 || message.attachments.length > 0) && (message.embeds[0].type === MessageEmbedTypes.GIFV && message.embeds[0].url === message.content);
}
function _fun112307() { // fn#112307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:3247, offset: 0x023c50e3, size: 107 bytes, params: 1, frame: 15
var value3;
var defaultImport;
const guildBinding = guild;
const value2 = undefined;
if ((guildBinding == null ? value2 : guild.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.requestMembersById(guild == null ? value2 : guild.id, message.author.id);
}
return value2;
}
function _fun112308() { // fn#112308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:3541, offset: 0x023c514e, size: 154 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'message', 'long_press_channel']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'message',
actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': null}});
value = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
value.openChannelLongPressActionSheet(channel.id);
}
function _fun112309() { // fn#112309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:3878, offset: 0x023c51e8, size: 189 bytes, params: 1, frame: 22
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'message', 'long_press_message']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'message',
actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_body',
'actionIntentType': 'open', 'actionDestinationType': null}});
const showLongPressMessageActionSheetModule = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */;
const showLongPressMessageActionSheet = showLongPressMessageActionSheetModule.showLongPressMessageActionSheet;
const getUser = UserStore.getUser;
Reflect.apply(showLongPressMessageActionSheet, showLongPressMessageActionSheetModule, [{channel: channel,
message: messageBinding, user: Reflect.apply(getUser, UserStore, [messageBinding.author.id])}]);
}
function _fun112310() { // fn#112310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:4255, offset: 0x023c52a5, size: 170 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'message', 'press_message']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'message',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_container',
'actionIntentType': 'navigate', 'actionDestinationType': 'channel'}});
value = require(14854) /* metro dependency 14854: ICYMIShared */;
value.navigateToPost(channel.id, guild.id, messageBinding.id);
}
function _fun112314() { // fn#112314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15055:5768, offset: 0x023c5479, size: 38 bytes, params: 1, frame: 11
return RelationshipStore.isBlockedOrIgnored(env0_0.author.id);
}
@@ -0,0 +1,224 @@
/* Metro module 14859; source: modules/icymi/native/ICYMIMessageRowPreview.tsx; dependencies: [31, 661, 33, 9587, 3834, 8179, 4845, 4048, 4501, 697, 3829, 8177, 9773, 8368, 1244, 2] */
function _fun112315(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:6, offset: 0x023c549f, size: 244 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const value2 = value.memo(_fun112320);
const value3 = value.memo(_fun112325);
value = value.memo(_fun112330);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIMessageRowPreview.tsx');
exports.MediaOnlyRowPreview = value2;
exports.NonMediaEmbedsRowPreview = value3;
exports.MessageRowPreview = value;
}
function isMediaEmbed(a0) { // fn#112316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:148, offset: 0x023c5593, size: 39 bytes, params: 2, frame: 4
const IMAGE = MessageEmbedTypes.IMAGE;
return a0 === IMAGE || a0 === MessageEmbedTypes.GIFV;
}
function ICYMIMessageRowPreview({message, lineClamp, messageSizeCacheRef, messageOptions, maxHeight, pointerEvents}) { // fn#112317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:2246, offset: 0x023c55ba, size: 368 bytes, params: 2, frame: 25
pointerEvents = pointerEvents === undefined ? 'none' : pointerEvents;
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const env0_2 = Reflect.apply(createNativeStyleProperties, createStylesModule,
[{seeMoreLabelColor: TEXT_DEFAULT}])(value2);
const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds;
const setting = RenderEmbeds.getSetting();
const env0_3 = setting;
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
const setting2 = InlineEmbedMedia.getSetting();
const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia;
return ((Component) => <Component pointerEvents={pointerEvents} horizontalOffset={0} modifyRow={modifyRow} message={message} rowGenerator={env0_3.useMemo(_fun112318,
[setting, setting2, InlineAttachmentMedia.getSetting(),
messageOptions])} messageSizeCacheRef={messageSizeCacheRef} maxHeight={maxHeight} />)(importDefault(9773) /* metro dependency 9773: ChatItem */);
}
function _fun112320(a0) { // fn#112320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:218, offset: 0x023c5840, size: 323 bytes, params: 2, frame: 19
const message = a0.message;
const messageOptions = a0.messageOptions;
const value = Object.create(null);
value.message = 0;
value.messageOptions = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
let binding = env0_3;
let useMemo = binding.useMemo;
const value4 = Reflect.apply(useMemo, binding, [_fun112321, [message]]);
binding = env0_3;
useMemo = binding.useMemo;
const icymiMessageRowPreviewBindingProps = {...Reflect.apply(useMemo, binding, [_fun112324, [value4, value2.muted,
value2.lineClamp]])};
const object = {};
const DEFAULT_OPTIONS = (require(8179) /* metro dependency 8179: RenderMessageOptionsContext */).DEFAULT_OPTIONS;
copyDataProperties(object, DEFAULT_OPTIONS, value);
object['ignoreMentioned'] = true;
object['renderReplies'] = false;
object['renderThreadEmbeds'] = false;
object['renderReactions'] = false;
object['renderEmbeds'] = true;
object['gifAutoPlay'] = true;
object['animateEmoji'] = true;
object['renderPolls'] = true;
object['inlineEmbedMedia'] = true;
object['renderForumPostActions'] = false;
object['renderAttachments'] = true;
copyDataProperties(object, messageOptions, value);
icymiMessageRowPreviewBindingProps['messageOptions'] = object;
return <ICYMIMessageRowPreview {...icymiMessageRowPreviewBindingProps} />;
}
function _fun112325(a0) { // fn#112325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:975, offset: 0x023c5a9e, size: 278 bytes, params: 2, frame: 19
const message = a0.message;
const messageOptions = a0.messageOptions;
const value = Object.create(null);
value.message = 0;
value.messageOptions = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
let binding = env0_3;
let useMemo = binding.useMemo;
const value4 = Reflect.apply(useMemo, binding, [_fun112326, [message]]);
binding = env0_3;
useMemo = binding.useMemo;
const icymiMessageRowPreviewBindingProps = {...Reflect.apply(useMemo, binding, [_fun112329, [value4, value2.muted,
value2.lineClamp]])};
const object = {};
const DEFAULT_OPTIONS = (require(8179) /* metro dependency 8179: RenderMessageOptionsContext */).DEFAULT_OPTIONS;
copyDataProperties(object, DEFAULT_OPTIONS, value);
object['ignoreMentioned'] = true;
object['renderReplies'] = false;
object['renderThreadEmbeds'] = false;
object['renderReactions'] = false;
object['renderEmbeds'] = true;
object['renderAttachments'] = true;
copyDataProperties(object, messageOptions, value);
icymiMessageRowPreviewBindingProps['messageOptions'] = object;
return <ICYMIMessageRowPreview {...icymiMessageRowPreviewBindingProps} />;
}
function _fun112330(a0) { // fn#112330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:1664, offset: 0x023c5c8d, size: 335 bytes, params: 2, frame: 20
const message = a0.message;
const messageOptions = a0.messageOptions;
const value = Object.create(null);
value.message = 0;
value.messageOptions = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = env0_3.useMemo(_fun112331, [message, value2.lineClamp, value2.muted, value2.pointerEvents]);
const value5 = (importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message);
const icymiMessageRowPreviewBindingProps = {...value4};
const object = {};
const DEFAULT_OPTIONS = (require(8179) /* metro dependency 8179: RenderMessageOptionsContext */).DEFAULT_OPTIONS;
copyDataProperties(object, DEFAULT_OPTIONS, value);
object['ignoreMentioned'] = true;
object['renderReplies'] = false;
object['renderThreadEmbeds'] = false;
object['renderReactions'] = false;
object['gifAutoPlay'] = true;
object['animateEmoji'] = true;
object['renderPolls'] = true;
object['renderForumPostActions'] = false;
object['renderAttachments'] = value5;
object['renderEmbeds'] = value5;
object['inlineEmbedMedia'] = value5;
copyDataProperties(object, messageOptions, value);
icymiMessageRowPreviewBindingProps['messageOptions'] = object;
icymiMessageRowPreviewBindingProps['seeMoreLabel'] = '...';
return <ICYMIMessageRowPreview {...icymiMessageRowPreviewBindingProps} />;
}
function _fun112318() { // fn#112318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:2620, offset: 0x023c572a, size: 116 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
value = new value();
const setOptions = value.setOptions;
const object2 = {'renderEmbeds': null, 'inlineEmbedMedia': null, 'inlineAttachmentMedia': null,
'renderReactions': false, 'animateEmoji': false, 'gifAutoPlay': false, 'renderReplies': false,
'renderCodedLinks': false, 'renderGiftCode': false, 'renderActivityInviteEmbed': false,
'renderThreadEmbeds': false, 'renderForumPostActions': false, 'ignoreMentioned': true,
'enableSwipeActions': false, 'renderExecutedCommands': false, 'useAlternateEmbedColors': true};
object2.renderEmbeds = env0_3;
object2.inlineEmbedMedia = env0_4;
const binding = env0_5;
object2.inlineAttachmentMedia = binding;
copyDataProperties(object2, messageOptions, binding);
Reflect.apply(setOptions, value, [object2]);
return value;
}
function ICYMIMessageRowPreviewModifyRow(a0) { // fn#112319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:3086, owner: ICYMIMessageRowPreview.modifyRow, offset: 0x023c579e, size: 162 bytes, params: 2, frame: 17
var object2;
var intl;
const MessageContextType = (require(8368) /* metro dependency 8368: RowGeneratorTypes */).MessageContextType;
const SEARCH = MessageContextType.SEARCH;
a0.contextType = SEARCH;
if (lineClamp != null) {
object2 = {};
object2.numberOfLines = lineClamp;
object2.expandable = false;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.seeMoreLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qCozu3);
object2.seeMoreLabelColor = env0_2.seeMoreLabelColor;
a0.truncation = object2;
}
}
function _fun112321() { // fn#112321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:279, offset: 0x023c5983, size: 119 bytes, params: 1, frame: 15
var value;
value = value.set('embeds', message.set('content', null).embeds.filter(function(a0) {
return isMediaEmbed(a0.type);
}));
value = value.set('attachments', value.attachments.filter(_fun112323));
return value.set('editedTimestamp', null);
}
function _fun112324() { // fn#112324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:519, offset: 0x023c5a3b, size: 99 bytes, params: 1, frame: 13
const object2 = {};
object2.message = env0_2;
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
object2.layout = COZY;
const muted = env0_1.muted;
object2.muted = muted != null && muted;
object2.lineClamp = env0_1.lineClamp;
return object2;
}
function _fun112326() { // fn#112326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:1036, offset: 0x023c5bb4, size: 146 bytes, params: 1, frame: 17
const messageBinding = message;
let value = messageBinding.set('content', null);
value = value.set('embeds', value.embeds.filter(function(a0) {
return !isMediaEmbed(a0.type);
}).slice(0, 1));
value = value.set('attachments', value.attachments.filter(_fun112328).slice(0, 1));
return value.set('editedTimestamp', null);
}
function _fun112331() { // fn#112331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:1725, offset: 0x023c5ddc, size: 110 bytes, params: 1, frame: 14
const object2 = {};
object2.message = message;
const binding = env0_1;
object2.lineClamp = binding.lineClamp;
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COZY = ChannelListLayoutTypes.COZY;
object2.layout = COZY;
const muted = binding.muted;
object2.muted = muted != null && muted;
object2.pointerEvents = env0_1.pointerEvents;
return object2;
}
function _fun112323(a0) { // fn#112323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:401, offset: 0x023c5a12, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).isMediaAttachment(a0);
}
function _fun112328(a0) { // fn#112328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15056:1170, offset: 0x023c5c61, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
return !value.isMediaAttachment(a0);
}
@@ -0,0 +1,292 @@
/* Metro module 14880; source: modules/icymi/native/ICYMIServerRecommendationRow.tsx; dependencies: [57, 5, 31, 27, 4502, 1867, 9569, 661, 33, 14815, 697, 566, 1423, 1418, 7599, 5475, 6819, 9580, 3857, 1244, 6593, 4573, 4578, 14854, 8671, 2] */
function _fun112569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:6, offset: 0x023d285d, size: 381 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.AnalyticsObjects;
const env0_11 = value.AnalyticsPages;
const env0_12 = value.AnalyticsSections;
const env0_13 = value.GuildFeatures;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
const env0_16 = value.Fragment;
const env0_17 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112582);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIServerRecommendationRow.tsx');
exports.ICYMIServerRecommendationRow = ICYMIServerRecommendationRow;
}
function CutoutGuildBanner_112570({guild}) { // fn#112570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:1082, offset: 0x023d29da, size: 526 bytes, params: 2, frame: 27
var object2;
const value3 = env0_17();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value4 = !useReducedMotion;
const r15 = guild.banner != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getAnimatableSourceWithFallback(useReducedMotion ? value4 : guild.features.has(GuildFeatures.ANIMATED_BANNER),
_fun112572) : undefined;
const value7 = env0_5.useMemo(_fun112573, [guild]);
object2 = {style: value3.bannerImage};
const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
const clipView = <ClipView cutouts={[{'shape': null, 'x': 8, 'y': 46, 'width': 56, 'height': 56, 'cornerRadius': 20,
shape: RoundedRect}]}>{guild.banner != null ? ((Component) => <Component style={value3.bannerImage} source={r15} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */) : <View style={[value3.bannerImage,
value3.emptyBanner]} />}</ClipView>;
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const guildIcon = value3.guildIcon;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
return (
<View {...object2}>
{clipView}
<GuildIcon
style={guildIcon}
guild={value7}
size={LARGE}
animate={value4}
/>
</View>
);
}
function FeaturedServer_112574({guild}) { // fn#112574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:1794, offset: 0x023d2c5c, size: 552 bytes, params: 2, frame: 30
const value2 = env0_17();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112575);
const value5 = env0_5.useCallback(env0_4(_fun112577), [guild.id]);
const [property, env0_1] = env0_3(env0_5.useState(false), 2);
const featuredServerContainer = value2.featuredServerContainer;
const items2 = [<CutoutGuildBanner_112570 guild={guild} />];
const featuredServerInnerContainer = value2.featuredServerInnerContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={featuredServerInnerContainer}><Text maxFontSizeMultiplier={1} lineClamp={1} style={value2.featuredServerTitle} variant="text-md/semibold" color="mobile-text-heading-primary">{guild.name}</Text><Text maxFontSizeMultiplier={1} lineClamp={3} variant="text-xs/normal" color="text-default">{guild.description}</Text></View>;
const buttonContainer = value2.buttonContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
items2[2] = <View style={buttonContainer}><Button disabled={value3} loading={property} text={value3 ? Reflect.apply(string,
intl, [t.cEnaWx]) : Reflect.apply(string, intl, [t.VJlc0S])} size="sm" onPress={value5} grow /></View>;
return (
<View style={featuredServerContainer}>
{items2}
</View>
);
}
function RecommendedGuildsRow({discoverableGuilds}) { // fn#112580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:3466, offset: 0x023d314d, size: 215 bytes, params: 2, frame: 19
var r0;
var space;
var PX_16;
var value;
const binding = env0_5;
const useCallback = binding.useCallback;
const object = [discoverableGuilds];
if (discoverableGuilds.length === 0) {
r0 = null;
} else {
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
var valueProps = {sections: [discoverableGuilds.length]};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
valueProps.insetStart = PX_16;
valueProps.renderItem = Reflect.apply(useCallback, binding, [_fun112581, valueProps]);
valueProps.estimatedListSize = 'windowSize';
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
valueProps.itemSize = 200 + PX_16;
valueProps.horizontal = true;
valueProps.listId = 'recommended-servers-list';
valueProps.showsHorizontalScrollIndicator = false;
value = ((Component) => <Component {...valueProps} />)(value);
r0 = value;
}
return r0;
}
function _fun112582(a0) { // fn#112582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:330, offset: 0x023d3256, size: 431 bytes, params: 2, frame: 16
const object2 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginVertical: PX_24};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.title = {marginBottom: PX_8, marginHorizontal: a0.margin};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.subtitle = {marginBottom: PX_16, marginHorizontal: a0.margin};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.featuredServerInnerContainer = {marginHorizontal: PX_12, marginTop: 36};
const object3 = {position: 'absolute'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.bottom = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.left = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.right = PX_12;
object2.buttonContainer = object3;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.featuredServerTitle = {marginBottom: PX_8};
object2.guildIcon = {'position': 'absolute', 'top': 50, 'left': 12};
object2.bannerImage = {'height': 72, 'width': 200};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object2.emptyBanner = {backgroundColor: BACKGROUND_MOD_SUBTLE};
const object4 = {'borderRadius': null, 'backgroundColor': null, 'height': 244, 'width': 200, 'overflow': 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object4.backgroundColor = CARD_BACKGROUND_DEFAULT;
object2.featuredServerContainer = object4;
return object2;
}
function ICYMIServerRecommendationRow() { // fn#112583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:3985, offset: 0x023d3405, size: 421 bytes, params: 1, frame: 29
var r0;
var jsxRuntimeEnv0_16Binding;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ICYMIStore], function() {
return ICYMIStore.getDiscoverableGuilds();
});
const value3 = env0_17();
if (value2.length === 0) {
r0 = null;
} else {
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
var viewBindingProps = {style: value3.container};
string = intl.string;
items2 = [<Text style={value3.title} variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.lv1tce])}</Text>];
string = intl.string;
items2[1] = <Text style={value3.subtitle} variant="heading-sm/normal" color="text-muted">{Reflect.apply(string,
intl, [t.x4OezN])}</Text>;
items2[2] = <RecommendedGuildsRow discoverableGuilds={value2} />;
r0 = <><View {...viewBindingProps}>{items2}</View>{((Separator) => <Separator />)((require(14854) /* metro dependency 14854: ICYMIShared */).Separator)}</>;
}
return r0;
}
function _fun112572(a0) { // fn#112572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:1291, offset: 0x023d2be8, size: 71 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getGuildBannerSource = value.getGuildBannerSource;
const guildBinding = guild;
return Reflect.apply(getGuildBannerSource, value, [{id: guildBinding.id, banner: guildBinding.banner}, a0]);
}
function _fun112573() { // fn#112573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:1375, offset: 0x023d2c2f, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(1418) /* metro dependency 1418: GuildRecordUtils */;
return value.fromClientDiscoverableGuild(guild);
}
function _fun112575() { // fn#112575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:1874, offset: 0x023d2e84, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const getGuild = GuildStore.getGuild;
return Reflect.apply(getGuild, GuildStore, [guild.id]) != null;
}
function* _fun112577() { // fn#112577, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:1922, offset: 0x023d2eb5, size: 525 bytes, params: 1, frame: 24
var environment;
var binding4;
var dehydrated;
var value11;
var transitionToGuildSync;
var object2;
if (true) {
value = environment.__proto__;
importDefault(true);
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[17]).itemInteracted('recommended_guilds', 'recommended_guilds', 'press_join_guild');
var value5 = binding(binding2[17]);
var feedItemActioned = value5.feedItemActioned;
var object3 = {};
var id = require.id;
object3.itemId = id;
object3.itemType = 'recommended_guilds';
object3.actionParameters = {'actionGestureType': 'press', 'actionTargetElement': 'item_container',
'actionIntentType': 'join', 'actionDestinationType': 'guild'};
Reflect.apply(feedItemActioned, value5, [object3]);
var value6 = binding(binding2[17]);
yield value6.gravityJoinGuild([require.id], 'recommended_guilds');
var value7 = undefined;
if (false) {
return value7;
}
if (value7) {
object3 = {};
object3.state = {analyticsSource: {page: env2_11.ICYMI, section: env2_12.ICYMI_RECOMMENDED_SERVERS,
object: env2_10.LIST_ITEM}};
binding = env2_1;
binding4 = env2_2;
binding(binding4[17]).addedRecommendedGuild();
dehydrated = binding(binding4[17]).fetchDehydrated({'isReloading': true, 'forceRefresh': true});
dehydrated.then(env2_4(_fun112579));
value11 = binding(binding4[20]);
transitionToGuildSync = value11.transitionToGuildSync;
id = require.id;
object2 = {};
copyDataProperties(object2, object3, undefined);
yield Reflect.apply(transitionToGuildSync, value11, [id, object2]);
if (false) {
return undefined;
}
importDefault(false);
} else {
importDefault(false);
binding = env2_1;
var binding3 = env2_2;
value = binding(binding3[18]);
var open = value.open;
binding = env2_0;
var intl = binding(binding3[19]).intl;
var string = intl.string;
var CG4Hks = binding(binding3[19]).t.CG4Hks;
Reflect.apply(open, value, [{key: 'RecommeendedServersRow', content: Reflect.apply(string, intl,
[CG4Hks])}]);
}
}
}
function _fun112581(a0, a1) { // fn#112581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:3541, offset: 0x023d3224, size: 50 bytes, params: 3, frame: 14
var r0;
const property = discoverableGuilds[a1];
let value = null;
if (value == property) {
r0 = value;
} else {
value = environment.__proto__;
value = <FeaturedServer_112574 guild={property} />;
r0 = value;
}
return r0;
}
function* _fun112579() { // fn#112579, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15077:2614, offset: 0x023d30cd, size: 128 bytes, params: 1, frame: 15
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var value3 = env4_1(env4_2[17]);
yield value3.reloadICYMITab();
if (false) {
return undefined;
}
var value6 = env4_1(env4_2[17]);
var getGuildChannelScores = value6.getGuildChannelScores;
yield Reflect.apply(getGuildChannelScores, value6, []);
if (false) {
return undefined;
}
env4_1(env4_2[17]).getRecommendedGuilds();
}
}
@@ -0,0 +1,168 @@
/* Metro module 14817; source: modules/icymi/native/ICYMISettingsActionSheet.tsx; dependencies: [5, 31, 27, 4605, 9577, 9569, 661, 33, 4501, 697, 566, 9581, 6805, 6231, 1244, 6808, 9580, 6238, 7230, 677, 21, 5097, 4080, 9579, 5080, 14818, 1962, 14827, 2] */
function _fun111825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:6, offset: 0x023b3965, size: 345 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const icymiFiltersStore = importDefault(9577) /* metro dependency 9577: ICYMIFiltersStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticsObjectTypes;
const env0_9 = value.AnalyticsObjects;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_13 = Reflect.apply(createStyles, value, [{padding: {bottomPadding: PX_16, width: '100%'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMISettingsActionSheet.tsx');
exports.default = ICYMISettingsActionSheet;
}
function ICYMISettingsActionSheet() { // fn#111826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:434, offset: 0x023b3abe, size: 676 bytes, params: 1, frame: 32
var r7;
var jsxRuntimeEnv0_11Binding;
var TableSwitchRow;
var filterStaffContent;
var items2;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ICYMIFiltersStore],
function() {
return ICYMIFiltersStore.getState();
});
const styles = useStyles();
const ICYMIStaffDebuggingUtilityExperiment = (require(9581) /* metro dependency 9581: ICYMIExperiment */).ICYMIStaffDebuggingUtilityExperiment;
const useConfig = ICYMIStaffDebuggingUtilityExperiment.useConfig;
const enabled = Reflect.apply(useConfig, ICYMIStaffDebuggingUtilityExperiment,
[{location: 'settings action sheet'}]).enabled;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.title = Reflect.apply(string, intl, [t['7Si8Ul']]);
object.hasIcons = false;
const value3 = null;
if (enabled) {
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
string = intl.string;
filterStaffContent = value2.filterStaffContent;
items2 = [<TableSwitchRow label={Reflect.apply(string, intl,
[t['3wDyfQ']])} value={value3 != filterStaffContent && filterStaffContent} onValueChange={onValueChange_111828} />];
items2[1] = <TableRow label="Clear read states" onPress={onPress_111829} />;
items2[2] = <TableRow label="Regenerate feed and clear read states" onPress={env0_3(_fun111832)} />;
r7 = <>{items2}</>;
} else {
r7 = value3;
}
string = intl.string;
const Eorjmy = (require(1244) /* metro dependency 1244: indexNative */).t.Eorjmy;
return (
<ActionSheet showGradient startExpanded>
<TableRowGroup {...object}>
{r7}
<TableRow label={Reflect.apply(string, intl, [Eorjmy])} onPress={onPress_111833} />
</TableRowGroup>
<View style={styles.padding} />
</ActionSheet>
);
}
function ICYMISettingsActionSheetOnValueChange() { // fn#111828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:962, owner: ICYMISettingsActionSheet.onValueChange, offset: 0x023b3d62, size: 94 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const setFilters = value.setFilters;
const object2 = {};
const binding = env0_0;
copyDataProperties(object2, binding, undefined);
object2['filterStaffContent'] = !binding.filterStaffContent;
Reflect.apply(setFilters, value, [object2]);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).fetchDehydrated();
}
function ICYMISettingsActionSheetOnPress() { // fn#111829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:1121, owner: ICYMISettingsActionSheet.onPress, offset: 0x023b3dc0, size: 92 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
ICYMIStore.getDehydratedItems().forEach(_fun111830);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).clearReadStates();
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function* _fun111832() { // fn#111832, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:1648, offset: 0x023b3f5a, size: 102 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_0(env2_2[23]);
var regenerateFeedAndClearReadStates = value3.regenerateFeedAndClearReadStates;
var ACK_GRAVITY_REGENERATE_FEED_AND_CLEAR_READ_STATES_BUTTON = env2_9.ACK_GRAVITY_REGENERATE_FEED_AND_CLEAR_READ_STATES_BUTTON;
yield Reflect.apply(regenerateFeedAndClearReadStates, value3,
[ACK_GRAVITY_REGENERATE_FEED_AND_CLEAR_READ_STATES_BUTTON]);
if (false) {
return undefined;
}
env2_1(env2_2[22]).hideActionSheet();
}
}
function ICYMISettingsActionSheetOnPress_111833() { // fn#111833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:1883, owner: ICYMISettingsActionSheet.onPress, offset: 0x023b3fc0, size: 211 bytes, params: 1, frame: 20
let value = environment.__proto__;
importDefault(dependencyMap[16]).itemInteracted('icymi_settings_action_sheet', 'icymi_settings_action_sheet',
'custom_scoring_button');
importDefault(dependencyMap[16]).feedPageActioned({actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'tune_settings_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
const defaultImport3 = importDefault(dependencyMap[24]);
const pushLazy = defaultImport3.pushLazy;
value = require(dependencyMap[26]);
value = value(dependencyMap[25], dependencyMap.paths);
const ICYMI_CUSTOM_SCORES_MODAL_KEY = require(dependencyMap[27]).ICYMI_CUSTOM_SCORES_MODAL_KEY;
Reflect.apply(pushLazy, defaultImport3, [value, {}, ICYMI_CUSTOM_SCORES_MODAL_KEY, {presentation: 'modal'}]);
importDefault(dependencyMap[22]).hideActionSheet();
}
function _fun111830(a0) { // fn#111830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15014:1158, offset: 0x023b3e1c, size: 307 bytes, params: 2, frame: 21
var data;
var defaultImport;
var compare;
var ackMessageId;
var channel_id;
var value4;
var moduleValue;
var ack;
var object2;
var atPreviousMillisecond;
const type = a0.type;
let value = environment.__proto__.__proto__;
const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
let r3 = type === MESSAGE && a0.data.channel_type === (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_ANNOUNCEMENT;
if (r3) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport.compare;
ackMessageId = ReadStateStore.ackMessageId;
data = a0.data;
value4 = Reflect.apply(ackMessageId, ReadStateStore, [data.channel_id]);
data = a0.data;
r3 = Reflect.apply(compare, defaultImport, [value4, data.message_id]) >= 0;
}
if (r3) {
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
ack = moduleValue.ack;
data = a0.data;
channel_id = data.channel_id;
object2 = {};
object2.object = AnalyticsObjects.ACK_GRAVITY_CLEAR_READ_STATES_BUTTON;
object2.objectType = AnalyticsObjectTypes.ACK_SEMI_AUTOMATIC;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
atPreviousMillisecond = value.atPreviousMillisecond;
data = a0.data;
value = Reflect.apply(atPreviousMillisecond, value, [data.message_id]);
Reflect.apply(ack, moduleValue, [channel_id, object2, true, true, value]);
}
}
@@ -0,0 +1,894 @@
/* Metro module 14865; source: modules/icymi/native/ICYMIShareModal.tsx; dependencies: [57, 5, 31, 27, 1379, 4645, 4644, 661, 7690, 4503, 33, 4501, 697, 9051, 1244, 14866, 3857, 1478, 4003, 7701, 14867, 7704, 3963, 3868, 5463, 9770, 9788, 4578, 5080, 7232, 1360, 7076, 7879, 491, 4650, 7067, 7880, 1585, 477, 5287, 9603, 5282, 9761, 2] */
function _fun112421(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:6, offset: 0x023cae8f, size: 724 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const closure = ICYMIShareModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
const env0_11 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_12 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
let value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingTop = PX_8;
object4.headerContainer = object5;
const object7 = {'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 1};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object7.borderColor = BORDER_STRONG;
object4.preview = object7;
object4.base = {position: 'relative'};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.contentContainer = {backgroundColor: BACKGROUND_BASE_LOW};
const object8 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'flex-end'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.gap = PX_12;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object8.backgroundColor = BACKGROUND_BASE_LOW;
object8.borderTopWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.borderTopColor = BORDER_SUBTLE;
object4.footer = object8;
const env0_15 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIShareModal.tsx');
exports.default = closure;
exports.GuildEventShareModal = GuildEventShareModal;
exports.GameShareModal = GameShareModal;
}
function Screenshot({render, setUri}) { // fn#112422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:892, offset: 0x023cb163, size: 518 bytes, params: 2, frame: 35
const styles = useStyles();
const value2 = env0_5.useRef(null);
env0_5.useEffect(function() {
global.setTimeout(_fun112424, 500);
}, [setUri]);
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value3 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const items2 = [styles.preview];
items2[1] = {width: width};
const defaultImport = importDefault(14867) /* metro dependency 14867 */;
const ThemedGradient = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
const {LEVEL_7, LEVEL_8} = (require(3963) /* metro dependency 3963: ClientThemesUtils */).OverlayOpacity;
const themedGradient = <ThemedGradient absolute wide tall mix mixAmount={{dark: LEVEL_7, light: LEVEL_8}} />;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<View style={{'position': 'absolute', 'top': -1000, 'overflow': 'hidden'}}>
<View style={items2}>
{((Component) => <Component ref={value2} options={{'fileName': 'icymi_content', 'format': 'png',
'quality': 1}}><View style={styles.base}>{themedGradient}<ThemeContextProvider gradient={value3}><View style={[styles.contentContainer,
value4]}>{render()}</View></ThemeContextProvider></View></Component>)(defaultImport)}
</View>
</View>
);
}
function GravityShareFooter({count, isSending, onSend}) { // fn#112426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:1649, offset: 0x023cb3e2, size: 589 bytes, params: 2, frame: 31
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const [property, property2] = env0_3(env0_5.useState(''), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const {textInputRef, handleSelectionChange, handleMessageFocus, handleMessageBlur,
handlePressEmoji} = (require(9770) /* metro dependency 9770: useShareChatInputActions */).useShareChatInputActions(property2);
const value6 = env0_5.useCallback(_fun112427, [property, onSend]);
const r12 = count <= 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.jWtYUm,
{count: count});
const value9 = env0_5.useMemo(function() {
var stylesBinding = styles;
return [stylesBinding.footer, {paddingBottom: stylesBinding.footer.paddingVertical + insets.bottom}];
}, [styles.footer, insets.bottom]);
const value10 = count === 0;
return value10 ? null : <View style={value9}>{((Component) => <Component inputRef={textInputRef} text={property} onChange={property2} onSelectionChange={handleSelectionChange} onFocus={handleMessageFocus} onBlur={handleMessageBlur} onPressEmoji={handlePressEmoji} onSend={value6} disabled={isSending} />)(importDefault(9788) /* metro dependency 9788: ShareChatInput */)}{((Button) => <Button variant="primary" size="md" text={r12} disabled={value10} onPress={isSending ? undefined : value6} loading={isSending} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
}
function ICYMIShareModal({title, originDestinationId, linkText, render, forwardToChannel, onShare}) { // fn#112429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2460, offset: 0x023cb67e, size: 728 bytes, params: 2, frame: 35
let binding = env0_5;
const value4 = forwardToChannel(binding.useState([]), 2);
var property = value4[0];
var env0_5 = property;
const property2 = value4[1];
const length = property.length;
var [property, env0_6] = forwardToChannel(env0_5.useState(false), 2);
const [env0_7, property3] = forwardToChannel(env0_5.useState(null), 2);
const value10 = env0_5.useCallback(_fun112430, []);
const value11 = _fun112431();
const styles = useStyles();
const value12 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
binding = env0_5;
const useMemo = binding.useMemo;
let bottom = value12.bottom;
const value13 = Reflect.apply(useMemo, binding, [_fun112441, [bottom, height]]);
const Header = (require(5287) /* metro dependency 5287 */).Header;
const object = {title: title, headerTitle: headerTitle_112442, headerTitleAlign: 'center'};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object.headerStatusBarHeight = platformUtilsModule.isIOS() ? 0 : undefined;
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(value10);
const view = <View style={styles.headerContainer}><Header {...object} /></View>;
const r6 = render != null && <Screenshot render={render} setUri={property3} />;
const SearchableDestinationList = importDefault(9761) /* metro dependency 9761: SearchableDestinationList */;
const TOGGLE = UserRowModes.TOGGLE;
bottom = value12.bottom;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const value17 = bottom + PX_8;
const PX_96 = (importDefault(697) /* metro dependency 697: native */).space.PX_96;
return (
<View style={value13}>
{view}
{r6}
<SearchableDestinationList
rowMode={TOGGLE}
onSelectedDestinationChange={property2}
originDestination={originDestinationId}
insetEnd={value17 + PX_96}
disableGradient
disableStickySections
/>
<GravityShareFooter
count={length}
isSending={property}
onSend={value11}
/>
</View>
);
}
function GuildEventShareModal({event}) { // fn#112443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4497, offset: 0x023cbdc0, size: 185 bytes, params: 2, frame: 20
const value3 = (require(9051) /* metro dependency 9051: ShareEventUtils */).SHARE_EVENT_DETAILS_LINK({guildId: event.guild_id,
guildEventId: event.id});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ICYMIShareModal
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7TVSLK'])}
originDestinationId={event.channel_id != null ? {type: 'channel', id: event.channel_id} : undefined}
linkText={value3}
/>
);
}
function GameShareModal({content}) { // fn#112444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4803, offset: 0x023cbe79, size: 123 bytes, params: 2, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ICYMIShareModal
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59CWHK'])}
linkText=""
forwardToChannel={_fun112445()}
/>
);
}
function _fun112423() { // fn#112423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:973, offset: 0x023cb369, size: 33 bytes, params: 1, frame: 13
global.setTimeout(_fun112424, 500);
}
function _fun112430() { // fn#112430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2721, offset: 0x023cb956, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun112431() { // fn#112431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2749, offset: 0x023cb97b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun112433);
return _fun112440;
}
function _fun112441() { // fn#112441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:3747, offset: 0x023cbd40, size: 72 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
return {height: value ? height + env0_8.bottom : '100%'};
}
function ICYMIShareModalHeaderTitle() { // fn#112442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:3923, owner: ICYMIShareModal.headerTitle, offset: 0x023cbd88, size: 56 bytes, params: 1, frame: 14
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return <GenericHeaderTitle title={title} />;
}
function _fun112445() { // fn#112445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4944, offset: 0x023cbef4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun112447);
return _fun112448;
}
function _fun112424() { // fn#112424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:990, offset: 0x023cb38a, size: 69 bytes, params: 1, frame: 13
var environment;
var r0;
let value = environment.__proto__;
const current = env1_1.current;
value = undefined;
if (current == null) {
r0 = value;
} else if (current.capture == null) {
r0 = value;
} else {
value = current.capture();
value = value.then(function(a0) {
setUri(a0);
});
r0 = value;
}
return r0;
}
function* _fun112433(a0) { // fn#112433, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2769, offset: 0x023cb9aa, size: 259 bytes, params: 2, frame: 21
var environment;
var Promise;
var all;
var binding;
var map;
var value5;
var value6;
var value8;
var filter;
var binding3;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
View(true);
if (dependencyMap == null || ChannelStore != null) {
Promise = global.Promise;
all = Promise.all;
binding = env2_5;
map = binding.map;
value5 = environment.__proto__.__proto__.__proto__;
yield Reflect.apply(all, Promise, [Reflect.apply(map, binding,
[env3_0(env3_2[29]).getOrResolveChannelIdFromDestinationId])]);
value6 = undefined;
if (false) {
return value6;
}
value8 = value6.map(_fun112434);
filter = value8.filter;
binding = env3_0;
binding3 = env3_2;
Reflect.apply(filter, value8, [binding(binding3[30]).isNotNullish]).forEach(_fun112435());
binding = env3_1;
binding(binding3[28]).pop();
if (env2_4 != null) {
env2_4();
}
}
}
}
function* _fun112447(a0) { // fn#112447, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4964, offset: 0x023cbf23, size: 299 bytes, params: 2, frame: 19
var r1;
var r4;
var binding;
var binding2;
var property;
var value3;
var sendMessageWithEmbed;
var object2;
var ICYMI;
var value5;
var value6;
var value7;
var error;
var body;
var value8;
var code;
var CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
var value9;
var value10;
var open;
var binding3;
var intl;
var string;
var t;
var F8FvUy;
var BC5vfD;
if (true) {
value = environment.__proto__.__proto__.__proto__;
try {
binding = env3_0;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
property = binding2[15];
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
sendMessageWithEmbed = value3.sendMessageWithEmbed;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2 = {'channel': null, 'content': '', 'entry': null, 'whenReady': false, 'doNotNotifyOnError': true};
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2.channel = a0;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2.entry = require;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
binding = env3_12;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
ICYMI = binding.ICYMI;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2.location = ICYMI;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
value5 = Reflect.apply(sendMessageWithEmbed, value3, [object2]);
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
if (value7) {
return value6;
}
}
}
function _fun112434(a0) { // fn#112434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2890, offset: 0x023cbaad, size: 22 bytes, params: 2, frame: 11
return env4_7.getChannel(a0);
}
function _fun112435() { // fn#112435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2949, offset: 0x023cbac3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env4_4(_fun112437);
return _fun112439;
}
function* _fun112437(a0) { // fn#112437, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2969, offset: 0x023cbaf2, size: 497 bytes, params: 2, frame: 28
var environment;
var r7;
var r8;
var binding;
var binding3;
var value9;
var addFile;
var object3;
var id;
var object4;
var binding4;
var binding5;
var ChannelMessage;
var binding6;
var getUploads;
var value11;
var value12;
var clearAll;
var value13;
var sendMessage;
if (false) {
return undefined;
}
const env0_0 = a0;
value = environment.__proto__.__proto__;
if (env2_0 == null) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
r7 = env5_1;
} else {
binding = env2_0;
if (binding.trim().length > 0) {
binding = env2_0;
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
value = '' + binding + '\n\n' + env5_1;
r7 = value;
} else {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
r7 = env5_1;
}
}
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env6_1;
const value3 = undefined;
if (env5_3 == null) {
if (env5_2 != null && env5_7 != null) {
binding = env6_1;
binding3 = env6_2;
value9 = binding(binding3[32]);
addFile = value9.addFile;
object3 = {};
id = a0.id;
object3.channelId = id;
object4 = {};
binding4 = env5_7;
object4.uri = binding4;
object4.originalUri = binding4;
binding5 = env6_0;
object4.id = binding5(binding3[33]).v4();
object4.platform = binding5(binding3[34]).UploadPlatform.REACT_NATIVE;
object3.file = object4;
ChannelMessage = env6_8.ChannelMessage;
object3.draftType = ChannelMessage;
Reflect.apply(addFile, value9, [object3]);
binding6 = env6_9;
getUploads = binding6.getUploads;
id = a0.id;
ChannelMessage = env6_8.ChannelMessage;
value11 = Reflect.apply(getUploads, binding6, [id, ChannelMessage]);
value12 = binding(binding3[32]);
clearAll = value12.clearAll;
id = a0.id;
ChannelMessage = env6_8.ChannelMessage;
Reflect.apply(clearAll, value12, [id, ChannelMessage]);
r8 = value11;
} else {
r8 = value3;
}
binding = env6_1;
value13 = binding(env6_2[35]);
sendMessage = value13.sendMessage;
id = a0.id;
yield Reflect.apply(sendMessage, value13, [id, binding(env6_2[31]).parse(a0, r7), false,
{location: env6_12.ICYMI,
attachmentsToUpload: r8, onAttachmentUploadError: onAttachmentUploadError_112438}]);
} else {
env5_3(a0);
}
return value3;
}
function onAttachmentUploadError_112438(a0, a1, a2) { // fn#112438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:3417, offset: 0x023cbce3, size: 93 bytes, params: 4, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
value = env7_0(env7_2[36]);
const handleUploadMessageAttachmentsErrors = value.handleUploadMessageAttachmentsErrors;
const object2 = {file: a0};
object2.guildId = env0_0.getGuildId();
object2.analyticsLocations = [];
object2.code = a1;
object2.reason = a2;
Reflect.apply(handleUploadMessageAttachmentsErrors, value, [object2]);
}
@@ -0,0 +1,619 @@
/* Metro module 14854; source: modules/icymi/native/ICYMIShared.tsx; dependencies: [31, 27, 6898, 1379, 1945, 3784, 1878, 661, 33, 7230, 9311, 6697, 9783, 14783, 5097, 6837, 5459, 7067, 4044, 14815, 477, 697, 1305, 7599, 6819, 4584, 5278, 4573, 4788, 14855, 8638, 566, 4617, 9580, 8743, 6704, 9579, 14517, 9133, 1244, 14816, 4048, 3860, 4000, 4017, 4504, 4603, 6682, 6818, 6622, 2] */
function _fun112249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6, offset: 0x023c0ca9, size: 560 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = Separator_112250;
const closure2 = function(a0) {
var r0;
var value = a0;
if (value.length > 20) {
value = value.slice(0, 17);
value = '' + value + '...';
r0 = value;
} else {
r0 = value;
}
return r0;
};
const closure3 = CutoutGuildIcon;
const closure4 = GuildContentPost;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.AnalyticsObjects;
const env0_11 = value.AnalyticsObjectTypes;
const env0_12 = value.AnalyticsPages;
const env0_13 = value.DEFAULT_ROLE_COLOR_HEX;
const env0_14 = value.MAX_MESSAGES_FOR_JUMP;
const env0_15 = value.MessageFlags;
const env0_16 = value.Permissions;
const env0_17 = value.Routes;
value = require(33) /* metro dependency 33 */;
const env0_18 = value.jsx;
const env0_19 = value.jsxs;
const env0_20 = value.Fragment;
const env0_21 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112256);
object = {code: 'function ICYMISharedTsx1(){const{interpolateColor,progress,bgColor,bgColorHighlighted}=this.__closure;return{backgroundColor:interpolateColor(progress.get(),[0,1],[bgColor,bgColorHighlighted])};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIShared.tsx');
exports.navigateToPost = navigateToPost;
exports.Separator = closure;
exports.truncateUsername = closure2;
exports.CutoutGuildIcon = closure3;
exports.GuildContentPost = closure4;
exports.AnnouncementContentPost = AnnouncementContentPost;
exports.GuildEventPost = GuildEventPost;
exports.MessageContentPost = MessageContentPost;
exports.SimplePost = SimplePost;
exports.ThreadAsComments = ThreadAsComments;
}
function Separator_112250() { // fn#112250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2353, offset: 0x023c0ed9, size: 41 bytes, params: 1, frame: 14
return <View style={env0_21().separator} />;
}
function CutoutGuildIconWithUser({guild, author}) { // fn#112252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2488, offset: 0x023c0f43, size: 146 bytes, params: 2, frame: 23
const value2 = env0_21();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const authorIcon = value2.authorIcon;
const id = guild.id;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
<CutoutGuildIcon
guild={guild}
icon={<Avatar animate style={authorIcon} guildId={id} user={author} size={XSMALL} />}
/>
);
}
function CutoutGuildIcon({guild, icon}) { // fn#112253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2696, offset: 0x023c0fd5, size: 217 bytes, params: 2, frame: 24
const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const Circle = CutoutShape.Circle;
const items2 = [{'shape': null, 'x': 16, 'y': 14, 'size': 32, shape: Circle}];
let value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const NORMAL = GuildIconSizes.NORMAL;
value = <ClipView cutouts={items2}>{((Component) => <Component guild={guild} size={NORMAL} />)(value)}</ClipView>;
return (
<View style={{'width': 40, 'height': 40}}>
{value}
{icon}
</View>
);
}
function GuildContentPost({guild, channel, timestamp, hideTimestamp, children, avatar, title, subtitle, id, type, onHeaderPress, onHeaderLongPress, disableInteractions}) { // fn#112254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2938, offset: 0x023c10ae, size: 743 bytes, params: 2, frame: 49
const value2 = env0_21();
const value3 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
return (
<>
<PressableHighlight
onPress={onHeaderPress}
onLongPress={onHeaderLongPress}
style={value2.content}
>
<View style={value3 > 1.8 ? value2.channelNameAndAccessoryLarge : value2.channelNameAndAccessory}>
<View style={value2.header}>
{avatar}
<View style={value2.headerInfo}>
<View style={value2.title}>
<View style={value2.titleLeft}>
{title}
{!hideTimestamp && ((Text) => <Text lineClamp={1} variant="text-xs/normal" color="text-muted">{(require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(timestamp)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
{disableInteractions || guild == null ? null : ((PressableOpacity) => <PressableOpacity onPress={onPress_112255} style={value2.subtitleTrailing} hitSlop={8}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED} size="sm" />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}
</View>
<View style={value2.subTitleContainer}>
<View style={value2.subtitle}>
{subtitle}
</View>
</View>
</View>
</View>
</View>
</PressableHighlight>
{children}
</>
);
}
function _fun112256(a0) { // fn#112256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:417, offset: 0x023c13f7, size: 822 bytes, params: 2, frame: 18
const object2 = {};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const isAndroid2 = platformUtilsModule.isAndroid();
const value2 = 0;
object2.simplePostContent = {'flex': 1, 'marginTop': null, 'overflow': 'hidden',
marginTop: isAndroid2 ? -2 : value2};
const moduleValue2 = platformUtilsModule;
object2.content = {'flex': 1, 'marginTop': null, 'overflow': 'hidden',
marginTop: moduleValue2.isAndroid() ? -2 : value2, paddingTop: a0.margin};
const object3 = {'position': 'absolute', 'right': -4, 'bottom': -2, 'padding': 4};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object3.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object2.insetIconWrapper = object3;
object2.authorIcon = {'position': 'absolute', 'right': -4, 'bottom': -2};
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.moreDetailsIcon = {tintColor: TEXT_MUTED};
object2.channelNameAndAccessory = {'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', paddingBottom: a0.margin, marginHorizontal: a0.margin};
object2.channelNameAndAccessoryLarge = {flexDirection: 'column', paddingBottom: a0.margin,
marginHorizontal: a0.margin};
object2.header = {'flexDirection': 'row', 'flexGrow': 1};
object2.headerInfo = {'flexGrow': 1, 'flexShrink': 1, marginLeft: a0.margin};
object2.title = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginBottom': 2};
object2.titleLeft = {'flexShrink': 1, 'flexGrow': 0, 'flexDirection': 'row', 'alignItems': 'center', 'gap': 6};
const object5 = {'flexDirection': 'row', 'justifyContent': 'space-between'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.subTitleContainer = object5;
object2.subtitle = {'flexShrink': 1, 'flexGrow': 0, 'width': '100%'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.genContentSubtitle = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object2.genContentSubtitleChannel = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2, 'flex': 1};
object2.subtitleTrailing = {paddingVertical: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.separator = {'height': 1, 'width': '100%', backgroundColor: BORDER_SUBTLE};
object2.eventsSubtitle = {'flexDirection': 'row', 'alignItems': 'center'};
const object6 = {'padding': 8, 'backgroundColor': null, 'borderRadius': null, 'display': 'flex',
'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object6.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.comments = object6;
object2.recentCommentText = {'flexGrow': 1, 'flexShrink': 1, 'marginRight': 12};
object2.commentCount = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 2,
'justifySelf': 'end'};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.commentsIcon = {'width': 20, 'height': 20, tintColor: INTERACTIVE_TEXT_DEFAULT};
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.chevron = {tintColor: TEXT_MUTED};
return object2;
}
function navigateToPost(a0, a1, a2) { // fn#112257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4260, offset: 0x023c172d, size: 158 bytes, params: 4, frame: 19
const env0_0 = a0;
const env0_1 = a2;
global.setTimeout(_fun112258, 1500);
(importDefault(6837) /* metro dependency 6837: safeTransitionToNative */)(Routes.CHANNEL(a1, a0, a2),
{'openChannel': true, 'navigationReplace': false});
if (a2 != null) {
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun112259, 150);
}
}
function AnnouncementContentPost({guild, channel, author, timestamp, children, id, mentioned, onHeaderPress, onHeaderLongPress}) { // fn#112260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4798, offset: 0x023c18a6, size: 678 bytes, params: 2, frame: 34
const env0_3 = id;
const value3 = env0_21();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const r20 = Reflect.apply(useStateFromStores, fluxModule, [[GuildMemberStore], function() {
return GuildMemberStore.getMember(guild.id, author.id);
}])?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
const value4 = (require(4617) /* metro dependency 4617: NicknameUtils */).useName(guild.id, channel.id, author);
const value5 = env0_3.useCallback(_fun112262, [author.id, channel.id, id]);
const guildContentPostBindingProps = {guild: guild, channel: channel, timestamp: timestamp,
avatar: <CutoutGuildIconWithUser guild={guild} author={author} />};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
guildContentPostBindingProps.title = <Text style={{maxWidth: 225}} lineClamp={1} variant="text-sm/medium" color="text-muted" key={channel.id}>{guild.name}</Text>;
const subtitle = value3.subtitle;
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text2 variant="text-md/semibold" onPress={value5} style={{color: r20}}>{truncateUsername(value4) + ' '}</Text2>];
const AnnouncementsIcon = (require(6704) /* metro dependency 6704: AnnouncementsIcon */).AnnouncementsIcon;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
items2[1] = <AnnouncementsIcon size="sm" color={TEXT_SUBTLE} />;
const icymiUtilsModule = require(9579) /* metro dependency 9579: ICYMIUtils */;
const contentTypeToText = icymiUtilsModule.contentTypeToText;
const ContentType = (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType;
const ANNOUNCEMENT = ContentType.ANNOUNCEMENT;
items2[2] = ' ' + Reflect.apply(contentTypeToText, icymiUtilsModule, [ANNOUNCEMENT, mentioned]);
guildContentPostBindingProps.subtitle = <Text lineClamp={2} variant="text-md/normal" color="text-default" style={subtitle}>{items2}</Text>;
guildContentPostBindingProps.onHeaderPress = onHeaderPress;
guildContentPostBindingProps.onHeaderLongPress = onHeaderLongPress;
guildContentPostBindingProps.id = id;
guildContentPostBindingProps.type = 'announcement';
return (
<GuildContentPost {...guildContentPostBindingProps}>
{children}
</GuildContentPost>
);
}
function GuildEventPost({guild, channel, children, event, type, onHeaderPress}) { // fn#112263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6106, offset: 0x023c1c0f, size: 1114 bytes, params: 2, frame: 37
var object;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
var items2;
const env0_3 = type;
const value3 = env0_21();
const r15 = event.host_id ?? event.creator_id;
(require(14517) /* metro dependency 14517: useEnsureHydratedUsers */).useEnsureHydratedUsers(event.guild_id,
r15 != null ? [r15] : []);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun112264);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun112265);
const value5 = env0_3.useCallback(_fun112266, [user, channel?.id, event.id, value4?.highestRoleId, type]);
const r23 = value4?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
const value6 = event.host_id != null;
const guildContentPostBindingProps = {guild: guild, channel: channel, timestamp: 0, hideTimestamp: true,
avatar: user != null ? <CutoutGuildIconWithUser guild={guild} author={user} /> : ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.NORMAL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
guildContentPostBindingProps.title = <Text style={{maxWidth: 225}} lineClamp={1} variant="text-sm/medium" color="text-muted" key={event.id}>{guild.name}</Text>;
const subtitle = value3.subtitle;
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
if (user != null) {
items2 = [<Text variant="text-md/semibold" onPress={value5} style={{color: r23}}>{truncateUsername(user.username) + ' '}</Text>];
items2[1] = ((CalendarIcon) => <CalendarIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE} />)((require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon);
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
items2[2] = value6 ? ' ' + Reflect.apply(string, intl, [t['42OrO4']]) : ' ' + Reflect.apply(string, intl,
[t.Vu15se]);
object = {children: items2};
} else {
items3 = [((CalendarIcon) => <CalendarIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE} />)((require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon)];
items3[1] = ' ' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.T7MIsc);
object = {children: items3};
}
guildContentPostBindingProps.subtitle = <Text lineClamp={2} variant="text-md/normal" color="text-default" style={subtitle}>{((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_20Binding)}</Text>;
guildContentPostBindingProps.id = event.id;
guildContentPostBindingProps.type = type;
guildContentPostBindingProps.onHeaderPress = onHeaderPress;
return (
<GuildContentPost {...guildContentPostBindingProps}>
{children}
</GuildContentPost>
);
}
function MessageContentPost({guild, channel, timestamp, author, message, children, id, type, onHeaderPress, onHeaderLongPress}) { // fn#112267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:7857, offset: 0x023c2197, size: 916 bytes, params: 2, frame: 36
const env0_3 = message;
let binding = env0_3;
const value2 = binding.useMemo(_fun112268, [channel, message]);
const r23 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guild.id, author.id);
})?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
const value4 = (require(4617) /* metro dependency 4617: NicknameUtils */).useName(guild.id, channel.id, author);
const ContentType = (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType;
const POPULAR_MESSAGE = ContentType.POPULAR_MESSAGE;
const r19 = POPULAR_MESSAGE === value2 ? (require(9311) /* metro dependency 9311: FireIcon */).FireIcon : (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType.IMAGE === value2 ? (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon : (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType.VIDEO === value2 ? (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon : (require(14783) /* metro dependency 14783: LightbulbIcon */).LightbulbIcon;
binding = env0_3;
const value5 = binding.useCallback(_fun112270, [author.id, channel.id, id, type]);
const useContext = binding.useContext;
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
const margin = Reflect.apply(useContext, binding, [ICYMIContext]).margin;
const guildContentPostBindingProps = {guild: guild, channel: channel, timestamp: timestamp,
avatar: <CutoutGuildIconWithUser guild={guild} author={author} />};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
guildContentPostBindingProps.title = <Text style={{maxWidth: 225}} lineClamp={1} variant="text-sm/medium" color="text-default" key={channel.id}>{guild.name}</Text>;
const object = {marginRight: margin};
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text2 style={{color: r23}} onPress={value5} variant="text-md/semibold">{truncateUsername(value4) + ' '}</Text2>];
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
items2[1] = ((Component) => <Component size="sm" color={TEXT_SUBTLE} />)(r19);
const icymiUtilsModule = require(9579) /* metro dependency 9579: ICYMIUtils */;
items2[2] = ' ' + icymiUtilsModule.contentTypeToText(value2);
guildContentPostBindingProps.subtitle = <Text lineClamp={2} variant="text-md/normal" color="text-default" style={object}>{items2}</Text>;
guildContentPostBindingProps.onHeaderPress = onHeaderPress;
guildContentPostBindingProps.onHeaderLongPress = onHeaderLongPress;
guildContentPostBindingProps.id = id;
guildContentPostBindingProps.type = type;
return (
<GuildContentPost {...guildContentPostBindingProps}>
{children}
</GuildContentPost>
);
}
function SimplePost({children, hideDivider, highlight}) { // fn#112271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:9441, offset: 0x023c25fa, size: 544 bytes, params: 2, frame: 26
var items2;
var items3;
highlight = !(highlight === undefined) && highlight;
const value2 = env0_21();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
const value4 = Reflect.apply(useToken, useTokenModule, [MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT, value3]);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
const value5 = Reflect.apply(hexWithOpacity, colorUtilsModule, [BRAND_360, 0.25]);
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value6;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = SimplePostC;
let object2 = {};
object2.interpolateColor = reanimatedRexportModule.interpolateColor;
object2.progress = value6;
object2.bgColor = value4;
object2.bgColorHighlighted = value5;
closure.__closure = object2;
closure.__workletHash = 11116019021445;
closure.__initData = env0_22;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
env0_3.useEffect(_fun112273, [highlight, value6]);
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
object2 = {};
if (highlight) {
items3 = [((View) => <View style={[value2.simplePostContent,
value7]}>{children}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)];
items3[1] = hideDivider ? null : <Separator_112250 />;
object2.children = items3;
} else {
items2 = [<View style={value2.simplePostContent}>{children}</View>];
items2[1] = hideDivider ? null : <Separator_112250 />;
object2.children = items2;
}
return ((Fragment) => <Fragment {...object2} />)(jsxRuntimeEnv0_20Binding);
}
function ThreadAsComments({guild, parentMessage, onPress, style, inForum}) { // fn#112274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:10333, offset: 0x023c2917, size: 1027 bytes, params: 2, frame: 30
var r18;
var r11;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var defaultImport;
var items3;
const value3 = env0_21();
const {thread, messageCount, mostRecentMessage} = ThreadAsCommentsUseThread(guild, parentMessage,
inForum != null && inForum);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[PermissionStore], function() {
var VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
return PermissionStore.canWithPartialContext(VIEW_CHANNEL, {channelId: parentMessage.id});
}])) {
if (thread == null) {
return (
<PressableHighlight style={[value3.comments, style]} onPress={onPress}>
<Text
variant="text-md/semibold"
color="text-muted"
lineClamp={1}
style={value3.recentCommentText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VMWjXW)}
</Text>
<View style={value3.commentCount}>
{((ChatIcon) => <ChatIcon style={value3.commentsIcon} />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
{((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={value3.chevron} size="xxs" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}
</View>
</PressableHighlight>
);
}
if (mostRecentMessage == null) {
return (
<PressableHighlight style={[value3.comments, style]} onPress={onPress}>
<Text
variant="text-md/semibold"
color="text-muted"
lineClamp={1}
style={value3.recentCommentText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VMWjXW)}
</Text>
<View style={value3.commentCount}>
{((ChatIcon) => <ChatIcon style={value3.commentsIcon} />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
{((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={value3.chevron} size="xxs" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}
</View>
</PressableHighlight>
);
}
r18 = messageCount > 99 ? '99+' : messageCount;
var pressableHighlightProps2 = {style: [value3.comments, style], onPress: onPress};
items2 = [((Avatar) => <Avatar user={mostRecentMessage?.author} guildId={thread.guild_id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
var textProps2 = {'variant': 'text-sm/semibold', 'lineClamp': 1, style: value3.recentCommentText};
if (mostRecentMessage.content.length > 0) {
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
r11 = defaultImport.parseInlineReply(mostRecentMessage.content, true);
} else {
r11 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6kp9H2']);
}
items2[1] = <Text {...textProps2}>{r11}</Text>;
var viewBindingProps = {style: value3.commentCount};
items3 = [((ChatIcon) => <ChatIcon style={value3.commentsIcon} />)((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)];
items3[1] = <Text variant="text-sm/bold" color="interactive-text-default">{r18}</Text>;
items3[2] = ((ChevronSmallRightIcon) => <ChevronSmallRightIcon style={value3.chevron} size="xxs" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon);
items2[2] = <View {...viewBindingProps}>{items3}</View>;
return (
<PressableHighlight {...pressableHighlightProps2}>
{items2}
</PressableHighlight>
);
}
return null;
}
function GuildContentPostOnPress() { // fn#112255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:3650, owner: GuildContentPost.onPress, offset: 0x023c1395, size: 98 bytes, params: 1, frame: 15
const value = environment.__proto__;
return (require(14855) /* metro dependency 14855: openDetailsActionSheet */).openDetailsActionSheet({guildId: guild.id,
channelId: channel?.id, id: id, type: type});
}
function _fun112258() { // fn#112258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4303, offset: 0x023c17cb, size: 105 bytes, params: 1, frame: 20
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
const ack = readStateActionCreatorsModule.ack;
const binding = env0_0;
const ICYMI = AnalyticsPages.ICYMI;
const ACK_MESSAGE_VIEWED = AnalyticsObjects.ACK_MESSAGE_VIEWED;
const ACK_SEMI_AUTOMATIC = AnalyticsObjectTypes.ACK_SEMI_AUTOMATIC;
Reflect.apply(ack, readStateActionCreatorsModule, [binding, {page: ICYMI, object: ACK_MESSAGE_VIEWED,
objectType: ACK_SEMI_AUTOMATIC}, true, true, importDefault]);
}
function _fun112259() { // fn#112259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4520, offset: 0x023c1834, size: 114 bytes, params: 1, frame: 16
const defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
const fetchMessages = defaultImport.fetchMessages;
const object3 = {};
object3.channelId = env0_0;
object3.limit = MAX_MESSAGES_FOR_JUMP;
const object4 = {};
object4.messageId = importDefault;
object4.flash = true;
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
const ANIMATED = JumpTypes.ANIMATED;
object4.jumpType = ANIMATED;
object3.jump = object4;
Reflect.apply(fetchMessages, defaultImport, [object3]);
}
function _fun112262() { // fn#112262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:5107, offset: 0x023c1b76, size: 153 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const idBinding = id;
Reflect.apply(itemInteracted, value, [idBinding, 'announcement', 'open_profile']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: idBinding,
itemType: 'announcement', actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'user'}});
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: author.id,
channelId: channel.id});
}
function _fun112264() { // fn#112264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6342, offset: 0x023c2069, size: 27 bytes, params: 1, frame: 11
return UserStore.getUser(env0_4);
}
function _fun112265() { // fn#112265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6396, offset: 0x023c2084, size: 50 bytes, params: 1, frame: 14
const value2 = null;
return value2 != env0_4 ? GuildMemberStore.getMember(guild.id, env0_4) : value2;
}
function _fun112266() { // fn#112266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6452, offset: 0x023c20b6, size: 225 bytes, params: 1, frame: 22
var id;
var value2;
var value3;
var defaultImport;
var itemInteracted;
var eventBinding;
var defaultImport2;
var feedItemActioned;
var object2;
var defaultImport3;
if (user != null) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
itemInteracted = defaultImport.itemInteracted;
eventBinding = event;
id = eventBinding.id;
Reflect.apply(itemInteracted, defaultImport, [id, type, 'open_profile']);
defaultImport2 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
feedItemActioned = defaultImport2.feedItemActioned;
id = eventBinding.id;
Reflect.apply(feedItemActioned, defaultImport2, [{itemId: id, itemType: 'guild_event',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'user'}}]);
defaultImport3 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object2 = {};
id = user.id;
object2.userId = id;
object2.roleId = env0_6 == null ? value3 : env0_6.highestRoleId;
id = channel == null ? value3 : channel.id;
object2.channelId = id;
defaultImport3(object2);
}
}
function _fun112268() { // fn#112268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:8015, offset: 0x023c252b, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
return value.determineContentType(channel, message);
}
function _fun112270() { // fn#112270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:8481, offset: 0x023c255d, size: 157 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const idBinding = id;
Reflect.apply(itemInteracted, value, [idBinding, type, 'open_profile']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: idBinding,
itemType: 'message', actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'user'}});
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: author.id,
channelId: channel.id});
}
function SimplePostC() { // fn#112272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:9733, owner: SimplePost.c, offset: 0x023c281a, size: 92 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.backgroundColor = value.interpolateColor(env0_3.get(), [0, 1], [env0_1, env0_2]);
return object2;
}
function _fun112273() { // fn#112273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:9983, offset: 0x023c2876, size: 161 bytes, params: 1, frame: 23
var binding;
var set;
var withSequence;
var value2;
var moduleValue2;
var withDelay;
var moduleValue3;
var value;
if (highlight) {
binding = env0_3;
set = binding.set;
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = value.withSequence;
value2 = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 500});
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue2.withDelay;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, Reflect.apply(withDelay, moduleValue2,
[500, moduleValue3.withTiming(0, {duration: 350})])])]);
}
}
function ThreadAsCommentsUseThread(a0, a1, a2) { // fn#112275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:10426, owner: ThreadAsComments.useThread, offset: 0x023c2d1a, size: 167 bytes, params: 4, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const {thread, messageCount,
mostRecentMessage} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
ThreadMessageStore], function() {
var object = {};
object.thread = ChannelStore.getChannel(require.id);
object.messageCount = ThreadMessageStore.getCount(require.id) ?? 0;
object.mostRecentMessage = ThreadMessageStore.getMostRecentMessage(require.id);
return object;
});
env1_3.useEffect(_fun112277, [a0.id, a2, a1]);
return {thread: thread, messageCount: messageCount, mostRecentMessage: mostRecentMessage};
}
function _fun112277() { // fn#112277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:10708, offset: 0x023c2e2b, size: 178 bytes, params: 1, frame: 17
var id;
var defaultImport;
var preload;
var fetchMessages;
var value;
const hasFlag = require.hasFlag;
const HAS_THREAD = MessageFlags.HAS_THREAD;
if ((Reflect.apply(hasFlag, require,
[HAS_THREAD]) || importDefault) && ThreadMessageStore.getMostRecentMessage(require.id) == null) {
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
preload = defaultImport.preload;
id = env0_0.id;
Reflect.apply(preload, defaultImport, [id, require.id]);
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
fetchMessages = value.fetchMessages;
id = require.id;
Reflect.apply(fetchMessages, value, [{'channelId': null, 'isPreload': true, 'limit': 25, channelId: id}]);
}
}
@@ -0,0 +1,80 @@
/* Metro module 14821; source: modules/icymi/native/ItemDetailsActionSheet.tsx; dependencies: [31, 27, 1379, 1867, 9569, 33, 4501, 697, 566, 4805, 5115, 6819, 1305, 9579, 6805, 11251, 14822, 6231, 6238, 2] */
function _fun111870(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15018:6, offset: 0x023b5af9, size: 292 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_10 = Reflect.apply(createStyles, value, [{divider: {height: 1, backgroundColor: BORDER_SUBTLE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ItemDetailsActionSheet.tsx');
exports.default = ItemDetailsActionSheet;
}
function ItemDetailsActionSheet({guildId, channelId, id}) { // fn#111871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15018:371, offset: 0x023b5c1d, size: 883 bytes, params: 2, frame: 28
var object2;
var jsxRuntimeEnv0_8Binding;
var TableRowGroup;
var TableRow;
var score;
var JSON;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], _fun111874);
const value5 = (importDefault(5115) /* metro dependency 5115: useDesignToggle */)('show_icymi_debug_scores');
const r13 = guild != null ? ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : channel != null ? ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} channel={channel} />)((require(1305) /* metro dependency 1305: native */).Avatar) : undefined;
const styles = useStyles();
let r14 = channel != null && guild != null && (require(9579) /* metro dependency 9579: ICYMIUtils */).isChannelCustomScoreEligible(channel);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object2 = {'showGradient': true, 'startExpanded': true};
const ActionSheetIconHeader = (require(11251) /* metro dependency 11251: ActionSheetIconHeaderNative */).ActionSheetIconHeader;
object2.header = <ActionSheetIconHeader icon={r13} title={value3} subtitle={guild?.name ?? ''} />;
const items2 = [r14 && ((ChannelScoreSettings) => <ChannelScoreSettings channel={channel} guild={guild} />)((require(14822) /* metro dependency 14822: ICYMIContentSettingControl */).ChannelScoreSettings)];
let r5 = value4 != null && guild != null;
if (r5) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
r14 = r14 && <View style={styles.divider} />;
r5 = <>{r14}{((GuildScoreSettings) => <GuildScoreSettings guild={guild} />)((require(14822) /* metro dependency 14822: ICYMIContentSettingControl */).GuildScoreSettings)}</>;
}
items2[1] = r5;
if (value4 != null) {
if (value5) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
score = value4.score;
JSON = global.JSON;
r5 = <TableRowGroup title="Debug details" hasIcons={false}><TableRow label={'Total Score: ' + score} subLabel={JSON.stringify(value4.score_components)} /></TableRowGroup>;
} else {
r5 = null;
}
} else {
r5 = null;
}
items2[2] = r5;
return (
<ActionSheet {...object2}>
{items2}
</ActionSheet>
);
}
function _fun111874() { // fn#111874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15018:601, offset: 0x023b5f90, size: 42 bytes, params: 1, frame: 12
const idBinding = id;
const value2 = null;
return value2 != idBinding ? ICYMIStore.getDehydratedItem(id) : value2;
}
@@ -0,0 +1,384 @@
/* Metro module 14826; source: modules/icymi/native/NativeICYMIActionCreators.tsx; dependencies: [5, 661, 9579, 507, 694, 3857, 1244, 2] */
function _fun111891(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15023:6, offset: 0x023b6f57, size: 147 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {customScoreGuild: customScoreGuild};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/NativeICYMIActionCreators.tsx');
exports.default = object2;
}
function customScoreGuild({guildId, channelScores, guildScore}) { // fn#111892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15023:146, offset: 0x023b6fea, size: 61 bytes, params: 2, frame: 11
return env0_3(_fun111894)();
}
function* _fun111894() { // fn#111894, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15023:193, offset: 0x023b7032, size: 471 bytes, params: 1, frame: 20
var environment;
var r7;
var binding;
var value3;
var value4;
var icymiEnabled;
var binding2;
var property;
var value5;
var HTTP;
var put;
var object3;
var GRAVITY_CUSTOM_GUILD_SCORES;
var object4;
var value6;
var value7;
var map;
var closure;
var value8;
var value9;
var value10;
var value11;
var binding3;
var value12;
var dispatch;
var value13;
var open;
var value14;
var intl;
var string;
var value15;
var t;
var OMdbs1;
var value16;
var error;
var binding4;
var value17;
var CG4Hks;
if (false) {
return undefined;
}
reduciblePort74: while (true) {
exceptionLanding73: while (true) {
value = environment.__proto__.__proto__;
binding = env2_0;
value3 = undefined;
value4 = binding(env2_2[2]);
icymiEnabled = value4.icymiEnabled;
if (Reflect.apply(icymiEnabled, value4, ['customScores'])) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding73;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding73;
}
try {
property = binding2[3];
} catch (error) {
break exceptionLanding73;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding73;
}
try {
HTTP = value5.HTTP;
} catch (error) {
break exceptionLanding73;
}
try {
put = HTTP.put;
} catch (error) {
break exceptionLanding73;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding73;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding73;
}
try {
GRAVITY_CUSTOM_GUILD_SCORES = binding.GRAVITY_CUSTOM_GUILD_SCORES;
} catch (error) {
break exceptionLanding73;
}
try {
object3.url = GRAVITY_CUSTOM_GUILD_SCORES;
} catch (error) {
break exceptionLanding73;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding73;
}
value6 = environment.__proto__;
try {
} catch (error) {
break exceptionLanding73;
}
try {
object4.guild_id = require;
} catch (error) {
break exceptionLanding73;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
value7 = importDefault == null;
} catch (error) {
break exceptionLanding73;
}
reducibleJoin26: while (true) {
if (value7) {
r7 = value3;
break reducibleJoin26;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
map = importDefault.map;
} catch (error) {
break exceptionLanding73;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
closure = function({channelId, score}) {
return {channel_id: channelId, score: score};
};
} catch (error) {
break exceptionLanding73;
}
try {
value8 = Reflect.apply(map, importDefault, [closure]);
} catch (error) {
break exceptionLanding73;
}
r7 = value8;
break reducibleJoin26;
}
try {
object4.channel_scores = r7;
} catch (error) {
break exceptionLanding73;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
object4.guild_score = dependencyMap;
} catch (error) {
break exceptionLanding73;
}
try {
object3.body = object4;
} catch (error) {
break exceptionLanding73;
}
try {
object3.rejectWithError = true;
} catch (error) {
break exceptionLanding73;
}
try {
value9 = Reflect.apply(put, HTTP, [object3]);
} catch (error) {
break exceptionLanding73;
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
break exceptionLanding73;
}
if (value11) {
return value10;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding73;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding73;
}
try {
property = binding3[4];
} catch (error) {
break exceptionLanding73;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding73;
}
try {
dispatch = value12.dispatch;
} catch (error) {
break exceptionLanding73;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding73;
}
try {
object3.type = 'ICYMI_CUSTOM_SCORES_UPDATED';
} catch (error) {
break exceptionLanding73;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
object3.guildId = require;
} catch (error) {
break exceptionLanding73;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
object3.channelScores = importDefault;
} catch (error) {
break exceptionLanding73;
}
try {
} catch (error) {
break exceptionLanding73;
}
try {
object3.guildScore = dependencyMap;
} catch (error) {
break exceptionLanding73;
}
try {
Reflect.apply(dispatch, value12, [object3]);
} catch (error) {
break exceptionLanding73;
}
try {
property = binding3[5];
} catch (error) {
break exceptionLanding73;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding73;
}
try {
open = value13.open;
} catch (error) {
break exceptionLanding73;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding73;
}
try {
object3.key = 'GravityGuildScore';
} catch (error) {
break exceptionLanding73;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding73;
}
try {
property = binding3[6];
} catch (error) {
break exceptionLanding73;
}
try {
value14 = binding(property);
} catch (error) {
break exceptionLanding73;
}
try {
intl = value14.intl;
} catch (error) {
break exceptionLanding73;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding73;
}
try {
property = binding3[6];
} catch (error) {
break exceptionLanding73;
}
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding73;
}
try {
t = value15.t;
} catch (error) {
break exceptionLanding73;
}
try {
OMdbs1 = t.OMdbs1;
} catch (error) {
break exceptionLanding73;
}
try {
value16 = Reflect.apply(string, intl, [OMdbs1]);
} catch (error) {
break exceptionLanding73;
}
try {
object3.content = value16;
} catch (error) {
break exceptionLanding73;
}
try {
Reflect.apply(open, value13, [object3]);
} catch (error) {
break exceptionLanding73;
}
break reduciblePort74;
}
break reduciblePort74;
}
binding = env2_1;
binding4 = env2_2;
value17 = binding(binding4[5]);
open = value17.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CG4Hks = t.CG4Hks;
Reflect.apply(open, value17, [{key: 'GravityGuildScore', content: Reflect.apply(string, intl, [CG4Hks])}]);
break reduciblePort74;
}
return value3;
}
@@ -0,0 +1,19 @@
/* Metro module 14828; source: modules/icymi/native/NativeICYMIUtils.tsx; dependencies: [5080, 14829, 1962, 14830, 2] */
function _fun111897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15025:6, offset: 0x023b7278, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/NativeICYMIUtils.tsx');
exports.pushICYMIInfoModal = pushICYMIInfoModal;
}
function pushICYMIInfoModal({extendedOnboarding, skipIntro}) { // fn#111898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15025:188, offset: 0x023b72df, size: 140 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
const object2 = {extendedOnboarding: extendedOnboarding, skipIntro: skipIntro};
const ICYMI_INFO_MODAL_KEY = require(dependencyMap[3]).ICYMI_INFO_MODAL_KEY;
Reflect.apply(pushLazy, defaultImport, [value, object2, ICYMI_INFO_MODAL_KEY, {presentation: 'fullScreenModal'}]);
}
@@ -0,0 +1,253 @@
/* Metro module 14884; source: modules/icymi/native/NewContentPill.tsx; dependencies: [57, 31, 27, 1867, 9569, 33, 4501, 697, 7599, 6819, 566, 4048, 7230, 9579, 4017, 4577, 1487, 5278, 14278, 4573, 1244, 4002, 2] */
function _fun112600(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:6, offset: 0x023d4171, size: 437 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'alignSelf': 'center', 'alignItems': 'center', 'flexDirection': 'row', 'paddingRight': 12,
'paddingLeft': 8, 'paddingVertical': 6};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.backgroundColor = BACKGROUND_BRAND;
object3.container = object4;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.guildIconBG = {backgroundColor: BACKGROUND_BASE_LOWER};
object3.refreshMorePillContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'height': 32, 'width': '100%',
'zIndex': 100};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
const env0_12 = {'overshootClamping': true, 'stiffness': 20, 'damping': 15, 'mass': 0.03};
object3 = {code: "function NewContentPillTsx1(){const{withSpring,showingPill,springConfig}=this.__closure;return{transform:[{translateY:withSpring(showingPill?12:0,springConfig)}],opacity:withSpring(showingPill?1:0,springConfig,'respect-motion-settings')};}"};
object3 = {code: "function NewContentPillTsx2(){const{showingPill}=this.__closure;return{pointerEvents:showingPill?'box-none':'none'};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/NewContentPill.tsx');
exports.default = NewContentPill;
}
function CutoutGuildIcon_112601({guild}) { // fn#112601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:649, offset: 0x023d4326, size: 246 bytes, params: 2, frame: 24
const styles = useStyles();
const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
const object = {'shape': null, 'x': 18, 'y': -4, 'width': 32, 'height': 32};
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
object.shape = RoundedRect;
object.cornerRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const items2 = [object];
const guildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const XSMALL = GuildIconSizes.XSMALL;
return (
<View style={{'width': 24, 'height': 24}}>
<ClipView cutouts={items2}>
{((Component) => <Component guild={guild} size={XSMALL} style={styles.guildIconBG} />)(guildIcon)}
</ClipView>
</View>
);
}
function NewContentPill({onPress, isRefreshing}) { // fn#112602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:1420, offset: 0x023d441c, size: 1419 bytes, params: 2, frame: 35
var r15;
var view;
var View2;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var isThemeDark2;
var unsafe_rawColors;
var items2;
var slice;
var value17;
var object;
var GuildIcon;
var View3;
var items4;
var Text;
var intl;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ICYMIStore], function() {
return ICYMIStore.getNewUnreadDehydratedItems();
});
const fluxModule = require(566) /* metro dependency 566: flux */;
let closure = function() {
return ICYMIStore.hasNewContent();
};
const value3 = fluxModule.useStateFromStores([ICYMIStore], closure, []);
const env0_3 = value3;
let binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [value2]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
var property = value5[0];
var env0_4 = property;
const env0_5 = value5[1];
const value6 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const env0_6 = binding.useMemo(_fun112605, [property]);
const value7 = fluxModule.useStateFromStoresArray([GuildStore], _fun112607);
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
property = value8[0];
const env0_7 = value8[1];
const r19 = value3 && property;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = NewContentPillY;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, showingPill: r19,
springConfig: env0_12};
closure.__workletHash = 13655660855782;
closure.__initData = env0_13;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
const useAnimatedProps = moduleValue5.useAnimatedProps;
closure = NewContentPillC;
closure.__closure = {showingPill: r19};
closure.__workletHash = 876312391659;
closure.__initData = env0_14;
const value10 = Reflect.apply(useAnimatedProps, moduleValue5, [closure]);
const value11 = (require(1487) /* metro dependency 1487 */).useIsFocused();
binding = env0_4;
var [property, env0_11] = env0_3(binding.useState(false), 2);
binding.useLayoutEffect(_fun112611, [value3, value11, property]);
binding.useEffect(_fun112612, [isRefreshing, value2, value3]);
const value14 = binding.useCallback(function() {
onPress();
}, [onPress]);
let length = value7.length;
if (length === 0) {
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view3Props = {style: [styles.refreshMorePillContainer, value9], animatedProps: value10};
var pressableOpacityProps = {onPress: value14, style: styles.container};
items4 = [((ArrowSmallUpIcon) => <ArrowSmallUpIcon size="md" color="interactive-text-active" />)((require(14278) /* metro dependency 14278: ArrowSmallUpIcon */).ArrowSmallUpIcon)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4[1] = <Text style={{marginLeft: 4}} variant="heading-md/bold" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4Nl0Rl'])}</Text>;
view = <View3 {...view3Props}><PressableOpacity {...pressableOpacityProps}>{items4}</PressableOpacity></View3>;
} else {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.refreshMorePillContainer, value9], animatedProps: value10};
var pressableOpacityProps = {onPress: value14, style: styles.container};
if (isRefreshing) {
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value6);
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r15 = <ActivityIndicator color={isThemeDark2 ? unsafe_rawColors.WHITE : unsafe_rawColors.PRIMARY_500} />;
} else {
const ArrowSmallUpIcon = (require(14278) /* metro dependency 14278: ArrowSmallUpIcon */).ArrowSmallUpIcon;
r15 = <ArrowSmallUpIcon size="md" color="interactive-text-active" />;
}
items2 = [r15];
slice = value7.slice;
length = value7.length;
value17 = Reflect.apply(slice, value7, [0, length - 1]);
items2[1] = value17.map(_fun112614);
object = {};
length = value7.length;
object.style = {marginLeft: length > 1 ? -2 : 4};
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
length = value7.length;
items2[2] = <View {...object}><GuildIcon guild={value7[length - 1]} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XSMALL} style={styles.guildIconBG} /></View>;
view = <View2 {...view2Props}><PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity></View2>;
}
return view;
}
function _fun112605() { // fn#112605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:1691, offset: 0x023d49cf, size: 36 bytes, params: 1, frame: 12
env0_4.forEach(_fun112606);
return [];
}
function _fun112607() { // fn#112607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:1901, offset: 0x023d4a7f, size: 46 bytes, params: 1, frame: 11
const value = env0_6.map(function(a0) {
return GuildStore.getGuild(a0);
});
const filter = value.filter;
const Boolean = global.Boolean;
return Reflect.apply(filter, value, [Boolean]);
}
function NewContentPillY() { // fn#112609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:2028, owner: NewContentPill.y, offset: 0x023d4ac4, size: 133 bytes, params: 1, frame: 21
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = 0;
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [env0_8 ? 12 : value3, env1_12])}];
const moduleValue2 = springModule;
object2.opacity = moduleValue2.withSpring(env0_8 ? 1 : value3, env1_12, 'respect-motion-settings');
return object2;
}
function NewContentPillC() { // fn#112610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:2320, owner: NewContentPill.C, offset: 0x023d4b49, size: 29 bytes, params: 1, frame: 3
return {pointerEvents: env0_8 ? 'box-none' : 'none'};
}
function _fun112611() { // fn#112611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:2534, offset: 0x023d4b66, size: 93 bytes, params: 1, frame: 12
var r1;
if (env0_10) {
r1 = env0_10 && env0_9;
r1 = r1 && !env0_3;
if (r1) {
env0_7(true);
}
} else if (env0_9) {
if (env0_3) {
env0_7(false);
} else {
r1 = env0_10 && env0_9;
r1 = r1 && !env0_3;
if (r1) {
env0_7(true);
}
}
} else {
r1 = env0_10 && env0_9;
r1 = r1 && !env0_3;
if (r1) {
env0_7(true);
}
}
env0_11(env0_9);
}
function _fun112612() { // fn#112612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:2599, offset: 0x023d4bc3, size: 29 bytes, params: 1, frame: 11
if (!isRefreshing) {
env0_5(env0_2);
}
}
function _fun112614(a0, a1) { // fn#112614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:3407, offset: 0x023d4be0, size: 88 bytes, params: 3, frame: 18
return (
<View style={{marginLeft: a1 > 0 ? -2 : 4}} key={a0.id}>
<CutoutGuildIcon_112601 guild={a0} />
</View>
);
}
function _fun112606(a0) { // fn#112606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15081:1723, offset: 0x023d49f3, size: 140 bytes, params: 2, frame: 15
var r3;
var isGuildItem2;
var binding;
const length = env0_0.length;
const MIN_ITEMS_FOR_NEW_PILL = (require(7230) /* metro dependency 7230: ICYMITypes */).MIN_ITEMS_FOR_NEW_PILL;
if (!(length >= MIN_ITEMS_FOR_NEW_PILL)) {
isGuildItem2 = (require(9579) /* metro dependency 9579: ICYMIUtils */).isGuildItem(a0);
if (isGuildItem2) {
binding = env0_0;
r3 = !binding.includes(a0.data.guild_id);
} else {
r3 = isGuildItem2;
}
if (r3) {
binding = env0_0;
binding.push(a0.data.guild_id);
}
}
}
+83
View File
@@ -0,0 +1,83 @@
/* Metro module 14872; source: modules/icymi/native/ReplyRow.tsx; dependencies: [31, 27, 33, 14815, 697, 5278, 4573, 7950, 2] */
function _fun112519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15069:6, offset: 0x023cee9e, size: 202 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112520);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ReplyRow.tsx');
exports.ContentInventoryReplyRow = ContentInventoryReplyRow;
}
function _fun112520(a0) { // fn#112520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15069:175, offset: 0x023cef68, size: 515 bytes, params: 2, frame: 17
const object2 = {};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.separator = {height: 1, backgroundColor: BORDER_SUBTLE, marginBottom: a0.margin, width: '100%'};
const object4 = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'flexDirection': 'row'};
object4.marginHorizontal = a0.margin;
object4.marginBottom = a0.margin;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.gap = PX_12;
object2.container = object4;
let PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object2.buttonContainer = {'flexGrow': 1, 'flexBasis': 0, height: PX_40};
const object6 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object6.height = PX_40;
object2.feedbackContainer = object6;
object2.icon = {'width': 20, 'height': 20};
const BUTTON_OUTLINE_PRIMARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_PRIMARY_TEXT;
object2.feedbackButtonIcon = {tintColor: BUTTON_OUTLINE_PRIMARY_TEXT};
const object8 = {flex: 1};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.input = object8;
const REDESIGN_CHAT_INPUT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHAT_INPUT_BACKGROUND;
object2.contentInventoryPressable = {'borderRadius': 20, 'width': '100%', 'minHeight': 40, 'backgroundColor': null,
'justifyContent': 'center', backgroundColor: REDESIGN_CHAT_INPUT_BACKGROUND};
const object10 = {'marginLeft': null, 'marginRight': 10, 'paddingVertical': null, 'flexDirection': 'row',
'alignItems': 'center'};
object10.marginLeft = a0.margin;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.paddingVertical = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.gap = PX_4;
object2.contentInventoryContainer = object10;
object2.contentInventoryText = {flexShrink: 1};
object2.replyContainer = {'flexDirection': 'row', 'alignItems': 'center', marginLeft: a0.inset,
marginTop: a0.margin};
return object2;
}
function ContentInventoryReplyRow({reactText, onReply}) { // fn#112521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15069:1340, offset: 0x023cf16b, size: 267 bytes, params: 2, frame: 24
const value2 = env0_6();
const replyContainer = value2.replyContainer;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const contentInventoryPressable = value2.contentInventoryPressable;
const contentInventoryContainer = value2.contentInventoryContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/medium" color="input-placeholder-text-default" lineClamp={1} style={value2.contentInventoryText}>{reactText}</Text>;
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
return (
<View style={replyContainer}>
<PressableOpacity
accessibilityRole="button"
onPress={onReply}
style={contentInventoryPressable}
accessibilityLabel={reactText}
pointerEvents="box-only"
>
<View style={contentInventoryContainer}>
{text}
<ReactionIcon style={value2.icon} size="custom" />
</View>
</PressableOpacity>
</View>
);
}
@@ -0,0 +1,23 @@
/* Metro module 14875; source: modules/icymi/native/SeparatorDot.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
function _fun112535(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15072:6, offset: 0x023d066b, size: 240 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 4, 'height': 4};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.backgroundColor = BACKGROUND_MOD_STRONG;
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{separatorDot: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/SeparatorDot.tsx');
exports.default = SeparatorDot;
}
function SeparatorDot() { // fn#112536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15072:358, offset: 0x023d075b, size: 49 bytes, params: 1, frame: 15
const styles = useStyles();
return <View style={[styles.separatorDot]} />;
}
@@ -0,0 +1,244 @@
/* Metro module 10226; source: modules/icymi/native/content_inventory/Badges.tsx; dependencies: [31, 27, 1949, 33, 4501, 697, 10224, 8375, 4573, 566, 8658, 10227, 10229, 1244, 10231, 10233, 9311, 10234, 8653, 672, 2] */
function _fun79527(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:6, offset: 0x01e56770, size: 505 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {icon: {'width': 16, 'height': 16}};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 4,
'backgroundColor': 'rgba(255, 255, 255, 0.08)', 'paddingVertical': null, 'paddingLeft': null,
'paddingRight': 10};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingVertical = PX_4;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingLeft = PX_8;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.badgeContainer = object4;
const CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY = (importDefault(697) /* metro dependency 697: native */).colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
object3.text = {color: CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
const closure = ActiveTimestamp;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/Badges.tsx');
exports.ActiveTimestamp = closure;
exports.GameTimestampBadge = GameTimestampBadge;
exports.MarathonBadge = MarathonBadge;
exports.NewGameBadge = NewGameBadge;
exports.StreakBadge = StreakBadge;
exports.TrendingBadge = TrendingBadge;
exports.ResurrectedBadge = ResurrectedBadge;
exports.TopGameBadge = TopGameBadge;
exports.CustomStatusTimestampBadge = CustomStatusTimestampBadge;
}
function ContentTimestamp({entry}) { // fn#79528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:785, offset: 0x01e56969, size: 202 bytes, params: 2, frame: 21
var r0;
var Text;
var value;
const styles = useStyles();
const isEntryActive2 = (require(8375) /* metro dependency 8375: utils */).isEntryActive(entry);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (isEntryActive2) {
r0 = <ActiveTimestamp entry={entry} />;
} else {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {variant: 'text-sm/medium', style: styles.text};
value = require(8375) /* metro dependency 8375: utils */;
value = <Text {...textProps}>{value.formatEndedTimestamp(entry, Reflect.apply(useStateFromStores, fluxModule,
[[LocaleStore], function() {
return LocaleStore.locale;
}]))}</Text>;
r0 = value;
}
return r0;
}
function BaseBadge({Icon, iconColor, text}) { // fn#79530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:1045, offset: 0x01e56a33, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const icon = <Icon style={styles.icon} color={iconColor} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.badgeContainer}>
{icon}
<Text variant="text-sm/medium" style={styles.text}>
{text}
</Text>
</View>
);
}
function ActiveTimestamp({entry, style}) { // fn#79531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:542, offset: 0x01e56ad4, size: 151 bytes, params: 2, frame: 20
const useTimestampTickedNowModule = require(10224) /* metro dependency 10224: useTimestampTickedNow */;
const useTimestampTickedNow = useTimestampTickedNowModule.useTimestampTickedNow;
const value2 = env0_3.useMemo(_fun79532, [entry, Reflect.apply(useTimestampTickedNow, useTimestampTickedNowModule,
[]).now]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={style}
variant="text-sm/medium"
tabularNumbers
color="text-feedback-positive"
>
{value2}
</Text>
);
}
function GameTimestampBadge({entry}) { // fn#79533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:1385, offset: 0x01e56b9d, size: 211 bytes, params: 2, frame: 21
const styles = useStyles();
const isEntryActive2 = (require(8375) /* metro dependency 8375: utils */).isEntryActive(entry);
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
const r9 = isEntryActive2 ? colors.STATUS_POSITIVE : colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
const GameControllerIcon = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
return (
<View style={styles.badgeContainer}>
<GameControllerIcon style={styles.icon} color={r9} />
<ContentTimestamp entry={entry} />
</View>
);
}
function MarathonBadge({entry}) { // fn#79534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:1697, offset: 0x01e56c70, size: 221 bytes, params: 2, frame: 19
var r6;
var isEntryActive2;
var colors;
var moduleValue3;
var text;
var value2;
const utilsModule = require(8375) /* metro dependency 8375: utils */;
if (utilsModule.isEntryMarathon(entry)) {
isEntryActive2 = utilsModule.isEntryActive(entry);
colors = (importDefault(697) /* metro dependency 697: native */).colors;
r6 = isEntryActive2 ? colors.STATUS_POSITIVE : colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
moduleValue3 = require(8375) /* metro dependency 8375: utils */;
text = moduleValue3.getMarathonDescription(entry).text;
value2 = null;
return value2 == text ? value2 : <BaseBadge Icon={(require(10227) /* metro dependency 10227: TimerIcon */).TimerIcon} iconColor={r6} text={text} />;
}
return null;
}
function NewGameBadge({entry}) { // fn#79535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:2027, offset: 0x01e56d4d, size: 186 bytes, params: 2, frame: 20
var r0;
var object;
var intl;
if ((require(8375) /* metro dependency 8375: utils */).isEntryNew(entry)) {
var baseBadgeProps = {Icon: (require(10229) /* metro dependency 10229: NewUserIcon */).NewUserIcon};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
baseBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.keY6mW);
baseBadgeProps.iconColor = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
r0 = <BaseBadge {...baseBadgeProps} />;
} else {
r0 = null;
}
return r0;
}
function StreakBadge({entry}) { // fn#79536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:2236, offset: 0x01e56e07, size: 215 bytes, params: 2, frame: 21
var r0;
var object;
var intl;
const streakCount = (require(8375) /* metro dependency 8375: utils */).getStreakCount(entry);
if (streakCount == null) {
r0 = null;
} else if (streakCount < 2) {
r0 = null;
} else {
var baseBadgeProps = {Icon: (require(10231) /* metro dependency 10231: FlashIcon */).FlashIcon};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
baseBadgeProps.text = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['Klie/P'],
{days: streakCount});
baseBadgeProps.iconColor = (importDefault(697) /* metro dependency 697: native */).colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
r0 = <BaseBadge {...baseBadgeProps} />;
}
return r0;
}
function TrendingBadge({entry}) { // fn#79537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:2517, offset: 0x01e56ede, size: 231 bytes, params: 2, frame: 20
var r0;
var object;
var intl;
const trendingType = (require(8375) /* metro dependency 8375: utils */).getTrendingType(entry);
if (trendingType == null) {
r0 = null;
} else if (trendingType === (require(10233) /* metro dependency 10233: TrendingType */).TrendingType.TRENDING_TYPE_UNSPECIFIED) {
r0 = null;
} else {
var baseBadgeProps = {Icon: (require(9311) /* metro dependency 9311: FireIcon */).FireIcon};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
baseBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TsWCdW);
baseBadgeProps.iconColor = (importDefault(697) /* metro dependency 697: native */).colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
r0 = <BaseBadge {...baseBadgeProps} />;
}
return r0;
}
function ResurrectedBadge({entry}) { // fn#79538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:2826, offset: 0x01e56fc5, size: 190 bytes, params: 2, frame: 20
var r0;
var object;
var intl;
if ((require(8375) /* metro dependency 8375: utils */).getResurrectedEntryLastPlayTime(entry) == null) {
r0 = null;
} else {
var baseBadgeProps = {Icon: (require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
baseBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.adnLsB);
baseBadgeProps.iconColor = (importDefault(697) /* metro dependency 697: native */).colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
r0 = <BaseBadge {...baseBadgeProps} />;
}
return r0;
}
function TopGameBadge(a0) { // fn#79539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:3090, offset: 0x01e57083, size: 329 bytes, params: 2, frame: 28
const entryDuration = (require(8375) /* metro dependency 8375: utils */).getEntryDuration(a0.entry);
if (entryDuration == null) {
return null;
}
const SDRHgr = (require(1244) /* metro dependency 1244: indexNative */).t.SDRHgr;
const object2 = {};
const TrophyIcon = (require(8653) /* metro dependency 8653: TrophyIcon */).TrophyIcon;
object2.Icon = TrophyIcon;
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/50eHi']), ': '];
const format = intl.format;
const Math = global.Math;
const round = Math.round;
const Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const HOUR = Seconds.HOUR;
items2[2] = Reflect.apply(format, intl, [SDRHgr, {hours: Reflect.apply(round, Math, [entryDuration / HOUR])}]);
object2.text = <>{items2}</>;
const CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY = (importDefault(697) /* metro dependency 697: native */).colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
object2.iconColor = CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
return <BaseBadge {...object2} />;
}
function CustomStatusTimestampBadge({entry}) { // fn#79540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:3486, offset: 0x01e571cc, size: 165 bytes, params: 2, frame: 21
const styles = useStyles();
const TimerIcon = (require(10227) /* metro dependency 10227: TimerIcon */).TimerIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
return (
<View style={styles.badgeContainer}>
<TimerIcon style={styles.icon} color={INTERACTIVE_TEXT_DEFAULT} />
<ContentTimestamp entry={entry} />
</View>
);
}
function _fun79532() { // fn#79532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10412:619, offset: 0x01e56b6b, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(8375) /* metro dependency 8375: utils */;
return value.formatActiveTimestamp(entry, now);
}
@@ -0,0 +1,114 @@
/* Metro module 14871; source: modules/icymi/native/content_inventory/ContentInventoryEntryContainer.tsx; dependencies: [31, 27, 1878, 33, 14815, 697, 477, 9580, 8743, 566, 5278, 14854, 1305, 2] */
function _fun112514(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15068:6, offset: 0x023ce937, size: 228 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(14815) /* metro dependency 14815: createICYMIStyles */;
value = value.createICYMIStyles(_fun112515);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/ContentInventoryEntryContainer.tsx');
exports.default = ContentInventoryEntryContainer;
exports.useStyles = value;
}
function _fun112515(a0, a1) { // fn#112515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15068:187, offset: 0x023cea1b, size: 289 bytes, params: 3, frame: 17
const object2 = {};
const value = 0;
object2.pressable = {marginTop: a1 ? value : a0.margin};
object2.container = {marginHorizontal: a0.margin, paddingBottom: a1 ? value : a0.margin,
paddingTop: a1 ? a0.margin : value};
object2.screenshotContainer = {marginBottom: a0.margin};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.header = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_12,
marginBottom: a0.margin};
const value2 = 1;
object2.headerInfo = {flex: value2};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object2.title = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 6, 'marginBottom': null,
'marginTop': 2, marginBottom: platformUtilsModule.isAndroid() ? -1 : value2};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.subTitleContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
return object2;
}
function ContentInventoryEntryContainer({contentId, userId, children, renderForScreenshot, title, subtitle, type, highlight, onPress}) { // fn#112516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15068:818, offset: 0x023ceb3c, size: 576 bytes, params: 2, frame: 35
var r0;
var PressableHighlight;
var SimplePost;
var object;
var object3;
var items2;
renderForScreenshot = !(renderForScreenshot === undefined) && renderForScreenshot;
highlight = !(highlight === undefined) && highlight;
const env0_3 = onPress;
var value;
const value2 = env0_8(renderForScreenshot);
const value3 = env0_3.useCallback(_fun112517, [contentId, type, userId, onPress]);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
if (user == null) {
r0 = null;
} else {
PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
var pressableHighlightProps2 = {'unstable_pressDelay': 130, 'onPress': null, 'accessibilityRole': 'button',
onPress: value3, style: value2.pressable};
SimplePost = (require(14854) /* metro dependency 14854: ICYMIShared */).SimplePost;
object = {hideDivider: renderForScreenshot, highlight: highlight};
var viewProps = {style: [value2.container, renderForScreenshot && value2.screenshotContainer]};
var viewBinding2Props = {style: value2.header};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = <Avatar animate size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL} user={user} guildId={undefined} key={user.id} />;
items2 = [value];
var viewBinding2Props2 = {style: value2.headerInfo};
value = <View style={value2.title}>{title}</View>;
items2[1] = <View {...viewBinding2Props2}>{value}<View style={value2.subTitleContainer}>{subtitle}</View></View>;
value = <View {...viewBinding2Props}>{items2}</View>;
value = <PressableHighlight {...pressableHighlightProps2}><SimplePost {...object}><View {...viewProps}>{value}{children}</View></SimplePost></PressableHighlight>;
r0 = value;
}
return r0;
}
function _fun112517() { // fn#112517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15068:997, offset: 0x023ced7c, size: 263 bytes, params: 1, frame: 20
var value2;
var defaultImport;
var itemInteracted;
var contentIdBinding;
var typeBinding;
var value3;
var defaultImport4;
var defaultImport5;
if (onPress != null) {
value3 = environment.__proto__;
defaultImport4 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
itemInteracted = defaultImport4.itemInteracted;
contentIdBinding = contentId;
typeBinding = type;
Reflect.apply(itemInteracted, defaultImport4, [contentIdBinding, typeBinding, 'press']);
defaultImport5 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
defaultImport5.feedItemActioned({itemId: contentIdBinding, itemType: typeBinding,
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_container',
'actionIntentType': 'open', 'actionDestinationType': null}});
onPress();
} else {
value2 = environment.__proto__;
defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
itemInteracted = defaultImport.itemInteracted;
contentIdBinding = contentId;
typeBinding = type;
Reflect.apply(itemInteracted, defaultImport, [contentIdBinding, typeBinding, 'open_profile']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: contentIdBinding,
itemType: typeBinding, actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'item_container',
'actionIntentType': 'open', 'actionDestinationType': 'user'}});
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: userId});
}
}
@@ -0,0 +1,19 @@
/* Metro module 14873; source: modules/icymi/native/content_inventory/CustomStatusEntryRow.tsx; dependencies: [31, 33, 14869, 14874, 2] */
function _fun112522(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15070:6, offset: 0x023cf276, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/CustomStatusEntryRow.tsx');
exports.default = CustomStatusEntryRow;
}
function CustomStatusEntryRow({content, renderForScreenshot, visible}) { // fn#112523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15070:225, offset: 0x023cf300, size: 170 bytes, params: 2, frame: 19
const {openEmojiPicker,
openReplyActionSheet} = (require(14869) /* metro dependency 14869: useReplyActions */).useReplyActions({content: content});
return ((Component) => <Component id={content.id} userId={content.author_id} customStatusExtra={content.extra} renderForScreenshot={renderForScreenshot} visible={visible} variant={{kind: 'otherUserStatus',
handlePressPrimary: openReplyActionSheet,
handlePressSecondary: openEmojiPicker}} />)(importDefault(14874) /* metro dependency 14874: ICYMICustomStatusRow */);
}
@@ -0,0 +1,243 @@
/* Metro module 14864; source: modules/icymi/native/content_inventory/GamingLikeEntryRow.tsx; dependencies: [31, 27, 1878, 33, 10226, 8375, 10233, 14815, 697, 566, 4635, 8699, 6777, 8373, 9953, 9963, 8370, 14865, 1962, 9580, 5080, 14869, 1244, 14871, 4573, 3995, 4788, 21, 674, 5278, 5475, 14872, 2] */
function _fun112406(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:6, offset: 0x023ca18d, size: 448 bytes, params: 8, frame: 20
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
object2 = {};
const NewGameBadge = (importAll(10226) /* metro dependency 10226: Badges */).NewGameBadge;
object2.Badge = NewGameBadge;
object2.predicate = (require(8375) /* metro dependency 8375: utils */).isEntryNew;
const items2 = [object2];
const StreakBadge = (importAll(10226) /* metro dependency 10226: Badges */).StreakBadge;
items2[1] = {Badge: StreakBadge, predicate: predicate_112407};
const TrendingBadge = (importAll(10226) /* metro dependency 10226: Badges */).TrendingBadge;
items2[2] = {Badge: TrendingBadge, predicate: predicate_112408};
const ResurrectedBadge = (importAll(10226) /* metro dependency 10226: Badges */).ResurrectedBadge;
items2[3] = {Badge: ResurrectedBadge, predicate: function() {
return true;
}};
const MarathonBadge = (importAll(10226) /* metro dependency 10226: Badges */).MarathonBadge;
items2[4] = {Badge: MarathonBadge, predicate: predicate_112410};
const env0_11 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112411);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/GamingLikeEntryRow.tsx');
exports.default = GamingLikeEntryRow;
}
function predicate_112407(a0) { // fn#112407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:269, offset: 0x023ca34d, size: 62 bytes, params: 2, frame: 11
let value = require(8375) /* metro dependency 8375: utils */;
value = value.getStreakCount(a0);
return (value ?? 0) >= 2;
}
function predicate_112408(a0) { // fn#112408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:371, offset: 0x023ca38b, size: 86 bytes, params: 2, frame: 14
const trendingType = (require(8375) /* metro dependency 8375: utils */).getTrendingType(a0);
return trendingType != null && trendingType !== (require(10233) /* metro dependency 10233: TrendingType */).TrendingType.TRENDING_TYPE_UNSPECIFIED;
}
function predicate_112410(a0) { // fn#112410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:566, offset: 0x023ca3e1, size: 47 bytes, params: 2, frame: 11
let value = require(8375) /* metro dependency 8375: utils */;
value = value.isEntryMarathon(a0);
return value === true;
}
function _fun112411(a0) { // fn#112411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:632, offset: 0x023ca410, size: 299 bytes, params: 2, frame: 16
const object4 = {};
const object5 = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center'};
object5.gap = a0.margin;
object5.padding = a0.margin;
object5.marginLeft = a0.inset;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
const shadows = (importDefault(697) /* metro dependency 697: native */).shadows;
const SHADOW_HIGH = shadows.SHADOW_HIGH;
copyDataProperties(object5, SHADOW_HIGH, shadows);
object4.card = object5;
object4.cardInnerContainer = {'overflow': 'hidden', 'flex': 1};
const object6 = {'width': 72, 'height': 72};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.image = object6;
const CONTENT_INVENTORY_OVERLAY_TEXT_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.CONTENT_INVENTORY_OVERLAY_TEXT_PRIMARY;
object4.gameName = {maxWidth: 275, color: CONTENT_INVENTORY_OVERLAY_TEXT_PRIMARY};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.badges = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'flexWrap': 'wrap',
'alignItems': 'center', 'marginTop': 6, gap: PX_8};
return object4;
}
function GamingLikeEntryRow({content, renderForScreenshot}) { // fn#112412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:1261, offset: 0x023ca53b, size: 1734 bytes, params: 2, frame: 47
var object4;
var r11;
var object2;
var ContentInventoryReplyRow;
var ghWi8V;
var object3;
const value3 = env0_11();
const application_id = content.extra.application_id;
const author_id = content.author_id;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(author_id);
});
const value5 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: author_id})});
const value6 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(application_id);
const primaryColor = (importDefault(8373) /* metro dependency 8373: useHeroColors */)(value6?.getIconURL(72)).primaryColor;
const iconURL = value6?.getIconURL(240);
const defaultImport2 = importDefault(9953) /* metro dependency 9953: useOpenGameProfileModal */;
object4 = {location: 'ICYMI Activity Card', applicationId: application_id};
const GameProfileSources = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources;
const ActivityCard = GameProfileSources.ActivityCard;
object4.source = ActivityCard;
object4.trackEntryPointImpression = true;
object4.sourceUserId = author_id;
const value10 = defaultImport2(object4);
const binding = env0_4;
const value11 = binding.useCallback(_fun112414, [value10]);
const value12 = binding.useMemo(_fun112415, [content]);
const value13 = binding.useCallback(_fun112417, [content]);
const useReplyActionsModule = require(14869) /* metro dependency 14869: useReplyActions */;
const useReplyActions = useReplyActionsModule.useReplyActions;
const openReplyActionSheet = Reflect.apply(useReplyActions, useReplyActionsModule,
[{content: content}]).openReplyActionSheet;
const value14 = binding.useCallback(_fun112420, [content, openReplyActionSheet]);
if (value6 == null) {
return null;
}
if (user == null) {
return null;
}
if (iconURL == null) {
return null;
}
const isEntryActive2 = (require(8375) /* metro dependency 8375: utils */).isEntryActive(content);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r8 = isEntryActive2 ? Reflect.apply(string, intl, [t.Gk1P8Z]) : Reflect.apply(string, intl, [t.ktOTRQ]);
const ContentInventoryEntryContainer = importDefault(14871) /* metro dependency 14871: ContentInventoryEntryContainer */;
object4 = {contentId: content.id, userId: content.author_id, type: 'hotwheels_gaming_activity',
renderForScreenshot: renderForScreenshot, onPress: value14};
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let r9 = value5 != null ? {fontFamily: value5} : undefined;
const text = <Text variant="text-md/semibold" color="mobile-text-heading-primary" style={r9}>{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user)}</Text>;
const notificationCenterUtilsModule = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
const getRelativeTimestamp = notificationCenterUtilsModule.getRelativeTimestamp;
const defaultImport5 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
object4.title = <>{text}<Text lineClamp={1} variant="text-xs/normal" color="text-muted">{Reflect.apply(getRelativeTimestamp,
notificationCenterUtilsModule, [defaultImport5.extractTimestamp(content.id)])}</Text></>;
object4.subtitle = <Text variant="text-sm/normal" lineClamp={1} color={(require(8375) /* metro dependency 8375: utils */).isEntryActive(content) ? 'status-positive' : 'text-default'}>{r8}</Text>;
const items2 = [value3.card];
if (primaryColor != null) {
object2 = {};
object2.backgroundColor = (importDefault(674) /* metro dependency 674 */)(primaryColor).alpha(0.5).hex();
r11 = object2;
} else {
r11 = null;
}
items2[1] = r11;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
let formatToPlainString = intl.formatToPlainString;
const view = <View style={items2}><PressableOpacity onPress={value11} disabled={value10 == null} accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['9sZWVp'],
{gameName: value6.name}])}>{((Component) => <Component source={{uri: iconURL}} style={value3.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity><View style={value3.cardInnerContainer}><PressableOpacity onPress={value11} disabled={value10 == null} accessibilityRole="button" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9sZWVp'],
{gameName: value6.name})}><Text variant="text-md/semibold" style={value3.gameName}>{value6.name}</Text></PressableOpacity>{value12 != null && value12.length > 0 && <View style={value3.badges}>{value12}</View>}</View></View>;
if (renderForScreenshot) {
r9 = null;
} else {
ContentInventoryReplyRow = (require(14872) /* metro dependency 14872: ReplyRow */).ContentInventoryReplyRow;
formatToPlainString = intl.formatToPlainString;
ghWi8V = (require(1244) /* metro dependency 1244: indexNative */).t.ghWi8V;
object3 = {};
object3.username = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
r9 = <ContentInventoryReplyRow reactText={Reflect.apply(formatToPlainString, intl, [ghWi8V,
object3])} onReply={openReplyActionSheet} onForward={value13} />;
}
return (
<ContentInventoryEntryContainer {...object4}>
<View>
{view}
{r9}
</View>
</ContentInventoryEntryContainer>
);
}
function _fun112415() { // fn#112415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:1851, offset: 0x023cac01, size: 164 bytes, params: 1, frame: 17
var r0;
var value;
const content_type = content.content_type;
const ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
const TOP_GAME = ContentInventoryEntryType.TOP_GAME;
if (content_type === TOP_GAME) {
r0 = [((TopGameBadge) => <TopGameBadge entry={content} key="topgame" />)((importAll(10226) /* metro dependency 10226: Badges */).TopGameBadge)];
} else {
value = env1_10.map(_fun112416);
value = value.filter(global.Boolean);
r0 = value;
}
return r0;
}
function _fun112417() { // fn#112417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:2067, offset: 0x023cace7, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[18]);
value = value(dependencyMap[17], dependencyMap.paths);
value.then(_fun112418);
}
function _fun112420() { // fn#112420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:2606, offset: 0x023cae0f, size: 128 bytes, params: 1, frame: 21
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const contentBinding = content;
Reflect.apply(itemInteracted, value, [contentBinding.id, 'hotwheels_gaming_activity', 'press']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: contentBinding.id,
itemType: 'hotwheels_gaming_activity', actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'item_container', 'actionIntentType': 'open', 'actionDestinationType': null}});
openReplyActionSheet();
}
function _fun112416({Badge, predicate}) { // fn#112416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:1969, offset: 0x023caca5, size: 66 bytes, params: 2, frame: 16
const value = environment.__proto__;
return predicate(content) ? <Badge entry={content} key={Badge.name} /> : null;
}
function _fun112418({GameShareModal}) { // fn#112418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15061:2102, offset: 0x023cad27, size: 205 bytes, params: 2, frame: 22
var environment;
var value;
var itemInteracted;
var value2;
var contentBinding;
var id;
var feedItemActioned;
if (GameShareModal != null) {
value = environment.__proto__.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
itemInteracted = value.itemInteracted;
value2 = environment.__proto__;
contentBinding = content;
id = contentBinding.id;
Reflect.apply(itemInteracted, value, [id, 'hotwheels_gaming_activity', 'press_forward']);
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
feedItemActioned = value.feedItemActioned;
id = contentBinding.id;
Reflect.apply(feedItemActioned, value, [{itemId: id, itemType: 'hotwheels_gaming_activity',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'forward_button',
'actionIntentType': 'share', 'actionDestinationType': null}}]);
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.pushLazy(function() {
var Promise = global.Promise;
return Promise.resolve(GameShareModal);
}, {content: contentBinding}, 'GameShareModal', {presentation: 'modal'});
}
}
@@ -0,0 +1,364 @@
/* Metro module 14874; source: modules/icymi/native/content_inventory/ICYMICustomStatusRow.tsx; dependencies: [57, 31, 27, 1878, 9569, 33, 697, 4501, 14815, 1305, 11158, 4573, 1244, 7701, 4000, 566, 4635, 8699, 8852, 477, 5278, 4071, 9646, 11209, 7950, 21, 672, 14871, 3995, 4788, 14875, 7599, 2] */
function _fun112524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:6, offset: 0x023cf3aa, size: 334 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
const env0_11 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
return {background: {backgroundColor: a0, overflow: 'hidden'}};
});
const env0_13 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112527);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/ICYMICustomStatusRow.tsx');
exports.default = GravityCustomStatusEntryRow;
}
function UploadPlaceholder() { // fn#112525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:1618, offset: 0x023cf4f8, size: 234 bytes, params: 1, frame: 22
const uploadContainer = env0_13(false).uploadContainer;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11158) /* metro dependency 11158 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const SMALL = IconSizes.SMALL;
iconProps.size = SMALL;
const icon = <Icon {...iconProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={uploadContainer}>
{icon}
<Text variant="text-md/normal" color="text-strong">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3UB9ad'])}
</Text>
</View>
);
}
function _fun112527(a0, a1) { // fn#112527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:323, offset: 0x023cf5fd, size: 664 bytes, params: 3, frame: 20
const object2 = {};
const PX_40 = a1 ? 56 : (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object2.bubbles = {position: 'absolute', top: PX_40};
const object5 = {'marginLeft': 32, 'borderRadius': null, 'height': 12, 'width': 12, 'overflow': 'hidden'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.middleBubble = object5;
const object6 = {'marginLeft': 44, 'marginTop': -4, 'borderRadius': null, 'height': 32, 'width': 32,
'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.bottomBubble = object6;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.title = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
object2.timestamp = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 6};
object2.cardContainer = {position: 'relative', marginLeft: a0.inset};
const object8 = {'gap': null, 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
'borderRadius': null, 'width': '100%', 'zIndex': 1};
let margin = a0.margin;
object8.gap = margin;
object8.padding = a0.margin;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object8.marginBottom = a1 ? 0 : 17;
object8.overflow = 'hidden';
object2.card = object8;
margin = a0.margin;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.textOnly = {paddingVertical: margin + PX_12};
object2.emojiTextContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
gap: a0.margin};
object2.emojiText = {flexShrink: 1};
object2.leftAlign = {justifyContent: 'flex-start'};
const object9 = {'marginHorizontal': null, 'marginBottom': null, 'alignItems': 'center', 'justifyContent': 'center',
'minHeight': null, 'width': '100%', 'borderStyle': 'dashed'};
object9.marginHorizontal = a0.margin;
object9.marginBottom = a0.margin;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object9.minHeight = PX_48;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object9.borderColor = BORDER_STRONG;
object9.borderWidth = 1;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.gap = PX_4;
object9.flexDirection = 'row';
object2.uploadContainer = object9;
const object10 = {'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null, 'height': 28,
'width': 40};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.buttonIcon = object10;
return object2;
}
function GravityCustomStatusEntryRow({id, userId, customStatusExtra, renderForScreenshot, variant}) { // fn#112528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:1995, offset: 0x023cf895, size: 2519 bytes, params: 2, frame: 50
var object6;
var r11;
var r24;
var r26;
var r13;
var defaultImport2;
var object2;
var isAndroid2;
var value13;
var animated;
var moduleValue9;
var getRelativeTimestamp;
var defaultImport6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object3;
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
var RoundedRect;
var width;
var space;
var PX_16;
var height;
var radii;
var md;
var items8;
var object4;
const env0_3 = variant;
const value3 = env0_13(renderForScreenshot);
const env0_4 = value3;
const styles = useStyles((require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom()?.backgroundColor ?? (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const value6 = colorUtilsModule.hexWithOpacity(styles.background.backgroundColor, 0.6);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
object6 = {id: customStatusExtra.emoji_id?.toString() === '0' ? null : customStatusExtra.emoji_id,
name: customStatusExtra.emoji_name ?? '', animated: customStatusExtra.emoji_animated};
const value10 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: userId})});
let r22 = customStatusExtra.status != null && customStatusExtra.status.length > 0;
if (object6.id != null) {
defaultImport2 = importDefault(8852) /* metro dependency 8852: ActivityEmoji */;
object2 = {};
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
value13 = 40;
r11 = isAndroid2 ? 36 : value13;
object2.lineHeight = r11;
object2.fontSize = 36;
r11 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 0 : 4;
object2.marginTop = r11;
animated = object6.animated;
r24 = ((Component) => <Component style={object2} size={value13} animate={animated != null && animated} emoji={object6} />)(defaultImport2);
} else if (object6.name.length === 0) {
r24 = null;
} else {
defaultImport2 = importDefault(8852) /* metro dependency 8852: ActivityEmoji */;
object2 = {};
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
value13 = 40;
r11 = isAndroid2 ? 36 : value13;
object2.lineHeight = r11;
object2.fontSize = 36;
r11 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 0 : 4;
object2.marginTop = r11;
animated = object6.animated;
r24 = ((Component) => <Component style={object2} size={value13} animate={animated != null && animated} emoji={object6} />)(defaultImport2);
}
const user2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
const binding = env0_4;
const [property, env0_7] = env0_3(binding.useState({'width': 0, 'height': 0}), 2);
const useMemo = binding.useMemo;
const hasStatus = Reflect.apply(useMemo, binding, [function() {
return variant.kind === 'ownStatus' ? {hasStatus: variant.hasStatus} : {hasStatus: true};
}, [variant]]).hasStatus;
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], _fun112532, [id]);
const value22 = binding.useMemo(_fun112533, [styles.background, value6, renderForScreenshot, value3.buttonIcon,
variant.handlePressPrimary, variant.handlePressSecondary, variant.kind]);
if (user == null) {
return null;
}
const r29 = variant.kind === 'otherUserStatus' && (importDefault(21) /* metro dependency 21: SnowflakeUtils */).age(id) < 30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.MINUTE;
const ContentInventoryEntryContainer = importDefault(14871) /* metro dependency 14871: ContentInventoryEntryContainer */;
object6 = {contentId: id, userId: userId, type: 'hotwheels_custom_status', renderForScreenshot: renderForScreenshot};
const title = value3.title;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/semibold" color="mobile-text-heading-primary" style={value10 != null ? {fontFamily: value10} : undefined}>{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user2)}</Text>;
const timestamp = value3.timestamp;
if (hasStatus) {
moduleValue9 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
getRelativeTimestamp = moduleValue9.getRelativeTimestamp;
defaultImport6 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r26 = <Text lineClamp={1} variant="text-sm/normal" color="text-muted">{Reflect.apply(getRelativeTimestamp,
moduleValue9, [defaultImport6.extractTimestamp(id)])}</Text>;
} else {
r26 = hasStatus;
}
const items3 = [r26];
items3[1] = r29 ? ((Component) => <Component />)(importDefault(14875) /* metro dependency 14875: SeparatorDot */) : null;
items3[2] = r29 ? <Text lineClamp={1} variant="text-sm/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tWnHcL)}</Text> : null;
object6.title = <View style={title}>{text}<View style={timestamp}>{items3}</View></View>;
object6.subtitle = variant.kind !== 'otherUserStatus' ? null : <Text variant="text-sm/normal" lineClamp={1} color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fxOLPR)}</Text>;
object6.highlight = value21;
const value32 = ((Component) => <Component cutouts={[]} style={value3.bubbles}><View style={[value3.middleBubble,
styles.background]} /><View style={[value3.bottomBubble,
styles.background]} /></Component>)(importDefault(7599) /* metro dependency 7599: ClipView */);
const cardContainer = value3.cardContainer;
const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
if (renderForScreenshot) {
r13 = [];
} else {
object3 = {};
RoundedRect = CutoutShape.RoundedRect;
object3.shape = RoundedRect;
width = property.width;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object3.x = width - PX_16 - 40 - 3;
height = property.height;
object3.y = height - 14 - 3;
object3.width = 46;
object3.height = 34;
radii = (importDefault(697) /* metro dependency 697: native */).radii;
md = radii.md;
object3.cornerRadius = md + 3;
items8 = [object3];
object4 = {};
RoundedRect = CutoutShape.RoundedRect;
object4.shape = RoundedRect;
width = property.width;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.x = width - PX_16 - 86 - PX_8;
height = property.height;
object4.y = height - 14 - 3;
object4.width = 46;
object4.height = 34;
radii = (importDefault(697) /* metro dependency 697: native */).radii;
md = radii.md;
object4.cornerRadius = md + 3;
items8[1] = object4;
r13 = items8;
}
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps2 = {onLayout: onLayout_112534, onPress: variant.handlePressPrimary,
underlayColor: value6, style: [value3.card, styles.background, r24 == null ? value3.textOnly : null]};
const items11 = [value3.emojiTextContainer];
const items12 = [r24];
r22 = r22 && <Text style={value3.emojiText} variant="text-md/normal">{customStatusExtra.status}</Text>;
items12[1] = r22;
const value35 = !hasStatus;
items12[2] = hasStatus ? value35 : <Text variant="text-md/normal">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ojWO0'])}</Text>;
return (
<ContentInventoryEntryContainer {...object6}>
{value32}
<View style={cardContainer}>
<ClipView cutouts={r13}>
<PressableHighlight {...pressableHighlightProps2}>
<View style={items11}>
{items12}
</View>
{hasStatus ? value35 : <UploadPlaceholder />}
</PressableHighlight>
</ClipView>
{value22}
</View>
</ContentInventoryEntryContainer>
);
}
function _fun112532() { // fn#112532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:3032, offset: 0x023d02a3, size: 44 bytes, params: 1, frame: 10
return ICYMIStore.notificationItem() != null && environment.__proto__.id === id;
}
function _fun112533() { // fn#112533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:3109, offset: 0x023d02cf, size: 861 bytes, params: 1, frame: 33
var r1;
var r0;
var variantBinding;
var value3;
var jsxRuntimeEnv1_10Binding;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
var object;
var binding;
var buttonIcon;
var items7;
var background;
var space;
var PX_16;
var items2;
var items3;
var value5;
var object3;
var items4;
var items5;
var items6;
var value;
if (renderForScreenshot) {
r0 = null;
} else {
if (variant.kind === 'ownStatus') {
value5 = environment.__proto__;
jsxRuntimeEnv1_10Binding = jsxRuntimeEnv1_10;
object3 = {};
variantBinding = variant;
object3.onPress = variantBinding.handlePressSecondary;
object3.underlayColor = env0_6;
binding = env0_4;
buttonIcon = binding.buttonIcon;
items4 = [buttonIcon];
background = styles.background;
items4[1] = background;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
items4[2] = {'position': 'absolute', 'right': null, 'bottom': 3, right: PX_16};
object3.style = items4;
items5 = [<PressableHighlight {...object3}>{((TrashIcon) => <TrashIcon size="xs" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)}</PressableHighlight>];
var pressableHighlightProps = {onPress: variantBinding.handlePressPrimary, underlayColor: env0_6};
buttonIcon = binding.buttonIcon;
items6 = [buttonIcon];
background = styles.background;
items6[1] = background;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
value = PX_16 + 3;
items6[2] = {'position': 'absolute', 'right': null, 'bottom': 3, right: value + PX_8 + 40};
pressableHighlightProps.style = items6;
items5[1] = <PressableHighlight {...pressableHighlightProps}>{((PencilIcon) => <PencilIcon size="xs" />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)}</PressableHighlight>;
value = <>{items5}</>;
r1 = value;
} else {
value3 = environment.__proto__;
jsxRuntimeEnv1_10Binding = jsxRuntimeEnv1_10;
object = {};
variantBinding = variant;
object.onPress = variantBinding.handlePressPrimary;
object.underlayColor = env0_6;
binding = env0_4;
buttonIcon = binding.buttonIcon;
items7 = [buttonIcon];
background = styles.background;
items7[1] = background;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
items7[2] = {'position': 'absolute', 'right': null, 'bottom': 3, right: PX_16};
object.style = items7;
items2 = [<PressableHighlight {...object}>{((ArrowAngleLeftUpIcon) => <ArrowAngleLeftUpIcon size="xs" />)((require(11209) /* metro dependency 11209: ArrowAngleLeftUpIcon */).ArrowAngleLeftUpIcon)}</PressableHighlight>];
var pressableHighlightProps = {onPress: variantBinding.handlePressSecondary, underlayColor: env0_6};
buttonIcon = binding.buttonIcon;
items3 = [buttonIcon];
background = styles.background;
items3[1] = background;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
value = PX_16 + 3;
items3[2] = {'position': 'absolute', 'right': null, 'bottom': 3, right: value + PX_8 + 40};
pressableHighlightProps.style = items3;
items2[1] = <PressableHighlight {...pressableHighlightProps}>{((ReactionIcon) => <ReactionIcon size="xs" />)((require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon)}</PressableHighlight>;
value = <>{items2}</>;
r1 = value;
}
r0 = r1;
}
return r0;
}
function GravityCustomStatusEntryRowOnLayout(a0) { // fn#112534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15071:5582, owner: GravityCustomStatusEntryRow.onLayout, offset: 0x023d062c, size: 63 bytes, params: 2, frame: 12
env0_7({width: a0.nativeEvent.layout.width, height: a0.nativeEvent.layout.height});
}
@@ -0,0 +1,364 @@
/* Metro module 14870; source: modules/icymi/native/content_inventory/ReactActionSheet.tsx; dependencies: [5, 57, 31, 27, 6276, 1881, 33, 1244, 4501, 697, 8529, 7152, 5278, 7950, 8370, 9580, 8533, 4003, 7701, 1478, 6805, 4573, 14867, 7704, 3963, 3868, 14863, 5475, 1423, 7981, 3995, 8341, 4058, 13678, 14816, 2] */
function _fun112494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:6, offset: 0x023cd706, size: 700 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const env0_8 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
let value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {header: {'width': '100%', 'display': 'flex', 'alignItems': 'center', 'padding': 8}};
object2.container = {gap: 12};
const object4 = {'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 1};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object4.borderColor = BORDER_STRONG;
object2.preview = object4;
object2.loading = {opacity: 0.5};
object2.base = {position: 'relative'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.contentContainer = {backgroundColor: BACKGROUND_BASE_LOW};
object2.inputRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
const object5 = {flex: 1};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.input = object5;
object2.emojis = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
object2.submitting = {opacity: 0.6};
const object6 = {padding: 8};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object6.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object2.emoji = object6;
object2.defaultEmoji = {'width': 24, 'height': 24};
object2.emojiImage = {'resizeMode': 'contain', 'width': 24, 'height': 24};
object2.emojiText = {'lineHeight': 24, 'fontSize': 20, 'textAlign': 'center', 'paddingTop': 2};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/ReactActionSheet.tsx');
exports.default = ReactActionSheet;
exports.getStatusReplyContent = getStatusReplyContent;
}
function AddEmojiButton_112495({channel, onOpenPicker, onPressEmoji, disabled}) { // fn#112495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:1066, offset: 0x023cd9c2, size: 255 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = env0_5.useCallback(function() {
onOpenPicker();
var moduleValue = require(dependencyMap[10]);
var object = {'pickerIntention': null, 'autoFocus': false, 'startExpanded': false};
object.pickerIntention = EmojiIntention.REACTION;
object.onPressEmoji = onPressEmoji;
object.channel = channel;
object.reactionType = require(dependencyMap[11]).ReactionTypes.NORMAL;
moduleValue.openEmojiPickerActionSheet(object);
}, [channel, onPressEmoji, onOpenPicker]);
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const items2 = [styles.emoji];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const lfIHs4 = (require(1244) /* metro dependency 1244: indexNative */).t.lfIHs4;
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
return (
<PressableHighlight
onPress={value2}
style={items2}
accessible
accessibilityLabel={Reflect.apply(string, intl, [lfIHs4])}
disabled={disabled}
>
<ReactionIcon size="md" />
</PressableHighlight>
);
}
function ReactActionSheetBase({content, author, channel, onPressEmoji, sendMessage}) { // fn#112497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:1549, offset: 0x023cdb3e, size: 1921 bytes, params: 2, frame: 56
var object3;
var r6;
var r11;
var r8;
var value6;
var value7;
var value8;
var value9;
var jsxRuntimeEnv0_11Binding;
var items7;
var TextInput;
var formatToPlainString;
var m3dK5W;
var object2;
var items8;
var value;
const styles = useStyles();
const env0_3 = styles;
const value3 = env0_4(env0_5.useState(false), 2);
const property = value3[0];
var env0_4 = property;
var env0_5 = value3[1];
const value4 = 'unknown';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value5 = Reflect.apply(string, intl, [t['5IEsGx']]);
const content_type = content.content_type;
const ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
const TOP_GAME = ContentInventoryEntryType.TOP_GAME;
if (TOP_GAME === content_type) {
value8 = 'hotwheels_gaming_activity';
value9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XC5YE5);
r6 = value8;
r11 = value9;
} else if ((require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType.PLAYED_GAME === content_type) {
value8 = 'hotwheels_gaming_activity';
value9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XC5YE5);
r6 = value8;
r11 = value9;
} else if ((require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType.CUSTOM_STATUS !== content_type) {
r6 = value4;
r11 = value5;
} else {
value6 = 'hotwheels_custom_status';
value7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.umDRYM);
r6 = value6;
r11 = value7;
}
const [property2, property3] = env0_4(env0_5.useState(''), 2);
const value13 = env0_5.useRef(null);
const [property4, env0_10] = env0_4(env0_5.useState(null), 2);
env0_5.useEffect(function() {
global.setTimeout(_fun112499, 500);
}, []);
const value17 = env0_5.useCallback(env0_3(_fun112502), [content.id, r6, property2, sendMessage]);
const value19 = env0_5.useCallback(_fun112503(), [content.id, r6, onPressEmoji]);
const value20 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useFrequentlyUsedReactionEmojis(null);
const value21 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const value22 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const value23 = env0_5.useMemo(_fun112507,
[(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object3 = {};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
object3.header = <View style={styles.header}><Text variant="heading-lg/semibold" color="mobile-text-heading-primary">{r11}</Text></View>;
const items2 = [styles.preview];
items2[1] = property4 == null ? styles.loading : null;
const defaultImport = importDefault(14867) /* metro dependency 14867 */;
const ThemedGradient = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
const {LEVEL_7, LEVEL_8} = (require(3963) /* metro dependency 3963: ClientThemesUtils */).OverlayOpacity;
const themedGradient = <ThemedGradient absolute wide tall mix mixAmount={{dark: LEVEL_7, light: LEVEL_8}} />;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const view = <View style={items2}>{((Component) => <Component ref={value13} options={{'fileName': 'icymi_content',
'format': 'png',
'quality': 1}}><View style={styles.base}>{themedGradient}<ThemeContextProvider gradient={value21}><View style={[styles.contentContainer,
value22]}>{((Component) => <Component content={content} renderForScreenshot />)(importDefault(14863) /* metro dependency 14863: ContentInventoryEntryRow */)}</View></ThemeContextProvider></View></Component>)(defaultImport)}</View>;
if (property4 != null) {
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
items7 = [<View style={[styles.emojis, property ? styles.submitting : null]}>{value20.slice(0,
value23 - 1).map(_fun112508)}<AddEmojiButton_112495 onOpenPicker={onOpenPicker} channel={channel} onPressEmoji={value19} disabled={property} /></View>];
var viewBinding6Props = {style: styles.inputRow};
TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
var textInputProps = {'containerStyle': null, 'grow': true, 'isRound': true, containerStyle: styles.input};
formatToPlainString = intl.formatToPlainString;
m3dK5W = t.m3dK5W;
object2 = {};
object2.username = (require(3995) /* metro dependency 3995: UserUtils */).getName(author);
textInputProps.placeholder = Reflect.apply(formatToPlainString, intl, [m3dK5W, object2]);
textInputProps.value = property2;
textInputProps.onChange = property3;
textInputProps.isDisabled = property;
items8 = [<TextInput {...textInputProps} />];
items8[1] = ((IconButton) => <IconButton accessibilityLabel={intl.string(t.oeb1vg)} icon={((SendMessageIcon) => <SendMessageIcon size="md" color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} />)((require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon)} size="md" onPress={value17} disabled={property2.length === 0} loading={property} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton);
items7[1] = <View {...viewBinding6Props}>{items8}</View>;
r8 = <>{items7}</>;
} else {
value = importDefault(13678) /* metro dependency 13678: LoadingIndicator */;
value = ((Component) => <Component />)(value);
r8 = value;
}
return (
<ActionSheet {...object3}>
<View style={styles.container}>
{view}
{r8}
</View>
</ActionSheet>
);
}
function ReactActionSheet(a0) { // fn#112512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:5319, offset: 0x023ce74a, size: 109 bytes, params: 2, frame: 19
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const value = copyDataProperties({}, a0, undefined, undefined);
const ICYMIContextProvider = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContextProvider;
return (
<ICYMIContextProvider>
<ReactActionSheetBase {...value} />
</ICYMIContextProvider>
);
}
function getStatusReplyContent({reply, username, status, emojiStr, attachments, isForward}) { // fn#112513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:5460, offset: 0x023ce7b7, size: 384 bytes, params: 2, frame: 26
var value;
isForward = !(isForward === undefined) && isForward;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r8 = isForward ? Reflect.apply(formatToPlainString, intl, [t.S5JNyW,
{username: username}]) : Reflect.apply(formatToPlainString, intl, [t.XPQgL2, {username: username}]);
const items = [];
items.push('> -# *' + r8 + '*');
if (status.length > 0 || emojiStr.length > 0) {
items.push('> ' + emojiStr + ' ' + status);
}
if (attachments != null) {
if (attachments.length > 0) {
value = intl.formatToPlainString(t['JiNPo+'], {attachmentsCount: attachments.length});
value = '> -# *' + value + '*';
items.push(value);
}
}
items.push(reply);
return items.join('\n');
}
function _fun112498() { // fn#112498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:2183, offset: 0x023ce2bf, size: 33 bytes, params: 1, frame: 13
global.setTimeout(_fun112499, 500);
}
function* _fun112502() { // fn#112502, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:2326, offset: 0x023ce343, size: 197 bytes, params: 1, frame: 22
if (true) {
value = environment.__proto__;
env1_5(true);
var binding = env2_1;
var binding2 = env2_2;
var value4 = binding(binding2[15]);
value4.itemInteracted(require.id, View, 'press_reply_send');
binding(binding2[15]).feedItemActioned({itemId: require.id, itemType: View,
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'reply_button',
'actionIntentType': 'reply', 'actionDestinationType': null}});
yield dependencyMap(ACTION_SHEET_MAX_WIDTH);
if (false) {
return undefined;
}
env1_5(false);
EmojiIntention('');
}
}
function _fun112503() { // fn#112503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:2635, offset: 0x023ce408, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun112505);
return _fun112506;
}
function _fun112507() { // fn#112507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:3134, offset: 0x023ce4ee, size: 59 bytes, params: 1, frame: 14
let Math = global.Math;
const min = Math.min;
const widthBinding = width;
let value = environment.__proto__;
value = Reflect.apply(min, Math, [widthBinding, ACTION_SHEET_MAX_WIDTH]);
Math = global.Math;
return Math.floor(value / 52);
}
function _fun112508(a0) { // fn#112508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:3950, offset: 0x023ce529, size: 400 bytes, params: 2, frame: 24
var environment;
var r0;
var value;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
var object2;
var stylesBinding;
var object3;
var defaultImport;
var getEmojiURL;
const env0_0 = a0;
let id = a0.id;
if (id != null) {
value = environment.__proto__;
object2 = {onPress: onPress_112509};
stylesBinding = styles;
object2.style = stylesBinding.emoji;
object2.disabled = env0_4;
value = importDefault(5475) /* metro dependency 5475: FastImage */;
var valueProps = {style: [stylesBinding.defaultEmoji, stylesBinding.emojiImage]};
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
id = a0.id;
valueProps.source = {uri: Reflect.apply(getEmojiURL, defaultImport, [{id: id, animated: a0.animated,
size: 48}])};
id = a0.id;
value = <PressableHighlight {...object2}>{((Component) => <Component {...valueProps} key={id} />)(value)}</PressableHighlight>;
r0 = value;
} else {
value = environment.__proto__;
stylesBinding = styles;
value = <PressableHighlight onPress={onPress_112510} style={stylesBinding.emoji} disabled={env0_4}>{((Text) => <Text variant="text-md/medium" color="interactive-text-default" style={[stylesBinding.defaultEmoji,
stylesBinding.emojiText]} allowFontScaling={false}>{a0.surrogates}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableHighlight>;
r0 = value;
}
return r0;
}
function onOpenPicker() { // fn#112511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:4447, owner: ReactActionSheetBase.onOpenPicker, offset: 0x023ce6d0, size: 122 bytes, params: 1, frame: 21
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const contentBinding = content;
Reflect.apply(itemInteracted, value, [contentBinding.id, env0_6, 'press_reply_reaction_picker']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: contentBinding.id,
itemType: env0_6, actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'reaction_picker_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
}
function _fun112499() { // fn#112499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:2200, offset: 0x023ce2e0, size: 69 bytes, params: 1, frame: 13
var environment;
var r0;
let value = environment.__proto__;
const current = env1_9.current;
value = undefined;
if (current == null) {
r0 = value;
} else if (current.capture == null) {
r0 = value;
} else {
value = current.capture();
value = value.then(_fun112500);
r0 = value;
}
return r0;
}
function* _fun112505(a0) { // fn#112505, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:2655, offset: 0x023ce437, size: 183 bytes, params: 2, frame: 22
if (true) {
value = environment.__proto__.__proto__;
env2_5(true);
var binding = env3_1;
var binding2 = env3_2;
var value4 = binding(binding2[15]);
value4.itemInteracted(require.id, View, 'press_emoji_send');
binding(binding2[15]).feedItemActioned({itemId: require.id, itemType: View,
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'reaction_picker_button',
'actionIntentType': 'open', 'actionDestinationType': null}});
yield importDefault(a0);
if (false) {
return undefined;
}
env2_5(false);
}
}
function onPress_112509() { // fn#112509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:4003, offset: 0x023ce6b9, size: 23 bytes, params: 1, frame: 11
return env1_11(env0_0);
}
function _fun112500(a0) { // fn#112500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15067:2280, offset: 0x023ce325, size: 19 bytes, params: 2, frame: 11
return env2_10(a0);
}
@@ -0,0 +1,242 @@
/* Metro module 14869; source: modules/icymi/native/content_inventory/useReplyActions.tsx; dependencies: [5, 31, 1379, 4645, 1878, 1881, 4503, 33, 566, 8370, 7879, 4603, 14870, 3995, 7076, 7067, 14866, 4080, 3857, 1244, 13400, 9580, 8529, 7152, 14870, 1962, 2] */
function _fun112480(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:6, offset: 0x023ccd4c, size: 256 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_6 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_8 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
const env0_9 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/content_inventory/useReplyActions.tsx');
exports.useReplyActions = useReplyActions;
}
function useReplyActions({content}) { // fn#112481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:336, offset: 0x023cce4c, size: 501 bytes, params: 2, frame: 21
let value = undefined;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(content.author_id);
});
const value3 = 'unknown';
const content_type = content.content_type;
const ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
const TOP_GAME = ContentInventoryEntryType.TOP_GAME;
const r1 = TOP_GAME === content_type || ContentInventoryEntryType.PLAYED_GAME === content_type ? 'hotwheels_gaming_activity' : ContentInventoryEntryType.CUSTOM_STATUS !== content_type ? value3 : 'hotwheels_custom_status';
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun112483);
const value6 = channel != null;
const env0_4 = value6;
let binding = env0_4;
binding.useEffect(_fun112484, [value6, channel == null ? value : channel.id]);
binding = env0_4;
let useCallback = binding.useCallback;
value = _fun112486();
value = Reflect.apply(useCallback, binding, [value, [user, content]]);
const value7 = binding.useCallback(_fun112491, [content.id, r1, value]);
const value8 = binding.useCallback(_fun112492, [channel, value7]);
useCallback = binding.useCallback;
return {openReplyActionSheet: Reflect.apply(useCallback, binding, [_fun112493, [user, content, value7, value]]),
openEmojiPicker: value8};
}
function _fun112483() { // fn#112483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:708, offset: 0x023cd062, size: 54 bytes, params: 1, frame: 12
if (user == null) {
return null;
}
const getDMFromUserId = ChannelStore.getDMFromUserId;
return ChannelStore.getChannel(Reflect.apply(getDMFromUserId, ChannelStore, [user.id]));
}
function _fun112484() { // fn#112484, offset: 0x023cd098, size: 25 bytes, params: 1, frame: 1
if (env0_4) {
return function() {
var value2 = undefined;
var defaultImport = importDefault(dependencyMap[10]);
defaultImport.clearAll(channel == null ? value2 : channel.id, DraftType.ChannelMessage);
return value2;
};
}
}
function _fun112486() { // fn#112486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:940, offset: 0x023cd0fd, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun112488);
return _fun112490;
}
function _fun112491(a0) { // fn#112491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:1864, offset: 0x023cd463, size: 180 bytes, params: 2, frame: 22
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const contentBinding = content;
Reflect.apply(itemInteracted, value, [contentBinding.id, env0_2, 'press_emoji_send']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: contentBinding.id,
itemType: env0_2, actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'reaction_reply_button', 'actionIntentType': 'react', 'actionDestinationType': null}});
return env0_5(a0.id != null ? ':' + a0.name + ':' : a0.surrogates);
}
function _fun112492() { // fn#112492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:2184, offset: 0x023cd517, size: 140 bytes, params: 1, frame: 16
const value2 = undefined;
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
const object2 = {'pickerIntention': null, 'autoFocus': false, 'startExpanded': false};
const REACTION = EmojiIntention.REACTION;
object2.pickerIntention = REACTION;
object2.onPressEmoji = env0_6;
object2.channel = channel ?? value2;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
const NORMAL = ReactionTypes.NORMAL;
object2.reactionType = NORMAL;
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [object2]);
return value2;
}
function _fun112493() { // fn#112493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:2420, offset: 0x023cd5a3, size: 355 bytes, params: 1, frame: 22
var r9;
var contentBinding;
var content_type;
var value2;
const ContentInventoryEntryType = require(dependencyMap[9]).ContentInventoryEntryType;
var defaultImport;
var itemInteracted;
var id;
var defaultImport2;
var feedItemActioned;
var defaultImport3;
if (user != null) {
content_type = content.content_type;
value2 = environment.__proto__;
r9 = ContentInventoryEntryType.CUSTOM_STATUS === content_type ? 'hotwheels_custom_status' : ContentInventoryEntryType.TOP_GAME === content_type ? 'hotwheels_gaming_activity' : ContentInventoryEntryType.PLAYED_GAME !== content_type ? 'unknown' : 'hotwheels_gaming_activity';
defaultImport = importDefault(dependencyMap[21]);
itemInteracted = defaultImport.itemInteracted;
contentBinding = content;
id = contentBinding.id;
Reflect.apply(itemInteracted, defaultImport, [id, r9, 'press_reply_react']);
defaultImport2 = importDefault(dependencyMap[21]);
feedItemActioned = defaultImport2.feedItemActioned;
id = contentBinding.id;
Reflect.apply(feedItemActioned, defaultImport2, [{itemId: id, itemType: r9,
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_container',
'actionIntentType': 'open', 'actionDestinationType': null}}]);
defaultImport3 = importDefault(dependencyMap[17]);
defaultImport3.openLazy(require(dependencyMap[25])(dependencyMap[24], dependencyMap.paths), 'ReactActionSheet',
{content: contentBinding, author: user, sendMessage: env0_5, onPressEmoji: env0_6});
}
}
function* _fun112488(a0) { // fn#112488, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:960, offset: 0x023cd12c, size: 778 bytes, params: 2, frame: 27
var environment;
var object2;
var value10;
var getStatusReplyContent;
var extra;
var emoji_name;
var value11;
var binding2;
var value17;
var binding3;
var open;
var intl;
if (true) {
value = environment.__proto__.__proto__;
if (importDefault != null) {
var binding = env3_1;
var value4 = binding(env3_2[11]);
var getOrEnsurePrivateChannel = value4.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value4, [importDefault.id]);
var value5 = undefined;
if (false) {
return value5;
}
binding = env3_5;
var channel = binding.getChannel(value5);
if (channel == null) {
binding = env3_1;
binding3 = env3_2;
value = binding(binding3[17]);
value.hideActionSheet();
value = binding(binding3[18]);
open = value.open;
object2 = {key: 'content_inventory_message_sent'};
binding = env3_0;
intl = binding(binding3[19]).intl;
object2.content = intl.string(binding(binding3[19]).t.fjcCk5);
object2.icon = icon_112489;
Reflect.apply(open, value, [object2]);
return undefined;
}
var content_type = require.content_type;
binding = env3_0;
var ContentInventoryEntryType = binding(env3_2[9]).ContentInventoryEntryType;
var CUSTOM_STATUS = ContentInventoryEntryType.CUSTOM_STATUS;
if (content_type === CUSTOM_STATUS) {
binding = env3_0;
value10 = binding(env3_2[12]);
getStatusReplyContent = value10.getStatusReplyContent;
object2 = {};
extra = require.extra;
object2.status = extra.status;
extra = require.extra;
emoji_name = extra.emoji_name;
value11 = '';
object2.emojiStr = emoji_name != null ? require.extra.emoji_id == null ? value11 + require.extra.emoji_name : global.String(require.extra.emoji_id) !== '0' ? '`:' + require.extra.emoji_name + ':`' : value11 + require.extra.emoji_name : value11;
object2.reply = a0;
binding = env3_1;
binding2 = env3_2;
object2.username = binding(binding2[13]).getName(importDefault);
extra = require.extra;
object2.attachments = extra.attachments;
value = Reflect.apply(getStatusReplyContent, value10, [object2]);
value = binding(binding2[14]).parse(channel, value);
value17 = binding(binding2[15]);
yield value17.sendMessage(channel.id, value, false, {location: env3_9.ICYMI});
value = undefined;
if (false) {
return value;
}
binding = env3_1;
binding3 = env3_2;
value = binding(binding3[17]);
value.hideActionSheet();
value = binding(binding3[18]);
open = value.open;
object2 = {key: 'content_inventory_message_sent'};
binding = env3_0;
intl = binding(binding3[19]).intl;
object2.content = intl.string(binding(binding3[19]).t.fjcCk5);
object2.icon = icon_112489;
Reflect.apply(open, value, [object2]);
return undefined;
}
binding = env3_0;
var value8 = binding(env3_2[16]);
yield value8.sendMessageWithEmbed({channel: channel, content: a0, entry: require, whenReady: false,
doNotNotifyOnError: false, location: env3_9.ICYMI});
value = undefined;
if (false) {
return value;
}
binding = env3_1;
binding3 = env3_2;
value = binding(binding3[17]);
value.hideActionSheet();
value = binding(binding3[18]);
open = value.open;
object2 = {key: 'content_inventory_message_sent'};
binding = env3_0;
intl = binding(binding3[19]).intl;
object2.content = intl.string(binding(binding3[19]).t.fjcCk5);
object2.icon = icon_112489;
Reflect.apply(open, value, [object2]);
}
}
}
function icon_112489() { // fn#112489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15066:1748, offset: 0x023cd436, size: 45 bytes, params: 1, frame: 13
const binding = env4_10;
const ChatCheckIcon = env4_0(env4_2[20]).ChatCheckIcon;
return binding(ChatCheckIcon, {});
}
@@ -0,0 +1,25 @@
/* Metro module 14815; source: modules/icymi/native/createICYMIStyles.tsx; dependencies: [31, 4501, 14816, 2] */
function _fun111819(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15012:6, offset: 0x023b36ea, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/createICYMIStyles.tsx');
exports.createICYMIStyles = createICYMIStyles;
}
function createICYMIStyles(a0) { // fn#111820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15012:202, offset: 0x023b375c, size: 53 bytes, params: 2, frame: 12
const env0_0 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(a0);
return _fun111821;
}
function _fun111821(a0) { // fn#111821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15012:243, offset: 0x023b3791, size: 91 bytes, params: 2, frame: 16
const value = copyRestArgs(0, undefined);
const binding = env1_2;
const useContext = binding.useContext;
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
const items2 = [Reflect.apply(useContext, binding, [ICYMIContext])];
arraySpread(items2, value, 1, require);
return apply(useStyles, items2, undefined, require);
}
@@ -0,0 +1,261 @@
/* Metro module 14822; source: modules/icymi/native/custom_scores/ICYMIContentSettingControl.tsx; dependencies: [57, 31, 27, 4864, 9569, 33, 4501, 697, 9579, 1244, 1305, 14823, 14824, 14825, 8853, 9221, 566, 14826, 4573, 6808, 4805, 2] */
function _fun111875(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:6, offset: 0x023b5fba, size: 477 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const customScoreToIndex = function(a0) {
if (require(dependencyMap[8]).ICYMICustomScore.LESS === a0) {
return 0;
}
if (require(dependencyMap[8]).ICYMICustomScore.MORE === a0) {
return 2;
}
return 1;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.customScoreWrapper = {marginVertical: PX_16};
const object4 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginTop = PX_8;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.marginHorizontal = PX_12;
object2.warningText = object4;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.icon = {'width': 24, 'height': 24, tintColor: TEXT_MUTED};
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.iconSelected = {tintColor: INTERACTIVE_TEXT_ACTIVE};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.muted = {marginTop: PX_16};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/custom_scores/ICYMIContentSettingControl.tsx');
exports.GuildScoreSettings = GuildScoreSettings;
exports.ChannelScoreSettings = ChannelScoreSettings;
}
function ContentSettingsControl({initialValue, onValueUpdated, disabled}) { // fn#111877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:651, offset: 0x023b61f2, size: 826 bytes, params: 2, frame: 29
const styles = useStyles();
const [property, env0_1] = env0_3(env0_4.useState(initialValue), 2);
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.rdt65I]);
object2.id = '-1';
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(14823) /* metro dependency 14823 */};
const items3 = [styles.icon];
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
const LESS = ICYMICustomScore.LESS;
items3[1] = property !== LESS ? null : styles.iconSelected;
iconProps.style = items3;
object2.icon = <Icon {...iconProps} />;
object2.page = null;
const items2 = [object2];
object2 = {};
string = intl.string;
const SnrG00 = (require(1244) /* metro dependency 1244: indexNative */).t.SnrG00;
object2.label = Reflect.apply(string, intl, [SnrG00]);
object2.id = '0';
const iconProps2 = {source: importDefault(14824) /* metro dependency 14824 */};
const DEFAULT = ICYMICustomScore.DEFAULT;
iconProps2.style = [styles.icon, property !== DEFAULT ? null : styles.iconSelected];
object2.icon = <Icon {...iconProps2} />;
object2.page = null;
items2[1] = object2;
object2 = {};
string = intl.string;
const Rxe3jF = (require(1244) /* metro dependency 1244: indexNative */).t.Rxe3jF;
object2.label = Reflect.apply(string, intl, [Rxe3jF]);
object2.id = '1';
const iconProps3 = {source: importDefault(14825) /* metro dependency 14825 */};
const MORE = ICYMICustomScore.MORE;
iconProps3.style = [styles.icon, property !== MORE ? null : styles.iconSelected];
object2.icon = <Icon {...iconProps3} />;
object2.page = null;
items2[2] = object2;
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
object2 = {pageWidth: 0, onSetActiveIndex: onSetActiveIndex_111878, items: items2};
object2.defaultIndex = customScoreToIndex(property);
const value5 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object2]);
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
return (
<View style={disabled ? {opacity: 0.7} : null} pointerEvents={disabled ? 'none' : 'auto'}>
<SegmentedControl variant="experimental_Large" state={value5} />
</View>
);
}
function GuildScoreSettings({guild}) { // fn#111879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:1814, offset: 0x023b65b4, size: 744 bytes, params: 2, frame: 30
const id = guild.id;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value2 = (require(9579) /* metro dependency 9579: ICYMIUtils */).numberToCustomScore(Reflect.apply(useStateFromStores,
fluxModule, [[ICYMIStore], function() {
return ICYMIStore.getCustomGuildScore(id);
}]));
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
const MUTED = ICYMICustomScore.MUTED;
const value3 = value2 === MUTED;
const value4 = env0_4.useCallback(_fun111881, [id]);
const value5 = env0_4.useCallback(_fun111882, [value2, id]);
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Clq6km = (require(1244) /* metro dependency 1244: indexNative */).t.Clq6km;
const items2 = [<Text variant="text-sm/semibold" color="text-default">{Reflect.apply(string, intl,
[Clq6km])}</Text>];
items2[1] = <Text variant="text-xs/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0DhU2P'],
{guildName: guild.name})}</Text>;
items2[2] = value3 ? null : <View style={styles.customScoreWrapper}><ContentSettingsControl initialValue={value2} onValueUpdated={value5} /></View>;
const r8 = value3 && styles.muted;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
items2[3] = <View style={r8}><TableSwitchRow value={!value3} onValueChange={value4} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oujX73)} start end /></View>;
items2[4] = <Text variant="text-xs/normal" color="text-muted" style={styles.warningText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRVs07)}</Text>;
return (
<View>
{items2}
</View>
);
}
function ChannelScoreSettings({guild, channel}) { // fn#111883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:3010, offset: 0x023b6996, size: 857 bytes, params: 2, frame: 32
const id = guild.id;
const id2 = channel.id;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[ICYMIStore, UserGuildSettingsStore], _fun111884]);
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const value4 = (require(9579) /* metro dependency 9579: ICYMIUtils */).numberToCustomScore(Reflect.apply(useStateFromStores,
moduleValue2, [[ICYMIStore], function() {
return ICYMIStore.getCustomGuildScore(id);
}]));
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
let MUTED = ICYMICustomScore.MUTED;
const value5 = value4 === MUTED;
MUTED = ICYMICustomScore.MUTED;
const value6 = value2 === MUTED;
const value7 = env0_4.useCallback(_fun111886, [value2, id, id2]);
const value8 = env0_4.useCallback(_fun111887, [id2, id]);
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<Text variant="text-sm/semibold" color="text-default">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['0jRosn']])}</Text>];
const format = intl.format;
const KzkF1j = (require(1244) /* metro dependency 1244: indexNative */).t.KzkF1j;
items2[1] = <Text variant="text-xs/normal" color="text-default">{Reflect.apply(format, intl, [KzkF1j,
{channelName: value3}])}</Text>;
items2[2] = value6 ? null : <View style={styles.customScoreWrapper}><ContentSettingsControl disabled={value5} initialValue={value2} onValueUpdated={value7} /></View>;
const r8 = value6 && styles.muted;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
string = intl.string;
const W2aJRS = (require(1244) /* metro dependency 1244: indexNative */).t.W2aJRS;
items2[3] = <View style={r8}><TableSwitchRow value={!value6} onValueChange={value8} label={Reflect.apply(string,
intl, [W2aJRS])} disabled={value5} start end /></View>;
items2[4] = <Text variant="text-xs/normal" color="text-muted" style={styles.warningText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5lP6Ax'])}</Text>;
return (
<View>
{items2}
</View>
);
}
function ContentSettingsControlOnSetActiveIndex(a0) { // fn#111878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:1368, owner: ContentSettingsControl.onSetActiveIndex, offset: 0x023b652c, size: 136 bytes, params: 2, frame: 14
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
const DEFAULT = ICYMICustomScore.DEFAULT;
const r2 = a0 === 0 ? ICYMICustomScore.LESS : a0 !== 2 ? DEFAULT : ICYMICustomScore.MORE;
env0_1(r2);
onValueUpdated(r2);
}
function _fun111881(a0) { // fn#111881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:2017, offset: 0x023b68b7, size: 127 bytes, params: 2, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(14826) /* metro dependency 14826: NativeICYMIActionCreators */;
const customScoreGuild = defaultImport.customScoreGuild;
const object2 = {};
object2.guildId = id;
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
const customScoreToNumber = value.customScoreToNumber;
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
object2.guildScore = a0 ? Reflect.apply(customScoreToNumber, value,
[ICYMICustomScore.DEFAULT]) : Reflect.apply(customScoreToNumber, value, [ICYMICustomScore.MUTED]);
Reflect.apply(customScoreGuild, defaultImport, [object2]);
}
function _fun111882(a0) { // fn#111882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:2219, offset: 0x023b6936, size: 96 bytes, params: 2, frame: 16
var value2;
var defaultImport;
var customScoreGuild;
var object2;
if (env0_1 !== a0) {
value2 = environment.__proto__;
defaultImport = importDefault(14826) /* metro dependency 14826: NativeICYMIActionCreators */;
customScoreGuild = defaultImport.customScoreGuild;
object2 = {};
object2.guildId = id;
object2.guildScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).customScoreToNumber(a0);
Reflect.apply(customScoreGuild, defaultImport, [object2]);
}
}
function _fun111884() { // fn#111884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:3116, offset: 0x023b6cef, size: 137 bytes, params: 1, frame: 17
const customChannelScore = ICYMIStore.getCustomChannelScore(id, id);
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
const UNKNOWN = ICYMICustomScore.UNKNOWN;
return customChannelScore !== UNKNOWN ? customChannelScore : UserGuildSettingsStore.isChannelMuted(id,
id) ? ICYMICustomScore.MUTED : ICYMICustomScore.DEFAULT;
}
function _fun111886(a0) { // fn#111886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:3494, offset: 0x023b6d78, size: 119 bytes, params: 2, frame: 17
var value2;
var defaultImport;
var customScoreGuild;
var object3;
var object4;
if (env0_2 !== a0) {
value2 = environment.__proto__;
defaultImport = importDefault(14826) /* metro dependency 14826: NativeICYMIActionCreators */;
customScoreGuild = defaultImport.customScoreGuild;
object3 = {};
object3.guildId = id;
object4 = {};
object4.channelId = id;
object4.score = (require(9579) /* metro dependency 9579: ICYMIUtils */).customScoreToNumber(a0);
object3.channelScores = [object4];
Reflect.apply(customScoreGuild, defaultImport, [object3]);
}
}
function _fun111887(a0) { // fn#111887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15019:3639, offset: 0x023b6def, size: 150 bytes, params: 2, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(14826) /* metro dependency 14826: NativeICYMIActionCreators */;
const customScoreGuild = defaultImport.customScoreGuild;
const object3 = {};
object3.guildId = id;
const object4 = {};
object4.channelId = id;
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
const customScoreToNumber = value.customScoreToNumber;
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
object4.score = a0 ? Reflect.apply(customScoreToNumber, value,
[ICYMICustomScore.DEFAULT]) : Reflect.apply(customScoreToNumber, value, [ICYMICustomScore.MUTED]);
object3.channelScores = [object4];
Reflect.apply(customScoreGuild, defaultImport, [object3]);
}
@@ -0,0 +1,8 @@
/* Metro module 14827; source: modules/icymi/native/custom_scores/ICYMICustomScoreTypes.tsx; dependencies: [2] */
function _fun111896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15024:6, offset: 0x023b7224, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/custom_scores/ICYMICustomScoreTypes.tsx');
exports.ICYMI_CUSTOM_SCORES_MODAL_KEY = 'icymi-custom-scores-modal';
}
@@ -0,0 +1,549 @@
/* Metro module 14820; source: modules/icymi/native/custom_scores/ICYMICustomScoresGuildScreen.tsx; dependencies: [57, 31, 27, 5070, 1379, 1867, 4864, 9569, 33, 4501, 697, 566, 4805, 9579, 1244, 4080, 14821, 1962, 6647, 6238, 1305, 10937, 4573, 5092, 7705, 1585, 14822, 8708, 8416, 2] */
function _fun111852(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:6, offset: 0x023b4842, size: 615 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const _arrayLikeToArray_111855 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const keyExtractor_111861 = function(a0, a1) {
var property = a0.kind;
if (property === 'header') {
return 'header';
}
if (property === 'categoryHeader') {
return 'categoryHeader-' + a0.index;
}
if (property === 'channel') {
return 'channel-' + a0.channelId;
}
return '' + a1;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelListStore = importDefault(5070) /* metro dependency 5070: ChannelListStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
let value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingHorizontal = PX_12;
object3.container = object5;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.guildHeader = {marginBottom: PX_32};
const object6 = {'paddingTop': null, 'paddingBottom': null, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingBottom = PX_8;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.gap = PX_4;
object3.categoryHeader = object6;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.channelNameContainer = {flexDirection: 'row', gap: PX_4};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object3.channelMutedIcon = {alignSelf: 'center', tintColor: ICON_MUTED};
const env0_14 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/custom_scores/ICYMICustomScoresGuildScreen.tsx');
exports.default = ICYMICustomScoresGuildScreen;
}
function _createForOfIteratorHelperLoose_111853(a0, a1) { // fn#111853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:228, offset: 0x023b4aa9, 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 _fun111854;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_111855(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') {
value = _arrayLikeToArray_111855(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_111855(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun111854;
}
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 ICYMICustomScoreChannelRow({channelId, start, end, disabled}) { // fn#111856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:1630, offset: 0x023b4c1d, size: 675 bytes, params: 2, frame: 32
var object2;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const DEFAULT = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore,
UserGuildSettingsStore], _fun111858);
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
const MUTED = ICYMICustomScore.MUTED;
const value3 = DEFAULT === MUTED;
const value4 = env0_4.useMemo(_fun111859, [value3, DEFAULT]);
const value5 = env0_4.useCallback(_fun111860, [channel]);
if (channel == null) {
return null;
}
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {arrow: true, disabled: disabled};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const SMALL = IconSizes.SMALL;
object2.icon = <Icon size={SMALL} source={channelIcon} />;
object2.start = start;
object2.end = end;
object2.labelLineClamp = 1;
object2.label = value3 ? <View style={styles.channelNameContainer}><Icon source={importDefault(10937) /* metro dependency 10937 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} style={styles.channelMutedIcon} />{((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1}>{value2}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : value2;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TrailingText = TableRow2.TrailingText;
object2.trailing = <TrailingText text={value4} />;
object2.onPress = value5;
return <TableRow {...object2} />;
}
function ICYMICustomScoresGuildScreen(a0) { // fn#111862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:3362, offset: 0x023b51c3, size: 543 bytes, params: 2, frame: 24
const navigation = a0.navigation;
const env0_1 = a0.route.params.guildId;
const value = undefined;
let env0_4 = value;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const guild = Reflect.apply(useStateFromStores, fluxModule, [[GuildStore], function() {
return GuildStore.getGuild(guildId);
}]);
env0_4.useEffect(_fun111864, [navigation, guild == null ? value : guild.name]);
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const value3 = (require(9579) /* metro dependency 9579: ICYMIUtils */).numberToCustomScore(Reflect.apply(useStateFromStores,
moduleValue2, [[ICYMIStore], function() {
return ICYMIStore.getCustomGuildScore(guildId);
}]));
env0_4 = value3;
const moduleValue4 = fluxModule;
const useStateFromStoresObject = moduleValue4.useStateFromStoresObject;
const value4 = env0_4.useMemo(_fun111867, [value3, Reflect.apply(useStateFromStoresObject, moduleValue4,
[[ChannelListStore], function() {
return ChannelListStore.getGuild(guildId);
}]).guildChannels]);
const value5 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value6 = env0_4.useCallback(_fun111869, [guild, styles.categoryHeader, styles.guildHeader]);
const AnimatedFlashList = (require(8416) /* metro dependency 8416: flashList */).AnimatedFlashList;
const object = {bottom: bottom};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.top = PX_12;
return (
<View style={styles.container}>
<AnimatedFlashList
contentInset={object}
estimatedItemSize={value5}
showsVerticalScrollIndicator={false}
renderItem={value6}
data={value4}
keyExtractor={keyExtractor_111861}
/>
</View>
);
}
function _fun111858() { // fn#111858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:1826, offset: 0x023b4ec0, size: 201 bytes, params: 1, frame: 17
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
var value;
if (channel == null) {
value = environment.__proto__;
return ICYMICustomScore.DEFAULT;
}
const getCustomChannelScore = ICYMIStore.getCustomChannelScore;
channelBinding = channel;
const value3 = Reflect.apply(getCustomChannelScore, ICYMIStore, [channelBinding.guild_id, channelBinding.id]);
const UNKNOWN = ICYMICustomScore.UNKNOWN;
return value3 !== UNKNOWN ? value3 : UserGuildSettingsStore.isChannelMuted(channel.guild_id,
channel.id) ? ICYMICustomScore.MUTED : ICYMICustomScore.DEFAULT;
}
function _fun111859() { // fn#111859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:2136, offset: 0x023b4f89, size: 328 bytes, params: 1, frame: 16
const ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return result ? intl.string(t.lhPHmz) : DEFAULT === ICYMICustomScore.MORE ? intl.string(t.Rxe3jF) : DEFAULT === ICYMICustomScore.LESS ? intl.string(t.rdt65I) : intl.string(t.SnrG00);
}
function _fun111860() { // fn#111860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:2407, offset: 0x023b50d1, size: 119 bytes, params: 1, frame: 17
var value2;
var defaultImport;
var openLazy;
var value3;
let channelBinding = channel;
if (channelBinding != null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[15]);
openLazy = defaultImport.openLazy;
value3 = require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths);
channelBinding = channel;
Reflect.apply(openLazy, defaultImport, [value3, 'ItemDetailsActionSheet', {guildId: channelBinding.guild_id,
channelId: channelBinding.id}]);
}
}
function _fun111864() { // fn#111864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:3522, offset: 0x023b53e2, size: 66 bytes, params: 1, frame: 16
const navigationBinding = navigation;
const setOptions = navigationBinding.setOptions;
const guildBinding = guild;
const value2 = undefined;
Reflect.apply(setOptions, navigationBinding, [{title: (guildBinding == null ? value2 : guild.name) ?? ''}]);
return value2;
}
function _fun111867() { // fn#111867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:3816, offset: 0x023b545a, size: 1010 bytes, params: 1, frame: 52
var r11;
var r37;
var name;
var r39;
var r36;
var r32;
var value9;
var value10;
var property;
var SECTION_INDEX_GUILD_ACTIONS;
var voiceChannelsSectionNumber;
var getCategoryFromSection;
var value11;
var getChannelRecords;
var value12;
var filter;
var value13;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var GSfOoo;
var value14;
var SECTION_INDEX_FAVORITES;
var SECTION_INDEX_RECENTS;
var SECTION_INDEX_FIRST_NAMED_CATEGORY;
var getNamedCategoryFromSection;
var value15;
var record;
var gKcrqM;
var value16;
var mlPMCy;
var value17;
var value18;
var value19;
var value20;
var value21;
var property2;
var object;
var id;
var binding;
var ICYMICustomScore;
var MUTED;
var value22;
var value23;
const items2 = [];
items2.push({kind: 'header'});
const _createForOfIteratorHelperLoose_111853Binding = _createForOfIteratorHelperLoose_111853;
const value4 = guildChannels.getSections(false).entries();
const value5 = undefined;
const value6 = _createForOfIteratorHelperLoose_111853Binding(value4);
const value7 = value6();
let done = value7.done;
if (!done) {
r11 = value7;
reducibleLoop1: while (true) {
value9 = r11.value;
value10 = env1_3(value9, 2);
property = value10[0];
reducibleJoin19: while (true) {
if (value10[1] === 0) {
break reducibleJoin19;
}
SECTION_INDEX_GUILD_ACTIONS = (require(5092) /* metro dependency 5092: ChannelListState */).SECTION_INDEX_GUILD_ACTIONS;
if (property === SECTION_INDEX_GUILD_ACTIONS) {
break reducibleJoin19;
}
voiceChannelsSectionNumber = guildChannels.voiceChannelsSectionNumber;
if (property === voiceChannelsSectionNumber) {
break reducibleJoin19;
}
guildChannelsBinding = guildChannels;
getCategoryFromSection = guildChannelsBinding.getCategoryFromSection;
value11 = Reflect.apply(getCategoryFromSection, guildChannelsBinding, [property]);
reducibleJoin6: while (true) {
if (value11 == null) {
r37 = value5;
break reducibleJoin6;
}
getChannelRecords = value11.getChannelRecords;
value12 = Reflect.apply(getChannelRecords, value11, []);
filter = value12.filter;
value13 = Reflect.apply(filter, value12, [_fun111868]);
r37 = value13;
break reducibleJoin6;
}
if (r37 == null) {
break reducibleJoin19;
}
length = r37.length;
if (length === 0) {
break reducibleJoin19;
}
string = intl.string;
GSfOoo = t.GSfOoo;
value14 = Reflect.apply(string, intl, [GSfOoo]);
SECTION_INDEX_FAVORITES = (require(5092) /* metro dependency 5092: ChannelListState */).SECTION_INDEX_FAVORITES;
if (property === SECTION_INDEX_FAVORITES) {
string = intl.string;
mlPMCy = t.mlPMCy;
value17 = Reflect.apply(string, intl, [mlPMCy]);
r36 = value17;
} else {
SECTION_INDEX_RECENTS = (require(5092) /* metro dependency 5092: ChannelListState */).SECTION_INDEX_RECENTS;
if (property === SECTION_INDEX_RECENTS) {
string = intl.string;
gKcrqM = t.gKcrqM;
value16 = Reflect.apply(string, intl, [gKcrqM]);
r36 = value16;
} else {
SECTION_INDEX_FIRST_NAMED_CATEGORY = (require(5092) /* metro dependency 5092: ChannelListState */).SECTION_INDEX_FIRST_NAMED_CATEGORY;
reducibleJoin17: while (true) {
if (property >= SECTION_INDEX_FIRST_NAMED_CATEGORY) {
guildChannelsBinding = guildChannels;
getNamedCategoryFromSection = guildChannelsBinding.getNamedCategoryFromSection;
value15 = Reflect.apply(getNamedCategoryFromSection, guildChannelsBinding, [property]);
reducibleJoin13: while (true) {
if (value15 == null) {
name = value5;
break reducibleJoin13;
}
record = value15.record;
name = record.name;
break reducibleJoin13;
}
r39 = name ?? '';
r36 = r39;
break reducibleJoin17;
}
r36 = value14;
break reducibleJoin17;
}
}
}
push = items2.push;
Reflect.apply(push, items2, [{kind: 'categoryHeader', index: property, title: r36}]);
value18 = _createForOfIteratorHelperLoose_111853(r37.entries());
value19 = value18();
done = value19.done;
if (done) {
break reducibleJoin19;
}
r32 = value19;
reducibleLoop18: while (true) {
value20 = r32.value;
value21 = env1_3(value20, 2);
property = value21[0];
property2 = value21[1];
push = items2.push;
object = {kind: 'channel'};
id = property2.id;
object.channelId = id;
object.start = property === 0;
length = r37.length;
object.end = property === length - 1;
binding = env0_4;
ICYMICustomScore = (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore;
MUTED = ICYMICustomScore.MUTED;
object.disabled = binding === MUTED;
Reflect.apply(push, items2, [object]);
value22 = value18();
done = value22.done;
if (done) {
break reducibleJoin19;
}
r32 = value22;
continue reducibleLoop18;
}
}
value23 = value6();
done = value23.done;
if (done) {
break reducibleLoop1;
}
r11 = value23;
continue reducibleLoop1;
}
}
property = items2[items2.length - 1];
reducibleJoin22: while (true) {
if (property.kind !== 'channel') {
break reducibleJoin22;
}
property.end = true;
break reducibleJoin22;
}
return items2;
}
function _fun111869({item}) { // fn#111869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:4980, offset: 0x023b5875, size: 644 bytes, params: 2, frame: 26
var r0;
var value;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var guildBinding;
var value4;
var value5;
var jsxRuntimeEnv1_13Binding;
var items2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object;
const kind = item.kind;
if (kind === 'header') {
guildBinding = guild;
value4 = null;
if (value4 != guildBinding) {
value5 = environment.__proto__;
jsxRuntimeEnv1_13Binding = jsxRuntimeEnv1_13;
value = <View style={styles.guildHeader}>{((GuildScoreSettings) => <GuildScoreSettings guild={guild} />)((require(14822) /* metro dependency 14822: ICYMIContentSettingControl */).GuildScoreSettings)}</View>;
items2 = [value];
string = intl.string;
items2[1] = <Text variant="text-sm/semibold" color="text-default">{Reflect.apply(string, intl,
[t['0jRosn']])}</Text>;
object = {};
object.marginBottom = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
string = intl.string;
items2[2] = <Text variant="text-xs/normal" color="text-default" style={object}>{Reflect.apply(string, intl,
[t.l52PX4])}</Text>;
value = <>{items2}</>;
r0 = value;
} else {
r0 = value4;
}
return r0;
}
if (kind === 'categoryHeader') {
value = environment.__proto__;
return (
<View style={styles.categoryHeader}>
{((ChevronSmallDownIcon) => <ChevronSmallDownIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE} />)((require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon)}
<Text variant="text-sm/semibold" color="text-default">
{item.title}
</Text>
</View>
);
}
if (kind === 'channel') {
value = environment.__proto__;
return (
<ICYMICustomScoreChannelRow
disabled={item.disabled}
channelId={item.channelId}
start={item.start}
end={item.end}
/>
);
}
return null;
}
function _fun111868(a0) { // fn#111868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15017:4146, offset: 0x023b584c, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(9579) /* metro dependency 9579: ICYMIUtils */).isChannelCustomScoreEligible(a0);
}
@@ -0,0 +1,78 @@
/* Metro module 14818; source: modules/icymi/native/custom_scores/ICYMICustomScoresModal.tsx; dependencies: [31, 33, 9884, 4501, 697, 5280, 9603, 1244, 9893, 14819, 14820, 2] */
function _fun111834(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15015:6, offset: 0x023b4093, size: 234 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_6 = Reflect.apply(createStyles, value, [{header: {backgroundColor: BACKGROUND_BASE_LOW}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/custom_scores/ICYMICustomScoresModal.tsx');
exports.default = ICYMICustomScoresModal;
}
function ICYMICustomScoresModal() { // fn#111835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15015:362, offset: 0x023b417d, size: 204 bytes, params: 1, frame: 19
const env0_0 = useStyles();
const env0_1 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const binding = env0_5;
const Navigator = binding.Navigator;
const object2 = {screenOptions: screenOptions_111836, initialRouteName: 'default'};
let Screen = binding.Screen;
const screen = <Screen name="default" options={options_111838} getComponent={function() {
return require(dependencyMap[9]).default;
}} />;
Screen = binding.Screen;
return (
<Navigator {...object2}>
{screen}
<Screen
name="guild"
options={options_111840}
getComponent={function() {
return require(dependencyMap[10]).default;
}}
/>
</Navigator>
);
}
function ICYMICustomScoresModalScreenOptions() { // fn#111836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15015:489, owner: ICYMICustomScoresModal.screenOptions, offset: 0x023b4249, size: 55 bytes, params: 1, frame: 12
const object2 = {};
object2.headerStyle = styles.header;
object2.headerTitle = headerTitle_111837;
object2.headerTitleAlign = 'center';
copyDataProperties(object2, env0_1, 'center');
return object2;
}
function ICYMICustomScoresModalOptions({navigation}) { // fn#111838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15015:699, owner: ICYMICustomScoresModal.options, offset: 0x023b42d7, size: 134 bytes, params: 2, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jVshKt);
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
copyDataProperties(object2, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
intl);
return object2;
}
function ICYMICustomScoresModalOptions_111840({navigation}) { // fn#111840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15015:893, owner: ICYMICustomScoresModal.options, offset: 0x023b437d, size: 54 bytes, params: 2, frame: 13
const object2 = {};
const value = environment.__proto__;
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalBackImage(navigation);
return object2;
}
function screenOptionsHeaderTitle_111837(a0) { // fn#111837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15015:528, owner: ICYMICustomScoresModal.screenOptions.headerTitle, offset: 0x023b4280, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
@@ -0,0 +1,95 @@
/* Metro module 14819; source: modules/icymi/native/custom_scores/ICYMICustomScoresOverviewScreen.tsx; dependencies: [31, 27, 1867, 4896, 9569, 33, 4501, 697, 566, 1585, 6231, 6238, 6819, 9579, 1244, 2] */
function _fun111842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15016:6, offset: 0x023b43d3, size: 301 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/custom_scores/ICYMICustomScoresOverviewScreen.tsx');
exports.default = ICYMICustomScoresOverviewScreen;
}
function ICYMICustomScoresOverviewScreen({navigation}) { // fn#111843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15016:420, offset: 0x023b4500, size: 387 bytes, params: 2, frame: 22
const guilds = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuilds();
});
const flattenedGuildIds = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore],
function() {
return SortedGuildStore.getFlattenedGuildIds();
});
const binding = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.getCustomGuildScores();
});
const value2 = binding.useMemo(function() {
return flattenedGuildIds.map(_fun111848);
}, [flattenedGuildIds, guilds]);
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const env0_4 = binding.useCallback(function(a0) {
return navigation.navigate('guild', {guildId: a0});
}, [navigation]);
const object = {bottom: bottom};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.top = PX_12;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<ScrollView
showsVerticalScrollIndicator={false}
style={styles.container}
contentInset={object}
>
<TableRowGroup hasIcons>
{value2.map(_fun111850)}
</TableRowGroup>
</ScrollView>
);
}
function _fun111847() { // fn#111847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15016:678, offset: 0x023b46ab, size: 28 bytes, params: 1, frame: 11
return flattenedGuildIds.map(function(a0) {
return guilds[a0];
});
}
function _fun111850(a0) { // fn#111850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15016:963, offset: 0x023b46e9, size: 317 bytes, params: 2, frame: 25
var environment;
var r5;
var moduleValue;
var TrailingText;
var intl;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {onPress: onPress_111851,
icon: ((Component) => <Component guild={a0} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */),
label: a0.name};
if (customGuildScores[a0.id] != null) {
moduleValue = require(9579) /* metro dependency 9579: ICYMIUtils */;
if (moduleValue.numberToCustomScore(customGuildScores[a0.id]) !== (require(9579) /* metro dependency 9579: ICYMIUtils */).ICYMICustomScore.MUTED) {
r5 = value2;
} else {
TrailingText = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <TrailingText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lhPHmz)} />;
}
} else {
r5 = value2;
}
tableRowProps.trailing = r5;
tableRowProps.arrow = true;
return <TableRow {...tableRowProps} key={a0.id} />;
}
@@ -0,0 +1,135 @@
/* Metro module 14829; source: modules/icymi/native/info_modal/ICYMIInfoModal.tsx; dependencies: [31, 33, 5280, 14830, 5282, 14831, 480, 5080, 5277, 1244, 9589, 14839, 14847, 10121, 12805, 2] */
function _fun111899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:6, offset: 0x023b736b, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/info_modal/ICYMIInfoModal.tsx');
exports.default = ICYMIInfoModal;
}
function ICYMIInfoModal({extendedOnboarding, skipIntro}) { // fn#111900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:215, offset: 0x023b73f9, size: 251 bytes, params: 2, frame: 20
var r0;
var ICYMIInfoScreens;
var StepModal;
let object2 = {extendedOnboarding: extendedOnboarding, skipIntro: skipIntro};
let value = ICYMIInfoModalUseScreens(object2);
if (extendedOnboarding) {
StepModal = (require(12805) /* metro dependency 12805: StepModalNative */).StepModal;
object2 = {screens: value, steps: env0_3.useMemo(_fun111911, [extendedOnboarding, skipIntro])};
ICYMIInfoScreens = (require(14830) /* metro dependency 14830: ICYMIInfoModalTypes */).ICYMIInfoScreens;
object2.initialRouteName = skipIntro ? ICYMIInfoScreens.TOPICS_CLOUD : ICYMIInfoScreens.DEFAULT;
value = <StepModal {...object2} />;
r0 = value;
} else {
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
value = <Modal screens={value} initialRouteName={(require(14830) /* metro dependency 14830: ICYMIInfoModalTypes */).ICYMIInfoScreens.DEFAULT} />;
r0 = value;
}
return r0;
}
function ICYMIInfoModalUseScreens({extendedOnboarding, skipIntro}) { // fn#111901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:281, owner: ICYMIInfoModal.useScreens, offset: 0x023b74f4, size: 83 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__;
return (require(5280) /* metro dependency 5280: NavigatorNative */).useNavigatorScreens(_fun111902,
[extendedOnboarding, skipIntro]);
}
function _fun111911() { // fn#111911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:1517, offset: 0x023b790e, size: 208 bytes, params: 1, frame: 16
const ICYMIInfoScreens = (require(14830) /* metro dependency 14830: ICYMIInfoModalTypes */).ICYMIInfoScreens;
return extendedOnboarding ? skipIntro ? [ICYMIInfoScreens.TOPICS_CLOUD,
ICYMIInfoScreens.JOIN_GUILDS] : [ICYMIInfoScreens.DEFAULT, ICYMIInfoScreens.TOPICS_CLOUD,
ICYMIInfoScreens.JOIN_GUILDS] : [ICYMIInfoScreens.DEFAULT];
}
function _fun111902() { // fn#111902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:373, offset: 0x023b7547, size: 386 bytes, params: 1, frame: 22
var environment;
const object3 = {};
const value = environment.__proto__.__proto__;
const ICYMIInfoScreens = (require(14830) /* metro dependency 14830: ICYMIInfoModalTypes */).ICYMIInfoScreens;
const DEFAULT = ICYMIInfoScreens.DEFAULT;
const object4 = {};
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton();
object4.render = render_111903;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const ICYMI_ONBOARDING_OVERVIEW = ImpressionNames.ICYMI_ONBOARDING_OVERVIEW;
object4.impressionName = ICYMI_ONBOARDING_OVERVIEW;
object4.impressionProperties = {extended_onboarding: extendedOnboarding};
object3[DEFAULT] = object4;
const TOPICS_CLOUD = ICYMIInfoScreens.TOPICS_CLOUD;
const skipIntroBinding = skipIntro;
const navigatorHeaderNativeModule = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const r4 = skipIntroBinding ? navigatorHeaderNativeModule.getHeaderCloseButton(function() {
return importDefault(dependencyMap[7]).popWithKey(require(dependencyMap[3]).ICYMI_INFO_MODAL_KEY);
}) : navigatorHeaderNativeModule.getHeaderBackButton();
const ICYMI_ONBOARDING_TOPICS = ImpressionNames.ICYMI_ONBOARDING_TOPICS;
object3[TOPICS_CLOUD] = {headerLeft: r4, headerRight: headerRight_111905, render: render_111907,
impressionName: ICYMI_ONBOARDING_TOPICS};
const JOIN_GUILDS = ICYMIInfoScreens.JOIN_GUILDS;
const object6 = {};
object6.headerLeft = navigatorHeaderNativeModule.getHeaderBackButton();
object6.headerRight = headerRight_111908;
object6.render = render_111910;
const ICYMI_ONBOARDING_SELECT_GUILDS = ImpressionNames.ICYMI_ONBOARDING_SELECT_GUILDS;
object6.impressionName = ICYMI_ONBOARDING_SELECT_GUILDS;
object3[JOIN_GUILDS] = object6;
return object3;
}
function render_111903() { // fn#111903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:464, offset: 0x023b76c9, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component extendedOnboarding={extendedOnboarding} />)(importDefault(14831) /* metro dependency 14831: ICYMIInfoScreen */);
}
function headerRight_111905() { // fn#111905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:794, offset: 0x023b7738, size: 121 bytes, params: 1, frame: 19
var environment;
var r0;
var HeaderActionButton;
var intl;
let value = environment.__proto__;
const skipIntroBinding = skipIntro;
value = null;
if (skipIntroBinding) {
r0 = value;
} else {
value = environment.__proto__.__proto__.__proto__;
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = <HeaderActionButton text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])} onPress={onPress_111906} />;
r0 = value;
}
return r0;
}
function headerRight_111908() { // fn#111908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:1172, offset: 0x023b782a, size: 109 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])}
onPress={onPress_111909}
/>
);
}
function render_111910() { // fn#111910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:1367, offset: 0x023b78e7, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(importDefault(14847) /* metro dependency 14847: ICYMIJoinGuildsScreen */);
}
function headerRight_111905OnPress() { // fn#111906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:889, owner: headerRight_111905.onPress, offset: 0x023b77b1, size: 82 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__.__proto__;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
ICYMIAnalytics.trackFeedOnboardingScreenSkipped({location: 'topics'});
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function headerRight_111908OnPress() { // fn#111909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15026:1260, owner: headerRight_111908.onPress, offset: 0x023b7897, size: 80 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__.__proto__;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
ICYMIAnalytics.trackFeedOnboardingScreenSkipped({location: 'guilds'});
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
@@ -0,0 +1,10 @@
/* Metro module 14830; source: modules/icymi/native/info_modal/ICYMIInfoModalTypes.tsx; dependencies: [2] */
function _fun111912(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15027:6, offset: 0x023b79de, size: 135 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/info_modal/ICYMIInfoModalTypes.tsx');
exports.ICYMI_INFO_MODAL_KEY = 'icymi-info-modal';
exports.ICYMI_DISCOVERABLE_GUILDS_PAGE_SIZE = 48;
exports.ICYMIInfoScreens = {DEFAULT: 'default', TOPICS_CLOUD: 'topics_cloud', JOIN_GUILDS: 'join_guilds'};
}
@@ -0,0 +1,204 @@
/* Metro module 14831; source: modules/icymi/native/info_modal/ICYMIInfoScreen.tsx; dependencies: [57, 5, 31, 27, 482, 33, 4501, 697, 5314, 1585, 4048, 1484, 9589, 14832, 5080, 9603, 9611, 1244, 5475, 14834, 14835, 14836, 14837, 4573, 9390, 10229, 4073, 4080, 14838, 1962, 4578, 2] */
function _fun111913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:6, offset: 0x023b7a65, size: 818 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
const env0_8 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'backgroundColor': null, 'position': 'relative', 'flex': 1,
backgroundColor: BACKGROUND_BASE_LOWER};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.closeIcon = {'position': 'absolute', 'justifyContent': 'center', 'left': 12, 'width': 24, 'height': null,
'zIndex': 2, height: NAV_BAR_HEIGHT};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.closeIconColor = {backgroundColor: MOBILE_TEXT_HEADING_PRIMARY};
object2.bgImage = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'aspectRatio': 1.2515923566878981,
'overflow': 'visible'};
object2.headerImg = {'position': 'absolute', 'top': 16, 'width': 361, 'height': 240};
object2.flashIcon = {'marginBottom': 32, 'marginTop': 132};
object2.subContainer = {'flex': 1, 'paddingHorizontal': 16, 'paddingTop': 16};
object2.header = {'alignItems': 'center', 'paddingHorizontal': 12};
object2.headerText = {'textAlign': 'center', 'marginTop': 8};
const object3 = {'gap': 16, 'padding': 16, 'backgroundColor': null, 'borderRadius': null, 'marginTop': 40};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object3.backgroundColor = CARD_BACKGROUND_DEFAULT;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.body = object3;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.divider = {'height': 1, 'backgroundColor': null, 'marginLeft': 48, backgroundColor: BORDER_SUBTLE};
object2.infoRow = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'overflow': 'hidden',
'gap': 16};
const object4 = {padding: 8};
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.infoIcon = object4;
object2.infoText = {flexShrink: 1};
object2.hint = {margin: 12};
const object6 = {'position': 'absolute', 'bottom': 0};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.right = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingBottom = PX_8;
object2.footer = object6;
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/info_modal/ICYMIInfoScreen.tsx');
exports.default = ICYMIInfoScreen;
}
function ICYMIInfoScreen({extendedOnboarding}) { // fn#111914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:1557, offset: 0x023b7d97, size: 1924 bytes, params: 2, frame: 44
const styles = useStyles();
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_5;
const value6 = binding.useCallback(env0_4(_fun111916), [extendedOnboarding, value4]);
binding.useLayoutEffect(_fun111919, [value4]);
const [property, env0_2] = env0_3(binding.useState(false), 2);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const items4 = [{marginTop: top}];
items4[1] = styles.closeIcon;
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
const object = {source: importDefault(9611) /* metro dependency 9611 */, onPress: onPress_111921};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.accessibilityLabel = Reflect.apply(string, intl, [t.cpT0Cq]);
object.color = styles.closeIconColor.backgroundColor;
const items2 = [<View style={items4}><HeaderIconButton {...object} /></View>];
const items3 = [styles.container];
items3[1] = {marginBottom: bottom};
const value10 = ((Component) => <Component source={{uri: importDefault(14834) /* metro dependency 14834: bgFade3xPng */}} style={styles.bgImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items5 = [styles.subContainer];
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
items5[1] = {marginTop: top + PX_12};
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
const object2 = {};
const LIGHT = ThemeTypes.LIGHT;
object2.uri = value3 === LIGHT ? importDefault(14835) /* metro dependency 14835: headerImageLight3xPng */ : importDefault(14836) /* metro dependency 14836: headerImageDark3xPng */;
const items6 = [<FastImage source={object2} style={styles.headerImg} />];
items6[1] = <FastImage source={importDefault(14837) /* metro dependency 14837 */} style={styles.flashIcon} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items6[2] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jnXV/V'])}</Text>;
items6[3] = <Text variant="text-md/normal" color="text-default" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9SjvoK'])}</Text>;
const view = <View style={styles.header}>{items6}</View>;
let infoRow = styles.infoRow;
let infoIcon = styles.infoIcon;
const ServerIcon = (require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon;
const view2 = <View style={infoIcon}><ServerIcon size="sm" color="interactive-text-active" /></View>;
let infoText = styles.infoText;
const items9 = [<View style={infoRow}>{view2}<Text variant="text-md/medium" color="mobile-text-heading-primary" style={infoText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.knxfqR)}</Text></View>];
items9[1] = <View style={styles.divider} />;
infoRow = styles.infoRow;
infoIcon = styles.infoIcon;
const NewUserIcon = (require(10229) /* metro dependency 10229: NewUserIcon */).NewUserIcon;
const view3 = <View style={infoIcon}><NewUserIcon size="sm" color="interactive-text-active" /></View>;
infoText = styles.infoText;
string = intl.string;
const BnUXZi = (require(1244) /* metro dependency 1244: indexNative */).t.BnUXZi;
items9[2] = <View style={infoRow}>{view3}<Text variant="text-md/medium" color="mobile-text-heading-primary" style={infoText}>{Reflect.apply(string,
intl, [BnUXZi])}</Text></View>;
items9[3] = <View style={styles.divider} />;
infoRow = styles.infoRow;
infoIcon = styles.infoIcon;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
items9[4] = <View style={infoRow}><View style={infoIcon}><CircleCheckIcon size="sm" color="interactive-text-active" /></View><Text variant="text-md/medium" color="mobile-text-heading-primary" style={styles.infoText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.itb1rh)}</Text></View>;
items2[1] = <ScrollView style={items3}>{value10}<View style={items5}>{view}<View><View style={styles.body}>{items9}</View><Text variant="text-xs/medium" color="text-muted" style={styles.hint}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['jVS/hc'],
{feedbackHook: feedbackHook})}</Text></View></View></ScrollView>;
const items13 = [{marginBottom: bottom}];
items13[1] = styles.footer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[2] = <View style={items13}><Button size="lg" loading={property} text={extendedOnboarding ? Reflect.apply(string,
intl, [t.LhlgY9]) : Reflect.apply(string, intl, [t['+IrDzN']])} onPress={value6} /></View>;
return (
<>
{items2}
</>
);
}
function* _fun111916() { // fn#111916, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:1706, offset: 0x023b8526, size: 186 bytes, params: 1, frame: 18
var environment;
var binding;
var binding2;
if (true) {
value = environment.__proto__;
if (require) {
binding = env2_0;
binding2 = env2_2;
binding(binding2[12]).ICYMIAnalytics.trackFeedOnboardingScreenSkipped({location: 'overview'});
dependencyMap(true);
value = binding(binding2[13]);
yield value.maybeFetchGuildDiscoveryCategories();
value = undefined;
if (false) {
return value;
}
global.setTimeout(function() {
importDefault.navigate('topics_cloud');
global.setTimeout(_fun111918, 500);
}, 100);
} else {
env2_1(env2_2[14]).pop();
}
}
}
function _fun111919() { // fn#111919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:1983, offset: 0x023b8619, size: 37 bytes, params: 1, frame: 12
env0_1.setOptions({header: function() {
return null;
}});
}
function ICYMIInfoScreenOnPress() { // fn#111921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:2194, owner: ICYMIInfoScreen.onPress, offset: 0x023b863e, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function feedbackHook(a0, a1) { // fn#111922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:3993, owner: ICYMIInfoScreen.feedbackHook, offset: 0x023b8663, size: 80 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/medium"
color="text-link"
onPress={onPress_111923}
key={a1}
>
{a0}
</Text>
);
}
function _fun111917() { // fn#111917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:1871, offset: 0x023b85e0, size: 57 bytes, params: 1, frame: 13
importDefault.navigate('topics_cloud');
global.setTimeout(function() {
return dependencyMap(false);
}, 500);
}
function feedbackHookOnPress() { // fn#111923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15028:4068, owner: ICYMIInfoScreen.feedbackHook.onPress, offset: 0x023b86b3, size: 82 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[29]);
value = value(dependencyMap[28], dependencyMap.paths);
return Reflect.apply(openLazy, defaultImport, [value, 'ICYMIFeedbackSheet', {}]);
}
@@ -0,0 +1,474 @@
/* Metro module 14847; source: modules/icymi/native/info_modal/ICYMIJoinGuildsScreen.tsx; dependencies: [5, 57, 31, 27, 4502, 1867, 14846, 661, 33, 14815, 697, 6819, 9390, 4017, 4504, 8671, 566, 1423, 7599, 5475, 5278, 4573, 4578, 4073, 1244, 1585, 9589, 9580, 3857, 5080, 14830, 8416, 2] */
function _fun112165(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6, offset: 0x023bd37a, size: 395 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const env0_7 = value.StyleSheet;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const icymiPopularGuildsStore = importDefault(14846) /* metro dependency 14846: ICYMIPopularGuildsStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
const env0_16 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112177);
object = {code: 'function ICYMIJoinGuildsScreenTsx1(){const{withTiming,selectedGuilds,SELECTED_SERVER_SIZE_WITH_BORDER,tokens}=this.__closure;return{opacity:withTiming(selectedGuilds.length>0?1:0),height:withTiming(selectedGuilds.length>0?SELECTED_SERVER_SIZE_WITH_BORDER:0),marginTop:withTiming(selectedGuilds.length>0?tokens.space.PX_24:0)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/info_modal/ICYMIJoinGuildsScreen.tsx');
exports.default = ICYMIJoinGuildsScreen;
}
function SelectedServerIcon({guild, index}) { // fn#112166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:2079, offset: 0x023bd505, size: 278 bytes, params: 2, frame: 23
const value2 = env0_16();
const value3 = index < 3;
return (
<View
style={[value2.selectedServerIcon, guild == null && value2.noServerContainer,
guild == null && !value3 && value2.noServerExtraContainer]}
>
{guild != null ? ((Component) => <Component style={value2.guildIconBorder} guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : value3 ? ((ServerIcon) => <ServerIcon size="md" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED} />)((require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon) : null}
</View>
);
}
function SelectedServersRow({selectedGuilds}) { // fn#112167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:2768, offset: 0x023bd61b, size: 549 bytes, params: 2, frame: 25
var object2;
const value2 = env0_16();
let binding = env0_5;
const value3 = binding.useCallback(_fun112168, [selectedGuilds]);
binding = env0_5;
const useState = binding.useState;
const value5 = env0_4(Reflect.apply(useState, binding, [selectedGuilds.length]), 2);
const property = value5[0];
const env0_2 = value5[1];
const value6 = env0_5.useRef(null);
env0_5.useEffect(_fun112169, [property, selectedGuilds.length]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = SelectedServersRow_;
object2 = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
selectedGuilds: selectedGuilds, SELECTED_SERVER_SIZE_WITH_BORDER: env0_15};
object2.tokens = importDefault(697) /* metro dependency 697: native */;
closure.__closure = object2;
closure.__workletHash = 2911488630455;
closure.__initData = env0_17;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [value2.selectedServersRowContainer, value7];
const FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
const defaultImportProps = {ref: value6, sections: [selectedGuilds.length >= 3 ? selectedGuilds.length + 1 : 3]};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
defaultImportProps.insetStart = PX_24;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
defaultImportProps.insetEnd = PX_12;
defaultImportProps.renderItem = value3;
defaultImportProps.estimatedListSize = 'windowSize';
binding = env0_15;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
defaultImportProps.itemSize = binding + PX_12;
defaultImportProps.horizontal = true;
defaultImportProps.listId = 'selected-servers-list';
defaultImportProps.showsHorizontalScrollIndicator = false;
return (
<View style={items2}>
<FastestListAndroid {...defaultImportProps} />
</View>
);
}
function CutoutGuildBanner({guild}) { // fn#112171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:3869, offset: 0x023bd9d1, size: 514 bytes, params: 2, frame: 26
var object2;
const value3 = env0_16();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value4 = !useReducedMotion;
const r15 = guild.banner != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getAnimatableSourceWithFallback(useReducedMotion ? value4 : guild.features.has(GuildFeatures.ANIMATED_BANNER),
_fun112173) : undefined;
object2 = {style: value3.bannerImage};
const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
const RoundedRect = CutoutShape.RoundedRect;
const clipView = <ClipView cutouts={[{'shape': null, 'x': 8, 'y': 46, 'width': 56, 'height': 56, 'cornerRadius': 20,
shape: RoundedRect}]}>{guild.banner != null ? ((Component) => <Component style={value3.bannerImage} source={r15} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */) : <View style={[value3.bannerImage,
value3.emptyBanner]} />}</ClipView>;
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const items4 = [value3.guildIcon];
items4[1] = value3.guildIconBorder;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
return (
<View {...object2}>
{clipView}
<GuildIcon
style={items4}
guild={guild}
size={LARGE}
animate={value4}
/>
</View>
);
}
function FeaturedServer({guild, selected, loading, handlePress}) { // fn#112174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:4538, offset: 0x023bdc1a, size: 744 bytes, params: 2, frame: 36
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value3 = env0_16();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112175);
const value5 = env0_5.useCallback(function() {
handlePress(guild);
}, [guild, handlePress]);
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const backgroundColor = value3.pressableUnderlayColor.backgroundColor;
const featuredServerContainer = value3.featuredServerContainer;
const cutoutGuildBanner = <CutoutGuildBanner guild={guild} />;
const featuredServerInnerContainer = value3.featuredServerInnerContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text maxFontSizeMultiplier={1} style={value3.featuredServerTitle} variant="text-md/semibold" color="mobile-text-heading-primary">{guild.name}</Text>];
items2[1] = <Text maxFontSizeMultiplier={1} lineClamp={2} variant="text-xs/normal" color="text-default">{guild.description}</Text>;
const buttonContainer = value3.buttonContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={buttonContainer}><Button accessibilityHint="checkbox" accessibilityState={{checked: selected}} disabled={value4} icon={selected ? ((CircleCheckIcon) => <CircleCheckIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CONNECTED_TEXT_DEFAULT} />)((require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon) : undefined} text={value4 ? loading ? selected ? intl.string(t['TwueC+']) : intl.string(t.XqMe3N) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cEnaWx) : selected ? intl.string(t['TwueC+']) : intl.string(t.XqMe3N)} size="sm" onPress={value5} variant={value4 ? 'secondary' : selected ? 'active' : 'secondary'} grow /></View>;
return (
<PressableHighlight
underlayColor={backgroundColor}
unstable_pressDelay={50}
style={featuredServerContainer}
onPress={value5}
>
{cutoutGuildBanner}
<View style={featuredServerInnerContainer}>
{items2}
</View>
</PressableHighlight>
);
}
function _fun112177(a0) { // fn#112177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:288, offset: 0x023bdf02, size: 999 bytes, params: 2, frame: 19
const object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'backgroundColor': null, 'position': 'relative', 'flex': 1,
backgroundColor: BACKGROUND_BASE_LOWER, marginHorizontal: a0.margin};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.scrollContentContainer = {paddingTop: PX_8};
const object3 = {'position': 'absolute', 'bottom': 0};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.right = PX_24;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.paddingBottom = PX_8;
object2.footer = object3;
const object6 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.marginTop = PX_24;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.marginBottom = PX_8;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.marginHorizontal = PX_24;
object2.title = object6;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.subtitle = {marginHorizontal: PX_24};
const object9 = {};
object9.height = StyleSheet.hairlineWidth;
object9.width = '100%';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object9.backgroundColor = BORDER_SUBTLE;
object2.separator = object9;
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object10.backgroundColor = CARD_BACKGROUND_DEFAULT;
object10.overflow = 'hidden';
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginHorizontal = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginVertical = PX_8;
object2.featuredServerContainer = object10;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.featuredServerInnerContainer = {marginHorizontal: PX_12, marginTop: 36};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.buttonContainer = {marginBottom: PX_12, marginTop: a0.margin};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.featuredServerTitle = {marginBottom: PX_8};
object2.guildIcon = {'position': 'absolute', 'top': 50, 'left': 12};
object2.bannerImage = {'height': 73, 'width': '100%'};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object2.emptyBanner = {backgroundColor: BACKGROUND_MOD_SUBTLE};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.guildsScrollContainer = {flex: 1, marginHorizontal: PX_8};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.guildsColumn = {'flex': 1, 'flexDirection': 'column', gap: PX_16};
const object11 = {height: env0_15, width: '100%'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object11.marginBottom = PX_24;
object2.selectedServersRowContainer = object11;
const object12 = {'flex': 1, 'width': null, 'height': null, 'alignItems': 'center', 'justifyContent': 'center'};
object12.width = env0_15;
object12.height = env0_15;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object12.borderColor = BORDER_STRONG;
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object12.borderWidth = 1;
object2.selectedServerIcon = object12;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.noServerContainer = {backgroundColor: BACKGROUND_MOD_MUTED, borderStyle: 'dashed'};
object2.noServerExtraContainer = {opacity: 0.4};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object2.pressableUnderlayColor = {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
const object13 = {};
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.guildIconBorder = object13;
return object2;
}
function ICYMIJoinGuildsScreen() { // fn#112178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:5789, offset: 0x023be2e9, size: 1139 bytes, params: 1, frame: 36
var r5;
var object9;
var Button;
var object11;
const value2 = env0_16();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ICYMIPopularGuildsStore],
function() {
return ICYMIPopularGuildsStore.getOnboardingGuilds();
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ICYMIPopularGuildsStore],
function() {
return ICYMIPopularGuildsStore.getOnboardingCategoryIds();
});
const currentOnboardingGuildOffset = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIPopularGuildsStore],
function() {
return ICYMIPopularGuildsStore.getCurrentOnboardingGuildOffset();
});
const binding = env0_5Binding;
const useState = binding.useState;
const Set = global.Set;
const value5 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const value8 = env0_4(Reflect.apply(useState, binding, [set instanceof Object ? set : value5]), 2);
const property = value8[0];
const env0_3 = property;
var env0_4 = value8[1];
var [property2, env0_5] = env0_4(env0_5Binding.useState([]), 2);
const [property3, env0_7] = env0_4(env0_5Binding.useState(0), 2);
const value13 = env0_5Binding.useCallback(_fun112182, [property]);
const [property4, env0_10] = env0_4(env0_5Binding.useState(false), 2);
const value17 = env0_5Binding.useCallback(env0_3(_fun112189), [property]);
const value18 = env0_5Binding.useCallback(_fun112190, [value4, currentOnboardingGuildOffset, property3,
value3.length]);
const value19 = env0_5Binding.useCallback(_fun112191, [property4, property, value13]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const title = value2.title;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<Text variant="heading-xl/semibold" color="mobile-text-heading-primary" style={title}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['19ldCF'])}</Text>];
items2[1] = <Text variant="text-sm/normal" color="text-muted" style={value2.subtitle}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.u0KPUS)}</Text>;
items2[2] = <SelectedServersRow selectedGuilds={property2} />;
items2[3] = <View style={value2.separator} />;
const guildsScrollContainer = value2.guildsScrollContainer;
const MasonryFlashList = (require(8416) /* metro dependency 8416: flashList */).MasonryFlashList;
items2[4] = <View style={guildsScrollContainer}><MasonryFlashList data={value3} extraData={property} contentContainerStyle={value2.scrollContentContainer} contentInset={{bottom: 72 + bottom}} numColumns={2} onEndReached={value18} onEndReachedThreshold={0.5} showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} renderItem={value19} estimatedItemSize={229} /></View>;
const value21 = property.size >= 1;
if (value21) {
var viewProps = {style: [{marginBottom: bottom}, value2.footer]};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <View {...viewProps}><Button loading={property4} size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.K50GHd)} onPress={value17} /></View>;
} else {
r5 = value21;
}
items2[5] = r5;
return (
<>
{items2}
</>
);
}
function _fun112168(a0, a1) { // fn#112168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:2843, offset: 0x023bd840, size: 63 bytes, params: 3, frame: 17
return <SelectedServerIcon guild={a1 < selectedGuilds.length ? selectedGuilds[a1] : undefined} index={a1} />;
}
function _fun112169() { // fn#112169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:2993, offset: 0x023bd87f, size: 136 bytes, params: 1, frame: 13
var current;
if (env0_1 < selectedGuilds.length) {
current = env0_3.current;
if (current != null) {
current.scrollToLocation({'animated': true, 'section': 0, item: selectedGuilds.length});
}
env0_2(selectedGuilds.length);
} else if (env0_1 !== selectedGuilds.length) {
env0_2(selectedGuilds.length);
}
}
function SelectedServersRow_() { // fn#112170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:3188, owner: SelectedServersRow._, offset: 0x023bd907, size: 202 bytes, params: 1, frame: 18
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
const length = selectedGuilds.length;
const value3 = 0;
object2.opacity = Reflect.apply(withTiming, timingModule, [length > value3 ? 1 : value3]);
const moduleValue2 = timingModule;
object2.height = moduleValue2.withTiming(selectedGuilds.length > value3 ? env1_15 : value3);
const moduleValue3 = timingModule;
withTiming = moduleValue3.withTiming;
const PX_24 = selectedGuilds.length > value3 ? (importDefault(697) /* metro dependency 697: native */).space.PX_24 : value3;
object2.marginTop = Reflect.apply(withTiming, moduleValue3, [PX_24]);
return object2;
}
function _fun112173(a0) { // fn#112173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:4078, offset: 0x023bdbd3, size: 71 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getGuildBannerSource = value.getGuildBannerSource;
const guildBinding = guild;
return Reflect.apply(getGuildBannerSource, value, [{id: guildBinding.id, banner: guildBinding.banner}, a0]);
}
function _fun112182(a0) { // fn#112182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6215, offset: 0x023be79b, size: 174 bytes, params: 2, frame: 18
const env0_0 = a0;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedOnboardingGuildToggled = ICYMIAnalytics.trackFeedOnboardingGuildToggled;
let binding = env0_3;
Reflect.apply(trackFeedOnboardingGuildToggled, ICYMIAnalytics, [{guildId: a0.id, toggled: !binding.has(a0.id)}]);
const value2 = binding.has(a0.id);
binding = env0_4;
if (value2) {
binding(_fun112183);
binding = env0_5;
binding(function(a0) {
return a0.filter(_fun112185);
});
} else {
binding(_fun112186);
binding = env0_5;
binding(_fun112187);
}
}
function* _fun112189() { // fn#112189, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6515, offset: 0x023be8fa, size: 499 bytes, params: 1, frame: 23
var popWithKey;
var ICYMI_INFO_MODAL_KEY;
var binding4;
if (true) {
value = environment.__proto__;
ICYMIPopularGuildsStore(true);
var binding = env2_1;
var value4 = binding(env2_2[27]);
var gravityJoinGuild = value4.gravityJoinGuild;
var Array = global.Array;
yield Reflect.apply(gravityJoinGuild, value4, [Array.from(env1_3), 'icymi_info_modal']);
if (false) {
return undefined;
}
binding = env2_1;
var binding2 = env2_2;
if (value) {
value = binding(binding2[27]);
yield value.fetchDehydrated({'isReloading': true, 'forceRefresh': true});
value = undefined;
if (false) {
return value;
}
binding = env2_1;
value = binding(env2_2[27]);
yield value.reloadICYMITab();
value = undefined;
if (false) {
return value;
}
binding = env2_1;
binding4 = env2_2;
value = binding(binding4[27]);
value.getGuildChannelScores();
value = binding(binding4[27]);
value.getRecommendedGuilds();
value = binding(binding4[29]);
popWithKey = value.popWithKey;
binding = env2_0;
ICYMI_INFO_MODAL_KEY = binding(binding4[30]).ICYMI_INFO_MODAL_KEY;
} else {
value = binding(binding2[28]);
var open = value.open;
var binding3 = env2_0;
var intl = binding3(binding2[24]).intl;
var string = intl.string;
var CG4Hks = binding3(binding2[24]).t.CG4Hks;
Reflect.apply(open, value, [{key: 'ICYMIInfoModal', content: Reflect.apply(string, intl, [CG4Hks])}]);
value = binding(binding2[27]);
value.fetchDehydrated();
value = binding(binding2[27]);
value.getGuildChannelScores();
value = binding(binding2[27]);
value.getRecommendedGuilds();
value = binding(binding2[29]);
popWithKey = value.popWithKey;
ICYMI_INFO_MODAL_KEY = binding3(binding2[30]).ICYMI_INFO_MODAL_KEY;
}
Reflect.apply(popWithKey, value, [ICYMI_INFO_MODAL_KEY]);
}
}
function _fun112190() { // fn#112190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:7084, offset: 0x023beaed, size: 115 bytes, params: 1, frame: 16
var value2;
var value3;
const binding = env0_6;
let currentOnboardingGuildOffsetBinding = currentOnboardingGuildOffset;
if (!(binding > currentOnboardingGuildOffsetBinding)) {
if (!(env0_0.length >= 150)) {
currentOnboardingGuildOffsetBinding = currentOnboardingGuildOffset;
value2 = environment.__proto__;
value3 = currentOnboardingGuildOffsetBinding + (require(14830) /* metro dependency 14830: ICYMIInfoModalTypes */).ICYMI_DISCOVERABLE_GUILDS_PAGE_SIZE;
env0_7(value3);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).fetchPopularGuildsFromCategories(env0_1,
value3);
}
}
}
function _fun112191({item}) { // fn#112191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:7258, offset: 0x023beb60, size: 86 bytes, params: 2, frame: 18
const binding = env0_3;
return (
<FeaturedServer
guild={item}
loading={env0_9}
selected={binding.has(item.id)}
handlePress={env0_8}
key={item.id}
/>
);
}
function _fun112183(a0) { // fn#112183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6328, offset: 0x023be849, size: 58 bytes, params: 2, frame: 11
a0.delete(env0_0.id);
const Set = global.Set;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(a0);
return set instanceof Object ? set : value;
}
function _fun112184(a0) { // fn#112184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6364, offset: 0x023be883, size: 24 bytes, params: 2, frame: 11
return a0.filter(_fun112185);
}
function _fun112186(a0) { // fn#112186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6401, offset: 0x023be8b5, size: 58 bytes, params: 2, frame: 11
a0.add(env0_0.id);
const Set = global.Set;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(a0);
return set instanceof Object ? set : value;
}
function _fun112185({id}) { // fn#112185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15044:6377, offset: 0x023be89b, size: 26 bytes, params: 2, frame: 2
const id = env1_0.id;
return id !== id;
}
@@ -0,0 +1,229 @@
/* Metro module 14839; source: modules/icymi/native/info_modal/ICYMITopicsScreen.tsx; dependencies: [5, 57, 31, 27, 14833, 14840, 33, 8658, 8835, 6698, 14841, 8841, 6686, 13167, 13140, 9411, 14842, 8656, 14844, 8659, 11141, 4501, 697, 3874, 4578, 1585, 1484, 14846, 1962, 9580, 3857, 1244, 566, 9589, 4573, 2] */
function _fun111983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:6, offset: 0x023b9cee, size: 720 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const StyleSheet = value.StyleSheet;
const env0_7 = value.ScrollView;
const guildDiscoveryCategoryStore = importDefault(14833) /* metro dependency 14833: GuildDiscoveryCategoryStore */;
const env0_9 = (require(14840) /* metro dependency 14840: GuildSettingsDiscoveryConstants */).GuildPrimaryCategory;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object8 = {'position': 'absolute', 'bottom': 0};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.right = PX_24;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingBottom = PX_8;
object2.footer = object8;
const object9 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.marginTop = PX_24;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.marginBottom = PX_8;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.marginHorizontal = PX_24;
object2.title = object9;
const object10 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object10.marginBottom = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object10.marginHorizontal = PX_24;
object2.subtitle = object10;
const object11 = {};
object11.height = StyleSheet.hairlineWidth;
object11.width = '100%';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object11.backgroundColor = BORDER_SUBTLE;
object2.separator = object11;
const object12 = {'flex': 1, 'marginHorizontal': null, 'flexWrap': 'wrap', 'flexDirection': 'row'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.marginHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object12.gap = PX_12;
object2.topicsContainer = object12;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.scrollContentContainer = {paddingTop: PX_24};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/info_modal/ICYMITopicsScreen.tsx');
exports.default = ICYMITopicsScreen;
}
function WordTopic({topic, categoryid, selected, handlePress}) { // fn#111984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:953, offset: 0x023b9fbe, size: 1199 bytes, params: 2, frame: 21
var r0;
var Button;
var value;
const GAMING = GuildPrimaryCategory.GAMING;
const r5 = GAMING === categoryid ? ((GameControllerIcon) => <GameControllerIcon size="md" color="redesign-button-tertiary-text" />)((require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon) : GuildPrimaryCategory.ENTERTAINMENT === categoryid ? ((TvIcon) => <TvIcon size="md" color="redesign-button-tertiary-text" />)((require(8835) /* metro dependency 8835: TvIcon */).TvIcon) : GuildPrimaryCategory.GENERAL_CHATTING === categoryid ? ((ForumIcon) => <ForumIcon size="md" color="redesign-button-tertiary-text" />)((require(6698) /* metro dependency 6698: ForumIcon */).ForumIcon) : GuildPrimaryCategory.SCIENCE_AND_TECH === categoryid ? ((ScienceIcon) => <ScienceIcon size="md" color="redesign-button-tertiary-text" />)((require(14841) /* metro dependency 14841: ScienceIcon */).ScienceIcon) : GuildPrimaryCategory.MUSIC === categoryid ? ((MusicIcon) => <MusicIcon size="md" color="redesign-button-tertiary-text" />)((require(8841) /* metro dependency 8841: MusicIcon */).MusicIcon) : GuildPrimaryCategory.EDUCATION === categoryid ? ((BookCheckIcon) => <BookCheckIcon size="md" color="redesign-button-tertiary-text" />)((require(6686) /* metro dependency 6686: BookCheckIcon */).BookCheckIcon) : GuildPrimaryCategory.CREATIVE_ARTS === categoryid ? ((PaintPaletteIcon) => <PaintPaletteIcon size="md" color="redesign-button-tertiary-text" />)((require(13167) /* metro dependency 13167: PaintPaletteIcon */).PaintPaletteIcon) : GuildPrimaryCategory.FINANCE === categoryid ? ((PiggyBankIcon) => <PiggyBankIcon size="md" color="redesign-button-tertiary-text" />)((require(13140) /* metro dependency 13140: PiggyBankIcon */).PiggyBankIcon) : GuildPrimaryCategory.BOTS === categoryid ? ((RobotIcon) => <RobotIcon size="md" color="redesign-button-tertiary-text" />)((require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon) : GuildPrimaryCategory.SPORTS === categoryid ? ((MedalIcon) => <MedalIcon size="md" color="redesign-button-tertiary-text" />)((require(14842) /* metro dependency 14842: MedalIcon */).MedalIcon) : GuildPrimaryCategory.TRAVEL_AND_FOOD === categoryid ? ((FoodIcon) => <FoodIcon size="md" color="redesign-button-tertiary-text" />)((require(8656) /* metro dependency 8656: FoodIcon */).FoodIcon) : GuildPrimaryCategory.FASHION_AND_BEAUTY === categoryid ? ((PaintbrushThinIcon) => <PaintbrushThinIcon size="md" color="redesign-button-tertiary-text" />)((require(14844) /* metro dependency 14844: PaintbrushThinIcon */).PaintbrushThinIcon) : GuildPrimaryCategory.FITNESS_AND_HEALTH === categoryid ? ((BicycleIcon) => <BicycleIcon size="md" color="redesign-button-tertiary-text" />)((require(8659) /* metro dependency 8659: BicycleIcon */).BicycleIcon) : categoryid !== 16 ? undefined : ((PencilSparkleIcon) => <PencilSparkleIcon size="md" color="redesign-button-tertiary-text" />)((require(11141) /* metro dependency 11141: PencilSparkleIcon */).PencilSparkleIcon);
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: selected});
if (r5 == null) {
r0 = null;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
value = 'tertiary';
value = <Button accessibilityRole={accessibilityRole} accessibilityState={accessibilityState} variant={selected ? 'primary' : value} text={topic} onPress={function() {
return handlePress(categoryid);
}} icon={r5} />;
r0 = value;
}
return r0;
}
function ICYMITopicsScreen() { // fn#111986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:2831, offset: 0x023ba46d, size: 836 bytes, params: 1, frame: 33
var r5;
var object8;
var Button;
var object10;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_5;
let useState = binding.useState;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const value4 = Reflect.apply(useState, binding, [set instanceof Object ? set : value2]);
const binding2 = env0_4;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_1 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value6[0];
const env0_2 = value6[1];
const value7 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value9 = binding.useCallback(value7(_fun111988), [value7, property]);
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildDiscoveryCategoryStore],
function() {
return GuildDiscoveryCategoryStore.getAllCategories();
});
var env0_4 = binding.useCallback(_fun111991, [property]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Y5d99L = (require(1244) /* metro dependency 1244: indexNative */).t.Y5d99L;
const items2 = [<Text variant="heading-xl/semibold" color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(string,
intl, [Y5d99L])}</Text>];
string = intl.string;
const MGZsfv = (require(1244) /* metro dependency 1244: indexNative */).t.MGZsfv;
items2[1] = <Text variant="text-sm/normal" color="text-muted" style={styles.subtitle}>{Reflect.apply(string, intl,
[MGZsfv])}</Text>;
items2[2] = <View style={styles.separator} />;
items2[3] = <ScrollView showsVerticalScrollIndicator={false} style={styles.container} contentContainerStyle={styles.scrollContentContainer} contentInset={{bottom: 72 + bottom}}><View style={styles.topicsContainer}>{value10.map(_fun111994)}</View></ScrollView>;
const value12 = property.size > 0;
if (value12) {
var viewProps = {style: [{marginBottom: bottom}, styles.footer]};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <View {...viewProps}><Button loading={property2} size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN)} onPress={value9} /></View>;
} else {
r5 = value12;
}
items2[4] = r5;
return (
<>
{items2}
</>
);
}
function* _fun111988() { // fn#111988, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:3021, offset: 0x023ba7bc, size: 311 bytes, params: 1, frame: 23
var environment;
var binding3;
var open;
var object2;
var intl;
if (true) {
value = environment.__proto__;
dependencyMap(true);
var binding = env2_0;
var binding2 = env2_2;
yield binding(binding2[28])(binding2[27], binding2.paths);
if (false) {
return undefined;
}
var value7 = env2_1(env2_2[29]);
var fetchPopularGuildsFromCategories = value7.fetchPopularGuildsFromCategories;
var Array = global.Array;
yield Reflect.apply(fetchPopularGuildsFromCategories, value7, [Array.from(require), 0]);
var value9 = undefined;
if (false) {
return value9;
}
if (value9) {
env1_3.push('join_guilds');
} else {
binding = env2_1;
binding3 = env2_2;
value = binding(binding3[30]);
open = value.open;
object2 = {key: 'ICYMIInfoModal'};
binding = env2_0;
intl = binding(binding3[31]).intl;
object2.content = intl.string(binding(binding3[31]).t.CG4Hks);
Reflect.apply(open, value, [object2]);
}
global.setTimeout(function() {
return dependencyMap(false);
}, 500);
}
}
function _fun111991(a0) { // fn#111991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:3366, offset: 0x023ba91a, size: 128 bytes, params: 2, frame: 17
const env0_0 = a0;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
const trackFeedOnboardingCategoryToggled = ICYMIAnalytics.trackFeedOnboardingCategoryToggled;
let binding = env0_0;
Reflect.apply(trackFeedOnboardingCategoryToggled, ICYMIAnalytics, [{categoryId: a0, toggled: !binding.has(a0)}]);
const value2 = binding.has(a0);
binding = env0_1;
if (value2) {
binding(_fun111992);
} else {
binding(_fun111993);
}
}
function _fun111994(a0) { // fn#111994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:4049, offset: 0x023baa04, size: 91 bytes, params: 2, frame: 18
const binding = env0_0;
return (
<WordTopic
selected={binding.has(a0.categoryId)}
topic={a0.name}
categoryid={a0.categoryId}
handlePress={env0_4}
key={a0.categoryId}
/>
);
}
function _fun111992(a0) { // fn#111992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:3475, offset: 0x023ba99a, size: 53 bytes, params: 2, frame: 11
a0.delete(env0_0);
const Set = global.Set;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(a0);
return set instanceof Object ? set : value;
}
function _fun111993(a0) { // fn#111993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15036:3508, offset: 0x023ba9cf, size: 53 bytes, params: 2, frame: 11
a0.add(env0_0);
const Set = global.Set;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(a0);
return set instanceof Object ? set : value;
}
@@ -0,0 +1,599 @@
/* Metro module 14860; source: modules/icymi/native/media/ICYMIMediaMosaic.tsx; dependencies: [57, 31, 27, 4502, 1379, 3793, 1878, 9569, 661, 33, 4501, 697, 4631, 676, 566, 9564, 9543, 4017, 4504, 14861, 5475, 4573, 1244, 9376, 4660, 5278, 9580, 10273, 6711, 14816, 9546, 7230, 1360, 22, 5097, 9544, 4805, 2] */
function _fun112332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6, offset: 0x023c5e4a, size: 519 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = GravityAttachmentMediaMosaic;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Pressable;
const env0_6 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.AnalyticsObjectTypes;
const env0_13 = value.AnalyticsObjects;
const env0_14 = value.AnalyticsPages;
value = require(33) /* metro dependency 33 */;
const env0_15 = value.jsx;
const env0_16 = value.Fragment;
const env0_17 = value.jsxs;
const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112358);
object = {code: 'function ICYMIMediaMosaicTsx1(){const{withTiming,imageFinishedLoading}=this.__closure;return{opacity:withTiming(imageFinishedLoading?0:1,{duration:150})};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/media/ICYMIMediaMosaic.tsx');
exports.default = ICYMIMediaMosaic;
exports.GravityAttachmentMediaMosaic = closure;
}
function isMediaSourceGif(a0) { // fn#112333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:1823, offset: 0x023c6051, size: 75 bytes, params: 2, frame: 17
var r0;
var value;
const isGIFV = a0.isGIFV;
if (isGIFV) {
r0 = isGIFV;
} else {
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.urlMatchesFileExtension(a0.sourceURI,
(require(676) /* metro dependency 676: ConstantsIOS */).GIF_RE_IOS);
r0 = value;
}
return r0;
}
function MediaMosaicVideo({source, height, width, autoplay, style}) { // fn#112334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:1935, offset: 0x023c609c, size: 273 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.videosMuted();
});
const value3 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
const video = importDefault(9543) /* metro dependency 9543: Video */;
let r13 = source.videoURI ?? source.sourceURI;
r13 = r13 ?? source.uri;
return ((Component) => <Component src={{videoURI: r13}} height={height} width={width} postponeRender={false} paused={!autoplay} muted={value2} resizeMode="cover" style={[styles.media,
style]} videoStyle={styles.video} disableFocus={value2 || source.isGIFV} httpEngine={value3} />)(video);
}
function MediaMosaicImage({source, dimensions, style, isSpoiler}) { // fn#112336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:2517, offset: 0x023c61c0, size: 478 bytes, params: 2, frame: 33
const styles = useStyles();
const [property, env0_2] = env0_3(env0_4.useState(false), 2);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = MediaMosaicImageC;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.imageFinishedLoading = property;
closure.__closure = object2;
closure.__workletHash = 7803531897566;
closure.__initData = env0_19;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value6 = env0_4.useMemo(_fun112338, [source.height, source.placeholder, source.width]);
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View style={[value5,
styles.thumbhashMedia]}>{((Component) => <Component source={value6} style={[style, styles.media,
dimensions]} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
return (
<>
{view}
<Image
source={source}
style={[styles.media, style, dimensions]}
onLoadEnd={onLoadEnd}
blurRadius={isSpoiler ? 100 : 0}
key={source.uri}
/>
</>
);
}
function Media({source, dimensions, initialIndex, handlePressMedia, style, visible}) { // fn#112340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:3254, offset: 0x023c6441, size: 1192 bytes, params: 2, frame: 39
var r5;
var Text;
var intl;
const styles = useStyles();
let binding = undefined;
const value3 = binding.useRef(null);
binding = undefined;
const useState = binding.useState;
const spoiler = source.spoiler;
const value6 = undefined(Reflect.apply(useState, binding, [spoiler != null && spoiler]), 2);
const property = value6[0];
const value7 = value6[1].useCallback(_fun112341, [handlePressMedia, initialIndex, property]);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.videosMuted();
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
if (property) {
var viewBindingProps = {style: styles.centerContainer};
var viewBinding2Props = {style: styles.spoilerText};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <View {...viewBindingProps}><View {...viewBinding2Props}><Text maxFontSizeMultiplier={1} variant="heading-md/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['F+x38C']).toUpperCase()}</Text></View></View>;
} else {
r5 = property;
}
const items2 = [r5];
items2[1] = source.videoURI != null && !property && !isMediaSourceGif(source) && useReducedMotion && <View style={styles.centerContainer}><View style={styles.videoIcon}>{((PlayIcon) => <PlayIcon color={(importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_TEXT} size="lg" />)((require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon)}</View></View>;
const uploadUtilsModule = require(4660) /* metro dependency 4660: UploadUtils */;
items2[2] = uploadUtilsModule.isVideo(source.uri) ? isMediaSourceGif(source) ? null : <View style={styles.absoluteContainer}>{((PressableOpacity) => <PressableOpacity style={[styles.muteIcon,
value8 ? styles.iconBg : styles.iconBgSelected]} onPress={onPress_112344} activeOpacity={0.8}>{value8 ? ((VoiceXIcon) => <VoiceXIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} size="sm" />)((require(10273) /* metro dependency 10273: VoiceXIcon */).VoiceXIcon) : ((VoiceNormalIcon) => <VoiceNormalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.BLACK} size="sm" />)((require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : null;
const moduleValue4 = uploadUtilsModule;
items2[3] = (moduleValue4.isVideo(source.uri) || isMediaSourceGif(source)) && source.videoURI != null ? <MediaMosaicVideo source={source} height={dimensions.height} width={dimensions.width} style={style} autoplay={!!visible} /> : <MediaMosaicImage source={source} style={style} dimensions={dimensions} isSpoiler={property} />;
return (
<Pressable
ref={value3}
onPress={value7}
style={dimensions}
>
{items2}
</Pressable>
);
}
function OneImageRow({source, handlePressMedia, widthOverride}) { // fn#112345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:4728, offset: 0x023c6954, size: 153 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = useMaxWidth(widthOverride);
return (
<View style={[styles.imageRow, styles.topRow]}>
<Media
handlePressMedia={handlePressMedia}
initialIndex={0}
source={source}
dimensions={{width: value2, height: value2 / 1.5}}
/>
</View>
);
}
function ThreeImagesRow({sources, start, end, offset, handlePressMedia, widthOverride}) { // fn#112346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:4962, offset: 0x023c69ed, size: 156 bytes, params: 2, frame: 20
const styles = useStyles();
const env0_2 = useMaxWidth(widthOverride);
return (
<View style={[styles.imageRow, start && styles.topRow, end && styles.bottomRow]}>
{sources.map(_fun112347)}
</View>
);
}
function TwoImagesRow({sources, handlePressMedia, end, widthOverride}) { // fn#112348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5271, offset: 0x023c6af1, size: 184 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = useMaxWidth(widthOverride);
const env0_1 = {width: (value2 - 4) / 2, height: (value2 - 4) / 2 / 0.75};
return (
<View style={[styles.imageRow, styles.topRow, end && styles.bottomRow]}>
{sources.map(_fun112349)}
</View>
);
}
function ThreeImages({sources, handlePressMedia, widthOverride}) { // fn#112350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5562, offset: 0x023c6be5, size: 366 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = useMaxWidth(widthOverride);
return (
<View style={[styles.imagesContainer, styles.imageRow]}>
<View style={styles.leftColumn}>
<Media
handlePressMedia={handlePressMedia}
initialIndex={0}
source={sources[0]}
dimensions={{width: 2 * value2 / 3 - 4, height: 2 * value2 / 3}}
/>
</View>
<View style={styles.rightColumn}>
<Media
handlePressMedia={handlePressMedia}
initialIndex={1}
source={sources[1]}
dimensions={{width: value2 / 3, height: value2 / 3}}
/>
<Media
handlePressMedia={handlePressMedia}
initialIndex={2}
source={sources[2]}
dimensions={{width: value2 / 3, height: value2 / 3}}
/>
</View>
</View>
);
}
function FourImages({sources, handlePressMedia, widthOverride}) { // fn#112351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6072, offset: 0x023c6d53, size: 405 bytes, params: 2, frame: 28
const styles = useStyles();
const value2 = useMaxWidth(widthOverride);
const object2 = {width: value2 / 2 - 4, height: (value2 / 2 - 4) / 1.5};
return (
<View style={styles.imagesContainer}>
<View style={[styles.imageRow, styles.topRow]}>
<Media
handlePressMedia={handlePressMedia}
initialIndex={0}
source={sources[0]}
dimensions={object2}
/>
<Media
handlePressMedia={handlePressMedia}
initialIndex={1}
source={sources[1]}
dimensions={object2}
/>
</View>
<View style={[styles.imageRow, styles.bottomRow]}>
<Media
handlePressMedia={handlePressMedia}
initialIndex={2}
source={sources[2]}
dimensions={object2}
/>
<Media
handlePressMedia={handlePressMedia}
initialIndex={3}
source={sources[3]}
dimensions={object2}
/>
</View>
</View>
);
}
function SingleImage({source, initialIndex, handlePressMedia, visible, widthOverride}) { // fn#112352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6626, offset: 0x023c6ee8, size: 194 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = useMaxWidth(widthOverride);
const binding = env0_4;
const useMemo = binding.useMemo;
return (
<View style={styles.imagesContainer}>
<Media
handlePressMedia={handlePressMedia}
initialIndex={initialIndex}
source={source}
dimensions={Reflect.apply(useMemo, binding, [_fun112353, [source.width, source.height, value2]])}
style={styles.singleImage}
visible={visible}
/>
</View>
);
}
function GravityAttachmentMediaMosaic({sources, handlePressMedia, visible, widthOverride}) { // fn#112354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:7103, offset: 0x023c7047, size: 300 bytes, params: 2, frame: 23
const length = sources.length;
const styles = useStyles();
return length === 0 ? null : length === 1 ? <SingleImage widthOverride={widthOverride} initialIndex={0} handlePressMedia={handlePressMedia} source={sources[0]} visible={visible} /> : length === 3 ? <ThreeImages widthOverride={widthOverride} handlePressMedia={handlePressMedia} sources={sources} /> : length === 4 ? <FourImages widthOverride={widthOverride} handlePressMedia={handlePressMedia} sources={sources} /> : <View style={styles.imagesContainer}>{env0_4.useMemo(function() {
var value4;
var items = [];
var lengthBinding = length;
var value2 = 3;
var value3 = lengthBinding % value2;
var r2 = value3 === 0 ? value2 : value3;
items.push(sources.slice(0, r2));
if (r2 < length) {
reducibleLoop2: while (true) {
sourcesBinding = sources;
value4 = r2 + value2;
items.push(sourcesBinding.slice(r2, value4));
if (value4 < length) {
r2 = value4;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
return items;
}, [length, sources]).map(_fun112356)}</View>;
}
function useMaxWidth(a0) { // fn#112357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:7983, offset: 0x023c72ef, size: 98 bytes, params: 2, frame: 14
var r0;
let value = a0;
const binding = env0_4;
const useContext = binding.useContext;
const value3 = undefined;
const ICYMIContext = (require(14816) /* metro dependency 14816: ICYMIContext */).ICYMIContext;
const value4 = Reflect.apply(useContext, binding, [ICYMIContext]);
if (value != null) {
r0 = value;
} else {
value = (value4 == null ? value3 : value4.width) - value4.inset;
value -= 2 * value4.margin;
r0 = value;
}
return r0;
}
function _fun112358() { // fn#112358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:339, offset: 0x023c7351, size: 762 bytes, params: 1, frame: 17
const object3 = {};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.media = object4;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.video = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object3.thumbhashMedia = {'position': 'absolute', 'top': 0, 'left': 0, 'zIndex': 1};
object3.container = {gap: 4};
object3.imagesContainer = {'justifyContent': 'center', 'gap': 4, 'width': '100%'};
object3.imageRow = {'flexDirection': 'row', 'gap': 4};
const object13 = {overflow: 'hidden'};
object13.borderTopEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object13.borderTopStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.topRow = object13;
const object14 = {overflow: 'hidden'};
object14.borderBottomEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object14.borderBottomStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.bottomRow = object14;
const object15 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object15.backgroundColor = BACKGROUND_BASE_LOW;
object15.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object15.padding = 16;
object3.videoIcon = object15;
const object16 = {'position': 'absolute', 'borderRadius': null, 'padding': null, 'bottom': 8, 'right': 8};
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object16.padding = PX_4;
object3.muteIcon = object16;
const object17 = {};
const SPOILER_HIDDEN_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_HIDDEN_BACKGROUND;
object17.backgroundColor = SPOILER_HIDDEN_BACKGROUND;
object17.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object17.paddingHorizontal = PX_12;
object17.paddingVertical = 6;
object3.spoilerText = object17;
const object18 = {overflow: 'hidden'};
object18.borderTopStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object18.borderBottomStartRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.leftColumn = object18;
const object19 = {overflow: 'hidden'};
object19.borderTopEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object19.borderBottomEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object19.gap = 4;
object3.rightColumn = object19;
const object20 = {overflow: 'hidden'};
object20.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.singleImage = object20;
object3.centerContainer = {'position': 'absolute', 'width': '100%', 'height': '100%', 'alignItems': 'center',
'justifyContent': 'center', 'zIndex': 2};
object3.absoluteContainer = {'position': 'absolute', 'width': '100%', 'height': '100%', 'zIndex': 2};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.iconBg = {backgroundColor: BACKGROUND_BASE_LOWER};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.iconBgSelected = {backgroundColor: WHITE};
return object3;
}
function ICYMIMediaMosaic({message, widthOverride, visible, itemType}) { // fn#112359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8202, offset: 0x023c764b, size: 389 bytes, params: 2, frame: 26
var r0;
var items2;
var value;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(message.getChannelId());
});
const env0_4 = channel;
const {allMediaSources, nonEmbedSources, embedSources} = env0_4.useMemo(_fun112361, [message]);
const value4 = env0_4.useCallback(_fun112364, [message.channel_id, message.id, allMediaSources, channel, itemType]);
if (nonEmbedSources.length !== 0) {
var viewBindingProps = {style: styles.container};
value = <GravityAttachmentMediaMosaic widthOverride={widthOverride} sources={nonEmbedSources} handlePressMedia={value4} visible={visible} />;
items2 = [value];
items2[1] = embedSources?.map(_fun112366);
value = <View {...viewBindingProps} key={'message-image-' + message.id}>{items2}</View>;
r0 = value;
} else if (embedSources.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
value = <GravityAttachmentMediaMosaic widthOverride={widthOverride} sources={nonEmbedSources} handlePressMedia={value4} visible={visible} />;
items2 = [value];
items2[1] = embedSources?.map(_fun112366);
value = <View {...viewBindingProps} key={'message-image-' + message.id}>{items2}</View>;
r0 = value;
}
return r0;
}
function MediaMosaicImageC() { // fn#112337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:2672, owner: MediaMosaicImage.c, offset: 0x023c639e, size: 68 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
return {opacity: value.withTiming(env0_1 ? 0 : 1, {duration: 150})};
}
function _fun112338() { // fn#112338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:2871, offset: 0x023c63e2, size: 95 bytes, params: 1, frame: 13
var value2;
var moduleValue;
var createThumbhashImageFromPlaceholder;
if (source.placeholder != null) {
value2 = environment.__proto__;
moduleValue = require(14861) /* metro dependency 14861: ThumbhashUtils */;
createThumbhashImageFromPlaceholder = moduleValue.createThumbhashImageFromPlaceholder;
sourceBinding = source;
return {uri: Reflect.apply(createThumbhashImageFromPlaceholder, moduleValue, [sourceBinding.placeholder]),
width: sourceBinding.width, height: sourceBinding.height};
}
}
function _fun112341() { // fn#112341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:3452, offset: 0x023c68e9, size: 59 bytes, params: 1, frame: 12
if (env0_3) {
env0_4(false);
} else {
handlePressMedia({ref: env0_2, initialIndex: initialIndex});
}
}
function MediaOnPress() { // fn#112344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:4295, owner: Media.onPress, offset: 0x023c6924, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).setVideosMuted(!env0_5);
}
function _fun112347(a0, a1) { // fn#112347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5158, offset: 0x023c6a89, size: 104 bytes, params: 3, frame: 20
const handlePressMediaBinding = handlePressMedia;
const offsetBinding = offset;
const binding = env0_2;
return (
<Media
handlePressMedia={handlePressMediaBinding}
initialIndex={offsetBinding + a1}
source={a0}
dimensions={{width: (binding - 8) / 3, height: (binding - 8) / 3}}
key={offsetBinding + a1}
/>
);
}
function _fun112349(a0, a1) { // fn#112349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:5482, offset: 0x023c6ba9, size: 60 bytes, params: 3, frame: 16
return (
<Media
handlePressMedia={handlePressMedia}
initialIndex={a1}
source={a0}
dimensions={env0_1}
key={a1}
/>
);
}
function _fun112353() { // fn#112353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:6759, offset: 0x023c6faa, size: 157 bytes, params: 1, frame: 15
var Math;
var value;
const sourceBinding = source;
const value2 = sourceBinding.width / sourceBinding.height;
if (value2 >= 1) {
Math = global.Math;
value = Math.min(source.width, env0_1);
return {height: value / value2, width: value};
}
Math = global.Math;
const value3 = Math.min(source.height, 330);
const value4 = value3 * value2;
return value4 > env0_1 ? {width: env0_1, height: env0_1 / value2} : {width: value4, height: value3};
}
function _fun112356(a0, a1) { // fn#112356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:7642, offset: 0x023c71dc, size: 275 bytes, params: 3, frame: 20
var value;
if (a0.length === 1) {
value = environment.__proto__;
value = environment;
return (
<OneImageRow
handlePressMedia={handlePressMedia}
source={a0[0]}
key={a1}
/>
);
}
if (a0.length === 2) {
value = environment.__proto__;
value = environment;
return (
<TwoImagesRow
widthOverride={widthOverride}
sources={a0}
handlePressMedia={handlePressMedia}
end={a1 === env0_4.length - 1}
key={a1}
/>
);
}
const value2 = a1 === 0;
const r8 = value2 ? value : env0_4[value].length + 3 * (a1 - 1);
value = environment.__proto__;
return (
<ThreeImagesRow
widthOverride={widthOverride}
handlePressMedia={handlePressMedia}
offset={r8}
sources={a0}
start={value2}
end={a1 === env0_4.length - 1}
key={a1}
/>
);
}
function _fun112361() { // fn#112361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8373, offset: 0x023c77f4, size: 194 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const mediaSourceUtilModule = require(9546) /* metro dependency 9546: MediaSourceUtil */;
const extractMediaSourcesFromMessage = mediaSourceUtilModule.extractMediaSourcesFromMessage;
const messageBinding = message;
const GRAVITY_VALID_EMBED_TYPES = (require(7230) /* metro dependency 7230: ICYMITypes */).GRAVITY_VALID_EMBED_TYPES;
const value4 = Reflect.apply(extractMediaSourcesFromMessage, mediaSourceUtilModule, [messageBinding, messageBinding,
undefined, GRAVITY_VALID_EMBED_TYPES]).map(_fun112362);
const value5 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = env1_3((require(22) /* metro dependency 22 */).partition(value5, function(a0) {
return a0.accessoryType === 'embed';
}), 2);
return {allMediaSources: value5, nonEmbedSources: value[1], embedSources: value[0]};
}
function _fun112364({ref, initialIndex}) { // fn#112364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8751, offset: 0x023c78f2, size: 402 bytes, params: 2, frame: 28
var environment;
var r5;
var moduleValue3;
const value = environment.__proto__;
const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = defaultImport.itemInteracted;
const messageBinding = message;
Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'message', 'press_media']);
defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: itemType,
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'media_mosaic',
'actionIntentType': 'open', 'actionDestinationType': null}});
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
const ack = readStateActionCreatorsModule.ack;
const channel_id = messageBinding.channel_id;
const ICYMI = AnalyticsPages.ICYMI;
const ACK_MEDIA_VIEWED = AnalyticsObjects.ACK_MEDIA_VIEWED;
const ACK_SEMI_AUTOMATIC = AnalyticsObjectTypes.ACK_SEMI_AUTOMATIC;
Reflect.apply(ack, readStateActionCreatorsModule, [channel_id, {page: ICYMI, object: ACK_MEDIA_VIEWED,
objectType: ACK_SEMI_AUTOMATIC}, true, true, messageBinding.id]);
allMediaSources.forEach(_fun112365);
const openMediaModalModule = require(9544) /* metro dependency 9544: openMediaModal */;
const openMediaModal = openMediaModalModule.openMediaModal;
const object = {disableDownload: false, initialSources: [], initialIndex: initialIndex, analyticsSource: 'Channel'};
object.channelId = messageBinding.channel_id;
if (channel != null) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r5 = moduleValue3.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r5 = '';
}
object.contextName = r5;
object.contextIcon = undefined;
object.originViewOrOriginLayout = ref.current;
Reflect.apply(openMediaModal, openMediaModalModule, [object]);
}
function _fun112366(a0, a1) { // fn#112366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:9635, offset: 0x023c7aae, size: 106 bytes, params: 3, frame: 16
const value = environment.__proto__;
return (
<SingleImage
widthOverride={widthOverride}
handlePressMedia={env0_7}
initialIndex={a1 + nonEmbedSources.length}
source={a0}
visible={visible}
key={'gif-' + a1}
/>
);
}
function _fun112362(a0) { // fn#112362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:8476, offset: 0x023c78b6, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(9546) /* metro dependency 9546: MediaSourceUtil */).flattenSource(a0);
}
function _fun112365(a0) { // fn#112365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15057:9146, offset: 0x023c7a84, size: 42 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['embedURI'] = undefined;
Reflect.apply(push, binding, [object2]);
}
@@ -0,0 +1,42 @@
/* Metro module 14812; source: modules/icymi/native/navigator/ICYMINavigator.tsx; dependencies: [33, 9884, 5280, 14813, 14762, 2] */
function _fun111775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15009:6, offset: 0x023b1add, size: 151 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(33) /* metro dependency 33 */;
const env0_2 = value.jsx;
const env0_3 = value.jsxs;
const env0_4 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/navigator/ICYMINavigator.tsx');
exports.default = ICYMINavigator;
}
function ICYMINavigator() { // fn#111776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15009:255, offset: 0x023b1b74, size: 174 bytes, params: 1, frame: 19
const env0_0 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const binding = env0_4;
const Navigator = binding.Navigator;
const object2 = {screenOptions: screenOptions_111777, initialRouteName: 'icymi-screen'};
let Screen = binding.Screen;
const screen = <Screen name="icymi-screen" getComponent={function() {
return require(dependencyMap[3]).ICYMITab;
}} />;
Screen = binding.Screen;
return (
<Navigator {...object2}>
{screen}
<Screen
name="notifications-screen"
getComponent={function() {
return require(dependencyMap[4]).ThemedNotificationsModal;
}}
/>
</Navigator>
);
}
function ICYMINavigatorScreenOptions() { // fn#111777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15009:368, owner: ICYMINavigator.screenOptions, offset: 0x023b1c22, size: 30 bytes, params: 1, frame: 11
const object2 = {'headerShown': false, 'fullScreenGestureEnabled': true};
copyDataProperties(object2, env0_0, environment);
return object2;
}
@@ -0,0 +1,37 @@
/* Metro module 14857; source: modules/icymi/native/util/getIconForChannel.tsx; dependencies: [661, 6704, 6711, 6707, 6691, 6698, 6697, 2] */
function _fun112294(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15054:6, offset: 0x023c40b9, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/util/getIconForChannel.tsx');
exports.getIconForChannel = getIconForChannel;
}
function getIconForChannel({type}) { // fn#112295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15054:220, offset: 0x023c412e, size: 314 bytes, params: 2, frame: 12
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
if (GUILD_ANNOUNCEMENT === type) {
return (require(6704) /* metro dependency 6704: AnnouncementsIcon */).AnnouncementsIcon;
}
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (GUILD_VOICE === type) {
return (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
}
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
if (GUILD_STAGE_VOICE === type) {
return (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
}
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
if (GUILD_TEXT !== type) {
var GUILD_FORUM = ChannelTypes.GUILD_FORUM;
if (GUILD_FORUM === type) {
return (require(6698) /* metro dependency 6698: ForumIcon */).ForumIcon;
}
var GUILD_MEDIA = ChannelTypes.GUILD_MEDIA;
if (GUILD_MEDIA === type) {
return (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
}
}
return (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
}
@@ -0,0 +1,22 @@
/* Metro module 14855; source: modules/icymi/native/util/openDetailsActionSheet.tsx; dependencies: [9580, 4080, 14821, 1962, 2] */
function _fun112279(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15052:6, offset: 0x023c2f0e, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/util/openDetailsActionSheet.tsx');
exports.openDetailsActionSheet = openDetailsActionSheet;
}
function openDetailsActionSheet({guildId, channelId, id, type}) { // fn#112280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15052:203, offset: 0x023c2f75, size: 198 bytes, params: 2, frame: 22
importDefault(dependencyMap[0]).itemInteracted(id, type, 'overflow_menu');
const defaultImport2 = importDefault(dependencyMap[0]);
defaultImport2.feedItemActioned({itemId: id, itemType: type, actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'overflow_menu_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
const defaultImport3 = importDefault(dependencyMap[1]);
const openLazy = defaultImport3.openLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport3, [value, 'ItemDetailsActionSheet', {guildId: guildId, channelId: channelId,
id: id}]);
}
@@ -0,0 +1,63 @@
/* Metro module 14851; source: modules/icymi/useICYMIEmptyLoadingAnalytics.tsx; dependencies: [31, 9589, 2] */
function _fun112232(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15048:6, offset: 0x023c00ee, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/useICYMIEmptyLoadingAnalytics.tsx');
exports.useICYMIEmptyLoadingAnalytics = useICYMIEmptyLoadingAnalytics;
}
function useICYMIEmptyLoadingAnalytics(a0, a1) { // fn#112233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15048:219, offset: 0x023c0160, size: 99 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_2;
var env0_2 = binding.useRef(null);
binding.useEffect(_fun112234, [a0, a1]);
binding.useEffect(_fun112235, [a1]);
}
function _fun112234() { // fn#112234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15048:297, offset: 0x023c01c3, size: 193 bytes, params: 1, frame: 15
var binding;
var binding2;
var value2;
var value3;
const ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
var value;
if (require) {
binding = env0_0;
binding2 = env0_2;
if (binding) {
binding2.current = global.Date.now();
value = environment.__proto__;
ICYMIAnalytics.trackFeedEmptyLoadingSeen();
} else if (binding2.current != null) {
value2 = global.Date.now();
binding = env0_2;
value = value2 - binding.current;
value3 = environment.__proto__;
ICYMIAnalytics.trackFeedEmptyLoadingComplete({dwellTimeMs: value});
binding.current = null;
}
}
}
function _fun112235() { // fn#112235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15048:544, offset: 0x023c0284, size: 114 bytes, params: 1, frame: 14
var value2;
var binding;
var value3;
var ICYMIAnalytics;
var value;
if (!require) {
if (env0_2.current != null) {
value2 = global.Date.now();
binding = env0_2;
value = value2 - binding.current;
value3 = environment.__proto__;
ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
ICYMIAnalytics.trackFeedEmptyLoadingAbandoned({dwellTimeMs: value});
binding.current = null;
}
}
}
+334
View File
@@ -0,0 +1,334 @@
/* Metro module 14849; source: modules/icymi/useICYMIItems.tsx; dependencies: [31, 9569, 7230, 566, 9580, 2] */
function _fun112218(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15046:6, offset: 0x023bf748, size: 148 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/useICYMIItems.tsx');
exports.default = useICYMIItems;
}
function createItem(a0, a1, a2) { // fn#112219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15046:120, offset: 0x023bf7dc, size: 833 bytes, params: 4, frame: 17
var r0;
var object2;
var id;
var JSON;
var message;
var data;
var object3;
const type = a1.type;
const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
const MESSAGE = ICYMIItemTypes.MESSAGE;
if (MESSAGE === type) {
message = a1.message;
id = message.id;
message = a1.message;
if (id !== message.channel_id) {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
data = a0.data;
object2.channelType = data.channel_type;
object3 = {kind: 'message'};
object3.message = a1.message;
data = a0.data;
object3.mentioned = data.has_mention;
data = a0.data;
object3.messageContext = data.message_context;
object2.data = object3;
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
r0 = object2;
} else if (a1.threadChannel != null) {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
object2.channelType = a0.data.channel_type;
object2.data = {kind: 'forumThread', message: a1.message, threadChannel: a1.threadChannel};
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
r0 = object2;
} else {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
data = a0.data;
object2.channelType = data.channel_type;
object3 = {kind: 'message'};
object3.message = a1.message;
data = a0.data;
object3.mentioned = data.has_mention;
data = a0.data;
object3.messageContext = data.message_context;
object2.data = object3;
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
r0 = object2;
}
return r0;
}
const ACTIVITY = ICYMIItemTypes.ACTIVITY;
if (ACTIVITY === type) {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
object2.data = {kind: 'contentInventory', content: a1.activity};
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
return object2;
}
const CUSTOM_STATUS = ICYMIItemTypes.CUSTOM_STATUS;
if (CUSTOM_STATUS === type) {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
object2.data = {kind: 'contentInventory', content: a1.activity};
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
return object2;
}
const GUILD_EVENT = ICYMIItemTypes.GUILD_EVENT;
if (GUILD_EVENT === type) {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
object2.data = {kind: 'guildEvent', eventId: a1.event_id};
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
return object2;
}
const RECOMMENDED_GUILDS = ICYMIItemTypes.RECOMMENDED_GUILDS;
if (RECOMMENDED_GUILDS === type) {
object2 = {};
object2.id = a0.id;
object2.timestamp = global.Date.now();
object2.data = {kind: 'recommendedGuilds'};
object2.score = a0.score;
JSON = global.JSON;
object2.debugScore = JSON.stringify(a0.score_components);
object2.unread = a2;
return object2;
}
return null;
}
function useICYMIItems() { // fn#112220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15046:1415, offset: 0x023bfb1d, size: 778 bytes, params: 1, frame: 38
var r8;
var r18;
var r0;
var reference_message_id;
var r23;
var r9;
var r12;
var r20;
var property;
var value5;
var id;
var property2;
var value6;
var type;
const ICYMIItemTypes = (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes;
var MESSAGE;
var value7;
var data;
var message_context;
var value8;
var message_id;
var property3;
var item;
var value9;
var value10;
var property4;
var value11;
var value12;
var value13;
var property5;
var item2;
var value14;
const value2 = undefined;
const unreadDisplayItems = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore],
function() {
return ICYMIStore.getUnreadDisplayItems();
});
const readDisplayItems = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore],
function() {
return ICYMIStore.getReadDisplayItems();
});
const nextIndexToHydrate = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore],
function() {
return ICYMIStore.getNextIndexToHydrate();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ICYMIStore], function() {
return ICYMIStore.getHydratedItems();
});
const missingItems = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.getMissingItems();
});
env0_3.useEffect(_fun112226, [readDisplayItems]);
items3 = [];
const items2 = [];
let length = unreadDisplayItems.length;
const value4 = 0;
if (value4 < length) {
r8 = value4;
r18 = value4;
while (true) {
if (r18 >= nextIndexToHydrate) {
r9 = r18;
break;
}
property = unreadDisplayItems[r8];
value5 = typeof r18 === 'bigint' ? r18 + 1n : +r18 + 1;
id = property.id;
if (missingItems[id]) {
continue;
}
id = property.id;
property2 = value3[id];
value6 = property2 == null;
if (!value6) {
r0 = value6;
continue;
}
type = property.type;
MESSAGE = ICYMIItemTypes.MESSAGE;
value7 = type === MESSAGE;
r0 = value7;
if (!r0) {
continue;
}
data = property.data;
message_context = data.message_context;
if (message_context == null) {
reference_message_id = value2;
continue;
}
reference_message_id = message_context.reference_message_id;
value8 = reference_message_id != null;
r0 = value8;
if (!r0) {
r23 = property2;
continue;
}
data = property.data;
message_id = data.message_id;
property3 = value3[message_id];
r23 = property3;
if (r23 == null) {
continue;
}
item = createItem(property, r23, true);
if (item == null) {
continue;
}
items3.push(item);
value9 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = unreadDisplayItems.length;
if (value9 < length) {
r8 = value9;
r18 = value5;
continue;
}
r9 = value5;
break;
}
} else {
r9 = value4;
}
length = readDisplayItems.length;
if (value4 < length) {
r12 = value4;
while (true) {
if (r9 >= nextIndexToHydrate) {
break;
}
property = readDisplayItems[r12];
value10 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
id = property.id;
if (missingItems[id]) {
continue;
}
id = property.id;
property4 = value3[id];
value11 = property4 == null;
if (!value11) {
r0 = value11;
continue;
}
type = property.type;
MESSAGE = ICYMIItemTypes.MESSAGE;
value12 = type === MESSAGE;
r0 = value12;
if (!r0) {
continue;
}
data = property.data;
message_context = data.message_context;
if (message_context == null) {
reference_message_id = value2;
continue;
}
reference_message_id = message_context.reference_message_id;
value13 = reference_message_id != null;
r0 = value13;
if (!r0) {
r20 = property4;
continue;
}
data = property.data;
message_id = data.message_id;
property5 = value3[message_id];
r20 = property5;
if (r20 == null) {
continue;
}
item2 = createItem(property, r20, false);
if (item2 == null) {
continue;
}
items2.push(item2);
value14 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
length = readDisplayItems.length;
if (value14 < length) {
r9 = value10;
r12 = value14;
continue;
}
break;
}
}
return {unreadItems: items3, readItems: items2,
allUnreadItemsHydrated: nextIndexToHydrate >= unreadDisplayItems.length};
}
function _fun112226() { // fn#112226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15046:1780, offset: 0x023bfe88, size: 97 bytes, params: 1, frame: 16
var environment;
const Date = global.Date;
let value = Date.now();
const readDisplayItemsBinding = readDisplayItems;
const env0_0 = value + readDisplayItemsBinding.length;
value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
value.ackGravityItems(readDisplayItemsBinding.map(_fun112227, true));
}
function _fun112227({id}) { // fn#112227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15046:1844, offset: 0x023bfee9, size: 38 bytes, params: 2, frame: 4
const binding = env0_0;
const value2 = typeof binding === 'bigint' ? binding : +binding;
env0_0 = typeof value2 === 'bigint' ? value2 - 1n : +value2 - 1;
return {id: id, timestamp: value2};
}
@@ -0,0 +1,42 @@
/* Metro module 14850; source: modules/icymi/useICYMIReloadHandler.tsx; dependencies: [5, 31, 9589, 9580, 2] */
function _fun112228(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15047:6, offset: 0x023bff0f, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/useICYMIReloadHandler.tsx');
exports.useICYMIReloadHandler = useICYMIReloadHandler;
}
function useICYMIReloadHandler(a0) { // fn#112229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15047:213, offset: 0x023bff98, size: 55 bytes, params: 2, frame: 15
const env0_0 = a0;
return env0_4.useCallback(env0_3(_fun112231), [a0]);
}
function* _fun112231() { // fn#112231, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15047:271, offset: 0x023bffda, size: 276 bytes, params: 1, frame: 18
if (true) {
value = environment.__proto__.__proto__;
var ICYMIAnalytics = env2_0(env2_2[2]).ICYMIAnalytics;
ICYMIAnalytics.trackFeedShown({variant: require != null && require ? 'DotShown' : 'NoDotShown',
homeSessionId: 'gravity_refresh'});
var value6 = env2_1(env2_2[3]);
yield value6.fetchDehydrated({isReloading: true});
if (false) {
return undefined;
}
var value9 = env2_1(env2_2[3]);
yield value9.reloadICYMITab();
if (false) {
return undefined;
}
var value12 = env2_1(env2_2[3]);
var getGuildChannelScores = value12.getGuildChannelScores;
yield Reflect.apply(getGuildChannelScores, value12, []);
if (false) {
return undefined;
}
env2_1(env2_2[3]).getRecommendedGuilds();
}
}
@@ -0,0 +1,25 @@
/* Metro module 14744; source: modules/icymi/useICYMITabBadge.tsx; dependencies: [9569, 566, 2] */
function _fun111285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14941:6, offset: 0x0239c2e7, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/useICYMITabBadge.tsx');
exports.default = function() {
var object = {value: 0};
object.showDot = require(dependencyMap[1]).useStateFromStores([ICYMIStore], _fun111287, []);
return object;
};
exports.icymiTabBadgeShown = function() {
return ICYMIStore.hasNewContent();
};
}
function useICYMITabBadge() { // fn#111286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14941:184, offset: 0x0239c366, size: 77 bytes, params: 1, frame: 16
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return {value: 0, showDot: Reflect.apply(useStateFromStores, fluxModule, [[ICYMIStore], function() {
return ICYMIStore.hasNewContent();
}, []])};
}
@@ -0,0 +1,286 @@
/* Metro module 14848; source: modules/icymi/useSharedICYMILogic.tsx; dependencies: [57, 31, 9569, 14814, 14849, 566, 9589, 9586, 8819, 9580, 9579, 7230, 14850, 2] */
function _fun112192(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:6, offset: 0x023bebb6, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const icymiStore = importDefault(9569) /* metro dependency 9569: ICYMIStore */;
const env0_6 = (require(14814) /* metro dependency 14814: ICYMIConstants */).SCROLL_EVENT_THROTTLE_MS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/useSharedICYMILogic.tsx');
exports.useSharedICYMILogic = useSharedICYMILogic;
}
function useSharedICYMILogic({showDot, notificationItem}) { // fn#112193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:258, offset: 0x023bec65, size: 807 bytes, params: 2, frame: 37
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
const {unreadItems, readItems,
allUnreadItemsHydrated} = (importDefault(14849) /* metro dependency 14849: useICYMIItems */)();
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.getVersion();
}, []);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], _fun112195);
binding.useEffect(function() {
if (ICYMIStore.getLoadId() != null) {
require(dependencyMap[6]).ICYMIAnalytics.trackFeedShown({homeSessionId: 'gravity'});
}
}, [value]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.isRefreshing();
}, []);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
return ICYMIStore.isHydrating();
}, []);
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [[]]), 2);
const property3 = value8[0];
const env0_9 = value8[1];
const {loadId,
lastScrollEventTimestamp} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ICYMIStore],
function() {
var object = {};
object.loadId = ICYMIStore.getLoadId();
object.lastScrollEventTimestamp = ICYMIStore.lastScrollEvent();
return object;
});
const value12 = property3.filter(function({item}) {
var NON_ELIGIBLE_SCROLL_ITEMS = require(dependencyMap[7]).NON_ELIGIBLE_SCROLL_ITEMS;
return !NON_ELIGIBLE_SCROLL_ITEMS.has(item.data.kind);
}).map(function(a0) {
return a0.item.id;
}).pop();
binding.useEffect(_fun112202, [value6, lastScrollEventTimestamp,
(importDefault(8819) /* metro dependency 8819: usePrevValue */)(value12), value12, loadId, value5]);
const value17 = binding.useMemo(_fun112213, [binding.useCallback(_fun112203, [value, property2]),
binding.useCallback(_fun112206, [value]), binding.useCallback(_fun112210, [])]);
binding.useEffect(_fun112214, []);
const value18 = (require(14850) /* metro dependency 14850: useICYMIReloadHandler */).useICYMIReloadHandler(showDot);
const value19 = binding.useMemo(_fun112215, [value5, notificationItem, unreadItems, allUnreadItemsHydrated,
readItems, value7]);
return {data: value19.data, loading: value5, version: value, visibleItemIds: property3, endVisible: property,
isRefreshing: value6, handleOnRefresh: value18, stickyHeaderIndices: value19.stickyHeaderIndices,
viewabilityConfigCallbackPairs: value17};
}
function _fun112195() { // fn#112195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:525, offset: 0x023bef9f, size: 40 bytes, params: 1, frame: 10
const value = environment.__proto__;
return !(ICYMIStore.isFirstPageHydrated() && env0_5 > 0);
}
function _fun112202() { // fn#112202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:1128, offset: 0x023bf0a9, size: 161 bytes, params: 1, frame: 14
var value2;
var value3;
var value;
if (!env0_7) {
if (!env0_6) {
if (env0_12 != null) {
if (env0_11 != null) {
if (env0_11 !== env0_12) {
value2 = global.Date.now();
value = value2 - lastScrollEventTimestamp;
value3 = environment.__proto__;
if (value > SCROLL_EVENT_THROTTLE_MS) {
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).gravityScrollEvent(value2);
(require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics.trackFeedFirstScrollStarted();
}
}
}
}
}
}
}
function _fun112203({viewableItems}) { // fn#112203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:1318, offset: 0x023bf14a, size: 344 bytes, params: 2, frame: 28
var environment;
var r3;
var r11;
var r12;
var items2;
var value2;
var viewableFeedItemsArray;
var value4;
var value5;
var property;
var push;
var object2;
var id;
var moduleValue2;
var value6;
var value7;
var value8;
var ICYMIAnalytics;
if (viewableItems.some(function(a0) {
return a0.item.data.kind === 'end';
})) {
env0_1(true);
}
let length = viewableItems.length;
if (length !== 0) {
env0_9(viewableItems);
items2 = [];
value2 = environment.__proto__;
viewableFeedItemsArray = (require(9579) /* metro dependency 9579: ICYMIUtils */).getViewableFeedItemsArray(viewableItems);
value4 = global.Date.now();
length = viewableFeedItemsArray.length;
value5 = length - 1;
if (value5 >= 0) {
r3 = value4;
r11 = value5;
while (true) {
property = viewableFeedItemsArray[r11];
if (property == null) {
r12 = r3;
} else {
push = items2.push;
object2 = {};
id = property.id;
object2.id = id;
moduleValue2 = require(7230) /* metro dependency 7230: ICYMITypes */;
object2.type = moduleValue2.typeToString(property);
value6 = typeof r3 === 'bigint' ? r3 : +r3;
value7 = typeof value6 === 'bigint' ? value6 + 1n : +value6 + 1;
object2.timestamp = value6;
Reflect.apply(push, items2, [object2]);
r12 = value7;
}
value8 = typeof r11 === 'bigint' ? r11 - 1n : +r11 - 1;
if (value8 >= 0) {
r3 = r12;
r11 = value8;
continue;
}
break;
}
}
length = items2.length;
if (length > 0) {
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).ackGravityItems(items2, true);
}
ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
ICYMIAnalytics.trackItemShortImpression(viewableItems, viewableFeedItemsArray.map(_fun112205), env0_5);
}
}
function _fun112206({viewableItems}) { // fn#112206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:1755, offset: 0x023bf2f6, size: 181 bytes, params: 2, frame: 20
var environment;
var value;
var viewableFeedItemsArray;
var ICYMIAnalytics;
var triggerItemsLongImpression;
var value5;
if (viewableItems.length !== 0) {
value = environment.__proto__;
viewableFeedItemsArray = (require(9579) /* metro dependency 9579: ICYMIUtils */).getViewableFeedItemsArray(viewableItems);
ICYMIAnalytics = (require(9589) /* metro dependency 9589: ICYMIAnalytics */).ICYMIAnalytics;
ICYMIAnalytics.trackItemLongImpression(viewableItems, viewableFeedItemsArray.map(_fun112207), env0_5);
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
triggerItemsLongImpression = value.triggerItemsLongImpression;
value5 = viewableItems.filter(function({item}) {
var NON_ELIGIBLE_SCROLL_ITEMS = require(dependencyMap[7]).NON_ELIGIBLE_SCROLL_ITEMS;
return !NON_ELIGIBLE_SCROLL_ITEMS.has(item.data.kind);
});
Reflect.apply(triggerItemsLongImpression, value, [value5.map(_fun112209)]);
}
}
function _fun112210({viewableItems}) { // fn#112210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:2310, offset: 0x023bf474, size: 83 bytes, params: 2, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const startItemsDwell = value.startItemsDwell;
const value2 = viewableItems.filter(function({item}) {
var NON_ELIGIBLE_SCROLL_ITEMS = require(dependencyMap[7]).NON_ELIGIBLE_SCROLL_ITEMS;
return !NON_ELIGIBLE_SCROLL_ITEMS.has(item.data.kind);
});
Reflect.apply(startItemsDwell, value, [value2.map(_fun112212)]);
}
function _fun112213() { // fn#112213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:2681, offset: 0x023bf4c7, size: 111 bytes, params: 1, frame: 4
return [{viewabilityConfig: {'waitForInteraction': false, 'viewAreaCoveragePercentThreshold': 100,
'minimumViewTime': 50}, onViewableItemsChanged: env0_13}, {viewabilityConfig: {'waitForInteraction': false,
'viewAreaCoveragePercentThreshold': 50, 'minimumViewTime': 1000}, onViewableItemsChanged: env0_14},
{viewabilityConfig: {'waitForInteraction': false, 'viewAreaCoveragePercentThreshold': 50,
'minimumViewTime': 50}, onViewableItemsChanged: env0_15}];
}
function _fun112214() { // fn#112214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:3084, offset: 0x023bf536, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).openICYMITab();
}
function _fun112215() { // fn#112215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:3172, offset: 0x023bf55b, size: 432 bytes, params: 1, frame: 18
var environment;
var notificationItemBinding;
var push;
var object2;
var value5;
var moduleValue;
const items2 = [];
if (env0_6 && notificationItem != null && notificationItem.type === (require(7230) /* metro dependency 7230: ICYMITypes */).ICYMIItemTypes.CUSTOM_STATUS) {
push = items2.push;
object2 = {};
notificationItemBinding = notificationItem;
object2.id = notificationItemBinding.id;
object2.timestamp = global.Date.now();
value5 = environment.__proto__;
moduleValue = require(9579) /* metro dependency 9579: ICYMIUtils */;
object2.data = {kind: 'contentInventory',
content: moduleValue.customStatusToContentInventoryEntry(notificationItemBinding).activity};
object2.score = notificationItemBinding.score;
object2.unread = true;
Reflect.apply(push, items2, [object2]);
}
if (env0_6) {
items2.push({'id': 'loading', 'timestamp': 0, 'unread': false, data: {kind: 'loading'}});
} else {
unreadItems.forEach(_fun112216);
if (allUnreadItemsHydrated) {
items2.push({'id': 'end', 'timestamp': 0, 'unread': false, data: {kind: 'end'}});
}
if (readItems.length > 0) {
readItems.forEach(_fun112217);
}
if (env0_8) {
items2.push({'id': 'bottomLoading', 'timestamp': 0, 'unread': false, data: {kind: 'bottomLoading'}});
}
}
return {data: items2, stickyHeaderIndices: []};
}
function _fun112205(a0) { // fn#112205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:1678, offset: 0x023bf2be, size: 56 bytes, params: 2, frame: 13
const object2 = {};
object2.id = a0.id;
const value = environment.__proto__.__proto__;
object2.type = (require(7230) /* metro dependency 7230: ICYMITypes */).typeToString(a0);
return object2;
}
function _fun112209({item, index}) { // fn#112209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:2061, offset: 0x023bf3eb, size: 137 bytes, params: 2, frame: 14
const object2 = {};
object2.itemId = item.id;
let value = environment.__proto__.__proto__;
object2.itemType = (require(9579) /* metro dependency 9579: ICYMIUtils */).itemToType(item);
object2.triggerType = 'list';
object2.itemFeedIndex = index;
const score = item.score;
value = null;
object2.itemScore = value != score ? score : value;
const channelType = item.channelType;
object2.itemChannelType = value != channelType ? channelType : value;
object2.isInitiallyVisible = false;
return object2;
}
function _fun112216(a0) { // fn#112216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15045:3493, offset: 0x023bf70b, size: 61 bytes, params: 2, frame: 12
let value = environment.__proto__.__proto__;
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
if (!value.isItemNSFW(a0)) {
env0_0.push(a0);
}
}