2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 13443
|
|
|
|
|
// Function ID: 13444
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: ShareScreenModal
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [5, 32, 19, 2045, 13396, 21, 3, 5039, 7810, 504, 4849, 1095, 13444, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: default
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 13443 (ShareScreenModal)
|
2026-09-18 19:45:33 +00:00
|
|
|
import LoggerDefault from "Logger" /* 3 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import Fragment from "Fragment" /* 21 */;
|
2026-09-26 17:57:22 +00:00
|
|
|
import ChannelTypes from "ChannelTypes" /* 1095 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import ModalActionCreatorsDefault from "ModalActionCreators" /* 5039 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import ShareScreenConstants from "ShareScreenConstants" /* 13396 */;
|
|
|
|
|
import _asyncToGenerator from "_asyncToGenerator" /* 5 */;
|
|
|
|
|
import _slicedToArray from "_slicedToArray" /* 32 */;
|
|
|
|
|
import react_mod from "react" /* 19 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 2045 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
let c4, c5, closure_2;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
function onClose() {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = ModalActionCreatorsDefault;
|
|
|
|
|
obj.popWithKey(SHARE_SCREEN_MODAL_KEY);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let react = react_mod;
|
|
|
|
|
const SHARE_SCREEN_MODAL_KEY = ShareScreenConstants.SHARE_SCREEN_MODAL_KEY;
|
|
|
|
|
const jsx = Fragment.jsx;
|
2026-09-18 19:45:33 +00:00
|
|
|
let closure_9 = new LoggerDefault("ShareScreenModal");
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp2 = new LoggerDefault("ShareScreenModal");
|
2026-09-18 19:45:33 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/share/native/ShareScreenModal.tsx");
|
|
|
|
|
|
2026-09-26 17:57:22 +00:00
|
|
|
export default function ShareScreenModal(text) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_5;
|
2026-09-18 19:45:33 +00:00
|
|
|
text = text.text;
|
|
|
|
|
require = text;
|
|
|
|
|
const channelId = text.channelId;
|
|
|
|
|
const shareId = text.shareId;
|
|
|
|
|
const attachmentManifest = text.attachmentManifest;
|
|
|
|
|
let first;
|
2026-10-01 14:13:23 +00:00
|
|
|
react = undefined;
|
2026-09-18 19:45:33 +00:00
|
|
|
let stateFromStores;
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = react;
|
|
|
|
|
let tmp = first(react.useState(null), 2);
|
2026-09-18 19:45:33 +00:00
|
|
|
first = tmp[0];
|
2026-10-01 14:13:23 +00:00
|
|
|
react = tmp[1];
|
2026-09-18 19:45:33 +00:00
|
|
|
let items = [shareId, attachmentManifest];
|
2026-10-01 14:13:23 +00:00
|
|
|
const effect = react.useEffect(() => {
|
|
|
|
|
function fetchAttachments() {
|
|
|
|
|
return obj(...arguments);
|
|
|
|
|
}
|
|
|
|
|
let obj = function _fetchAttachments() {
|
|
|
|
|
let logger;
|
|
|
|
|
obj = _asyncToGenerator(async (arg0, value) => {
|
|
|
|
|
let obj2;
|
|
|
|
|
let v3;
|
|
|
|
|
if (c5 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
|
|
|
} else if (tmp3 === 3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
const obj3 = { value, done: true };
|
|
|
|
|
return obj3;
|
|
|
|
|
} else {
|
|
|
|
|
return { value: "HermesInternal", done: null };
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
try {
|
|
|
|
|
let closure_1;
|
|
|
|
|
let closure_0;
|
|
|
|
|
c5 = 2;
|
|
|
|
|
if (0 === c4) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
const obj4 = { value, done: true };
|
|
|
|
|
return obj4;
|
|
|
|
|
} else {
|
|
|
|
|
closure_1 = tmp;
|
|
|
|
|
closure_0 = undefined;
|
|
|
|
|
if (undefined !== closure_2) {
|
|
|
|
|
if (undefined !== c3) {
|
|
|
|
|
c3 = 1;
|
|
|
|
|
c4 = 2;
|
|
|
|
|
c5 = 1;
|
|
|
|
|
const obj5 = { value: obj2.sharedAttachments(tmp17, tmp18), done: false };
|
|
|
|
|
obj2 = channelId(shareId[8]);
|
|
|
|
|
return obj5;
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
} else if (1 === c4) {
|
2026-09-18 19:45:33 +00:00
|
|
|
c3 = 0;
|
2026-10-01 14:13:23 +00:00
|
|
|
closure_1 = closure_2;
|
|
|
|
|
logger.error("Error fetching attachments:", closure_1);
|
2026-09-18 19:45:33 +00:00
|
|
|
} else if (arg0 === 1) {
|
2026-10-01 14:13:23 +00:00
|
|
|
c5 = 3;
|
2026-09-18 19:45:33 +00:00
|
|
|
throw value;
|
2026-10-01 14:13:23 +00:00
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c3 = 0;
|
|
|
|
|
c5 = 3;
|
|
|
|
|
obj = { value, done: true };
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
|
|
|
|
closure_0 = value;
|
|
|
|
|
c5(closure_0);
|
2026-09-18 19:45:33 +00:00
|
|
|
c3 = 0;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
c5 = 3;
|
|
|
|
|
return { value: "HermesInternal", done: null };
|
|
|
|
|
} catch (tmp21) {
|
|
|
|
|
closure_2 = tmp21;
|
|
|
|
|
if (0 === c3) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw tmp21;
|
|
|
|
|
} else {
|
|
|
|
|
c4 = 1;
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
});
|
|
|
|
|
return obj(...arguments);
|
2026-09-18 19:45:33 +00:00
|
|
|
};
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp = !fetchAttachments();
|
2026-09-18 19:45:33 +00:00
|
|
|
}, items);
|
2026-10-01 14:13:23 +00:00
|
|
|
let tmp4 = shareId;
|
|
|
|
|
let obj2 = require("get initialized");
|
2026-09-18 19:45:33 +00:00
|
|
|
const items1 = [stateFromStores];
|
2026-10-01 14:13:23 +00:00
|
|
|
stateFromStores = obj2.useStateFromStores(items1, () => ChannelStore.getChannel(channelId));
|
|
|
|
|
const tmp6 = first(react.useState(null), 2);
|
|
|
|
|
let closure_7 = tmp6[1];
|
2026-09-18 19:45:33 +00:00
|
|
|
const items2 = [channelId, stateFromStores];
|
2026-10-01 14:13:23 +00:00
|
|
|
let first1 = tmp6[0];
|
|
|
|
|
const effect1 = react.useEffect(() => {
|
|
|
|
|
function fetchChannel() {
|
|
|
|
|
return obj(...arguments);
|
|
|
|
|
}
|
|
|
|
|
let obj = function _fetchChannel() {
|
|
|
|
|
let logger;
|
|
|
|
|
obj = _asyncToGenerator(async (arg0, value) => {
|
|
|
|
|
let obj2;
|
|
|
|
|
if (c5 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
|
|
|
} else if (tmp3 === 3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
const obj3 = { value, done: true };
|
|
|
|
|
return obj3;
|
|
|
|
|
} else {
|
|
|
|
|
return { value: "HermesInternal", done: null };
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
let c3;
|
|
|
|
|
try {
|
|
|
|
|
let closure_1;
|
|
|
|
|
let closure_0;
|
|
|
|
|
c5 = 2;
|
|
|
|
|
if (0 === c4) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
const obj4 = { value, done: true };
|
|
|
|
|
return obj4;
|
|
|
|
|
} else {
|
|
|
|
|
closure_1 = tmp;
|
|
|
|
|
closure_0 = undefined;
|
|
|
|
|
if (null != closure_1) {
|
|
|
|
|
if (null == closure_1_6) {
|
|
|
|
|
c3 = 1;
|
|
|
|
|
c4 = 2;
|
|
|
|
|
c5 = 1;
|
|
|
|
|
const obj5 = { value: obj2.fetchChannel(tmp17), done: false };
|
|
|
|
|
obj2 = channelId(shareId[10]);
|
|
|
|
|
return obj5;
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
} else if (1 === c4) {
|
2026-09-18 19:45:33 +00:00
|
|
|
c3 = 0;
|
2026-10-01 14:13:23 +00:00
|
|
|
closure_1 = closure_2;
|
|
|
|
|
logger.error("Error fetching channel:", closure_1);
|
2026-09-18 19:45:33 +00:00
|
|
|
} else if (arg0 === 1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw value;
|
2026-10-01 14:13:23 +00:00
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c3 = 0;
|
|
|
|
|
c5 = 3;
|
|
|
|
|
obj = { value, done: true };
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
|
|
|
|
closure_0 = value;
|
|
|
|
|
closure_1_7(closure_0);
|
2026-09-18 19:45:33 +00:00
|
|
|
c3 = 0;
|
|
|
|
|
}
|
|
|
|
|
c5 = 3;
|
2026-10-01 14:13:23 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
|
|
|
|
} catch (tmp21) {
|
|
|
|
|
closure_2 = tmp21;
|
|
|
|
|
if (0 === c3) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw tmp21;
|
|
|
|
|
} else {
|
|
|
|
|
c4 = 1;
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
});
|
|
|
|
|
return obj(...arguments);
|
2026-09-18 19:45:33 +00:00
|
|
|
};
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp = !fetchChannel();
|
2026-09-18 19:45:33 +00:00
|
|
|
}, items2);
|
2026-10-01 14:13:23 +00:00
|
|
|
let tmp9 = stateFromStores;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (stateFromStores == null) {
|
2026-10-01 14:13:23 +00:00
|
|
|
tmp9 = first1;
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
first1 = tmp9;
|
|
|
|
|
const items3 = [text, first, channelId, tmp9];
|
|
|
|
|
const memo = obj.useMemo(() => {
|
|
|
|
|
let items;
|
|
|
|
|
const obj = { text: require, attachments: items };
|
|
|
|
|
items = first;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (first == null) {
|
|
|
|
|
items = [];
|
|
|
|
|
}
|
|
|
|
|
if (null != first1) {
|
2026-10-01 14:13:23 +00:00
|
|
|
if (first1.type !== ChannelTypes.ChannelTypes.DM) {
|
2026-09-18 19:45:33 +00:00
|
|
|
obj.targetChannelId = channelId;
|
|
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
let isArray = tmp && "recipients" in tmp;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (isArray) {
|
|
|
|
|
const _Array = Array;
|
|
|
|
|
isArray = Array.isArray(tmp.recipients);
|
|
|
|
|
}
|
|
|
|
|
if (isArray) {
|
2026-10-01 14:13:23 +00:00
|
|
|
obj.targetUserId = first1.recipients[0];
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp4 = tmp && "recipient" in tmp && "id" in tmp.recipient;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (tmp4) {
|
|
|
|
|
const recipient = tmp.recipient;
|
|
|
|
|
let id;
|
|
|
|
|
if (recipient != null) {
|
|
|
|
|
id = recipient.id;
|
|
|
|
|
}
|
|
|
|
|
obj.targetUserId = id;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return obj;
|
|
|
|
|
}, items3);
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj3 = { sharedContent: memo, onClose };
|
|
|
|
|
return first1(channelId(tmp4[12]), obj3);
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|