decord/source/modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx

324 lines
14 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 14221
// Function ID: 14222
2026-07-20 16:05:17 +00:00
// Name: QuestDockContextMenuActionSheet
2026-08-05 07:35:12 +00:00
// Dependencies: [5, 19, 676, 21, 7075, 10346, 10368, 5631, 5633, 12536, 7749, 10377, 5116, 7081, 4223, 4203, 1236, 14222, 9405, 9406, 9410, 7082, 7071, 11052, 10041, 14224, 5255, 10348, 14227, 7619, 14228, 14230, 14232, 8280, 5910, 5623, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 14221 (QuestDockContextMenuActionSheet)
2026-07-29 08:29:29 +00:00
import useQuests from "useQuests";
import "emitClickEventWithCreative";
2026-07-23 10:11:24 +00:00
import { UserSettingsSections } from "ME";
2026-07-29 08:29:29 +00:00
import jsxProd from "AdCreativeType";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
2026-07-23 10:11:24 +00:00
let result = require("ME").fileFinishedImporting("modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function QuestDockContextMenuActionSheet(quest) {
2026-07-29 08:29:29 +00:00
let c1;
let c2;
let c3;
let c4;
2026-07-20 16:05:17 +00:00
quest = quest.quest;
2026-07-29 08:29:29 +00:00
let importDefault;
let dependencyMap;
let callback;
c4 = undefined;
const tmp = quest;
2026-08-05 07:35:12 +00:00
let obj = quest(7075);
2026-07-29 08:29:29 +00:00
const isShareableQuestResult = obj.isShareableQuest(quest.config);
2026-08-05 07:35:12 +00:00
let obj1 = quest(10346);
2026-07-20 16:05:17 +00:00
const questPreviewActions = obj1.useQuestPreviewActions(quest.id);
2026-07-29 08:29:29 +00:00
({ handleComplete: c1, handleProgress: c2, handleResetDismissibilityClick: c3, handleResetStatusClick: c4 } = questPreviewActions);
2026-08-05 07:35:12 +00:00
let obj2 = quest(10368);
2026-07-20 16:05:17 +00:00
const externalCtaLabel = obj2.getExternalCtaLabel(quest);
2026-07-29 08:29:29 +00:00
obj = { icon: null, label: null, onPress: null };
obj = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj[0] = quest(12536).LinkExternalMediumIcon;
obj[0] = callback2(quest(5633).ActionSheetRow.Icon, obj);
obj[1] = callback2(quest(7749).FormLabel, { text: externalCtaLabel });
2026-07-29 08:29:29 +00:00
obj[2] = function onPress() {
let obj = quest(_undefined2[11]);
obj = { content: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE, ctaContent: quest(_undefined2[13]).QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK, sourceQuestContent: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE };
2026-07-20 16:05:17 +00:00
obj.openGameLinkDirectly(quest, obj);
2026-07-29 08:29:29 +00:00
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
let items = [callback2(quest(5633).ActionSheetRow, obj), ];
2026-07-29 08:29:29 +00:00
let tmp7Result = isShareableQuestResult;
2026-07-20 16:05:17 +00:00
if (isShareableQuestResult) {
2026-07-29 08:29:29 +00:00
obj1 = { icon: null, label: null, onPress: null };
obj2 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj2[0] = tmp(4203).CopyIcon;
obj1[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj2);
2026-07-29 08:29:29 +00:00
let obj3 = { text: null };
const intl = tmp(1236).intl;
obj3[0] = intl.string(tmp(1236).t.WqhZss);
2026-08-05 07:35:12 +00:00
obj1[1] = tmp7(tmp(7749).FormLabel, obj3);
2026-07-29 08:29:29 +00:00
obj1[2] = function onPress() {
let obj = quest(_undefined2[6]);
obj = { content: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE, ctaContent: quest(_undefined2[13]).QuestContentCTA.CONTEXT_MENU_COPY_LINK, sourceQuestContent: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE };
2026-07-20 16:05:17 +00:00
obj.copyShareLink(quest.id, obj);
2026-07-29 08:29:29 +00:00
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
tmp7Result = tmp7(tmp(5633).ActionSheetRow, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[1] = tmp7Result;
2026-08-05 07:35:12 +00:00
const children = [closure_6(quest(5633).ActionSheetRow.Group, { hasIcons: true, children: items }), , ];
2026-07-29 08:29:29 +00:00
const obj4 = { hasIcons: true, children: null };
const obj5 = { icon: null, label: null, onPress: null };
const obj6 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj6[0] = importDefault(14222);
obj5[0] = callback2(tmp(5633).ActionSheetRow.Icon, obj6);
2026-07-29 08:29:29 +00:00
const obj7 = { text: null };
const intl2 = tmp(1236).intl;
obj7[0] = intl2.string(tmp(1236).t.LLLLPD);
2026-08-05 07:35:12 +00:00
obj5[1] = callback2(tmp(7749).FormLabel, obj7);
2026-07-29 08:29:29 +00:00
obj5[2] = function onPress() {
let obj = quest(_undefined2[18]);
if (obj.shouldMigrateToAdAnalyticsInterface(quest(_undefined2[18]).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_dock_context_menu")) {
2026-07-20 16:05:17 +00:00
let tmpResult = tmp(tmp2[19]);
2026-07-29 08:29:29 +00:00
obj = { type: null, adCreativeType: null, adCreativeId: null, questContentCTA: null, surfaceId: null, sourceQuestContent: null };
obj[0] = tmp(tmp2[20]).AdUserActionType.CLICK_INTERNAL;
obj[1] = tmp(tmp2[21]).AdCreativeType.QUEST;
obj[2] = quest.id;
obj[3] = tmp(tmp2[13]).QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
obj[4] = tmp(tmp2[12]).QuestContent.QUEST_BAR_MOBILE;
obj[5] = tmp(tmp2[12]).QuestContent.QUEST_BAR_MOBILE;
2026-07-20 16:05:17 +00:00
tmpResult.captureAdUserAction(obj);
2026-07-29 08:29:29 +00:00
let tmp3 = quest;
2026-07-20 16:05:17 +00:00
} else {
tmpResult = tmp(tmp2[22]);
2026-07-29 08:29:29 +00:00
obj = { questId: null, questContent: null, questContentCTA: null, sourceQuestContent: null };
tmp3 = quest;
obj[0] = quest.id;
obj[1] = tmp(tmp2[12]).QuestContent.QUEST_BAR_MOBILE;
obj[2] = tmp(tmp2[13]).QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
obj[3] = tmp(tmp2[12]).QuestContent.QUEST_BAR_MOBILE;
2026-07-20 16:05:17 +00:00
const result = tmpResult.trackQuestContentClicked(obj);
}
2026-07-29 08:29:29 +00:00
const tmpResult1 = quest(_undefined2[23]);
tmpResult1.openQuestHome({ scrollToQuestId: tmp3.id, fromContent: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE });
const obj1 = { scrollToQuestId: tmp3.id, fromContent: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE };
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
const items2 = [callback2(tmp(5633).ActionSheetRow, obj5), , ];
2026-07-29 08:29:29 +00:00
let obj8 = { icon: null, label: null, onPress: null };
let obj9 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj9[0] = tmp(10041).CircleQuestionIcon;
obj8[0] = callback2(tmp(5633).ActionSheetRow.Icon, obj9);
2026-07-29 08:29:29 +00:00
let obj10 = { text: null };
const intl3 = tmp(1236).intl;
obj10[0] = intl3.string(tmp(1236).t.GcsZKJ);
2026-08-05 07:35:12 +00:00
obj8[1] = callback2(tmp(7749).FormLabel, obj10);
2026-07-29 08:29:29 +00:00
obj8[2] = function onPress() {
let obj = _undefined(_undefined2[25]);
obj = { quest, isTargetedDisclosure: true, trackingCtx: null };
obj = { content: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE, ctaContent: quest(_undefined2[13]).QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE, sourceQuestContent: quest(_undefined2[12]).QuestContent.QUEST_BAR_MOBILE };
obj[2] = obj;
2026-07-20 16:05:17 +00:00
obj.showModal(obj);
2026-07-29 08:29:29 +00:00
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items2[1] = callback2(tmp(5633).ActionSheetRow, obj8);
2026-07-29 08:29:29 +00:00
const obj11 = { icon: null, label: null, subLabel: null, onPress: null };
const obj12 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj12[0] = tmp(5255).XSmallIcon;
obj11[0] = callback2(tmp(5633).ActionSheetRow.Icon, obj12);
2026-07-29 08:29:29 +00:00
const obj13 = { text: null };
const intl4 = tmp(1236).intl;
obj13[0] = intl4.string(tmp(1236).t.NN79E9);
2026-08-05 07:35:12 +00:00
obj11[1] = callback2(tmp(7749).FormLabel, obj13);
2026-07-29 08:29:29 +00:00
const intl5 = tmp(1236).intl;
obj11[2] = intl5.string(tmp(1236).t.V6htN5);
obj11[3] = callback(function*() {
if (dependencyMap === 2) {
dependencyMap = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-05 07:35:12 +00:00
return { value: "T", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
dependencyMap = 2;
if (0 === v0) {
if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let closure_0 = tmp4;
let tmp25 = outer1_0;
2026-08-05 07:35:12 +00:00
outer1_0(10348).dismissQuestContent(outer1_0.id, outer1_0(5116).QuestContent.QUEST_BAR_MOBILE);
const obj8 = outer1_0(10348);
v0(4223).hideActionSheet();
const obj9 = v0(4223);
2026-07-29 08:29:29 +00:00
let captureAdUserAction = outer1_0;
2026-08-05 07:35:12 +00:00
if (obj10.shouldMigrateToAdAnalyticsInterface(outer1_0(9405).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_dock_context_menu")) {
captureAdUserAction = captureAdUserAction(9406).captureAdUserAction;
2026-07-29 08:29:29 +00:00
const obj1 = { type: null, adCreativeType: null, adCreativeId: null, questContentCTA: null, surfaceId: null, sourceQuestContent: null };
2026-08-05 07:35:12 +00:00
obj1[0] = outer1_0(9410).AdUserActionType.CLICK_INTERNAL;
obj1[1] = outer1_0(7082).AdCreativeType.QUEST;
2026-07-29 08:29:29 +00:00
obj1[2] = tmp25.id;
2026-08-05 07:35:12 +00:00
obj1[3] = outer1_0(7081).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
obj1[4] = outer1_0(5116).QuestContent.QUEST_BAR_MOBILE;
2026-07-29 08:29:29 +00:00
tmp25 = outer1_0;
2026-08-05 07:35:12 +00:00
obj1[5] = outer1_0(5116).QuestContent.QUEST_BAR_MOBILE;
2026-07-29 08:29:29 +00:00
captureAdUserAction(obj1);
2026-08-05 07:35:12 +00:00
const captureAdUserActionResult = captureAdUserAction(9406);
2026-07-29 08:29:29 +00:00
} else {
const obj2 = { questId: null, questContent: null, questContentCTA: null, sourceQuestContent: null };
obj2[0] = tmp25.id;
2026-08-05 07:35:12 +00:00
obj2[1] = outer1_0(5116).QuestContent.QUEST_BAR_MOBILE;
obj2[2] = outer1_0(7081).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
obj2[3] = outer1_0(5116).QuestContent.QUEST_BAR_MOBILE;
const result = captureAdUserAction(7071).trackQuestContentClicked(obj2);
const captureAdUserActionResult2 = captureAdUserAction(7071);
2026-07-29 08:29:29 +00:00
}
v0 = 1;
dependencyMap = 1;
2026-08-05 07:35:12 +00:00
obj10 = outer1_0(9405);
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
dependencyMap = 3;
throw arg1;
} else if (arg0 === 2) {
dependencyMap = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else {
2026-08-05 07:35:12 +00:00
obj = outer1_0(14227);
2026-07-29 08:29:29 +00:00
const result1 = obj.displayQuestDismissalToast();
dependencyMap = 3;
2026-08-05 07:35:12 +00:00
return { value: "T", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp28) {
dependencyMap = tmp;
throw tmp28;
}
}
});
2026-08-05 07:35:12 +00:00
items2[2] = callback2(tmp(5633).ActionSheetRow, obj11);
2026-07-29 08:29:29 +00:00
obj4[1] = items2;
2026-08-05 07:35:12 +00:00
children[1] = closure_6(tmp(5633).ActionSheetRow.Group, obj4);
2026-07-20 16:05:17 +00:00
let preview = quest.preview;
if (preview) {
2026-07-29 08:29:29 +00:00
const obj14 = { title: null, hasIcons: true, children: null };
const intl6 = tmp(1236).intl;
obj14[0] = intl6.string(tmp(1236).t["Ape+mm"]);
const obj15 = { icon: null, label: null, onPress: null };
const obj16 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj16[0] = tmp(7619).TrophyIcon;
obj15[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj16);
2026-07-29 08:29:29 +00:00
const obj17 = { text: null };
const intl7 = tmp(1236).intl;
obj17[0] = intl7.string(tmp(1236).t.jQEfRT);
2026-08-05 07:35:12 +00:00
obj15[1] = tmp7(tmp(7749).FormLabel, obj17);
2026-07-29 08:29:29 +00:00
obj15[2] = function onPress() {
_undefined();
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
const items3 = [tmp7(tmp(5633).ActionSheetRow, obj15), , , , , , ];
2026-07-29 08:29:29 +00:00
const obj18 = { icon: null, label: null, onPress: null };
const obj19 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj19[0] = tmp(14228).RedoIcon;
obj18[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj19);
2026-07-29 08:29:29 +00:00
const obj20 = { text: null };
const intl8 = tmp(1236).intl;
obj20[0] = intl8.string(tmp(1236).t.cKSLr4);
2026-08-05 07:35:12 +00:00
obj18[1] = tmp7(tmp(7749).FormLabel, obj20);
2026-07-29 08:29:29 +00:00
obj18[2] = function onPress() {
_undefined2(0.9 * Math.random() + 0.03);
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items3[1] = tmp7(tmp(5633).ActionSheetRow, obj18);
2026-07-29 08:29:29 +00:00
const obj21 = { icon: null, label: null, onPress: null };
const obj22 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj22[0] = tmp(14230).UndoIcon;
obj21[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj22);
2026-07-29 08:29:29 +00:00
const obj23 = { text: null };
const intl9 = tmp(1236).intl;
obj23[0] = intl9.string(tmp(1236).t.taqkwK);
2026-08-05 07:35:12 +00:00
obj21[1] = tmp7(tmp(7749).FormLabel, obj23);
2026-07-29 08:29:29 +00:00
obj21[2] = function onPress() {
_undefined4();
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items3[2] = tmp7(tmp(5633).ActionSheetRow, obj21);
2026-07-29 08:29:29 +00:00
const obj24 = { icon: null, label: null, onPress: null };
const obj25 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj25[0] = tmp(14232).UnsendIcon;
obj24[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj25);
2026-07-29 08:29:29 +00:00
const obj26 = { text: null };
const intl10 = tmp(1236).intl;
obj26[0] = intl10.string(tmp(1236).t.JF6W66);
2026-08-05 07:35:12 +00:00
obj24[1] = tmp7(tmp(7749).FormLabel, obj26);
2026-07-29 08:29:29 +00:00
obj24[2] = function onPress() {
_undefined3();
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items3[3] = tmp7(tmp(5633).ActionSheetRow, obj24);
2026-07-29 08:29:29 +00:00
const obj27 = { icon: null, label: null, onPress: null };
const obj28 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj28[0] = tmp(8280).EyeIcon;
obj27[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj28);
2026-07-29 08:29:29 +00:00
const obj29 = { text: null };
const intl11 = tmp(1236).intl;
obj29[0] = intl11.string(tmp(1236).t["lL6/zF"]);
2026-08-05 07:35:12 +00:00
obj27[1] = tmp7(tmp(7749).FormLabel, obj29);
2026-07-29 08:29:29 +00:00
obj27[2] = function onPress() {
2026-07-20 16:05:17 +00:00
const items = [quest.id];
2026-07-29 08:29:29 +00:00
quest(_undefined2[27]).markAdContentUnseen(quest(_undefined2[21]).AdCreativeType.QUEST, items);
const obj = quest(_undefined2[27]);
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items3[4] = tmp7(tmp(5633).ActionSheetRow, obj27);
2026-07-29 08:29:29 +00:00
const obj30 = { icon: null, label: null, onPress: null };
const obj31 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj31[0] = tmp(8280).EyeIcon;
obj30[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj31);
2026-07-29 08:29:29 +00:00
const obj32 = { text: null };
const intl12 = tmp(1236).intl;
obj32[0] = intl12.string(tmp(1236).t.tx5Ax5);
2026-08-05 07:35:12 +00:00
obj30[1] = tmp7(tmp(7749).FormLabel, obj32);
2026-07-29 08:29:29 +00:00
obj30[2] = function onPress() {
let obj = quest(_undefined2[34]);
obj = { screen: _undefined4.QUEST_PREVIEW_TOOL_2, params: obj };
2026-07-20 16:05:17 +00:00
obj = { questId: quest.id };
obj.openUserSettings(obj);
2026-07-29 08:29:29 +00:00
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items3[5] = tmp7(tmp(5633).ActionSheetRow, obj30);
2026-07-29 08:29:29 +00:00
const obj33 = { icon: null, label: null, onPress: null };
const obj34 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj34[0] = tmp(4203).CopyIcon;
obj33[0] = tmp7(tmp(5633).ActionSheetRow.Icon, obj34);
2026-07-29 08:29:29 +00:00
const obj35 = { text: null };
const intl13 = tmp(1236).intl;
obj35[0] = intl13.string(tmp(1236).t.oisrFi);
2026-08-05 07:35:12 +00:00
obj33[1] = tmp7(tmp(7749).FormLabel, obj35);
2026-07-29 08:29:29 +00:00
obj33[2] = function onPress() {
quest(_undefined2[35]).copy(quest.id);
const obj = quest(_undefined2[35]);
_undefined(_undefined2[14]).hideActionSheet();
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items3[6] = tmp7(tmp(5633).ActionSheetRow, obj33);
2026-07-29 08:29:29 +00:00
obj14[2] = items3;
2026-08-05 07:35:12 +00:00
preview = tmp6(tmp(5633).ActionSheetRow.Group, obj14);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
children[2] = preview;
2026-08-05 07:35:12 +00:00
return closure_6(quest(5631).ActionSheet, { children });
2026-07-20 16:05:17 +00:00
};