2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 13919
|
|
|
|
|
// Function ID: 13920
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: ActivityShareLinkModal
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [5, 32, 19, 17, 1391, 1922, 1390, 9118, 4670, 21, 4668, 712, 589, 7629, 11361, 13918, 7183, 1370, 13920, 7465, 7474, 4097, 1236, 7205, 4096, 1494, 1629, 500, 6350, 8531, 6345, 5437, 4322, 9128, 9129, 12012, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 13919 (ActivityShareLinkModal)
|
|
|
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
|
|
|
import closure_3 from "asyncGeneratorStep" /* 5 */;
|
|
|
|
|
import closure_4 from "_slicedToArray" /* 32 */;
|
|
|
|
|
import closure_5 from "noop" /* 19 */;
|
|
|
|
|
import { View } from "get ActivityIndicator" /* 17 */;
|
|
|
|
|
import closure_7 from "ensureGuildLoaded" /* 1391 */;
|
|
|
|
|
import closure_8 from "mergeGuildAvatar" /* 1922 */;
|
|
|
|
|
import closure_9 from "participantFromServer" /* 1390 */;
|
|
|
|
|
import { UserRowModes } from "UserRowModes" /* 9118 */;
|
|
|
|
|
import { MessageSendLocation } from "MESSAGE_GROUP_SPACING" /* 4670 */;
|
|
|
|
|
import jsxProd from "jsxProd" /* 21 */;
|
|
|
|
|
import createCacheKey from "createCacheKey" /* 4668 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-07-29 08:29:29 +00:00
|
|
|
({ jsx: closure_12, jsxs: map1 } = jsxProd);
|
2026-08-06 08:05:19 +00:00
|
|
|
createCacheKey = { headerLeftContainer: null, headerRightContainer: null, header: null, container: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
createCacheKey = { paddingLeft: ThemesDefault.space.PX_16 };
|
2026-07-29 08:29:29 +00:00
|
|
|
createCacheKey[0] = createCacheKey;
|
2026-08-24 06:08:38 +00:00
|
|
|
createCacheKey[1] = { paddingRight: ThemesDefault.space.PX_16 };
|
|
|
|
|
let obj1 = { paddingRight: ThemesDefault.space.PX_16 };
|
|
|
|
|
createCacheKey[2] = { borderBottomWidth: 0, shadowColor: "transparent", backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWER };
|
|
|
|
|
let obj2 = { borderBottomWidth: 0, shadowColor: "transparent", backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWER };
|
|
|
|
|
createCacheKey[3] = { flex: 1, display: "flex", backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWER };
|
|
|
|
|
let closure_14 = createCacheKey.createStyles(createCacheKey);
|
|
|
|
|
let obj3 = { flex: 1, display: "flex", backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWER };
|
|
|
|
|
let result = require("set").fileFinishedImporting("modules/activities/native/ActivityShareLinkModal.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function ActivityShareLinkModal(applicationId) {
|
|
|
|
|
applicationId = applicationId.applicationId;
|
|
|
|
|
const customId = applicationId.customId;
|
|
|
|
|
const linkId = applicationId.linkId;
|
|
|
|
|
const message = applicationId.message;
|
|
|
|
|
const onShare = applicationId.onShare;
|
2026-07-29 08:29:29 +00:00
|
|
|
let stateFromStores;
|
|
|
|
|
c6 = undefined;
|
|
|
|
|
let first;
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_8 = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
let first1;
|
2026-08-24 06:08:38 +00:00
|
|
|
UserRowModes = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
let stateFromStores1;
|
|
|
|
|
let first2;
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_13 = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
let first3;
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_15 = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
let height;
|
|
|
|
|
const tmp = first3();
|
2026-07-23 10:11:24 +00:00
|
|
|
let obj = applicationId(linkId[12]);
|
2026-07-29 08:29:29 +00:00
|
|
|
const items = [first1];
|
|
|
|
|
stateFromStores = obj.useStateFromStores(items, () => first1.getConnectedActivityChannelId());
|
2026-07-20 16:05:17 +00:00
|
|
|
const items1 = [stateFromStores];
|
2026-07-23 10:11:24 +00:00
|
|
|
const memo = stateFromStores.useMemo(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let destinationIdFromChannelId;
|
|
|
|
|
if (null != stateFromStores) {
|
2026-07-29 08:29:29 +00:00
|
|
|
destinationIdFromChannelId = applicationId(linkId[13]).getDestinationIdFromChannelId(tmp);
|
2026-07-20 16:05:17 +00:00
|
|
|
const obj = applicationId(linkId[13]);
|
|
|
|
|
}
|
|
|
|
|
return destinationIdFromChannelId;
|
|
|
|
|
}, items1);
|
2026-07-29 08:29:29 +00:00
|
|
|
[tmp7, c6] = onShare(stateFromStores.useState(false), 2);
|
|
|
|
|
const tmp8 = onShare(stateFromStores.useState(false), 2);
|
|
|
|
|
first = tmp8[0];
|
|
|
|
|
closure_8 = tmp8[1];
|
|
|
|
|
const tmp10 = onShare(stateFromStores.useState([]), 2);
|
|
|
|
|
first1 = tmp10[0];
|
|
|
|
|
UserRowModes = tmp10[1];
|
2026-07-23 10:11:24 +00:00
|
|
|
const callback = stateFromStores.useCallback((arg0) => {
|
2026-07-20 16:05:17 +00:00
|
|
|
callback(arg0);
|
|
|
|
|
}, []);
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = applicationId(linkId[12]);
|
2026-07-20 16:05:17 +00:00
|
|
|
const items2 = [closure_8];
|
2026-07-29 08:29:29 +00:00
|
|
|
stateFromStores1 = obj1.useStateFromStores(items2, () => currentUser.getCurrentUser());
|
|
|
|
|
const tmp13 = onShare(stateFromStores.useState(""), 2);
|
|
|
|
|
first2 = tmp13[0];
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_13 = tmp15;
|
2026-07-29 08:29:29 +00:00
|
|
|
const items3 = [applicationId, stateFromStores1, customId, linkId, tmp13[1]];
|
2026-07-23 10:11:24 +00:00
|
|
|
const effect = stateFromStores.useEffect(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let obj = applicationId(linkId[14]);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { applicationId, referrerId: null, customId: null, linkId: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
let id;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (stateFromStores1 != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = stateFromStores1.id;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = id;
|
|
|
|
|
obj[2] = customId;
|
|
|
|
|
obj[3] = linkId;
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_13(obj.getActivityLaunchURL(obj));
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items3);
|
2026-07-29 08:29:29 +00:00
|
|
|
const items4 = [first, onShare];
|
2026-07-23 10:11:24 +00:00
|
|
|
const callback1 = stateFromStores.useCallback(() => {
|
2026-07-29 08:29:29 +00:00
|
|
|
onShare(false, first);
|
2026-07-20 16:05:17 +00:00
|
|
|
const result = applicationId(linkId[15]).closeActivityShareLinkModal();
|
|
|
|
|
}, items4);
|
|
|
|
|
const items5 = [applicationId];
|
2026-07-29 08:29:29 +00:00
|
|
|
first3 = onShare(customId(linkId[16])(items5), 1)[0];
|
|
|
|
|
const items6 = [first3, first, first2, message, onShare, first1];
|
|
|
|
|
const items7 = [first2];
|
|
|
|
|
const callback2 = stateFromStores.useCallback(message(function*() {
|
|
|
|
|
if (c3 === 2) {
|
|
|
|
|
c3 = 3;
|
|
|
|
|
HermesBuiltin.throwTypeError();
|
|
|
|
|
} else if (tmp5 === 3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
let obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
c3 = 2;
|
|
|
|
|
if (0 === dependencyMap) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c3 = 3;
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c3 = 3;
|
|
|
|
|
obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_1 = tmp3;
|
|
|
|
|
closure_0 = tmp2;
|
2026-07-29 08:29:29 +00:00
|
|
|
closure_0 = undefined;
|
|
|
|
|
closure_1 = undefined;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (null != closure_1_14) {
|
2026-07-29 08:29:29 +00:00
|
|
|
dependencyMap = 1;
|
|
|
|
|
c3 = 1;
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = { value: null, done: false };
|
|
|
|
|
obj1[0] = Promise.all(closure_1_9.map(closure_1_0(7629).getOrResolveChannelIdFromDestinationId));
|
2026-07-29 08:29:29 +00:00
|
|
|
return obj1;
|
|
|
|
|
} else {
|
|
|
|
|
c3 = 3;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (arg0 === 1) {
|
|
|
|
|
c3 = 3;
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 !== 2) {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = arg1.filter(closure_1_0(1370).isNotNullish);
|
|
|
|
|
closure_1 = closure_1_0(13920).resolveActivityShareMessageContent(c3, name, closure_12);
|
2026-07-29 08:29:29 +00:00
|
|
|
callback2(true);
|
|
|
|
|
const item = closure_0.forEach((() => {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = v3((arg0) => {
|
|
|
|
|
closure_0 = arg0;
|
|
|
|
|
c2 = 0;
|
|
|
|
|
c1 = 0;
|
2026-07-29 08:29:29 +00:00
|
|
|
return (function*(arg0) {
|
|
|
|
|
if (c1 === 2) {
|
|
|
|
|
c1 = 3;
|
|
|
|
|
HermesBuiltin.throwTypeError();
|
|
|
|
|
} else if (tmp3 === 3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
let obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
c1 = 2;
|
|
|
|
|
if (0 === c2) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c1 = 3;
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c1 = 3;
|
|
|
|
|
obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
const channel = closure_2_7.getChannel(closure_0);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null != channel) {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = closure_2_1(closure_2_2[19]);
|
|
|
|
|
let obj2 = closure_2_1(closure_2_2[20]);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj1 = { location: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1[0] = closure_2_11.ACTIVITY_SHARE;
|
2026-07-29 08:29:29 +00:00
|
|
|
c2 = 1;
|
|
|
|
|
c1 = 1;
|
|
|
|
|
obj2 = { value: null, done: false };
|
|
|
|
|
obj2[0] = obj1.sendMessage(tmp18, obj2.parse(channel, c1), false, obj1);
|
|
|
|
|
return obj2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (arg0 === 1) {
|
|
|
|
|
c1 = 3;
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c1 = 3;
|
|
|
|
|
obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
c1 = 3;
|
2026-08-24 06:08:38 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
} catch (tmp12) {
|
|
|
|
|
c1 = tmp;
|
|
|
|
|
throw tmp12;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
});
|
|
|
|
|
return function() {
|
|
|
|
|
const self = this;
|
|
|
|
|
const apply = closure_0.apply;
|
|
|
|
|
if (typeof apply === "unknown") {
|
|
|
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
|
|
|
} else {
|
|
|
|
|
applyArgumentsResult = apply(self, arguments);
|
|
|
|
|
}
|
|
|
|
|
return applyArgumentsResult;
|
|
|
|
|
};
|
|
|
|
|
})());
|
2026-08-24 06:08:38 +00:00
|
|
|
const obj5 = closure_1_0(13920);
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj2 = { key: "ACTIVITY_SHARE_LINK_SUCCESS", content: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
const intl = closure_1_0(1236).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj3 = { applicationName: null };
|
|
|
|
|
obj3[0] = name.name;
|
2026-08-24 06:08:38 +00:00
|
|
|
obj2[1] = intl.formatToPlainString(closure_1_0(1236).t.jQULqL, obj3);
|
|
|
|
|
closure_1_1(4097).open(obj2);
|
|
|
|
|
callback(true, closure_7);
|
|
|
|
|
const obj6 = closure_1_1(4097);
|
|
|
|
|
const result = closure_1_0(13918).closeActivityShareLinkModal();
|
|
|
|
|
const obj9 = closure_1_0(13918);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
c3 = 3;
|
|
|
|
|
obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} catch (tmp11) {
|
|
|
|
|
c3 = tmp;
|
|
|
|
|
throw tmp11;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}), items6);
|
|
|
|
|
closure_15 = stateFromStores.useCallback(() => {
|
|
|
|
|
applicationId(linkId[23]).copy(first2);
|
2026-07-20 16:05:17 +00:00
|
|
|
currentUser(true);
|
|
|
|
|
const obj = applicationId(linkId[23]);
|
|
|
|
|
applicationId(linkId[24]).presentLinkCopied();
|
|
|
|
|
}, items7);
|
2026-07-29 08:29:29 +00:00
|
|
|
height = customId(linkId[25])({ ignoreKeyboard: true }).height;
|
2026-07-20 16:05:17 +00:00
|
|
|
const items8 = [height];
|
|
|
|
|
obj = {
|
2026-07-23 10:11:24 +00:00
|
|
|
style: stateFromStores.useMemo(() => {
|
2026-08-24 06:08:38 +00:00
|
|
|
height = "100%";
|
2026-07-29 08:29:29 +00:00
|
|
|
return { height };
|
|
|
|
|
}, items8),
|
|
|
|
|
children: null
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
2026-08-06 08:05:19 +00:00
|
|
|
obj = { headerStyle: tmp.header, title: null, headerTitle: null, headerLeft: null, headerRight: null, headerLeftContainerStyle: null, headerRightContainerStyle: null, headerStatusBarHeight: null, headerTitleAlign: "center" };
|
2026-07-23 10:11:24 +00:00
|
|
|
let intl = applicationId(linkId[22]).intl;
|
2026-08-06 08:05:19 +00:00
|
|
|
obj[1] = intl.string(applicationId(linkId[22]).t.r9qKow);
|
|
|
|
|
obj[2] = function headerTitle(children) {
|
|
|
|
|
return first2(applicationId(linkId[29]).GenericHeaderTitle, { title: children.children, subtitle: message, variant: "redesign/heading-18/bold" });
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
2026-08-06 08:05:19 +00:00
|
|
|
let obj4 = applicationId(linkId[30]);
|
|
|
|
|
obj[3] = obj4.getHeaderCloseButton(callback1);
|
|
|
|
|
obj[4] = function headerRight(arg0) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const obj = {};
|
|
|
|
|
const merged = Object.assign(arg0);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj.onPress = closure_15;
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = applicationId(linkId[22]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj.accessibilityLabel = intl.string(applicationId(linkId[22]).t.Xrt5Po);
|
2026-08-06 08:05:19 +00:00
|
|
|
obj.IconComponent = applicationId(linkId[32]).LinkIcon;
|
|
|
|
|
return first2(applicationId(linkId[31]).HeaderActionButton, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
2026-08-06 08:05:19 +00:00
|
|
|
({ headerLeftContainer: obj4[5], headerRightContainer: obj4[6] } = tmp);
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp6 = onShare(stateFromStores.useState(false), 2);
|
2026-08-06 08:05:19 +00:00
|
|
|
let num = 0;
|
|
|
|
|
if (!obj6.isIOS()) {
|
|
|
|
|
num = customId(linkId[26])().top;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-08-06 08:05:19 +00:00
|
|
|
obj[7] = num + customId(linkId[11]).space.PX_8;
|
|
|
|
|
const items9 = [first2(applicationId(linkId[28]).Header, obj), ];
|
|
|
|
|
obj1 = { style: tmp.container, children: null };
|
|
|
|
|
const items10 = [first2(customId(linkId[33]), { absolute: true }), first2(customId(linkId[34]), { disableGradient: true, disableStickySections: true, initialSelectedDestinations: [], insetEnd: 0, onSelectedDestinationChange: callback, originDestination: memo, rowMode: UserRowModes.TOGGLE }), ];
|
|
|
|
|
let obj3 = { disabled: tmp7, floatingBackgroundColor: tmp.container.backgroundColor, isVisible: first1.length > 0, loading: tmp7, onPress: null, text: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp24;
|
|
|
|
|
if (!tmp7) {
|
|
|
|
|
tmp24 = callback2;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-08-06 08:05:19 +00:00
|
|
|
obj3[4] = tmp24;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (1 === first1.length) {
|
|
|
|
|
const intl3 = tmp2(tmp3[22]).intl;
|
|
|
|
|
let stringResult = intl3.string(tmp2(tmp3[22]).t.TXNS7S);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-07-29 08:29:29 +00:00
|
|
|
const intl2 = tmp2(tmp3[22]).intl;
|
2026-08-06 08:05:19 +00:00
|
|
|
obj4 = { count: null };
|
|
|
|
|
obj4[0] = length;
|
|
|
|
|
stringResult = intl2.formatToPlainString(tmp2(tmp3[22]).t.jWtYUm, obj4);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-08-06 08:05:19 +00:00
|
|
|
obj3[5] = stringResult;
|
|
|
|
|
items10[2] = first2(applicationId(linkId[35]).ModalFloatingAction, obj3);
|
|
|
|
|
obj1[1] = items10;
|
2026-08-24 06:08:38 +00:00
|
|
|
items9[1] = closure_13(c6, obj1);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = items9;
|
2026-08-24 06:08:38 +00:00
|
|
|
return closure_13(c6, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|