759 lines
33 KiB
TypeScript
759 lines
33 KiB
TypeScript
/* Metro module 9495; source: modules/quests/lib/AssetUtils.tsx; dependencies: [6528, 661, 9496, 9497, 9498, 9499, 9500, 7098, 9507, 9508, 6535, 1471, 1852, 2] */
|
|
import URLUtils from '../../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
|
|
import GetDevicePixelRatioNative from '../../../utils/getDevicePixelRatio.native.tsx'; /* Metro dependency 1852 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
|
|
import * as FirstPartyQuestTaskTypesModule from '../../../external/discord_common/js/shared/shared-constants/FirstPartyQuestTaskTypes.tsx'; /* Metro dependency 6535 */
|
|
import * as QuestRewardTypesModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardTypes.tsx'; /* Metro dependency 7098 */
|
|
|
|
function _fun74112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:6, offset: 0x01d80ea4, size: 1021 bytes, params: 8, frame: 34
|
|
const env0_0 = require;
|
|
const resolveAsset2 = resolveAsset;
|
|
const getVideoOrDefaultAsset = function(a0, a1) {
|
|
return a1;
|
|
};
|
|
const buildUrl2 = buildUrl;
|
|
const getMimetype2 = getMimetype;
|
|
const safeMediaProxyDimension = function(a0) {
|
|
var Math = global.Math;
|
|
var Math2 = global.Math;
|
|
return Math.min(Math2.ceil(a0), MEDIA_PROXY_MAX_TARGET_RESOLUTION);
|
|
};
|
|
const getAssetUrlWithMediaProxyQueryParams2 = getAssetUrlWithMediaProxyQueryParams;
|
|
const convertVideoToFirstFrameImageWithMediaProxy2 = convertVideoToFirstFrameImageWithMediaProxy;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const regexp = RegExp('\\.([a-zA-Z0-9]+)$', '');
|
|
const object2 = {HERO: 'hero', HERO_IMAGE: 'hero_image', HERO_VIDEO: 'hero_video', QUEST_BAR_HERO: 'quest_bar_hero',
|
|
QUEST_BAR_HERO_VIDEO: 'quest_bar_hero_video', QUEST_BAR_HERO_IMAGE: 'quest_bar_hero_image', REWARD: 'reward',
|
|
REWARD_IMAGE: 'reward_image', GAME_TILE: 'game_tile', LOGO_TYPE: 'logo_type',
|
|
COSPONSOR_LOGO_TYPE: 'cosponsor_logo_type', VIDEO_PLAYER_VIDEO: 'video_player_video',
|
|
VIDEO_PLAYER_VIDEO_LOW_RES: 'video_player_video_low_res', VIDEO_PLAYER_VIDEO_HLS: 'video_player_video_hls',
|
|
VIDEO_PLAYER_THUMBNAIL: 'video_player_thumbnail', VIDEO_PLAYER_CAPTION: 'video_player_caption',
|
|
VIDEO_PLAYER_TRANSCRIPT: 'video_player_transcript'};
|
|
const object3 = {VIDEO: 'video', VIDEO_LOW_RES: 'videoLowRes', VIDEO_HLS: 'videoHls'};
|
|
const object4 = {VIDEO: 'url', THUMBNAIL: 'thumbnail', CAPTION: 'caption', TRANSCRIPT: 'transcript'};
|
|
const object5 = {TIER_1: 1};
|
|
object5[1] = 'TIER_1';
|
|
object5.TIER_2 = 2;
|
|
object5[2] = 'TIER_2';
|
|
object5.TIER_3 = 3;
|
|
object5[3] = 'TIER_3';
|
|
object5.TIER_4 = 4;
|
|
object5[4] = 'TIER_4';
|
|
const object6 = {};
|
|
const VIDEO_PLAYER_VIDEO = object2.VIDEO_PLAYER_VIDEO;
|
|
const object7 = {};
|
|
let VIDEO = object3.VIDEO;
|
|
object7.variant = VIDEO;
|
|
VIDEO = object4.VIDEO;
|
|
object7.property = VIDEO;
|
|
object6[VIDEO_PLAYER_VIDEO] = object7;
|
|
const VIDEO_PLAYER_VIDEO_LOW_RES = object2.VIDEO_PLAYER_VIDEO_LOW_RES;
|
|
const VIDEO_LOW_RES = object3.VIDEO_LOW_RES;
|
|
VIDEO = object4.VIDEO;
|
|
object6[VIDEO_PLAYER_VIDEO_LOW_RES] = {variant: VIDEO_LOW_RES, property: VIDEO};
|
|
const VIDEO_PLAYER_VIDEO_HLS = object2.VIDEO_PLAYER_VIDEO_HLS;
|
|
const VIDEO_HLS = object3.VIDEO_HLS;
|
|
VIDEO = object4.VIDEO;
|
|
object6[VIDEO_PLAYER_VIDEO_HLS] = {variant: VIDEO_HLS, property: VIDEO};
|
|
const VIDEO_PLAYER_THUMBNAIL = object2.VIDEO_PLAYER_THUMBNAIL;
|
|
VIDEO = object3.VIDEO;
|
|
const THUMBNAIL = object4.THUMBNAIL;
|
|
object6[VIDEO_PLAYER_THUMBNAIL] = {variant: VIDEO, property: THUMBNAIL};
|
|
const VIDEO_PLAYER_CAPTION = object2.VIDEO_PLAYER_CAPTION;
|
|
VIDEO = object3.VIDEO;
|
|
const CAPTION = object4.CAPTION;
|
|
object6[VIDEO_PLAYER_CAPTION] = {variant: VIDEO, property: CAPTION};
|
|
const VIDEO_PLAYER_TRANSCRIPT = object2.VIDEO_PLAYER_TRANSCRIPT;
|
|
VIDEO = object3.VIDEO;
|
|
const TRANSCRIPT = object4.TRANSCRIPT;
|
|
object6[VIDEO_PLAYER_TRANSCRIPT] = {variant: VIDEO, property: TRANSCRIPT};
|
|
const object13 = {};
|
|
const TIER_1 = object5.TIER_1;
|
|
object13[TIER_1] = importDefault(9496) /* metro dependency 9496: tier1_rewardTile_animatedWebm */;
|
|
const TIER_2 = object5.TIER_2;
|
|
object13[TIER_2] = importDefault(9497) /* metro dependency 9497: tier2_rewardTile_animatedWebm */;
|
|
const TIER_3 = object5.TIER_3;
|
|
object13[TIER_3] = importDefault(9498) /* metro dependency 9498: tier3_rewardTile_animatedWebm */;
|
|
const TIER_4 = object5.TIER_4;
|
|
object13[TIER_4] = importDefault(9499) /* metro dependency 9499: tier4_rewardTile_animatedWebm */;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/AssetUtils.tsx');
|
|
exports.EXTENSION_RE = regexp;
|
|
exports.ANIMATED_MIMETYPES = ['video/mp4', 'video/webm'];
|
|
exports.QuestAssetType = object2;
|
|
exports.resolveAsset = resolveAsset2;
|
|
exports.OrbsValueTier = object5;
|
|
exports.getQuestAsset = getQuestAsset;
|
|
exports.buildUrl = buildUrl2;
|
|
exports.resolveAdCreativeCdnUrl = function(a0) {
|
|
var value = a0;
|
|
if (value != null) {
|
|
return value.startsWith('http://') || value.startsWith('https://') || value.startsWith('blob:') ? value : '' + CDN_URL_BASE + value;
|
|
}
|
|
};
|
|
exports.getMimetype = getMimetype2;
|
|
exports.getDevicePixelScaledDimensions = getDevicePixelScaledDimensions;
|
|
exports.getAssetUrlWithMediaProxyQueryParams = getAssetUrlWithMediaProxyQueryParams2;
|
|
exports.getScaledImageUrl = function({assetUrl, width, height}) {
|
|
var value2 = importDefault(dependencyMap[12])();
|
|
return getAssetUrlWithMediaProxyQueryParams(assetUrl, {width: width * value2, height: height * value2,
|
|
format: 'webp'});
|
|
};
|
|
exports.convertVideoToFirstFrameImageWithMediaProxy = convertVideoToFirstFrameImageWithMediaProxy2;
|
|
exports.getScaledFirstFrameImageUrl = function({assetUrl, width, height}) {
|
|
var value2 = importDefault(dependencyMap[12])();
|
|
return convertVideoToFirstFrameImageWithMediaProxy(assetUrl, {width: width * value2, height: height * value2});
|
|
};
|
|
function resolveAsset(a0, a1, a2) { // fn#74113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:900, offset: 0x01d812a1, size: 75 bytes, params: 4, frame: 16
|
|
const url = buildUrl(a0, a1, a2);
|
|
const mimetype = getMimetype(a1);
|
|
const object = {url: url, mimetype: mimetype};
|
|
object.isAnimated = mimetype != null && env0_7.includes(mimetype);
|
|
return object;
|
|
}
|
|
|
|
function buildUrl(a0, a1, a2) { // fn#74115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:1890, offset: 0x01d812ec, size: 218 bytes, params: 4, frame: 20
|
|
const value = a1;
|
|
if (value.startsWith('blob:')) {
|
|
return value.split('?', 1).at(0) ?? value;
|
|
}
|
|
return value.includes('/') ? '' + CDN_URL_BASE + value : '' + QUESTS_CDN_URL_BASE + a0 + (a2?.theme != null ? '/' + a2.theme : '') + '/' + value;
|
|
}
|
|
|
|
function getMimetype(a0) { // fn#74116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:2140, offset: 0x01d813c6, size: 444 bytes, params: 2, frame: 18
|
|
var r5;
|
|
var r1;
|
|
var r2;
|
|
let value = a0.startsWith('blob:');
|
|
const value3 = undefined;
|
|
const value4 = (URLUtils).toURLSafe(a0);
|
|
const value5 = null;
|
|
const value6 = value5 == value4;
|
|
if (value) {
|
|
r1 = value6 ? value3 : value4.searchParams.get('mimetype');
|
|
r2 = value5 != r1 ? r1 : value3;
|
|
return value5 != r2 ? global.decodeURIComponent(r2) : value5;
|
|
}
|
|
if (value6) {
|
|
r5 = value3;
|
|
} else {
|
|
value = value4.searchParams.get('format');
|
|
if (value5 == value) {
|
|
r5 = value3;
|
|
} else {
|
|
value = value.toLowerCase();
|
|
r5 = value;
|
|
}
|
|
}
|
|
if (value5 == r5) {
|
|
value = env0_6.exec(a0);
|
|
r5 = value5 == value || value5 == value[1] ? value3 : value[1].toLowerCase();
|
|
}
|
|
if (r5 === 'webm') {
|
|
return 'video/webm';
|
|
}
|
|
if (r5 === 'mp4') {
|
|
return 'video/mp4';
|
|
}
|
|
if (r5 === 'webp') {
|
|
return 'image/webp';
|
|
}
|
|
if (r5 === 'jpg') {
|
|
return 'image/jpeg';
|
|
}
|
|
if (r5 === 'jpeg') {
|
|
return 'image/jpeg';
|
|
}
|
|
if (r5 === 'png') {
|
|
return 'image/png';
|
|
}
|
|
if (r5 === 'gif') {
|
|
return 'image/gif';
|
|
}
|
|
if (r5 === 'svg') {
|
|
return 'image/svg+xml';
|
|
}
|
|
if (r5 === 'txt') {
|
|
return 'text/plain';
|
|
}
|
|
if (r5 === 'vtt') {
|
|
return 'text/vtt';
|
|
}
|
|
if (r5 === 'ts') {
|
|
return 'video/mp2t';
|
|
}
|
|
if (r5 === 'm3u8') {
|
|
return 'application/x-mpegURL';
|
|
}
|
|
return value5;
|
|
}
|
|
|
|
function getAssetUrlWithMediaProxyQueryParams(a0) { // fn#74118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:2947, offset: 0x01d815b2, size: 263 bytes, params: 2, frame: 21
|
|
var r1;
|
|
var searchParams;
|
|
var set;
|
|
let value = a0;
|
|
const value2 = a1;
|
|
const r2 = value2 !== undefined ? value2 : {};
|
|
if (value.startsWith('blob:')) {
|
|
return value;
|
|
}
|
|
const value4 = (URLUtils).toURLSafe(value);
|
|
if (value4 == null) {
|
|
r1 = value;
|
|
} else {
|
|
if (r2.format != null) {
|
|
searchParams = value4.searchParams;
|
|
searchParams.set('format', r2.format);
|
|
}
|
|
if (r2.width != null) {
|
|
searchParams = value4.searchParams;
|
|
set = searchParams.set;
|
|
value = safeMediaProxyDimension(r2.width);
|
|
value = '' + value;
|
|
Reflect.apply(set, searchParams, ['width', value]);
|
|
}
|
|
if (r2.height != null) {
|
|
searchParams = value4.searchParams;
|
|
set = searchParams.set;
|
|
value = safeMediaProxyDimension(r2.height);
|
|
value = '' + value;
|
|
Reflect.apply(set, searchParams, ['height', value]);
|
|
}
|
|
value = value4.toString();
|
|
r1 = value;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function convertVideoToFirstFrameImageWithMediaProxy(a0, a1) { // fn#74119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:3314, offset: 0x01d816b9, size: 227 bytes, params: 3, frame: 21
|
|
var r1;
|
|
var searchParams;
|
|
var set;
|
|
var safeMediaProxyDimensionBinding;
|
|
if (a0.startsWith('blob:')) {
|
|
return a0;
|
|
}
|
|
var value;
|
|
const value2 = (URLUtils).toURLSafe(a0);
|
|
const value3 = null;
|
|
if (value3 == value2) {
|
|
r1 = value3;
|
|
} else {
|
|
searchParams = value2.searchParams;
|
|
searchParams.set('format', 'webp');
|
|
if (value3 != a1) {
|
|
searchParams = value2.searchParams;
|
|
set = searchParams.set;
|
|
safeMediaProxyDimensionBinding = safeMediaProxyDimension;
|
|
value = safeMediaProxyDimensionBinding(a1.width);
|
|
value = '' + value;
|
|
Reflect.apply(set, searchParams, ['width', value]);
|
|
searchParams = value2.searchParams;
|
|
set = searchParams.set;
|
|
value = safeMediaProxyDimensionBinding(a1.height);
|
|
value = '' + value;
|
|
Reflect.apply(set, searchParams, ['height', value]);
|
|
}
|
|
value = value2.toString();
|
|
r1 = value;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function getQuestAsset(a0, a1, a2, a3, a4) { // fn#74120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:3839, offset: 0x01d8179c, size: 1529 bytes, params: 6, frame: 24
|
|
var r12;
|
|
var r6;
|
|
var r3;
|
|
var r0;
|
|
var r5;
|
|
var r8;
|
|
var config;
|
|
var tasks;
|
|
var value5;
|
|
const FirstPartyQuestTaskTypes = (FirstPartyQuestTaskTypesModule).FirstPartyQuestTaskTypes;
|
|
var property;
|
|
var property2;
|
|
var assets;
|
|
var value6;
|
|
var value7;
|
|
var logotypeDark;
|
|
var logotypeLight;
|
|
var logotype;
|
|
var value8;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value14;
|
|
var value15;
|
|
var gameTileDark;
|
|
var gameTileLight;
|
|
var gameTile;
|
|
var value16;
|
|
var value18;
|
|
var value19;
|
|
var questPrimaryReward;
|
|
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
|
|
var asset;
|
|
var value21;
|
|
var value22;
|
|
var questPrimaryReward2;
|
|
var getVideoOrDefaultAssetBinding;
|
|
var value24;
|
|
var object;
|
|
var questBarHero;
|
|
var value25;
|
|
var questBarHeroVideo;
|
|
var value26;
|
|
var value27;
|
|
var heroVideo;
|
|
var value28;
|
|
var hero;
|
|
var value29;
|
|
var value30;
|
|
var resolveAssetBinding;
|
|
var id;
|
|
let value = a2;
|
|
const HERO = env0_8.HERO;
|
|
if (HERO === a1) {
|
|
getVideoOrDefaultAssetBinding = getVideoOrDefaultAsset;
|
|
config = a0.config;
|
|
assets = config.assets;
|
|
assets.heroVideo;
|
|
config = a0.config;
|
|
assets = config.assets;
|
|
hero = assets.hero;
|
|
getVideoOrDefaultAssetBinding(undefined, hero);
|
|
value30 = false;
|
|
r0 = value30;
|
|
value = resolveAsset(a0.id, hero, {theme: value30 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const HERO_IMAGE = env0_8.HERO_IMAGE;
|
|
if (HERO_IMAGE === a1) {
|
|
hero = a0.config.assets.hero;
|
|
value29 = false;
|
|
r0 = value29;
|
|
value = resolveAsset(a0.id, hero, {theme: value29 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const HERO_VIDEO = env0_8.HERO_VIDEO;
|
|
if (HERO_VIDEO === a1) {
|
|
heroVideo = a0.config.assets.heroVideo;
|
|
value28 = false;
|
|
if (heroVideo == null) {
|
|
return null;
|
|
}
|
|
r0 = value28;
|
|
value = resolveAsset(a0.id, heroVideo, {theme: value28 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const QUEST_BAR_HERO = env0_8.QUEST_BAR_HERO;
|
|
if (QUEST_BAR_HERO === a1) {
|
|
getVideoOrDefaultAssetBinding = getVideoOrDefaultAsset;
|
|
config = a0.config;
|
|
assets = config.assets;
|
|
assets.questBarHeroVideo;
|
|
config = a0.config;
|
|
assets = config.assets;
|
|
questBarHero = assets.questBarHero;
|
|
getVideoOrDefaultAssetBinding(undefined, questBarHero);
|
|
value27 = false;
|
|
r0 = value27;
|
|
value = resolveAsset(a0.id, questBarHero, {theme: value27 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const QUEST_BAR_HERO_VIDEO = env0_8.QUEST_BAR_HERO_VIDEO;
|
|
if (QUEST_BAR_HERO_VIDEO === a1) {
|
|
questBarHeroVideo = a0.config.assets.questBarHeroVideo;
|
|
value26 = false;
|
|
if (questBarHeroVideo == null) {
|
|
return null;
|
|
}
|
|
r0 = value26;
|
|
value = resolveAsset(a0.id, questBarHeroVideo, {theme: value26 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const QUEST_BAR_HERO_IMAGE = env0_8.QUEST_BAR_HERO_IMAGE;
|
|
if (QUEST_BAR_HERO_IMAGE === a1) {
|
|
questBarHero = a0.config.assets.questBarHero;
|
|
value25 = false;
|
|
r0 = value25;
|
|
value = resolveAsset(a0.id, questBarHero, {theme: value25 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const REWARD = env0_8.REWARD;
|
|
if (REWARD === a1) {
|
|
value22 = undefined;
|
|
questPrimaryReward2 = (require(9500) /* metro dependency 9500: QuestRewardUtils */).getQuestPrimaryReward(a0);
|
|
if (questPrimaryReward2.type === QuestRewardTypes.VIRTUAL_CURRENCY) {
|
|
r6 = a4 != null ? env0_10[a4] : value22;
|
|
if (r6 != null) {
|
|
r3 = {'url': null, 'mimetype': 'video/webm', 'isAnimated': true, url: r6};
|
|
} else if (a3) {
|
|
object = {'url': null, 'mimetype': 'video/mp4', 'isAnimated': true};
|
|
object.url = importDefault(9507) /* metro dependency 9507: reward_tile_v3_mobileMp4 */;
|
|
r3 = object;
|
|
} else {
|
|
object = {'url': null, 'mimetype': 'video/webm', 'isAnimated': true};
|
|
object.url = importDefault(9508) /* metro dependency 9508: reward_tile_v3Webm */;
|
|
r3 = object;
|
|
}
|
|
return r3;
|
|
}
|
|
getVideoOrDefaultAssetBinding = getVideoOrDefaultAsset;
|
|
questPrimaryReward2.assetVideo;
|
|
asset = questPrimaryReward2.asset;
|
|
getVideoOrDefaultAssetBinding(value22, asset);
|
|
value24 = false;
|
|
r0 = value24;
|
|
r5 = asset;
|
|
r8 = value24;
|
|
resolveAssetBinding = resolveAsset;
|
|
id = a0.id;
|
|
r6 = r8 ? value : undefined;
|
|
value = resolveAssetBinding(id, r5, {theme: r6});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const REWARD_IMAGE = env0_8.REWARD_IMAGE;
|
|
if (REWARD_IMAGE === a1) {
|
|
questPrimaryReward = (require(9500) /* metro dependency 9500: QuestRewardUtils */).getQuestPrimaryReward(a0);
|
|
if (questPrimaryReward.type === QuestRewardTypes.VIRTUAL_CURRENCY) {
|
|
return null;
|
|
}
|
|
asset = questPrimaryReward.asset;
|
|
value21 = false;
|
|
r0 = value21;
|
|
value = resolveAsset(a0.id, asset, {theme: value21 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const GAME_TILE = env0_8.GAME_TILE;
|
|
if (GAME_TILE === a1) {
|
|
if (value !== 'dark') {
|
|
if (value !== 'light') {
|
|
gameTile = a0.config.assets.gameTile;
|
|
value16 = true;
|
|
r0 = false;
|
|
r5 = gameTile;
|
|
r8 = value16;
|
|
} else {
|
|
gameTileLight = a0.config.assets.gameTileLight;
|
|
if (gameTileLight != null) {
|
|
gameTileLight = a0.config.assets.gameTileLight;
|
|
value18 = false;
|
|
r0 = value18;
|
|
r5 = gameTileLight;
|
|
r8 = value18;
|
|
} else {
|
|
gameTile = a0.config.assets.gameTile;
|
|
value16 = true;
|
|
r0 = false;
|
|
r5 = gameTile;
|
|
r8 = value16;
|
|
}
|
|
}
|
|
} else {
|
|
gameTileDark = a0.config.assets.gameTileDark;
|
|
if (gameTileDark != null) {
|
|
gameTileDark = a0.config.assets.gameTileDark;
|
|
value19 = false;
|
|
r0 = value19;
|
|
r5 = gameTileDark;
|
|
r8 = value19;
|
|
} else if (value !== 'light') {
|
|
gameTile = a0.config.assets.gameTile;
|
|
value16 = true;
|
|
r0 = false;
|
|
r5 = gameTile;
|
|
r8 = value16;
|
|
} else {
|
|
gameTileLight = a0.config.assets.gameTileLight;
|
|
if (gameTileLight != null) {
|
|
gameTileLight = a0.config.assets.gameTileLight;
|
|
value18 = false;
|
|
r0 = value18;
|
|
r5 = gameTileLight;
|
|
r8 = value18;
|
|
} else {
|
|
gameTile = a0.config.assets.gameTile;
|
|
value16 = true;
|
|
r0 = false;
|
|
r5 = gameTile;
|
|
r8 = value16;
|
|
}
|
|
}
|
|
}
|
|
value = resolveAsset(a0.id, r5, {theme: r8 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const LOGO_TYPE = env0_8.LOGO_TYPE;
|
|
if (LOGO_TYPE === a1) {
|
|
if (value !== 'dark') {
|
|
if (value !== 'light') {
|
|
logotype = a0.config.assets.logotype;
|
|
value12 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value12;
|
|
} else {
|
|
logotypeLight = a0.config.assets.logotypeLight;
|
|
if (logotypeLight != null) {
|
|
logotypeLight = a0.config.assets.logotypeLight;
|
|
value14 = false;
|
|
r0 = value14;
|
|
r5 = logotypeLight;
|
|
r8 = value14;
|
|
} else {
|
|
logotype = a0.config.assets.logotype;
|
|
value12 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value12;
|
|
}
|
|
}
|
|
} else {
|
|
logotypeDark = a0.config.assets.logotypeDark;
|
|
if (logotypeDark != null) {
|
|
logotypeDark = a0.config.assets.logotypeDark;
|
|
value15 = false;
|
|
r0 = value15;
|
|
r5 = logotypeDark;
|
|
r8 = value15;
|
|
} else if (value !== 'light') {
|
|
logotype = a0.config.assets.logotype;
|
|
value12 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value12;
|
|
} else {
|
|
logotypeLight = a0.config.assets.logotypeLight;
|
|
if (logotypeLight != null) {
|
|
logotypeLight = a0.config.assets.logotypeLight;
|
|
value14 = false;
|
|
r0 = value14;
|
|
r5 = logotypeLight;
|
|
r8 = value14;
|
|
} else {
|
|
logotype = a0.config.assets.logotype;
|
|
value12 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value12;
|
|
}
|
|
}
|
|
}
|
|
value = resolveAsset(a0.id, r5, {theme: r8 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const COSPONSOR_LOGO_TYPE = env0_8.COSPONSOR_LOGO_TYPE;
|
|
if (COSPONSOR_LOGO_TYPE === a1) {
|
|
if (a0.config.cosponsorMetadata == null) {
|
|
return null;
|
|
}
|
|
if (value !== 'dark') {
|
|
if (value !== 'light') {
|
|
logotype = a0.config.cosponsorMetadata.logotype;
|
|
value8 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value8;
|
|
} else {
|
|
logotypeLight = a0.config.cosponsorMetadata.logotypeLight;
|
|
if (logotypeLight != null) {
|
|
logotypeLight = a0.config.cosponsorMetadata.logotypeLight;
|
|
value10 = false;
|
|
r0 = value10;
|
|
r5 = logotypeLight;
|
|
r8 = value10;
|
|
} else {
|
|
logotype = a0.config.cosponsorMetadata.logotype;
|
|
value8 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value8;
|
|
}
|
|
}
|
|
} else {
|
|
logotypeDark = a0.config.cosponsorMetadata.logotypeDark;
|
|
if (logotypeDark != null) {
|
|
logotypeDark = a0.config.cosponsorMetadata.logotypeDark;
|
|
value11 = false;
|
|
r0 = value11;
|
|
r5 = logotypeDark;
|
|
r8 = value11;
|
|
} else if (value !== 'light') {
|
|
logotype = a0.config.cosponsorMetadata.logotype;
|
|
value8 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value8;
|
|
} else {
|
|
logotypeLight = a0.config.cosponsorMetadata.logotypeLight;
|
|
if (logotypeLight != null) {
|
|
logotypeLight = a0.config.cosponsorMetadata.logotypeLight;
|
|
value10 = false;
|
|
r0 = value10;
|
|
r5 = logotypeLight;
|
|
r8 = value10;
|
|
} else {
|
|
logotype = a0.config.cosponsorMetadata.logotype;
|
|
value8 = true;
|
|
r0 = false;
|
|
r5 = logotype;
|
|
r8 = value8;
|
|
}
|
|
}
|
|
}
|
|
value = resolveAsset(a0.id, r5, {theme: r8 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
const VIDEO_PLAYER_VIDEO = env0_8.VIDEO_PLAYER_VIDEO;
|
|
if (VIDEO_PLAYER_VIDEO === a1) {
|
|
if ('taskConfigV2' in a0.config) {
|
|
tasks = a0.config.taskConfigV2.tasks;
|
|
value5 = undefined;
|
|
property = tasks[a3 ? FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE : FirstPartyQuestTaskTypes.WATCH_VIDEO];
|
|
property2 = env0_9[a1];
|
|
r12 = property == null || property.assets[property2.variant] == null ? value5 : property.assets[property2.variant][property2.property];
|
|
value6 = false;
|
|
value7 = true;
|
|
if (r12 == null) {
|
|
return null;
|
|
}
|
|
r0 = value7;
|
|
value = resolveAsset(a0.id, r12, {theme: value6 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
} else {
|
|
var VIDEO_PLAYER_VIDEO_LOW_RES = env0_8.VIDEO_PLAYER_VIDEO_LOW_RES;
|
|
if (VIDEO_PLAYER_VIDEO_LOW_RES === a1) {
|
|
if ('taskConfigV2' in a0.config) {
|
|
tasks = a0.config.taskConfigV2.tasks;
|
|
value5 = undefined;
|
|
property = tasks[a3 ? FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE : FirstPartyQuestTaskTypes.WATCH_VIDEO];
|
|
property2 = env0_9[a1];
|
|
r12 = property == null || property.assets[property2.variant] == null ? value5 : property.assets[property2.variant][property2.property];
|
|
value6 = false;
|
|
value7 = true;
|
|
if (r12 == null) {
|
|
return null;
|
|
}
|
|
r0 = value7;
|
|
value = resolveAsset(a0.id, r12, {theme: value6 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
return null;
|
|
}
|
|
var VIDEO_PLAYER_VIDEO_HLS = env0_8.VIDEO_PLAYER_VIDEO_HLS;
|
|
if (VIDEO_PLAYER_VIDEO_HLS === a1) {
|
|
if ('taskConfigV2' in a0.config) {
|
|
tasks = a0.config.taskConfigV2.tasks;
|
|
value5 = undefined;
|
|
property = tasks[a3 ? FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE : FirstPartyQuestTaskTypes.WATCH_VIDEO];
|
|
property2 = env0_9[a1];
|
|
r12 = property == null || property.assets[property2.variant] == null ? value5 : property.assets[property2.variant][property2.property];
|
|
value6 = false;
|
|
value7 = true;
|
|
if (r12 == null) {
|
|
return null;
|
|
}
|
|
r0 = value7;
|
|
value = resolveAsset(a0.id, r12, {theme: value6 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
return null;
|
|
}
|
|
var VIDEO_PLAYER_THUMBNAIL = env0_8.VIDEO_PLAYER_THUMBNAIL;
|
|
if (VIDEO_PLAYER_THUMBNAIL === a1) {
|
|
if ('taskConfigV2' in a0.config) {
|
|
tasks = a0.config.taskConfigV2.tasks;
|
|
value5 = undefined;
|
|
property = tasks[a3 ? FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE : FirstPartyQuestTaskTypes.WATCH_VIDEO];
|
|
property2 = env0_9[a1];
|
|
r12 = property == null || property.assets[property2.variant] == null ? value5 : property.assets[property2.variant][property2.property];
|
|
value6 = false;
|
|
value7 = true;
|
|
if (r12 == null) {
|
|
return null;
|
|
}
|
|
r0 = value7;
|
|
value = resolveAsset(a0.id, r12, {theme: value6 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
return null;
|
|
}
|
|
var VIDEO_PLAYER_CAPTION = env0_8.VIDEO_PLAYER_CAPTION;
|
|
if (VIDEO_PLAYER_CAPTION === a1) {
|
|
if ('taskConfigV2' in a0.config) {
|
|
tasks = a0.config.taskConfigV2.tasks;
|
|
value5 = undefined;
|
|
property = tasks[a3 ? FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE : FirstPartyQuestTaskTypes.WATCH_VIDEO];
|
|
property2 = env0_9[a1];
|
|
r12 = property == null || property.assets[property2.variant] == null ? value5 : property.assets[property2.variant][property2.property];
|
|
value6 = false;
|
|
value7 = true;
|
|
if (r12 == null) {
|
|
return null;
|
|
}
|
|
r0 = value7;
|
|
value = resolveAsset(a0.id, r12, {theme: value6 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
return null;
|
|
}
|
|
var VIDEO_PLAYER_TRANSCRIPT = env0_8.VIDEO_PLAYER_TRANSCRIPT;
|
|
var value3 = false;
|
|
if (VIDEO_PLAYER_TRANSCRIPT !== a1) {
|
|
r0 = value3;
|
|
value = resolveAsset(a0.id, undefined, {theme: value3 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
if ('taskConfigV2' in a0.config) {
|
|
tasks = a0.config.taskConfigV2.tasks;
|
|
value5 = undefined;
|
|
property = tasks[a3 ? FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE : FirstPartyQuestTaskTypes.WATCH_VIDEO];
|
|
property2 = env0_9[a1];
|
|
r12 = property == null || property.assets[property2.variant] == null ? value5 : property.assets[property2.variant][property2.property];
|
|
value6 = false;
|
|
value7 = true;
|
|
if (r12 == null) {
|
|
return null;
|
|
}
|
|
r0 = value7;
|
|
value = resolveAsset(a0.id, r12, {theme: value6 ? value : undefined});
|
|
r0 = r0 && value.mimetype == null ? null : value;
|
|
return r0;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function getDevicePixelScaledDimensions(a0, a1) { // fn#74122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9681:6448, offset: 0x01d81e07, size: 77 bytes, params: 3, frame: 13
|
|
const value = (GetDevicePixelRatioNative)();
|
|
return value < 3 ? {width: a0, height: a1} : {width: a0 * value, height: a1 * value};
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun74112, 9495, [6528, 661, 9496, 9497, 9498, 9499, 9500, 7098, 9507, 9508, 6535, 1471, 1852,
|
|
2]) /* metro module 9495, dependencies: [6528, 661, 9496, 9497, 9498, 9499, 9500, 7098, 9507, 9508, 6535, 1471, 1852, 2] */;
|