Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,33 @@
/* Metro module 13628; source: modules/quests/native/VideoQuestModal/hooks/useVideoExternallyPaused.tsx; dependencies: [3849, 8812, 4007, 9522, 566, 4497, 477, 2] */
function _fun104077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13825:6, offset: 0x02283907, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/hooks/useVideoExternallyPaused.tsx');
exports.useVideoExternallyPaused = useVideoExternallyPaused;
}
function useVideoExternallyPaused(a0, a1) { // fn#104078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13825:239, offset: 0x02283979, size: 235 bytes, params: 3, frame: 20
const value = a1;
const value3 = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).useActiveContextMenu();
const value4 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useOpenModalKey();
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
const getVideoQuestModalKey = videoQuestUtilsModule.getVideoQuestModalKey;
const value5 = value4 !== Reflect.apply(getVideoQuestModalKey, videoQuestUtilsModule, [a0]);
const key = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore], function() {
return ActionSheetStore.getKey();
});
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
const useAlertStore = useAlertStoreNativeModule.useAlertStore;
const value6 = Reflect.apply(useAlertStore, useAlertStoreNativeModule, [function(a0) {
return a0.alerts;
}]).length > 0;
let r0 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value;
r0 = !r0 ? key != null : r0;
r0 = !r0 ? value3 != null : r0;
r0 = !r0 ? value5 : r0;
r0 = !r0 ? value6 : r0;
return r0;
}
@@ -0,0 +1,97 @@
/* Metro module 13615; source: modules/quests/native/VideoQuestModal/hooks/useVideoQuestCaptions.tsx; dependencies: [57, 31, 9495, 507, 13616, 2] */
function _fun103997(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:6, offset: 0x0227adc3, size: 179 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {NONE: 'none', LOADING: 'loading', SUCCESS: 'success', ERROR: 'error'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/hooks/useVideoQuestCaptions.tsx');
exports.useVideoQuestCaptions = useVideoQuestCaptions;
}
function useVideoQuestCaptions(a0) { // fn#103998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:347, offset: 0x0227ae76, size: 206 bytes, params: 2, frame: 22
const value2 = undefined;
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = assetUtilsModule.getQuestAsset;
const QuestAssetType = assetUtilsModule.QuestAssetType;
const VIDEO_PLAYER_CAPTION = QuestAssetType.VIDEO_PLAYER_CAPTION;
const value3 = Reflect.apply(getQuestAsset, assetUtilsModule, [a0, VIDEO_PLAYER_CAPTION, value2, true]);
const url = value3 == null ? value2 : value3.url;
const binding = env0_3;
let useState = binding.useState;
const NONE = env0_4.NONE;
const value4 = Reflect.apply(useState, binding, [NONE]);
const binding2 = env0_2;
let value = binding2(value4, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value[0];
var env0_2 = value[1];
binding.useEffect(_fun103999, [url]);
return {captions: property2, status: property};
}
function _fun103999() { // fn#103999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:567, offset: 0x0227af44, size: 136 bytes, params: 1, frame: 13
var environment;
var binding;
var value2;
var value;
if (url != null) {
value2 = environment.__proto__;
value = (require(507) /* metro dependency 507: HTTPUtils */).HTTP.get({url: url, rejectWithError: true});
value = value.then(_fun104000);
value.catch(_fun104001);
} else {
binding = env0_1;
value = environment.__proto__;
binding(env1_4.NONE);
}
}
function _fun104000(a0) { // fn#104000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:631, offset: 0x0227afcc, size: 116 bytes, params: 2, frame: 13
var value;
var property;
var moduleValue;
var parseVtt;
var text;
var vtt;
var value2;
var binding;
var cues;
var binding2;
var SUCCESS;
var error;
var value3;
var ERROR;
try {
value = environment.__proto__.__proto__;
property = dependencyMap[4];
moduleValue = require(property);
parseVtt = moduleValue.parseVtt;
text = a0.text;
vtt = Reflect.apply(parseVtt, moduleValue, [text]);
value2 = environment.__proto__;
binding = env1_2;
cues = vtt.cues;
binding(cues);
binding = env1_1;
binding2 = env2_4;
SUCCESS = binding2.SUCCESS;
binding(SUCCESS);
} catch (error) {
value3 = environment.__proto__;
binding = env1_1;
ERROR = env2_4.ERROR;
binding(ERROR);
}
}
function _fun104001() { // fn#104001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:724, offset: 0x0227b040, size: 29 bytes, params: 1, frame: 11
const binding = env1_1;
const ERROR = env2_4.ERROR;
binding(ERROR);
}
@@ -0,0 +1,403 @@
/* Metro module 13603; source: modules/quests/native/VideoQuestModal/hooks/useVideoQuestPlayerAnalytics.tsx; dependencies: [31, 27, 4401, 661, 477, 9513, 7110, 9522, 13604, 13605, 7096, 6531, 4826, 4831, 2] */
function _fun103403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:6, offset: 0x02266dd1, size: 229 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).AppState;
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object = [-1000, -1003, -1004, -1008];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/hooks/useVideoQuestPlayerAnalytics.tsx');
exports.default = useVideoQuestPlayerAnalytics;
}
function useVideoQuestPlayerAnalytics({duration, isQuestCompleted, playerState, questId, sourceQuestContent, videoAssetId, videoSessionId}) { // fn#103404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:193, offset: 0x02266eb6, size: 886 bytes, params: 2, frame: 27
var object2;
const binding = questId;
const env0_7 = binding.useRef(null);
const env0_8 = binding.useRef(null);
const value2 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression();
binding.useEffect(_fun103405, []);
binding.useEffect(function() {
var env0_0 = AppState.addEventListener('change', _fun103407);
return _fun103408;
}, [questId, videoSessionId, playerState, value2, sourceQuestContent]);
const value3 = binding.useCallback(_fun103409, [questId, videoAssetId, isQuestCompleted, videoSessionId, duration,
value2, sourceQuestContent]);
const value4 = binding.useCallback(_fun103410, []);
let value = importDefault(13604) /* metro dependency 13604: useVideoSegmentAnalytics */;
object2 = {getCurrentVideoTime: value4, onAnalytics: value3};
const SEGMENT_ANALYTICS_EMIT_INTERVAL_MS = (require(13604) /* metro dependency 13604: useVideoSegmentAnalytics */).SEGMENT_ANALYTICS_EMIT_INTERVAL_MS;
object2.emitIntervalMs = SEGMENT_ANALYTICS_EMIT_INTERVAL_MS;
const SEGMENT_ANALYTICS_MIN_DURATION_MS = (require(13604) /* metro dependency 13604: useVideoSegmentAnalytics */).SEGMENT_ANALYTICS_MIN_DURATION_MS;
object2.minSegmentDurationMs = SEGMENT_ANALYTICS_MIN_DURATION_MS;
value = value(object2);
const handlePlayerStateChange = value.handlePlayerStateChange;
const handleLoadEnd = value.handleLoadEnd;
const handleFirstFrame = value.handleFirstFrame;
const handleSeek = value.handleSeek;
binding.useEffect(_fun103411, [playerState, handlePlayerStateChange]);
const env0_13 = binding.useRef(null);
value = binding.useCallback(_fun103412, [handleLoadEnd, handleFirstFrame, questId, videoAssetId, videoSessionId,
value2, sourceQuestContent]);
const value5 = binding.useCallback(function() {
var handlePlayerStateChangeBinding = handlePlayerStateChange;
var ENDED = require(dependencyMap[10]).VideoPlayerState.ENDED;
handlePlayerStateChangeBinding(ENDED, null);
}, [handlePlayerStateChange]);
const value6 = binding.useCallback(_fun103414, [questId, videoSessionId, videoAssetId, value2, sourceQuestContent]);
const env0_14 = binding.useRef(null);
const env0_15 = binding.useRef(-1);
const value7 = binding.useCallback(_fun103415, [questId, videoAssetId, videoSessionId, value2, sourceQuestContent]);
const value8 = binding.useCallback(_fun103416, [questId, videoSessionId, videoAssetId, value2, sourceQuestContent]);
const value9 = binding.useCallback(_fun103417, [questId, videoSessionId, value2, sourceQuestContent]);
const value10 = binding.useCallback(_fun103418, [questId, videoSessionId, value2, sourceQuestContent]);
object2 = {handleBufferAnalytics: value7, handleEndAnalytics: value5};
object2.handleErrorAnalytics = binding.useCallback(_fun103419, [duration, questId, videoAssetId, videoSessionId,
value2, sourceQuestContent]);
object2.handleLoadAnalytics = value;
object2.handleLoadStartAnalytics = value6;
object2.handlePausePlaybackAnalytics = value10;
object2.handleProgressAnalytics = binding.useCallback(_fun103420, [questId, videoSessionId, value2,
sourceQuestContent]);
object2.handleReadyForDisplayAnalytics = value8;
object2.handleResumePlaybackAnalytics = value9;
object2.handleSeekAnalytics = handleSeek;
return object2;
}
function _fun103405() { // fn#103405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:437, offset: 0x0226722c, size: 34 bytes, params: 1, frame: 10
const binding = env0_8;
const Date = global.Date;
binding.current = Date.now();
}
function _fun103406() { // fn#103406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:482, offset: 0x0226724e, size: 45 bytes, params: 1, frame: 14
const env0_0 = AppState.addEventListener('change', _fun103407);
return _fun103408;
}
function _fun103409(a0) { // fn#103409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:855, offset: 0x0226733b, size: 254 bytes, params: 2, frame: 21
var value2;
var value3;
var moduleValue;
var trackQuestEvent;
var object3;
var object4;
var moduleValue2;
if (env0_7.current != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object3 = {};
object3.questId = questId;
object3.event = AnalyticEvents.QUEST_VIDEO_SEGMENT_WATCHED;
object4 = {};
copyDataProperties(object4, a0, undefined);
object4['video_asset_id'] = videoAssetId;
object4['quest_completed'] = isQuestCompleted;
object4['video_duration_sec'] = duration;
moduleValue2 = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4['video_progress'] = moduleValue2.formatVideoProgressRatio(a0.segment_end_sec, env0_7.current);
object4['video_session_id'] = videoSessionId;
object4['impression_id'] = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object3]);
}
}
function _fun103410() { // fn#103410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:1215, offset: 0x02267439, size: 14 bytes, params: 1, frame: 1
return env0_7.current;
}
function _fun103411() { // fn#103411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:1499, offset: 0x02267447, size: 343 bytes, params: 1, frame: 16
const VideoPlayerState = (require(7096) /* metro dependency 7096: DiscordVideoPlayerTypes */).VideoPlayerState;
const playerStateBinding = playerState;
const PlayerState = (require(13605) /* metro dependency 13605: VideoQuestPlayer */).PlayerState;
const PLAYING = PlayerState.PLAYING;
if (PLAYING === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.PLAYING, null);
} else if (PlayerState.PAUSED === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.PAUSED, null);
} else if (PlayerState.ENDED === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.ENDED, null);
} else if (PlayerState.ERRORED === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.PAUSED, null);
}
}
function _fun103412() { // fn#103412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:1873, offset: 0x0226759e, size: 226 bytes, params: 1, frame: 18
const current = env0_13.current;
const value2 = null;
const r6 = value2 != current ? global.Date.now() - env0_13.current : value2;
const handleLoadEndBinding = handleLoadEnd;
const value5 = undefined;
handleLoadEndBinding(r6);
handleFirstFrame(0);
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_LOADING_ENDED = AnalyticEvents.QUEST_VIDEO_LOADING_ENDED;
object3.event = QUEST_VIDEO_LOADING_ENDED;
const object4 = {};
object4.video_asset_id = videoAssetId;
object4.network_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object4.duration = r6;
object4.video_session_id = videoSessionId;
object4.impression_id = value2 == env0_9 ? value5 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value5;
}
function _fun103414() { // fn#103414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:2289, offset: 0x022676b6, size: 190 bytes, params: 1, frame: 17
const binding = env0_13;
const Date = global.Date;
binding.current = Date.now();
const value3 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_LOADING_STARTED = AnalyticEvents.QUEST_VIDEO_LOADING_STARTED;
object3.event = QUEST_VIDEO_LOADING_STARTED;
const object4 = {};
object4.video_asset_id = videoAssetId;
object4.network_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object4.video_session_id = videoSessionId;
object4.is_hls_supported = true;
object4.impression_id = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value3;
}
function _fun103415(a0) { // fn#103415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:2638, offset: 0x02267774, size: 419 bytes, params: 2, frame: 20
var r9;
var current;
var value4;
var value7;
var moduleValue;
var trackQuestEvent;
var object4;
var object5;
var value8;
var moduleValue2;
var object6;
const value = environment.__proto__;
const effectiveConnectionSpeed = NetworkStore.getEffectiveConnectionSpeed();
let binding = env0_14;
if (a0) {
binding.current = global.Date.now();
binding = env0_15;
current = binding.current;
binding.current = current + 1;
value8 = undefined;
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue2.trackQuestEvent;
object4 = {};
object4.questId = questId;
object4.event = AnalyticEvents.QUEST_VIDEO_BUFFERING_STARTED;
object6 = {};
object6.video_asset_id = videoAssetId;
object6.network_connection_speed = effectiveConnectionSpeed;
current = binding.current;
object6.buffer_index = current;
object6.video_session_id = videoSessionId;
object6.impression_id = env0_9 == null ? value8 : env0_9.getId();
object4.properties = object6;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue2, [object4]);
} else {
current = binding.current;
value4 = null;
r9 = value4 != current ? global.Date.now() - env0_14.current : value4;
value7 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object4 = {};
object4.questId = questId;
object4.event = AnalyticEvents.QUEST_VIDEO_BUFFERING_ENDED;
object5 = {};
object5.video_asset_id = videoAssetId;
object5.network_connection_speed = effectiveConnectionSpeed;
object5.duration = r9;
current = env0_15.current;
object5.buffer_index = current;
object5.video_session_id = videoSessionId;
object5.impression_id = value4 == env0_9 ? value7 : env0_9.getId();
object4.properties = object5;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object4]);
}
}
function _fun103416() { // fn#103416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:3282, offset: 0x02267917, size: 186 bytes, params: 1, frame: 17
var value2;
var value3;
var moduleValue;
var trackQuestEvent;
var object3;
var object4;
if (env0_8.current != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object3 = {};
object3.questId = questId;
object3.event = AnalyticEvents.QUEST_VIDEO_TIME_TO_FIRST_FRAME;
object4 = {};
object4.duration_ms = global.Date.now() - env0_8.current;
object4.video_session_id = videoSessionId;
object4.video_asset_id = videoAssetId;
object4.impression_id = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object3]);
}
}
function _fun103417() { // fn#103417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:3555, offset: 0x022679d1, size: 169 bytes, params: 1, frame: 17
const value = environment.__proto__;
const value2 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_RESUMED = AnalyticEvents.QUEST_VIDEO_RESUMED;
object3.event = QUEST_VIDEO_RESUMED;
const object4 = {};
object4.video_timestamp_seconds = env0_7.current;
const VideoPauseReason = (require(6531) /* metro dependency 6531: QuestTypes */).VideoPauseReason;
const PAUSE_BUTTON = VideoPauseReason.PAUSE_BUTTON;
object4.pause_reason = PAUSE_BUTTON;
object4.video_session_id = videoSessionId;
object4.impression_id = env0_9 == null ? value2 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value2;
}
function _fun103418() { // fn#103418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:3833, offset: 0x02267a7a, size: 169 bytes, params: 1, frame: 17
const value = environment.__proto__;
const value2 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_PAUSED = AnalyticEvents.QUEST_VIDEO_PAUSED;
object3.event = QUEST_VIDEO_PAUSED;
const object4 = {};
object4.video_timestamp_seconds = env0_7.current;
const VideoPauseReason = (require(6531) /* metro dependency 6531: QuestTypes */).VideoPauseReason;
const PAUSE_BUTTON = VideoPauseReason.PAUSE_BUTTON;
object4.reason = PAUSE_BUTTON;
object4.video_session_id = videoSessionId;
object4.impression_id = env0_9 == null ? value2 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value2;
}
function _fun103419(a0) { // fn#103419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:4175, offset: 0x02267b23, size: 576 bytes, params: 2, frame: 24
var r1;
var isIOS2;
var defaultImport;
var increment;
const value = environment.__proto__;
const value2 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
let object3 = {};
object3.questId = questId;
const QUEST_VIDEO_ERROR = AnalyticEvents.QUEST_VIDEO_ERROR;
object3.event = QUEST_VIDEO_ERROR;
const object4 = {};
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(duration, env0_7.current ?? 0);
object4.video_error_type = null;
object4.video_asset_id = videoAssetId;
object4.network_connection_speed = null;
object4.video_session_id = videoSessionId;
let code = a0 == null ? value2 : a0.error.code;
object4.video_error_code = code;
object4.video_error_message = (a0 == null ? value2 : a0.error.localizedDescription) ?? (a0 == null ? value2 : a0.error.errorString);
object4.video_network_state = null;
object4.impression_id = env0_9 == null ? value2 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
code = a0 == null ? value2 : a0.error.code;
const errorException = a0 == null ? value2 : a0.error.errorException;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
r1 = !(errorException == null || !errorException.includes('Source error'));
} else {
isIOS2 = platformUtilsModule.isIOS();
r1 = isIOS2 ? code != null : !!isIOS2;
r1 = r1 && env1_7.includes(code);
}
if (r1) {
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
increment = defaultImport.increment;
object3 = {};
object3.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_VIDEO_ERROR;
object3.tags = ['quest_id:' + questId, 'error_type:SOURCE_ERROR'];
Reflect.apply(increment, defaultImport, [object3]);
}
return value2;
}
function _fun103420(a0, a1, a2) { // fn#103420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:5133, offset: 0x02267d63, size: 155 bytes, params: 4, frame: 17
env0_7.current = a2;
const value3 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_PROGRESSED = AnalyticEvents.QUEST_VIDEO_PROGRESSED;
object3.event = QUEST_VIDEO_PROGRESSED;
const object4 = {progress: a0, video_timestamp_seconds: a1};
object4.video_session_id = videoSessionId;
object4.impression_id = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value3;
}
function _fun103407(a0) { // fn#103407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:522, offset: 0x0226727b, size: 192 bytes, params: 2, frame: 17
var value2;
var value3;
var moduleValue;
var trackQuestEvent;
var object3;
var object4;
if (env1_7.current != null) {
value2 = environment.__proto__.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object3 = {};
object3.questId = questId;
object3.event = a0 === 'active' ? AnalyticEvents.QUEST_VIDEO_APP_FOCUSED : AnalyticEvents.QUEST_VIDEO_APP_UNFOCUSED;
object4 = {};
object4.video_timestamp_seconds = env1_7.current;
object4.video_state = playerState;
object4.video_session_id = videoSessionId;
object4.impression_id = env1_9 == null ? value3 : env1_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object3]);
}
}