1273 lines
73 KiB
TypeScript
1273 lines
73 KiB
TypeScript
/* Metro module 9950; source: modules/quests/hooks/QuestCopyHooks.tsx; dependencies: [5, 57, 31, 1949, 1878, 6528, 1880, 1244, 9483, 7114, 7116, 9500, 9951, 1900, 566, 9952, 9953, 9963, 6531, 9505, 1856, 8105, 9523, 9520, 7120, 7119, 2] */
|
|
function _fun77902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:6, offset: 0x01e10598, size: 548 bytes, params: 8, frame: 22
|
|
var object2;
|
|
const env0_0 = require;
|
|
const getGamingPlayQuestPermanentWithPremiumCollectibleMessage = function({hasRewardDuration,
|
|
shouldShowGameProfileLink}) {
|
|
var t = require(dependencyMap[7]).t;
|
|
return hasRewardDuration ? shouldShowGameProfileLink ? t['/4XT0b'] : t['0hwcvM'] : shouldShowGameProfileLink ? t.tQoqXX : t['eb/Sna'];
|
|
};
|
|
const getGamingPlayQuestExtendableWithPremiumCollectibleMessage = function(a0) {
|
|
var property = require(dependencyMap[7]).t;
|
|
return a0 ? property.klYWbT : property.ziB0HF;
|
|
};
|
|
const getGamingPlayQuestExpiringCollectibleMessage = function(a0) {
|
|
var property = require(dependencyMap[7]).t;
|
|
return a0 ? property['4JS2QJ'] : property.AwuMRS;
|
|
};
|
|
const getQuestBarSubtitlePlayGameMessage = function(a0) {
|
|
var property = require(dependencyMap[7]).t;
|
|
return a0 ? property.GFdaUK : property.NIimTt;
|
|
};
|
|
const closure = useQuestsInstructionsToWinReward;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
|
const env0_8 = questConstantsModule.QuestsExperimentLocations;
|
|
const env0_9 = questConstantsModule.ORBS_INTRO_QUEST_ID;
|
|
const env0_10 = questConstantsModule.QuestVariants;
|
|
const env0_11 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
|
object2 = {PLAY: 0};
|
|
object2[0] = 'PLAY';
|
|
object2.STREAM = 1;
|
|
object2[1] = 'STREAM';
|
|
object2.WATCH_VIDEO = 2;
|
|
object2[2] = 'WATCH_VIDEO';
|
|
object2.IN_GAME = 3;
|
|
object2[3] = 'IN_GAME';
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/hooks/QuestCopyHooks.tsx');
|
|
exports.useQuestInstructionTitle = useQuestInstructionTitle;
|
|
exports.getQuestsInstructionsToWinReward = getQuestsInstructionsToWinReward;
|
|
exports.useQuestsInstructionsToWinReward = closure;
|
|
exports.useQuestDescription = useQuestDescription;
|
|
exports.useQuestBarSubtitle = useQuestBarSubtitle;
|
|
exports.useQuestBarTitle = useQuestBarTitle;
|
|
exports.usePrimaryCtaCopy = usePrimaryCtaCopy;
|
|
exports.usePremiumExtendableCopy = usePremiumExtendableCopy;
|
|
exports.getRewardCodeRedemptionInstructions = getRewardCodeRedemptionInstructions;
|
|
exports.useModalCtaConfig = useModalCtaConfig;
|
|
}
|
|
|
|
function formatWithOrWithoutMarkdown(a0, a1, a2) { // fn#77903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:251, offset: 0x01e107bc, size: 68 bytes, params: 4, frame: 14
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return a2 ? intl.formatToPlainString(a0, a1) : intl.format(a0, a1);
|
|
}
|
|
|
|
function getQuestInstructionsToWinRewardPlaytimeOnDesktop({quest, taskDetails, withoutMarkdown, hasNitro, collectibleRewardDuration, onGameTitleClick, rewardNameWithArticle}) { // fn#77908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:880, offset: 0x01e10907, size: 503 bytes, params: 2, frame: 27
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const targetMinutes = taskDetails.targetMinutes;
|
|
const gameTitle = quest.config.messages.gameTitle;
|
|
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
const isCollectibleQuestRewardPremiumExtendable2 = questRewardUtilsModule.isCollectibleQuestRewardPremiumExtendable(quest.config);
|
|
const moduleValue2 = questRewardUtilsModule;
|
|
const isCollectibleQuestRewardPermanentWithPremiumSubscription2 = moduleValue2.isCollectibleQuestRewardPermanentWithPremiumSubscription(quest.config);
|
|
const features = quest.config.features;
|
|
const includes = features.includes;
|
|
const NON_GAMING_PLAY_QUEST = QuestVariants.NON_GAMING_PLAY_QUEST;
|
|
const value2 = Reflect.apply(includes, features, [NON_GAMING_PLAY_QUEST]);
|
|
const value3 = onGameTitleClick != null;
|
|
return formatWithOrWithoutMarkdown(hasNitro && isCollectibleQuestRewardPremiumExtendable2 ? isCollectibleQuestRewardPermanentWithPremiumSubscription2 ? value2 ? collectibleRewardDuration != null ? t.u5QXpw : t.ztXW8V : getGamingPlayQuestPermanentWithPremiumCollectibleMessage({hasRewardDuration: collectibleRewardDuration != null,
|
|
shouldShowGameProfileLink: value3}) : value2 ? t['1AcTqm'] : getGamingPlayQuestExtendableWithPremiumCollectibleMessage(value3) : isCollectibleQuestRewardPremiumExtendable2 || collectibleRewardDuration != null ? value2 ? t.enQ3jU : getGamingPlayQuestExpiringCollectibleMessage(value3) : value2 ? t['03VJqu'] : value3 ? t.NrD2h8 : t.FZL5Q5,
|
|
{gameTitle: gameTitle, streamingDurationRequirement: targetMinutes,
|
|
rewardNameWithArticle: rewardNameWithArticle, duration: collectibleRewardDuration,
|
|
questReward: rewardNameWithArticle, onGameTitleClick: onGameTitleClick}, withoutMarkdown);
|
|
}
|
|
|
|
function getQuestInstructionsToWinRewardSponsored({quest, taskDetails, sourceQuestContent, withoutMarkdown, popoutTargetElementRef, onGameSheetOpened, onGameSheetClosed, rewardNameWithArticle}) { // fn#77909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:1921, offset: 0x01e10afe, size: 257 bytes, params: 2, frame: 22
|
|
var r0;
|
|
var object2;
|
|
var value;
|
|
var intl;
|
|
const targetMinutes = taskDetails.targetMinutes;
|
|
if (withoutMarkdown) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1votF6'],
|
|
{rewardNameWithArticle: rewardNameWithArticle, targetMinutes: targetMinutes});
|
|
} else {
|
|
object2 = {quest: quest, rewardNameWithArticle: rewardNameWithArticle, targetMinutes: targetMinutes};
|
|
value = require(9951) /* metro dependency 9951: SponsoredQuestUtilsNative */;
|
|
object2.gameSheetHook = value.createGameSheetHook({quest: quest, sourceQuestContent: sourceQuestContent,
|
|
applications: taskDetails.applications ?? [], popoutTargetElementRef: popoutTargetElementRef,
|
|
onGameSheetOpened: onGameSheetOpened, onGameSheetClosed: onGameSheetClosed});
|
|
value = _getQuestInstructionsToWinRewardArenaPackage(object2);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _getQuestsInstructionsToWinReward({quest, taskDetails, thirdPartyTaskDetails, sourceQuestContent, withoutMarkdown, currentUser, popoutTargetElementRef, onGameSheetOpened, onGameSheetClosed, onGameTitleClick, needsToConnect}) { // fn#77912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:3107, offset: 0x01e10db8, size: 3383 bytes, params: 2, frame: 43
|
|
var r17;
|
|
var r24;
|
|
var r20;
|
|
var moduleValue7;
|
|
var moduleValue8;
|
|
var moduleValue9;
|
|
var isTieredRewardCodeQuest;
|
|
var object2;
|
|
var moduleValue10;
|
|
var moduleValue11;
|
|
var moduleValue12;
|
|
var hasNitro;
|
|
var collectibleRewardDuration;
|
|
var rewardNameWithArticle;
|
|
var targetMinutes;
|
|
var gameTitle;
|
|
var moduleValue13;
|
|
var isCollectibleQuestRewardPremiumExtendable;
|
|
var isCollectibleQuestRewardPremiumExtendable2;
|
|
var moduleValue14;
|
|
var isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
var isCollectibleQuestRewardPermanentWithPremiumSubscription2;
|
|
var value5;
|
|
var formatWithOrWithoutMarkdownBinding;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var description;
|
|
var moduleValue15;
|
|
var isCollectibleQuestRewardPremiumExtendable3;
|
|
var moduleValue16;
|
|
var isCollectibleQuestRewardPermanentWithPremiumSubscription3;
|
|
var value6;
|
|
var isPlayAnyActivityQuest2;
|
|
var moduleValue18;
|
|
var getDefaultWatchVideoTask;
|
|
var value7;
|
|
var moduleValue19;
|
|
var isCollectibleQuestRewardPremiumExtendable4;
|
|
var moduleValue20;
|
|
var moduleValue21;
|
|
var isCollectibleQuestRewardPremiumExtendable5;
|
|
var moduleValue22;
|
|
var isCollectibleQuestRewardPermanentWithPremiumSubscription5;
|
|
var value9;
|
|
var moduleValue23;
|
|
var isCollectibleQuestRewardPremiumExtendable6;
|
|
var moduleValue24;
|
|
var isCollectibleQuestRewardPermanentWithPremiumSubscription6;
|
|
var features;
|
|
var value10;
|
|
var value11;
|
|
var value;
|
|
const premiumTypeUtilsModule = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
|
|
const isPremium = premiumTypeUtilsModule.isPremium;
|
|
const TIER_2 = PremiumTypes.TIER_2;
|
|
const isPremium2 = Reflect.apply(isPremium, premiumTypeUtilsModule, [currentUser, TIER_2]);
|
|
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
const getCollectibleQuestRewardDuration = questRewardUtilsModule.getCollectibleQuestRewardDuration;
|
|
let config = quest.config;
|
|
const value3 = Reflect.apply(getCollectibleQuestRewardDuration, questRewardUtilsModule, [config]);
|
|
let r0 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(quest) && (require(7116) /* metro dependency 7116: QuestTaskUtils */).shouldUsePlayOnDesktopTask(quest);
|
|
const isSponsoredPlayQuest2 = (require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest);
|
|
const defaultRewardNameWithArticle = questRewardUtilsModule.getDefaultRewardNameWithArticle(quest.config,
|
|
currentUser);
|
|
if (isSponsoredPlayQuest2) {
|
|
r0 = getQuestInstructionsToWinRewardSponsored({quest: quest, taskDetails: taskDetails,
|
|
sourceQuestContent: sourceQuestContent, withoutMarkdown: withoutMarkdown,
|
|
popoutTargetElementRef: popoutTargetElementRef, onGameSheetOpened: onGameSheetOpened,
|
|
onGameSheetClosed: onGameSheetClosed, rewardNameWithArticle: defaultRewardNameWithArticle});
|
|
} else if (r0) {
|
|
object2 = {quest: quest, taskDetails: taskDetails, withoutMarkdown: withoutMarkdown, hasNitro: isPremium2,
|
|
collectibleRewardDuration: value3, onGameTitleClick: onGameTitleClick,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle};
|
|
quest = object2.quest;
|
|
taskDetails = object2.taskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
hasNitro = object2.hasNitro;
|
|
collectibleRewardDuration = object2.collectibleRewardDuration;
|
|
onGameTitleClick = object2.onGameTitleClick;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
targetMinutes = taskDetails.targetMinutes;
|
|
config = quest.config;
|
|
gameTitle = config.messages.gameTitle;
|
|
moduleValue23 = questRewardUtilsModule;
|
|
isCollectibleQuestRewardPremiumExtendable = moduleValue23.isCollectibleQuestRewardPremiumExtendable;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPremiumExtendable6 = Reflect.apply(isCollectibleQuestRewardPremiumExtendable,
|
|
moduleValue23,
|
|
[config]);
|
|
moduleValue24 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription = moduleValue24.isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription6 = Reflect.apply(isCollectibleQuestRewardPermanentWithPremiumSubscription,
|
|
|
|
moduleValue24, [config]);
|
|
config = quest.config;
|
|
features = config.features;
|
|
value10 = features.includes(QuestVariants.NON_GAMING_PLAY_QUEST);
|
|
value11 = onGameTitleClick != null;
|
|
r0 = formatWithOrWithoutMarkdown(hasNitro && isCollectibleQuestRewardPremiumExtendable6 ? isCollectibleQuestRewardPermanentWithPremiumSubscription6 ? value10 ? collectibleRewardDuration != null ? t.u5QXpw : t.ztXW8V : getGamingPlayQuestPermanentWithPremiumCollectibleMessage({hasRewardDuration: collectibleRewardDuration != null,
|
|
|
|
shouldShowGameProfileLink: value11}) : value10 ? t['1AcTqm'] : getGamingPlayQuestExtendableWithPremiumCollectibleMessage(value11) : isCollectibleQuestRewardPremiumExtendable6 || collectibleRewardDuration != null ? value10 ? t.enQ3jU : getGamingPlayQuestExpiringCollectibleMessage(value11) : value10 ? t['e+K3xJ'] : getQuestBarSubtitlePlayGameMessage(value11),
|
|
|
|
{gameTitle: gameTitle, streamingDurationRequirement: targetMinutes,
|
|
rewardNameWithArticle: rewardNameWithArticle, duration: collectibleRewardDuration,
|
|
targetMinutes: targetMinutes,
|
|
onGameTitleClick: onGameTitleClick}, withoutMarkdown);
|
|
} else {
|
|
moduleValue7 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue7.isConsoleQuest(quest)) {
|
|
object2 = {quest: quest, taskDetails: taskDetails, withoutMarkdown: withoutMarkdown, hasNitro: isPremium2,
|
|
collectibleRewardDuration: value3, onGameTitleClick: onGameTitleClick,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle};
|
|
quest = object2.quest;
|
|
taskDetails = object2.taskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
hasNitro = object2.hasNitro;
|
|
collectibleRewardDuration = object2.collectibleRewardDuration;
|
|
onGameTitleClick = object2.onGameTitleClick;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
targetMinutes = taskDetails.targetMinutes;
|
|
config = quest.config;
|
|
gameTitle = config.messages.gameTitle;
|
|
moduleValue21 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPremiumExtendable = moduleValue21.isCollectibleQuestRewardPremiumExtendable;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPremiumExtendable5 = Reflect.apply(isCollectibleQuestRewardPremiumExtendable,
|
|
moduleValue21,
|
|
[config]);
|
|
moduleValue22 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription = moduleValue22.isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription5 = Reflect.apply(isCollectibleQuestRewardPermanentWithPremiumSubscription,
|
|
|
|
|
|
moduleValue22, [config]);
|
|
value9 = onGameTitleClick != null;
|
|
r0 = formatWithOrWithoutMarkdown(hasNitro && isCollectibleQuestRewardPremiumExtendable5 ? isCollectibleQuestRewardPermanentWithPremiumSubscription5 ? getGamingPlayQuestPermanentWithPremiumCollectibleMessage({hasRewardDuration: collectibleRewardDuration != null,
|
|
|
|
|
|
shouldShowGameProfileLink: value9}) : getGamingPlayQuestExtendableWithPremiumCollectibleMessage(value9) : isCollectibleQuestRewardPremiumExtendable5 || collectibleRewardDuration != null ? getGamingPlayQuestExpiringCollectibleMessage(value9) : getQuestBarSubtitlePlayGameMessage(value9),
|
|
|
|
|
|
{gameTitle: gameTitle, targetMinutes: targetMinutes, rewardNameWithArticle: rewardNameWithArticle,
|
|
duration: collectibleRewardDuration, streamingDurationRequirement: targetMinutes,
|
|
onGameTitleClick: onGameTitleClick}, withoutMarkdown);
|
|
} else {
|
|
moduleValue8 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue8.shouldUsePlayOnDesktopTask(quest)) {
|
|
r0 = getQuestInstructionsToWinRewardPlaytimeOnDesktop({quest: quest, taskDetails: taskDetails,
|
|
withoutMarkdown: withoutMarkdown, hasNitro: isPremium2, collectibleRewardDuration: value3,
|
|
onGameTitleClick: onGameTitleClick, rewardNameWithArticle: defaultRewardNameWithArticle});
|
|
} else {
|
|
moduleValue9 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isTieredRewardCodeQuest = moduleValue9.isTieredRewardCodeQuest;
|
|
object2 = {quest: quest};
|
|
if (Reflect.apply(isTieredRewardCodeQuest, moduleValue9, [object2])) {
|
|
object2 = {quest: quest, taskDetails: taskDetails, withoutMarkdown: withoutMarkdown,
|
|
onGameTitleClick: onGameTitleClick};
|
|
quest = object2.quest;
|
|
taskDetails = object2.taskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
onGameTitleClick = object2.onGameTitleClick;
|
|
r0 = formatWithOrWithoutMarkdown(onGameTitleClick != null ? t.HHVg4i : t['a/ia7F'],
|
|
{gameTitle: quest.config.messages.gameTitle,
|
|
streamingDurationRequirement: taskDetails.targetMinutes,
|
|
onGameTitleClick: onGameTitleClick}, withoutMarkdown);
|
|
} else {
|
|
moduleValue10 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue10.hasWatchVideoTasks(quest)) {
|
|
object2 = {quest: quest, collectibleRewardDuration: value3, hasNitro: isPremium2,
|
|
withoutMarkdown: withoutMarkdown,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle};
|
|
quest = object2.quest;
|
|
collectibleRewardDuration = object2.collectibleRewardDuration;
|
|
hasNitro = object2.hasNitro;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
moduleValue18 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
getDefaultWatchVideoTask = moduleValue18.getDefaultWatchVideoTask;
|
|
config = quest.config;
|
|
value7 = Reflect.apply(getDefaultWatchVideoTask, moduleValue18, [config]);
|
|
r20 = (value7 == null ? undefined : value7.messages.videoTitle) ?? 'video';
|
|
moduleValue19 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPremiumExtendable = moduleValue19.isCollectibleQuestRewardPremiumExtendable;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPremiumExtendable4 = Reflect.apply(isCollectibleQuestRewardPremiumExtendable,
|
|
|
|
|
|
moduleValue19,
|
|
[config]);
|
|
moduleValue20 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription = moduleValue20.isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
config = quest.config;
|
|
r0 = formatWithOrWithoutMarkdown(isCollectibleQuestRewardPremiumExtendable4 && hasNitro ? Reflect.apply(isCollectibleQuestRewardPermanentWithPremiumSubscription,
|
|
|
|
|
|
|
|
|
|
|
|
moduleValue20,
|
|
[config]) ? collectibleRewardDuration != null ? t.tXwfJT : t['xqX+r5'] : t['vs/xBu'] : isCollectibleQuestRewardPremiumExtendable4 || collectibleRewardDuration != null ? t['W/HkLO'] : quest.id === ORBS_INTRO_QUEST_ID ? t.Rsd5bL : t['g+InPC'],
|
|
|
|
|
|
|
|
|
|
|
|
{videoTitle: r20, rewardNameWithArticle: rewardNameWithArticle,
|
|
duration: collectibleRewardDuration},
|
|
withoutMarkdown);
|
|
} else {
|
|
moduleValue11 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue11.hasPlayActivityTask(quest)) {
|
|
object2 = {quest: quest, taskDetails: taskDetails, withoutMarkdown: withoutMarkdown,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle};
|
|
quest = object2.quest;
|
|
taskDetails = object2.taskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
targetMinutes = taskDetails.targetMinutes;
|
|
isPlayAnyActivityQuest2 = (require(7114) /* metro dependency 7114: QuestUtils */).isPlayAnyActivityQuest(quest);
|
|
formatWithOrWithoutMarkdownBinding = formatWithOrWithoutMarkdown;
|
|
r0 = isPlayAnyActivityQuest2 ? formatWithOrWithoutMarkdownBinding(t.VYwSSu,
|
|
{streamingDurationRequirement: targetMinutes, questReward: rewardNameWithArticle},
|
|
withoutMarkdown) : formatWithOrWithoutMarkdownBinding(t.UuzHh8,
|
|
{activityName: quest.config.messages.gameTitle,
|
|
streamingDurationRequirement: targetMinutes, questReward: rewardNameWithArticle},
|
|
withoutMarkdown);
|
|
} else {
|
|
moduleValue12 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue12.hasAchievementInGameTask(quest)) {
|
|
if (thirdPartyTaskDetails != null) {
|
|
object2 = {quest: quest, thirdPartyTaskDetails: thirdPartyTaskDetails,
|
|
withoutMarkdown: withoutMarkdown,
|
|
hasNitro: isPremium2, collectibleRewardDuration: value3,
|
|
onGameTitleClick: onGameTitleClick,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle,
|
|
needsToConnect: needsToConnect};
|
|
quest = object2.quest;
|
|
thirdPartyTaskDetails = object2.thirdPartyTaskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
hasNitro = object2.hasNitro;
|
|
collectibleRewardDuration = object2.collectibleRewardDuration;
|
|
onGameTitleClick = object2.onGameTitleClick;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
needsToConnect = object2.needsToConnect;
|
|
config = quest.config;
|
|
gameTitle = config.messages.gameTitle;
|
|
moduleValue15 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPremiumExtendable = moduleValue15.isCollectibleQuestRewardPremiumExtendable;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPremiumExtendable3 = Reflect.apply(isCollectibleQuestRewardPremiumExtendable,
|
|
|
|
|
|
|
|
|
|
|
|
moduleValue15,
|
|
[config]);
|
|
moduleValue16 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription = moduleValue16.isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription3 = Reflect.apply(isCollectibleQuestRewardPermanentWithPremiumSubscription,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moduleValue16, [config]);
|
|
value6 = onGameTitleClick != null;
|
|
r17 = needsToConnect ? value6 ? t['0SLl/G'] : t.BlfaHK : hasNitro && isCollectibleQuestRewardPremiumExtendable3 ? isCollectibleQuestRewardPermanentWithPremiumSubscription3 ? collectibleRewardDuration != null ? value6 ? t.uLVYG5 : t.NdXW5c : value6 ? t['2Ctf1d'] : t['8066TK'] : collectibleRewardDuration != null ? value6 ? t.yMEn77 : t['6FOKAX'] : value6 ? t.bxN0nx : t.thO6iA : isCollectibleQuestRewardPremiumExtendable3 || collectibleRewardDuration != null ? value6 ? t.ojhBxZ : t['IACEB/'] : value6 ? t.bxN0nx : t.thO6iA;
|
|
description = thirdPartyTaskDetails.description;
|
|
formatWithOrWithoutMarkdownBinding = formatWithOrWithoutMarkdown;
|
|
object2 = {gameTitle: gameTitle};
|
|
if (needsToConnect) {
|
|
value = description.charAt(0);
|
|
value = value.toLowerCase();
|
|
value += description.slice(1);
|
|
r24 = value;
|
|
} else {
|
|
r24 = description;
|
|
}
|
|
object2.objective = r24;
|
|
object2.duration = collectibleRewardDuration;
|
|
object2.questReward = rewardNameWithArticle;
|
|
object2.onGameTitleClick = onGameTitleClick;
|
|
value = formatWithOrWithoutMarkdownBinding(r17, object2, withoutMarkdown);
|
|
r0 = value;
|
|
} else if (thirdPartyTaskDetails != null) {
|
|
r0 = thirdPartyTaskDetails.description;
|
|
} else {
|
|
object2 = {quest: quest, taskDetails: taskDetails, withoutMarkdown: withoutMarkdown,
|
|
hasNitro: isPremium2,
|
|
collectibleRewardDuration: value3, onGameTitleClick: onGameTitleClick,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle};
|
|
quest = object2.quest;
|
|
taskDetails = object2.taskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
hasNitro = object2.hasNitro;
|
|
collectibleRewardDuration = object2.collectibleRewardDuration;
|
|
onGameTitleClick = object2.onGameTitleClick;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
targetMinutes = taskDetails.targetMinutes;
|
|
config = quest.config;
|
|
gameTitle = config.messages.gameTitle;
|
|
moduleValue13 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPremiumExtendable = moduleValue13.isCollectibleQuestRewardPremiumExtendable;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPremiumExtendable2 = Reflect.apply(isCollectibleQuestRewardPremiumExtendable,
|
|
|
|
|
|
|
|
|
|
|
|
moduleValue13,
|
|
[config]);
|
|
moduleValue14 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription = moduleValue14.isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription2 = Reflect.apply(isCollectibleQuestRewardPermanentWithPremiumSubscription,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moduleValue14, [config]);
|
|
value5 = onGameTitleClick != null;
|
|
r0 = formatWithOrWithoutMarkdown(hasNitro && isCollectibleQuestRewardPremiumExtendable2 ? isCollectibleQuestRewardPermanentWithPremiumSubscription2 ? collectibleRewardDuration != null ? value5 ? t['3RwRv8'] : t.TmKqHw : value5 ? t.l9yxDa : t['X8Yt/1'] : value5 ? t.eEuma3 : t.smG9ql : isCollectibleQuestRewardPremiumExtendable2 || collectibleRewardDuration != null ? value5 ? t.Cko4a4 : t.BLyDvO : value5 ? t.ER9rII : t['hkJ+Gs'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{gameTitle: gameTitle, streamingDurationRequirement: targetMinutes,
|
|
duration: collectibleRewardDuration,
|
|
questReward: rewardNameWithArticle, onGameTitleClick: onGameTitleClick},
|
|
withoutMarkdown);
|
|
}
|
|
} else if (thirdPartyTaskDetails != null) {
|
|
r0 = thirdPartyTaskDetails.description;
|
|
} else {
|
|
object2 = {quest: quest, taskDetails: taskDetails, withoutMarkdown: withoutMarkdown,
|
|
hasNitro: isPremium2,
|
|
collectibleRewardDuration: value3, onGameTitleClick: onGameTitleClick,
|
|
rewardNameWithArticle: defaultRewardNameWithArticle};
|
|
quest = object2.quest;
|
|
taskDetails = object2.taskDetails;
|
|
withoutMarkdown = object2.withoutMarkdown;
|
|
hasNitro = object2.hasNitro;
|
|
collectibleRewardDuration = object2.collectibleRewardDuration;
|
|
onGameTitleClick = object2.onGameTitleClick;
|
|
rewardNameWithArticle = object2.rewardNameWithArticle;
|
|
targetMinutes = taskDetails.targetMinutes;
|
|
config = quest.config;
|
|
gameTitle = config.messages.gameTitle;
|
|
moduleValue13 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPremiumExtendable = moduleValue13.isCollectibleQuestRewardPremiumExtendable;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPremiumExtendable2 = Reflect.apply(isCollectibleQuestRewardPremiumExtendable,
|
|
|
|
|
|
|
|
|
|
moduleValue13,
|
|
[config]);
|
|
moduleValue14 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription = moduleValue14.isCollectibleQuestRewardPermanentWithPremiumSubscription;
|
|
config = quest.config;
|
|
isCollectibleQuestRewardPermanentWithPremiumSubscription2 = Reflect.apply(isCollectibleQuestRewardPermanentWithPremiumSubscription,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moduleValue14, [config]);
|
|
value5 = onGameTitleClick != null;
|
|
r0 = formatWithOrWithoutMarkdown(hasNitro && isCollectibleQuestRewardPremiumExtendable2 ? isCollectibleQuestRewardPermanentWithPremiumSubscription2 ? collectibleRewardDuration != null ? value5 ? t['3RwRv8'] : t.TmKqHw : value5 ? t.l9yxDa : t['X8Yt/1'] : value5 ? t.eEuma3 : t.smG9ql : isCollectibleQuestRewardPremiumExtendable2 || collectibleRewardDuration != null ? value5 ? t.Cko4a4 : t.BLyDvO : value5 ? t.ER9rII : t['hkJ+Gs'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{gameTitle: gameTitle, streamingDurationRequirement: targetMinutes,
|
|
duration: collectibleRewardDuration,
|
|
questReward: rewardNameWithArticle, onGameTitleClick: onGameTitleClick},
|
|
withoutMarkdown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function useQuestsInstructionsToWinReward(a0) { // fn#77913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:9716, offset: 0x01e11aef, size: 375 bytes, params: 2, frame: 22
|
|
var object2;
|
|
var r12;
|
|
var r6;
|
|
var r9;
|
|
var allApplicationIds;
|
|
const quest = a0.quest;
|
|
const gameProfileSource = a0.gameProfileSource;
|
|
const value2 = undefined;
|
|
const currentUser = require(dependencyMap[14]).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const value3 = require(dependencyMap[8]).useThirdPartyTaskDetails(quest);
|
|
const value4 = require(dependencyMap[15]).useInGameQuestConnectState(quest);
|
|
const hasAchievementInGameTask2 = require(dependencyMap[10]).hasAchievementInGameTask(quest);
|
|
const moduleValue5 = require(dependencyMap[10]);
|
|
if (hasAchievementInGameTask2) {
|
|
r6 = moduleValue5.getInGameApplicationId(quest);
|
|
} else {
|
|
allApplicationIds = moduleValue5.getAllApplicationIds(quest);
|
|
r6 = allApplicationIds == null ? value2 : allApplicationIds[0];
|
|
}
|
|
const defaultImport = importDefault(dependencyMap[16]);
|
|
object2 = {applicationId: r6};
|
|
const QUEST_INSTRUCTIONS = QuestsExperimentLocations.QUEST_INSTRUCTIONS;
|
|
object2.location = QUEST_INSTRUCTIONS;
|
|
if (gameProfileSource != null) {
|
|
r9 = gameProfileSource;
|
|
} else {
|
|
r9 = require(dependencyMap[17]).GameProfileSources.QuestHome;
|
|
r12 = dependencyMap;
|
|
}
|
|
object2.source = r9;
|
|
defaultImport(object2);
|
|
const _getQuestsInstructionsToWinRewardBinding = _getQuestsInstructionsToWinReward;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, r12);
|
|
object2['currentUser'] = currentUser;
|
|
object2['withoutMarkdown'] = false;
|
|
object2['thirdPartyTaskDetails'] = value3 ?? value2;
|
|
object2['onGameTitleClick'] = value2;
|
|
object2['needsToConnect'] = value4 === false;
|
|
return _getQuestsInstructionsToWinRewardBinding(object2);
|
|
}
|
|
|
|
function getSimplifiedQuestTaskType(a0) { // fn#77915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:10482, offset: 0x01e11c66, size: 235 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
var moduleValue4;
|
|
var isInGameQuest2;
|
|
var binding;
|
|
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (questTaskUtilsModule.isConsoleQuest(a0)) {
|
|
r0 = env0_12.PLAY;
|
|
} else {
|
|
moduleValue2 = questTaskUtilsModule;
|
|
if (moduleValue2.hasPlayActivityTask(a0)) {
|
|
r0 = env0_12.PLAY;
|
|
} else {
|
|
moduleValue3 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue3.hasStreamOnDesktopTask({quest: a0})) {
|
|
r0 = env0_12.STREAM;
|
|
} else {
|
|
moduleValue4 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue4.hasWatchVideoOnMobileTasks(a0)) {
|
|
r0 = env0_12.WATCH_VIDEO;
|
|
} else {
|
|
isInGameQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isInGameQuest(a0);
|
|
binding = env0_12;
|
|
r0 = isInGameQuest2 ? binding.IN_GAME : binding.PLAY;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function canLaunchOnCurrentPlatform({config}, a1) { // fn#77916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:10797, offset: 0x01e11d51, size: 121 bytes, params: 3, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var value4;
|
|
const features = config.features;
|
|
const includes = features.includes;
|
|
var value;
|
|
const MOBILE_ACTIVITY_QUEST = QuestVariants.MOBILE_ACTIVITY_QUEST;
|
|
const value2 = Reflect.apply(includes, features, [MOBILE_ACTIVITY_QUEST]);
|
|
if (value2) {
|
|
value4 = a1 == null;
|
|
if (value4) {
|
|
r1 = value4;
|
|
} else {
|
|
value = undefined;
|
|
value = (importDefault(8105) /* metro dependency 8105: isActivitySupportedOnClientPlatform */)(a1 == null || a1.embeddedActivityConfig == null ? value : a1.embeddedActivityConfig.supported_platforms);
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = !!value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function useQuestInstructionTitle(a0, a1, a2, a3) { // fn#77917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:11100, offset: 0x01e11dca, size: 1121 bytes, params: 5, frame: 28
|
|
var videoTitle;
|
|
var moduleValue6;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var format;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var property;
|
|
var moduleValue8;
|
|
var moduleValue10;
|
|
var isPlayAnyActivityQuest2;
|
|
var moduleValue12;
|
|
var value6;
|
|
const value2 = undefined;
|
|
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
|
const useQuestTaskDetails = questHooksModule.useQuestTaskDetails;
|
|
const targetMinutes = Reflect.apply(useQuestTaskDetails, questHooksModule, [a0]).targetMinutes;
|
|
const value3 = questHooksModule.useThirdPartyTaskDetails(a0);
|
|
const value4 = questHooksModule.useConnectedConsoleLinkOnClick({quest: a0, questContent: a2,
|
|
sourceQuestContent: a3});
|
|
const isSponsoredPlayQuest2 = (require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(a0);
|
|
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (questTaskUtilsModule.isConsoleQuest(a0)) {
|
|
moduleValue6 = questTaskUtilsModule;
|
|
if (moduleValue6.hasPlayOnDesktopTask({quest: a0})) {
|
|
if ((require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0)) {
|
|
format = intl.format;
|
|
return isSponsoredPlayQuest2 ? Reflect.apply(format, intl, [t.gbtCpW, {onClick: value4,
|
|
minutes: targetMinutes}]) : Reflect.apply(format, intl, [t.Ajlcd7, {minutes: targetMinutes,
|
|
onClick: value4,
|
|
gameTitle: a0.config.messages.gameTitle}]);
|
|
}
|
|
if (isSponsoredPlayQuest2) {
|
|
return intl.format(t.Hu8SKW, {targetMinutes: targetMinutes});
|
|
}
|
|
moduleValue8 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue8.hasWatchVideoTasks(a0)) {
|
|
moduleValue12 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
value6 = moduleValue12.getDefaultWatchVideoTask(a0.config);
|
|
videoTitle = value6 == null ? value2 : value6.messages.videoTitle;
|
|
return videoTitle == null ? intl.string(t['o+e9yh']) : intl.formatToPlainString(t['9m9Mna'],
|
|
{videoTitle: videoTitle});
|
|
}
|
|
if (value3 != null) {
|
|
return value3.title;
|
|
}
|
|
if ((require(7116) /* metro dependency 7116: QuestTaskUtils */).hasPlayActivityTask(a0)) {
|
|
isPlayAnyActivityQuest2 = (require(7114) /* metro dependency 7114: QuestUtils */).isPlayAnyActivityQuest(a0);
|
|
format = intl.format;
|
|
return isPlayAnyActivityQuest2 ? Reflect.apply(format, intl, [t['1NaRSs'],
|
|
{minutes: targetMinutes}]) : Reflect.apply(format, intl, [t.xHXCyf, {minutes: targetMinutes,
|
|
activityName: a0.config.messages.gameTitle}]);
|
|
}
|
|
property = t['6zWtV8'];
|
|
moduleValue10 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
return intl.format(moduleValue10.hasPlayOnDesktopTask({quest: a0}) ? a0.config.features.includes(QuestVariants.NON_GAMING_PLAY_QUEST) ? t.fe7Xec : t['wmOh/q'] : property,
|
|
|
|
|
|
{minutes: targetMinutes, gameTitle: a0.config.messages.gameTitle});
|
|
}
|
|
format = intl.format;
|
|
property = t['l4S+cQ'];
|
|
return Reflect.apply(format, intl, [property, {minutes: targetMinutes, onClick: value4,
|
|
gameTitle: a0.config.messages.gameTitle}]);
|
|
}
|
|
if (questTaskUtilsModule.isConsoleQuest(a0)) {
|
|
format = intl.format;
|
|
return isSponsoredPlayQuest2 ? Reflect.apply(format, intl, [t.gbtCpW, {onClick: value4,
|
|
minutes: targetMinutes}]) : Reflect.apply(format, intl, [t.Ajlcd7, {minutes: targetMinutes, onClick: value4,
|
|
gameTitle: a0.config.messages.gameTitle}]);
|
|
}
|
|
if (isSponsoredPlayQuest2) {
|
|
return intl.format(t.Hu8SKW, {targetMinutes: targetMinutes});
|
|
}
|
|
moduleValue8 = questTaskUtilsModule;
|
|
if (moduleValue8.hasWatchVideoTasks(a0)) {
|
|
moduleValue12 = questTaskUtilsModule;
|
|
value6 = moduleValue12.getDefaultWatchVideoTask(a0.config);
|
|
videoTitle = value6 == null ? value2 : value6.messages.videoTitle;
|
|
return videoTitle == null ? intl.string(t['o+e9yh']) : intl.formatToPlainString(t['9m9Mna'],
|
|
{videoTitle: videoTitle});
|
|
}
|
|
if (value3 != null) {
|
|
return value3.title;
|
|
}
|
|
if (questTaskUtilsModule.hasPlayActivityTask(a0)) {
|
|
isPlayAnyActivityQuest2 = (require(7114) /* metro dependency 7114: QuestUtils */).isPlayAnyActivityQuest(a0);
|
|
format = intl.format;
|
|
return isPlayAnyActivityQuest2 ? Reflect.apply(format, intl, [t['1NaRSs'],
|
|
{minutes: targetMinutes}]) : Reflect.apply(format, intl, [t.xHXCyf, {minutes: targetMinutes,
|
|
activityName: a0.config.messages.gameTitle}]);
|
|
}
|
|
property = t['6zWtV8'];
|
|
moduleValue10 = questTaskUtilsModule;
|
|
return intl.format(moduleValue10.hasPlayOnDesktopTask({quest: a0}) ? a0.config.features.includes(QuestVariants.NON_GAMING_PLAY_QUEST) ? t.fe7Xec : t['wmOh/q'] : property,
|
|
{minutes: targetMinutes, gameTitle: a0.config.messages.gameTitle});
|
|
}
|
|
|
|
function getQuestsInstructionsToWinReward(a0) { // fn#77918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:12572, offset: 0x01e1222b, size: 65 bytes, params: 2, frame: 14
|
|
const _getQuestsInstructionsToWinRewardBinding = _getQuestsInstructionsToWinReward;
|
|
const object2 = {};
|
|
copyDataProperties(object2, a0, undefined);
|
|
const currentUser = a0.currentUser;
|
|
object2['currentUser'] = currentUser ?? UserStore.getCurrentUser();
|
|
return _getQuestsInstructionsToWinRewardBinding(object2);
|
|
}
|
|
|
|
function useQuestDescription(a0, a1, a2, a3, a4) { // fn#77919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:12820, offset: 0x01e1226c, size: 239 bytes, params: 6, frame: 18
|
|
var r0;
|
|
var intl;
|
|
const object2 = {quest: a0};
|
|
const value2 = undefined;
|
|
object2.taskDetails = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(a0);
|
|
object2.location = a2;
|
|
object2.sourceQuestContent = a1;
|
|
object2.popoutTargetElementRef = a4;
|
|
object2.gameProfileSource = a3;
|
|
const value3 = useQuestsInstructionsToWinReward(object2);
|
|
let userStatus = a0.userStatus;
|
|
const value4 = (userStatus == null ? value2 : userStatus.claimedAt) != null;
|
|
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
|
const useQuestFormattedDate = questHooksModule.useQuestFormattedDate;
|
|
userStatus = a0.userStatus;
|
|
if (value4) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.lOVr0O,
|
|
{claimDate: Reflect.apply(useQuestFormattedDate, questHooksModule,
|
|
[userStatus == null ? value2 : userStatus.claimedAt])});
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function useQuestBarSubtitle({quest, isExpanded, sourceQuestContent, activeScreen, popoutTargetElementRef, onGameSheetOpened, onGameSheetClosed, hasAlreadyLinked, onClickGameTitle}) { // fn#77920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:13260, offset: 0x01e1235b, size: 1303 bytes, params: 2, frame: 35
|
|
var object2;
|
|
var r17;
|
|
var r11;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var moduleValue8;
|
|
const TaskPlatformScreen = (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen;
|
|
var moduleValue9;
|
|
var gameTitle;
|
|
const rewardsExpireAt = quest.config.rewardsConfig.rewardsExpireAt;
|
|
var value;
|
|
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestFormattedDate(rewardsExpireAt);
|
|
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
|
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useThirdPartyTaskDetails(quest);
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
let userStatus = quest.userStatus;
|
|
const value6 = userStatus?.completedAt != null;
|
|
userStatus = quest.userStatus;
|
|
const value7 = userStatus?.enrolledAt != null;
|
|
let percentComplete = value4.percentComplete;
|
|
const value8 = percentComplete > 0;
|
|
const value9 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
|
|
object2 = {quest: quest};
|
|
const QUESTS_BAR = QuestsExperimentLocations.QUESTS_BAR;
|
|
object2.location = QUESTS_BAR;
|
|
object2.taskDetails = value4;
|
|
object2.sourceQuestContent = sourceQuestContent;
|
|
object2.popoutTargetElementRef = popoutTargetElementRef;
|
|
object2.onGameSheetOpened = onGameSheetOpened;
|
|
object2.onGameSheetClosed = onGameSheetClosed;
|
|
const GameProfileSources = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources;
|
|
const QuestBar = GameProfileSources.QuestBar;
|
|
object2.gameProfileSource = QuestBar;
|
|
const value10 = useQuestsInstructionsToWinReward(object2);
|
|
percentComplete = value5 != null ? value5.percentComplete : value4.percentComplete;
|
|
if (value6) {
|
|
return intl.formatToPlainString(t.APddvF, {expirationDate: value3});
|
|
}
|
|
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (questTaskUtilsModule.hasAchievementInGameTask(quest)) {
|
|
if (hasAlreadyLinked === false) {
|
|
return intl.string(t.mAdqf7);
|
|
}
|
|
}
|
|
const moduleValue7 = questTaskUtilsModule;
|
|
if (isExpanded) {
|
|
if (moduleValue7.hasAchievementInGameTask(quest)) {
|
|
if (hasAlreadyLinked === true) {
|
|
gameTitle = quest.config.messages.gameTitle;
|
|
return onClickGameTitle != null ? intl.format(t.X8hBDz, {gameTitle: gameTitle,
|
|
onClickGameTitle: onClickGameTitle}) : intl.format(t.u3mdpP, {gameTitle: gameTitle});
|
|
}
|
|
if (activeScreen === TaskPlatformScreen.SELECT) {
|
|
return value10;
|
|
}
|
|
moduleValue9 = require(7114) /* metro dependency 7114: QuestUtils */;
|
|
if (moduleValue9.isSponsoredPlayQuest(quest)) {
|
|
if (value7) {
|
|
if (value8) {
|
|
return value10;
|
|
}
|
|
value = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
value = value.getDefaultRewardNameWithArticle(quest.config, currentUser);
|
|
return intl.format(t['1votF6'], {rewardNameWithArticle: value,
|
|
targetMinutes: value4.targetMinutes});
|
|
}
|
|
return value10;
|
|
}
|
|
return value10;
|
|
}
|
|
if (activeScreen === TaskPlatformScreen.SELECT) {
|
|
return value10;
|
|
}
|
|
moduleValue9 = require(7114) /* metro dependency 7114: QuestUtils */;
|
|
if (moduleValue9.isSponsoredPlayQuest(quest)) {
|
|
if (value7) {
|
|
if (value8) {
|
|
return value10;
|
|
}
|
|
value = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
value = value.getDefaultRewardNameWithArticle(quest.config, currentUser);
|
|
return intl.format(t['1votF6'], {rewardNameWithArticle: value, targetMinutes: value4.targetMinutes});
|
|
}
|
|
return value10;
|
|
}
|
|
return value10;
|
|
}
|
|
if (moduleValue7.hasWatchVideoTasks(quest)) {
|
|
r11 = intl.string(t['o+e9yh']);
|
|
} else if (percentComplete > 0) {
|
|
moduleValue8 = questTaskUtilsModule;
|
|
if (moduleValue8.hasAchievementInGameTask(quest)) {
|
|
if (hasAlreadyLinked === true) {
|
|
r17 = intl.string(t.JkyCIO);
|
|
} else if (value9) {
|
|
value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
|
value = value.getContextualEntrypointHeading({quest: quest, taskDetails: value4,
|
|
thirdPartyTaskDetails: value5 ?? undefined});
|
|
r17 = value;
|
|
} else {
|
|
r17 = intl.string(t.mOrpXG);
|
|
}
|
|
} else if (value9) {
|
|
value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
|
value = value.getContextualEntrypointHeading({quest: quest, taskDetails: value4,
|
|
thirdPartyTaskDetails: value5 ?? undefined});
|
|
r17 = value;
|
|
} else {
|
|
r17 = intl.string(t.mOrpXG);
|
|
}
|
|
r11 = r17;
|
|
} else {
|
|
r11 = intl.string(t.S6UUc5);
|
|
}
|
|
return r11;
|
|
}
|
|
|
|
function useQuestBarTitle(a0, a1) { // fn#77922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:15125, offset: 0x01e12872, size: 782 bytes, params: 3, frame: 24
|
|
var r1;
|
|
var moduleValue6;
|
|
const TaskPlatformScreen = (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen;
|
|
var isConsoleQuest2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var value;
|
|
const value2 = undefined;
|
|
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(a0);
|
|
const property = env0_4((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(a0, value3),
|
|
1)[0];
|
|
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useThirdPartyTaskDetails(a0);
|
|
let userStatus = a0.userStatus;
|
|
const value7 = (userStatus == null ? value2 : userStatus.completedAt) != null;
|
|
const percentComplete = value6 != null ? value6.percentComplete : value3.percentComplete;
|
|
if (value7) {
|
|
return intl.string(t['ij5E/5']);
|
|
}
|
|
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (questTaskUtilsModule.hasAchievementInGameTask(a0)) {
|
|
if (a1 === false) {
|
|
return intl.string(t.s9r2a1);
|
|
}
|
|
moduleValue6 = questTaskUtilsModule;
|
|
if (moduleValue6.hasAchievementInGameTask(a0)) {
|
|
if (a1 !== true) {
|
|
userStatus = a0.userStatus;
|
|
if ((userStatus == null ? value2 : userStatus.enrolledAt) == null) {
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete > 0) {
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = value.formatPercent(locale, percentComplete, {roundingMode: 'floor'});
|
|
return intl.formatToPlainString(t.lVZaXD, {percent: value});
|
|
}
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete === 0) {
|
|
return intl.string(t['2+opCy']);
|
|
}
|
|
userStatus = a0.userStatus;
|
|
if ((userStatus == null ? value2 : userStatus.enrolledAt) == null) {
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete > 0) {
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = value.formatPercent(locale, percentComplete, {roundingMode: 'floor'});
|
|
return intl.formatToPlainString(t.lVZaXD, {percent: value});
|
|
}
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
userStatus = a0.userStatus;
|
|
if ((userStatus == null ? value2 : userStatus.enrolledAt) == null) {
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete > 0) {
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = value.formatPercent(locale, percentComplete, {roundingMode: 'floor'});
|
|
return intl.formatToPlainString(t.lVZaXD, {percent: value});
|
|
}
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl, [t['7e5k7L']]);
|
|
}
|
|
} else {
|
|
moduleValue6 = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue6.hasAchievementInGameTask(a0)) {
|
|
if (a1 !== true) {
|
|
userStatus = a0.userStatus;
|
|
if ((userStatus == null ? value2 : userStatus.enrolledAt) == null) {
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete > 0) {
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = value.formatPercent(locale, percentComplete, {roundingMode: 'floor'});
|
|
return intl.formatToPlainString(t.lVZaXD, {percent: value});
|
|
}
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete === 0) {
|
|
return intl.string(t['2+opCy']);
|
|
}
|
|
userStatus = a0.userStatus;
|
|
if ((userStatus == null ? value2 : userStatus.enrolledAt) == null) {
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete > 0) {
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = value.formatPercent(locale, percentComplete, {roundingMode: 'floor'});
|
|
return intl.formatToPlainString(t.lVZaXD, {percent: value});
|
|
}
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
userStatus = a0.userStatus;
|
|
if ((userStatus == null ? value2 : userStatus.enrolledAt) == null) {
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl,
|
|
[t['7e5k7L']]);
|
|
}
|
|
return r1;
|
|
}
|
|
if (percentComplete > 0) {
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = value.formatPercent(locale, percentComplete, {roundingMode: 'floor'});
|
|
return intl.formatToPlainString(t.lVZaXD, {percent: value});
|
|
}
|
|
if (property === TaskPlatformScreen.SELECT) {
|
|
r1 = intl.string(t.EMrUHQ);
|
|
} else {
|
|
isConsoleQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isConsoleQuest(a0);
|
|
string = intl.string;
|
|
r1 = isConsoleQuest2 ? Reflect.apply(string, intl, [t.mOrpXG]) : Reflect.apply(string, intl, [t['7e5k7L']]);
|
|
}
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function usePrimaryCtaCopy({quest, application, shortText}) { // fn#77924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:16081, offset: 0x01e12b80, size: 688 bytes, params: 2, frame: 21
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var features;
|
|
shortText = !(shortText === undefined) && shortText;
|
|
let value = useSimplifiedQuestTaskType(quest);
|
|
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
|
const PLAY = env0_12.PLAY;
|
|
if (PLAY === value) {
|
|
if (canLaunchOnCurrentPlatform(quest, application)) {
|
|
features = quest.config.features;
|
|
value = features.includes(QuestVariants.CLOUD_GAMING_ACTIVITY);
|
|
if (value) {
|
|
return intl.string(t['+qoymD']);
|
|
}
|
|
value = require(7114) /* metro dependency 7114: QuestUtils */;
|
|
if (value.canLaunchActivity(quest)) {
|
|
return intl.string(shortText ? t.E4kW5O : t['Ie9++s']);
|
|
}
|
|
return intl.string(t.l7E81v);
|
|
}
|
|
return intl.string(t.l7E81v);
|
|
}
|
|
const STREAM = env0_12.STREAM;
|
|
if (STREAM === value) {
|
|
return intl.string(t.l7E81v);
|
|
}
|
|
const WATCH_VIDEO = env0_12.WATCH_VIDEO;
|
|
if (WATCH_VIDEO === value) {
|
|
return (require(9523) /* metro dependency 9523: MobileQuestVideoWatchCtaCopy */).getVideoQuestWatchCtaText(value3);
|
|
}
|
|
const IN_GAME = env0_12.IN_GAME;
|
|
if (IN_GAME === value) {
|
|
value = require(7114) /* metro dependency 7114: QuestUtils */;
|
|
return value.canLaunchActivity(quest) && canLaunchOnCurrentPlatform(quest,
|
|
application) ? intl.string(shortText ? t.CkUzLd : t['hRIVy+']) : intl.string(t.l7E81v);
|
|
}
|
|
}
|
|
|
|
function usePremiumExtendableCopy(a0) { // fn#77927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:16927, offset: 0x01e12e73, size: 155 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
const env0_0 = a0;
|
|
const binding = env0_5;
|
|
if (binding.useMemo(_fun77928, [a0])) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
string = intl.string;
|
|
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
r0 = binding.useMemo(_fun77929, [a0]) ? Reflect.apply(string, intl, [t['hh7Rb/']]) : Reflect.apply(string, intl,
|
|
[t.GYGb3A]);
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getRewardCodeRedemptionInstructions({quest, rewardCode}) { // fn#77930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:17271, offset: 0x01e12f68, size: 297 bytes, params: 2, frame: 21
|
|
var r5;
|
|
var moduleValue2;
|
|
const isTieredRewardCodeQuest2 = (require(9500) /* metro dependency 9500: QuestRewardUtils */).isTieredRewardCodeQuest({quest: quest});
|
|
const r2 = rewardCode?.platform ?? (require(6531) /* metro dependency 6531: QuestTypes */).QuestRewardCodePlatforms.CROSS_PLATFORM;
|
|
if (isTieredRewardCodeQuest2) {
|
|
moduleValue2 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
r5 = moduleValue2.getRewardCodeQuestReward({quest: quest,
|
|
idx: rewardCode?.tier ?? quest.userStatus?.claimedTier});
|
|
} else {
|
|
r5 = null;
|
|
}
|
|
let value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
|
value = value.getDefaultReward(quest.config);
|
|
let redemptionInstructionsByPlatform = r5 == null || r5.messages == null ? undefined : r5.messages.redemptionInstructionsByPlatform;
|
|
redemptionInstructionsByPlatform = redemptionInstructionsByPlatform ?? value.messages.redemptionInstructionsByPlatform;
|
|
return r2 != null ? redemptionInstructionsByPlatform[r2] : undefined;
|
|
}
|
|
|
|
function useModalCtaConfig({quest, questContent, preCtaClick, impressionId, sourceQuestContent}) { // fn#77931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:17841, offset: 0x01e13091, size: 199 bytes, params: 2, frame: 18
|
|
var object2;
|
|
const value = _fun77932();
|
|
const value3 = env0_5.useMemo(_fun77936, [quest]);
|
|
object2 = {};
|
|
object2.ctaText = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest);
|
|
object2.ctaVariant = 'secondary';
|
|
object2.onClickCta = value;
|
|
object2.title = quest.config.messages.gameTitle;
|
|
object2.subtitle = value3;
|
|
object2.ctaIconPosition = 'end';
|
|
return object2;
|
|
}
|
|
|
|
function _getQuestInstructionsToWinRewardArenaPackage({quest, gameSheetHook, rewardNameWithArticle, targetMinutes}) { // fn#77910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:2268, owner: getQuestInstructionsToWinRewardSponsored._getQuestInstructionsToWinRewardArenaPackage, offset: 0x01e10bff, size: 441 bytes, params: 2, frame: 22
|
|
const object2 = {};
|
|
const PACKAGE_ACTION_ADVENTURE = QuestVariants.PACKAGE_ACTION_ADVENTURE;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const H485IA = t.H485IA;
|
|
object2[PACKAGE_ACTION_ADVENTURE] = H485IA;
|
|
const PACKAGE_RPG_MMO = QuestVariants.PACKAGE_RPG_MMO;
|
|
object2[PACKAGE_RPG_MMO] = t['3XS8Ni'];
|
|
const PACKAGE_RACING_SPORTS = QuestVariants.PACKAGE_RACING_SPORTS;
|
|
object2[PACKAGE_RACING_SPORTS] = t['X+UCju'];
|
|
const PACKAGE_SANDBOX_CREATIVE = QuestVariants.PACKAGE_SANDBOX_CREATIVE;
|
|
object2[PACKAGE_SANDBOX_CREATIVE] = t['6o4n1Q'];
|
|
const PACKAGE_FAMILY_FRIENDLY = QuestVariants.PACKAGE_FAMILY_FRIENDLY;
|
|
const DUsNmf = t.DUsNmf;
|
|
object2[PACKAGE_FAMILY_FRIENDLY] = DUsNmf;
|
|
const PACKAGE_HOLIDAY_SEASON = QuestVariants.PACKAGE_HOLIDAY_SEASON;
|
|
object2[PACKAGE_HOLIDAY_SEASON] = t['cWP8/Z'];
|
|
const PACKAGE_NEW_YEARS = QuestVariants.PACKAGE_NEW_YEARS;
|
|
object2[PACKAGE_NEW_YEARS] = t['8+sIJz'];
|
|
const value2 = quest.config.features.find(_fun77911);
|
|
let r3 = value2 != null ? object2[value2] : null;
|
|
r3 = r3 ?? t.CDeHul;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return intl.format(r3, {rewardNameWithArticle: rewardNameWithArticle, targetMinutes: targetMinutes,
|
|
gameSheetHook: gameSheetHook});
|
|
}
|
|
|
|
function useSimplifiedQuestTaskType(a0) { // fn#77925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:16154, owner: usePrimaryCtaCopy.useSimplifiedQuestTaskType, offset: 0x01e12e30, size: 44 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
return env1_5.useMemo(_fun77926, [a0]);
|
|
}
|
|
|
|
function _fun77928() { // fn#77928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:16981, offset: 0x01e12f0e, size: 45 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return (require(9500) /* metro dependency 9500: QuestRewardUtils */).isCollectibleQuestRewardPremiumExtendable(env0_0);
|
|
}
|
|
|
|
function _fun77929() { // fn#77929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:17058, offset: 0x01e12f3b, size: 45 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return (require(9500) /* metro dependency 9500: QuestRewardUtils */).isCollectibleQuestRewardPermanentWithPremiumSubscription(env0_0);
|
|
}
|
|
|
|
function _fun77932() { // fn#77932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:17950, offset: 0x01e13158, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun77934);
|
|
return _fun77935;
|
|
}
|
|
|
|
function _fun77936() { // fn#77936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:18208, offset: 0x01e13220, size: 398 bytes, params: 1, frame: 18
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var moduleValue;
|
|
var moduleValue2;
|
|
var features;
|
|
var moduleValue3;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const subtitle = quest.config.ctaConfig?.subtitle;
|
|
if (subtitle != null) {
|
|
r0 = subtitle;
|
|
} else {
|
|
value3 = environment.__proto__;
|
|
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
if (moduleValue.hasAchievementInGameTask(quest)) {
|
|
r1 = quest.config.taskConfigV2.tasks.ACHIEVEMENT_IN_GAME.messages.taskTitle;
|
|
} else {
|
|
moduleValue2 = require(7114) /* metro dependency 7114: QuestUtils */;
|
|
if (moduleValue2.getQuestType(quest.config) !== (require(7119) /* metro dependency 7119: QuestType */).QuestType.GAMEPLAY) {
|
|
r1 = intl.string(t.y8Xf3k);
|
|
} else {
|
|
features = quest.config.features;
|
|
if (features.includes(QuestVariants.NON_GAMING_PLAY_QUEST)) {
|
|
r1 = intl.string(t.y8Xf3k);
|
|
} else {
|
|
moduleValue3 = require(7114) /* metro dependency 7114: QuestUtils */;
|
|
r1 = moduleValue3.isSponsoredPlayQuest(quest) ? intl.string(t.y8Xf3k) : intl.string(t['wirwN+']);
|
|
}
|
|
}
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun77926() { // fn#77926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:16211, offset: 0x01e12e5c, size: 23 bytes, params: 1, frame: 11
|
|
return getSimplifiedQuestTaskType(env0_0);
|
|
}
|
|
|
|
function* _fun77934() { // fn#77934, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10136:17970, offset: 0x01e13187, size: 153 bytes, params: 1, frame: 20
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const value3 = undefined;
|
|
yield dependencyMap == null ? value3 : dependencyMap();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const binding = env3_0;
|
|
const binding2 = env3_2;
|
|
const value8 = binding(binding2[23]);
|
|
const openGameLinkDirectly = value8.openGameLinkDirectly;
|
|
const object2 = {};
|
|
object2.content = importDefault;
|
|
const QuestContentCTA = binding(binding2[24]).QuestContentCTA;
|
|
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
|
|
object2.ctaContent = OPEN_GAME_LINK;
|
|
object2.impressionId = env2_3;
|
|
object2.sourceQuestContent = env2_4;
|
|
Reflect.apply(openGameLinkDirectly, value8, [require, object2]);
|
|
return value3;
|
|
}
|
|
|