// Module ID: 7718 // Function ID: 7719 // Name: trackQuestEvent // Dependencies: [5, 7719, 1347, 7703, 1074, 7461, 7721, 7699, 7722, 7724, 7728, 5451, 4740, 1242, 7729, 7677, 1115, 1256, 7734, 5447, 2] // Exports: trackAdContentAppStoreOverlayEvent, trackAdContentClicked, trackAdContentQuestBarOrDockModeChange, trackAppStoreOverlayEvent, trackBountyAutoScrollDismissed, trackBountyCarouselEmptyStateViewed, trackBountyCarouselScroll, trackBountyVerticalScroll, trackQuestContentClicked, trackQuestContentQuestBarOrDockModeChange, trackQuestEmbedFallbackViewed, trackQuestHomeCarouselScroll, trackQuestHomeOrbShopCarouselScroll, trackQuestHomeOrbShopCarouselViewed, trackQuestHomeSearchClosed, trackQuestHomeSearchEntered, trackQuestHomeSearchQuerySubmitted // Module 7718 (trackQuestEvent) import expandEventPropertiesDefault from "expandEventProperties" /* 1242 */; import collectGuildAnalyticsMetadataDefault from "collectGuildAnalyticsMetadata" /* 4740 */; import QuestsVisibleMessagesChangedSource from "QuestsVisibleMessagesChangedSource" /* 5447 */; import trackHeartbeat from "trackHeartbeat" /* 7461 */; import getQuestDeliveryDataForPlacement from "getQuestDeliveryDataForPlacement" /* 7699 */; import getOrRefreshAdSession from "getOrRefreshAdSession" /* 7721 */; import isSponsoredPlayQuest from "isSponsoredPlayQuest" /* 7722 */; import getApplicationIdsByTaskTypes from "getApplicationIdsByTaskTypes" /* 7724 */; import getQuestContentName from "getQuestContentName" /* 7728 */; import closure_3 from "asyncGeneratorStep" /* 5 */; import closure_4 from "initialize" /* 7719 */; import closure_5 from "refreshSourceMapCookie" /* 1347 */; import closure_6 from "initializeState" /* 7703 */; import { AnalyticEvents } from "ME" /* 1074 */; import set from "set" /* 2 */; require = arg1; function trackQuestEvent(sourceQuestContent) { ({ event, properties, trackGuildAndChannelMetadata, shouldExtendSession } = sourceQuestContent); if (shouldExtendSession === undefined) { shouldExtendSession = false; } sourceQuestContent = sourceQuestContent.sourceQuestContent; const quests = quest.quests; const value = quests.get(sourceQuestContent.questId); if (null != value) { let obj = { quest_id: null, quest_type: null, application_ids: null, quest_status: null }; obj[0] = value.id; obj[1] = isSponsoredPlayQuest.getQuestType(value.config); const obj12 = isSponsoredPlayQuest; let allApplicationIds = getApplicationIdsByTaskTypes.getAllApplicationIds(value); if (allApplicationIds == null) { allApplicationIds = []; } obj[2] = allApplicationIds; let tmp24Result = tmp24(7728); obj[3] = tmp24Result.getQuestStatus(value); const id = value.id; const QUEST = tmp24(5451).AdCreativeType.QUEST; tmp24Result = tmp24(7721); let uuid = tmp24Result.getOrRefreshAdSession(shouldExtendSession).uuid; const obj13 = getApplicationIdsByTaskTypes; const adDecisionData = getQuestDeliveryDataForPlacement.getAdDecisionData(id, sourceQuestContent); obj = { client_ad_session_id: null, billing_session_id: null, ad_content_id: null }; obj[0] = uuid; const tmp24Result1 = getQuestDeliveryDataForPlacement; if (!tmp24Result2.isBillableQuestContent(sourceQuestContent, QUEST)) { const activeSessionUnsafe = tmp24(7461).getActiveSessionUnsafe(); uuid = undefined; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } const tmp24Result3 = tmp24(7461); } obj[1] = uuid; obj[2] = id; const merged = Object.assign(adDecisionData); let creative_type = adDecisionData.creative_type; if (creative_type == null) { creative_type = QUEST; } obj1 = {}; obj.creative_type = creative_type; const merged1 = Object.assign(obj); const merged2 = Object.assign(obj); const merged3 = Object.assign(properties); if (trackGuildAndChannelMetadata === undefined) { trackGuildAndChannelMetadata = false; } if (!closure_4.displayTools) { const isLoggingAnalyticsEvents = closure_5.isLoggingAnalyticsEvents; if (!value.preview) { const hasItem = set.has(event); if (trackGuildAndChannelMetadata) { let tmp21Result = tmp21(4740); tmp21Result.trackWithMetadata(event, obj1, hasItem); } else { tmp21Result = tmp21(1242); const obj2 = { flush: null }; obj2[0] = hasItem; tmp21Result.track(event, obj1, obj2); } } } tmp24Result2 = getQuestDeliveryDataForPlacement; } } function trackAdContentEvent(sourceQuestContent) { ({ adContentId, relatedQuestId, adCreativeType, event, properties, trackGuildAndChannelMetadata, shouldExtendSession } = sourceQuestContent); if (shouldExtendSession === undefined) { shouldExtendSession = false; } sourceQuestContent = sourceQuestContent.sourceQuestContent; let quest = null; if (null != relatedQuestId) { quest = quest.getQuest(relatedQuestId); } let obj = getOrRefreshAdSession; let uuid = obj.getOrRefreshAdSession(shouldExtendSession).uuid; obj1 = getQuestDeliveryDataForPlacement; const adDecisionData = obj1.getAdDecisionData(adContentId, sourceQuestContent); obj = { client_ad_session_id: uuid, billing_session_id: null, ad_content_id: null }; let obj3 = getQuestDeliveryDataForPlacement; if (!obj3.isBillableQuestContent(sourceQuestContent, adCreativeType)) { let tmp3Result = tmp3(7461); const activeSessionUnsafe = tmp3Result.getActiveSessionUnsafe(); uuid = undefined; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } } obj[1] = uuid; obj[2] = adContentId; const merged = Object.assign(adDecisionData); let creative_type = adDecisionData.creative_type; if (creative_type == null) { creative_type = adCreativeType; } obj = { creative_type }; const merged1 = Object.assign(obj); tmp3Result = tmp3(7699); let adMetadataSealed = tmp3Result.getAdMetadataSealed(sourceQuestContent, adContentId); if (adMetadataSealed == null) { adMetadataSealed = null; } obj.metadata_sealed = adMetadataSealed; let adTrafficMetadataSealed = getQuestDeliveryDataForPlacement.getAdTrafficMetadataSealed(sourceQuestContent, undefined, adContentId); if (adTrafficMetadataSealed == null) { adTrafficMetadataSealed = null; } obj.traffic_metadata_sealed = adTrafficMetadataSealed; if (null != relatedQuestId) { obj1 = { quest_id: null, quest_status: null }; obj1[0] = relatedQuestId; let questStatus = null; if (null != quest) { questStatus = tmp3(7728).getQuestStatus(quest); const tmp3Result2 = tmp3(7728); } obj1[1] = questStatus; let obj2 = obj1; } else { obj2 = {}; } obj3 = {}; const merged2 = Object.assign(obj2); const merged3 = Object.assign(obj); const merged4 = Object.assign(properties); if (trackGuildAndChannelMetadata === undefined) { trackGuildAndChannelMetadata = false; } if (!closure_4.displayTools) { const isLoggingAnalyticsEvents = closure_5.isLoggingAnalyticsEvents; const hasItem = set.has(event); if (trackGuildAndChannelMetadata) { let tmp20Result = tmp20(4740); tmp20Result.trackWithMetadata(event, obj3, hasItem); } else { tmp20Result = tmp20(1242); const obj4 = { flush: null }; obj4[0] = hasItem; tmp20Result.track(event, obj3, obj4); } } } function getCommonClickEventProperties(arg0) { const self = this; const apply = _getCommonClickEventProperties.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _getCommonClickEventProperties() { const self = this; const tmp = callback((arg0) => { closure_0 = arg0; c4 = 0; c5 = 0; const iter = (function*(arg0) { if (c5 === 2) { c5 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c5 = 2; if (0 === c4) { if (arg0 === 1) { c5 = 3; throw arg1; } else if (arg0 === 2) { c5 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c3 = tmp5; dependencyMap = tmp2; let callback; let callback2; dependencyMap = undefined; c3 = undefined; c4 = undefined; c5 = undefined; ({ questContent: c0, questContentPosition: closure_1, questContentRowIndex: c2, questContentCTA: c3, impressionId: c4, clickId: c5 } = callback); closure_6 = undefined; c4 = 1; c5 = 1; return { value: "PX_16", done: true }; } } else if (1 === tmp5) { if (arg0 === 1) { c5 = 3; throw arg1; } else if (arg0 === 2) { c5 = 3; obj1 = { value: null, done: true }; obj1[0] = arg1; return obj1; } else { let obj5 = callback(7729); c4 = 2; c5 = 1; let obj2 = { value: null, done: false }; obj2[0] = obj5.getAdUser(callback(7728).getQuestContentName(callback)); return obj2; } } else if (arg0 === 1) { c5 = 3; throw arg1; } else if (arg0 === 2) { c5 = 3; const obj3 = { value: null, done: true }; obj3[0] = arg1; return obj3; } else { closure_6 = arg1; const obj4 = {}; const merged = Object.assign(callback(7728).getContentProperties(callback, callback2, dependencyMap)); const merged1 = Object.assign(callback2(7677)()); obj4.cta_name = c3; obj4.impression_id = c4; let advertisingId = null; if (null != closure_6) { obj = callback(1115); advertisingId = null; if (obj.isIOS()) { advertisingId = closure_6.advertisingId; } } obj4.apple_advertising_id = advertisingId; let advertisingId1 = null; if (null != closure_6) { obj1 = callback(1115); advertisingId1 = null; if (obj1.isAndroid()) { advertisingId1 = closure_6.advertisingId; } } obj4.android_advertising_id = advertisingId1; callback2 = c5; if (c5 == null) { obj2 = callback(1256); callback2 = obj2.v4(); } obj4.click_id = callback2; c5 = 3; obj5 = { value: null, done: true }; obj5[0] = obj4; return obj5; } } catch (tmp33) { c5 = tmp; throw tmp33; } } })(); iter.next(); return iter; }); closure_12 = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _trackQuestContentClicked() { const self = this; const tmp = callback((arg0) => { closure_0 = arg0; c9 = 0; c10 = 0; const iter = (function*(arg0) { if (c10 === 2) { c10 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c10 = 2; if (0 === adTrafficMetadataSealed) { if (arg0 === 1) { c10 = 3; throw arg1; } else if (arg0 === 2) { c10 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c6 = tmp5; let constants = tmp2; let callback; c1 = undefined; dependencyMap = undefined; c3 = undefined; closure_4 = undefined; obj2 = undefined; c6 = undefined; constants = undefined; let callback2; ({ questId: c0, questContent: c1, questContentCTA: c2, questContentPosition: c3, questContentRowIndex: closure_4, impressionId: obj2, clickId: c6, trackGuildAndChannelMetadata: c7, sourceQuestContent: closure_8 } = callback); adTrafficMetadataSealed = undefined; adTrafficMetadataSealed = 1; c10 = 1; return { value: "PX_16", done: true }; } } else if (1 === tmp5) { if (arg0 === 1) { c10 = 3; throw arg1; } else if (arg0 === 2) { c10 = 3; obj1 = { value: null, done: true }; obj1[0] = arg1; return obj1; } else { adTrafficMetadataSealed = callback(7699).getAdTrafficMetadataSealed(callback2, callback); callback2 = adTrafficMetadataSealed; obj2 = { questId: callback, event: constants.QUEST_CONTENT_CLICKED }; closure_4 = {}; const obj3 = { questContent: null, questContentPosition: null, questContentRowIndex: null, questContentCTA: null, impressionId: null, clickId: null }; obj3[0] = c1; obj3[1] = c3; obj3[2] = closure_4; obj3[3] = dependencyMap; obj3[4] = obj2; obj3[5] = c6; adTrafficMetadataSealed = 2; c10 = 1; const obj4 = { value: null, done: false }; obj4[0] = callback3(obj3); return obj4; } } else if (arg0 === 1) { c10 = 3; throw arg1; } else if (arg0 === 2) { c10 = 3; const obj5 = { value: null, done: true }; obj5[0] = arg1; return obj5; } else { const merged = Object.assign(arg1); const adMetadataSealed = callback(7699).getAdMetadataSealed(callback2); c1 = adMetadataSealed; if (adMetadataSealed == null) { c1 = null; } closure_4.metadata_sealed = c1; dependencyMap = adTrafficMetadataSealed; if (adTrafficMetadataSealed == null) { dependencyMap = null; } closure_4.traffic_metadata_sealed = dependencyMap; obj = callback(7734); const currentQuestHomeSearchSession = obj.getCurrentQuestHomeSearchSession(); let uuid; if (currentQuestHomeSearchSession != null) { uuid = currentQuestHomeSearchSession.uuid; } c3 = uuid; if (uuid == null) { c3 = null; } closure_4.search_session_id = c3; obj2.properties = closure_4; obj2.trackGuildAndChannelMetadata = constants; obj1 = callback(7699); obj2.shouldExtendSession = obj1.isBillableQuestContent(c1); obj2.sourceQuestContent = callback2; callback2(obj2); c10 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp29) { c10 = tmp; throw tmp29; } } })(); iter.next(); return iter; }); closure_13 = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _trackAdContentClicked() { const self = this; const tmp = callback((arg0) => { closure_0 = arg0; c5 = 0; c6 = 0; const iter = (function*(arg0, properties) { if (c6 === 2) { c6 = 3; HermesBuiltin.throwTypeError(); } else if (tmp4 === 3) { if (arg0 === 1) { throw properties; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = properties; return obj; } else { return { value: "HermesInternal", done: null }; } } else { try { c6 = 2; if (0 === c5) { if (arg0 === 1) { c6 = 3; throw properties; } else if (arg0 === 2) { c6 = 3; obj = { value: null, done: true }; obj[0] = properties; return obj; } else { c3 = tmp5; c4 = tmp2; let callback; obj2 = undefined; dependencyMap = undefined; c3 = undefined; c4 = undefined; c5 = undefined; c6 = undefined; let constants; c8 = undefined; c9 = undefined; ({ adContentId: c0, relatedQuestId: obj2, adCreativeType: closure_2, questContent: c3, questContentCTA: c4, questContentPosition: c5, questContentRowIndex: c6, impressionId: c7, trackGuildAndChannelMetadata: c8, sourceQuestContent: c9 } = callback); c5 = 1; c6 = 1; return { value: "PX_16", done: true }; } } else if (1 === tmp5) { if (arg0 === 1) { c6 = 3; throw properties; } else if (arg0 === 2) { c6 = 3; obj1 = { value: null, done: true }; obj1[0] = properties; return obj1; } else { dependencyMap = closure_10; obj2 = { adContentId: callback }; obj2.relatedQuestId = obj2; obj2.adCreativeType = dependencyMap; obj2.event = constants.QUEST_CONTENT_CLICKED; const obj3 = { questContent: null, questContentPosition: null, questContentRowIndex: null, questContentCTA: null, impressionId: null }; obj3[0] = c3; obj3[1] = c5; obj3[2] = c6; obj3[3] = c4; obj3[4] = constants; c5 = 2; c6 = 1; const obj4 = { value: null, done: false }; obj4[0] = callback2(obj3); return obj4; } } else if (arg0 === 1) { c6 = 3; throw properties; } else if (arg0 === 2) { c6 = 3; const obj5 = { value: null, done: true }; obj5[0] = properties; return obj5; } else { obj2.properties = properties; obj2.trackGuildAndChannelMetadata = c8; obj = callback(7699); obj2.shouldExtendSession = obj.isBillableQuestContent(c3); obj2.sourceQuestContent = c9; dependencyMap(obj2); c6 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp16) { c6 = tmp; throw tmp16; } } })(); iter.next(); return iter; }); closure_14 = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } const items = [, ]; ({ QUEST_CONTENT_VIEWED: arr[0], QUEST_CONTENT_CLICKED: arr[1] } = AnalyticEvents); let set = new Set(items); const result = set.fileFinishedImporting("modules/quests/lib/analytics/AnalyticsActions.tsx"); export { trackQuestEvent }; export const AppStoreOverlayVariant = { NATIVE: "native", CUSTOM: "custom" }; export const AppStoreOverlaySurfaces = { MAIN_CTA: "main_cta", RATING_STAT: "rating_stat" }; export const trackAppStoreOverlayEvent = function trackAppStoreOverlayEvent(arg0) { ({ quest, trackingCtx, event, timeSpentMs, overlaySurface } = arg0); let obj = { content_name: null, cta_name: null, impression_id: null, source_content_name: null, app_id: null, content_position: null, overlay_variant: null }; ({ inlineStoreAppId, overlayVariant } = arg0); obj1 = getQuestContentName; obj[0] = obj1.getQuestContentName(trackingCtx.content); ({ ctaContent: obj[1], impressionId: obj[2] } = trackingCtx); let obj2 = getQuestContentName; obj[3] = obj2.getQuestContentName(trackingCtx.sourceQuestContent); obj[4] = inlineStoreAppId; obj[5] = trackingCtx.position; obj[6] = overlayVariant; if (AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED === event) { obj = { questId: null, event: null, properties: null, sourceQuestContent: null }; obj[0] = quest.id; obj[1] = event; obj = {}; const merged = Object.assign(obj); if (timeSpentMs == null) { timeSpentMs = null; } obj.time_spent_ms = timeSpentMs; obj[2] = obj; obj[3] = trackingCtx.sourceQuestContent; trackQuestEvent(obj); const tmp18 = trackQuestEvent; } else if (tmp.QUEST_APP_STORE_OVERLAY_RETURNED === event) { obj1 = { questId: null, event: null, properties: null, sourceQuestContent: null }; obj1[0] = quest.id; obj1[1] = event; obj2 = {}; const merged1 = Object.assign(obj); let tmp16 = timeSpentMs; if (timeSpentMs == null) { tmp16 = null; } obj2.time_spent_ms = tmp16; if (overlaySurface == null) { overlaySurface = null; } obj2.overlay_surface = overlaySurface; obj1[2] = obj2; obj1[3] = trackingCtx.sourceQuestContent; trackQuestEvent(obj1); const tmp11 = trackQuestEvent; } else if (tmp.QUEST_APP_STORE_OVERLAY_BACKGROUNDED === event) { const obj3 = { questId: null, event: null, properties: null, sourceQuestContent: null }; obj3[0] = quest.id; obj3[1] = event; const obj4 = {}; const merged2 = Object.assign(obj); let tmp9 = overlaySurface; if (overlaySurface == null) { tmp9 = null; } obj4.overlay_surface = tmp9; obj3[2] = obj4; obj3[3] = trackingCtx.sourceQuestContent; trackQuestEvent(obj3); const tmp4 = trackQuestEvent; } else if (tmp.QUEST_APP_STORE_OVERLAY_OPEN_SUCCEEDED === event) { const obj5 = { questId: null, event: null, properties: null, sourceQuestContent: null }; obj5[0] = quest.id; obj5[1] = event; obj5[2] = obj; obj5[3] = trackingCtx.sourceQuestContent; trackQuestEvent(obj5); } }; export const trackAdContentAppStoreOverlayEvent = function trackAdContentAppStoreOverlayEvent(arg0) { ({ adContentId, adCreativeType, trackingCtx, event, timeSpentMs, overlaySurface } = arg0); let obj = { content_name: null, cta_name: null, impression_id: null, source_content_name: null, app_id: null, content_position: null, overlay_variant: null }; ({ inlineStoreAppId, overlayVariant } = arg0); obj1 = getQuestContentName; obj[0] = obj1.getQuestContentName(trackingCtx.content); ({ ctaContent: obj[1], impressionId: obj[2] } = trackingCtx); let obj2 = getQuestContentName; obj[3] = obj2.getQuestContentName(trackingCtx.sourceQuestContent); obj[4] = inlineStoreAppId; obj[5] = trackingCtx.position; obj[6] = overlayVariant; if (AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED === event) { obj = { adContentId: null, adCreativeType: null, event: null, properties: null, sourceQuestContent: null }; obj[0] = adContentId; obj[1] = adCreativeType; obj[2] = event; obj = {}; const merged = Object.assign(obj); if (timeSpentMs == null) { timeSpentMs = null; } obj.time_spent_ms = timeSpentMs; obj[3] = obj; obj[4] = trackingCtx.sourceQuestContent; trackAdContentEvent(obj); const tmp18 = trackAdContentEvent; } else if (tmp.QUEST_APP_STORE_OVERLAY_RETURNED === event) { obj1 = { adContentId: null, adCreativeType: null, event: null, properties: null, sourceQuestContent: null }; obj1[0] = adContentId; obj1[1] = adCreativeType; obj1[2] = event; obj2 = {}; const merged1 = Object.assign(obj); let tmp16 = timeSpentMs; if (timeSpentMs == null) { tmp16 = null; } obj2.time_spent_ms = tmp16; if (overlaySurface == null) { overlaySurface = null; } obj2.overlay_surface = overlaySurface; obj1[3] = obj2; obj1[4] = trackingCtx.sourceQuestContent; trackAdContentEvent(obj1); const tmp11 = trackAdContentEvent; } else if (tmp.QUEST_APP_STORE_OVERLAY_BACKGROUNDED === event) { const obj3 = { adContentId: null, adCreativeType: null, event: null, properties: null, sourceQuestContent: null }; obj3[0] = adContentId; obj3[1] = adCreativeType; obj3[2] = event; const obj4 = {}; const merged2 = Object.assign(obj); let tmp9 = overlaySurface; if (overlaySurface == null) { tmp9 = null; } obj4.overlay_surface = tmp9; obj3[3] = obj4; obj3[4] = trackingCtx.sourceQuestContent; trackAdContentEvent(obj3); const tmp4 = trackAdContentEvent; } else if (tmp.QUEST_APP_STORE_OVERLAY_OPEN_SUCCEEDED === event) { const obj5 = { adContentId: null, adCreativeType: null, event: null, properties: null, sourceQuestContent: null }; obj5[0] = adContentId; obj5[1] = adCreativeType; obj5[2] = event; obj5[3] = obj; obj5[4] = trackingCtx.sourceQuestContent; trackAdContentEvent(obj5); } }; export { trackAdContentEvent }; export { getCommonClickEventProperties }; export const trackQuestContentClicked = function trackQuestContentClicked(arg0) { const self = this; const apply = _trackQuestContentClicked.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; }; export const trackAdContentClicked = function trackAdContentClicked(arg0) { const self = this; const apply = _trackAdContentClicked.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; }; export const trackBountyCarouselScroll = function trackBountyCarouselScroll(result) { const questContent = result.questContent; ({ scrollingType, scrollingDirection, carouselPosition } = result); let obj = getOrRefreshAdSession; let uuid = obj.getOrRefreshAdSession().uuid; obj = { client_ad_session_id: uuid, billing_session_id: null, scrolling_type: null, scrolling_direction: null, carousel_position: null, content_name: null }; const obj2 = expandEventPropertiesDefault; if (!obj4.isBillableQuestContent(questContent)) { let tmpResult = tmp(7461); const activeSessionUnsafe = tmpResult.getActiveSessionUnsafe(); uuid = undefined; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } } obj[1] = uuid; obj[2] = scrollingType; obj[3] = scrollingDirection; obj[4] = carouselPosition; tmpResult = tmp(7728); obj[5] = tmpResult.getQuestContentName(questContent); obj2.track(AnalyticEvents.BOUNTY_CAROUSEL_SCROLL, obj); }; export const trackQuestHomeOrbShopCarouselViewed = function trackQuestHomeOrbShopCarouselViewed(arg0) { ({ obtainableOrbRewards, carouselSize, isPlaceholderCarousel } = arg0); expandEventPropertiesDefault.track(AnalyticEvents.QUEST_HOME_ORB_SHOP_CAROUSEL_VIEWED, { obtainable_orb_rewards: obtainableOrbRewards, carousel_size: carouselSize, is_placeholder_carousel: isPlaceholderCarousel }); }; export const trackQuestHomeOrbShopCarouselScroll = function trackQuestHomeOrbShopCarouselScroll(arg0) { ({ scrollingDirection, carouselPosition, carouselSize } = arg0); expandEventPropertiesDefault.track(AnalyticEvents.QUEST_HOME_ORB_SHOP_CAROUSEL_SCROLL, { scrolling_direction: scrollingDirection, carousel_position: carouselPosition, carousel_size: carouselSize }); }; export const trackBountyCarouselEmptyStateViewed = function trackBountyCarouselEmptyStateViewed(arg0) { let obj = getOrRefreshAdSession; let uuid = obj.getOrRefreshAdSession().uuid; obj = { client_ad_session_id: uuid, billing_session_id: null, reason: null }; const obj2 = expandEventPropertiesDefault; const tmp = require; if (!obj4.isBillableQuestContent(QuestsVisibleMessagesChangedSource.QuestContent.QUEST_HOME_MOBILE_CAROUSEL)) { const activeSessionUnsafe = trackHeartbeat.getActiveSessionUnsafe(); uuid = undefined; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } const tmpResult = trackHeartbeat; } obj[1] = uuid; obj[2] = arg0; obj2.track(AnalyticEvents.BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED, obj); }; export const trackBountyVerticalScroll = function trackBountyVerticalScroll(result) { ({ scrollingType, scrollingDirection, verticalScrollingPosition, scrollSessionId, timeWatchedPreScrollMs } = result); let obj = getOrRefreshAdSession; obj = { client_ad_session_id: obj.getOrRefreshAdSession().uuid, billing_session_id: null, scrolling_type: null, scrolling_direction: null, vertical_scrolling_position: null, scroll_session_id: null, time_watched_pre_scroll_ms: null }; const obj2 = expandEventPropertiesDefault; const activeSessionUnsafe = trackHeartbeat.getActiveSessionUnsafe(); let uuid; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } obj[1] = uuid; obj[2] = scrollingType; obj[3] = scrollingDirection; obj[4] = verticalScrollingPosition; obj[5] = scrollSessionId; obj[6] = timeWatchedPreScrollMs; obj2.track(AnalyticEvents.BOUNTY_VERTICAL_SCROLL, obj); }; export const trackBountyAutoScrollDismissed = function trackBountyAutoScrollDismissed(arg0) { ({ verticalScrollingPosition, scrollSessionId } = arg0); let obj = getOrRefreshAdSession; obj = { client_ad_session_id: obj.getOrRefreshAdSession().uuid, billing_session_id: null, vertical_scrolling_position: null, scroll_session_id: null }; const obj2 = expandEventPropertiesDefault; const activeSessionUnsafe = trackHeartbeat.getActiveSessionUnsafe(); let uuid; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } obj[1] = uuid; obj[2] = verticalScrollingPosition; obj[3] = scrollSessionId; obj2.track(AnalyticEvents.BOUNTY_AUTO_SCROLL_DISMISSED, obj); }; export const trackQuestHomeCarouselScroll = function trackQuestHomeCarouselScroll(questContent) { questContent = questContent.questContent; ({ scrollingType, scrollingDirection, scrollWindowStartIndex, scrollWindowEndIndex, scrollWindowSize, carouselSize } = questContent); let obj = getOrRefreshAdSession; let uuid = obj.getOrRefreshAdSession().uuid; obj = { scrolling_type: scrollingType, client_ad_session_id: uuid, billing_session_id: null, scrolling_direction: null, scroll_window_start_index: null, scroll_window_end_index: null, scroll_window_size: null, content_name: null, content_id: null, carousel_size: null }; const obj2 = expandEventPropertiesDefault; if (!obj4.isBillableQuestContent(questContent)) { let tmpResult = tmp(7461); const activeSessionUnsafe = tmpResult.getActiveSessionUnsafe(); uuid = undefined; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } } obj[2] = uuid; obj[3] = scrollingDirection; obj[4] = scrollWindowStartIndex; obj[5] = scrollWindowEndIndex; obj[6] = scrollWindowSize; tmpResult = tmp(7728); obj[7] = tmpResult.getQuestContentName(questContent); obj[8] = questContent; obj[9] = carouselSize; obj2.track(AnalyticEvents.QUEST_HOME_CAROUSEL_SCROLL, obj); }; export const trackQuestHomeSearchEntered = function trackQuestHomeSearchEntered(searchSessionId) { let obj = getOrRefreshAdSession; obj = { client_ad_session_id: obj.getOrRefreshAdSession().uuid, billing_session_id: null, search_session_id: null }; const obj2 = expandEventPropertiesDefault; const activeSessionUnsafe = trackHeartbeat.getActiveSessionUnsafe(); let uuid; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } obj[1] = uuid; obj[2] = searchSessionId.searchSessionId; obj2.track(AnalyticEvents.QUEST_HOME_SEARCH_ENTERED, obj); }; export const trackQuestHomeSearchClosed = function trackQuestHomeSearchClosed(arg0) { ({ searchSessionId, searchSessionDurationMs } = arg0); let obj = getOrRefreshAdSession; obj = { client_ad_session_id: obj.getOrRefreshAdSession().uuid, billing_session_id: null, search_session_id: null, search_session_duration_ms: null }; const obj2 = expandEventPropertiesDefault; const activeSessionUnsafe = trackHeartbeat.getActiveSessionUnsafe(); let uuid; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } obj[1] = uuid; obj[2] = searchSessionId; obj[3] = searchSessionDurationMs; obj2.track(AnalyticEvents.QUEST_HOME_SEARCH_CLOSED, obj); }; export const trackQuestHomeSearchQuerySubmitted = function trackQuestHomeSearchQuerySubmitted(arg0) { ({ searchSessionId, searchQuery, searchQueryLength, resultsCount, hasResults } = arg0); let obj = getOrRefreshAdSession; obj = { client_ad_session_id: obj.getOrRefreshAdSession().uuid, billing_session_id: null, search_session_id: null, search_query: null, search_query_length: null, results_count: null, has_results: null }; const obj2 = expandEventPropertiesDefault; const activeSessionUnsafe = trackHeartbeat.getActiveSessionUnsafe(); let uuid; if (activeSessionUnsafe != null) { uuid = activeSessionUnsafe.uuid; } if (uuid == null) { uuid = null; } obj[1] = uuid; obj[2] = searchSessionId; obj[3] = searchQuery; obj[4] = searchQueryLength; obj[5] = resultsCount; obj[6] = hasResults; obj2.track(AnalyticEvents.QUEST_HOME_SEARCH_QUERY_SUBMITTED, obj); }; export const trackQuestContentQuestBarOrDockModeChange = function trackQuestContentQuestBarOrDockModeChange(arg0) { ({ questContent, sourceQuestContent, questId, mode, prevMode } = arg0); let obj = getQuestContentName; const contentProperties = obj.getContentProperties(questContent); obj = { questId, event: AnalyticEvents.QUEST_BAR_MODE_CHANGED, properties: obj, sourceQuestContent }; obj = { content_id: contentProperties.content_id, content_name: contentProperties.content_name, mode, previous_mode: prevMode }; trackQuestEvent(obj); }; export const trackAdContentQuestBarOrDockModeChange = function trackAdContentQuestBarOrDockModeChange(arg0) { ({ adContentId, adCreativeType, questContent, sourceQuestContent, mode, prevMode } = arg0); let obj = getQuestContentName; const contentProperties = obj.getContentProperties(questContent); obj = { adContentId, adCreativeType, event: AnalyticEvents.QUEST_BAR_MODE_CHANGED, properties: obj, sourceQuestContent }; obj = { content_id: contentProperties.content_id, content_name: contentProperties.content_name, mode, previous_mode: prevMode }; trackAdContentEvent(obj); }; export const trackQuestEmbedFallbackViewed = function trackQuestEmbedFallbackViewed(questId, EXCLUDED_QUEST) { let obj = collectGuildAnalyticsMetadataDefault; obj = { quest_id: questId, reason: EXCLUDED_QUEST }; obj.trackWithMetadata(AnalyticEvents.QUEST_EMBED_FALLBACK_VIEWED, obj); };