/* Metro module 4821; source: modules/explicit_media_redaction/ExplicitMediaRedactionUtils.tsx; dependencies: [4649, 1379, 4822, 4824, 661, 1314, 1244, 683, 4825, 4826, 4831, 4832, 3835, 4861, 4813, 4840, 2] */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import DevSettingsStore from '../devtools/dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */ import ExplicitMediaStore from './ExplicitMediaStore.tsx'; /* Metro dependency 4822 */ import MonitoringAgent from '../monitoring/MonitoringAgent.tsx'; /* Metro dependency 4826 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as Preloaded_user_settingsModule from '../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */ import * as RegionalFeatureConfigUtilsModule from '../regional_feature_config/RegionalFeatureConfigUtils.tsx'; /* Metro dependency 3835 */ import * as AgeVerificationUtilsModule from '../age_assurance/AgeVerificationUtils.tsx'; /* Metro dependency 4813 */ import * as ExplicitMediaRedactionConstantsModule from './ExplicitMediaRedactionConstants.tsx'; /* Metro dependency 4824 */ import * as MetricEventsModule from '../../external/discord_common/js/shared/shared-constants/MetricEvents.tsx'; /* Metro dependency 4831 */ import * as ExplicitMediaManagerModule from './ExplicitMediaManager.tsx'; /* Metro dependency 4832 */ import * as AgeGatedFeatureModule from '../../external/discord_common/js/shared/shared-constants/AgeGatedFeature.tsx'; /* Metro dependency 4861 */ function _fun42038(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6, offset: 0x0112e8b9, size: 609 bytes, params: 8, frame: 20 const env0_0 = require; const timeoutAttachmentsAndEmbedsForMessage = function(a0) { var object = {}; object.attachments = a0.attachments.map(_fun42040); object.embeds = a0.embeds.map(_fun42041); return object; }; const useShouldAgeVerifyForExplicitMedia2 = useShouldAgeVerifyForExplicitMedia; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaRedactionUtils.tsx'); exports.redactionSettingToRenderedString = redactionSettingToRenderedString; exports.isPendingScanVersion = isPendingScanVersion; exports.TrackMediaRedactionActionType = {EXPLICIT_MEDIA_LEARN_MORE_VIEWED: 'explicit_media_learn_more_viewed', EXPLICIT_MEDIA_LEARN_MORE_CLICK_SETTINGS: 'explicit_media_learn_more_click_settings', EXPLICIT_MEDIA_LEARN_MORE_CLICK_LEARN_MORE: 'explicit_media_learn_more_click_learn_more', EXPLICIT_MEDIA_LEARN_MORE_CLICK_DISMISS: 'explicit_media_learn_more_click_dismiss', EXPLICIT_MEDIA_LEARN_MORE_CLICK_FALSE_POSITIVE: 'explicit_media_learn_more_click_false_positive', EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_REVERIFY: 'explicit_media_learn_more_click_age_verify_reverify', EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_LEARN_MORE: 'explicit_media_learn_more_click_age_verify_learn_more', EXPLICIT_MEDIA_FALSE_POSITIVE_VIEWED: 'explicit_media_false_positive_viewed', EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CONFIRM: 'explicit_media_false_positive_click_confirm', EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CANCEL: 'explicit_media_false_positive_click_cancel', EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_BUTTON_CLICKED: 'explicit_media_sender_false_positive_button_clicked', EXPLICIT_MEDIA_FALSE_POSITIVE_CLYDE_MESSAGE_SENT: 'explicit_media_false_positive_clyde_message_sent'}; exports.TrackMediaRedactionContext = {EXPLICIT_MEDIA_OBSCURED_FALSE_POSITIVE_FLOW: 'explicit_media_obscured_false_positive_flow', EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_FLOW: 'explicit_media_sender_false_positive_flow', EXPLICIT_MEDIA_MESSAGE_SEND_BLOCKED: 'explicit_media_message_send_blocked', EXPLICIT_MEDIA_ADD_MEDIA_TO_FORUM_POST_BLOCKED: 'explicit_media_add_media_to_forum_post_blocked'}; exports.trackMediaRedactionAction = trackMediaRedactionAction; exports.TimeoutCancelSource = {UPDATE: 'update', TIMEOUT: 'timeout'}; exports.trackScanTiming = trackScanTiming; exports.trackScanningTimedOut = trackScanningTimedOut; exports.trackExplicitMediaRedactableMessagedLoaded = trackExplicitMediaRedactableMessagedLoaded; exports.trackRedactableMessageLoaded = trackRedactableMessageLoaded; exports.trackExplicitMediaScanComplete = trackExplicitMediaScanComplete; exports.handleExplicitMediaScanTimeoutForMessage = handleExplicitMediaScanTimeoutForMessage; exports.isObscuredMediaBelowConstraints = function(a0, a1) { return a0 != null && a1 != null && (a0 <= EXPLICIT_MEDIA_MIN_WIDTH || a1 <= EXPLICIT_MEDIA_MIN_HEIGHT); }; exports.shouldAgeVerifyForExplicitMedia = shouldAgeVerifyForExplicitMedia; exports.useShouldAgeVerifyForExplicitMedia = useShouldAgeVerifyForExplicitMedia2; exports.useShouldAgeVerifyForReason = useShouldAgeVerifyForReason; exports.trackToggleMediaObscurityV2 = trackToggleMediaObscurityV2; exports.hasMessageSnapshotsWithAttachmentsOrEmbeds = function({message_snapshots}) { return message_snapshots?.some(_fun42062); }; function timeoutAttachmentsAndEmbedsForMessage({attachments, embeds}) { // fn#42039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:1822, offset: 0x0112eb1a, size: 61 bytes, params: 2, frame: 14 const object = {}; object.attachments = attachments.map(function(a0) { a0.content_scan_version = -1; return a0; }); object.embeds = embeds.map(function(a0) { a0.contentScanVersion = -1; return a0; }); return object; } function useShouldAgeVerifyForExplicitMedia() { // fn#42042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2000, offset: 0x0112eb79, size: 90 bytes, params: 1, frame: 14 var value; const useIsFeatureAgeGated = (RegionalFeatureConfigUtilsModule).useIsFeatureAgeGated; const AgeGatedFeature = (AgeGatedFeatureModule).AgeGatedFeature; const SENSITIVE_CONTENT_SHOW_SETTING = AgeGatedFeature.SENSITIVE_CONTENT_SHOW_SETTING; value = Reflect.apply(useIsFeatureAgeGated, value, [SENSITIVE_CONTENT_SHOW_SETTING]); return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useShouldShowTiggerPawtect(); } function redactionSettingToRenderedString(a0) { // fn#42043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2325, offset: 0x0112ebd3, size: 135 bytes, params: 2, frame: 15 const ExplicitContentRedaction = (Preloaded_user_settingsModule).ExplicitContentRedaction; const SHOW = ExplicitContentRedaction.SHOW; if (SHOW === a0) { return function() { return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['5k5OFp']); }; } const BLUR = ExplicitContentRedaction.BLUR; if (BLUR === a0) { return function() { return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.S49Uad); }; } const BLOCK = ExplicitContentRedaction.BLOCK; if (BLOCK === a0) { return function() { return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['D/157Y']); }; } } function isPendingScanVersion(a0) { // fn#42047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2685, offset: 0x0112ed14, size: 85 bytes, params: 2, frame: 14 var r1; var r0; const value2 = DevSettingsStore.get('explicit_media_redaction_ignore_pending_scan'); if (value2) { r0 = !value2; } else { r1 = a0 !== 0 && a0 !== -1; r1 = r1 && (a0 == null || a0 !== ExplicitMediaStore.validContentScanVersion); r0 = r1; } return r0; } function trackMediaRedactionAction({action, channelId, messageId, context}) { // fn#42048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2932, offset: 0x0112ed69, size: 175 bytes, params: 2, frame: 21 var channel; var value3; var defaultImport; var track; var EXPLICIT_MEDIA_ACTION; var object; if (channelId != null) { if (messageId != null) { channel = ChannelStore.getChannel(channelId); value3 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; EXPLICIT_MEDIA_ACTION = AnalyticEvents.EXPLICIT_MEDIA_ACTION; object = {action: action}; object.guild_id = channel == null ? value3 : channel.guild_id; object.channel_id = channelId; object.message_id = messageId; object.user_is_underage = (require(4825) /* metro dependency 4825: SelfModUtils */).isCurrentUserTeen(); object.context = context; Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_ACTION, object]); } } } function trackScanTiming(a0, a1) { // fn#42049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:3266, offset: 0x0112ee18, size: 217 bytes, params: 3, frame: 18 const Date = global.Date; let value = Date.now(); value -= a0; const Math = global.Math; const min = Math.min; const Math2 = global.Math; value = Math2.floor(value / 1000); value = Reflect.apply(min, Math, [value, 3]); const defaultImport = MonitoringAgent; const increment = defaultImport.increment; const MetricEvents = (MetricEventsModule).MetricEvents; const EXPLICIT_MEDIA_SCAN_CLIENT_TIMING = MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMING; value = 'timingBucket:' + value; Reflect.apply(increment, defaultImport, [{name: EXPLICIT_MEDIA_SCAN_CLIENT_TIMING, tags: [value, 'source:' + a1, 'metricVersion:1']}]); } function trackScanningTimedOut({channelId, messageId, attachmentIds, embedIds}) { // fn#42050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:3513, offset: 0x0112eef1, size: 447 bytes, params: 2, frame: 23 var length; var r0; var value; var value2; var channel; var defaultImport; var track; var EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT; var object; const MESSAGE_SCAN_TIMEOUT = (ExplicitMediaManagerModule).MESSAGE_SCAN_TIMEOUT; var defaultImport2; var increment; const MetricEvents = (MetricEventsModule).MetricEvents; var defaultImport3; var distribution; if (channelId != null) { if (messageId != null) { value = undefined; length = attachmentIds == null ? value : attachmentIds.length; value2 = 0; if (value2 !== (length ?? value2)) { channel = ChannelStore.getChannel(channelId); defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = AnalyticEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT; object = {channel_id: channelId}; object.guild_id = channel == null ? value : channel.guild_id; object.message_id = messageId; object.embed_ids = embedIds; object.user_is_underage = (require(4825) /* metro dependency 4825: SelfModUtils */).isCurrentUserTeen(); object.scan_timeout_duration = MESSAGE_SCAN_TIMEOUT; object.attachment_ids_v2 = attachmentIds; Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT, object]); defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */; increment = defaultImport2.increment; EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT; Reflect.apply(increment, defaultImport2, [{name: EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT, tags: ['metricVersion:1']}]); defaultImport3 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */; distribution = defaultImport3.distribution; length = attachmentIds == null ? value : attachmentIds.length; r0 = length ?? value2; length = embedIds == null ? value : embedIds.length; Reflect.apply(distribution, defaultImport3, [{name: MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT_DISTRIBUTION}, r0 + (length ?? value2)]); } else { length = embedIds == null ? value : embedIds.length; if (value2 !== (length ?? value2)) { channel = ChannelStore.getChannel(channelId); defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = AnalyticEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT; object = {channel_id: channelId}; object.guild_id = channel == null ? value : channel.guild_id; object.message_id = messageId; object.embed_ids = embedIds; object.user_is_underage = (require(4825) /* metro dependency 4825: SelfModUtils */).isCurrentUserTeen(); object.scan_timeout_duration = MESSAGE_SCAN_TIMEOUT; object.attachment_ids_v2 = attachmentIds; Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT, object]); defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */; increment = defaultImport2.increment; EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT; Reflect.apply(increment, defaultImport2, [{name: EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT, tags: ['metricVersion:1']}]); defaultImport3 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */; distribution = defaultImport3.distribution; length = attachmentIds == null ? value : attachmentIds.length; r0 = length ?? value2; length = embedIds == null ? value : embedIds.length; Reflect.apply(distribution, defaultImport3, [{name: MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT_DISTRIBUTION}, r0 + (length ?? value2)]); } } } } } function trackExplicitMediaRedactableMessagedLoaded({channelId, numOfAttachments, numOfAttachmentsPendingScan, numOfEmbeds, numOfEmbedsPendingScan}) { // fn#42051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:4329, offset: 0x0112f0b0, size: 229 bytes, params: 2, frame: 22 var channel; var value3; var defaultImport; var track; var EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED; var object; var value4; var defaultImport2; var distribution; if (channelId != null) { channel = ChannelStore.getChannel(channelId); value3 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED = AnalyticEvents.EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED; object = {channel_id: channelId}; object.guild_id = channel == null ? value3 : channel.guild_id; object.num_of_attachments = numOfAttachments; object.num_of_attachments_pending_scan = numOfAttachmentsPendingScan; object.num_of_embeds = numOfEmbeds; object.num_of_embeds_pending_scan = numOfEmbedsPendingScan; Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED, object]); value4 = numOfAttachmentsPendingScan + numOfEmbedsPendingScan; if (value4 > 0) { defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */; distribution = defaultImport2.distribution; object = {}; object.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.EXPLICIT_MEDIA_PENDING_MESSAGE_LOADED_V2; Reflect.apply(distribution, defaultImport2, [object, value4]); } } } function trackRedactableMessageLoaded({messageId, channelId, numOfAttachments, numOfSelfHarmAttachments, numOfEmbeds, numOfGoreAttachments, numOfExplicitAttachments, numOfSelfHarmEmbeds, numOfGoreEmbeds, numOfExplicitEmbeds}) { // fn#42052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:4869, offset: 0x0112f195, size: 305 bytes, params: 2, frame: 29 var channel; var value3; var defaultImport; const r6 = numOfExplicitAttachments > 0 || numOfExplicitEmbeds > 0; const r5 = numOfGoreAttachments > 0 || numOfGoreEmbeds > 0; const r4 = numOfSelfHarmAttachments > 0 || numOfSelfHarmEmbeds > 0; if (channelId != null) { if (messageId != null) { if (r6) { channel = ChannelStore.getChannel(channelId); value3 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.REDACTABLE_MESSAGE_LOADED, {message_id: messageId, channel_id: channelId, channel_type: channel == null ? value3 : channel.type, guild_id: channel == null ? value3 : channel.guild_id, num_of_attachments: numOfAttachments, num_of_gore_attachments: numOfGoreAttachments, num_of_explicit_attachments: numOfExplicitAttachments, num_of_self_harm_attachments: numOfSelfHarmAttachments, num_of_embeds: numOfEmbeds, num_of_gore_embeds: numOfGoreEmbeds, num_of_explicit_embeds: numOfExplicitEmbeds, num_of_self_harm_embeds: numOfSelfHarmEmbeds, has_redactable_explicit: r6, has_redactable_gore: r5, has_redactable_self_harm: r4}); } else if (r5) { channel = ChannelStore.getChannel(channelId); value3 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.REDACTABLE_MESSAGE_LOADED, {message_id: messageId, channel_id: channelId, channel_type: channel == null ? value3 : channel.type, guild_id: channel == null ? value3 : channel.guild_id, num_of_attachments: numOfAttachments, num_of_gore_attachments: numOfGoreAttachments, num_of_explicit_attachments: numOfExplicitAttachments, num_of_self_harm_attachments: numOfSelfHarmAttachments, num_of_embeds: numOfEmbeds, num_of_gore_embeds: numOfGoreEmbeds, num_of_explicit_embeds: numOfExplicitEmbeds, num_of_self_harm_embeds: numOfSelfHarmEmbeds, has_redactable_explicit: r6, has_redactable_gore: r5, has_redactable_self_harm: r4}); } else if (r4) { channel = ChannelStore.getChannel(channelId); value3 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.REDACTABLE_MESSAGE_LOADED, {message_id: messageId, channel_id: channelId, channel_type: channel == null ? value3 : channel.type, guild_id: channel == null ? value3 : channel.guild_id, num_of_attachments: numOfAttachments, num_of_gore_attachments: numOfGoreAttachments, num_of_explicit_attachments: numOfExplicitAttachments, num_of_self_harm_attachments: numOfSelfHarmAttachments, num_of_embeds: numOfEmbeds, num_of_gore_embeds: numOfGoreEmbeds, num_of_explicit_embeds: numOfExplicitEmbeds, num_of_self_harm_embeds: numOfSelfHarmEmbeds, has_redactable_explicit: r6, has_redactable_gore: r5, has_redactable_self_harm: r4}); } } } } function trackExplicitMediaScanComplete({messageId, channelId, numOfAttachments, numOfExplicitAttachments, numOfEmbeds, numOfExplicitEmbeds}) { // fn#42053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:5644, offset: 0x0112f2c6, size: 178 bytes, params: 2, frame: 22 var channel; var value3; var defaultImport; if (channelId != null) { channel = ChannelStore.getChannel(channelId); value3 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.EXPLICIT_MEDIA_RETROACTIVE_SCAN_COMPLETE, {message_id: messageId, channel_id: channelId, channel_type: channel == null ? value3 : channel.type, guild_id: channel == null ? value3 : channel.guild_id, num_of_attachments: numOfAttachments, num_of_explicit_attachments: numOfExplicitAttachments, num_of_embeds: numOfEmbeds, num_of_explicit_embeds: numOfExplicitEmbeds}); } } function handleExplicitMediaScanTimeoutForMessage(a0) { // fn#42054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6120, offset: 0x0112f378, size: 71 bytes, params: 2, frame: 14 const value = timeoutAttachmentsAndEmbedsForMessage(a0); return a0.merge({attachments: value.attachments, embeds: value.embeds, messageSnapshots: (({messageSnapshots}) => { if (messageSnapshots == null) { return messageSnapshots; } if (messageSnapshots.length === 0) { return messageSnapshots; } return messageSnapshots.map(_fun42056); })(a0)}); function handleExplicitMediaScanTimeoutForForwardedMessage({messageSnapshots}) { // fn#42055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6249, owner: handleExplicitMediaScanTimeoutForMessage.handleExplicitMediaScanTimeoutForForwardedMessage, offset: 0x0112f3bf, size: 47 bytes, params: 2, frame: 11 if (messageSnapshots == null) { return messageSnapshots; } if (messageSnapshots.length === 0) { return messageSnapshots; } return messageSnapshots.map(_fun42056); function _fun42056(a0) { // fn#42056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6384, offset: 0x0112f3ee, size: 76 bytes, params: 2, frame: 14 const message = a0.message; let value = environment.__proto__.__proto__; value = timeoutAttachmentsAndEmbedsForMessage(message); return a0.merge({message: message.merge({attachments: value.attachments, embeds: value.embeds})}); } } } function shouldAgeVerifyForExplicitMedia() { // fn#42058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6716, offset: 0x0112f46b, size: 90 bytes, params: 1, frame: 14 var value; const isFeatureAgeGated = (RegionalFeatureConfigUtilsModule).isFeatureAgeGated; const AgeGatedFeature = (AgeGatedFeatureModule).AgeGatedFeature; const SENSITIVE_CONTENT_SHOW_SETTING = AgeGatedFeature.SENSITIVE_CONTENT_SHOW_SETTING; value = Reflect.apply(isFeatureAgeGated, value, [SENSITIVE_CONTENT_SHOW_SETTING]); return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).shouldShowTiggerPawtect(); } function useShouldAgeVerifyForReason(a0) { // fn#42059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7001, offset: 0x0112f4c5, size: 72 bytes, params: 2, frame: 14 const value2 = useShouldAgeVerifyForExplicitMedia(); return !(value2 ? a0 == null : !value2) && (require(4840) /* metro dependency 4840: ObscureMediaModels */).AGE_VERIFICATION_OBSCURABLE_REASONS.has(a0); } function trackToggleMediaObscurityV2({obscure}) { // fn#42060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7181, offset: 0x0112f50d, size: 110 bytes, params: 2, frame: 16 var defaultImport; if (AgeVerificationUtilsModule.isVerifiedAdult()) { defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.EXPLICIT_MEDIA_OBSCURITY_TOGGLE_V2, {toggle_direction: obscure ? 'hide' : 'show'}); } } function hasMessageSnapshotsWithAttachmentsOrEmbeds({message_snapshots}) { // fn#42061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7392, offset: 0x0112f57b, size: 40 bytes, params: 2, frame: 12 return message_snapshots?.some(function(a0) { var r0; var r1; var property = a0.message; var value = undefined; if (property == null) { r0 = value; } else { property = property.attachments; r0 = property; } r0 = r0 != null && a0.message.attachments.length > 0; if (!r0) { property = a0.message; r1 = property == null ? value : property.embeds; value = r1 != null; r1 = value && a0.message.embeds.length > 0; r0 = r1; } return r0; }); } } function _fun42040(a0) { // fn#42040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:1910, offset: 0x0112eb57, size: 17 bytes, params: 2, frame: 2 a0.content_scan_version = -1; return a0; } function _fun42041(a0) { // fn#42041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:1966, offset: 0x0112eb68, size: 17 bytes, params: 2, frame: 2 a0.contentScanVersion = -1; return a0; } function _fun42062(a0) { // fn#42062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7505, offset: 0x0112f5a3, size: 111 bytes, params: 2, frame: 6 const message = a0.message; const value = undefined; let r0 = (message == null ? value : message.attachments) != null && a0.message.attachments.length > 0; r0 = !r0 ? (a0.message == null ? value : a0.message.embeds) != null && a0.message.embeds.length > 0 : r0; return r0; } global.__d(_fun42038, 4821, [4649, 1379, 4822, 4824, 661, 1314, 1244, 683, 4825, 4826, 4831, 4832, 3835, 4861, 4813, 4840, 2]) /* metro module 4821, dependencies: [4649, 1379, 4822, 4824, 661, 1314, 1244, 683, 4825, 4826, 4831, 4832, 3835, 4861, 4813, 4840, 2] */;