585 lines
31 KiB
TypeScript
585 lines
31 KiB
TypeScript
/* Metro module 9520; source: modules/quests/utils/QuestPlatformUtils.tsx; dependencies: [6528, 661, 7116, 6535, 9519, 9517, 9518, 7121, 7110, 9354, 1244, 477, 9505, 4078, 9521, 1239, 491, 9511, 3847, 7007, 694, 2] */
|
|
function _fun74261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:6, offset: 0x01d8797a, size: 395 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const closure = supportedConsoles;
|
|
const closure2 = function(a0) {
|
|
return a0.connected_account_type === 'xbox' ? PlatformTypes.XBOX : PlatformTypes.PLAYSTATION;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestTaskPlatform;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_4 = constantsModule.AnalyticEvents;
|
|
const env0_5 = constantsModule.ComponentActions;
|
|
const env0_6 = constantsModule.PlatformTypes;
|
|
const env0_7 = constantsModule.UserSettingsSections;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/utils/QuestPlatformUtils.tsx');
|
|
exports.supportedTaskPlatforms = supportedTaskPlatforms;
|
|
exports.supportedConsoles = closure;
|
|
exports.isQuestSupportedOnWeb = isQuestSupportedOnWeb;
|
|
exports.PlayQuestPlatform = {DESKTOP: 'desktop', XBOX: 'xbox', PLAYSTATION: 'playstation'};
|
|
exports.getPlatformTypeForHintMessage = closure2;
|
|
exports.openAuthorizationConnectionModal = openAuthorizationConnectionModal;
|
|
exports.getExpiredCredentialsHintMessage = function(a0) {
|
|
return getPlatformTypeForHintMessage(a0) === PlatformTypes.XBOX ? require(dependencyMap[10]).t['mytEv+'] : require(dependencyMap[10]).t.iDiwby;
|
|
};
|
|
exports.openGameLinkDirectly = openGameLinkDirectly;
|
|
exports.openAdGameLinkDirectly = openAdGameLinkDirectly;
|
|
exports.openConsoleConnectionSettings = openConsoleConnectionSettings;
|
|
exports.openAddConsoleConnectionModal = openAddConsoleConnectionModal;
|
|
exports.openSingleConsoleConnectionModal = openSingleConsoleConnectionModal;
|
|
}
|
|
|
|
function supportedConsoles({config}) { // fn#74262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:217, offset: 0x01d87b05, size: 194 bytes, params: 2, frame: 17
|
|
var r5;
|
|
var property;
|
|
const FirstPartyQuestTaskTypes = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypes;
|
|
var PLAY_ON_XBOX;
|
|
var PLAY_ON_PLAYSTATION;
|
|
var push;
|
|
var PLAYSTATION;
|
|
var XBOX;
|
|
var value4;
|
|
const items2 = [];
|
|
const Object = global.Object;
|
|
const value = Object.keys(config.taskConfigV2.tasks);
|
|
let length = value.length;
|
|
if (0 < length) {
|
|
r5 = 0;
|
|
while (true) {
|
|
property = value[r5];
|
|
PLAY_ON_XBOX = FirstPartyQuestTaskTypes.PLAY_ON_XBOX;
|
|
if (PLAY_ON_XBOX !== property) {
|
|
PLAY_ON_PLAYSTATION = FirstPartyQuestTaskTypes.PLAY_ON_PLAYSTATION;
|
|
if (PLAY_ON_PLAYSTATION !== property) {
|
|
break;
|
|
}
|
|
push = items2.push;
|
|
PLAYSTATION = PlatformTypes.PLAYSTATION;
|
|
Reflect.apply(push, items2, [PLAYSTATION]);
|
|
break;
|
|
}
|
|
push = items2.push;
|
|
XBOX = PlatformTypes.XBOX;
|
|
Reflect.apply(push, items2, [XBOX]);
|
|
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
|
|
length = value.length;
|
|
if (value4 < length) {
|
|
r5 = value4;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function getDirectAppStoreLinkFromCta(a0) { // fn#74264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:695, offset: 0x01d87bf6, size: 340 bytes, params: 2, frame: 16
|
|
var iosAppId;
|
|
var r1;
|
|
var r0;
|
|
var ios;
|
|
var moduleValue3;
|
|
var android;
|
|
var value;
|
|
const value2 = undefined;
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isIOS()) {
|
|
ios = a0.ios;
|
|
iosAppId = ios == null ? value2 : ios.iosAppId;
|
|
if (iosAppId == null) {
|
|
moduleValue3 = platformUtilsModule;
|
|
if (moduleValue3.isAndroid()) {
|
|
android = a0.android;
|
|
value = null;
|
|
r1 = value == (value == android ? value2 : android.androidAppId) ? value : 'https://play.google.com/store/apps/details?id=' + a0.android.androidAppId;
|
|
} else {
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
value = value.getOS();
|
|
r1 = value !== 'android' || (a0.android == null ? value2 : a0.android.androidAppId) == null ? null : 'https://play.google.com/store/apps/details?id=' + a0.android.androidAppId;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
value = iosAppId.startsWith('id');
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
value = 'https://apps.apple.com/app/' + (value ? iosAppId : 'id' + iosAppId);
|
|
r0 = value;
|
|
}
|
|
} else if ((require(477) /* metro dependency 477: PlatformUtils */).getOS() !== 'ios') {
|
|
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (moduleValue3.isAndroid()) {
|
|
android = a0.android;
|
|
value = null;
|
|
r1 = value == (value == android ? value2 : android.androidAppId) ? value : 'https://play.google.com/store/apps/details?id=' + a0.android.androidAppId;
|
|
} else {
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
value = value.getOS();
|
|
r1 = value !== 'android' || (a0.android == null ? value2 : a0.android.androidAppId) == null ? null : 'https://play.google.com/store/apps/details?id=' + a0.android.androidAppId;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
ios = a0.ios;
|
|
iosAppId = ios == null ? value2 : ios.iosAppId;
|
|
if (iosAppId == null) {
|
|
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (moduleValue3.isAndroid()) {
|
|
android = a0.android;
|
|
value = null;
|
|
r1 = value == (value == android ? value2 : android.androidAppId) ? value : 'https://play.google.com/store/apps/details?id=' + a0.android.androidAppId;
|
|
} else {
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
value = value.getOS();
|
|
r1 = value !== 'android' || (a0.android == null ? value2 : a0.android.androidAppId) == null ? null : 'https://play.google.com/store/apps/details?id=' + a0.android.androidAppId;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
value = iosAppId.startsWith('id');
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
value = 'https://apps.apple.com/app/' + (value ? iosAppId : 'id' + iosAppId);
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getInlineStoreParamsFromCta(a0) { // fn#74265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:1120, offset: 0x01d87d4a, size: 266 bytes, params: 2, frame: 18
|
|
var iosAppId;
|
|
var r0;
|
|
var android;
|
|
var value3;
|
|
var ios;
|
|
var object2;
|
|
var parseInt;
|
|
var value;
|
|
const value2 = undefined;
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isAndroid()) {
|
|
android = a0.android;
|
|
if ((android == null ? value2 : android.androidAppId) != null) {
|
|
r0 = {url: 'https://play.google.com/d?id=' + a0.android.androidAppId, appId: null};
|
|
} else {
|
|
value = platformUtilsModule;
|
|
value = value.isIOS();
|
|
value3 = null;
|
|
if (value) {
|
|
ios = a0.ios;
|
|
iosAppId = value3 == ios ? value2 : ios.iosAppId;
|
|
if (value3 != iosAppId) {
|
|
object2 = {};
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
object2.url = 'https://apps.apple.com/app/id' + iosAppId;
|
|
parseInt = global.parseInt;
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
object2.appId = parseInt(iosAppId, 10);
|
|
r0 = object2;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
}
|
|
} else {
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
value = value.isIOS();
|
|
value3 = null;
|
|
if (value) {
|
|
ios = a0.ios;
|
|
iosAppId = value3 == ios ? value2 : ios.iosAppId;
|
|
if (value3 != iosAppId) {
|
|
object2 = {};
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
object2.url = 'https://apps.apple.com/app/id' + iosAppId;
|
|
parseInt = global.parseInt;
|
|
ios = a0.ios;
|
|
iosAppId = ios.iosAppId;
|
|
object2.appId = parseInt(iosAppId, 10);
|
|
r0 = object2;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function openAppStoreOverlay({url, appId}, a1) { // fn#74266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:1475, offset: 0x01d87e54, size: 161 bytes, params: 3, frame: 17
|
|
var value2;
|
|
const env0_0 = a1;
|
|
const openPlayStoreInlineInstall = (require(4078) /* metro dependency 4078: BrowserManager */).openPlayStoreInlineInstall;
|
|
const appStoreOverlayTelemetryManagerModule = require(9521) /* metro dependency 9521: AppStoreOverlayTelemetryManager */;
|
|
const env0_1 = appStoreOverlayTelemetryManagerModule.clearAppStoreOverlayOpen;
|
|
const env0_2 = appStoreOverlayTelemetryManagerModule.setAppStoreOverlayOpen;
|
|
if (appId != null) {
|
|
value2 = appId.toString();
|
|
}
|
|
openPlayStoreInlineInstall(url, appId, _fun74267).then(_fun74268).catch(_fun74270);
|
|
}
|
|
|
|
function supportedTaskPlatforms(a0) { // fn#74271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:2256, offset: 0x01d8805d, size: 195 bytes, params: 2, frame: 17
|
|
let r3 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasPlayOnDesktopTask({quest: a0}) || (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasStreamOnDesktopTask({quest: a0});
|
|
r3 = !r3 ? (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasAchievementInGameTask(a0) : r3;
|
|
const hasSomeConsoleTasks2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasSomeConsoleTasks(a0);
|
|
items = [];
|
|
if (r3) {
|
|
items.push(QuestTaskPlatform.DESKTOP);
|
|
}
|
|
if (hasSomeConsoleTasks2) {
|
|
items.push(QuestTaskPlatform.CONSOLE);
|
|
}
|
|
return items;
|
|
}
|
|
|
|
function isQuestSupportedOnWeb(a0) { // fn#74272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:2569, offset: 0x01d88120, size: 67 bytes, params: 2, frame: 15
|
|
let value = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
value = value.hasWatchVideoTasks(a0);
|
|
return value || (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasPlayActivityTask(a0);
|
|
}
|
|
|
|
function openAuthorizationConnectionModal({platformType, quest}, a1) { // fn#74273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:2804, offset: 0x01d88163, size: 355 bytes, params: 3, frame: 20
|
|
var object2;
|
|
var moduleValue3;
|
|
var captureAdUserAction;
|
|
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
|
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
|
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
|
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
|
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
|
[STEP_2_CLICKED_INTERNAL, 'open_authorization_connection_modal'])) {
|
|
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
|
captureAdUserAction = moduleValue3.captureAdUserAction;
|
|
object2 = {};
|
|
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
|
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
|
object2.adCreativeId = quest.id;
|
|
object2.questContentCTA = a1.ctaContent;
|
|
object2.surfaceId = a1.content;
|
|
object2.sourceQuestContent = a1.sourceQuestContent;
|
|
object2.impressionId = a1.impressionId;
|
|
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
|
} else {
|
|
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: quest.id,
|
|
questContent: a1.content, sourceQuestContent: a1.sourceQuestContent, questContentCTA: a1.ctaContent,
|
|
impressionId: a1.impressionId});
|
|
}
|
|
(importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: platformType,
|
|
location: a1.ctaContent});
|
|
}
|
|
|
|
function openGameLinkDirectly(a0, a1) { // fn#74275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:3689, offset: 0x01d8832b, size: 684 bytes, params: 3, frame: 26
|
|
var r5;
|
|
var r6;
|
|
var r2;
|
|
var r13;
|
|
var getDirectAppStoreLinkFromCtaBinding;
|
|
var moduleValue2;
|
|
var URL;
|
|
var prototype;
|
|
var value6;
|
|
var uRL;
|
|
var value7;
|
|
var searchParams;
|
|
var value8;
|
|
var error;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var getInlineStoreParamsFromCtaBinding;
|
|
var moduleValue5;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value2 = undefined;
|
|
const ctaLink = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getCtaLink(a0.config);
|
|
let ctaConfig = a0.config.ctaConfig;
|
|
const value4 = null;
|
|
if (value4 == ctaConfig) {
|
|
r5 = value4;
|
|
} else {
|
|
getDirectAppStoreLinkFromCtaBinding = getDirectAppStoreLinkFromCta;
|
|
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
|
r5 = getDirectAppStoreLinkFromCtaBinding({url: moduleValue2.getCtaLink(a0.config), android: ctaConfig.android,
|
|
ios: ctaConfig.ios});
|
|
}
|
|
const r10 = value4 == r5 ? ctaLink : r5;
|
|
try {
|
|
URL = global.URL;
|
|
prototype = URL.prototype;
|
|
value6 = Object.create(prototype, {constructor: {value: URL}});
|
|
uRL = new URL(r10);
|
|
value7 = uRL instanceof Object ? uRL : value6;
|
|
searchParams = value7.searchParams;
|
|
value8 = searchParams.has('dclid');
|
|
r6 = value8;
|
|
} catch (error) {
|
|
value9 = false;
|
|
r6 = value9;
|
|
}
|
|
if (r6) {
|
|
value10 = (require(491) /* metro dependency 491 */).v4();
|
|
try {
|
|
URL = global.URL;
|
|
prototype = URL.prototype;
|
|
value11 = Object.create(prototype, {constructor: {value: URL}});
|
|
uRL = new URL(r10);
|
|
value12 = uRL instanceof Object ? uRL : value11;
|
|
searchParams = value12.searchParams;
|
|
searchParams.set('dclid', value10);
|
|
value13 = value12.toString();
|
|
r6 = value13;
|
|
} catch (error) {
|
|
r6 = r10;
|
|
}
|
|
r2 = r6;
|
|
r13 = value10;
|
|
} else {
|
|
r2 = r10;
|
|
r13 = value2;
|
|
}
|
|
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: a0.id,
|
|
questContent: a1.content, questContentCTA: a1.ctaContent, questContentPosition: a1.position,
|
|
impressionId: a1.impressionId, sourceQuestContent: a1.sourceQuestContent, clickId: r13});
|
|
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
const dispatch = ComponentDispatch.dispatch;
|
|
const QUEST_GAME_LINK_OPENED = ComponentActions.QUEST_GAME_LINK_OPENED;
|
|
Reflect.apply(dispatch, ComponentDispatch, [QUEST_GAME_LINK_OPENED]);
|
|
const AppStoreBottomSheetOverlayFeatureGate = (require(9511) /* metro dependency 9511: experiments */).AppStoreBottomSheetOverlayFeatureGate;
|
|
const getConfig = AppStoreBottomSheetOverlayFeatureGate.getConfig;
|
|
if (Reflect.apply(getConfig, AppStoreBottomSheetOverlayFeatureGate, [{location: 'quest_open_game_link'}]).enabled) {
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(r2);
|
|
} else {
|
|
if (value4 == r5) {
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(r2);
|
|
return value2;
|
|
}
|
|
ctaConfig = a0.config.ctaConfig;
|
|
if (value4 == ctaConfig) {
|
|
r5 = value4;
|
|
} else {
|
|
getInlineStoreParamsFromCtaBinding = getInlineStoreParamsFromCta;
|
|
moduleValue5 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
|
r5 = getInlineStoreParamsFromCtaBinding({url: moduleValue5.getCtaLink(a0.config),
|
|
android: ctaConfig.android,
|
|
ios: ctaConfig.ios});
|
|
}
|
|
if (value4 == r5) {
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(r2);
|
|
return value2;
|
|
}
|
|
openAppStoreOverlay(r5, _fun74276);
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function openAdGameLinkDirectly({adContentId, adCreativeType, cta}, a1) { // fn#74277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:4920, offset: 0x01d88613, size: 312 bytes, params: 3, frame: 24
|
|
const env0_2 = a1;
|
|
const url = cta.url;
|
|
const directAppStoreLinkFromCta = getDirectAppStoreLinkFromCta(cta);
|
|
const r2 = directAppStoreLinkFromCta ?? url;
|
|
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackAdContentClicked({adContentId: adContentId,
|
|
adCreativeType: adCreativeType, questContent: a1.content, questContentCTA: a1.ctaContent,
|
|
questContentPosition: a1.position, impressionId: a1.impressionId, sourceQuestContent: a1.sourceQuestContent});
|
|
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
const dispatch = ComponentDispatch.dispatch;
|
|
const QUEST_GAME_LINK_OPENED = ComponentActions.QUEST_GAME_LINK_OPENED;
|
|
Reflect.apply(dispatch, ComponentDispatch, [QUEST_GAME_LINK_OPENED]);
|
|
const AppStoreBottomSheetOverlayFeatureGate = (require(9511) /* metro dependency 9511: experiments */).AppStoreBottomSheetOverlayFeatureGate;
|
|
const getConfig = AppStoreBottomSheetOverlayFeatureGate.getConfig;
|
|
if (Reflect.apply(getConfig, AppStoreBottomSheetOverlayFeatureGate, [{location: 'quest_open_game_link'}]).enabled) {
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(r2);
|
|
} else {
|
|
if (directAppStoreLinkFromCta == null) {
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(r2);
|
|
return undefined;
|
|
}
|
|
var inlineStoreParamsFromCta = getInlineStoreParamsFromCta(cta);
|
|
if (inlineStoreParamsFromCta == null) {
|
|
(importDefault(3847) /* metro dependency 3847: openURL */)(r2);
|
|
return undefined;
|
|
}
|
|
openAppStoreOverlay(inlineStoreParamsFromCta, _fun74278);
|
|
}
|
|
}
|
|
|
|
function openConsoleConnectionSettings({quest}, a1) { // fn#74279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:5671, offset: 0x01d8879a, size: 375 bytes, params: 3, frame: 19
|
|
var object2;
|
|
var moduleValue3;
|
|
var captureAdUserAction;
|
|
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
|
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
|
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
|
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
|
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
|
[STEP_2_CLICKED_INTERNAL, 'open_console_connection_settings'])) {
|
|
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
|
captureAdUserAction = moduleValue3.captureAdUserAction;
|
|
object2 = {};
|
|
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
|
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
|
object2.adCreativeId = quest.id;
|
|
object2.questContentCTA = a1.ctaContent;
|
|
object2.surfaceId = a1.content;
|
|
object2.sourceQuestContent = a1.sourceQuestContent;
|
|
object2.impressionId = a1.impressionId;
|
|
object2.questContentPosition = a1.position;
|
|
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
|
} else {
|
|
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: quest.id,
|
|
questContent: a1.content, questContentPosition: a1.position, questContentCTA: a1.ctaContent,
|
|
impressionId: a1.impressionId, sourceQuestContent: a1.sourceQuestContent});
|
|
}
|
|
const openUserSettings = (require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings;
|
|
const CONNECTIONS = UserSettingsSections.CONNECTIONS;
|
|
openUserSettings({screen: CONNECTIONS});
|
|
}
|
|
|
|
function openAddConsoleConnectionModal({quest}, a1) { // fn#74280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:6487, offset: 0x01d88911, size: 520 bytes, params: 3, frame: 19
|
|
var object2;
|
|
var moduleValue3;
|
|
var captureAdUserAction;
|
|
var value;
|
|
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
|
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
|
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
|
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
|
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
|
[STEP_2_CLICKED_INTERNAL, 'open_add_console_connection_modal'])) {
|
|
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
|
captureAdUserAction = moduleValue3.captureAdUserAction;
|
|
object2 = {};
|
|
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
|
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
|
object2.adCreativeId = quest.id;
|
|
object2.questContentCTA = a1.ctaContent;
|
|
object2.surfaceId = a1.content;
|
|
object2.sourceQuestContent = a1.sourceQuestContent;
|
|
object2.impressionId = a1.impressionId;
|
|
object2.questContentPosition = a1.position;
|
|
object2.questContentRowIndex = a1.rowIndex;
|
|
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
|
} else {
|
|
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: quest.id,
|
|
questContent: a1.content, questContentPosition: a1.position, questContentRowIndex: a1.rowIndex,
|
|
questContentCTA: a1.ctaContent, impressionId: a1.impressionId, sourceQuestContent: a1.sourceQuestContent});
|
|
}
|
|
const value2 = supportedConsoles(quest);
|
|
if (value2.length === 1) {
|
|
value = importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */;
|
|
object2 = {};
|
|
object2.platformType = value2.at(0);
|
|
return value(object2);
|
|
}
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
const dispatch = value.dispatch;
|
|
object2 = {type: 'CONNECTIONS_GRID_MODAL_SHOW', onComplete: onComplete};
|
|
const Set = global.Set;
|
|
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(value2);
|
|
object2.includedPlatformTypes = set instanceof Object ? set : value3;
|
|
object2.includeApplicationConnections = false;
|
|
Reflect.apply(dispatch, value, [object2]);
|
|
}
|
|
|
|
function openSingleConsoleConnectionModal({quest}, a1, a2) { // fn#74282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:7519, offset: 0x01d88b43, size: 384 bytes, params: 4, frame: 19
|
|
var object2;
|
|
var moduleValue3;
|
|
var captureAdUserAction;
|
|
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
|
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
|
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
|
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
|
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
|
[STEP_2_CLICKED_INTERNAL, 'open_single_console_connection_modal'])) {
|
|
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
|
captureAdUserAction = moduleValue3.captureAdUserAction;
|
|
object2 = {};
|
|
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
|
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
|
object2.adCreativeId = quest.id;
|
|
object2.questContentCTA = a1.ctaContent;
|
|
object2.surfaceId = a1.content;
|
|
object2.sourceQuestContent = a1.sourceQuestContent;
|
|
object2.impressionId = a1.impressionId;
|
|
object2.questContentPosition = a1.position;
|
|
object2.questContentRowIndex = a1.rowIndex;
|
|
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
|
} else {
|
|
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: quest.id,
|
|
questContent: a1.content, questContentPosition: a1.position, questContentRowIndex: a1.rowIndex,
|
|
questContentCTA: a1.ctaContent, impressionId: a1.impressionId, sourceQuestContent: a1.sourceQuestContent});
|
|
}
|
|
return (importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: a2});
|
|
}
|
|
|
|
function _fun74267(a0) { // fn#74267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:1673, offset: 0x01d87ef5, size: 92 bytes, params: 2, frame: 16
|
|
clearAppStoreOverlayOpen();
|
|
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
|
|
require(QUEST_APP_STORE_OVERLAY_CLOSED, env0_3, a0);
|
|
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
const dispatch = ComponentDispatch.dispatch;
|
|
const QUEST_APP_STORE_OVERLAY_FINISHED = ComponentActions.QUEST_APP_STORE_OVERLAY_FINISHED;
|
|
Reflect.apply(dispatch, ComponentDispatch, [QUEST_APP_STORE_OVERLAY_FINISHED]);
|
|
}
|
|
|
|
function _fun74268(a0) { // fn#74268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:1802, offset: 0x01d87f51, size: 152 bytes, params: 2, frame: 15
|
|
var environment;
|
|
var value2;
|
|
var ComponentDispatch;
|
|
var value3;
|
|
if (a0) {
|
|
setAppStoreOverlayOpen({trackOverlayEvent: trackOverlayEvent});
|
|
value3 = environment.__proto__;
|
|
require(AnalyticEvents.QUEST_APP_STORE_OVERLAY_OPEN_SUCCEEDED, env0_3);
|
|
} else {
|
|
clearAppStoreOverlayOpen();
|
|
value2 = environment.__proto__;
|
|
require(AnalyticEvents.QUEST_APP_STORE_OVERLAY_OPEN_FAILED, env0_3);
|
|
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
ComponentDispatch.dispatch(ComponentActions.QUEST_APP_STORE_OVERLAY_FINISHED);
|
|
}
|
|
}
|
|
|
|
function _fun74270() { // fn#74270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:2026, offset: 0x01d88005, size: 88 bytes, params: 1, frame: 14
|
|
clearAppStoreOverlayOpen();
|
|
const QUEST_APP_STORE_OVERLAY_OPEN_FAILED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_OPEN_FAILED;
|
|
require(QUEST_APP_STORE_OVERLAY_OPEN_FAILED, env0_3);
|
|
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
const dispatch = ComponentDispatch.dispatch;
|
|
const QUEST_APP_STORE_OVERLAY_FINISHED = ComponentActions.QUEST_APP_STORE_OVERLAY_FINISHED;
|
|
Reflect.apply(dispatch, ComponentDispatch, [QUEST_APP_STORE_OVERLAY_FINISHED]);
|
|
}
|
|
|
|
function _fun74276(a0, a1, a2) { // fn#74276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:4826, offset: 0x01d885d7, size: 60 bytes, params: 4, frame: 19
|
|
let value = environment.__proto__;
|
|
value = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
|
return value.trackAppStoreOverlayEvent(env0_0, require, a1, a0, a2);
|
|
}
|
|
|
|
function _fun74278(a0, a1, a2) { // fn#74278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:5530, offset: 0x01d8874b, size: 79 bytes, params: 4, frame: 19
|
|
const value = environment.__proto__;
|
|
return (require(7110) /* metro dependency 7110: AnalyticsActions */).trackAdContentAppStoreOverlayEvent({adContentId: adContentId,
|
|
adCreativeType: adCreativeType}, require, a1, a0, a2);
|
|
}
|
|
|
|
function openAddConsoleConnectionModalOnComplete(a0) { // fn#74281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:7386, owner: openAddConsoleConnectionModal.onComplete, offset: 0x01d88b19, size: 42 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
return (importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: a0});
|
|
}
|
|
|
|
function trackOverlayEvent(a0, a1) { // fn#74269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9706:1830, offset: 0x01d87fe9, size: 28 bytes, params: 3, frame: 15
|
|
return require(a0, env1_3, a1);
|
|
}
|
|
|