Files
2026-07-28 01:06:53 +03:00

122 lines
7.2 KiB
TypeScript

/* 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});
let value = VideoQuestUIStoreModule;
const env0_5 = value.FetchStatus;
const env0_6 = value.useVideoQuestUIStore;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_8 = (Native).space.PX_8;
const env0_9 = Reflect.apply(createStyles, value, [{content: {paddingBottom: PX_8}, loadingSpinner: {height: 100}}]);
(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 object4;
const styles = useStyles();
const value3 = useVideoQuestUIStore(function(a0) {
return a0.transcript;
});
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>
);
}
}
}
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] */;