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

No files matched your search

+30 -26
View File
@@ -1,34 +1,38 @@
/* Metro module 11466; source: modules/media/MediaAnalytics.tsx; dependencies: [661, 683, 2] */
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun87784(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11652:6, offset: 0x01fcb279, size: 133 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/MediaAnalytics.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media/MediaAnalytics.tsx');
exports.logMediaAttachmentPlaybackStarted = logMediaAttachmentPlaybackStarted;
exports.logMediaAttachmentPlaybackEnded = logMediaAttachmentPlaybackEnded;
function logMediaAttachmentPlaybackStarted({guild_id, id, type}, {content_type, flags, size, id}, a2, a3, a4, a5) { // fn#87785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11652:223, offset: 0x01fcb2fe, size: 184 bytes, params: 7, frame: 20
const value = a2;
const value2 = a4;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const MEDIA_ATTACHMENT_PLAYBACK_STARTED = AnalyticEvents.MEDIA_ATTACHMENT_PLAYBACK_STARTED;
const Math = global.Math;
Reflect.apply(track, defaultImport, [MEDIA_ATTACHMENT_PLAYBACK_STARTED, {guild_id: guild_id, channel_id: id,
channel_type: type, type: content_type, flags: flags, size: size, duration: value, message_id: a3,
attachment_id: id, start_duration_secs: Math.min(value ?? value2, value2), sender_user_id: a5}]);
}
function logMediaAttachmentPlaybackEnded(a0, a1, a2, a3, a4, {content_type}) { // fn#87786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11652:573, offset: 0x01fcb3b6, size: 134 bytes, params: 7, frame: 20
const value = a1;
const value2 = a2;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const MEDIA_ATTACHMENT_PLAYBACK_ENDED = AnalyticEvents.MEDIA_ATTACHMENT_PLAYBACK_ENDED;
const Math = global.Math;
Reflect.apply(track, defaultImport, [MEDIA_ATTACHMENT_PLAYBACK_ENDED, {message_id: a0, total_duration_secs: value,
end_duration_secs: Math.min(value ?? value2, value2), sender_user_id: a3, duration_listening_secs: a4,
type: content_type}]);
}
}
function logMediaAttachmentPlaybackStarted({guild_id, id, type}, {content_type, flags, size, id}, a2, a3, a4, a5) { // fn#87785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11652:223, offset: 0x01fcb2fe, size: 184 bytes, params: 7, frame: 20
const value = a2;
const value2 = a4;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const MEDIA_ATTACHMENT_PLAYBACK_STARTED = AnalyticEvents.MEDIA_ATTACHMENT_PLAYBACK_STARTED;
const Math = global.Math;
Reflect.apply(track, defaultImport, [MEDIA_ATTACHMENT_PLAYBACK_STARTED, {guild_id: guild_id, channel_id: id,
channel_type: type, type: content_type, flags: flags, size: size, duration: value, message_id: a3,
attachment_id: id, start_duration_secs: Math.min(value ?? value2, value2), sender_user_id: a5}]);
}
function logMediaAttachmentPlaybackEnded(a0, a1, a2, a3, a4, {content_type}) { // fn#87786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11652:573, offset: 0x01fcb3b6, size: 134 bytes, params: 7, frame: 20
const value = a1;
const value2 = a2;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const MEDIA_ATTACHMENT_PLAYBACK_ENDED = AnalyticEvents.MEDIA_ATTACHMENT_PLAYBACK_ENDED;
const Math = global.Math;
Reflect.apply(track, defaultImport, [MEDIA_ATTACHMENT_PLAYBACK_ENDED, {message_id: a0, total_duration_secs: value,
end_duration_secs: Math.min(value ?? value2, value2), sender_user_id: a3, duration_listening_secs: a4,
type: content_type}]);
}
global.__d(_fun87784, 11466, [661, 683, 2]) /* metro module 11466, dependencies: [661, 683, 2] */;
+133 -131
View File
@@ -1,29 +1,33 @@
/* Metro module 4630; source: modules/media/MediaTypes.tsx; dependencies: [661, 1391, 1909, 4631, 1471, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as MediaFormatTestersModule from '../messages/MediaFormatTesters.tsx'; /* Metro dependency 4631 */
function _fun39840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:6, offset: 0x010ed613, size: 371 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const closure = function(a0) {
return {version: a0.version, flags: a0.flags};
};
const closure2 = messageAttachmentToUnfurledMediaItem;
const messageAttachmentToUnfurledMediaItem2 = messageAttachmentToUnfurledMediaItem;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageAttachmentFlags;
object2 = {EXPLICIT: 1};
object2[1] = 'EXPLICIT';
object2.GORE = 2;
object2[2] = 'GORE';
object2.SELF_HARM = 4;
object2[4] = 'SELF_HARM';
const object4 = {IS_ANIMATED: 1};
object4[1] = 'IS_ANIMATED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/MediaTypes.tsx');
exports.ContentScanFlags = object2;
object = {EXPLICIT: 1};
object[1] = 'EXPLICIT';
object.GORE = 2;
object[2] = 'GORE';
object.SELF_HARM = 4;
object[4] = 'SELF_HARM';
const object3 = {IS_ANIMATED: 1};
object3[1] = 'IS_ANIMATED';
(FileImportTrackerModule).fileFinishedImporting('modules/media/MediaTypes.tsx');
exports.ContentScanFlags = object;
exports.ImageEncoder = {NATIVE: 'native', JPEGLI: 'jpegli', JPEG_IOS: 'jpeg_ios', PASSTHROUGH: 'passthrough'};
exports.toContentScanMetadata = closure;
exports.UnfurledMediaItemFlags = object4;
exports.UnfurledMediaItemFlags = object3;
exports.toUnfurledMediaItem = toUnfurledMediaItem;
exports.messageAttachmentToUnfurledMediaItem = closure2;
exports.messageAttachmentToUnfurledMediaItem = messageAttachmentToUnfurledMediaItem2;
exports.getUnfurledMediaItemType = getUnfurledMediaItemType;
exports.messageAttachmentToMediaItem = messageAttachmentToMediaItem;
exports.embedMediaToMediaItem = function(a0, a1, a2) {
@@ -35,134 +39,132 @@ function _fun39840(global, require, importDefault, importAll, module, exports, d
return a0.width != null && a0.width > 0 && a0.height != null && a0.height > 0;
};
exports.getMediaItemDisplayUrl = getMediaItemDisplayUrl;
}
function messageAttachmentToUnfurledMediaItem(a0) { // fn#39842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:485, offset: 0x010ed7a1, size: 328 bytes, params: 2, frame: 20
const value2 = undefined;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
let hasFlag = flagUtilsModule.hasFlag;
const flags = a0.flags;
const value3 = 0;
let r4 = flags ?? value3;
const CONTAINS_EXPLICIT_MEDIA = MessageAttachmentFlags.CONTAINS_EXPLICIT_MEDIA;
r4 = Reflect.apply(hasFlag, flagUtilsModule, [r4, CONTAINS_EXPLICIT_MEDIA]) ? env0_4.EXPLICIT | 0 : value3;
const moduleValue2 = flagUtilsModule;
hasFlag = moduleValue2.hasFlag;
const r7 = a0.flags ?? value3;
const IS_ANIMATED = MessageAttachmentFlags.IS_ANIMATED;
const r1 = Reflect.apply(hasFlag, moduleValue2, [r7, IS_ANIMATED]) ? env0_5.IS_ANIMATED | 0 : value3;
const object2 = {};
object2.url = a0.url;
object2.proxyUrl = a0.proxy_url;
object2.height = a0.height;
object2.width = a0.width;
object2.contentType = a0.content_type;
object2.originalContentType = a0.original_content_type;
object2.placeholder = a0.placeholder;
object2.placeholderVersion = a0.placeholder_version;
const UnfurledMediaLoadingState = (require(1909) /* metro dependency 1909: Server */).UnfurledMediaLoadingState;
const LOADED_SUCCESS = UnfurledMediaLoadingState.LOADED_SUCCESS;
object2.loadingState = LOADED_SUCCESS;
object2.contentScanMetadata = a0.content_scan_version == null ? value2 : {version: a0.content_scan_version,
flags: r4};
object2.flags = r1;
return object2;
}
function getMessageAttachmentMediaItemType(a0) { // fn#39843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:1084, offset: 0x010ed8e9, size: 102 bytes, params: 2, frame: 15
var r0;
var value;
const mediaFormatTestersModule = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (mediaFormatTestersModule.isImageFile(a0.filename)) {
r0 = 'IMAGE';
} else {
value = mediaFormatTestersModule;
value = value.isVideoFile(a0.filename);
r0 = value ? 'VIDEO' : 'INVALID';
function messageAttachmentToUnfurledMediaItem(a0) { // fn#39842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:485, offset: 0x010ed7a1, size: 328 bytes, params: 2, frame: 20
const value2 = undefined;
let hasFlag = FlagUtilsModule.hasFlag;
const flags = a0.flags;
const value3 = 0;
let r4 = flags ?? value3;
const CONTAINS_EXPLICIT_MEDIA = MessageAttachmentFlags.CONTAINS_EXPLICIT_MEDIA;
r4 = Reflect.apply(hasFlag, FlagUtilsModule, [r4, CONTAINS_EXPLICIT_MEDIA]) ? env0_4.EXPLICIT | 0 : value3;
hasFlag = FlagUtilsModule.hasFlag;
const r7 = a0.flags ?? value3;
const IS_ANIMATED = MessageAttachmentFlags.IS_ANIMATED;
const r1 = Reflect.apply(hasFlag, FlagUtilsModule, [r7, IS_ANIMATED]) ? env0_5.IS_ANIMATED | 0 : value3;
const object = {};
object.url = a0.url;
object.proxyUrl = a0.proxy_url;
object.height = a0.height;
object.width = a0.width;
object.contentType = a0.content_type;
object.originalContentType = a0.original_content_type;
object.placeholder = a0.placeholder;
object.placeholderVersion = a0.placeholder_version;
const UnfurledMediaLoadingState = (ServerModule).UnfurledMediaLoadingState;
const LOADED_SUCCESS = UnfurledMediaLoadingState.LOADED_SUCCESS;
object.loadingState = LOADED_SUCCESS;
object.contentScanMetadata = a0.content_scan_version == null ? value2 : {version: a0.content_scan_version,
flags: r4};
object.flags = r1;
return object;
}
return r0;
}
function toUnfurledMediaItem(a0) { // fn#39844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:1422, offset: 0x010ed94f, size: 165 bytes, params: 2, frame: 15
const object2 = {};
object2.url = a0.url;
object2.proxyUrl = a0.proxy_url;
object2.height = a0.height;
object2.width = a0.width;
object2.placeholder = a0.placeholder;
object2.placeholderVersion = a0.placeholder_version;
object2.contentType = a0.content_type;
object2.originalContentType = a0.original_content_type;
object2.loadingState = a0.loading_state;
object2.contentScanMetadata = a0.content_scan_metadata != null ? toContentScanMetadata(a0.content_scan_metadata) : undefined;
object2.flags = a0.flags ?? 0;
return object2;
}
function getMessageAttachmentMediaItemType(a0) { // fn#39843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:1084, offset: 0x010ed8e9, size: 102 bytes, params: 2, frame: 15
var r0;
var value;
if (MediaFormatTestersModule.isImageFile(a0.filename)) {
r0 = 'IMAGE';
} else {
value = MediaFormatTestersModule;
value = value.isVideoFile(a0.filename);
r0 = value ? 'VIDEO' : 'INVALID';
}
return r0;
}
function getUnfurledMediaItemType(a0) { // fn#39845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:1932, offset: 0x010ed9f4, size: 170 bytes, params: 2, frame: 17
var r1;
var r0;
var moduleValue2;
var isVideoContentType2;
var value3;
var value;
const mediaFormatTestersModule = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (mediaFormatTestersModule.isImageContentType(a0.contentType)) {
r0 = 'IMAGE';
} else {
moduleValue2 = mediaFormatTestersModule;
isVideoContentType2 = moduleValue2.isVideoContentType(a0.contentType);
value3 = 'INVALID';
if (isVideoContentType2) {
if (a0.proxyUrl != null) {
value = importDefault(1471) /* metro dependency 1471: URLUtils */;
r1 = value.toURLSafe(a0.proxyUrl) != null ? 'VIDEO' : value3;
function toUnfurledMediaItem(a0) { // fn#39844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:1422, offset: 0x010ed94f, size: 165 bytes, params: 2, frame: 15
const object = {};
object.url = a0.url;
object.proxyUrl = a0.proxy_url;
object.height = a0.height;
object.width = a0.width;
object.placeholder = a0.placeholder;
object.placeholderVersion = a0.placeholder_version;
object.contentType = a0.content_type;
object.originalContentType = a0.original_content_type;
object.loadingState = a0.loading_state;
object.contentScanMetadata = a0.content_scan_metadata != null ? toContentScanMetadata(a0.content_scan_metadata) : undefined;
object.flags = a0.flags ?? 0;
return object;
}
function getUnfurledMediaItemType(a0) { // fn#39845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:1932, offset: 0x010ed9f4, size: 170 bytes, params: 2, frame: 17
var r1;
var r0;
var moduleValue2;
var isVideoContentType2;
var value3;
var value;
if (MediaFormatTestersModule.isImageContentType(a0.contentType)) {
r0 = 'IMAGE';
} else {
moduleValue2 = MediaFormatTestersModule;
isVideoContentType2 = moduleValue2.isVideoContentType(a0.contentType);
value3 = 'INVALID';
if (isVideoContentType2) {
if (a0.proxyUrl != null) {
value = importDefault(1471) /* metro dependency 1471: URLUtils */;
r1 = value.toURLSafe(a0.proxyUrl) != null ? 'VIDEO' : value3;
} else {
r1 = value3;
}
} else {
r1 = value3;
}
} else {
r1 = value3;
r0 = r1;
}
r0 = r1;
return r0;
}
return r0;
}
function messageAttachmentToMediaItem(a0, a1) { // fn#39846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:2173, offset: 0x010eda9e, size: 132 bytes, params: 3, frame: 14
const object2 = {};
const messageAttachmentToUnfurledMediaItemBinding = messageAttachmentToUnfurledMediaItem;
copyDataProperties(object2, messageAttachmentToUnfurledMediaItemBinding(a0),
messageAttachmentToUnfurledMediaItemBinding);
object2['type'] = getMessageAttachmentMediaItemType(a0);
object2['alt'] = a0.description;
object2['sourceMetadata'] = {message: a1, identifier: {type: 'attachment', attachmentId: a0.id,
filename: a0.filename, title: a0.title, size: a0.size}};
return object2;
}
function getMediaItemDisplayUrl(a0) { // fn#39849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:2849, offset: 0x010edbb7, size: 156 bytes, params: 2, frame: 16
var r1;
var defaultImport;
var value3;
const value = null;
if (value == a0) {
return value;
function messageAttachmentToMediaItem(a0, a1) { // fn#39846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:2173, offset: 0x010eda9e, size: 132 bytes, params: 3, frame: 14
const object = {};
const messageAttachmentToUnfurledMediaItemBinding = messageAttachmentToUnfurledMediaItem;
copyDataProperties(object, messageAttachmentToUnfurledMediaItemBinding(a0),
messageAttachmentToUnfurledMediaItemBinding);
object['type'] = getMessageAttachmentMediaItemType(a0);
object['alt'] = a0.description;
object['sourceMetadata'] = {message: a1, identifier: {type: 'attachment', attachmentId: a0.id,
filename: a0.filename, title: a0.title, size: a0.size}};
return object;
}
if (a0.type === 'VIDEO') {
if (value != a0.proxyUrl) {
defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
value3 = defaultImport.toURLSafe(a0.proxyUrl);
if (value == value3) {
r1 = value;
} else {
value3.searchParams.append('format', 'webp');
r1 = value3.toString();
function getMediaItemDisplayUrl(a0) { // fn#39849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4808:2849, offset: 0x010edbb7, size: 156 bytes, params: 2, frame: 16
var r1;
var defaultImport;
var value3;
const value = null;
if (value == a0) {
return value;
}
if (a0.type === 'VIDEO') {
if (value != a0.proxyUrl) {
defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
value3 = defaultImport.toURLSafe(a0.proxyUrl);
if (value == value3) {
r1 = value;
} else {
value3.searchParams.append('format', 'webp');
r1 = value3.toString();
}
return r1;
}
return r1;
}
const proxyUrl = a0.proxyUrl;
const r3 = value != proxyUrl ? proxyUrl : a0.url;
return value != r3 ? r3 : value;
}
const proxyUrl = a0.proxyUrl;
const r3 = value != proxyUrl ? proxyUrl : a0.url;
return value != r3 ? r3 : value;
}
global.__d(_fun39840, 4630, [661, 1391, 1909, 4631, 1471,
2]) /* metro module 4630, dependencies: [661, 1391, 1909, 4631, 1471, 2] */;
+10 -6
View File
@@ -1,13 +1,17 @@
/* Metro module 15357; source: modules/media/VideoActionCreators.tsx; dependencies: [694, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun117392(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15554:6, offset: 0x024b1526, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/VideoActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media/VideoActionCreators.tsx');
exports.updateVideoSize = updateVideoSize;
function updateVideoSize(a0, a1, a2) { // fn#117393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15554:181, offset: 0x024b1589, size: 70 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'VIDEO_SIZE_UPDATE', streamId: a0,
dimensions: a1, zoom: a2});
}
}
function updateVideoSize(a0, a1, a2) { // fn#117393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15554:181, offset: 0x024b1589, size: 70 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIDEO_SIZE_UPDATE', streamId: a0,
dimensions: a1, zoom: a2});
}
global.__d(_fun117392, 15357, [694, 2]) /* metro module 15357, dependencies: [694, 2] */;
+191 -132
View File
@@ -1,24 +1,24 @@
/* Metro module 11143; source: modules/media/native/AttachmentPreview.tsx; dependencies: [31, 27, 33, 4501, 697, 11144, 11145, 11146, 11147, 11148, 11149, 11150, 11151, 11152, 11153, 11154, 11155, 11156, 11157, 4655, 4573, 477, 5475, 1305, 9783, 9543, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as FileUtilsModule from '../../../utils/FileUtils.tsx'; /* Metro dependency 4655 */
function _fun85201(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:6, offset: 0x01f66fee, size: 651 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = AttachmentIcon_85202;
const AttachmentIcon_852022 = AttachmentIcon_85202;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.Image;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'overflow': 'hidden', 'borderRadius': null,
const createStyles = CreateStylesModule.createStyles;
const object2 = {'flexDirection': 'row', 'alignItems': 'center', 'overflow': 'hidden', 'borderRadius': null,
'height': 75, 'padding': 12, 'flex': 1};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gap = PX_8;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{fileInfoAttachmentPreviewFile: object3,
object2.gap = PX_8;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{fileInfoAttachmentPreviewFile: object2,
attachmentFileIcon: {'height': 32, 'width': 24}, attachmentFileName: {'paddingRight': 4, 'paddingLeft': 4,
'maxWidth': 136}, videoIcon: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'alignItems': 'center', 'justifyContent': 'center'}}]);
@@ -35,143 +35,202 @@ function _fun85201(global, require, importDefault, importAll, module, exports, d
unknown: importDefault(11155) /* metro dependency 11155 */,
video: importDefault(11156) /* metro dependency 11156 */,
webcode: importDefault(11157) /* metro dependency 11157 */};
const env0_10 = value.memo(_fun85206);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/native/AttachmentPreview.tsx');
const env0_10 = ReactModule.memo(_fun85206);
(FileImportTrackerModule).fileFinishedImporting('modules/media/native/AttachmentPreview.tsx');
exports.default = AttachmentPreview;
exports.AttachmentIcon = closure;
}
function AttachmentIcon_85202({fileName}) { // fn#85202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:792, offset: 0x01f67279, size: 90 bytes, params: 2, frame: 17
const styles = useStyles();
return <Image style={styles.attachmentFileIcon} source={env0_3.useMemo(_fun85203, [fileName])} />;
}
function FilenameText({fileName}) { // fn#85204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:996, offset: 0x01f67331, size: 289 bytes, params: 2, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
const regexp = RegExp('(?:\\.([^.]+))?$', '');
const value2 = '';
const value3 = regexp.exec(fileName ?? value2);
return (
<View>
{fileName != null && value2 !== fileName && <Text style={styles.attachmentFileName} ellipsizeMode="middle" lineClamp={1} variant="text-xs/medium" color="mobile-text-heading-primary">{fileName}</Text>}
<Text
style={styles.attachmentFileName}
lineClamp={1}
variant="text-xs/medium"
color="text-muted"
>
{value3 != null && value3[1] != null ? value3[1].toUpperCase() : 'UNKNOWN'}
</Text>
</View>
);
}
function DefaultAttachmentPreview({fileName, maxFileWidth, borderRadius}) { // fn#85205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:1436, offset: 0x01f67452, size: 142 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={[styles.fileInfoAttachmentPreviewFile, {maxWidth: maxFileWidth, borderRadius: borderRadius}]}>
<AttachmentIcon_85202 fileName={fileName} />
<FilenameText fileName={fileName} />
</View>
);
}
function _fun85206({uri, width, height, borderRadius, style, fileName}) { // fn#85206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:1691, offset: 0x01f674e0, size: 423 bytes, params: 2, frame: 22
var r0;
const object3 = {uri: uri, width: width, height: height};
const object4 = {width: width, height: height, borderRadius: borderRadius};
let value = fileName != null;
let r1 = value && fileName !== '' && RegExp('\\.gif$', 'i').test(fileName);
if (r1) {
r0 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && uri.startsWith('ph://');
if (!r0) {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
r0 = value && uri.startsWith('content://');
exports.AttachmentIcon = AttachmentIcon_852022;
function AttachmentIcon_85202({fileName}) { // fn#85202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:792, offset: 0x01f67279, size: 90 bytes, params: 2, frame: 17
const styles = useStyles();
return <Image style={styles.attachmentFileIcon} source={env0_3.useMemo(_fun85203, [fileName])} />;
function _fun85203() { // fn#85203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:853, offset: 0x01f672d3, size: 94 bytes, params: 1, frame: 16
const value = environment.__proto__;
return env1_9[FileUtilsModule.classifyFileName(fileName ?? '')] ?? (importDefault(11155) /* metro dependency 11155 */);
}
r1 = r0;
}
const viewProps = {style: [object4, style, {overflow: 'hidden'}]};
if (r1) {
viewProps.children = ((Component) => <Component style={[object4,
style]} source={object3} resizeMode="cover" enableAnimation />)(importDefault(5475) /* metro dependency 5475: FastImage */);
} else {
viewProps.children = ((ThumbnailImage) => <ThumbnailImage style={[object4,
style]} source={object3} localImageSource={object3} />)((require(1305) /* metro dependency 1305: native */).ThumbnailImage);
}
return <View {...viewProps} />;
}
function AttachmentPreview({uri, isImage, isVideo, width, height, maxFileWidth, fileName, borderRadius = importDefault(dependencyMap[4]).radii.sm, showPlayOnVideoPreview, defaultPreview = <DefaultAttachmentPreview fileName={fileName} maxFileWidth={maxFileWidth} borderRadius={borderRadius} />, style}) { // fn#85207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:2322, offset: 0x01f67687, size: 676 bytes, params: 2, frame: 30
var r0;
var moduleValue;
var moduleValue2;
var moduleValue3;
width = width === undefined ? 75 : width;
height = height === undefined ? 75 : height;
showPlayOnVideoPreview = !(showPlayOnVideoPreview === undefined) && showPlayOnVideoPreview;
const styles = useStyles();
if (isImage) {
r0 = ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10);
} else if (isVideo) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
r0 = showPlayOnVideoPreview ? <View style={style}>{((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)}<View style={styles.videoIcon}>{((CirclePlayIcon) => <CirclePlayIcon size="md" color="white" secondaryColor="black" />)((require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon)}</View></View> : ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10);
}
function FilenameText({fileName}) { // fn#85204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:996, offset: 0x01f67331, size: 289 bytes, params: 2, frame: 23
const Text = (TextModule).Text;
const styles = useStyles();
const regexp = RegExp('(?:\\.([^.]+))?$', '');
const value2 = '';
const value3 = regexp.exec(fileName ?? value2);
return (
<View>
{fileName != null && value2 !== fileName && <Text style={styles.attachmentFileName} ellipsizeMode="middle" lineClamp={1} variant="text-xs/medium" color="mobile-text-heading-primary">{fileName}</Text>}
<Text
style={styles.attachmentFileName}
lineClamp={1}
variant="text-xs/medium"
color="text-muted"
>
{value3 != null && value3[1] != null ? value3[1].toUpperCase() : 'UNKNOWN'}
</Text>
</View>
);
}
function DefaultAttachmentPreview({fileName, maxFileWidth, borderRadius}) { // fn#85205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:1436, offset: 0x01f67452, size: 142 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={[styles.fileInfoAttachmentPreviewFile, {maxWidth: maxFileWidth, borderRadius: borderRadius}]}>
<AttachmentIcon_85202 fileName={fileName} />
<FilenameText fileName={fileName} />
</View>
);
}
function _fun85206({uri, width, height, borderRadius, style, fileName}) { // fn#85206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:1691, offset: 0x01f674e0, size: 423 bytes, params: 2, frame: 22
var r0;
const object = {uri: uri, width: width, height: height};
const object2 = {width: width, height: height, borderRadius: borderRadius};
let value = fileName != null;
let r1 = value && fileName !== '' && RegExp('\\.gif$', 'i').test(fileName);
if (r1) {
r0 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && uri.startsWith('ph://');
if (!r0) {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
r0 = value && uri.startsWith('content://');
}
r1 = r0;
}
const viewProps = {style: [object2, style, {overflow: 'hidden'}]};
if (r1) {
viewProps.children = ((Component) => <Component style={[object2,
style]} source={object} resizeMode="cover" enableAnimation />)(importDefault(5475) /* metro dependency 5475: FastImage */);
} else {
viewProps.children = ((ThumbnailImage) => <ThumbnailImage style={[object2,
style]} source={object} localImageSource={object} />)((require(1305) /* metro dependency 1305: native */).ThumbnailImage);
}
return <View {...viewProps} />;
}
function AttachmentPreview({uri, isImage, isVideo, width, height, maxFileWidth, fileName, borderRadius = importDefault(dependencyMap[4]).radii.sm, showPlayOnVideoPreview, defaultPreview = <DefaultAttachmentPreview fileName={fileName} maxFileWidth={maxFileWidth} borderRadius={borderRadius} />, style}) { // fn#85207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:2322, offset: 0x01f67687, size: 676 bytes, params: 2, frame: 30
var r0;
var moduleValue;
var moduleValue2;
var moduleValue3;
width = width === undefined ? 75 : width;
height = height === undefined ? 75 : height;
showPlayOnVideoPreview = !(showPlayOnVideoPreview === undefined) && showPlayOnVideoPreview;
const styles = useStyles();
if (isImage) {
r0 = ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10);
} else if (isVideo) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
r0 = (
showPlayOnVideoPreview
? (
<View style={style}>
{((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)}
<View style={styles.videoIcon}>
{((CirclePlayIcon) => <CirclePlayIcon size="md" color="white" secondaryColor="black" />)((require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon)}
</View>
</View>
)
: ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)
);
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isIOS()) {
if (uri.startsWith('ph://')) {
r0 = (
showPlayOnVideoPreview
? (
<View style={style}>
{((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)}
<View style={styles.videoIcon}>
{((CirclePlayIcon) => <CirclePlayIcon size="md" color="white" secondaryColor="black" />)((require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon)}
</View>
</View>
)
: ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)
);
} else if (isVideo) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r0 = (
moduleValue3.isIOS()
? (
<View style={style}>
{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}
</View>
)
: defaultPreview
);
} else {
r0 = defaultPreview;
}
} else if (isVideo) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r0 = (
moduleValue3.isIOS()
? (
<View style={style}>
{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}
</View>
)
: defaultPreview
);
} else {
r0 = defaultPreview;
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isIOS()) {
if (uri.startsWith('ph://')) {
r0 = showPlayOnVideoPreview ? <View style={style}>{((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)}<View style={styles.videoIcon}>{((CirclePlayIcon) => <CirclePlayIcon size="md" color="white" secondaryColor="black" />)((require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon)}</View></View> : ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10);
r0 = (
showPlayOnVideoPreview
? (
<View style={style}>
{((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)}
<View style={styles.videoIcon}>
{((CirclePlayIcon) => <CirclePlayIcon size="md" color="white" secondaryColor="black" />)((require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon)}
</View>
</View>
)
: ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)
);
} else if (isVideo) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r0 = moduleValue3.isIOS() ? <View style={style}>{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}</View> : defaultPreview;
r0 = (
moduleValue3.isIOS()
? (
<View style={style}>
{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}
</View>
)
: defaultPreview
);
} else {
r0 = defaultPreview;
}
} else if (isVideo) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r0 = moduleValue3.isIOS() ? <View style={style}>{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}</View> : defaultPreview;
r0 = (
moduleValue3.isIOS()
? (
<View style={style}>
{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}
</View>
)
: defaultPreview
);
} else {
r0 = defaultPreview;
}
}
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isIOS()) {
if (uri.startsWith('ph://')) {
r0 = showPlayOnVideoPreview ? <View style={style}>{((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10)}<View style={styles.videoIcon}>{((CirclePlayIcon) => <CirclePlayIcon size="md" color="white" secondaryColor="black" />)((require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon)}</View></View> : ((Component) => <Component uri={uri} width={width} height={height} borderRadius={borderRadius} style={style} fileName={fileName} />)(env0_10);
} else if (isVideo) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r0 = moduleValue3.isIOS() ? <View style={style}>{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}</View> : defaultPreview;
} else {
r0 = defaultPreview;
}
} else if (isVideo) {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r0 = moduleValue3.isIOS() ? <View style={style}>{((VideoComponent) => <VideoComponent style={{height: height,
width: width}} source={{uri: uri}} muted paused resizeMode="cover" preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}</View> : defaultPreview;
} else {
r0 = defaultPreview;
}
return r0;
}
return r0;
}
function _fun85203() { // fn#85203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11329:853, offset: 0x01f672d3, size: 94 bytes, params: 1, frame: 16
const value = environment.__proto__;
const fileUtilsModule = require(4655) /* metro dependency 4655: FileUtils */;
return env1_9[fileUtilsModule.classifyFileName(fileName ?? '')] ?? (importDefault(11155) /* metro dependency 11155 */);
}
global.__d(_fun85201, 11143, [31, 27, 33, 4501, 697, 11144, 11145, 11146, 11147, 11148, 11149, 11150, 11151, 11152,
11153, 11154, 11155, 11156, 11157, 4655, 4573, 477, 5475, 1305, 9783, 9543,
2]) /* metro module 11143, dependencies: [31, 27, 33, 4501, 697, 11144, 11145, 11146, 11147, 11148, 11149, 11150, 11151, 11152, 11153, 11154, 11155, 11156, 11157, 4655, 4573, 477, 5475, 1305, 9783, 9543, 2] */;
+38 -33
View File
@@ -1,45 +1,50 @@
/* Metro module 8509; source: modules/media/native/Caption.tsx; dependencies: [27, 661, 33, 4501, 697, 4000, 1305, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun67450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8694:6, offset: 0x01c23282, size: 344 bytes, params: 8, frame: 25
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).View;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
const Fonts = (ConstantsModule).Fonts;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object5.fontFamily = PRIMARY_BOLD;
object2.fontFamily = PRIMARY_BOLD;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object5.color = WHITE;
object5.fontSize = 12;
object4.captionText = object5;
const object6 = {'backgroundColor': null, 'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 2,
object2.color = WHITE;
object2.fontSize = 12;
object.captionText = object2;
const object3 = {'backgroundColor': null, 'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 2,
'position': 'absolute', 'right': 6, 'bottom': 6};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object6.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_700, 0.5]);
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.labelContainer = object6;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/native/Caption.tsx');
object3.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_700, 0.5]);
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.labelContainer = object3;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/media/native/Caption.tsx');
exports.Caption = Caption;
function Caption({label, style, textStyle}) { // fn#67451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8694:524, offset: 0x01c233da, size: 136 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.labelContainer, style];
const LegacyText = (NativeModule).LegacyText;
return (
<View style={items2}>
<LegacyText style={[styles.captionText, textStyle]}>
{label}
</LegacyText>
</View>
);
}
}
function Caption({label, style, textStyle}) { // fn#67451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8694:524, offset: 0x01c233da, size: 136 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.labelContainer, style];
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<View style={items2}>
<LegacyText style={[styles.captionText, textStyle]}>
{label}
</LegacyText>
</View>
);
}
global.__d(_fun67450, 8509, [27, 661, 33, 4501, 697, 4000, 1305,
2]) /* metro module 8509, dependencies: [27, 661, 33, 4501, 697, 4000, 1305, 2] */;
@@ -1,227 +1,248 @@
/* Metro module 4682; source: modules/media/native/IosImageTypesManager.tsx; dependencies: [57, 6, 7, 15, 17, 18, 27, 3, 4561, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
function _fun40520(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:6, offset: 0x01103903, size: 312 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(15) /* metro dependency 15 */;
const env0_4 = importDefault(17) /* metro dependency 17 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
const env0_6 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('IosImageTypesManager');
value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun40524(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/native/IosImageTypesManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media/native/IosImageTypesManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_40521() { // fn#40521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:182, offset: 0x01103a3b, size: 94 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_40521_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun40524(a0) { // fn#40524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:448, offset: 0x01103a99, size: 316 bytes, params: 2, frame: 16
const closure = IosImageTypesManager;
env0_5(closure, a0);
return env0_2(closure, [{key: '_initialize', value: function() {
this.initializeSupportedImageTypes();
}}, {key: '_terminate', value: function() {
}}, {key: 'initializeSupportedImageTypes', value: value_40528}, {key: 'getSupportedImageTypes', value: value_40529},
{key: 'isImageTypeSupported', value: value_40530}, {key: 'getSupportedExtensions', value: value_40531},
{key: 'getSupportedMimeTypes', value: value_40532}, {key: 'getAnimatedExtensions', value: value_40533},
{key: 'isExtensionSupported', value: value_40534}, {key: 'isMimeTypeSupported', value: value_40535},
{key: 'isExtensionAnimated', value: value_40536}]);
}
function IosImageTypesManager() { // fn#40525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:460, offset: 0x01103bd5, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_1(this, IosImageTypesManager);
const value3 = env1_4(IosImageTypesManager);
return env1_3(this, _isNativeReflectConstruct_40521() ? global.Reflect.construct(value3, arguments,
env1_4(this).constructor) : value3.apply(this, arguments));
}
function value_40528() { // fn#40528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:910, offset: 0x01103c59, size: 509 bytes, params: 1, frame: 26
var r12;
var r5;
var MediaManager;
var supportedImageTypes;
var Set;
var prototype;
var value3;
var set;
var value4;
var value5;
var value6;
var value7;
var value8;
var value9;
var Object;
var value10;
var length;
var value11;
var property;
var binding;
var value12;
var extension;
var mimeType;
var value13;
var value14;
var value15;
var value16;
var value17;
var value18;
var error;
var value19;
var value20;
var value21;
var value22;
var value23;
var value24;
if (env1_8 === null) {
function _isNativeReflectConstruct_40521() { // fn#40521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:182, offset: 0x01103a3b, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
MediaManager = NativeModules.MediaManager;
supportedImageTypes = MediaManager.getSupportedImageTypes();
env1_8 = supportedImageTypes;
Set = global.Set;
prototype = Set.prototype;
value3 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value4 = set instanceof Object ? set : value3;
Set = global.Set;
prototype = Set.prototype;
value5 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value6 = set instanceof Object ? set : value5;
Set = global.Set;
prototype = Set.prototype;
value7 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value8 = set instanceof Object ? set : value7;
value9 = 0;
Object = global.Object;
value10 = Object.entries(supportedImageTypes);
length = value10.length;
value11 = value9 < length;
if (value11) {
r12 = value9;
while (true) {
property = value10[r12];
binding = env1_0;
value12 = binding(property, 2);
value12[value9];
property = value12[1];
extension = property.extension;
mimeType = property.mimeType;
value13 = extension != null;
if (!value13) {
r5 = value13;
continue;
}
value14 = extension !== '';
r5 = value14;
if (!r5) {
continue;
}
value4.add(extension);
value15 = mimeType != null;
if (!value15) {
r5 = value15;
continue;
}
value16 = mimeType !== '';
r5 = value16;
if (!r5) {
continue;
}
value6.add(mimeType);
value17 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
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_40521_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun40524(a0) { // fn#40524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:448, offset: 0x01103a99, size: 316 bytes, params: 2, frame: 16
const IosImageTypesManager2 = IosImageTypesManager;
Inherits(IosImageTypesManager2, a0);
return CreateClass(IosImageTypesManager2, [{key: '_initialize', value: function() {
this.initializeSupportedImageTypes();
}}, {key: '_terminate', value: function() {
}}, {key: 'initializeSupportedImageTypes', value: value_40528}, {key: 'getSupportedImageTypes', value: value_40529},
{key: 'isImageTypeSupported', value: value_40530}, {key: 'getSupportedExtensions', value: value_40531},
{key: 'getSupportedMimeTypes', value: value_40532}, {key: 'getAnimatedExtensions', value: value_40533},
{key: 'isExtensionSupported', value: value_40534}, {key: 'isMimeTypeSupported', value: value_40535},
{key: 'isExtensionAnimated', value: value_40536}]);
function IosImageTypesManager() { // fn#40525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:460, offset: 0x01103bd5, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_1(this, IosImageTypesManager);
const value3 = env1_4(IosImageTypesManager);
return env1_3(this, _isNativeReflectConstruct_40521() ? global.Reflect.construct(value3, arguments,
env1_4(this).constructor) : value3.apply(this, arguments));
}
function value_40528() { // fn#40528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:910, offset: 0x01103c59, size: 509 bytes, params: 1, frame: 26
var r12;
var r5;
var MediaManager;
var supportedImageTypes;
var Set;
var prototype;
var value3;
var set;
var value4;
var value5;
var value6;
var value7;
var value8;
var value9;
var Object;
var value10;
var length;
var value11;
var property;
var binding;
var value12;
var extension;
var mimeType;
var value13;
var value14;
var value15;
var value16;
var value17;
var value18;
var error;
var value19;
var value20;
var value21;
var value22;
var value23;
var value24;
if (env1_8 === null) {
try {
MediaManager = NativeModules.MediaManager;
supportedImageTypes = MediaManager.getSupportedImageTypes();
env1_8 = supportedImageTypes;
Set = global.Set;
prototype = Set.prototype;
value3 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value4 = set instanceof Object ? set : value3;
Set = global.Set;
prototype = Set.prototype;
value5 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value6 = set instanceof Object ? set : value5;
Set = global.Set;
prototype = Set.prototype;
value7 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value8 = set instanceof Object ? set : value7;
value9 = 0;
Object = global.Object;
value10 = Object.entries(supportedImageTypes);
length = value10.length;
value18 = value17 < length;
if (value18) {
r12 = value17;
continue;
value11 = value9 < length;
if (value11) {
r12 = value9;
while (true) {
property = value10[r12];
binding = env1_0;
value12 = binding(property, 2);
value12[value9];
property = value12[1];
extension = property.extension;
mimeType = property.mimeType;
value13 = extension != null;
if (!value13) {
r5 = value13;
continue;
}
value14 = extension !== '';
r5 = value14;
if (!r5) {
continue;
}
value4.add(extension);
value15 = mimeType != null;
if (!value15) {
r5 = value15;
continue;
}
value16 = mimeType !== '';
r5 = value16;
if (!r5) {
continue;
}
value6.add(mimeType);
value17 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
length = value10.length;
value18 = value17 < length;
if (value18) {
r12 = value17;
continue;
}
break;
}
}
break;
value4.add('jpg');
value8.add('gif');
value8.add('webp');
env1_9 = value4;
env1_10 = value6;
env1_11 = value8;
} catch (error) {
binding = env1_7;
binding.warn('Failed to get iOS supported image types:', error);
env1_8 = {};
Set = global.Set;
prototype = Set.prototype;
value19 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value20 = set instanceof Object ? set : value19;
env1_9 = value20;
Set = global.Set;
prototype = Set.prototype;
value21 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value22 = set instanceof Object ? set : value21;
env1_10 = value22;
Set = global.Set;
prototype = Set.prototype;
value23 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value24 = set instanceof Object ? set : value23;
env1_11 = value24;
}
}
value4.add('jpg');
value8.add('gif');
value8.add('webp');
env1_9 = value4;
env1_10 = value6;
env1_11 = value8;
} catch (error) {
binding = env1_7;
binding.warn('Failed to get iOS supported image types:', error);
env1_8 = {};
Set = global.Set;
prototype = Set.prototype;
value19 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value20 = set instanceof Object ? set : value19;
env1_9 = value20;
Set = global.Set;
prototype = Set.prototype;
value21 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value22 = set instanceof Object ? set : value21;
env1_10 = value22;
Set = global.Set;
prototype = Set.prototype;
value23 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value24 = set instanceof Object ? set : value23;
env1_11 = value24;
}
function value_40529() { // fn#40529, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_40530(a0) { // fn#40530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1424, offset: 0x01103e56, size: 29 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_8 !== null && a0 in env1_8;
}
function value_40531() { // fn#40531, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_40532() { // fn#40532, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_40533() { // fn#40533, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_40534(a0) { // fn#40534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1668, offset: 0x01103e73, size: 35 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_9 !== null && env1_9.has(a0);
}
function value_40535(a0) { // fn#40535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1741, offset: 0x01103e96, size: 35 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_10 !== null && env1_10.has(a0);
}
function value_40536(a0) { // fn#40536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1814, offset: 0x01103eb9, size: 35 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_11 !== null && env1_11.has(a0);
}
}
}
function value_40530(a0) { // fn#40530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1424, offset: 0x01103e56, size: 29 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_8 !== null && a0 in env1_8;
}
function value_40534(a0) { // fn#40534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1668, offset: 0x01103e73, size: 35 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_9 !== null && env1_9.has(a0);
}
function value_40535(a0) { // fn#40535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1741, offset: 0x01103e96, size: 35 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_10 !== null && env1_10.has(a0);
}
function value_40536(a0) { // fn#40536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4860:1814, offset: 0x01103eb9, size: 35 bytes, params: 2, frame: 12
const value = environment.__proto__;
return env1_11 !== null && env1_11.has(a0);
}
global.__d(_fun40520, 4682, [57, 6, 7, 15, 17, 18, 27, 3, 4561,
2]) /* metro module 4682, dependencies: [57, 6, 7, 15, 17, 18, 27, 3, 4561, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,26 +1,33 @@
/* Metro module 4700; source: modules/media/web/utils/DiscordImageFactory.tsx; dependencies: [6, 7, 4701, 4728, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun40639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4878:6, offset: 0x01106d2b, size: 132 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 value = _fun40640();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/web/utils/DiscordImageFactory.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media/web/utils/DiscordImageFactory.tsx');
exports.DiscordImageFactory = value;
function _fun40640() { // fn#40640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4878:118, offset: 0x01106daf, size: 58 bytes, params: 1, frame: 15
return CreateClass(DiscordImageFactory, null, [{key: 'create', value: value_40642}]);
function DiscordImageFactory() { // fn#40641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4878:139, offset: 0x00c618a4, size: 27 bytes, params: 1, frame: 13
env1_2(this, DiscordImageFactory);
}
function value_40642(a0) { // fn#40642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4878:226, offset: 0x01106de9, size: 165 bytes, params: 2, frame: 17
const Uint8Array = global.Uint8Array;
const Math = global.Math;
let uint8Array = new Uint8Array(a0, 0, Math.min(64, a0.byteLength));
const value4 = undefined;
uint8Array = (require(4701) /* metro dependency 4701 */).detectFile(uint8Array);
const value5 = null;
return (value5 == uint8Array ? value4 : uint8Array.mimeType) !== 'image/png' ? value5 : (require(4728) /* metro dependency 4728: DiscordImagePng */).DiscordImagePng.create(a0);
}
}
}
function _fun40640() { // fn#40640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4878:118, offset: 0x01106daf, size: 58 bytes, params: 1, frame: 15
return env0_3(DiscordImageFactory, null, [{key: 'create', value: value_40642}]);
}
function value_40642(a0) { // fn#40642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4878:226, offset: 0x01106de9, size: 165 bytes, params: 2, frame: 17
const Uint8Array = global.Uint8Array;
const Math = global.Math;
let uint8Array = new Uint8Array(a0, 0, Math.min(64, a0.byteLength));
const value4 = undefined;
uint8Array = (require(4701) /* metro dependency 4701 */).detectFile(uint8Array);
const value5 = null;
return (value5 == uint8Array ? value4 : uint8Array.mimeType) !== 'image/png' ? value5 : (require(4728) /* metro dependency 4728: DiscordImagePng */).DiscordImagePng.create(a0);
}
global.__d(_fun40639, 4700, [6, 7, 4701, 4728, 2]) /* metro module 4700, dependencies: [6, 7, 4701, 4728, 2] */;
@@ -1,166 +1,174 @@
/* Metro module 4728; source: modules/media/web/utils/DiscordImagePng.tsx; dependencies: [5, 6, 7, 1907, 4729, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import Module01907 from '../../../../by-id/module-01907.js'; /* Metro dependency 1907 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun40792(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:6, offset: 0x0110b569, size: 152 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(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const value = _fun40793();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media/web/utils/DiscordImagePng.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media/web/utils/DiscordImagePng.tsx');
exports.DiscordImagePng = value;
}
function _fun40793() { // fn#40793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:136, offset: 0x0110b601, size: 201 bytes, params: 1, frame: 18
const closure = DiscordImagePng;
const binding = env0_5;
const items2 = [{key: 'hasTransparency', value: value_40795}];
items2[1] = {key: 'isAnimated', value: function() {
return this.img.tabs.acTL != null;
}};
items2[2] = {key: 'isPng8', value: function() {
return this.img.ctype === 3 && this.img.depth <= 8;
}};
const env0_0 = env0_3(_fun40799);
items2[3] = {key: 'hasSrgbIccProfile', value: value_40800};
items2[4] = {key: 'getBuffer', value: function() {
return this.originalBuffer;
}};
return binding(closure, items2, [{key: 'create', value: value_40802}]);
}
function DiscordImagePng(a0, a1) { // fn#40794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:147, offset: 0x0110b6ca, size: 45 bytes, params: 3, frame: 13
env1_4(this, DiscordImagePng);
this.img = a0;
this.originalBuffer = a1;
}
function value_40795() { // fn#40795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:289, offset: 0x0110b6f7, size: 165 bytes, params: 1, frame: 14
var r3;
if (this.img.ctype !== 4) {
reducibleJoin2: while (true) {
if (this.img.ctype !== 6) {
return false;
}
break reducibleJoin2;
function _fun40793() { // fn#40793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:136, offset: 0x0110b601, size: 201 bytes, params: 1, frame: 18
const DiscordImagePng2 = DiscordImagePng;
const items2 = [{key: 'hasTransparency', value: value_40795}];
items2[1] = {key: 'isAnimated', value: function() {
return this.img.tabs.acTL != null;
}};
items2[2] = {key: 'isPng8', value: function() {
return this.img.ctype === 3 && this.img.depth <= 8;
}};
const env0_0 = Module00005(_fun40799);
items2[3] = {key: 'hasSrgbIccProfile', value: value_40800};
items2[4] = {key: 'getBuffer', value: function() {
return this.originalBuffer;
}};
return CreateClass(DiscordImagePng2, items2, [{key: 'create', value: value_40802}]);
function DiscordImagePng(a0, a1) { // fn#40794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:147, offset: 0x0110b6ca, size: 45 bytes, params: 3, frame: 13
env1_4(this, DiscordImagePng);
this.img = a0;
this.originalBuffer = a1;
}
}
let value = environment.__proto__;
const defaultImport = importDefault(1907) /* metro dependency 1907 */;
const value2 = defaultImport.toRGBA8(this.img);
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(value2[0]);
let length = uint8Array.length;
if (value < length) {
r3 = value;
reducibleLoop3: while (true) {
if (uint8Array[r3] < 255) {
function value_40795() { // fn#40795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:289, offset: 0x0110b6f7, size: 165 bytes, params: 1, frame: 14
var r3;
if (this.img.ctype !== 4) {
reducibleJoin2: while (true) {
if (this.img.ctype !== 6) {
return false;
}
break reducibleJoin2;
}
}
let value = environment.__proto__;
const defaultImport = Module01907;
const value2 = defaultImport.toRGBA8(this.img);
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(value2[0]);
let length = uint8Array.length;
if (value < length) {
r3 = value;
reducibleLoop3: while (true) {
if (uint8Array[r3] < 255) {
return true;
}
value = r3 + 4;
length = uint8Array.length;
if (!(value < length)) {
return false;
}
r3 = value;
continue reducibleLoop3;
}
}
return false;
}
function* _fun40799() { // fn#40799, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:648, offset: 0x0110b7f0, size: 269 bytes, params: 1, frame: 24
var r9;
var description;
var property;
var property2;
var value8;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
value = undefined;
const value3 = binding(env2_2[4]);
yield value3.load(this.originalBuffer, {'async': true, 'expanded': true, 'includeUnknown': true});
const value4 = undefined;
if (false) {
return value4;
}
let icc = value4.icc;
if (icc == null) {
return true;
}
value = r3 + 4;
length = uint8Array.length;
if (!(value < length)) {
return false;
}
r3 = value;
continue reducibleLoop3;
}
}
return false;
}
function* _fun40799() { // fn#40799, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:648, offset: 0x0110b7f0, size: 269 bytes, params: 1, frame: 24
var r9;
var description;
var property;
var property2;
var value8;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
value = undefined;
const value3 = binding(env2_2[4]);
yield value3.load(this.originalBuffer, {'async': true, 'expanded': true, 'includeUnknown': true});
const value4 = undefined;
if (false) {
return value4;
}
let icc = value4.icc;
if (icc == null) {
return true;
}
icc = value4.icc;
const Object = global.Object;
const value6 = Object.keys(icc);
let length = value6.length;
const value7 = 0;
if (value7 < length) {
r9 = value7;
reducibleLoop5: while (true) {
property = value6[r9];
if (property === 'ICC Description') {
property2 = icc[property];
reducibleJoin8: while (true) {
if (property2 == null) {
description = value;
break reducibleJoin8;
icc = value4.icc;
const Object = global.Object;
const value6 = Object.keys(icc);
let length = value6.length;
const value7 = 0;
if (value7 < length) {
r9 = value7;
reducibleLoop5: while (true) {
property = value6[r9];
if (property === 'ICC Description') {
property2 = icc[property];
reducibleJoin8: while (true) {
if (property2 == null) {
description = value;
break reducibleJoin8;
}
description = property2.description;
break reducibleJoin8;
}
reducibleJoin10: while (true) {
if (description == null) {
break reducibleJoin10;
}
description = icc[property].description;
if (description !== '') {
description = icc[property].description;
value = description.toLowerCase();
return !!value.includes('srgb');
}
break reducibleJoin10;
}
}
description = property2.description;
break reducibleJoin8;
}
reducibleJoin10: while (true) {
if (description == null) {
break reducibleJoin10;
value8 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
length = value6.length;
if (!(value8 < length)) {
return false;
}
description = icc[property].description;
if (description !== '') {
description = icc[property].description;
value = description.toLowerCase();
return !!value.includes('srgb');
}
break reducibleJoin10;
r9 = value8;
continue reducibleLoop5;
}
}
value8 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
length = value6.length;
if (!(value8 < length)) {
return false;
}
r9 = value8;
continue reducibleLoop5;
return false;
}
function value_40800() { // fn#40800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:998, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_40802(a0) { // fn#40802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:1146, offset: 0x0110b908, size: 77 bytes, params: 2, frame: 15
var r0;
var value2;
var value3;
var property;
var defaultImport;
var value4;
var prototype;
var value5;
var discordImagePng;
var value6;
var error;
try {
value2 = environment;
value3 = environment.__proto__;
property = dependencyMap[3];
defaultImport = importDefault(property);
value4 = defaultImport.decode(a0);
prototype = DiscordImagePng.prototype;
value5 = Object.create(prototype, {constructor: {value: DiscordImagePng}});
discordImagePng = new DiscordImagePng(value4, a0);
value6 = discordImagePng instanceof Object ? discordImagePng : value5;
r0 = value6;
} catch (error) {
r0 = null;
}
return r0;
}
}
return false;
}
function value_40802(a0) { // fn#40802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4906:1146, offset: 0x0110b908, size: 77 bytes, params: 2, frame: 15
var r0;
var value2;
var value3;
var property;
var defaultImport;
var value4;
var prototype;
var value5;
var discordImagePng;
var value6;
var error;
try {
value2 = environment;
value3 = environment.__proto__;
property = dependencyMap[3];
defaultImport = importDefault(property);
value4 = defaultImport.decode(a0);
prototype = DiscordImagePng.prototype;
value5 = Object.create(prototype, {constructor: {value: DiscordImagePng}});
discordImagePng = new DiscordImagePng(value4, a0);
value6 = discordImagePng instanceof Object ? discordImagePng : value5;
r0 = value6;
} catch (error) {
r0 = null;
}
return r0;
}
global.__d(_fun40792, 4728, [5, 6, 7, 1907, 4729,
2]) /* metro module 4728, dependencies: [5, 6, 7, 1907, 4729, 2] */;