/* Metro module 13351; source: modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx; dependencies: [1314, 13348, 4844, 4842, 2] */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ 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 SensitiveMediaExplicitRedactionSettingsUtilsModule from '../explicit_media_redaction/SensitiveMediaExplicitRedactionSettingsUtils.tsx'; /* Metro dependency 4842 */ import * as ParentalControlledUserSettingsModule from '../user_settings/family_center/ParentalControlledUserSettings.tsx'; /* Metro dependency 13348 */ function _fun101675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:6, offset: 0x0221baf5, size: 177 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const isSetAndNotDefault2 = isSetAndNotDefault; const getGoreContentSettingOrDefault_1016772 = getGoreContentSettingOrDefault_101677; const resolveExplicitContentSettingWithDefaultsForTeen2 = resolveExplicitContentSettingWithDefaultsForTeen; const getExplicitContentSettingOrDefault_1016792 = getExplicitContentSettingOrDefault_101679; (FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx'); exports.isSetAndNotDefault = isSetAndNotDefault2; exports.getGoreContentSettingOrDefault = getGoreContentSettingOrDefault_1016772; exports.updateGoreContentSetting = updateGoreContentSetting_101680; exports.resolveExplicitContentSettingWithDefaultsForTeen = resolveExplicitContentSettingWithDefaultsForTeen2; exports.getExplicitContentSettingOrDefault = getExplicitContentSettingOrDefault_1016792; exports.updateExplicitContentSetting = updateExplicitContentSetting_101681; function isSetAndNotDefault(a0) { // fn#101676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:115, offset: 0x0221bba6, size: 54 bytes, params: 2, frame: 13 return a0 != null && a0 !== (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION; } function getGoreContentSettingOrDefault_101677(a0) { // fn#101677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:228, offset: 0x0221bbdc, size: 224 bytes, params: 2, frame: 17 const ParentalControlledGoreContent = (ParentalControlledUserSettingsModule).ParentalControlledGoreContent; const {goreContentNonFriendDm, goreContentFriendDm} = ParentalControlledGoreContent.getControlledSetting(a0) ?? ({}); const object = {}; object.goreContentNonFriendDm = isSetAndNotDefault(goreContentNonFriendDm) ? goreContentNonFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({isDm: true}); object.goreContentFriendDm = isSetAndNotDefault(goreContentFriendDm) ? goreContentFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({'isDm': true, 'isFriend': true}); const ExplicitContentRedaction = (Preloaded_user_settingsModule).ExplicitContentRedaction; const BLUR = ExplicitContentRedaction.BLUR; object.goreContentGuilds = BLUR; return object; } function resolveExplicitContentSettingWithDefaultsForTeen({teenId, setting, isFriend}) { // fn#101678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:697, offset: 0x0221bcbc, size: 130 bytes, params: 2, frame: 16 isFriend = !(isFriend === undefined) && isFriend; if (isSetAndNotDefault(setting)) { return setting; } const ParentalControlledLegacyExplicitContent = (ParentalControlledUserSettingsModule).ParentalControlledLegacyExplicitContent; const controlledSetting = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId); return isFriend ? SensitiveMediaExplicitRedactionSettingsUtilsModule.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting] : SensitiveMediaExplicitRedactionSettingsUtilsModule.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting]; } function getExplicitContentSettingOrDefault_101679(a0) { // fn#101679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:1057, offset: 0x0221bd3e, size: 176 bytes, params: 2, frame: 18 const value2 = undefined; const ParentalControlledExplicitContent = (ParentalControlledUserSettingsModule).ParentalControlledExplicitContent; const controlledSetting = ParentalControlledExplicitContent.getControlledSetting(a0); const object = {}; object.explicitContentNonFriendDm = resolveExplicitContentSettingWithDefaultsForTeen({teenId: a0, setting: controlledSetting == null ? value2 : controlledSetting.explicitContentNonFriendDm}); object.explicitContentFriendDm = resolveExplicitContentSettingWithDefaultsForTeen({teenId: a0, setting: controlledSetting == null ? value2 : controlledSetting.explicitContentFriendDm, isFriend: true}); const ExplicitContentRedaction = (Preloaded_user_settingsModule).ExplicitContentRedaction; const BLUR = ExplicitContentRedaction.BLUR; object.explicitContentGuilds = BLUR; return object; } function updateGoreContentSetting_101680(a0, a1) { // fn#101680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:1713, offset: 0x0221bdee, size: 76 bytes, params: 3, frame: 15 const goreContentSettingOrDefault_101677 = getGoreContentSettingOrDefault_101677(a0); const ParentalControlledGoreContent = (ParentalControlledUserSettingsModule).ParentalControlledGoreContent; const updateControlledSetting = ParentalControlledGoreContent.updateControlledSetting; const object = {}; copyDataProperties(object, a1, copyDataProperties(object, goreContentSettingOrDefault_101677, undefined)); Reflect.apply(updateControlledSetting, ParentalControlledGoreContent, [a0, object]); } function updateExplicitContentSetting_101681(a0, a1) { // fn#101681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:2042, offset: 0x0221be3a, size: 76 bytes, params: 3, frame: 15 const explicitContentSettingOrDefault_101679 = getExplicitContentSettingOrDefault_101679(a0); const ParentalControlledExplicitContent = (ParentalControlledUserSettingsModule).ParentalControlledExplicitContent; const updateControlledSetting = ParentalControlledExplicitContent.updateControlledSetting; const object = {}; copyDataProperties(object, a1, copyDataProperties(object, explicitContentSettingOrDefault_101679, undefined)); Reflect.apply(updateControlledSetting, ParentalControlledExplicitContent, [a0, object]); } } global.__d(_fun101675, 13351, [1314, 13348, 4844, 4842, 2]) /* metro module 13351, dependencies: [1314, 13348, 4844, 4842, 2] */;