This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,304 +1,317 @@
/* Metro module 13596; source: modules/quests/native/VideoQuestModal/VideoQuestModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585, 8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import UseStateFromSharedValue from '../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import VideoQuestModalContext from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
import QuestModalContentCloudBackground from '../QuestModalContentCloudBackground.tsx'; /* Metro dependency 13598 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as QuestContentImpressionTrackerNativeModule from '../QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
import * as QuestDockGestureContextModule from '../QuestDock/QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
function _fun103329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:6, offset: 0x0226266f, size: 577 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const env0_9 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': true};
object3 = {WATCH_VIDEO: 0};
object3[0] = 'WATCH_VIDEO';
object3.POST_WATCH_VIDEO = 1;
object3[1] = 'POST_WATCH_VIDEO';
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object5 = {wrapper: {'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1, 'zIndex': 1}};
object5.contentWrapper = {flex: 1};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object = {WATCH_VIDEO: 0};
object[0] = 'WATCH_VIDEO';
object.POST_WATCH_VIDEO = 1;
object[1] = 'POST_WATCH_VIDEO';
const createStyles = CreateStylesModule.createStyles;
const object2 = {wrapper: {'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1, 'zIndex': 1}};
object2.contentWrapper = {flex: 1};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object7['backgroundColor'] = BACKGROUND_BASE_LOWEST;
object5.contentBackground = object7;
object5.modalContentWrapper = {zIndex: 2};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object8['flex'] = 1;
object8['overflow'] = 'hidden';
object8['pointerEvents'] = 'none';
object8['zIndex'] = 1;
object5.backgroundWrapper = object8;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object5]);
object4['backgroundColor'] = BACKGROUND_BASE_LOWEST;
object2.contentBackground = object4;
object2.modalContentWrapper = {zIndex: 2};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object6['flex'] = 1;
object6['overflow'] = 'hidden';
object6['pointerEvents'] = 'none';
object6['zIndex'] = 1;
object2.backgroundWrapper = object6;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object2]);
const env0_12 = {code: 'function VideoQuestModalTsx1(){const{withSpring,clamp,postWatchAnimationState,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG,interpolate,CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y}=this.__closure;return{opacity:withSpring(clamp(postWatchAnimationState.get(),0,1),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG),transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}]};}'};
const env0_13 = {code: 'function VideoQuestModalTsx2(){const{withSpring,interpolate,postWatchAnimationState,safeAreaInsets,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG}=this.__closure;return{transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[safeAreaInsets.top,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}],opacity:withSpring(postWatchAnimationState.get(),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)};}'};
const env0_14 = value.memo(_fun103330);
value = value.memo(VideoQuestModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModal.tsx');
exports.default = value;
exports.VideoQuestModalSteps = object3;
}
function _fun103330({onClose, initialStep, sourceQuestContent}) { // fn#103330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:1689, offset: 0x022628b0, size: 1314 bytes, params: 2, frame: 38
var object2;
var r12;
var value;
const {quest,
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
const env0_3 = videoSessionId;
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
let binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialStep ?? (value4 ? env0_10.POST_WATCH_VIDEO : env0_10.WATCH_VIDEO)]);
binding = env0_3;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_6 = value6[1];
const binding3 = env0_4;
useState = binding3.useState;
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property2 = value9[0];
const env0_7 = value9[1];
const value10 = binding3.useCallback(_fun103331, [quest.id, videoSessionId, sourceQuestContent]);
const useContext = binding3.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding3, [QuestDockGestureContext]).windowDimensions;
const styles = useStyles();
const height = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(windowDimensions).height;
binding3.useLayoutEffect(_fun103332, [value4, initialStep]);
let closure = _fun103333;
const value11 = binding3.useCallback(closure, []);
const value12 = binding3.useCallback(_fun103334, [value10]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
let POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value13 = Reflect.apply(useSharedValue, reanimatedRexportModule, [property !== POST_WATCH_VIDEO ? 0 : 1]);
const env0_9 = value13;
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = M_103335;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
clamp: reanimatedRexportModule.clamp, postWatchAnimationState: value13};
binding = env0_9;
object2.BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG = binding;
object2.interpolate = reanimatedRexportModule.interpolate;
object2.CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y = -100;
closure.__closure = object2;
closure.__workletHash = 11571705142399;
closure.__initData = env0_12;
const value14 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const value15 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
var env0_10 = value15;
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = U_103336;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: reanimatedRexportModule.interpolate, postWatchAnimationState: value13, safeAreaInsets: value15,
BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG: binding};
closure.__workletHash = 9769051401109;
closure.__initData = env0_13;
const value16 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
env0_4.useEffect(_fun103337, [value13, property]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const view = <View style={[styles.backgroundWrapper,
{height: height}]}><ReanimatedNativeView style={[styles.contentBackground,
{top: value15.top}]} /><ReanimatedNativeView style={[styles.contentBackground,
value16]} /><ReanimatedNativeView style={value14}>{((Component) => <Component align="top" />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */)}</ReanimatedNativeView></View>;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items6 = [styles.wrapper];
items6[1] = {height: height};
const WATCH_VIDEO = env0_10.WATCH_VIDEO;
const items7 = [property === WATCH_VIDEO && ((Component) => <Component isFullscreen={property2} onNavigateToPostWatchVideo={value12} onClose={onClose} onEnd={value12} setIsFullscreen={value10} sourceQuestContent={sourceQuestContent} />)(importDefault(13601) /* metro dependency 13601: VideoQuestModalContentInProgress */)];
POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value21 = property === POST_WATCH_VIDEO;
if (value21) {
value = importDefault(13629) /* metro dependency 13629: VideoQuestModalContentCompleted */;
value = ((Component) => <Component onClose={onClose} onRestartVideo={value11} sourceQuestContent={sourceQuestContent} />)(value);
r12 = value;
} else {
r12 = value21;
}
items7[1] = r12;
return (
<View>
<ReanimatedNativeView style={styles.modalContentWrapper}>
{view}
<SafeAreaPaddingView top style={items6}>
<View style={styles.contentWrapper}>
{items7}
</View>
</SafeAreaPaddingView>
</ReanimatedNativeView>
</View>
);
}
function VideoQuestModal({questId, questContentPosition, onClose, videoSessionId, initialStep, sourceQuestContent}) { // fn#103338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4201, offset: 0x0226309a, size: 278 bytes, params: 2, frame: 22
const binding = sourceQuestContent;
const useCallback = binding.useCallback;
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useNonNullableQuest(questId,
Reflect.apply(useCallback, binding, [_fun103339, [onClose]]));
const value4 = binding.useMemo(_fun103340, [onClose, value3, videoSessionId, questContentPosition, initialStep,
sourceQuestContent]);
binding.useLayoutEffect(_fun103344, []);
if (value3 == null || value4 == null) {
return null;
} else {
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="watch_mobile_video_quest"
screens={value4}
/>
exports.VideoQuestModalSteps = object;
function _fun103330({onClose, initialStep, sourceQuestContent}) { // fn#103330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:1689, offset: 0x022628b0, size: 1314 bytes, params: 2, frame: 38
var r12;
var value;
const {quest,
videoSessionId} = (VideoQuestModalContextModule).useVideoQuestModalContext();
const videoSessionId2 = videoSessionId;
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
let binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialStep ?? (value4 ? env0_10.POST_WATCH_VIDEO : env0_10.WATCH_VIDEO)]);
binding = videoSessionId2;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_6 = value6[1];
const binding3 = env0_4;
useState = binding3.useState;
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property2 = value9[0];
const env0_7 = value9[1];
const value10 = binding3.useCallback(_fun103331, [quest.id, videoSessionId, sourceQuestContent]);
const useContext = binding3.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding3, [QuestDockGestureContext]).windowDimensions;
const styles = useStyles();
const height = (UseStateFromSharedValue)(windowDimensions).height;
binding3.useLayoutEffect(_fun103332, [value4, initialStep]);
let closure = _fun103333;
const value11 = binding3.useCallback(closure, []);
const value12 = binding3.useCallback(_fun103334, [value10]);
const useSharedValue = ReanimatedRexportModule.useSharedValue;
let POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value13 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [property !== POST_WATCH_VIDEO ? 0 : 1]);
const env0_9 = value13;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = M_103335;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
clamp: ReanimatedRexportModule.clamp, postWatchAnimationState: value13};
binding = env0_9;
object.BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG = binding;
object.interpolate = ReanimatedRexportModule.interpolate;
object.CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y = -100;
closure.__closure = object;
closure.__workletHash = 11571705142399;
closure.__initData = env0_12;
const value14 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value15 = (UseSafeAreaInsetsNative)();
var env0_10 = value15;
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = U_103336;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: ReanimatedRexportModule.interpolate, postWatchAnimationState: value13, safeAreaInsets: value15,
BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG: binding};
closure.__workletHash = 9769051401109;
closure.__initData = env0_13;
const value16 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
env0_4.useEffect(_fun103337, [value13, property]);
const view = (
<View style={[styles.backgroundWrapper, {height: height}]}>
<ReanimatedNativeView style={[styles.contentBackground, {top: value15.top}]} />
<ReanimatedNativeView style={[styles.contentBackground, value16]} />
<ReanimatedNativeView style={value14}>
{((Component) => <Component align="top" />)(QuestModalContentCloudBackground)}
</ReanimatedNativeView>
</View>
);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const items6 = [styles.wrapper];
items6[1] = {height: height};
const WATCH_VIDEO = env0_10.WATCH_VIDEO;
const items7 = [
property === WATCH_VIDEO && ((Component) => <Component isFullscreen={property2} onNavigateToPostWatchVideo={value12} onClose={onClose} onEnd={value12} setIsFullscreen={value10} sourceQuestContent={sourceQuestContent} />)(importDefault(13601) /* metro dependency 13601: VideoQuestModalContentInProgress */),
];
POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value21 = property === POST_WATCH_VIDEO;
if (value21) {
value = importDefault(13629) /* metro dependency 13629: VideoQuestModalContentCompleted */;
value = ((Component) => <Component onClose={onClose} onRestartVideo={value11} sourceQuestContent={sourceQuestContent} />)(value);
r12 = value;
} else {
r12 = value21;
}
items7[1] = r12;
return (
<View>
<ReanimatedNativeView style={styles.modalContentWrapper}>
{view}
<SafeAreaPaddingView top style={items6}>
<View style={styles.contentWrapper}>
{items7}
</View>
</SafeAreaPaddingView>
</ReanimatedNativeView>
</View>
);
function _fun103331(a0) { // fn#103331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2018, offset: 0x02262dd2, size: 175 bytes, params: 2, frame: 17
const lockOrientation = DeviceOrientationModule.lockOrientation;
if (a0) {
Reflect.apply(lockOrientation, DeviceOrientationModule, ['LANDSCAPE', true]);
} else {
Reflect.apply(lockOrientation, DeviceOrientationModule, ['PORTRAIT', true]);
}
env0_7(a0);
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEvent({questId: quest.id,
event: a0 ? AnalyticEvents.QUEST_VIDEO_FULLSCREEN_ENTERED : AnalyticEvents.QUEST_VIDEO_FULLSCREEN_EXITED,
properties: {video_session_id: videoSessionId}, sourceQuestContent: sourceQuestContent});
}
function _fun103332() { // fn#103332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2400, offset: 0x02262e81, size: 51 bytes, params: 1, frame: 12
var binding;
if (result && initialStep == null) {
binding = env0_6;
value = environment.__proto__;
binding(env1_10.POST_WATCH_VIDEO);
}
}
function _fun103333() { // fn#103333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2473, offset: 0x02262eb4, size: 29 bytes, params: 1, frame: 11
const binding = env0_6;
const WATCH_VIDEO = env1_10.WATCH_VIDEO;
binding(WATCH_VIDEO);
}
function _fun103334() { // fn#103334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2518, offset: 0x02262ed1, size: 40 bytes, params: 1, frame: 12
(0, JsxRuntimeModule.jsxs)(false);
const binding = env0_6;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
binding(POST_WATCH_VIDEO);
}
function M_103335() { // fn#103335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2644, offset: 0x02262ef9, size: 196 bytes, params: 1, frame: 25
const object = {};
let value = environment.__proto__;
let withSpring = SpringModule.withSpring;
const clamp = ReanimatedRexportModule.clamp;
let binding = env0_9;
const value4 = Reflect.apply(clamp, ReanimatedRexportModule, [binding.get(), 0, 1]);
binding = env1_9;
object.opacity = Reflect.apply(withSpring, SpringModule, [value4, binding]);
const object2 = {};
value = SpringModule;
withSpring = value.withSpring;
object2.translateY = Reflect.apply(withSpring, value, [ReanimatedRexportModule.interpolate(env0_9.get(), [0, 1], [-100, 0]),
binding]);
object.transform = [object2];
return object;
}
function U_103336() { // fn#103336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3110, offset: 0x02262fbd, size: 174 bytes, params: 1, frame: 25
const object = {};
let value = environment.__proto__;
let withSpring = SpringModule.withSpring;
const interpolate = ReanimatedRexportModule.interpolate;
let binding = env0_9;
let get = binding.get;
const value4 = Reflect.apply(interpolate, ReanimatedRexportModule, [Reflect.apply(get, binding, []), [0, 1],
[env0_10.top, 0]]);
binding = env1_9;
object.transform = [{translateY: Reflect.apply(withSpring, SpringModule, [value4, binding])}];
value = SpringModule;
withSpring = value.withSpring;
const binding2 = env0_9;
get = binding2.get;
object.opacity = Reflect.apply(withSpring, value, [Reflect.apply(get, binding2, []), binding]);
return object;
}
function _fun103337() { // fn#103337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3486, offset: 0x0226306b, size: 47 bytes, params: 1, frame: 13
const binding = env0_9;
const set = binding.set;
const value = environment.__proto__;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
Reflect.apply(set, binding, [ReactNativeModule.View !== POST_WATCH_VIDEO ? 0 : 1]);
}
}
}
function _fun103331(a0) { // fn#103331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2018, offset: 0x02262dd2, size: 175 bytes, params: 2, frame: 17
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
const lockOrientation = deviceOrientationModule.lockOrientation;
if (a0) {
Reflect.apply(lockOrientation, deviceOrientationModule, ['LANDSCAPE', true]);
} else {
Reflect.apply(lockOrientation, deviceOrientationModule, ['PORTRAIT', true]);
function VideoQuestModal({questId, questContentPosition, onClose, videoSessionId, initialStep, sourceQuestContent}) { // fn#103338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4201, offset: 0x0226309a, size: 278 bytes, params: 2, frame: 22
const binding = sourceQuestContent;
const useCallback = binding.useCallback;
const value3 = (QuestHooksModule).useNonNullableQuest(questId,
Reflect.apply(useCallback, binding, [_fun103339, [onClose]]));
const value4 = binding.useMemo(_fun103340, [onClose, value3, videoSessionId, questContentPosition, initialStep,
sourceQuestContent]);
binding.useLayoutEffect(_fun103344, []);
if (value3 == null || value4 == null) {
return null;
} else {
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="watch_mobile_video_quest"
screens={value4}
/>
);
}
function _fun103339() { // fn#103339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4357, offset: 0x022631b0, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(QuestUtilsNativeModule).showQuestUnavailableAlert();
onClose();
}
function _fun103340() { // fn#103340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4459, offset: 0x022631e0, size: 69 bytes, params: 1, frame: 5
const value = null;
return value == ReactNativeModule.View ? value : {['watch_mobile_video_quest']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_103342}};
function render_103342() { // fn#103342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4523, offset: 0x02263225, size: 208 bytes, params: 1, frame: 22
const Provider = (VideoQuestModalContext).Provider;
const object2 = {};
const binding = env1_5;
object2.quest = binding;
object2.videoSessionId = videoSessionId;
const QuestDockGestureContextProvider = (QuestDockGestureContextModule).QuestDockGestureContextProvider;
const QuestContentImpressionTrackerNative = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const QuestContent = (QuestTypesModule).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<Provider value={object2}>
<QuestDockGestureContextProvider>
<QuestContentImpressionTrackerNative
overrideVisibility
questContent={VIDEO_MODAL_MOBILE}
questOrQuests={binding}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_103343}
</QuestContentImpressionTrackerNative>
</QuestDockGestureContextProvider>
</Provider>
);
function render_103342Children() { // fn#103343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4835, owner: render_103342.children, offset: 0x022632f5, size: 53 bytes, params: 1, frame: 14
return ((Component) => <Component initialStep={initialStep} onClose={onClose} sourceQuestContent={sourceQuestContent} />)(env3_14);
}
}
}
function _fun103344() { // fn#103344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4956, offset: 0x0226332a, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(DeviceOrientationModule).lockOrientation('PORTRAIT', true);
return (DeviceOrientationModule).restoreDefaultOrientation;
}
}
env0_7(a0);
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEvent({questId: quest.id,
event: a0 ? AnalyticEvents.QUEST_VIDEO_FULLSCREEN_ENTERED : AnalyticEvents.QUEST_VIDEO_FULLSCREEN_EXITED,
properties: {video_session_id: videoSessionId}, sourceQuestContent: sourceQuestContent});
}
function _fun103332() { // fn#103332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2400, offset: 0x02262e81, size: 51 bytes, params: 1, frame: 12
var binding;
if (result && initialStep == null) {
binding = env0_6;
value = environment.__proto__;
binding(env1_10.POST_WATCH_VIDEO);
}
}
function _fun103333() { // fn#103333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2473, offset: 0x02262eb4, size: 29 bytes, params: 1, frame: 11
const binding = env0_6;
const WATCH_VIDEO = env1_10.WATCH_VIDEO;
binding(WATCH_VIDEO);
}
function _fun103334() { // fn#103334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2518, offset: 0x02262ed1, size: 40 bytes, params: 1, frame: 12
env0_8(false);
const binding = env0_6;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
binding(POST_WATCH_VIDEO);
}
function M_103335() { // fn#103335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2644, offset: 0x02262ef9, size: 196 bytes, params: 1, frame: 25
const object3 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const clamp = reanimatedRexportModule.clamp;
let binding = env0_9;
const value4 = Reflect.apply(clamp, reanimatedRexportModule, [binding.get(), 0, 1]);
binding = env1_9;
object3.opacity = Reflect.apply(withSpring, springModule, [value4, binding]);
const object4 = {};
value = springModule;
withSpring = value.withSpring;
const moduleValue3 = reanimatedRexportModule;
object4.translateY = Reflect.apply(withSpring, value, [moduleValue3.interpolate(env0_9.get(), [0, 1], [-100, 0]),
binding]);
object3.transform = [object4];
return object3;
}
function U_103336() { // fn#103336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3110, offset: 0x02262fbd, size: 174 bytes, params: 1, frame: 25
const object2 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
let binding = env0_9;
let get = binding.get;
const value4 = Reflect.apply(interpolate, reanimatedRexportModule, [Reflect.apply(get, binding, []), [0, 1],
[env0_10.top, 0]]);
binding = env1_9;
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [value4, binding])}];
value = springModule;
withSpring = value.withSpring;
const binding2 = env0_9;
get = binding2.get;
object2.opacity = Reflect.apply(withSpring, value, [Reflect.apply(get, binding2, []), binding]);
return object2;
}
function _fun103337() { // fn#103337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3486, offset: 0x0226306b, size: 47 bytes, params: 1, frame: 13
const binding = env0_9;
const set = binding.set;
const binding2 = env0_5;
const value = environment.__proto__;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
Reflect.apply(set, binding, [binding2 !== POST_WATCH_VIDEO ? 0 : 1]);
}
function _fun103339() { // fn#103339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4357, offset: 0x022631b0, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).showQuestUnavailableAlert();
onClose();
}
function _fun103340() { // fn#103340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4459, offset: 0x022631e0, size: 69 bytes, params: 1, frame: 5
const value = null;
return value == env0_5 ? value : {['watch_mobile_video_quest']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_103342}};
}
function _fun103344() { // fn#103344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4956, offset: 0x0226332a, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation;
}
function render_103342() { // fn#103342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4523, offset: 0x02263225, size: 208 bytes, params: 1, frame: 22
const Provider = (importDefault(13597) /* metro dependency 13597: VideoQuestModalContext */).Provider;
const object = {};
const binding = env1_5;
object.quest = binding;
object.videoSessionId = videoSessionId;
const QuestDockGestureContextProvider = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContextProvider;
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<Provider value={object}>
<QuestDockGestureContextProvider>
<QuestContentImpressionTrackerNative
overrideVisibility
questContent={VIDEO_MODAL_MOBILE}
questOrQuests={binding}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_103343}
</QuestContentImpressionTrackerNative>
</QuestDockGestureContextProvider>
</Provider>
);
}
function render_103342Children() { // fn#103343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4835, owner: render_103342.children, offset: 0x022632f5, size: 53 bytes, params: 1, frame: 14
return ((Component) => <Component initialStep={initialStep} onClose={onClose} sourceQuestContent={sourceQuestContent} />)(env3_14);
}
global.__d(_fun103329, 13596, [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585,
8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121,
2]) /* metro module 13596, dependencies: [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585, 8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 13618; source: modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx; dependencies: [33, 697, 5278, 1244, 5312, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
function _fun104018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:6, offset: 0x0227ba1b, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx');
exports.default = VideoQuestModalCloseButton;
function VideoQuestModalCloseButton({onClose, iconColor = importDefault(dependencyMap[1]).colors.MOBILE_TEXT_HEADING_PRIMARY, style}) { // fn#104019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:116, offset: 0x0227ba96, size: 236 bytes, params: 2, frame: 21
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const items2 = [{'flexShrink': 0, 'minWidth': 24, 'minHeight': 24}, style];
const XSmallIcon = (XSmallIconModule).XSmallIcon;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onClose}
style={items2}
>
<XSmallIcon color={iconColor} />
</PressableOpacity>
);
}
}
function VideoQuestModalCloseButton({onClose, iconColor = importDefault(dependencyMap[1]).colors.MOBILE_TEXT_HEADING_PRIMARY, style}) { // fn#104019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:116, offset: 0x0227ba96, size: 236 bytes, params: 2, frame: 21
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const items2 = [{'flexShrink': 0, 'minWidth': 24, 'minHeight': 24}, style];
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onClose}
style={items2}
>
<XSmallIcon color={iconColor} />
</PressableOpacity>
);
}
global.__d(_fun104018, 13618, [33, 697, 5278, 1244, 5312,
2]) /* metro module 13618, dependencies: [33, 697, 5278, 1244, 5312, 2] */;
@@ -1,229 +1,353 @@
/* Metro module 13629; source: modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx; dependencies: [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212, 9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798, 2] */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import VideoQuestModalCloseButton from './VideoQuestModalCloseButton.tsx'; /* Metro dependency 13618 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as QuestUtilsModule from '../../utils/QuestUtils.tsx'; /* Metro dependency 7114 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as RetryIconModule from '../../../../design/components/Icon/native/redesign/generated/RetryIcon.tsx'; /* Metro dependency 10234 */
import * as QuestDockGestureContextModule from '../QuestDock/QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
import * as QuestBottomSheetFooterModule from '../QuestBottomSheet/QuestBottomSheetFooter.tsx'; /* Metro dependency 13593 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
import * as UseVideoQuestClickCtaAndMaybeCloseModalModule from './useVideoQuestClickCtaAndMaybeCloseModal.tsx'; /* Metro dependency 13627 */
function _fun104081(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:6, offset: 0x02283a77, size: 589 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.ActivityIndicator;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
let value = ReactModule;
const env0_8 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': false};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {wrapper: {'flexGrow': 1, 'flexShrink': 1}, headerContentCopy: {'flexGrow': 1, 'flexShrink': 1}};
object2.closeButton = {opacity: 0.5};
const createStyles = CreateStylesModule.createStyles;
object = {wrapper: {'flexGrow': 1, 'flexShrink': 1}, headerContentCopy: {'flexGrow': 1, 'flexShrink': 1}};
object.closeButton = {opacity: 0.5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
object2.contentRewardsAnimatedWrapper = {flex: 1};
object2.contentRewardsWrapper = {flex: 1};
object2.contentRewards = {alignItems: 'center'};
object2.contentRewardsCopy = {textAlign: 'center'};
object.content = {padding: PX_16};
object.contentRewardsAnimatedWrapper = {flex: 1};
object.contentRewardsWrapper = {flex: 1};
object.contentRewards = {alignItems: 'center'};
object.contentRewardsCopy = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentEndCardHeader = {marginBottom: PX_16};
object2.contentEndCardHeaderCopy = {'flexGrow': 1, 'flexShrink': 1};
const object3 = {borderTopWidth: 1};
object.contentEndCardHeader = {marginBottom: PX_16};
object.contentEndCardHeaderCopy = {'flexGrow': 1, 'flexShrink': 1};
const object6 = {borderTopWidth: 1};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.borderTopColor = BORDER_STRONG;
object6.borderTopColor = BORDER_STRONG;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.paddingTop = PX_24;
object2.contentEndCard = object3;
const object4 = {height: 210};
object6.paddingTop = PX_24;
object.contentEndCard = object6;
const object7 = {height: 210};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.image = object4;
const object5 = {flexGrow: 0};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.ctaPrimary = object5;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function VideoQuestModalContentCompletedTsx1(){const{withDelay,ANIMATION_DELAY,withSpring,isComponentMounted,ANIMATED_CONTENT_SPRING_CONFIG,interpolate,ANIMATED_CONTENT_OFFSET_Y}=this.__closure;return{opacity:withDelay(ANIMATION_DELAY,withSpring(isComponentMounted.get(),ANIMATED_CONTENT_SPRING_CONFIG)),transform:[{translateY:withDelay(ANIMATION_DELAY,withSpring(interpolate(isComponentMounted.get(),[0,1],[ANIMATED_CONTENT_OFFSET_Y,0]),ANIMATED_CONTENT_SPRING_CONFIG))}]};}'};
object7.marginBottom = PX_24;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.image = object7;
const object8 = {flexGrow: 0};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.ctaPrimary = object8;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function VideoQuestModalContentCompletedTsx1(){const{withDelay,ANIMATION_DELAY,withSpring,isComponentMounted,ANIMATED_CONTENT_SPRING_CONFIG,interpolate,ANIMATED_CONTENT_OFFSET_Y}=this.__closure;return{opacity:withDelay(ANIMATION_DELAY,withSpring(isComponentMounted.get(),ANIMATED_CONTENT_SPRING_CONFIG)),transform:[{translateY:withDelay(ANIMATION_DELAY,withSpring(interpolate(isComponentMounted.get(),[0,1],[ANIMATED_CONTENT_OFFSET_Y,0]),ANIMATED_CONTENT_SPRING_CONFIG))}]};}'};
value = value.memo(VideoQuestModalContentCompleted);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx');
exports.default = value;
}
function VideoQuestModalContentCompleted({onClose, onRestartVideo, sourceQuestContent}) { // fn#104082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1402, offset: 0x02283cc4, size: 2510 bytes, params: 2, frame: 49
var object2;
var r14;
var r10;
var items5;
var string;
var ShinyButton;
var object19;
const styles = useStyles();
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
let binding = env0_3;
const value3 = binding.useMemo(_fun104083, [quest]);
const value5 = (require(13627) /* metro dependency 13627: useVideoQuestClickCtaAndMaybeCloseModal */).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
onClose: onClose, sourceQuestContent: sourceQuestContent,
impressionId: (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()});
const questBottomSheetFooterModule = require(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
const useQuestRewardClaimHandler = questBottomSheetFooterModule.useQuestRewardClaimHandler;
object2 = {quest: quest};
object2.onSuccess = (importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close;
object2.sourceQuestContent = sourceQuestContent;
const {isLoading, isClaiming, claim} = Reflect.apply(useQuestRewardClaimHandler, questBottomSheetFooterModule,
[object2]);
const userStatus = quest.userStatus;
const value7 = userStatus?.claimedAt != null;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VideoQuestModalContentCompletedT;
closure.__closure = {withDelay: reanimatedRexportModule.withDelay, ANIMATION_DELAY: 125,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isComponentMounted: value8,
ANIMATED_CONTENT_SPRING_CONFIG: env0_8, interpolate: reanimatedRexportModule.interpolate,
ANIMATED_CONTENT_OFFSET_Y: 75};
closure.__workletHash = 2704439293952;
closure.__initData = env0_10;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding = env0_3;
binding.useEffect(_fun104085, [value8]);
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
const value10 = binding.useCallback(_fun104086, [isShareableQuest2, quest.id]);
binding.useLayoutEffect(_fun104087, []);
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
let get = windowDimensions.get;
const value11 = Reflect.apply(get, windowDimensions, []).height < 800;
get = windowDimensions.get;
const value12 = Reflect.apply(get, windowDimensions, []).height < 760;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const items2 = [<Stack align="center" direction="horizontal" justify="space-between" style={styles.content}><Text variant="heading-sm/semibold" color="text-subtle" style={styles.headerContentCopy}>{Reflect.apply(formatToPlainString,
intl, [EAYZAr,
{questName: quest.config.messages.questName}])}</Text>{((Component) => <Component onClose={onClose} style={styles.closeButton} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}</Stack>];
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items3 = [styles.contentRewardsAnimatedWrapper, value9];
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items4 = [styles.content];
items4[1] = styles.contentRewardsWrapper;
if (isLoading) {
if (isClaiming) {
var viewBindingProps = {style: styles.contentRewards};
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
string = intl.string;
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
r14 = <View {...viewBindingProps}>{items5}</View>;
function VideoQuestModalContentCompleted({onClose, onRestartVideo, sourceQuestContent}) { // fn#104082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1402, offset: 0x02283cc4, size: 2510 bytes, params: 2, frame: 49
var r14;
var r10;
var items5;
var string;
var ShinyButton;
var object2;
const styles = useStyles();
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
let binding = env0_3;
const value3 = binding.useMemo(_fun104083, [quest]);
const value5 = (UseVideoQuestClickCtaAndMaybeCloseModalModule).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
onClose: onClose, sourceQuestContent: sourceQuestContent,
impressionId: (ContentImpressionTrackerHooksModule).useQuestImpressionId()});
const useQuestRewardClaimHandler = QuestBottomSheetFooterModule.useQuestRewardClaimHandler;
object = {quest: quest};
object.onSuccess = (importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close;
object.sourceQuestContent = sourceQuestContent;
const {isLoading, isClaiming, claim} = Reflect.apply(useQuestRewardClaimHandler, QuestBottomSheetFooterModule,
[object]);
const userStatus = quest.userStatus;
const value7 = userStatus?.claimedAt != null;
const value8 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VideoQuestModalContentCompletedT2 = VideoQuestModalContentCompletedT;
VideoQuestModalContentCompletedT2.__closure = {withDelay: ReanimatedRexportModule.withDelay, ANIMATION_DELAY: 125,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isComponentMounted: value8,
ANIMATED_CONTENT_SPRING_CONFIG: env0_8, interpolate: ReanimatedRexportModule.interpolate,
ANIMATED_CONTENT_OFFSET_Y: 75};
VideoQuestModalContentCompletedT2.__workletHash = 2704439293952;
VideoQuestModalContentCompletedT2.__initData = env0_10;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [VideoQuestModalContentCompletedT2]);
binding = env0_3;
binding.useEffect(_fun104085, [value8]);
const isShareableQuest2 = QuestUtilsModule.isShareableQuest(quest.config);
const value10 = binding.useCallback(_fun104086, [isShareableQuest2, quest.id]);
binding.useLayoutEffect(_fun104087, []);
const useContext = binding.useContext;
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
let get = windowDimensions.get;
const value11 = Reflect.apply(get, windowDimensions, []).height < 800;
get = windowDimensions.get;
const value12 = Reflect.apply(get, windowDimensions, []).height < 760;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const items2 = [
<Stack
align="center"
direction="horizontal"
justify="space-between"
style={styles.content}
>
<Text
variant="heading-sm/semibold"
color="text-subtle"
style={styles.headerContentCopy}
>
{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: quest.config.messages.questName}])}
</Text>
{((Component) => <Component onClose={onClose} style={styles.closeButton} />)(VideoQuestModalCloseButton)}
</Stack>,
];
const items3 = [styles.contentRewardsAnimatedWrapper, value9];
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items4 = [styles.content];
items4[1] = styles.contentRewardsWrapper;
if (isLoading) {
if (isClaiming) {
var viewBindingProps = {style: styles.contentRewards};
items5 = [
((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */),
];
string = intl.string;
items5[1] = (
<Text
color="text-strong"
style={styles.contentRewardsCopy}
variant="heading-lg/semibold"
>
{value7 ? Reflect.apply(string, intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}
</Text>
);
r14 = (
<View {...viewBindingProps}>
{items5}
</View>
);
} else {
r14 = <ActivityIndicator />;
}
} else {
r14 = <ActivityIndicator />;
var viewBindingProps = {style: styles.contentRewards};
items5 = [
((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */),
];
string = intl.string;
items5[1] = (
<Text
color="text-strong"
style={styles.contentRewardsCopy}
variant="heading-lg/semibold"
>
{value7 ? Reflect.apply(string, intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}
</Text>
);
r14 = (
<View {...viewBindingProps}>
{items5}
</View>
);
}
} else {
var viewBindingProps = {style: styles.contentRewards};
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
const items6 = [r14];
if (value7) {
r14 = !value7;
} else {
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
r14 = (
<ShinyButton
loading={isClaiming}
onPress={claim}
style={styles.ctaPrimary}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)}
color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREY}
/>
);
}
items6[1] = r14;
items2[1] = (
<ReanimatedNativeView style={items3}>
<Stack
align="center"
justify="center"
spacing={PX_24}
style={items4}
>
{items6}
</Stack>
</ReanimatedNativeView>
);
const items7 = [styles.content];
items7[1] = styles.contentEndCard;
const Stack2 = (StackNativeModule).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const stack = (
<Stack2 spacing={PX_4} style={styles.contentEndCardHeaderCopy}>
<Text
variant="heading-md/semibold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{quest.config.messages.gameTitle}
</Text>
<Text variant="text-sm/medium" color="text-subtle">
{quest.config.messages.gamePublisher}
</Text>
</Stack2>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
string = intl.string;
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
r14 = <View {...viewBindingProps}>{items5}</View>;
const YsCuyF = (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF;
const RetryIcon = (RetryIconModule).RetryIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const stack2 = (
<Stack
direction="horizontal"
justify="space-between"
style={styles.contentEndCardHeader}
>
{stack}
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [YsCuyF])}
onPress={onRestartVideo}
>
<RetryIcon color={INTERACTIVE_TEXT_DEFAULT} />
</PressableOpacity>
</Stack>
);
const value28 = value3 != null;
if (value28) {
r10 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.r8BzFT,
{gameTitle: quest.config.messages.gameTitle})}
onPress={value5}
>
{((Component) => <Component style={styles.image} source={{uri: value3.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</PressableOpacity>
);
} else {
r10 = value28;
}
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={items7}>
{stack2}
{r10}
<Stack
direction="horizontal"
spacing={PX_16}
align="center"
>
<Button
grow
onPress={value5}
text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)}
/>
{isShareableQuest2 && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={value10}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</PressableOpacity>}
</Stack>
</View>
);
return (
<SafeAreaPaddingView bottom style={styles.wrapper}>
{items2}
</SafeAreaPaddingView>
);
function _fun104083() { // fn#104083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1571, offset: 0x02284692, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function VideoQuestModalContentCompletedT() { // fn#104084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2048, owner: VideoQuestModalContentCompleted.T, offset: 0x022846dd, size: 206 bytes, params: 1, frame: 24
const object = {};
let value = environment.__proto__;
let withDelay = ReanimatedRexportModule.withDelay;
let withSpring = SpringModule.withSpring;
let binding = env0_1;
const value3 = binding.get();
binding = env1_8;
object.opacity = Reflect.apply(withDelay, ReanimatedRexportModule, [125, Reflect.apply(withSpring, SpringModule,
[value3, binding])]);
const object2 = {};
value = ReanimatedRexportModule;
withDelay = value.withDelay;
withSpring = SpringModule.withSpring;
object2.translateY = Reflect.apply(withDelay, value, [125, Reflect.apply(withSpring, SpringModule,
[ReanimatedRexportModule.interpolate(env0_1.get(), [0, 1], [75, 0]), binding])]);
object.transform = [object2];
return object;
}
function _fun104085() { // fn#104085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2517, offset: 0x01b81401, size: 24 bytes, params: 1, frame: 11
env0_1.set(1);
}
function _fun104086() { // fn#104086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2597, offset: 0x022847ab, size: 95 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var showShareActionSheet;
var moduleValue2;
if (env0_2) {
value2 = environment.__proto__;
moduleValue = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue.showShareActionSheet;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
Reflect.apply(showShareActionSheet, moduleValue, [{message: moduleValue2.getQuestUrl(quest.id)},
'Video Quest Modal']);
}
}
function _fun104087() { // fn#104087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2724, offset: 0x0228480a, size: 45 bytes, params: 1, frame: 14
const value = environment.__proto__;
(DeviceOrientationModule).lockOrientation('PORTRAIT', true);
}
}
const items6 = [r14];
if (value7) {
r14 = !value7;
} else {
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
r14 = <ShinyButton loading={isClaiming} onPress={claim} style={styles.ctaPrimary} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)} color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREY} />;
}
items6[1] = r14;
items2[1] = <ReanimatedNativeView style={items3}><Stack align="center" justify="center" spacing={PX_24} style={items4}>{items6}</Stack></ReanimatedNativeView>;
const items7 = [styles.content];
items7[1] = styles.contentEndCard;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const stack = <Stack2 spacing={PX_4} style={styles.contentEndCardHeaderCopy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{quest.config.messages.gameTitle}</Text><Text variant="text-sm/medium" color="text-subtle">{quest.config.messages.gamePublisher}</Text></Stack2>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const YsCuyF = (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF;
const RetryIcon = (require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const stack2 = <Stack direction="horizontal" justify="space-between" style={styles.contentEndCardHeader}>{stack}<PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[YsCuyF])} onPress={onRestartVideo}><RetryIcon color={INTERACTIVE_TEXT_DEFAULT} /></PressableOpacity></Stack>;
const value28 = value3 != null;
if (value28) {
r10 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.r8BzFT,
{gameTitle: quest.config.messages.gameTitle})} onPress={value5}>{((Component) => <Component style={styles.image} source={{uri: value3.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity>;
} else {
r10 = value28;
}
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={items7}>{stack2}{r10}<Stack direction="horizontal" spacing={PX_16} align="center"><Button grow onPress={value5} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} />{isShareableQuest2 && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={value10}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</PressableOpacity>}</Stack></View>;
return (
<SafeAreaPaddingView bottom style={styles.wrapper}>
{items2}
</SafeAreaPaddingView>
);
}
function _fun104083() { // fn#104083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1571, offset: 0x02284692, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function VideoQuestModalContentCompletedT() { // fn#104084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2048, owner: VideoQuestModalContentCompleted.T, offset: 0x022846dd, size: 206 bytes, params: 1, frame: 24
const object3 = {};
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let withDelay = reanimatedRexportModule.withDelay;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_1;
const value3 = binding.get();
binding = env1_8;
object3.opacity = Reflect.apply(withDelay, reanimatedRexportModule, [125, Reflect.apply(withSpring, springModule,
[value3, binding])]);
const object4 = {};
value = reanimatedRexportModule;
withDelay = value.withDelay;
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
const moduleValue4 = reanimatedRexportModule;
object4.translateY = Reflect.apply(withDelay, value, [125, Reflect.apply(withSpring, moduleValue3,
[moduleValue4.interpolate(env0_1.get(), [0, 1], [75, 0]), binding])]);
object3.transform = [object4];
return object3;
}
function _fun104086() { // fn#104086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2597, offset: 0x022847ab, size: 95 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var showShareActionSheet;
var moduleValue2;
if (env0_2) {
value2 = environment.__proto__;
moduleValue = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue.showShareActionSheet;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
Reflect.apply(showShareActionSheet, moduleValue, [{message: moduleValue2.getQuestUrl(quest.id)},
'Video Quest Modal']);
}
}
function _fun104087() { // fn#104087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2724, offset: 0x0228480a, size: 45 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
}
global.__d(_fun104081, 13629, [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212,
9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798,
2]) /* metro module 13629, dependencies: [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212, 9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,23 @@
/* Metro module 13597; source: modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx; dependencies: [31, 44, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun103345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:6, offset: 0x02263366, size: 152 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
let value = ReactModule;
value = value.createContext({'quest': null, 'videoSessionId': ''});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx');
exports.default = value;
exports.useVideoQuestModalContext = useVideoQuestModalContext;
function useVideoQuestModalContext() { // fn#103346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:302, offset: 0x022633fe, size: 64 bytes, params: 1, frame: 14
const value2 = env0_2.useContext(env0_3);
(Module00044)(value2 != null,
'useVideoQuestModalContext must be used within a VideoQuestModalProvider');
return value2;
}
}
function useVideoQuestModalContext() { // fn#103346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:302, offset: 0x022633fe, size: 64 bytes, params: 1, frame: 14
const value2 = env0_2.useContext(env0_3);
(importDefault(44) /* metro dependency 44 */)(value2 != null,
'useVideoQuestModalContext must be used within a VideoQuestModalProvider');
return value2;
}
global.__d(_fun103345, 13597, [31, 44, 2]) /* metro module 13597, dependencies: [31, 44, 2] */;
@@ -1,91 +1,108 @@
/* Metro module 13625; source: modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Module03769Module from '../../../../by-id/module-03769.js'; /* Metro dependency 3769 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as VideoQuestUIStoreModule from '../../VideoQuestUIStore.tsx'; /* Metro dependency 7095 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
function _fun104063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:6, offset: 0x02282e41, size: 365 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(7095) /* metro dependency 7095: VideoQuestUIStore */).useVideoQuestUIStore;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
object = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'flex-start'}};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
object2.subheader = {opacity: 0.6};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
const PX_4 = (Native).space.PX_4;
object.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
object.subheader = {opacity: 0.6};
const BLACK = (Native).colors.BLACK;
object.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
'textShadowRadius': 15, textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
exports.default = VideoQuestModalHeader;
}
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
let r17 = withTextShadow !== undefined && withTextShadow;
const styles = useStyles();
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value6 = useVideoQuestUIStore(_fun104065, (require(3769) /* metro dependency 3769 */).shallow);
const userStatus = quest.userStatus;
const value7 = userStatus?.completedAt != null;
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7);
const items2 = [styles.videoContentHeaderWrapper, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const r7 = r17 && styles.textShadow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
const text = <Text variant="heading-md/semibold" color="white" style={r7}>{Reflect.apply(formatToPlainString, intl,
[EQa7os, {questName: quest.config.messages.questName}])}</Text>;
r17 = r17 && styles.textShadow;
return (
<View style={items2}>
<View style={styles.videoContentHeading}>
{text}
<Text
variant="heading-sm/semibold"
color="white"
accessibilityLabel={r12}
style={[styles.subheader, r17]}
>
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
</Text>
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
let r17 = withTextShadow !== undefined && withTextShadow;
const styles = useStyles();
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
const value5 = (QuestHooksModule).useQuestTaskDetails(quest);
const value6 = useVideoQuestUIStore(_fun104065, (Module03769Module).shallow);
const userStatus = quest.userStatus;
const value7 = userStatus?.completedAt != null;
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7);
const items2 = [styles.videoContentHeaderWrapper, style];
const Text = (TextModule).Text;
const r7 = r17 && styles.textShadow;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const EQa7os = (IndexNativeModule).t.EQa7os;
const text = (
<Text
variant="heading-md/semibold"
color="white"
style={r7}
>
{Reflect.apply(formatToPlainString, intl, [EQa7os, {questName: quest.config.messages.questName}])}
</Text>
);
r17 = r17 && styles.textShadow;
return (
<View style={items2}>
<View style={styles.videoContentHeading}>
{text}
<Text
variant="heading-sm/semibold"
color="white"
accessibilityLabel={r12}
style={[styles.subheader, r17]}
>
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
</Text>
</View>
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
</View>
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
</View>
);
}
);
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
var r0;
var object;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object = {};
progressSeconds = env0_1.progressSeconds;
object.timestampSec = progressSeconds;
object.duration = env0_1.targetSeconds;
progressSeconds = env0_1.progressSeconds;
object.maxTimestampSec = progressSeconds;
r0 = object;
}
let value = environment.__proto__;
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
value, [r0.duration - r0.timestampSec]);
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
}
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
var r0;
var object2;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object2 = {};
progressSeconds = env0_1.progressSeconds;
object2.timestampSec = progressSeconds;
object2.duration = env0_1.targetSeconds;
progressSeconds = env0_1.progressSeconds;
object2.maxTimestampSec = progressSeconds;
r0 = object2;
}
let value = environment.__proto__;
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
value, [r0.duration - r0.timestampSec]);
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
}
global.__d(_fun104063, 13625, [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618,
2]) /* metro module 13625, dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */;
@@ -1,67 +1,81 @@
/* Metro module 13619; source: modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx; dependencies: [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import QuestProgressIndicator from '../QuestProgressIndicator.tsx'; /* Metro dependency 13620 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestUtilsNativeModule from '../QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
function _fun104020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:6, offset: 0x0227bb82, size: 204 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({questName: {textAlign: 'center'}});
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({questName: {textAlign: 'center'}});
value = value.memo(VideoQuestModalReward);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx');
exports.default = value;
}
function VideoQuestModalReward({style, withQuestName, withRewardAvailableCopy, size, withRewardTileAnimation}) { // fn#104021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:204, offset: 0x0227bc4e, size: 651 bytes, params: 2, frame: 32
const Text = (TextModule).Text;
var object2;
var questName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var EAYZAr;
let r10 = withQuestName === undefined || withQuestName;
let r8 = withRewardAvailableCopy === undefined || withRewardAvailableCopy;
const r21 = size === undefined ? 'lg' : size;
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
const value2 = (QuestHooksModule).useQuestTaskDetails(quest);
const value3 = env0_3.useCallback(_fun104022, [quest.id]);
const styles = useStyles();
const Stack = (StackNativeModule).Stack;
const PX_24 = (Native).space.PX_24;
const value4 = ((Component) => <Component hasConfetti quest={quest} size={r21} progress={value2.percentComplete} onPress={value3} withAnimation={withRewardTileAnimation} />)(QuestProgressIndicator);
const Stack2 = (StackNativeModule).Stack;
const PX_4 = (Native).space.PX_4;
if (r10) {
object2 = {'variant': 'heading-lg/semibold', 'color': 'text-strong'};
questName = styles.questName;
object2.style = questName;
formatToPlainString = intl.formatToPlainString;
EAYZAr = (require(1244) /* metro dependency 1244: indexNative */).t.EAYZAr;
questName = quest.config.messages.questName;
r10 = (
<Text {...object2}>
{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: questName}])}
</Text>
);
}
r8 = r8 && <Text variant="heading-sm/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wvve2'])}</Text>;
return (
<Stack
justify="center"
align="center"
spacing={PX_24}
style={style}
>
{value4}
<Stack2 align="center" spacing={PX_4}>
{r10}
{r8}
</Stack2>
</Stack>
);
function _fun104022() { // fn#104022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:481, offset: 0x0227bed9, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(QuestUtilsNativeModule).openRewardDetailsBottomSheet({questId: quest.id});
}
function VideoQuestModalReward({style, withQuestName, withRewardAvailableCopy, size, withRewardTileAnimation}) { // fn#104021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:204, offset: 0x0227bc4e, size: 651 bytes, params: 2, frame: 32
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object;
var questName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var EAYZAr;
let r10 = withQuestName === undefined || withQuestName;
let r8 = withRewardAvailableCopy === undefined || withRewardAvailableCopy;
const r21 = size === undefined ? 'lg' : size;
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value3 = env0_3.useCallback(_fun104022, [quest.id]);
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const value4 = ((Component) => <Component hasConfetti quest={quest} size={r21} progress={value2.percentComplete} onPress={value3} withAnimation={withRewardTileAnimation} />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */);
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
if (r10) {
object = {'variant': 'heading-lg/semibold', 'color': 'text-strong'};
questName = styles.questName;
object.style = questName;
formatToPlainString = intl.formatToPlainString;
EAYZAr = (require(1244) /* metro dependency 1244: indexNative */).t.EAYZAr;
questName = quest.config.messages.questName;
r10 = <Text {...object}>{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: questName}])}</Text>;
}
r8 = r8 && <Text variant="heading-sm/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wvve2'])}</Text>;
return (
<Stack
justify="center"
align="center"
spacing={PX_24}
style={style}
>
{value4}
<Stack2 align="center" spacing={PX_4}>
{r10}
{r8}
</Stack2>
</Stack>
);
}
function _fun104022() { // fn#104022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:481, offset: 0x0227bed9, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openRewardDetailsBottomSheet({questId: quest.id});
}
global.__d(_fun104020, 13619, [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244,
2]) /* metro module 13619, dependencies: [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,48 +1,53 @@
/* Metro module 13528; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx; dependencies: [31, 33, 4501, 697, 674, 5278, 4564, 2] */
import Module00674 from '../../../../by-id/module-00674.js'; /* Metro dependency 674 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun102846(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:6, offset: 0x0224b179, size: 330 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.disabled = {opacity: 0.5};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.overflow = 'hidden';
object2.container = object5;
const object6 = {};
const value3 = importDefault(674) /* metro dependency 674 */;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.disabled = {opacity: 0.5};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.overflow = 'hidden';
object.container = object3;
const object4 = {};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object6.backgroundColor = value3(BLACK).alpha(0.5).hex();
object4.backgroundColor = Module00674(BLACK).alpha(0.5).hex();
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.padding = PX_12;
object2.blur = object6;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
object4.padding = PX_12;
object.blur = object4;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun102847);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx');
exports.VideoQuestPlayerControlButton = value;
function _fun102847(a0) { // fn#102847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:348, offset: 0x0224b2c3, size: 210 bytes, params: 2, frame: 22
const style = a0.style;
const children = a0.children;
let value = Object.create(null);
value.style = 0;
value.children = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: [styles.container, value2.disabled && styles.disabled, style], ...value2};
value = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
value = ((Component) => <Component style={styles.blur} blurAmount={0.2} blurStyle="default" blurTheme="dark">{children}</Component>)(value);
return (
<PressableOpacity {...pressableOpacityProps}>
{value}
</PressableOpacity>
);
}
}
function _fun102847(a0) { // fn#102847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:348, offset: 0x0224b2c3, size: 210 bytes, params: 2, frame: 22
const style = a0.style;
const children = a0.children;
let value = Object.create(null);
value.style = 0;
value.children = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: [styles.container, value2.disabled && styles.disabled, style], ...value2};
value = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
value = ((Component) => <Component style={styles.blur} blurAmount={0.2} blurStyle="default" blurTheme="dark">{children}</Component>)(value);
return (
<PressableOpacity {...pressableOpacityProps}>
{value}
</PressableOpacity>
);
}
global.__d(_fun102846, 13528, [31, 33, 4501, 697, 674, 5278, 4564,
2]) /* metro module 13528, dependencies: [31, 33, 4501, 697, 674, 5278, 4564, 2] */;
@@ -1,466 +1,484 @@
/* Metro module 13602; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx; dependencies: [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606, 1582, 9522, 9484, 13614, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import VideoQuestUIStore from '../../VideoQuestUIStore.tsx'; /* Metro dependency 7095 */
import UseVideoQuestPlayerAnalytics from './hooks/useVideoQuestPlayerAnalytics.tsx'; /* Metro dependency 13603 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module03769Module from '../../../../by-id/module-03769.js'; /* Metro dependency 3769 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTaskUtilsModule from '../../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as AndroidRNVHttpEngineExperimentModule from '../../../media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx'; /* Metro dependency 9564 */
import * as AdVideoPlayerModule from '../AdVideoPlayer.tsx'; /* Metro dependency 13523 */
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
import * as VideoQuestCaptionsModule from './captions/VideoQuestCaptions.tsx'; /* Metro dependency 13614 */
function _fun103379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:6, offset: 0x02265caa, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const videoQuestUIStore = importDefault(7095) /* metro dependency 7095: VideoQuestUIStore */;
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun103380);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx');
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx');
const PlayerState = (AdVideoPlayerModule).PlayerState;
exports.PlayerState = PlayerState;
exports.VideoQuestPlayer = value;
}
function _fun103380({style, onLoad, onEnd, onToggleFullscreen, orientation, contentInsets, handleToggleCaptions, handleOpenTranscript, isFullscreen, externallyPaused, captionsEnabled, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset}) { // fn#103380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:186, offset: 0x02265d90, size: 1883 bytes, params: 2, frame: 57
const env0_3 = orientation;
const env0_4 = contentInsets;
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
hasCaptionAsset = hasCaptionAsset === undefined || hasCaptionAsset;
hasTranscriptAsset = hasTranscriptAsset === undefined || hasTranscriptAsset;
const {quest,
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
const value7 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const userStatus = quest.userStatus;
const value8 = userStatus?.completedAt != null;
let binding = env0_4;
const value9 = binding.useMemo(_fun103381, [quest]);
const value10 = binding.useMemo(_fun103382, [quest]);
const r17 = value10?.url != null ? (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO_HLS : (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO;
binding = env0_4;
let useState = binding.useState;
let targetSeconds = value7.targetSeconds;
const value11 = Reflect.apply(useState, binding, [targetSeconds]);
const binding2 = env0_3;
const value12 = binding2(value11, 2);
const property = value12[0];
const env0_11 = value12[1];
targetSeconds = value7.targetSeconds;
const value13 = VideoQuestUIStore(function(a0) {
return a0.setVideoProgress;
});
const value14 = VideoQuestUIStore(_fun103384, (require(3769) /* metro dependency 3769 */).shallow);
const value15 = binding.useRef(null);
useState = binding.useState;
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
const LOADING = PlayerState.LOADING;
const value16 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
const property2 = value16[0];
const env0_15 = value16[1];
const env0_16 = binding.useRef(value7.progressSeconds);
const defaultImport = importDefault(13603) /* metro dependency 13603: useVideoQuestPlayerAnalytics */;
let id = quest.id;
const {handleBufferAnalytics, handleEndAnalytics, handleErrorAnalytics, handleLoadAnalytics,
handleLoadStartAnalytics, handlePausePlaybackAnalytics, handleProgressAnalytics, handleReadyForDisplayAnalytics,
handleResumePlaybackAnalytics, handleSeekAnalytics} = defaultImport({duration: property,
isQuestCompleted: value8, playerState: property2, questId: id, videoSessionId: videoSessionId,
videoAssetId: r17, sourceQuestContent: sourceQuestContent});
const env0_27 = binding.useRef(null);
id = quest.id;
const gameTitle = quest.config.messages.gameTitle;
const r45 = value10?.url ?? value9?.url;
const defaultWatchVideoTask = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getDefaultWatchVideoTask(quest.config);
const videoTitle = defaultWatchVideoTask == null ? undefined : defaultWatchVideoTask.messages.videoTitle;
const r18 = value10?.url != null ? 'hls' : 'mp4';
const value21 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
binding = env0_4;
binding.useEffect(_fun103385, [id, gameTitle, targetSeconds, r45, videoTitle, r18]);
const value22 = binding.useCallback(_fun103387, []);
const value23 = binding.useCallback(_fun103388, [handleReadyForDisplayAnalytics]);
const value24 = binding.useCallback(_fun103389, [handleLoadAnalytics, onLoad]);
const value25 = binding.useCallback(_fun103390, [property, handleSeekAnalytics, quest.id, value13]);
const env0_33 = binding.useRef(0);
const env0_34 = binding.useRef(0);
const value26 = binding.useCallback(_fun103391, [quest, value7.taskType, handleProgressAnalytics, value13]);
const value27 = binding.useCallback(_fun103392, [property, quest, handleEndAnalytics, onEnd]);
const value28 = binding.useCallback(_fun103393, [handleLoadStartAnalytics]);
const value29 = binding.useCallback(_fun103394, [handleErrorAnalytics]);
const value30 = binding.useCallback(_fun103395, []);
const value31 = binding.useCallback(_fun103396, []);
const value32 = binding.useCallback(_fun103397, [handleResumePlaybackAnalytics]);
const value33 = binding.useCallback(_fun103398, [handlePausePlaybackAnalytics]);
const value34 = binding.useCallback(_fun103399, [handleBufferAnalytics]);
const value35 = binding.useCallback(_fun103400, [quest, captionsEnabled, contentInsets]);
const value36 = binding.useMemo(_fun103401, [value10, value9]);
const value37 = binding.useCallback(function() {
if (onToggleFullscreen != null) {
onToggleFullscreen({orientation: orientation});
}
}, [onToggleFullscreen, orientation]);
if (value36 == null) {
return null;
}
const value38 = orientation === 'landscape';
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
return (
<AdVideoPlayer
source={value36}
httpEngine={value21}
initialProgress={value14}
contentDuration={targetSeconds}
allowUnrestrictedSeeking={value8}
disableResumeOnLoad={value8}
style={style}
isFullscreen={isFullscreen}
externallyPaused={externallyPaused}
contentInsets={contentInsets}
renderCaptions={value35}
onLoadStart={value28}
onLoad={value24}
onReadyForDisplay={value23}
onSeek={value25}
onBuffer={value34}
onError={value29}
onEnd={value27}
onPlayerStateChange={value22}
onResumePlayback={value32}
onPausePlayback={value33}
onProgress={value26}
onVideoTracks={value30}
onVideoLayout={value31}
videoRef={value15}
bufferingSpinnerPlacement={value38 ? 'center' : 'top-left'}
captionsEnabled={captionsEnabled}
showCaptionsButton={value38 && hasCaptionAsset}
showTranscriptButton={value38 && hasTranscriptAsset}
showFullscreenButton={value38}
showProgress={value38}
onToggleCaptions={handleToggleCaptions}
onOpenTranscript={handleOpenTranscript}
onToggleFullscreen={value37}
/>
);
}
function _fun103381() { // fn#103381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:616, offset: 0x022664eb, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO = QuestAssetType.VIDEO_PLAYER_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO, undefined, true]);
}
function _fun103382() { // fn#103382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:716, offset: 0x02266536, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO_HLS = QuestAssetType.VIDEO_PLAYER_VIDEO_HLS;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO_HLS, undefined, true]);
}
function _fun103384({videoProgress}) { // fn#103384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1031, offset: 0x0226658c, size: 76 bytes, params: 2, frame: 4
var r0;
var object2;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object2 = {};
progressSeconds = env0_7.progressSeconds;
object2.timestampSec = progressSeconds;
object2.duration = env0_10;
progressSeconds = env0_7.progressSeconds;
object2.maxTimestampSec = progressSeconds;
r0 = object2;
}
return r0;
}
function _fun103385() { // fn#103385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1993, offset: 0x022665d8, size: 336 bytes, params: 1, frame: 17
var constants;
var binding;
var MobileMuxWrapper;
var value4;
var mobileMuxWrapper;
if (env0_30 != null) {
if (env0_30.length === 0) {
return undefined;
}
var current = env0_14.current;
if (current == null) {
return undefined;
}
var moduleValue = require(13606) /* metro dependency 13606: videoQoe */;
var getVideoQoEMetricsConfig = moduleValue.getVideoQoEMetricsConfig;
var object2 = {};
var VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
object2.location = VIDEO_MODAL_MOBILE;
if (Reflect.apply(getVideoQoEMetricsConfig, moduleValue, [object2]).externalAnalyticsEnabled) {
constants = (require(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
object2 = {};
current = env0_14.current;
object2.videoRef = current;
object2.feature = 'quests';
object2.appVersion = constants.Version;
object2.releaseChannel = constants.ReleaseChannel;
object2.contentMetadata = {contentId: env0_30, videoStreamType: env0_32, contentType: 'quests',
durationMs: 1000 * targetSeconds, title: videoTitle, questId: id, gameName: gameTitle};
binding = env0_27;
MobileMuxWrapper = (require(13606) /* metro dependency 13606: videoQoe */).MobileMuxWrapper;
value4 = Object.create(MobileMuxWrapper.prototype, {constructor: {value: MobileMuxWrapper}});
mobileMuxWrapper = new MobileMuxWrapper(object2);
binding.current = mobileMuxWrapper instanceof Object ? mobileMuxWrapper : value4;
current = env0_27.current;
current.initialize();
return _fun103386;
}
}
}
function _fun103387(a0) { // fn#103387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2596, offset: 0x02266778, size: 19 bytes, params: 2, frame: 11
env0_15(a0);
}
function _fun103388() { // fn#103388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2629, offset: 0x0226678b, size: 40 bytes, params: 1, frame: 10
handleReadyForDisplayAnalytics();
const current = env0_27.current;
if (current != null) {
current.onReadyForDisplay();
}
}
function _fun103389(a0) { // fn#103389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2715, offset: 0x022667b3, size: 199 bytes, params: 2, frame: 19
const duration = a0.duration;
const videoTracks = a0.videoTracks;
const trackId = a0.trackId;
const naturalSize = a0.naturalSize;
env0_11(duration);
handleLoadAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoad(duration);
}
if (naturalSize != null) {
current = env0_27.current;
if (current != null) {
current.updateVideoSourceDimensions(naturalSize.width, naturalSize.height);
}
}
if (videoTracks != null && videoTracks.length > 0 && trackId != null && trackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(trackId, videoTracks);
}
}
if (onLoad != null) {
onLoad(a0);
}
}
function _fun103390(a0) { // fn#103390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3045, offset: 0x0226687a, size: 131 bytes, params: 2, frame: 17
env0_16.current = a0.currentTime;
if (env0_10 > 0) {
env0_13(quest.id, a0.currentTime, env0_10);
}
handleSeekAnalytics();
let current = env0_27.current;
if (current != null) {
current.updatePlayheadTime(a0.currentTime);
}
current = env0_27.current;
if (current != null) {
current.onSeek();
}
}
function _fun103391(a0) { // fn#103391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3271, offset: 0x022668fd, size: 345 bytes, params: 2, frame: 17
var value2;
var moduleValue;
var sendVideoProgress;
var questBinding;
var handleProgressAnalyticsBinding;
var progress;
var seekableDuration;
var value5;
var moduleValue2;
var updateOptimisticProgress;
var id;
var taskType;
let binding = env0_16;
let currentTime = a0.currentTime;
binding.current = currentTime;
currentTime = a0.currentTime;
let current = env0_33.current;
if (currentTime >= current) {
value2 = environment.__proto__;
moduleValue = require(9522) /* metro dependency 9522: VideoQuestUtils */;
sendVideoProgress = moduleValue.sendVideoProgress;
questBinding = quest;
currentTime = a0.currentTime;
Reflect.apply(sendVideoProgress, moduleValue, [questBinding, currentTime]);
handleProgressAnalyticsBinding = handleProgressAnalytics;
progress = a0.progress;
seekableDuration = a0.seekableDuration;
currentTime = a0.currentTime;
handleProgressAnalyticsBinding(progress, seekableDuration, currentTime);
binding = env0_33;
currentTime = a0.currentTime;
binding.current = currentTime + 6 + 2 * global.Math.random();
}
currentTime = a0.currentTime;
if (currentTime >= env0_34.current) {
value5 = environment.__proto__;
moduleValue2 = require(9484) /* metro dependency 9484: QuestActionCreators */;
updateOptimisticProgress = moduleValue2.updateOptimisticProgress;
function _fun103380({style, onLoad, onEnd, onToggleFullscreen, orientation, contentInsets, handleToggleCaptions, handleOpenTranscript, isFullscreen, externallyPaused, captionsEnabled, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset}) { // fn#103380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:186, offset: 0x02265d90, size: 1883 bytes, params: 2, frame: 57
const orientation2 = orientation;
const contentInsets2 = contentInsets;
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
hasCaptionAsset = hasCaptionAsset === undefined || hasCaptionAsset;
hasTranscriptAsset = hasTranscriptAsset === undefined || hasTranscriptAsset;
const {quest,
videoSessionId} = (VideoQuestModalContextModule).useVideoQuestModalContext();
const value7 = (QuestHooksModule).useQuestTaskDetails(quest);
const userStatus = quest.userStatus;
const value8 = userStatus?.completedAt != null;
let binding = contentInsets2;
const value9 = binding.useMemo(_fun103381, [quest]);
const value10 = binding.useMemo(_fun103382, [quest]);
const r17 = value10?.url != null ? (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO_HLS : (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO;
binding = contentInsets2;
let useState = binding.useState;
let targetSeconds = value7.targetSeconds;
const value11 = Reflect.apply(useState, binding, [targetSeconds]);
const binding2 = orientation2;
const value12 = binding2(value11, 2);
const property = value12[0];
const env0_11 = value12[1];
targetSeconds = value7.targetSeconds;
const videoQuestUIStoreBinding = VideoQuestUIStore;
const value13 = videoQuestUIStoreBinding(function(a0) {
return a0.setVideoProgress;
});
const value14 = videoQuestUIStoreBinding(_fun103384, (Module03769Module).shallow);
const value15 = binding.useRef(null);
useState = binding.useState;
const PlayerState = (AdVideoPlayerModule).PlayerState;
const LOADING = PlayerState.LOADING;
const value16 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
const property2 = value16[0];
const env0_15 = value16[1];
const env0_16 = binding.useRef(value7.progressSeconds);
const defaultImport = UseVideoQuestPlayerAnalytics;
let id = quest.id;
const {handleBufferAnalytics, handleEndAnalytics, handleErrorAnalytics, handleLoadAnalytics,
handleLoadStartAnalytics, handlePausePlaybackAnalytics, handleProgressAnalytics, handleReadyForDisplayAnalytics,
handleResumePlaybackAnalytics, handleSeekAnalytics} = defaultImport({duration: property,
isQuestCompleted: value8, playerState: property2, questId: id, videoSessionId: videoSessionId,
videoAssetId: r17, sourceQuestContent: sourceQuestContent});
const env0_27 = binding.useRef(null);
id = quest.id;
taskType = env0_7.taskType;
currentTime = a0.currentTime;
Reflect.apply(updateOptimisticProgress, moduleValue2, [id, taskType, currentTime]);
binding = env0_34;
currentTime = a0.currentTime;
binding.current = currentTime + 1;
}
env0_13(quest.id, a0.currentTime, a0.seekableDuration);
current = env0_27.current;
if (current != null) {
current.onProgress(a0.currentTime);
}
}
function _fun103392() { // fn#103392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3722, offset: 0x02266a56, size: 127 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9522) /* metro dependency 9522: VideoQuestUtils */;
value.sendVideoProgress(quest, env0_10);
handleEndAnalytics();
let current = env0_27.current;
if (current != null) {
current.onProgress(env0_10);
}
current = env0_27.current;
if (current != null) {
current.onEnd();
}
if (onEnd != null) {
onEnd();
}
}
function _fun103393() { // fn#103393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3885, offset: 0x02266ad5, size: 63 bytes, params: 1, frame: 12
handleLoadStartAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoadStart();
}
current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103394(a0) { // fn#103394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4000, offset: 0x02266b14, size: 45 bytes, params: 2, frame: 12
handleErrorAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onError(a0);
}
}
function _fun103395({videoTracks, selectedVideoTrackId}) { // fn#103395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4075, offset: 0x02266b41, size: 91 bytes, params: 2, frame: 15
var current;
if (videoTracks != null && videoTracks.length > 0 && selectedVideoTrackId != null && selectedVideoTrackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(selectedVideoTrackId, videoTracks);
const gameTitle = quest.config.messages.gameTitle;
const r45 = value10?.url ?? value9?.url;
const defaultWatchVideoTask = (QuestTaskUtilsModule).getDefaultWatchVideoTask(quest.config);
const videoTitle = defaultWatchVideoTask == null ? undefined : defaultWatchVideoTask.messages.videoTitle;
const r18 = value10?.url != null ? 'hls' : 'mp4';
const value21 = (AndroidRNVHttpEngineExperimentModule).useRnvHttpEngine();
binding = contentInsets2;
binding.useEffect(_fun103385, [id, gameTitle, targetSeconds, r45, videoTitle, r18]);
const value22 = binding.useCallback(_fun103387, []);
const value23 = binding.useCallback(_fun103388, [handleReadyForDisplayAnalytics]);
const value24 = binding.useCallback(_fun103389, [handleLoadAnalytics, onLoad]);
const value25 = binding.useCallback(_fun103390, [property, handleSeekAnalytics, quest.id, value13]);
const env0_33 = binding.useRef(0);
const env0_34 = binding.useRef(0);
const value26 = binding.useCallback(_fun103391, [quest, value7.taskType, handleProgressAnalytics, value13]);
const value27 = binding.useCallback(_fun103392, [property, quest, handleEndAnalytics, onEnd]);
const value28 = binding.useCallback(_fun103393, [handleLoadStartAnalytics]);
const value29 = binding.useCallback(_fun103394, [handleErrorAnalytics]);
const value30 = binding.useCallback(_fun103395, []);
const value31 = binding.useCallback(_fun103396, []);
const value32 = binding.useCallback(_fun103397, [handleResumePlaybackAnalytics]);
const value33 = binding.useCallback(_fun103398, [handlePausePlaybackAnalytics]);
const value34 = binding.useCallback(_fun103399, [handleBufferAnalytics]);
const value35 = binding.useCallback(_fun103400, [quest, captionsEnabled, contentInsets]);
const value36 = binding.useMemo(_fun103401, [value10, value9]);
const value37 = binding.useCallback(function() {
if (onToggleFullscreen != null) {
onToggleFullscreen({orientation: orientation});
}
}, [onToggleFullscreen, orientation]);
if (value36 == null) {
return null;
}
const value38 = orientation === 'landscape';
const AdVideoPlayer = (AdVideoPlayerModule).AdVideoPlayer;
return (
<AdVideoPlayer
source={value36}
httpEngine={value21}
initialProgress={value14}
contentDuration={targetSeconds}
allowUnrestrictedSeeking={value8}
disableResumeOnLoad={value8}
style={style}
isFullscreen={isFullscreen}
externallyPaused={externallyPaused}
contentInsets={contentInsets}
renderCaptions={value35}
onLoadStart={value28}
onLoad={value24}
onReadyForDisplay={value23}
onSeek={value25}
onBuffer={value34}
onError={value29}
onEnd={value27}
onPlayerStateChange={value22}
onResumePlayback={value32}
onPausePlayback={value33}
onProgress={value26}
onVideoTracks={value30}
onVideoLayout={value31}
videoRef={value15}
bufferingSpinnerPlacement={value38 ? 'center' : 'top-left'}
captionsEnabled={captionsEnabled}
showCaptionsButton={value38 && hasCaptionAsset}
showTranscriptButton={value38 && hasTranscriptAsset}
showFullscreenButton={value38}
showProgress={value38}
onToggleCaptions={handleToggleCaptions}
onOpenTranscript={handleOpenTranscript}
onToggleFullscreen={value37}
/>
);
function _fun103381() { // fn#103381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:616, offset: 0x022664eb, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO = QuestAssetType.VIDEO_PLAYER_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO, undefined, true]);
}
}
}
function _fun103396(a0) { // fn#103396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4242, offset: 0x02266b9c, size: 103 bytes, params: 2, frame: 15
var width;
var height;
var current;
const value = undefined;
let layout = a0 == null || a0.nativeEvent == null ? value : a0.nativeEvent.layout;
if (layout != null) {
layout = a0.nativeEvent.layout;
width = layout.width;
height = layout.height;
if (width > 0) {
if (height > 0) {
function _fun103382() { // fn#103382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:716, offset: 0x02266536, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_VIDEO_HLS = QuestAssetType.VIDEO_PLAYER_VIDEO_HLS;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO_HLS, undefined, true]);
}
function _fun103384({videoProgress}) { // fn#103384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1031, offset: 0x0226658c, size: 76 bytes, params: 2, frame: 4
var r0;
var object;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object = {};
progressSeconds = JsxRuntimeModule.jsx.progressSeconds;
object.timestampSec = progressSeconds;
object.duration = env0_10;
progressSeconds = JsxRuntimeModule.jsx.progressSeconds;
object.maxTimestampSec = progressSeconds;
r0 = object;
}
return r0;
}
function _fun103385() { // fn#103385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1993, offset: 0x022665d8, size: 336 bytes, params: 1, frame: 17
var constants;
var binding;
var MobileMuxWrapper;
var value4;
var mobileMuxWrapper;
if (env0_30 != null) {
if (env0_30.length === 0) {
return undefined;
}
var current = env0_14.current;
if (current == null) {
return undefined;
}
var moduleValue = require(13606) /* metro dependency 13606: videoQoe */;
var getVideoQoEMetricsConfig = moduleValue.getVideoQoEMetricsConfig;
var object = {};
var VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
object.location = VIDEO_MODAL_MOBILE;
if (Reflect.apply(getVideoQoEMetricsConfig, moduleValue, [object]).externalAnalyticsEnabled) {
constants = (require(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
object = {};
current = env0_14.current;
object.videoRef = current;
object.feature = 'quests';
object.appVersion = constants.Version;
object.releaseChannel = constants.ReleaseChannel;
object.contentMetadata = {contentId: env0_30, videoStreamType: env0_32, contentType: 'quests',
durationMs: 1000 * targetSeconds, title: videoTitle, questId: id, gameName: gameTitle};
binding = env0_27;
MobileMuxWrapper = (require(13606) /* metro dependency 13606: videoQoe */).MobileMuxWrapper;
value4 = Object.create(MobileMuxWrapper.prototype, {constructor: {value: MobileMuxWrapper}});
mobileMuxWrapper = new MobileMuxWrapper(object);
binding.current = mobileMuxWrapper instanceof Object ? mobileMuxWrapper : value4;
current = env0_27.current;
current.initialize();
return _fun103386;
}
}
function _fun103386() { // fn#103386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2455, offset: 0x02266728, size: 80 bytes, params: 1, frame: 13
let current = env1_27.current;
if (current != null) {
current = env1_27.current;
current.onProgress(env1_16.current);
current = env1_27.current;
current.destroy();
env1_27.current = null;
}
}
}
function _fun103387(a0) { // fn#103387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2596, offset: 0x02266778, size: 19 bytes, params: 2, frame: 11
env0_15(a0);
}
function _fun103388() { // fn#103388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2629, offset: 0x0226678b, size: 40 bytes, params: 1, frame: 10
handleReadyForDisplayAnalytics();
const current = env0_27.current;
if (current != null) {
current.onReadyForDisplay();
}
}
function _fun103389(a0) { // fn#103389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2715, offset: 0x022667b3, size: 199 bytes, params: 2, frame: 19
const duration = a0.duration;
const videoTracks = a0.videoTracks;
const trackId = a0.trackId;
const naturalSize = a0.naturalSize;
env0_11(duration);
handleLoadAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoad(duration);
}
if (naturalSize != null) {
current = env0_27.current;
if (current != null) {
current.updateVideoDimensions(width, height);
current.updateVideoSourceDimensions(naturalSize.width, naturalSize.height);
}
}
if (videoTracks != null && videoTracks.length > 0 && trackId != null && trackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(trackId, videoTracks);
}
}
if (onLoad != null) {
onLoad(a0);
}
}
function _fun103390(a0) { // fn#103390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3045, offset: 0x0226687a, size: 131 bytes, params: 2, frame: 17
env0_16.current = a0.currentTime;
if (env0_10 > 0) {
env0_13(quest.id, a0.currentTime, env0_10);
}
handleSeekAnalytics();
let current = env0_27.current;
if (current != null) {
current.updatePlayheadTime(a0.currentTime);
}
current = env0_27.current;
if (current != null) {
current.onSeek();
}
}
function _fun103391(a0) { // fn#103391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3271, offset: 0x022668fd, size: 345 bytes, params: 2, frame: 17
var value2;
var moduleValue;
var sendVideoProgress;
var questBinding;
var handleProgressAnalyticsBinding;
var progress;
var seekableDuration;
var value5;
var moduleValue2;
var updateOptimisticProgress;
var id;
var taskType;
let binding = env0_16;
let currentTime = a0.currentTime;
binding.current = currentTime;
currentTime = a0.currentTime;
let current = env0_33.current;
if (currentTime >= current) {
value2 = environment.__proto__;
moduleValue = require(9522) /* metro dependency 9522: VideoQuestUtils */;
sendVideoProgress = moduleValue.sendVideoProgress;
questBinding = quest;
currentTime = a0.currentTime;
Reflect.apply(sendVideoProgress, moduleValue, [questBinding, currentTime]);
handleProgressAnalyticsBinding = handleProgressAnalytics;
progress = a0.progress;
seekableDuration = a0.seekableDuration;
currentTime = a0.currentTime;
handleProgressAnalyticsBinding(progress, seekableDuration, currentTime);
binding = env0_33;
currentTime = a0.currentTime;
binding.current = currentTime + 6 + 2 * global.Math.random();
}
currentTime = a0.currentTime;
if (currentTime >= env0_34.current) {
value5 = environment.__proto__;
moduleValue2 = require(9484) /* metro dependency 9484: QuestActionCreators */;
updateOptimisticProgress = moduleValue2.updateOptimisticProgress;
id = quest.id;
taskType = JsxRuntimeModule.jsx.taskType;
currentTime = a0.currentTime;
Reflect.apply(updateOptimisticProgress, moduleValue2, [id, taskType, currentTime]);
binding = env0_34;
currentTime = a0.currentTime;
binding.current = currentTime + 1;
}
env0_13(quest.id, a0.currentTime, a0.seekableDuration);
current = env0_27.current;
if (current != null) {
current.onProgress(a0.currentTime);
}
}
function _fun103392() { // fn#103392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3722, offset: 0x02266a56, size: 127 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9522) /* metro dependency 9522: VideoQuestUtils */;
value.sendVideoProgress(quest, env0_10);
handleEndAnalytics();
let current = env0_27.current;
if (current != null) {
current.onProgress(env0_10);
}
current = env0_27.current;
if (current != null) {
current.onEnd();
}
if (onEnd != null) {
onEnd();
}
}
function _fun103393() { // fn#103393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3885, offset: 0x02266ad5, size: 63 bytes, params: 1, frame: 12
handleLoadStartAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoadStart();
}
current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103394(a0) { // fn#103394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4000, offset: 0x02266b14, size: 45 bytes, params: 2, frame: 12
handleErrorAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onError(a0);
}
}
function _fun103395({videoTracks, selectedVideoTrackId}) { // fn#103395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4075, offset: 0x02266b41, size: 91 bytes, params: 2, frame: 15
var current;
if (videoTracks != null && videoTracks.length > 0 && selectedVideoTrackId != null && selectedVideoTrackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(selectedVideoTrackId, videoTracks);
}
}
}
function _fun103396(a0) { // fn#103396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4242, offset: 0x02266b9c, size: 103 bytes, params: 2, frame: 15
var width;
var height;
var current;
const value = undefined;
let layout = a0 == null || a0.nativeEvent == null ? value : a0.nativeEvent.layout;
if (layout != null) {
layout = a0.nativeEvent.layout;
width = layout.width;
height = layout.height;
if (width > 0) {
if (height > 0) {
current = env0_27.current;
if (current != null) {
current.updateVideoDimensions(width, height);
}
}
}
}
return value;
}
function _fun103397() { // fn#103397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4451, offset: 0x02266c03, size: 40 bytes, params: 1, frame: 10
handleResumePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103398() { // fn#103398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4526, offset: 0x02266c2b, size: 40 bytes, params: 1, frame: 10
handlePausePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPause();
}
}
function _fun103399(a0) { // fn#103399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4602, offset: 0x02266c53, size: 45 bytes, params: 2, frame: 12
handleBufferAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onBuffer(a0);
}
}
function _fun103400(a0) { // fn#103400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4678, offset: 0x02266c80, size: 234 bytes, params: 2, frame: 20
let value = environment.__proto__;
value = undefined;
const VideoQuestCaptions = (VideoQuestCaptionsModule).VideoQuestCaptions;
const questBinding = quest;
const captionsEnabledBinding = captionsEnabled;
const top = contentInsets == null ? value : contentInsets.top;
const value3 = 0;
return (
<VideoQuestCaptions
quest={questBinding}
currentTime={a0}
visible={captionsEnabledBinding}
style={{
top: top ?? value3,
bottom: (contentInsets == null ? value : contentInsets.bottom) ?? value3,
left: (contentInsets == null ? value : contentInsets.left) ?? value3,
right: (contentInsets == null ? value : contentInsets.right) ?? value3,
}}
/>
);
}
function _fun103401() { // fn#103401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4967, offset: 0x02266d6a, size: 64 bytes, params: 1, frame: 6
var url;
var r0;
const value2 = null;
if (value2 == env0_8) {
r0 = value2;
} else {
url = value2 == env0_9 ? undefined : env0_9.url;
url = value2 == url ? env0_8.url : url;
r0 = {uri: url};
}
return r0;
}
}
return value;
}
function _fun103397() { // fn#103397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4451, offset: 0x02266c03, size: 40 bytes, params: 1, frame: 10
handleResumePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103398() { // fn#103398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4526, offset: 0x02266c2b, size: 40 bytes, params: 1, frame: 10
handlePausePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPause();
}
}
function _fun103399(a0) { // fn#103399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4602, offset: 0x02266c53, size: 45 bytes, params: 2, frame: 12
handleBufferAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onBuffer(a0);
}
}
function _fun103400(a0) { // fn#103400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4678, offset: 0x02266c80, size: 234 bytes, params: 2, frame: 20
let value = environment.__proto__;
value = undefined;
const VideoQuestCaptions = (require(13614) /* metro dependency 13614: VideoQuestCaptions */).VideoQuestCaptions;
const questBinding = quest;
const captionsEnabledBinding = captionsEnabled;
const top = contentInsets == null ? value : contentInsets.top;
const value3 = 0;
return (
<VideoQuestCaptions
quest={questBinding}
currentTime={a0}
visible={captionsEnabledBinding}
style={{top: top ?? value3, bottom: (contentInsets == null ? value : contentInsets.bottom) ?? value3,
left: (contentInsets == null ? value : contentInsets.left) ?? value3,
right: (contentInsets == null ? value : contentInsets.right) ?? value3}}
/>
);
}
function _fun103401() { // fn#103401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4967, offset: 0x02266d6a, size: 64 bytes, params: 1, frame: 6
var url;
var r0;
const value2 = null;
if (value2 == env0_8) {
r0 = value2;
} else {
url = value2 == env0_9 ? undefined : env0_9.url;
url = value2 == url ? env0_8.url : url;
r0 = {uri: url};
}
return r0;
}
function _fun103386() { // fn#103386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2455, offset: 0x02266728, size: 80 bytes, params: 1, frame: 13
let current = env1_27.current;
if (current != null) {
current = env1_27.current;
current.onProgress(env1_16.current);
current = env1_27.current;
current.destroy();
env1_27.current = null;
}
}
global.__d(_fun103379, 13602, [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606,
1582, 9522, 9484, 13614,
2]) /* metro module 13602, dependencies: [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606, 1582, 9522, 9484, 13614, 2] */;
@@ -1,11 +1,22 @@
/* Metro module 13626; source: modules/quests/native/VideoQuestModal/VideoQuestTranscriptActionSheet.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 1585, 9495, 9484, 6805, 6758, 1244, 6277, 4572, 4573, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as VideoQuestUIStoreModule from '../../VideoQuestUIStore.tsx'; /* Metro dependency 7095 */
import * as AssetUtilsModule from '../../lib/AssetUtils.tsx'; /* Metro dependency 9495 */
function _fun104066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:6, offset: 0x022832c5, size: 280 bytes, params: 8, frame: 21
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 */).ActivityIndicator;
let value = require(7095) /* metro dependency 7095: VideoQuestUIStore */;
let value = VideoQuestUIStoreModule;
const env0_5 = value.FetchStatus;
const env0_6 = value.useVideoQuestUIStore;
value = require(33) /* metro dependency 33 */;
@@ -13,90 +24,98 @@ function _fun104066(global, require, importDefault, importAll, module, exports,
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const PX_8 = (Native).space.PX_8;
const env0_9 = Reflect.apply(createStyles, value, [{content: {paddingBottom: PX_8}, loadingSpinner: {height: 100}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestTranscriptActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestTranscriptActionSheet.tsx');
exports.default = VideoQuestTranscriptActionSheet;
}
function VideoQuestTranscriptActionSheet({quest}) { // fn#104067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:429, offset: 0x022833dd, size: 489 bytes, params: 2, frame: 27
var object3;
const styles = useStyles();
const value3 = useVideoQuestUIStore(function(a0) {
return a0.transcript;
});
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_3;
binding.useEffect(_fun104069, [quest, value3]);
const value4 = binding.useMemo(_fun104070, [value3?.text]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object3 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1YS80z'])} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object2 = {paddingBottom: bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const fetchStatus = value3?.fetchStatus;
const FETCHING = FetchStatus.FETCHING;
const items2 = [fetchStatus === FETCHING && <ActivityIndicator style={styles.loadingSpinner} size="large" />];
items2[1] = value4.length > 0 && value4.map(_fun104073);
return (
<ActionSheet {...object3}>
<BottomSheetScrollView contentContainerStyle={object2}>
<Stack spacing={16} style={styles.content}>
{items2}
</Stack>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun104069() { // fn#104069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:547, offset: 0x022835d1, size: 239 bytes, params: 1, frame: 20
let value = environment.__proto__;
const value2 = undefined;
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = assetUtilsModule.getQuestAsset;
const questBinding = quest;
const QuestAssetType = assetUtilsModule.QuestAssetType;
const VIDEO_PLAYER_TRANSCRIPT = QuestAssetType.VIDEO_PLAYER_TRANSCRIPT;
const value4 = Reflect.apply(getQuestAsset, assetUtilsModule, [questBinding, VIDEO_PLAYER_TRANSCRIPT, value2, true]);
let r3 = env0_1 == null || env0_1.questId !== quest.id;
r3 = !r3 ? env0_1.fetchStatus === FetchStatus.NONE : r3;
r3 = !r3 ? env0_1.fetchStatus === FetchStatus.SUCCESS && (value4 == null ? value2 : value4.url) !== env0_1.url : r3;
if (r3) {
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
value.fetchVideoTranscript(quest, true);
}
return value2;
}
function _fun104070() { // fn#104070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:813, offset: 0x022836c0, size: 98 bytes, params: 1, frame: 13
var r0;
var value;
if (env0_1?.text == null) {
r0 = [];
} else {
value = env0_1.text.split('\n');
value = value.map(function(a0) {
return a0.trim();
function VideoQuestTranscriptActionSheet({quest}) { // fn#104067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:429, offset: 0x022833dd, size: 489 bytes, params: 2, frame: 27
var object4;
const styles = useStyles();
const value3 = useVideoQuestUIStore(function(a0) {
return a0.transcript;
});
value = value.filter(_fun104072);
r0 = value;
const bottom = (UseSafeAreaInsetsNative)().bottom;
ReactModule.useEffect(_fun104069, [quest, value3]);
const value4 = ReactModule.useMemo(_fun104070, [value3?.text]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
object4 = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object4.header = (
<BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1YS80z'])} />
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const object = {paddingBottom: bottom};
const Stack = (StackNativeModule).Stack;
const fetchStatus = value3?.fetchStatus;
const FETCHING = FetchStatus.FETCHING;
const items2 = [
fetchStatus === FETCHING && <ActivityIndicator style={styles.loadingSpinner} size="large" />,
];
items2[1] = value4.length > 0 && value4.map(_fun104073);
return (
<ActionSheet {...object4}>
<BottomSheetScrollView contentContainerStyle={object}>
<Stack spacing={16} style={styles.content}>
{items2}
</Stack>
</BottomSheetScrollView>
</ActionSheet>
);
function _fun104069() { // fn#104069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:547, offset: 0x022835d1, size: 239 bytes, params: 1, frame: 20
let value = environment.__proto__;
const value2 = undefined;
const getQuestAsset = AssetUtilsModule.getQuestAsset;
const questBinding = quest;
const QuestAssetType = AssetUtilsModule.QuestAssetType;
const VIDEO_PLAYER_TRANSCRIPT = QuestAssetType.VIDEO_PLAYER_TRANSCRIPT;
const value4 = Reflect.apply(getQuestAsset, AssetUtilsModule, [questBinding, VIDEO_PLAYER_TRANSCRIPT, value2, true]);
let r3 = env0_1 == null || env0_1.questId !== quest.id;
r3 = !r3 ? env0_1.fetchStatus === FetchStatus.NONE : r3;
r3 = !r3 ? env0_1.fetchStatus === FetchStatus.SUCCESS && (value4 == null ? value2 : value4.url) !== env0_1.url : r3;
if (r3) {
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
value.fetchVideoTranscript(quest, true);
}
return value2;
}
function _fun104070() { // fn#104070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:813, offset: 0x022836c0, size: 98 bytes, params: 1, frame: 13
var r0;
var value;
if (env0_1?.text == null) {
r0 = [];
} else {
value = env0_1.text.split('\n');
value = value.map(function(a0) {
return a0.trim();
});
value = value.filter(_fun104072);
r0 = value;
}
return r0;
}
function _fun104073(a0, a1) { // fn#104073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:1329, offset: 0x02283722, size: 67 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="heading-md/normal"
color="text-muted"
key={a1}
>
{a0}
</Text>
);
}
}
return r0;
}
function _fun104073(a0, a1) { // fn#104073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:1329, offset: 0x02283722, size: 67 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="heading-md/normal"
color="text-muted"
key={a1}
>
{a0}
</Text>
);
function _fun104072({length}) { // fn#104072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:896, offset: 0x00d88c66, size: 16 bytes, params: 2, frame: 2
return length > 0;
}
global.__d(_fun104066, 13626, [31, 27, 7095, 33, 4501, 697, 1585, 9495, 9484, 6805, 6758, 1244, 6277, 4572, 4573,
2]) /* metro module 13626, dependencies: [31, 27, 7095, 33, 4501, 697, 1585, 9495, 9484, 6805, 6758, 1244, 6277, 4572, 4573, 2] */;
@@ -1,67 +1,83 @@
/* Metro module 13614; source: modules/quests/native/VideoQuestModal/captions/VideoQuestCaptions.tsx; dependencies: [31, 27, 33, 4501, 697, 674, 13615, 13617, 4564, 4573, 2] */
import Module00674 from '../../../../../by-id/module-00674.js'; /* Metro dependency 674 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseVideoQuestCaptionsModule from '../hooks/useVideoQuestCaptions.tsx'; /* Metro dependency 13615 */
function _fun103994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:6, offset: 0x0227aa56, size: 462 bytes, params: 8, frame: 25
var object4;
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 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'position': 'absolute', 'bottom': null, 'left': null, 'right': null, 'alignItems': 'center',
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'absolute', 'bottom': null, 'left': null, 'right': null, 'alignItems': 'center',
'justifyContent': 'flex-end'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.bottom = PX_32;
object2.bottom = PX_32;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.left = PX_16;
object2.left = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.right = PX_16;
object4.container = object5;
const object6 = {};
const value2 = importDefault(674) /* metro dependency 674 */;
object2.right = PX_16;
object.container = object2;
const object3 = {};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object6.backgroundColor = value2(BLACK).alpha(0.35).hex();
object3.backgroundColor = Module00674(BLACK).alpha(0.35).hex();
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.padding = PX_8;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.overflow = 'hidden';
object4.captionBox = object6;
object3.padding = PX_8;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.overflow = 'hidden';
object.captionBox = object3;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object4.captionText = {color: WHITE, textAlign: 'center'};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/captions/VideoQuestCaptions.tsx');
object.captionText = {color: WHITE, textAlign: 'center'};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/captions/VideoQuestCaptions.tsx');
exports.VideoQuestCaptions = VideoQuestCaptions;
}
function VideoQuestCaptions({quest, currentTime, style, visible}) { // fn#103995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:663, offset: 0x0227ac24, size: 341 bytes, params: 2, frame: 21
visible = visible === undefined || visible;
const styles = useStyles();
const {captions,
status} = (require(13615) /* metro dependency 13615: useVideoQuestCaptions */).useVideoQuestCaptions(quest);
const value3 = env0_3.useMemo(_fun103996, [captions, currentTime, visible]);
return status !== 'success' || value3 == null ? null : <View style={[styles.container,
style]} importantForAccessibility="no-hide-descendants" accessibilityRole="none" accessible={false}>{((Component) => <Component style={styles.captionBox} blurTheme="dark" blurStyle="default" blurAmount={0.2}>{((Text) => <Text variant="heading-sm/medium" style={styles.captionText}>{value3.text}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</Component>)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}</View>;
}
function _fun103996() { // fn#103996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:794, offset: 0x0227ad79, size: 74 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const captionsBinding = captions;
const value2 = null;
if (value2 != captionsBinding) {
if (visible) {
value3 = environment.__proto__;
moduleValue = require(13617) /* metro dependency 13617: VideoQuestCaptionsUtils */;
r0 = moduleValue.findActiveCaption(captions, currentTime);
} else {
r0 = value2;
function VideoQuestCaptions({quest, currentTime, style, visible}) { // fn#103995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:663, offset: 0x0227ac24, size: 341 bytes, params: 2, frame: 21
visible = visible === undefined || visible;
const styles = useStyles();
const {captions,
status} = (UseVideoQuestCaptionsModule).useVideoQuestCaptions(quest);
const value3 = ReactModule.useMemo(_fun103996, [captions, currentTime, visible]);
return (
status !== 'success' || value3 == null
? null
: (
<View
style={[styles.container, style]}
importantForAccessibility="no-hide-descendants"
accessibilityRole="none"
accessible={false}
>
{((Component) => <Component style={styles.captionBox} blurTheme="dark" blurStyle="default" blurAmount={0.2}>{((Text) => <Text variant="heading-sm/medium" style={styles.captionText}>{value3.text}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</Component>)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}
</View>
)
);
function _fun103996() { // fn#103996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:794, offset: 0x0227ad79, size: 74 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const captionsBinding = captions;
const value2 = null;
if (value2 != captionsBinding) {
if (visible) {
value3 = environment.__proto__;
moduleValue = require(13617) /* metro dependency 13617: VideoQuestCaptionsUtils */;
r0 = moduleValue.findActiveCaption(captions, currentTime);
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
} else {
r0 = value2;
}
return r0;
}
global.__d(_fun103994, 13614, [31, 27, 33, 4501, 697, 674, 13615, 13617, 4564, 4573,
2]) /* metro module 13614, dependencies: [31, 27, 33, 4501, 697, 674, 13615, 13617, 4564, 4573, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 13617; source: modules/quests/native/VideoQuestModal/captions/VideoQuestCaptionsUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun104016(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13814:6, offset: 0x0227b955, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/captions/VideoQuestCaptionsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/captions/VideoQuestCaptionsUtils.tsx');
exports.findActiveCaption = function(a0, a1) {
var r3;
var r4;
@@ -44,3 +46,4 @@ function _fun104016(global, require, importDefault, importAll, module, exports,
};
}
global.__d(_fun104016, 13617, [2]) /* metro module 13617, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
@@ -1,33 +1,39 @@
/* Metro module 13628; source: modules/quests/native/VideoQuestModal/hooks/useVideoExternallyPaused.tsx; dependencies: [3849, 8812, 4007, 9522, 566, 4497, 477, 2] */
import ActionSheetStore from '../../../../action_sheet/native/ActionSheetStore.tsx'; /* Metro dependency 3849 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NavigationRouteUtilsNativeModule from '../../../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as UseAlertStoreNativeModule from '../../../../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as ContextMenuStateNativeModule from '../../../../../design/components/ContextMenu/native/ContextMenuState.native.tsx'; /* Metro dependency 8812 */
import * as VideoQuestUtilsModule from '../../../utils/VideoQuestUtils.tsx'; /* Metro dependency 9522 */
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');
(FileImportTrackerModule).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 = (ContextMenuStateNativeModule).useActiveContextMenu();
const value4 = (NavigationRouteUtilsNativeModule).useOpenModalKey();
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 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;
}
}
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;
}
global.__d(_fun104077, 13628, [3849, 8812, 4007, 9522, 566, 4497, 477,
2]) /* metro module 13628, dependencies: [3849, 8812, 4007, 9522, 566, 4497, 477, 2] */;
@@ -1,97 +1,100 @@
/* Metro module 13615; source: modules/quests/native/VideoQuestModal/hooks/useVideoQuestCaptions.tsx; dependencies: [57, 31, 9495, 507, 13616, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as AssetUtilsModule from '../../../lib/AssetUtils.tsx'; /* Metro dependency 9495 */
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');
(FileImportTrackerModule).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 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;
let useState = ReactModule.useState;
const NONE = env0_4.NONE;
const value4 = Reflect.apply(useState, ReactModule, [NONE]);
const binding2 = env0_2;
let value = binding2(value4, 2);
const property = value[0];
const env0_1 = value[1];
useState = ReactModule.useState;
value = binding2(Reflect.apply(useState, ReactModule, [null]), 2);
const property2 = value[0];
var env0_2 = value[1];
ReactModule.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 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 _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);
}
}
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);
}
global.__d(_fun103997, 13615, [57, 31, 9495, 507, 13616,
2]) /* metro module 13615, dependencies: [57, 31, 9495, 507, 13616, 2] */;
@@ -1,403 +1,411 @@
/* 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] */
import NetworkStore from '../../../../../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import UseVideoSegmentAnalytics from '../../../../video_player/useVideoSegmentAnalytics.tsx'; /* Metro dependency 13604 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as QuestTypesModule from '../../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as DiscordVideoPlayerTypesModule from '../../../../../external/discord_common/js/packages/video-player/DiscordVideoPlayerTypes.tsx'; /* Metro dependency 7096 */
import * as AnalyticsActionsModule from '../../../lib/analytics/AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as ContentImpressionTrackerHooksModule from '../../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as VideoQuestUtilsModule from '../../../utils/VideoQuestUtils.tsx'; /* Metro dependency 9522 */
import * as UseVideoSegmentAnalyticsModule from '../../../../video_player/useVideoSegmentAnalytics.tsx'; /* Metro dependency 13604 */
import * as VideoQuestPlayerModule from '../VideoQuestPlayer.tsx'; /* Metro dependency 13605 */
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');
(FileImportTrackerModule).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
const binding = questId;
const env0_7 = binding.useRef(null);
const env0_8 = binding.useRef(null);
const value2 = (ContentImpressionTrackerHooksModule).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 = UseVideoSegmentAnalytics;
object = {getCurrentVideoTime: value4, onAnalytics: value3};
const SEGMENT_ANALYTICS_EMIT_INTERVAL_MS = (UseVideoSegmentAnalyticsModule).SEGMENT_ANALYTICS_EMIT_INTERVAL_MS;
object.emitIntervalMs = SEGMENT_ANALYTICS_EMIT_INTERVAL_MS;
const SEGMENT_ANALYTICS_MIN_DURATION_MS = (UseVideoSegmentAnalyticsModule).SEGMENT_ANALYTICS_MIN_DURATION_MS;
object.minSegmentDurationMs = SEGMENT_ANALYTICS_MIN_DURATION_MS;
value = value(object);
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]);
object = {handleBufferAnalytics: value7, handleEndAnalytics: value5};
object.handleErrorAnalytics = binding.useCallback(_fun103419, [duration, questId, videoAssetId, videoSessionId,
value2, sourceQuestContent]);
object.handleLoadAnalytics = value;
object.handleLoadStartAnalytics = value6;
object.handlePausePlaybackAnalytics = value10;
object.handleProgressAnalytics = binding.useCallback(_fun103420, [questId, videoSessionId, value2,
sourceQuestContent]);
object.handleReadyForDisplayAnalytics = value8;
object.handleResumePlaybackAnalytics = value9;
object.handleSeekAnalytics = handleSeek;
return object;
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 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 _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 _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 object;
var object2;
if (env1_7.current != null) {
value2 = environment.__proto__.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object = {};
object.questId = questId;
object.event = a0 === 'active' ? AnalyticEvents.QUEST_VIDEO_APP_FOCUSED : AnalyticEvents.QUEST_VIDEO_APP_UNFOCUSED;
object2 = {};
object2.video_timestamp_seconds = env1_7.current;
object2.video_state = playerState;
object2.video_session_id = videoSessionId;
object2.impression_id = env1_9 == null ? value3 : env1_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object]);
}
}
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 _fun103408() { // fn#103408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:802, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
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 _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 object;
var object2;
var moduleValue2;
if (env0_7.current != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object = {};
object.questId = questId;
object.event = AnalyticEvents.QUEST_VIDEO_SEGMENT_WATCHED;
object2 = {};
copyDataProperties(object2, a0, undefined);
object2['video_asset_id'] = videoAssetId;
object2['quest_completed'] = isQuestCompleted;
object2['video_duration_sec'] = duration;
moduleValue2 = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object2['video_progress'] = moduleValue2.formatVideoProgressRatio(a0.segment_end_sec, env0_7.current);
object2['video_session_id'] = videoSessionId;
object2['impression_id'] = env0_9 == null ? value3 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object]);
}
}
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 _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 _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 = (DiscordVideoPlayerTypesModule).VideoPlayerState;
const playerStateBinding = playerState;
const PlayerState = (VideoQuestPlayerModule).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 _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 trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
const object = {};
object.questId = questId;
const QUEST_VIDEO_LOADING_ENDED = AnalyticEvents.QUEST_VIDEO_LOADING_ENDED;
object.event = QUEST_VIDEO_LOADING_ENDED;
const object2 = {};
object2.video_asset_id = videoAssetId;
object2.network_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object2.duration = r6;
object2.video_session_id = videoSessionId;
object2.impression_id = value2 == env0_9 ? value5 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
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 _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 trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
const object = {};
object.questId = questId;
const QUEST_VIDEO_LOADING_STARTED = AnalyticEvents.QUEST_VIDEO_LOADING_STARTED;
object.event = QUEST_VIDEO_LOADING_STARTED;
const object2 = {};
object2.video_asset_id = videoAssetId;
object2.network_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object2.video_session_id = videoSessionId;
object2.is_hls_supported = true;
object2.impression_id = env0_9 == null ? value3 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
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 _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 object;
var object2;
var value8;
var moduleValue2;
var object3;
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;
object = {};
object.questId = questId;
object.event = AnalyticEvents.QUEST_VIDEO_BUFFERING_STARTED;
object3 = {};
object3.video_asset_id = videoAssetId;
object3.network_connection_speed = effectiveConnectionSpeed;
current = binding.current;
object3.buffer_index = current;
object3.video_session_id = videoSessionId;
object3.impression_id = env0_9 == null ? value8 : env0_9.getId();
object.properties = object3;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue2, [object]);
} 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;
object = {};
object.questId = questId;
object.event = AnalyticEvents.QUEST_VIDEO_BUFFERING_ENDED;
object2 = {};
object2.video_asset_id = videoAssetId;
object2.network_connection_speed = effectiveConnectionSpeed;
object2.duration = r9;
current = env0_15.current;
object2.buffer_index = current;
object2.video_session_id = videoSessionId;
object2.impression_id = value4 == env0_9 ? value7 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object]);
}
}
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 _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 object;
var object2;
if (env0_8.current != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object = {};
object.questId = questId;
object.event = AnalyticEvents.QUEST_VIDEO_TIME_TO_FIRST_FRAME;
object2 = {};
object2.duration_ms = global.Date.now() - env0_8.current;
object2.video_session_id = videoSessionId;
object2.video_asset_id = videoAssetId;
object2.impression_id = env0_9 == null ? value3 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object]);
}
}
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 _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 trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
const object = {};
object.questId = questId;
const QUEST_VIDEO_RESUMED = AnalyticEvents.QUEST_VIDEO_RESUMED;
object.event = QUEST_VIDEO_RESUMED;
const object2 = {};
object2.video_timestamp_seconds = env0_7.current;
const VideoPauseReason = (QuestTypesModule).VideoPauseReason;
const PAUSE_BUTTON = VideoPauseReason.PAUSE_BUTTON;
object2.pause_reason = PAUSE_BUTTON;
object2.video_session_id = videoSessionId;
object2.impression_id = env0_9 == null ? value2 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
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 _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 trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
const object = {};
object.questId = questId;
const QUEST_VIDEO_PAUSED = AnalyticEvents.QUEST_VIDEO_PAUSED;
object.event = QUEST_VIDEO_PAUSED;
const object2 = {};
object2.video_timestamp_seconds = env0_7.current;
const VideoPauseReason = (QuestTypesModule).VideoPauseReason;
const PAUSE_BUTTON = VideoPauseReason.PAUSE_BUTTON;
object2.reason = PAUSE_BUTTON;
object2.video_session_id = videoSessionId;
object2.impression_id = env0_9 == null ? value2 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
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 _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 trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
let object = {};
object.questId = questId;
const QUEST_VIDEO_ERROR = AnalyticEvents.QUEST_VIDEO_ERROR;
object.event = QUEST_VIDEO_ERROR;
const object2 = {};
object2.video_progress = VideoQuestUtilsModule.formatVideoProgressRatio(duration, env0_7.current ?? 0);
object2.video_error_type = null;
object2.video_asset_id = videoAssetId;
object2.network_connection_speed = null;
object2.video_session_id = videoSessionId;
let code = a0 == null ? value2 : a0.error.code;
object2.video_error_code = code;
object2.video_error_message = (a0 == null ? value2 : a0.error.localizedDescription) ?? (a0 == null ? value2 : a0.error.errorString);
object2.video_network_state = null;
object2.impression_id = env0_9 == null ? value2 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
code = a0 == null ? value2 : a0.error.code;
const errorException = a0 == null ? value2 : a0.error.errorException;
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;
object = {};
object.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_VIDEO_ERROR;
object.tags = ['quest_id:' + questId, 'error_type:SOURCE_ERROR'];
Reflect.apply(increment, defaultImport, [object]);
}
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 _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 trackQuestEvent = AnalyticsActionsModule.trackQuestEvent;
const object = {};
object.questId = questId;
const QUEST_VIDEO_PROGRESSED = AnalyticEvents.QUEST_VIDEO_PROGRESSED;
object.event = QUEST_VIDEO_PROGRESSED;
const object2 = {progress: a0, video_timestamp_seconds: a1};
object2.video_session_id = videoSessionId;
object2.impression_id = env0_9 == null ? value3 : env0_9.getId();
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]);
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]);
}
}
global.__d(_fun103403, 13603, [31, 27, 4401, 661, 477, 9513, 7110, 9522, 13604, 13605, 7096, 6531, 4826, 4831,
2]) /* metro module 13603, dependencies: [31, 27, 4401, 661, 477, 9513, 7110, 9522, 13604, 13605, 7096, 6531, 4826, 4831, 2] */;
@@ -1,36 +1,59 @@
/* Metro module 13529; source: modules/quests/native/VideoQuestModal/icons/SkipBackwardIcon.tsx; dependencies: [31, 33, 7744, 2] */
import Module07744 from '../../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module07744Module from '../../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun102848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13719:6, offset: 0x0224b395, size: 147 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/icons/SkipBackwardIcon.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/icons/SkipBackwardIcon.tsx');
exports.SkipBackwardIcon = SkipBackwardIcon;
function SkipBackwardIcon(a0) { // fn#102849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13719:248, offset: 0x0224b428, size: 325 bytes, params: 2, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
let object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const defaultImport = Module07744;
const defaultImportProps = {...value};
defaultImportProps['width'] = width;
defaultImportProps['height'] = height;
defaultImportProps['viewBox'] = '0 0 32 32';
defaultImportProps['fill'] = 'none';
const Path = (Module07744Module).Path;
object = [
<Path
d="M169.545 229.312v7.919l14.838-10.253v46.348h7.669v-55.434h-6.169l-16.338 11.42ZM225.979 274.576c13.087 0 21.34-11.003 21.34-28.842 0-17.756-8.253-29.093-21.34-29.093-13.004 0-21.173 11.254-21.173 29.009 0 17.923 8.169 28.926 21.173 28.926Zm0-7.335c-8.419 0-13.004-8.336-13.004-21.591 0-13.087 4.585-21.673 13.004-21.673 8.503 0 13.171 8.669 13.171 21.757 0 13.171-4.668 21.507-13.171 21.507Z"
fill={color}
fillRule="nonzero"
transform="translate(-25.102 -30.774) scale(.19361)"
/>,
];
object[1] = (
<Path
d="M137.108 31.459a160.22 160.22 0 0 0-30.316-2.894c-88.439 0-160.24 71.801-160.24 160.241 0 88.439 71.801 160.24 160.24 160.24 88.499 0 160.241-71.742 160.241-160.24h-31.365c0 71.176-57.699 128.876-128.876 128.876-71.128 0-128.876-57.748-128.876-128.876 0-71.129 57.748-128.877 128.876-128.877 8.183 0 16.347.78 24.382 2.328l5.934-30.798Z"
fill={color}
transform="matrix(-.0886 .03775 .03775 .0886 17.716 -4.317)"
/>
);
object[2] = (
<Path
d="M144.616 190.007V96.608l197.822 69.184-197.822 69.185v-44.97Z"
fill={color}
transform="matrix(-.0222 .01458 .04451 .06777 3.48 -8.53)"
/>
);
return ((Component) => <Component {...defaultImportProps}>{object}</Component>)(defaultImport);
}
}
function SkipBackwardIcon(a0) { // fn#102849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13719:248, offset: 0x0224b428, size: 325 bytes, params: 2, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
let object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const defaultImportProps = {...value};
defaultImportProps['width'] = width;
defaultImportProps['height'] = height;
defaultImportProps['viewBox'] = '0 0 32 32';
defaultImportProps['fill'] = 'none';
const Path = (require(7744) /* metro dependency 7744 */).Path;
object = [<Path d="M169.545 229.312v7.919l14.838-10.253v46.348h7.669v-55.434h-6.169l-16.338 11.42ZM225.979 274.576c13.087 0 21.34-11.003 21.34-28.842 0-17.756-8.253-29.093-21.34-29.093-13.004 0-21.173 11.254-21.173 29.009 0 17.923 8.169 28.926 21.173 28.926Zm0-7.335c-8.419 0-13.004-8.336-13.004-21.591 0-13.087 4.585-21.673 13.004-21.673 8.503 0 13.171 8.669 13.171 21.757 0 13.171-4.668 21.507-13.171 21.507Z" fill={color} fillRule="nonzero" transform="translate(-25.102 -30.774) scale(.19361)" />];
object[1] = <Path d="M137.108 31.459a160.22 160.22 0 0 0-30.316-2.894c-88.439 0-160.24 71.801-160.24 160.241 0 88.439 71.801 160.24 160.24 160.24 88.499 0 160.241-71.742 160.241-160.24h-31.365c0 71.176-57.699 128.876-128.876 128.876-71.128 0-128.876-57.748-128.876-128.876 0-71.129 57.748-128.877 128.876-128.877 8.183 0 16.347.78 24.382 2.328l5.934-30.798Z" fill={color} transform="matrix(-.0886 .03775 .03775 .0886 17.716 -4.317)" />;
object[2] = <Path d="M144.616 190.007V96.608l197.822 69.184-197.822 69.185v-44.97Z" fill={color} transform="matrix(-.0222 .01458 .04451 .06777 3.48 -8.53)" />;
return ((Component) => <Component {...defaultImportProps}>{object}</Component>)(defaultImport);
}
global.__d(_fun102848, 13529, [31, 33, 7744, 2]) /* metro module 13529, dependencies: [31, 33, 7744, 2] */;
@@ -1,39 +1,62 @@
/* Metro module 13530; source: modules/quests/native/VideoQuestModal/icons/SkipForwardIcon.tsx; dependencies: [31, 33, 7744, 2] */
import Module07744 from '../../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module07744Module from '../../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun102850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13720:6, offset: 0x0224b56d, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
let value = ReactModule;
value = value.forwardRef(_fun102851);
value.displayName = 'SkipForwardIcon';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/icons/SkipForwardIcon.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/icons/SkipForwardIcon.tsx');
exports.SkipForwardIcon = value;
function _fun102851(a0, a1) { // fn#102851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13720:149, offset: 0x0224b615, size: 337 bytes, params: 3, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
let object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const defaultImport = Module07744;
const defaultImportProps = {...value};
defaultImportProps['width'] = width;
defaultImportProps['height'] = height;
defaultImportProps['viewBox'] = '0 0 32 32';
defaultImportProps['fill'] = 'none';
defaultImportProps['ref'] = a1;
const Path = (Module07744Module).Path;
object = [
<Path
d="M169.545 229.312v7.919l14.838-10.253v46.348h7.669v-55.434h-6.169l-16.338 11.42ZM225.979 274.576c13.087 0 21.34-11.003 21.34-28.842 0-17.756-8.253-29.093-21.34-29.093-13.004 0-21.173 11.254-21.173 29.009 0 17.923 8.169 28.926 21.173 28.926Zm0-7.335c-8.419 0-13.004-8.336-13.004-21.591 0-13.087 4.585-21.673 13.004-21.673 8.503 0 13.171 8.669 13.171 21.757 0 13.171-4.668 21.507-13.171 21.507Z"
fill={color}
fillRule="nonzero"
transform="translate(-24.102 -30.774) scale(.19361)"
/>,
];
object[1] = (
<Path
d="M137.108 31.459a160.22 160.22 0 0 0-30.316-2.894c-88.439 0-160.24 71.801-160.24 160.241 0 88.439 71.801 160.24 160.24 160.24 88.499 0 160.241-71.742 160.241-160.24h-31.365c0 71.176-57.699 128.876-128.876 128.876-71.128 0-128.876-57.748-128.876-128.876 0-71.129 57.748-128.877 128.876-128.877 8.183 0 16.347.78 24.382 2.328l5.934-30.798Z"
fill={color}
transform="matrix(.0886 .03775 -.03775 .0886 14.284 -4.317)"
/>
);
object[2] = (
<Path
d="M144.616 190.007V96.608l197.822 69.184-197.822 69.185v-44.97Z"
fill={color}
transform="matrix(.0222 .01458 -.04451 .06777 28.52 -8.53)"
/>
);
return ((Component) => <Component {...defaultImportProps}>{object}</Component>)(defaultImport);
}
}
function _fun102851(a0, a1) { // fn#102851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13720:149, offset: 0x0224b615, size: 337 bytes, params: 3, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
let object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const defaultImportProps = {...value};
defaultImportProps['width'] = width;
defaultImportProps['height'] = height;
defaultImportProps['viewBox'] = '0 0 32 32';
defaultImportProps['fill'] = 'none';
defaultImportProps['ref'] = a1;
const Path = (require(7744) /* metro dependency 7744 */).Path;
object = [<Path d="M169.545 229.312v7.919l14.838-10.253v46.348h7.669v-55.434h-6.169l-16.338 11.42ZM225.979 274.576c13.087 0 21.34-11.003 21.34-28.842 0-17.756-8.253-29.093-21.34-29.093-13.004 0-21.173 11.254-21.173 29.009 0 17.923 8.169 28.926 21.173 28.926Zm0-7.335c-8.419 0-13.004-8.336-13.004-21.591 0-13.087 4.585-21.673 13.004-21.673 8.503 0 13.171 8.669 13.171 21.757 0 13.171-4.668 21.507-13.171 21.507Z" fill={color} fillRule="nonzero" transform="translate(-24.102 -30.774) scale(.19361)" />];
object[1] = <Path d="M137.108 31.459a160.22 160.22 0 0 0-30.316-2.894c-88.439 0-160.24 71.801-160.24 160.241 0 88.439 71.801 160.24 160.24 160.24 88.499 0 160.241-71.742 160.241-160.24h-31.365c0 71.176-57.699 128.876-128.876 128.876-71.128 0-128.876-57.748-128.876-128.876 0-71.129 57.748-128.877 128.876-128.877 8.183 0 16.347.78 24.382 2.328l5.934-30.798Z" fill={color} transform="matrix(.0886 .03775 -.03775 .0886 14.284 -4.317)" />;
object[2] = <Path d="M144.616 190.007V96.608l197.822 69.184-197.822 69.185v-44.97Z" fill={color} transform="matrix(.0222 .01458 -.04451 .06777 28.52 -8.53)" />;
return ((Component) => <Component {...defaultImportProps}>{object}</Component>)(defaultImport);
}
global.__d(_fun102850, 13530, [31, 33, 7744, 2]) /* metro module 13530, dependencies: [31, 33, 7744, 2] */;
@@ -1,29 +1,34 @@
/* Metro module 13595; source: modules/quests/native/VideoQuestModal/openVideoQuestModal.tsx; dependencies: [491, 5080, 13596, 1962, 9522, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as VideoQuestUtilsModule from '../../utils/VideoQuestUtils.tsx'; /* Metro dependency 9522 */
function _fun103326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:6, offset: 0x022624f1, size: 110 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/openVideoQuestModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/openVideoQuestModal.tsx');
exports.default = openVideoQuestModal;
function openVideoQuestModal({questId, sourceQuestContent, questContentPosition, initialStep}) { // fn#103327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:98, offset: 0x0226255f, size: 202 bytes, params: 2, frame: 24
const value2 = importAll(dependencyMap[0]).v4();
const defaultImport = importDefault(dependencyMap[1]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
const object = {questId: questId, questContentPosition: questContentPosition, videoSessionId: value2,
initialStep: initialStep, onClose: onClose_103328, sourceQuestContent: sourceQuestContent};
const moduleValue2 = require(dependencyMap[4]);
const getVideoQuestModalKey = moduleValue2.getVideoQuestModalKey;
return Reflect.apply(pushLazy, defaultImport, [value, object, Reflect.apply(getVideoQuestModalKey, moduleValue2,
[questId])]);
function openVideoQuestModalOnClose() { // fn#103328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:344, owner: openVideoQuestModal.onClose, offset: 0x02262629, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (VideoQuestUtilsModule).handleVideoQuestModalClose({questId: questId,
sourceQuestContent: sourceQuestContent, videoSessionId: env0_2});
}
}
}
function openVideoQuestModal({questId, sourceQuestContent, questContentPosition, initialStep}) { // fn#103327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:98, offset: 0x0226255f, size: 202 bytes, params: 2, frame: 24
const value2 = importAll(dependencyMap[0]).v4();
const defaultImport = importDefault(dependencyMap[1]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
const object2 = {questId: questId, questContentPosition: questContentPosition, videoSessionId: value2,
initialStep: initialStep, onClose: onClose_103328, sourceQuestContent: sourceQuestContent};
const moduleValue2 = require(dependencyMap[4]);
const getVideoQuestModalKey = moduleValue2.getVideoQuestModalKey;
return Reflect.apply(pushLazy, defaultImport, [value, object2, Reflect.apply(getVideoQuestModalKey, moduleValue2,
[questId])]);
}
function openVideoQuestModalOnClose() { // fn#103328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:344, owner: openVideoQuestModal.onClose, offset: 0x02262629, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(9522) /* metro dependency 9522: VideoQuestUtils */).handleVideoQuestModalClose({questId: questId,
sourceQuestContent: sourceQuestContent, videoSessionId: env0_2});
}
global.__d(_fun103326, 13595, [491, 5080, 13596, 1962, 9522,
2]) /* metro module 13595, dependencies: [491, 5080, 13596, 1962, 9522, 2] */;
@@ -1,10 +1,16 @@
/* Metro module 13627; source: modules/quests/native/VideoQuestModal/useVideoQuestClickCtaAndMaybeCloseModal.tsx; dependencies: [31, 1471, 9505, 9520, 6531, 7120, 2] */
import URLUtils from '../../../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as QuestCopyUtilsModule from '../../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
function _fun104074(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:6, offset: 0x02283765, size: 121 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/useVideoQuestClickCtaAndMaybeCloseModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/useVideoQuestClickCtaAndMaybeCloseModal.tsx');
exports.useVideoQuestClickCtaAndMaybeCloseModal = function(a0) {
var quest = a0.quest;
var env0_0 = quest;
@@ -15,34 +21,35 @@ function _fun104074(global, require, importDefault, importAll, module, exports,
var impressionId = a0.impressionId;
return impressionId.useCallback(_fun104076, [quest, impressionId, sourceQuestContent, onClose]);
};
}
function useVideoQuestClickCtaAndMaybeCloseModal({quest, onClose, sourceQuestContent, impressionId}) { // fn#104075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:263, offset: 0x022837de, size: 92 bytes, params: 2, frame: 17
return impressionId.useCallback(_fun104076, [quest, impressionId, sourceQuestContent, onClose]);
function _fun104076() { // fn#104076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:391, offset: 0x0228383a, size: 205 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = URLUtils;
const isDiscordUrl = defaultImport.isDiscordUrl;
const getCtaLink = QuestCopyUtilsModule.getCtaLink;
if (Reflect.apply(isDiscordUrl, defaultImport, [Reflect.apply(getCtaLink, QuestCopyUtilsModule, [quest.config]),
true])) {
onClose();
}
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openGameLinkDirectly = value.openGameLinkDirectly;
questBinding = quest;
const object = {};
const QuestContent = (QuestTypesModule).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object.content = VIDEO_MODAL_MOBILE;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object.ctaContent = OPEN_GAME_LINK;
object.impressionId = impressionId;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(openGameLinkDirectly, value, [questBinding, object]);
}
function useVideoQuestClickCtaAndMaybeCloseModal({quest, onClose, sourceQuestContent, impressionId}) { // fn#104075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:263, offset: 0x022837de, size: 92 bytes, params: 2, frame: 17
return impressionId.useCallback(_fun104076, [quest, impressionId, sourceQuestContent, onClose]);
}
function _fun104076() { // fn#104076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:391, offset: 0x0228383a, size: 205 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
const isDiscordUrl = defaultImport.isDiscordUrl;
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getCtaLink = questCopyUtilsModule.getCtaLink;
if (Reflect.apply(isDiscordUrl, defaultImport, [Reflect.apply(getCtaLink, questCopyUtilsModule, [quest.config]),
true])) {
onClose();
}
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openGameLinkDirectly = value.openGameLinkDirectly;
questBinding = quest;
const object2 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object2.content = VIDEO_MODAL_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object2.ctaContent = OPEN_GAME_LINK;
object2.impressionId = impressionId;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openGameLinkDirectly, value, [questBinding, object2]);
}
global.__d(_fun104074, 13627, [31, 1471, 9505, 9520, 6531, 7120,
2]) /* metro module 13627, dependencies: [31, 1471, 9505, 9520, 6531, 7120, 2] */;